Tue Apr 21 12:31:33 1992 K. Richard Pixley (rich@cygnus.com)
+ * configure: use move-if-change from gcc to create config.status.
+ Some makefiles depend on config.status to tell if a directory
+ has been reconfigured for a different host. This change
+ prevents those directories from remaking everything in the case
+ where the reconfig was only intended to rebuild a Makefile.
+
* configure: test for config.sub with "config.sub sun4" rather
than "config.sub ${host_alias}". Otherwise we can't tell a bad
host alias from a missing config.sub.
next_site=
next_srcdir=
next_target=
+moveifchange=
next_tmpdir=
norecursion=
removing=
fi
configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
+moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
# this is a hack. sun4 must always be a valid host alias or this will fail.
if ${configsub} sun4 >/dev/null 2>&1 ; then
exit 1
fi
+touch config.junk
+if ${moveifchange} config.junk config.trash ; then
+ true
+else
+ echo '***' cannot find move-if-change. 1>&2
+ exit 1
+fi
+rm -f config.junk config.trash
+
case "${srcdir}" in
"")
if [ -r configure.in ] ; then
# Make the links.
configlinks="${links}"
+ mv -f config.status config.back
while [ -n "${files}" ] ; do
# set file to car of files, files to cdr of files
set ${files}; file=$1; shift; files=$*
fi
${remove} -f ${link}
- rm -f config.status
# Make a symlink if possible, otherwise try a hard link
${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link}
# ${NO_EDIT}
# ${PWD} was configured as follows:
${progname}" ${arguments} "
-# ${using}" > ${subdir}/config.status
+# ${using}" > ${subdir}/config.new
else
echo "#!/bin/sh
# ${NO_EDIT}
# ${PWD}/${subdir} was configured as follows:
cd ${invsubdir}
${progname}" ${arguments} "
-# ${using}" > ${subdir}/config.status
+# ${using}" > ${subdir}/config.new
fi
- chmod a+x ${subdir}/config.status
+ chmod a+x ${subdir}/config.new
+ mv -f config.back config.status
+ ${moveifchange} config.new config.back
;;
*) rm -f ${Makefile} ${subdir}/config.status ${links} ;;