#2312: Expand ENV variables in RHS of option list options
| Reporter: | Roland Haas |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | enhancement |
| Priority: | minor |
| Component: | Cactus |
Updating the comet simfactory files once more after a module update, I find myself reminded that while we use the module command in envsetup we are not really reaping much of a benefit from it b/c we cannot use eg HDF5HOME in comet.cfg since those files, while they look like they may, are not actually parsed by make, and thus things like HDF5_DIR=$(HDF5HOME) do not work.
Thus one has to repeat the full path to eg HDF5 in HDF5_DIR etc. each time the modules are updated or risk that ini file and cfg get out of sync (irrespective of how happy / unhappy one is with having build information in the ini files to begin with).
Inspired by #332 a possible way to use them would be to not set HDF5_DIR in comet.cfg at all and instead add lines like:
HDF5_DIR=$HDF5HOME
While this works it requires sufficiently much knowledge of almost forgotten Cactus lore (namely that Cactus is supposed to used ENV variables as a sources of configure options) that I am feeling somewhat uncomfortable with it (at the very least one would have to add a comment to comet.cfg that HDF5_DIR is actually supplied by envsetup).
Thus branch rhaas/expenv adds explicit code to expand ENV variables of the form $(FOO) when the options are read in from config-info.
The branch can be found here: https://bitbucket.org/cactuscode/cactus/src/3894ff8129fafd018c2810173b0a9763e95b8612/?at=rhaas%2Fenvexp with the actually interesting commit being: