A Makefile
is provided. Most of the rules are defined in the rules.mk
file.
The following key variables are defined in the Makefile
.
REPODIR
: the name of the directory in which a local copy of the Git repo used for publishing source and documentation is located.INCLUDES
: names of header files that will be copied toinst/includes
HEADERS
: names of header files that must be rebuilt whenever source code changes.
The key targets are:
-
roxy
: runsdevtools::document()
to build the help pages (inman/
), the packageNAMESPACE
, and the collation order inDESCRIPTION
. -
dist
: builds the package source tarball. -
install
: installs the package locally for testing. -
tests
: runsmake
in thetests/
directory, causing tests to be updated as needed. -
clean
: cleans the directory of files created during builds and tests. -
fresh
: resets the directory for a fresh rebuild. -
htmlhelp
: builds the package manual in HTML and PDF formats. This command also causesdoxygen
to be run, which produces HTML documentation of the C/C++ source code. These documentation files are installed into theREPODIR/manuals
directory. -
www
: installs the package and runsmake
in thewww
directory. This causes vignettes to be updated, among other things. -
NEWS
: builds the plain-text package NEWS file. -
instdocs
: runsmake
in theinst/docs
directory. -
check
: runsdevtools::check()
. -
qcheck
: likecheck
, but tests intests/
are not run. -
qqcheck
: likeqcheck
, but checks for code-documentation mismatch and examples are not run. -
xcheck
: runsdevtools::check(cran=TRUE)
, i.e., the additional checks for CRAN suitability are also run. -
ycheck
: runsxcheck
but tests and examples that are ordinarily not run (because expensive) are run. -
vcheck
: runscheck
and then tests for memory leaks usingvalgrind
. One must examine the output (printed to the console and also stored in a file, the name of which ends in-Ex.Rout
. -
revdeps
: causes checks of reverse-dependent packages to run. The outputs are stored under therevdep
directory. -
rchk
: runs Kalibera'srchk
utility. This usesdocker
to download and run a Docker container. The stdout for this is stored inrchk.out
. -
session
: installs the package locally and then runs an R session for interactive testing. This session is controlled by theRSESSION
environment variable. By default, this runs anemacs -f R
session. -
rsession
: likesession
, but a naked R session is started:RSESSION=R
. -
debug
: likersession
, but the R session is started under a debugger. By default, thegdb
debugger is used:RSESSION=R -d gdb
. -
publish
: causes source and binary tarballs to be installed in the REPODIR respository. -
covr
: runscovr::package_coverage()
to evaluate unit-test coverage. Results are stored incovr.rds
. -
vcovr
: likecovr
, but results are displayed in a browser.
Several Github Actions are defined in .github/workflows
:
r-cmd-check
: runs checks on various platforms.test-coverage
: runscovr::codecov
to upload unit-test coverage information to codecov.io.binary-build
: causes binary tarballs to be built for OS X and Windows platforms.
These must be updated manually from time to time as the Actions on which they depend change.