Skip to content

Commit 0a43191

Browse files
committed
better check directive in makefile
1 parent 3646fb3 commit 0a43191

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
12
RSCRIPT = Rscript --no-init-file
23

34
move:
@@ -20,8 +21,10 @@ doc:
2021
eg:
2122
${RSCRIPT} -e "devtools::run_examples()"
2223

23-
check:
24-
${RSCRIPT} -e 'rcmdcheck::rcmdcheck(args = c("--as-cran"))'
24+
check: build
25+
_R_CHECK_CRAN_INCOMING_=FALSE R CMD CHECK --as-cran --no-manual `ls -1tr ${PACKAGE}*gz | tail -n1`
26+
@rm -f `ls -1tr ${PACKAGE}*gz | tail -n1`
27+
@rm -rf ${PACKAGE}.Rcheck
2528

2629
test:
2730
${RSCRIPT} -e 'devtools::test()'

0 commit comments

Comments
 (0)