This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mkconfig.sh incrementality?
- From: Ian Lance Taylor <iant at google dot com>
- To: Jay K <jay dot krell at cornell dot edu>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Wed, 23 May 2012 15:13:34 -0700
- Subject: Re: mkconfig.sh incrementality?
- References: <COL101-W11E9F74ADF182F4F87426AE6030@phx.gbl>
Jay K <jay.krell@cornell.edu> writes:
> At the bottom of mkconfig.sh in 4.6.2 and 4.7.0:
>
>
> # Avoid changing the actual file if possible.
> if [ -f $output ] && cmp ${output}T $output >/dev/null 2>&1; then
> ÂÂÂ echo $output is unchanged >&2
> ÂÂÂ rm -f ${output}T
> else
> ÂÂÂ mv -f ${output}T $output
> fi
>
> # Touch a stamp file for Make's benefit.
> rm -f cs-$output
> echo timestamp > cs-$output
>
>
>
> Shouldn't the timestamp > cs-$output only be a) mainly if the other file updated, by the mv and b) corner case, if it doesn't exist?
> Maybe rm -rf by the mv, and echo if not exist?
No. This is all about having make do the right thing. Look at the
rules that invoke mkconfig.sh in gcc/Makefile.in.
Ian