<html>#2255: reduce number architecture files
<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>trivial</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>The current mechanism in Cactus requires that there are files darwinX.Y for every single OSX release (and also for hpux, freebsd, aix, openbsd, osf, solaris, unicos, unicosmp basically anything that is not GNU/Linux) which is cumbersome as we have to keep track of Appleā€™s releases and always end up adding a new boilerplate file</p>
<div class="codehilite language-shell"><pre><span></span><span class="ch">#! /bin/sh</span>
<span class="c1"># /*@@</span>
<span class="c1">#   @file    darwin18.0.0</span>
<span class="c1">#   @date    2019-03-17</span>
<span class="c1">#   @author  Roland Haas</span>
<span class="c1">#   @desc</span>
<span class="c1">#            Known architecture stuff for OS X (Darwin) release 18.0.0</span>
<span class="c1">#   @enddesc</span>
<span class="c1">#   @version $Header$</span>
<span class="c1"># @@*/</span>

. <span class="nv">$srcdir</span>/known-architectures/darwin
</pre></div>


<p>Pull request <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/pull-requests/59/cactus-allow-for-globs-in-architecture/diff" rel="nofollow">https://bitbucket.org/cactuscode/cactus/pull-requests/59/cactus-allow-for-globs-in-architecture/diff</a> avoids this by letting the <em>files</em> be named as shell globs and matches those globs against the architecture name.</p>
<p>Kind of ugly but does get the job done. An alternative may be to instead allow a magic comment:</p>
<div class="codehilite language-shell"><pre><span></span><span class="c1">#CCTK ARCHITECTURE=darwin[0-9]*</span>
</pre></div>


<p>parse the file and use it if its REGEX matches the architecture.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2255/reduce-number-architecture-files'>https://bitbucket.org/einsteintoolkit/tickets/issues/2255/reduce-number-architecture-files</a></p>
</html>