[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: aggregate project
From: |
Nicola Pero |
Subject: |
Re: aggregate project |
Date: |
Thu, 26 Aug 2004 16:37:40 +0100 (BST) |
> > I've created a GNUstep aggregate project, it consists of 10+ libraries,
> > all of the libraries need the same preprocessor-flags, so I thought I
> > could write one preamble, include it in the super-project and all is
> > done. But it didn't work. Is there any way to do this?
>
> Use the "export" keyword for variables you want to use through the whole
> project. It works like it does in the Bourne shell. Sub-makes will pick up
> the information from the main make.
Thanks - that is a good suggestion.
Now the reason I suggested including the preamble in the submakes instead
is that if you export the variables in the top-level makefile, you can
only type 'make' in the top-level directory; in the subdirectories that
won't work.
Say that you're working on one of the libraries, you can't actually go in
the library directory and type 'make' in there, because the flags which
the top-level makefiles should set and export are not set and not exported
because the top-level makefiles are not used, only the ones in the library
directory.
My personal preference is like to able to go into any of the
subdirectories and type 'make' there and only work there, that's why I
would have all the GNUmakefiles in all subdirectories include the
../GNUmakefile.preamble so that they are self-contained and you can type
'make' at any level of the directory tree and that works and builds
everything from where you are below.
If you don't care about that and you are happy with always have to type
'make' top-level, then you can certinaly simply set and export the
variables top-level as in your suggestion - excellent idea.
Thanks