forked from compTAG/r-tda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (46 loc) · 1.58 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
# Build the TDA package. This will produce a file called `TDA.x.y.z.tar.gz`
# You can give the .tar.gz file to all your fiends so they can use the freshest
# version of the TDA package... "like a boss".
build: attrib
R CMD build .
# The Rcpp library auto generates some files that are needed for the building
# and linking the library. It is rare that you would want to run this command
# often, but, it is useful as a dependency for other commands
attrib:
R -e 'Rcpp::compileAttributes()'
# Build and install the TDA package. For more on how this will affect your
# environment see the INSTALL help docs by running, from the command line:
#
# > R CMD INSTALL --help
install:
R CMD INSTALL --build .
# Build the documentation for the package. Once the build is complete, your
# system will try to open the file. The PDF view is the is specified with the
# environment variable `R_PDFVIEWER`
doc:
R CMD Rd2pdf -o TDA.pdf .
# Run the test suite
test:
R -e 'devtools::test()'
# Often one wants to check that the package is valid for cran submission
# if you run
#
# > make build
#
# a .tar.gz file will be built. Assume that the file is called
# `TDA_x.y.z.tar.gz` We can check the file by running
#
# > make TGZ=TDA_x.y.z.tar.gz check
check:
R CMD check --as-cran $(TGZ)
.PHONY: veryclean clean
# clean up the "important" files generated by other targets
veryclean: clean
rm -f src/TDA.so
rm -f TDA_*.tar.gz
rm -f TDA.pdf
rm -rf TDA.Rcheck
# clean up the "unimportant" files generated by other targets
clean:
find . -name '*.o' -exec rm {} \;
rm -f src/RcppExports.cpp R/RcppExports.R