[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recreate depfiles when regenerating Makefiles
From: |
Raja R Harinath |
Subject: |
Re: Recreate depfiles when regenerating Makefiles |
Date: |
Sun, 06 Jan 2002 18:18:23 -0600 |
User-agent: |
Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1.50 (i686-pc-linux-gnu) |
Hi,
Tom Tromey <address@hidden> writes:
>>>>>> "Hari" == Raja R Harinath <address@hidden> writes:
>
> Hari> Akim once suggested adding a facility to hook commands to files
> Hari> listed in AC_CONFIG_FILES.
>
> The problem with this idea is that the information about which files
> is known when automake is run, not when autoconf is run.
I meant it this way:
AC_CONFIG_FILES([foo/Makefile])
and elsewhere, some _AM_* macro generates
AC_CONFIG_FILE_HOOK([foo/Makefile],
[# same commands as run for 'depfiles' AC_CONFIG_COMMAND
])
(Though, IIRC, Akim wanted this functionality as part of AC_CONFIG_COMMAND).
> Hari> Anyway, till that date, it may make sense to handle this somewhat
> Hari> hackily. One issue with generating the above command is that it is
> Hari> safe to invoke the 'depfiles' CONFIG_COMMAND only in some cases, and
> Hari> at the time 'automake' emits the Makefile regeneration code, it
> Hari> doesn't know if it's safe yet. So, here goes:
>
> I think it is always safe to run the depfiles command. The command
> itself looks to see if the file it is modifying is an automake
> output. So I think it is ok to simply always run the `depfiles'
> rule.
No. It is currently safe only if one of the AC_PROG_CC or AC_PROG_CXX
commands is present in configure.in, thanks to the shenanigans in
init.m4. That's why I went through the extra step.
Thanks.
- 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