В Fri, 8 Nov 2024 11:21:16 -0800
Josiah Parry <josiah.pa...@gmail.com> пишет:

> 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

Unless a better approach surfaces (detect the environment variable in
the configure script and generate src/Makevars from src/Makevars.in?),
you may be interested in the following movfuscator-like
POSIX-compatible trick: https://nullprogram.com/blog/2016/04/30/

EXTRA_FLAGS_true =
EXTRA_FLAGS_ = -j 2 --offline
EXTRA_FLAGS = $(EXTRA_FLAGS_$(NOT_CRAN))

(This one is untested, sorry.)

-- 
Best regards,
Ivan

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to