Hi,
AFAIS, at the time being, depcomp / dependency tracking support in
automake/CVS seems to be (severly) broken:
Given a source tree layout similar to this:
configure.in
Makefile.am
src1/Makefile.am
src1/src1.c
src2/Makefile.am
src2/src2.c
Note: There is no *.c file in the toplevel directory.
automake -a will generate
src1/depcomp
and add
DEPCOMP=$(top_srcdir)/depcomp
to
src1/Makefile.in
src2/Makefile.in
=> None of these Makefiles will find ever find depcomp.
AFAIU, the causes seem to be
1. automake checks whether it needs to install depcomp by top-down
examination of Makefile.ams in a source-tree. As the toplevel
Makefile.am is the first file being processed, automake has no chance to
know if a subdirectory's Makefile.am requires depcomp.
2. depcomp will get installed to the first directory where automake
finds depcomp will be used. This isn't necessarily the toplevel
directory, but can be any arbitrary subdirectory.
The patch below is an attempt to work around this issue by brute-force:
* It reverses the order Makefile.ams get processed => the toplevel
Makefile.am is processed last, therefore complete knowledge about the
subdirectories's requirements (here: the need to add depcomp) is
available.
* It replaces depcomp's current handling (require_file etc) by adding a
global $seen_depcomp variable.
I do not consider this to be a proper fix, but it at least seems to work
for me ;)
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED] FAX: +49/731/501-999
http://www.faw.uni-ulm.de
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.781
diff -u -r1.781 automake.in
--- automake.in 2000/03/20 00:12:59 1.781
+++ automake.in 2000/03/29 17:26:13
@@ -389,7 +389,7 @@
if ! @input_files;
# Now do all the work on each file.
-foreach $am_file (@input_files)
+foreach $am_file (reverse @input_files)
{
if (! -f ($am_file . '.am'))
{
@@ -585,6 +585,9 @@
# config.sub.
&require_config_file ($FOREIGN, 'config.guess', 'config.sub')
if $seen_canonical;
+
+ &require_config_file ($FOREIGN, 'depcomp')
+ if $seen_depcomp;
}
# We still need Makefile.in here, because sometimes the `dist'
@@ -3020,7 +3023,9 @@
# be empty.
if (&saw_sources_p (0) && keys %dep_files)
{
- &require_config_file ($FOREIGN, 'depcomp');
+# This doesn't work
+# &require_config_file ($FOREIGN, 'depcomp');
+ $seen_depcomp = 1 ;
# Set location of depcomp.
if ($config_aux_dir ne '.' && $config_aux_dir ne '')