[Omake] Restarting omake
David Kågedal
david at virtutech.se
Mon Sep 18 07:17:33 PDT 2006
I have a lot of small modules, but I usually only need to build a few
of them. I'm also using a separate build tree, which means that I need
to create a mirror directory structure of all the module directories
in the build tree, since omake needs to be able to read all the module
OMakefiles.
I was thinking about if there was a way to avoid having to create all
the directories, and instead use something like this:
=== OMakefile:
vmount(src, build)
.SUBDIR: build
.SUBDIR: modules
MODULES[] = a b c d e f g h i j ...
foreach(m, $(MODULES))
# Check if the module build dir exists
if $(file-exists ./$m)
.SUBDIR: $m
# The $m/OMakefile in the module contains a rule to
# build $m/module.so
else
.PHONY: $m/module.so
$m/module.so :
mkdir $m
RestartOMake()
The point is that if the build directory didn't exist, an alternat
build rule is used that creates the build directory and restarts
omake, so that it can rescan the omakefiles and find the new module.
Does this make any sense? This could improve the scalability of
omake, and I can imagine other uses in even more dynamic scenarios.
Is this maybe even possible to do today?
--
David Kågedal, Virtutech
More information about the Omake
mailing list