This repository has been archived by the owner on May 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
65 lines (52 loc) · 1.76 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
R := R --no-save --no-restore
RSCRIPT := Rscript
DELETE := rm -fR
PKGNAME := $(shell Rscript ./makeR/get-pkg-name)
VERSION := $(shell Rscript ./makeR/get-pkg-version)
TARGZ := $(PKGNAME)_$(VERSION).tar.gz
.SILENT:
.PHONY: clean roxygenize package windows install dependencies test check
usage:
echo "Available targets:"
echo ""
echo " clean - Clean everything up"
echo " roxygenize - roxygenize in-place"
echo " package - build source package"
echo " install - install the package"
echo " dependencies - install package dependencies, including suggests"
echo " test - run unit tests"
echo " check - run R CMD check on the package"
echo " check-rev-dep - run a reverse dependency check against packages on CRAN"
echo " check-rd-files - run Rd2pdf on each doc file to track hard-to-spot doc/latex errors"
echo " winbuilder - ask for email and build on winbuilder"
clean:
echo "Cleaning up ..."
${DELETE} src/*.o src/*.so *.tar.gz
${DELETE} *.Rcheck
${DELETE} .RData .Rhistory
roxygenize: clean
echo "Roxygenizing package ..."
${RSCRIPT} ./makeR/roxygenize
package: roxygenize
echo "Building package file $(TARGZ)"
${R} CMD build .
install: package
echo "Installing package $(TARGZ)"
${R} CMD INSTALL --install-tests $(TARGZ)
test: install
echo "Testing package $(TARGZ)"
${RSCRIPT} ./test_all.R
check: package
echo "Running R CMD check ..."
${R} CMD check $(TARGZ)
dependencies:
${RSCRIPT} ./makeR/dependencies
check-rev-dep: install
echo "Running reverse dependency checks for CRAN ..."
${RSCRIPT} ./makeR/check-rev-dep
check-rd-files: install
echo "Checking RDs one by one ..."
${RSCRIPT} ./makeR/check-rd-files
winbuilder: roxygenize
echo "Building via winbuilder"
${RSCRIPT} ./makeR/winbuilder