Martijn Ras schrieb:
Heya Folks,
Reading this and other mailing lists of configuration & building tools helped me automating the build process of a number of projects i
'm maintaining. However, i'm having difficulty solving the last step and hope you may help me out.
I used to duplicate my source into a number of copies, with a specific name. I'd then work my way through the configuration and make files, renaming the targets accordingly and setting the correct configuration options.
I want to perform the whole process in one go on the main source, to reduce the risk of having to keep the different copies synchronised.
I've updated my source structure in such a way that a directory is created under the 'src' directory for every configuration. Each of these directories contains an automake file that builds the correctly named targets for that configuration.
So far so good, however, this results in a bunch of files with different names but all with exactly the same configuration ...
I need each target to have it's own specific configuration. Is there a way to set up the configuration so that per directory a different configuration will be generated.
For instance, i'd run autogen.sh --enable-configuration1 on the myProject_configuration1 copy and autogen.sh --enable-configuration2 on the myProject_configuration2 copy.
I was thinking that perhaps the way to automate this is by having the configuration determine the necessary options by looking at the directories name, but i fail to see how to actually get it to do so ...
Mazzel,
Martijn.
put the real configure.ac into the src/ directory and make up a configure helper in the top-dir with something like
if $enabled ; then mkdir $builddir (cd $builddir && sh ../src/configure $specificoptions) fi plus: write a toplevel makefile that does recurse into the various builddirs just created. it's easy but mostly project specific (`cp Makefile.all Makefile`). background: discussed a bit more in the region of `variant builds` on the mailing list (libtool one I guess). The trick is the vpath emulation of automake that allows the source files to live in another directory than the build files will end up. extra task: try with sharing a common cache-file among the various sub-configures to speed up the processing. for your amusement: http://ac-archive.sf.net/guidod/ax_builddir_default.html it does atleast help to not see error messages saying some in-source-dir configuration was found. Not tested. -- HTH, have fun, guido http://ac-archive.sf.net
