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
#! /bin/sh # /*@@ # @file darwin18.0.0 # @date 2019-03-17 # @author Roland Haas # @desc # Known architecture stuff for OS X (Darwin) release 18.0.0 # @enddesc # @version $Header$ # @@*/ . $srcdir/known-architectures/darwin
Pull request https://bitbucket.org/cactuscode/cactus/pull-requests/59/cactus-allow-for-globs-in-architecture/diff avoids this by letting the files be named as shell globs and matches those globs against the architecture name.
Kind of ugly but does get the job done. An alternative may be to instead allow a magic comment:
parse the file and use it if its REGEX matches the architecture.