aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK. Richard Pixley <rich@cygnus>1992-04-21 19:49:03 +0000
committerK. Richard Pixley <rich@cygnus>1992-04-21 19:49:03 +0000
commit86112802a9a37510c1eb06602f7e6e21d9444612 (patch)
treecf0bfb4d0536e18ccb5e79a87eb15961090cf97c
parent6e6bf7f2ca5ea49448c7013f3354269dd77312c2 (diff)
downloadgdb-86112802a9a37510c1eb06602f7e6e21d9444612.zip
gdb-86112802a9a37510c1eb06602f7e6e21d9444612.tar.gz
gdb-86112802a9a37510c1eb06602f7e6e21d9444612.tar.bz2
configure: patch from eggert. Avoids a protection problem if the
original Makefile.in is read only.
-rw-r--r--ChangeLog3
-rwxr-xr-xconfigure6
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e2d6120..5ce0d1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
Tue Apr 21 12:31:33 1992 K. Richard Pixley (rich@cygnus.com)
+ * configure: patch from eggert. Avoids a protection problem if
+ the original Makefile.in is read only.
+
* 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
diff --git a/configure b/configure
index 6446f47..dab8146 100755
--- a/configure
+++ b/configure
@@ -562,6 +562,7 @@ EOF
# so do these separately because I don't trust the order of sed -e expressions.
# Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
+ rm -f Makefile.tem
case "${site}" in
"") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
*)
@@ -579,6 +580,7 @@ EOF
# working copy now in ${subdir}/Makefile.tem
# Conditionalize the makefile for this host.
+ rm -f ${Makefile}
case "${host_makefile_frag}" in
"") mv ${subdir}/Makefile.tem ${Makefile} ;;
*)
@@ -596,6 +598,7 @@ EOF
# working copy now in ${Makefile}
# Conditionalize the makefile for this target.
+ rm -f Makefile.tem
case "${target_makefile_frag}" in
"") mv ${Makefile} ${subdir}/Makefile.tem ;;
*)
@@ -611,6 +614,7 @@ EOF
# real copy now in ${subdir}/Makefile.tem
# prepend warning about editting, and a bunch of variables.
+ rm -f ${Makefile}
cat > ${Makefile} <<EOF
# ${NO_EDIT}
VPATH = ${makesrcdir}
@@ -670,7 +674,7 @@ EOF
${subdir}/Makefile.tem >> ${Makefile}
# final copy now in ${Makefile}
- rm ${subdir}/Makefile.tem
+ rm -f ${subdir}/Makefile.tem
if [ -n "${verbose}" -o -z "${silent}" ] ; then
case "${host_makefile_frag}" in