On 4/23/08, Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
> * Russ Allbery wrote on Wed, Apr 23, 2008 at 10:51:11PM CEST:
> > Ralf Wildenhues <[EMAIL PROTECTED]> writes:
> >
> > > Yes, they don't get per-target preprocessor or compile flags.  That
> > > doesn't work, because then they would have to be renamed:  $(LIBOBJS)
> > > may be added to several outputs, each with different per-target flags.
> >
> > This is why I want LIBOBJS_CPPFLAGS, which would globally specify the
> > CPPFLAGS used for building those objects.  I don't need to build them
> > multiple times with different flags.  I only need to build them once, but
> > possibly with flags different than what are used by the rest of the
> > project.  I think this would avoid the problems you mention above.
>
> Yes.  This is a useful TODO item.
>
> I think you should be able to work around it by using
> AC_CONFIG_LIBOBJ_DIR and putting all LIBOJBS in a separate directory,
> with separate Makefile.am, ensuring that they are built early enough,
> and setting AM_CPPFLAGS and AM_CFLAGS there.  I suppose you know all
> this already, but don't want to spoil your nonrecursive build.  ;-)

To that point, what would be most useful would be setting things on a
per-directory basis.  Then you could do:

lib1_LIBRARIES=....
lib1_CFLAGS=...

lib2_LIBRARIES=...
lib2_CFLAGS=...

And if you wanted to, you could easily set:

lib1dir=DIR
lib2dir=$(lib1dir)


But then, I've asked for this before :) :)


Reply via email to