OSDN Git Service

* gcc_update: (files_and_dependencies) Add gcc/java/parse.c
[pf3gnuchains/gcc-fork.git] / contrib / gcc_update
index 5e61648..b52dc4c 100755 (executable)
@@ -29,7 +29,7 @@
 # contrib/gcc_update --list
 #
 #
-# (C) 1998-2000 Free Software Foundation
+# (C) 1998, 1999, 2000, 2001 Free Software Foundation
 # Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
 #
 # This script is Free Software, and it can be copied, distributed and
 
 
 # Default options used when updating via CVS.
-UPDATE_OPTIONS=-P
-# Add -d to create any directories that exist in the repository but not
-#        locally.
-# Add -A to reset any sticky tags, dates, or `-k' options.
+UPDATE_OPTIONS=-Pd
+# Use -P to prune empty directories.
+# Use -d to create any directories that exist in the repository but not
+#           locally.
+# Use -A to reset any sticky tags, dates, or `-k' options.
+
+######## Anything below shouldn't be changed by regular users.
 
 # Arrange for the value of $0 to be available for functions
 self=$0
@@ -66,46 +69,62 @@ gcc/configure: gcc/configure.in
 gcc/cstamp-h.in: gcc/configure.in gcc/acconfig.h
 gcc/config.in: gcc/cstamp-h.in
 gcc/fixinc/fixincl.x: gcc/fixinc/fixincl.tpl gcc/fixinc/inclhack.def
-gcc/gcov.1: gcc/gcov.texi
 # And then, language-specific files
-# (None at present.)
+gcc/f/intdoc.texi: gcc/f/intdoc.in gcc/f/intdoc.c gcc/f/intrin.h gcc/f/intrin.def
+gcc/java/parse.c: gcc/java/parse.y
+gcc/java/parse-scan.c: gcc/java/parse-scan.y
+gcc/java/keyword.h: gcc/java/keyword.gperf
 # And libraries, at last
 libchill/configure: libchill/configure.in
 libf2c/configure: libf2c/configure.in
 libf2c/libF77/configure: libf2c/libF77/configure.in
 libf2c/libI77/configure: libf2c/libI77/configure.in
+libf2c/libI77/stamp-h.in: libf2c/libI77/configure.in
+libf2c/libI77/config.h.in: libf2c/libI77/configure.in libf2c/libI77/stamp-h.in
 libf2c/libU77/configure: libf2c/libU77/configure.in
 libf2c/libU77/stamp-h.in: libf2c/libU77/configure.in libf2c/libU77/acconfig.h
 libobjc/configure: libobjc/configure.in
+# fastjar
+fastjar/aclocal.m4: fastjar/configure.in
+fastjar/Makefile.in: fastjar/Makefile.am fastjar/configure.in fastjar/aclocal.m4
+fastjar/configure: fastjar/configure.in fastjar/aclocal.m4
+fastjar/stamp-h.in: fastjar/configure.in fastjar/aclocal.m4
+boehm-gc/aclocal.m4: boehm-gc/configure.in boehm-gc/acinclude.m4
+boehm-gc/Makefile.in: boehm-gc/Makefile.am boehm-gc/configure.in boehm-gc/aclocal.m4
+boehm-gc/configure: boehm-gc/configure.in boehm-gc/aclocal.m4
+libjava/aclocal.m4: libjava/configure.in libjava/acinclude.m4
+libjava/Makefile.in: libjava/Makefile.am libjava/configure.in libjava/aclocal.m4
+libjava/configure: libjava/configure.in libjava/aclocal.m4
+libjava/libltdl/aclocal.m4: libjava/libltdl/configure.in libjava/libltdl/acinclude.m4
+libjava/libltdl/Makefile.in: libjava/libltdl/Makefile.am libjava/libltdl/configure.in libjava/libltdl/aclocal.m4
+libjava/libltdl/configure: libjava/libltdl/configure.in libjava/libltdl/aclocal.m4
+libjava/libltdl/stamp-h.in: libjava/libltdl/configure.in libjava/libltdl/aclocal.m4 libjava/libltdl/acconfig.h
 EOF
 }
 
 
-# This function checks whether its first argument is newer than all
-# the other arguments.  It returns success (0) otherwise.
-is_out_of_date () {
-  test `ls -1dt ${1+"$@"} | sed 1q` != "$1"
-}
-
-
 # This function touches generated files such that the ``end'' user does
 # not have to rebuild them.
 touch_files () {
-    files_and_dependencies | while read f deps; do
-       if test -f $f && is_out_of_date "$f" $deps; then
-           echo Touching "$f"...
-           touch $f
-           if is_out_of_date "$f" $deps; then
-               # Hmm, it may have got the same timestamp as one of
-               # its touched dependencies.  Wait a second and retry.
-               sleep 1
-               echo Touching "$f" once more...
-               touch $f
-           fi
-       fi
-    done
+    rm -f Makefile.$$
+    echo 'all: \' > Makefile.$$
+    files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$
+    echo '; @true' >> Makefile.$$
+    files_and_dependencies | sed 's, ,: ,' >> Makefile.$$
+    files_and_dependencies | sed 's, .*, \\,' >> Makefile.$$
+    echo ':' >> Makefile.$$
+    echo '     @for f in $?; do test -f $$f || exit 0; done; \' >> Makefile.$$
+    echo '     echo Touching $@...; \' >> Makefile.$$
+    echo '     echo Touching $@... 1>&2; \' >> Makefile.$$
+    echo '     touch $@' >> Makefile.$$
+    files_and_dependencies | sed 's,[^ ]* ,,;s,$, :,' >> Makefile.$$
+    while ${MAKE-make} -f Makefile.$$ all | grep . > /dev/null; do
+      sleep 1
+    done 2>&1
+    rm -f Makefile.$$
 }
 
+
 # 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.
@@ -198,4 +217,8 @@ if [ $? -ne 0 ]; then
     exit 1
 fi
 
+{
+  date
+  TZ=UTC date
+} > LAST_UPDATED
 touch_files_reexec