<html>#2312: Expand ENV variables in RHS of option list options
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Updating the comet simfactory files once more after a module update, I find myself reminded that while we use the <code>module</code> command in <code>envsetup</code> we are not really reaping much of a benefit from it b/c we cannot use eg <code>HDF5HOME</code> in <code>comet.cfg</code> since those files, while they look like they may, are not actually parsed by make, and thus things like <code>HDF5_DIR=$(HDF5HOME)</code> do not work.</p>
<p>Thus one has to repeat the full path to eg HDF5 in <code>HDF5_DIR</code> 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).</p>
<p>Inspired by #332 a possible way to use them would be to not set <code>HDF5_DIR</code> in <code>comet.cfg</code> at all and instead add lines like:</p>
<div class="codehilite language-shell"><pre><span></span><span class="nv">HDF5_DIR</span><span class="o">=</span><span class="nv">$HDF5HOME</span>
</pre></div>


<p>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 <code>comet.cfg</code> that <code>HDF5_DIR</code> is actually supplied by <code>envsetup</code>).</p>
<p>Thus branch <code>rhaas/expenv</code> adds explicit code to expand ENV variables of the form <code>$(FOO)</code> when the options are read in from <code>config-info</code>.</p>
<p>The branch can be found here: <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/src/3894ff8129fafd018c2810173b0a9763e95b8612/?at=rhaas%2Fenvexp" rel="nofollow">https://bitbucket.org/cactuscode/cactus/src/3894ff8129fafd018c2810173b0a9763e95b8612/?at=rhaas%2Fenvexp</a> with the actually interesting commit being: <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/commits/a5c6260e94ec23472db
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2312/expand-env-variables-in-rhs-of-option-list'>https://bitbucket.org/einsteintoolkit/tickets/issues/2312/expand-env-variables-in-rhs-of-option-list</a></p>
</html>