sudo apt-get update
sudo apt-get upgrade
| ############### | |
| #### GIST: Makefile targets | |
| #### https://gist.github.com/rkrug/9005f4b7169e65b6c51866209370c599 | |
| ############### | |
| SHELL = /bin/bash | |
| # run targets pipeline | |
| build: | |
| Rscript -e "targets::tar_make()" |
| ############### | |
| #### GIST: Makefile targets | |
| #### https://gist.github.com/rkrug/9005f4b7169e65b6c51866209370c599 | |
| ############### | |
| SHELL = /bin/bash | |
| # run targets pipeline | |
| build: | |
| Rscript -e "targets::tar_make()" |
| ############### | |
| #### GIST: Makefile targets | |
| #### https://gist.github.com/rkrug/9005f4b7169e65b6c51866209370c599 | |
| ############### | |
| SHELL = /bin/bash | |
| # run targets pipeline | |
| build: | |
| Rscript -e "targets::tar_make()" |
| SHELL = /bin/bash | |
| # run targets pipeline | |
| build: | |
| Rscript -e "targets::tar_make()" | |
| # visnetwork | |
| vis: visualise | |
| visualise: | |
| Rscript -e "targets::tar_visnetwork()" |
| SHELL = /bin/bash | |
| # run targets pipeline | |
| build: | |
| Rscript -e "targets::tar_make()" | |
| vis: visualise | |
| visualise: | |
| Rscript -e "targets::tar_visnetwork()" |
| ## See https://stackoverflow.com/a/11206700/632423 | |
| ## adjust when different | |
| SUBDIRS := $(wildcard */.) # e.g. "foo/. bar/." | |
| TARGETS := all build build-cran check clean clean_check clean_readme deps docs drat files # whatever else, but must not contain '/' | |
| ## | |
| # foo/.all bar/.all foo/.clean bar/.clean | |
| SUBDIRS_TARGETS := \ | |
| $(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS))) |
| --- | |
| title: "plantuml test" | |
| author: "Rainer M Krug" | |
| date: "6/17/2020" | |
| output: html_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| library(plantuml) | |
| knitr::knit_engines$set( |
| ## R parts based on https://github.com/yihui/knitr/blob/master/Makefile | |
| PKGNAME := $(shell sed -n "s/^Package: *\([^ ]*\)/\1/p" DESCRIPTION) | |
| PKGVERS := $(shell sed -n "s/^Version: *\([^ ]*\)/\1/p" DESCRIPTION) | |
| PKGSRC := $(shell basename `pwd`) | |
| ########### Package ########### | |
| #### |
| PLANTUML_JAR_URL = https://sourceforge.net/projects/plantuml/files/plantuml.jar/download | |
| DIAGRAMS_SRC := $(wildcard diagrams/*.plantuml) | |
| DIAGRAMS_PNG := $(addsuffix .png, $(basename $(DIAGRAMS_SRC))) | |
| DIAGRAMS_SVG := $(addsuffix .svg, $(basename $(DIAGRAMS_SRC))) | |
| # Default target first; build PNGs, probably what we want most of the time | |
| png: plantuml.jar $(DIAGRAMS_PNG) | |
| # SVG are nice-to-have but don't need to build by default | |
| svg: plantuml.jar $(DIAGRAMS_SVG) |