-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (48 loc) · 1.95 KB
/
Copy pathMakefile
File metadata and controls
63 lines (48 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Capture the current value of the version of the package in DESCRIPTION
VERSION := $(shell grep Version DESCRIPTION | sed -e 's/Version: //')
help:
@echo "Makefile commands:"
@echo " check Check the built package"
@echo " install Install the built package"
@echo " debug Build and run a debug Docker container"
@echo " docs Generate documentation with roxygen2"
@echo " website Build the pkgdown website"
@echo " data-raw Run the Rscripts in data-raw to regenerate datasets"
@echo " update Update the measles model from the EpiWorld repository"
@echo " clean Clean up compiled files and temporary directories"
@echo ""
@echo "When calling the update command, you can specify the branch of the"
@echo "EpiWorld repository to use with the EPIWORLD_BRANCH environment"
@echo "variable. For example:"
@echo " EPIWORLD_BRANCH=develop make update"
debug: clean
docker run --rm -ti -w/mnt -v $(PWD):/mnt uofuepibio/epiworldr:debug make docker-debug
docker-debug:
EPI_CONFIG="-DEPI_DEBUG -Wall -pedantic -g" R CMD INSTALL \
--no-docs --build .
install:
Rscript -e 'devtools::install()'
README.md: README.qmd
quarto render README.qmd
check:
Rscript -e 'devtools::check()'
docs:
Rscript -e 'devtools::document()'
website:
Rscript -e 'pkgdown::build_site()'
data-raw: data-raw/*.R
for f in data-raw/*.R; do \
R CMD BATCH $$f && rm -f $$f.Rout; \
done
clean:
Rscript -e 'devtools::clean_dll()'
EPIWORLD_BRANCH ?= master
update: clean-update
git clone --depth=1 -b $(EPIWORLD_BRANCH) https://github.com/UofUEpiBio/epiworld tmp_epiworld && \
rsync -avz --delete tmp_epiworld/include/measles inst/include/. && \
rm -f inst/include/measles/*.mmd && \
rsync -avz --delete tmp_epiworld/docs/assets/img/measles*png man/figures && \
rm -rf tmp_epiworld
clean-update:
rm -rf tmp_epiworld
.PHONY: build update check clean docs docker-debug dev website install install-dev help local-update local-update-diagrams checkv debug clean-update