[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature Request: Improved cross-directory builds (intermediate files
From: |
Ralf Wildenhues |
Subject: |
Re: Feature Request: Improved cross-directory builds (intermediate files) |
Date: |
Sat, 12 Sep 2009 09:16:24 +0200 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
* Bollinger, John C wrote on Fri, Sep 11, 2009 at 09:09:18PM CEST:
> > Automake's cross-directory support seems to have at least one serious
> > problem, however: Makefiles generated by the autotools always build
> > intermediate objects in the top source directory. For example, if I
> > am building ./subpackage1/foo from ./subpackage1/foo.c and
> > ./subpackage1/init.c, then the intermediate foo.o and init.o files are
> > created in the top source directory (./foo.o and ./init.o), instead of
> > in ./subpackage1/. Aside from the mess, this presents a grave risk of
> > incorrect builds, for if I also have subpackage2/init.c (or
> > subpackage2/init.f, etc.) then that wants to use the same name and
> > location for its intermediate .o file as does subpackage1/init.c.
Besides subdir-objects, automake should also warn you about this
situation:
| Makefile.am: object `foo.$(OBJEXT)' created by `s2/foo.c' and `s1/foo.c'
and per-target flags should cause a renaming of the object.
> So color me embarrassed: the 'subdir-objects' Automake option appears
> to do what I want, more or less(*). Inasmuch as it is particularly
> relevant there, perhaps a mention of it could be added to section 7.3
> of the manual?
Yes, that sounds like a good idea.
> (*) "More or less" because with Automake 1.11 it yielded Makefiles containing
> many lines of the form
> include src/$(DEPDIR)/foo.Po
> These files did not (yet) exist, so make completely rejected the file.
> Automake stopped emitting these when I removed the 'subdir-objects'
> option, and started again when I put it back.
That's weird, because there should be (undocumented)
src/$(DEPDIR)/$(am__dirstamp) targets in the Makefile which the .deps
file depend upon and which cause the directories to be created in the
build tree. Can you show a (preferably small) reproducible test case
please? Thanks.
> In the end I added the
> 'no-dependencies' option as well; this suppressed the include lines,
> but of course also disabled dependency tracking.
This shouldn't be necessary.
Cheers,
Ralf
- Feature Request: Improved cross-directory builds (intermediate files), Bollinger, John C, 2009/09/12
- RE: Feature Request: Improved cross-directory builds (intermediate files), Bollinger, John C, 2009/09/12
- Re: Feature Request: Improved cross-directory builds (intermediate files),
Ralf Wildenhues <=
- RE: Feature Request: Improved cross-directory builds (intermediate files), Bollinger, John C, 2009/09/15
- Re: Feature Request: Improved cross-directory builds (intermediate files), Ralf Wildenhues, 2009/09/15
- RE: Feature Request: Improved cross-directory builds (intermediate files), Bollinger, John C, 2009/09/15
- Re: Feature Request: Improved cross-directory builds (intermediate files), Ralf Wildenhues, 2009/09/21
- Re: Feature Request: Improved cross-directory builds (intermediate files), Jack Kelly, 2009/09/15
Re: Feature Request: Improved cross-directory builds (intermediate files), Jack Kelly, 2009/09/12