[Omake] autoconf-style configure-time options
Aleksey Nogin
anogin at hrl.com
Thu May 31 09:32:32 PDT 2007
On 30.05.2007 20:14, Erick Tryzelaar wrote:
> As
> far as I can tell, .STATIC blocks are run before omake processes the
> command line.
That's not quite true. The first time you run omake for that file (or if
you run "omake --configure"), the static sections would run the exact
same way as a "section ... export" section would. The only difference is
that the exported values would then be saved (to the corresponding .omc
file) and the _next_ time you run omake, the static section will be
skipped and the values will simply be loaded from the .omc.
> I believe this means that you can't, say, "omake
> ENABLE_VSNPRINTF=0" on the command line to skip testing if vsnprintf
> exists. Is there any way to do this?
You can have overrides (that consult either command-line variables or
the environment variables) explicitly coded in your files. You might
include the override in the static section (so that the tests are not
even performed when the overrides are in effect) - note that the way
things currently are implemented this will capture whatever the
overrides were the first time you ran omake. You might prefer to let the
static section do its thing and then allow overriding the results (we do
this in part in omake self-builds - the static sections figure out
whether fam/readline/etc is available, and the .config file decided
whether to actually use them). Or you can do both...
> I'm trying to figure out how to do
> cross compiling, and I think we'd need something like this in order to
> do it.
Note that most of the tests in our configure files should be
cross-compilation-friendly. As long as you only try to compile/link, but
do not try to actually run, the tests should do the right thing w.r.t.
figuring out the _target_ configuration (you may have to run with
--configure every time you switch the target platform :-(; this will go
away in what's currently called the 0.9.8.x branch, but may end up
getting renamed).
> Also, is there any way to use a virtual mount so that you can have one
> directory for one configuration, and another for a different config?
> It'd make sense to not have to completely recompile if you wanted to
> test between a coupld different architectures.
I know little about vmount; hopefully somebody else on the list can help.
Aleksey
--
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list