Skip to content

Commit

Permalink
Rework the way the makefile controls which modules should be excluded.
Browse files Browse the repository at this point in the history
Instead of commenting out some blocks of code, now the list of modules
to exclude is controlled by the DEVEL variable: setting it to 1 means
that we are on a development version (default); when preparing for a
package release, this should be set to 0.
  • Loading branch information
mcol committed Nov 15, 2024
1 parent c5383e3 commit f35b199
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
## PACKAGE MAKEFILE
RSCRIPT = "$(R_HOME)/bin/Rscript"

## set to 1 when on a development version, or to 0 when preparing a release
DEVEL := 1

## modules to exclude: it should not be necessary to touch these, they are
## controlled by the DEVEL variable set before
EXCLUDE_MODULES := \
'module_check_ReverseDependencies', \
'module_write_codemetar' \
$(NULL)
ifeq ($(DEVEL), 1)
EXCLUDE_MODULES += ,\
'module_add_RLumTeam', \
'module_add_HowToCite', \
'module_write_BibTeX', \
'module_write_FunctionList', \
'module_write_PDF_manual' \
$(NULL)
endif

all:
${RSCRIPT} -e "RLumBuild::build_package(\
exclude = c(\
'module_check_ReverseDependencies',\
'module_write_codemetar',\
'module_add_RLumTeam',\
'module_add_HowToCite',\
'module_write_BibTeX',\
'module_write_FunctionList',\
'module_write_PDF_manual'),\
$(EXCLUDE_MODULES) ),\
as_cran = TRUE,\
write_Rbuildignore = TRUE)";

#all:
# ${RSCRIPT} -e "RLumBuild::build_package(\
# exclude = c(\
# 'module_check_ReverseDependencies',\
# 'module_write_codemetar'),\
# as_cran = TRUE,\
# write_Rbuildignore = TRUE)";

0 comments on commit f35b199

Please sign in to comment.