-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (35 loc) · 886 Bytes
/
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
# prepare the package for release
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)
all: clean devtools_check
doc.pdf:
R CMD Rd2pdf -o doc.pdf .
build:
cd ..;\
R CMD build --no-manual $(PKGSRC)
build-cran: clean
cd ..;\
R CMD build $(PKGSRC)
install: build
cd ..;\
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
check: build-cran
cd ..;\
R CMD check $(PKGNAME)_$(PKGVERS).tar.gz
submit: check
cd ..;\
mv $(PKGNAME)_$(PKGVERS).tar.gz $(PKGSRC)
roxygenise:
R -e "roxygen2::roxygenise()"
devtools_test:
R -e "devtools::test()"
devtools_check:
R -e "devtools::check()"
vignette:
cd vignettes;\
R -e "Sweave('opticskxi.Rnw');tools::texi2pdf('opticskxi.tex')"
clean:
$(RM) doc.pdf
cd vignettes;\
$(RM) *.pdf *.aux *.bbl *.blg *.out *.tex *.log