#! /bin/sh
UPDATE_OPTIONS=-Pd
self=$0
files_and_dependencies () {
sed -e 's/ *texinfo/aclocal.m4: texinfo/configure.in texinfo/acinclude.m4
texinfo/Makefile.in: texinfo/Makefile.am texinfo/configure.in texinfo/aclocal.m4
texinfo/configure: texinfo/configure.in texinfo/aclocal.m4
texinfo/stamp-h.in: texinfo/configure.in texinfo/aclocal.m4 texinfo/acconfig.h
texinfo/lib/Makefile.in: texinfo/lib/Makefile.am texinfo/configure.in texinfo/aclocal.m4
texinfo/makeinfo/Makefile.in: texinfo/makeinfo/Makefile.am texinfo/configure.in texinfo/aclocal.m4
texinfo/util/Makefile.in: texinfo/util/Makefile.am texinfo/configure.in texinfo/aclocal.m4
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/intl/plural.c: gcc/intl/plural.y
gcc/f/intdoc.texi: gcc/f/intdoc.in gcc/f/intdoc.c gcc/f/intrin.h gcc/f/intrin.def
gcc/cp/cfns.h: gcc/cp/cfns.gperf
gcc/java/keyword.h: gcc/java/keyword.gperf
gcc/ada/treeprs.ads: gcc/ada/treeprs.adt gcc/ada/sinfo.ads gcc/ada/xtreeprs.adb
gcc/ada/einfo.h: gcc/ada/einfo.ads gcc/ada/einfo.adb gcc/ada/xeinfo.adb
gcc/ada/sinfo.h: gcc/ada/sinfo.ads gcc/ada/xsinfo.adb
gcc/ada/nmake.adb: gcc/ada/sinfo.ads gcc/ada/nmake.adt gcc/ada/xnmake.adb
gcc/ada/nmake.ads: gcc/ada/sinfo.ads gcc/ada/nmake.adt gcc/ada/xnmake.adb
gcc/ada/gnat_ug_unx.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words
gcc/ada/gnat_ug_vms.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words
gcc/ada/gnat_ug_vxw.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words
gcc/ada/gnat_ug_w32.texi: gcc/ada/gnat_ug.texi gcc/ada/xgnatug.adb gcc/ada/ug_words
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/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
Makefile.in: Makefile.tpl Makefile.def
EOF
}
touch_files () {
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} -s -f Makefile.$$ all | grep . > /dev/null; do
sleep 1
done 2>&1
rm -f Makefile.$$
}
touch_files_reexec () {
echo "Adjusting file timestamps"
exec ${CONFIG_SHELL-/bin/sh} $self --touch
}
apply_patch () {
if [ -f $1 ]; then
echo "Applying patch file $1"
case "$1" in
*gz)
gzip -d -c $1 | patch -p1 ;;
*bz2)
bzip2 -d -c $1 | patch -p1 ;;
*)
cat $1 | patch -p1 ;;
esac
fi
touch_files_reexec
}
if [ ! -f gcc/version.c ]; then
echo "This does not seem to be a GCC tree!"
exit
fi
case "$1" in
--patch)
if test "$#" != 2; then
echo "$1" expects only one argument >&2
exit 1
fi
apply_patch "${2}"
exit $?
;;
--touch)
if test "$#" != 1; then
echo "$1" does not expect any argument >&2
exit 1
fi
touch_files
exit $?
;;
--list)
if test "$#" != 1; then
echo "$1" does not expect any argument >&2
exit 1
fi
files_and_dependencies | sed 's/ /: /'
exit $?
;;
--help)
sed -e '1,2d' -e '/^UPDATE_OPTIONS=/{i\
\
p
}' \
-e '/^$/,$d' -e 's/ exit $?
;;
esac
if [ ! -d CVS ]; then
echo "This does not seem to be a GCC CVS tree!"
exit
fi
if [ x"${1}"x = x"--nostdflags"x ]; then
shift
else
set -- $UPDATE_OPTIONS ${1+"$@"}
fi
echo "Updating CVS tree"
cvs -q update ${1+"$@"}
if [ $? -ne 0 ]; then
(touch_files_reexec)
echo "CVS update of full tree failed." >&2
exit 1
fi
{
date
TZ=UTC date
} > LAST_UPDATED
touch_files_reexec