[Top][All Lists]

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

Recreate depfiles when regenerating Makefiles

From: Raja R Harinath
Subject: Recreate depfiles when regenerating Makefiles
Date: Tue, 01 Jan 2002 16:03:41 -0600
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)


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  <address@hidden>

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

Attachment: automake.diff
Description: Recreate depfiles when regenerating Makefiles

- Hari
Raja R Harinath ------------------------------ address@hidden
"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

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