Hi,

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?

(*) "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.  In the end I added the 'no-dependencies' 
option as well; this suppressed the include lines, but of course also disabled 
dependency tracking.

Cheers,

John Bollinger

_____________________________________________
From: Bollinger, John C
Sent: Friday, September 11, 2009 11:49 AM
To: '[email protected]'
Subject: Feature Request: Improved cross-directory builds (intermediate files)


Hi,

Section 7.3 of the Automake manual indicates that Automake provides (or at 
least intends to provide) sufficient cross-directory support to enable a single 
Makefile.am to support a complex, multi-directory package.  In testing with 
versions 1.10 and 1.11 of Automake, I find that it does seem to understand 
sources in subdirectories, that it successfully builds targets into 
subdirectories, and that it generally does the right thing when installing 
files from subdirectories.  Furthermore, I find that its support for the 
"include" makes it easier to manage such Makefile.am files.  Thanks!

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.

Is there any reason why Automake cannot or should not set up its make rules to 
build intermediate files into the same directory as their sources?  That would 
cleanly resolve the name clash.


Regards,

John Bollinger

--
John C. Bollinger, Ph.D.
Computing and X-Ray Scientist
Department of Structural Biology
St. Jude Children's Research Hospital
[email protected]
(901) 595-3166 [office]
www.stjude.org




  ________________________________
Email Disclaimer: www.stjude.org/emaildisclaimer

Reply via email to