forked from remindmodel/remind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 1.33 KB
/
Makefile
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
.PHONY: help docs update-renv update-all-renv check check-fix
.DEFAULT_GOAL := help
help: ## Show this help.
@sed -e '/##/ !d' -e '/sed/ d' -e 's/^\([^ ]*\) *##\(.*\)/\1^\2/' \
$(MAKEFILE_LIST) | column -ts '^'
docs: ## Generate/update model HTML documentation in the doc/ folder
Rscript -e 'goxygen::goxygen(unitPattern = c("\\[","\\]"), includeCore=T, max_num_edge_labels="adjust", max_num_nodes_for_edge_labels = 15)'
@echo -e '\nOpen\ndoc/html/index.htm\nin your browser to view the generated documentation.'
update-renv: ## Upgrade all pik-piam packages in your renv to the respective
## latest release, make new snapshot
Rscript scripts/utils/updateRenv.R
update-all-renv: ## Upgrade all packages (including CRAN packages) in your renv
## to the respective latest release, make new snapshot
Rscript -e 'renv::update(exclude = "renv")'
Rscript -e 'renv::snapshot()'
check: ## Check if the GAMS code follows the coding etiquette
## using gms::codeCheck
Rscript -e 'invisible(gms::codeCheck(strict = TRUE))'
check-fix: ## Check if the GAMS code follows the coding etiquette
## and offer fixing any problems directly if possible
## using gms::codeCheck
Rscript -e 'invisible(gms::codeCheck(strict = TRUE, interactive = TRUE))'