-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (33 loc) · 1.11 KB
/
Makefile
File metadata and controls
49 lines (33 loc) · 1.11 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
# Copyright (c) 2021-2025, Marek Gagolewski <https://www.gagolewski.com>
.PHONY: r check build clean purge sphinx test
PKGNAME="ExampleRcppStringi"
all: r
r:
R CMD INSTALL . --html
reload: r
# https://github.com/gagolews/home_bin
if [ `whoami` = "gagolews" ]; then \
jupyter-qtconsole-sender --silent "reload('${PKGNAME}')"; \
fi
testthat:
Rscript -e 'testthat::test_package("ExampleRcppStringi")'
test: r testthat
stop-on-utf8:
# Stop if some files are not in ASCII:
[ -z "`file -i DESCRIPTION configure configure.win \
NAMESPACE cleanup R/* src/* man/* inst/* tools/* | \
grep 'text/' | grep -v 'us-ascii' | tee /dev/stderr`" ]
build:
cd .. && R CMD build ${PKGNAME}
check: stop-on-utf8 build
cd .. && R CMD check `ls -t ${PKGNAME}*.tar.gz | head -1` --no-manual
check-cran: stop-on-utf8 build
cd .. && R_DEFAULT_INTERNET_TIMEOUT=240 \
_R_CHECK_CRAN_INCOMING_REMOTE_=FALSE \
R CMD check `ls -t ${PKGNAME}*.tar.gz | head -1` --as-cran
################################################################################
clean:
rm -rf revdep/
purge: clean
# rm -f man/*.Rd
# rm -rf docs/