bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Feature Request: Improved cross-directory builds (intermediate files


From: Bollinger, John C
Subject: RE: Feature Request: Improved cross-directory builds (intermediate files)
Date: Mon, 14 Sep 2009 10:33:40 -0500

Ralf Wildenhues wrote:
> > (*) "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.

I find that Automake 1.11 does create the targets you describe, but that it 
does not create any targets for the *.Po files themselves, which are perforce 
missing if src/$(DEPDIR) initially does not exist.  Make fails if they are 
missing and it doesn't know how to create them.

It seems that normally, the generated configure script creates dummy *.Po files 
in the right places, thus masking the absence of Make rules for that purpose.  
In my case, however, I used Make variables in Makefile.am to abbreviate the 
(long) paths from my project root to my source files.  This general approach 
worked fine (which was a great relief) until I enabled subdir-objects.  Then, 
the generated configure script started placing the *.Po files in a directory 
named after the make variable (form of ./$(mod1_src)/.deps/foo1.Po (literal)), 
and the generated Makefile contained 'include' directives of similar form.  It 
was that combination that Make rejected.  I attach a simple demo project; to 
reproduce the error, follow these steps:
        Unpack the tarball
        Change to unpacked directory (test_subdir_objects)
        autoreconf --install
        ./configure
        make

I find that adding rules to the Makefile for creating dummy versions of the 
missing *.Po files allows the project to build cleanly (though that still 
leaves the useless, ugly, make-variable-named subdirectories that configure 
created).  Example Make rule:

$(mod1_src)/$(DEPDIR)/foo1.Po: $(mod1_src)/$(DEPDIR)/$(am__dirstamp)
        touch $@

That would also help in the case where one or more $(DEPDIR)s is accidentally 
or cluelessly deleted -- the developer would not have to re-run configure (not 
an obvious solution) to fix the project directory.


Best Regards,

John Bollinger


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


Email Disclaimer:  www.stjude.org/emaildisclaimer

Attachment: test_subdir_objects.tgz
Description: test_subdir_objects.tgz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]