diff options
author | K. Richard Pixley <rich@cygnus> | 1992-04-21 19:36:11 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1992-04-21 19:36:11 +0000 |
commit | 196377eec673c1ebbf175d3299d8bdf5133b122b (patch) | |
tree | c3912a164fab12f8f89244ff8d16c4eda234943d | |
parent | 94c7ae212df7c2d3266d558ecf8a94a237f7690c (diff) | |
download | gdb-196377eec673c1ebbf175d3299d8bdf5133b122b.zip gdb-196377eec673c1ebbf175d3299d8bdf5133b122b.tar.gz gdb-196377eec673c1ebbf175d3299d8bdf5133b122b.tar.bz2 |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | configure | 21 |
2 files changed, 23 insertions, 4 deletions
@@ -1,5 +1,11 @@ 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. @@ -60,6 +60,7 @@ next_prefix= next_site= next_srcdir= next_target= +moveifchange= next_tmpdir= norecursion= removing= @@ -323,6 +324,7 @@ if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then 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 @@ -332,6 +334,15 @@ else 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 @@ -495,6 +506,7 @@ for subdir in . ${subdirs} ; do # 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=$* @@ -507,7 +519,6 @@ for subdir in . ${subdirs} ; do 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} @@ -697,16 +708,18 @@ EOF # ${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} ;; |