[R-pkg-devel] Alternative to ifeq for Makevars
Josiah Parry
jo@|@h@p@rry @end|ng |rom gm@||@com
Fri Nov 8 20:21:16 CET 2024
I am working on refactoring some Makevars files and I am quite stuck. I
want to conditionally set the value of CRAN_FLAGS like so in my Makevars
files
ifeq ($(NOT_CRAN), false)
CRAN_FLAGS = -j 2 --offline
else
CRAN_FLAGS =
endif
Using ifeq appears to be the only way to get the value of CRAN_FLAGS to
persist within the $(STATILIB) portion of the Makevars file.
However, this results in a Warning
checking for GNU extensions in Makefiles ... WARNING
Found the following file(s) containing GNU extensions:
src/Makevars
Portable Makefiles do not use GNU extensions such as +=, :=, $(shell),
$(wildcard), ifeq ... endif, .NOTPARALLEL See section ‘Writing portable
packages’ in the ‘Writing R Extensions’ manual.
How do other people address this?
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list