Preserve environment variables in the makefile
Bug #973595 reported by
Luiz Felippe Santiago Rodrigues
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Galacticus |
Fix Released
|
Wishlist
|
Andrew Benson |
Bug Description
I think it would be useful a small change in the Makefile, so that it preserves some previously set environment variables (e.g. CFLAGS, F03FLAGS).
This minor change would allow the use of galacticus in a different build environments without touching its Makefile.
Related branches
To post a comment you must log in.
I think this is an excellent idea. I wonder if this should be taken a step further though. For example, the Makefile currently overrides things like F03COMPILER. Changing:
F03COMPILER = gfortran
to
F03COMPILER ?= gfortran
might be good - this will only set F03COMPILER to gfortran if it isn't already set to something else in the environment.
Also, I've been thinking for a while that the "GALACTICUS_FLAGS" option is too blunt - it gets applied to F03FLAGS, CFLAGS AND CPPFLAGS, which can be problematic (or, at least, can cause warnings to be issued) if you put a Fortran specific comppiler option in GALACTICUS_FLAGS for example. So, perhaps it would be useful to have "GALACTICUS_ F03FLAGS" , "GALACTICUS_CFLAGS" and "GALACTICUS_ CPPFLAGS"