This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
mkconfig.sh incrementality?
- From: Jay K <jay dot krell at cornell dot edu>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Wed, 23 May 2012 16:04:29 +0000
- Subject: mkconfig.sh incrementality?
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?
?- Jay