-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
72 lines (57 loc) · 1.72 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
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: install
build:
cd ..;\
R CMD build $(PKGSRC)
install:
cd ..;\
R CMD INSTALL $(PKGSRC)
check:
Rscript -e "devtools::check(document = FALSE, args = '--as-cran')"
news:
sed -e 's/^-/ -/' -e 's/^## *//' -e 's/^# //' <NEWS.md | fmt -80 >NEWS
test:
Rscript -e "library('testthat',quietly=TRUE);library('mirt',quietly=TRUE);options(warn=2);test_dir('tests/testthat')"
paralleltest:
Rscript -e "library('testthat',quietly=TRUE);library('mirt',quietly=TRUE);mirtCluster();options(warn=2);test_dir('tests/testthat')"
extratest:
Rscript -e "library('testthat',quietly=TRUE);library('mirt',quietly=TRUE);options(warn=2);test_dir('tests/testthat/extratests')"
# knitdocs:
# rm -rf html/
# sed -i 's/# opts$$verbose/opts$$verbose/g' R/03-estimation.R
# sed -i s/dontrun/donttest/g man/*.Rd
# make install
# Rscript -e "library('mirt');mirtCluster(2);library('knitr',quietly=TRUE);knit_rd('$(PKGNAME)')"
# mkdir html
# mv *.html html/
# rm R.css
# rm -rf figure/
# git checkout -- .
# make install
# make kniterrors
pushdocs:
mv docs/ ../mirtdocs
git checkout gh-pages
cp -r ../mirtdocs/* docs/
git commit -am "update pkgdown"
git push
git checkout main
kniterrors:
grep -Hrn '## Error'
grep -Hrn '## Warning'
pkgdown:
sed -i 's/# opts$$verbose/opts$$verbose/g' R/03-estimation.R
sed -i s/dontrun/donttest/g man/*.Rd
make install
Rscript -e "library('pkgdown',quietly=TRUE);build_site()"
git checkout -- .
make install
cd docs/reference
make kniterrors
clean:
$(RM) src/*.o
$(RM) src/*.so
$(RM) ../$(PKGNAME)_$(PKGVERS).tar.gz
$(RM) -r ../$(PKGNAME).Rcheck/