[Omake] autoconf-style configure-time options
Erick Tryzelaar
erickt at dslextreme.com
Thu May 31 20:16:35 PDT 2007
Aleksey Nogin wrote:
> 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.
But if I have an OMakeroot like this:
open Configure/Fam
DefineCommandVars()
...
the Fam's static section will run before DefineCommandVars, right?
>> 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...
How can I access the command line variables without calling
DefineCommandVars? I couldn't find any other primitive that can query
the passed in arguments.
>> 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).
But we have to run some programs :( Among other things, we need to be
able to query C/C++ type size info, or have it manually specified.
Oh and one last thing. There isn't a way to add info to "omake --help"
is there? If we provide a bunch of configure-time options, it'd be nice
to be able to easily document what options are specified.
Thanks for all the help!
More information about the Omake
mailing list