This is the mail archive of the gcc-patches@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]

Arrange for gcc_update re-execs itself before touching files


On May 11, 2000, Mike Stump <mrs@windriver.com> wrote:

> :-(  I was misled, the bug was just a random failure in update_gcc.  A
> build rebuilt configure locally and this created conclicts for cvs to
> note on an update, and these blew it out of the water.

> If update_gcc updated itself, and then reran itself, it might have not
> failed.

Ok to install?

Index: contrib/ChangeLog
from  Alexandre Oliva  <aoliva@cygnus.com>

	* gcc_update (touch_files_reexec): New function, run after the
	tree is modified.

Index: contrib/gcc_update
===================================================================
RCS file: /cvs/gcc/egcs/contrib/gcc_update,v
retrieving revision 1.7
diff -u -r1.7 gcc_update
--- contrib/gcc_update	2000/05/09 16:05:52	1.7
+++ contrib/gcc_update	2000/05/12 06:37:49
@@ -112,6 +112,13 @@
     done
 }
 
+# Whenever we update the tree or install a patch, we may be modifying
+# this script.  By re-execing it, we ensure that the appropriate
+# dependencies and rules will be used.
+touch_files_reexec () {
+    echo "Adjusting file timestamps"
+    exec ${CONFIG_SHELL-/bin/sh} $0 --touch
+}    
 
 # This functions applies a patch to an existing tree.
 apply_patch () {
@@ -126,8 +133,7 @@
 	    cat $1 | patch -p1 ;;
 	esac
     fi
-    echo "Adjusting file timestamps"
-    touch_files
+    touch_files_reexec
 }
 
 # Check whether this indeed looks like a local tree.
@@ -197,5 +203,4 @@
     exit 1
 fi
 
-echo "Adjusting file timestamps"
-touch_files
+touch_files_reexec

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

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