This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mkconfig.sh incrementality?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]