Hi,

One of the changes recently was to use the 

  ./config.status foo/Makefile

syntax for regenerating makefiles, instead of 

  CONFIG_FILES=foo/Makefile CONFIG_HEADERS= ./config.status

However, implicit in the old command was the execution of the various
"default" CONFIG_COMMANDS, one of them being the 'depfiles' command
to recreate .dep/*.P files.  This is necessary to handle addition of
files to *_SOURCES without manual intervention.

The closest new invocation is

  ./config.status foo/Makefile depfiles

This is of course a hack.  This will change in the future once the
'depfiles' CONFIG_COMMAND no longer depends on $CONFIG_FILES to pick
out the Makefile it's supposed to look into.  Akim once suggested
adding a facility to hook commands to files listed in AC_CONFIG_FILES.

Anyway, till that date, it may make sense to handle this somewhat
hackily.  One issue with generating the above command is that it is
safe to invoke the 'depfiles' CONFIG_COMMAND only in some cases, and
at the time 'automake' emits the Makefile regeneration code, it
doesn't know if it's safe yet.  So, here goes:

  From  Raja R Harinath  <[EMAIL PROTECTED]>

        * automake.in (handle_languages): Emit an automake
        internal variable 'am__depfiles_maybe'.
        * lib/am/configure.am (%MAKEFILE%): Use $(am__depfiles_maybe).

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1254
diff -u -p -u -r1.1254 automake.in
--- automake.in	2002/01/01 22:01:07	1.1254
+++ automake.in	2002/01/01 23:07:54
@@ -1535,6 +1535,7 @@ sub handle_languages
 	{
 	    # Set location of depcomp.
 	    &define_variable ('depcomp', "\$(SHELL) $config_aux_dir/depcomp");
+	    &define_variable ('am__depfiles_maybe', 'depfiles');
 
 	    require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
 
@@ -1567,6 +1568,7 @@ sub handle_languages
     else
     {
 	&define_variable ('depcomp', '');
+	&define_variable ('am__depfiles_maybe', '');
     }
 
     my %done;
Index: lib/am/configure.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/configure.am,v
retrieving revision 1.10
diff -u -p -u -r1.10 configure.am
--- configure.am	2001/10/26 09:56:42	1.10
+++ configure.am	2002/01/01 23:07:54
@@ -28,7 +28,7 @@
 
 ## This rule remakes the Makefile.
 %MAKEFILE%: %MAINTAINER-MODE% %MAKEFILE-IN% %MAKEFILE-DEPS% $(top_builddir)/config.status
-	cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE%
+	cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)
 
 
 

- 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

Reply via email to