[Omake] Another recursive omake question
Aleksey Nogin
nogin at cs.caltech.edu
Thu Jun 8 08:19:46 PDT 2006
On 07.06.2006 19:59, Benjamin Pierce wrote:
> Of course, we can edit the parent directory's OMakefile when we start
> working on the broken directory and edit it back when we're finished
> for the day, if we haven't gotten things working yet. But is this the
> best we can do?
You can make the ".SUBDIRS: brokendir" line be conditional on something
(e.g. an environment variable or a configuration variable.
The simplest thing would be to do something like
if $(getenv BUILD_FOO, false)
.SUBDIRS: foo
This way, foo will only be built when the BUILD_FOO environment variable
is set (to something non-empty, non-false). You can set it in the window
where you are working on fixing foo and leave it unset elsewhere.
BTW, note that the connection between the real internal variables and
environment variables is not as intimate in OMake as it is in make -
"omake BUILD_FOO=true" will not work. If you do want it to work, use
if $(not $(defined BUILD_FOO))
BUILD_FOO = $(getenv BUILD_FOO, false)
if $(BUILD_FOO)
.SUBDIRS: foo
Finally, you can have a config file that defines BUILD_FOO (or something
that BUILD_FOO can be derived from). In our group, BTW, we are fond of
"self-regenerating" config files (.config in OMake, mk/config in
MetaPRL) that get filled with default values and get kept in the
"standardized" format (with all the comments in place, etc) by OMake.
--
Aleksey Nogin
Home Page: http://nogin.org/
E-Mail: nogin at cs.caltech.edu (office), aleksey at nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200
More information about the Omake
mailing list