forked from metrumresearchgroup/mrgsolve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
140 lines (107 loc) · 2.82 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
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
SHELL := /bin/bash
PACKAGE=mrgsolve
VERSION=$(shell grep Version DESCRIPTION |awk '{print $$2}')
TARBALL=${PACKAGE}_${VERSION}.tar.gz
PKGDIR=.
export _MRGSOLVE_SKIP_MODLIB_BUILD_=yes
LOAD_CANDIDATE=library(mrgsolve, lib.loc="mrgsolve.Rcheck")
TEST_UNIT=testthat::test_dir("inst/maintenance/unit",stop_on_failure=TRUE)
all:
make doc
make build
make install
bump-dev:
Rscript -e 'usethis::use_version("dev")'
tag-version:
git tag $(VERSION)
git push origin $(VERSION)
package:
make house
make doc
make build
make install
make pkgdown
check:
make house
make doc
make build
R CMD check ${TARBALL} --no-manual
make unit
check-only:
make doc
R CMD check ${TARBALL} --no-manual --no-tests --no-install
cran: export _MRGSOLVE_SKIP_MODLIB_BUILD_=no
cran:
make house
make doc
make build
R CMD CHECK --as-cran ${TARBALL}
spelling:
Rscript -e 'spelling::spell_check_package(".")'
covr:
Rscript "inst/maintenance/covr.R"
house:
Rscript "inst/maintenance/build_housemodel.R"
test-all:
Rscript inst/maintenance/tests.R
no-test:
make build
R CMD check ${TARBALL} --no-tests --no-manual
pkgdown:
Rscript "inst/maintenance/pkgdown.R"
#cp -r DOCS/ ../mrgsolve/docs/
#touch ../mrgsolve/docs/.nojekyll
unit:
Rscript -e 'testthat::test_dir("inst/maintenance/unit")'
readme:
Rscript -e 'rmarkdown::render("README.Rmd")'
.PHONY: doc
doc:
Rscript -e "roxygen2::roxygenize()"
build:
R CMD build --md5 $(PKGDIR) --no-manual
install:
R CMD INSTALL --install-tests ${TARBALL} -l ~/Rlibs
install-build:
R CMD INSTALL --build --install-tests ${TARBALL}
test:
make install
make test-all
test1:
Rscript -e 'testthat::test_file("tests/testthat.R")'
test2:
Rscript -e 'testthat::test_dir("inst/maintenance/unit")'
test-cpp:
Rscript -e 'testthat::test_dir("inst/maintenance/unit-cpp")'
clean:
rm -rf src/*.o
rm -rf src/*.so
if [ -d mrgsolve.Rcheck ]; then rm -Rf mrgsolve.Rcheck; fi
if [ -d ~/Rlibs/mrgsolve ]; then R CMD REMOVE mrgsolve; fi
if [ -d mrgsolve ]; then rm -Rf mrgsolve; fi
datasets:
Rscript inst/maintenance/datasets.R
rhub:
Rscript -e 'rhub::check_for_cran(env_vars = c(`_R_CHECK_FORCE_SUGGESTS_` = "false"))'
check-fedora:
Rscript -e 'rhub::check_on_fedora(env_vars = c(`_R_CHECK_FORCE_SUGGESTS_` = "false"))'
check-devel:
Rscript -e 'rhub::check_with_rdevel()'
check-win:
Rscript -e 'devtools::check_win_devel()'
check-winhub:
Rscript -e 'rhub::check_on_windows()'
.PHONY: doxygen
doxygen:
doxygen doxyfile
modlib: export _MRGSOLVE_SKIP_MODLIB_BUILD_=no
modlib:
Rscript -e 'testthat::test_file("inst/maintenance/unit/test-modlib.R")'
# this is in use
drone:
make house
#R -s -e 'devtools::install_deps(upgrade = '"'"'always'"'"', dependencies=TRUE)'
R CMD build --md5 $(PKGDIR)
R CMD check --as-cran ${TARBALL}
export _MRGSOLVE_SKIP_MODLIB_BUILD_=false
Rscript -e '$(LOAD_CANDIDATE); $(TEST_UNIT)'