Unfortunately, not quite.  This causes depcomp to be incorrectly pushed
onto DIST_COMMON in the sudir/Makefile.in when maybe_push_required_file
gets called by require_file_internal.  Basically,
maybe_push_required_file expects $relative_dir to be set right and pushes
its file onto DIST_COMMON if $relative_dir/$file exists.  Unfortunately
$relative_dir gets set back to normal after require_config_file returns
and then DIST_COMMON gets written out into the wrong Makefile.in.  Or,
rather, the correct Makefile.in but containing the wrong 'depcomp'
reference.  I'm too tired and hungry to try and decipher any more right
now.  Anyone have any better ideas?

I've included my patch containing what I have so far since it fixes some
tests which should be fixed in case anyone wants to take a look before
I wake up from my nap and get something to eat.  Or in case I find
something better to do since I do have that workaround and other things
I could be working on.  pr87.test and subdir4.test are still failing
because of this.  Sorry about the rewritten toplevel Makefile.in, but
I figured I might as well include it since it gets rewritten on the first
make after a fresh checkout right now anyhow.  Oh, and I removed a hack
from automake.in that became unnecessary after $relative_dir was
redefined for require_config_file.  Or what should still be an
unnecessary hack after this problem gets fixed.

Derek

--
Derek Price                      CVS Solutions Architect ( http://CVSHome.org )
mailto:[EMAIL PROTECTED]     OpenAvenue ( http://OpenAvenue.com )
--
82. Hold a hard drive to your ear -- listen to the C.

Raja R Harinath wrote:

> "Derek R. Price" <[EMAIL PROTECTED]> writes:
> > The problem appears to start on line 3054 of automake.in (in the
> > handle_dependencies function):
> >
> >     # Set location of depcomp.
> >     local ($prefix) = ($config_aux_dir_specified ? $config_aux_dir
> >             : '$(top_srcdir)');
> >
> >     &define_variable ('depcomp', "\$(SHELL) $prefix/depcomp");
> >
> >     &require_config_file ($FOREIGN, 'depcomp');
>
> I remember that playing around with $relative_dir worked at some time.
> I don't have CVS automake checked out right now, but can you try
> replacing the last line above
>
>    &require_config_file ($FOREIGN, 'depcomp');
>
> with the following hack
>
>    local ($save_dir) = ($relative_dir);
>    $relative_dir = '.';
>    &require_config_file ($FOREIGN, 'depcomp');
>    $relative_dir = $save_dir;
>
> - Hari
> --
> Raja R Harinath ------------------------------ [EMAIL PROTECTED]
> "When all else fails, read the instructions."      -- Cahn's Axiom
> "Our policy is, when in doubt, do the right thing."   -- Roy L Ash
? automake/automake-1.4a.tar.gz
Index: automake/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.240
diff -u -r1.240 Makefile.in
--- Makefile.in 2000/11/18 23:58:24     1.240
+++ Makefile.in 2000/12/04 23:25:35
@@ -1,6 +1,7 @@
 # Makefile.in generated automatically by automake 1.4a from Makefile.am
 
-# Copyright (C) 1994, 1995-9, 2000 Free Software Foundation, Inc.
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -314,6 +315,7 @@
            rm -f $$i-[0-9]*; \
          fi; \
        done
+
 
 install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
        @$(NORMAL_INSTALL)
Index: automake/automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.803
diff -u -r1.803 automake.in
--- automake.in 2000/11/26 01:39:48     1.803
+++ automake.in 2000/12/04 23:25:39
@@ -3042,22 +3042,17 @@
            local ($config_aux_dir_specified) = ($config_aux_dir ne '.'
                                                 && $config_aux_dir ne '');
 
-           # Set $require_file_found{'depcomp'} if the depcomp file exists,
-           # before calling require_config_file on `depcomp'.  This makes
-           # require_file_internal skip its buggy existence test that would
-           # make automake fail (with `required file `lib/depcomp' not found')
-           # when AC_CONFIG_AUX_DIR is not set.  See tests/subdir4.test.
-           local ($depcomp_dir) = ($config_aux_dir_specified ? $config_aux_dir
-                                   : '.');
-           $require_file_found{'depcomp'} = 1 if -f "$depcomp_dir/depcomp";
-
            # Set location of depcomp.
            local ($prefix) = ($config_aux_dir_specified ? $config_aux_dir
                               : '$(top_srcdir)');
 
            &define_variable ('depcomp', "\$(SHELL) $prefix/depcomp");
 
+           # set $relative_dir so depcomp gets installed in $top_srcdir
+           local ($save_dir) = ($relative_dir);
+           $relative_dir = '.';
            &require_config_file ($FOREIGN, 'depcomp');
+           $relative_dir = $save_dir;
 
            local ($iter);
            local (@deplist) = sort keys %dep_files;
Index: automake/tests/confsub.test
===================================================================
RCS file: /cvs/automake/automake/tests/confsub.test,v
retrieving revision 1.9
diff -u -r1.9 confsub.test
--- confsub.test        2000/03/19 23:38:10     1.9
+++ confsub.test        2000/12/04 23:25:39
@@ -27,8 +27,6 @@
 
 : > subdir/config.h.in
 
-mv depcomp subdir
-
 $AUTOMAKE || exit 1
 
 # Make sure subdir Makefile.in doesn't itself look in the subdir.
Index: automake/tests/libobj2.test
===================================================================
RCS file: /cvs/automake/automake/tests/libobj2.test,v
retrieving revision 1.8
diff -u -r1.8 libobj2.test
--- libobj2.test        2000/03/19 23:38:10     1.8
+++ libobj2.test        2000/12/04 23:25:39
@@ -28,8 +28,6 @@
 
 : > subdir/fsusage.c
 
-mv depcomp subdir
-
 $AUTOMAKE || exit 1
 
 grep 'fsusage\.c' subdir/Makefile.in

Reply via email to