[Omake] Propagating values

Luis O'Shea loshea at gmail.com
Tue Feb 27 11:01:05 PST 2007


Suppose I have a number of subprojects each of which is in charge of 
building a number of files.  I would like to define a target (probably 
in the top level OMakefile) that builds everything.  In order to do this 
the top level OMakefile needs to know the list of files that need to be 
built.  The OMakefile in each subdir can append to a variable the files 
it wants built.  My question is, how to propagate them up the hierarchy?

One way to do this is to put something like this in the top level OMakefile:

ALL_FILES = $(EMPTY)

.SUBDIRS: subproject_1 subproject_2
   include OMakefile
   export ALL_FILES

all: $(ALL_FILES)

Are there other ways?  Even better, am I missing something about the 
"right way" to do this kind of thing in omake?

Thanks.


More information about the Omake mailing list