summaryrefslogtreecommitdiff
path: root/Build/source/reautoconf
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2008-02-29 15:40:00 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2008-02-29 15:40:00 +0000
commit2b049d253dc2dfcbddc656ee3bffedf9f65a67b2 (patch)
tree11d05560a28146f8bb03fe436ae00e5e5ffd2712 /Build/source/reautoconf
parentb18fbbf19bcc21a491e8c0145b1d7b2d3507ef21 (diff)
next step in autotools update
add autoheader in reautoconf script and maintainer rules (maintainer mode still has some problems) remove need for acconfig.h (templates via AC_DEFINE) svn:ignore atom4te.cache directories reautoconf of the whole tree git-svn-id: svn://tug.org/texlive/trunk@6773 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/reautoconf')
-rwxr-xr-xBuild/source/reautoconf92
1 files changed, 57 insertions, 35 deletions
diff --git a/Build/source/reautoconf b/Build/source/reautoconf
index 85c80c0cf0e..03cdfaa2ecb 100755
--- a/Build/source/reautoconf
+++ b/Build/source/reautoconf
@@ -8,9 +8,9 @@
# Copyright 2005 Olaf Weber.
# Copyright 2004 - 2008 Peter Breitenlohner.
#
-# This program is free software; you can redistribute it and/or modify
+# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@@ -19,13 +19,13 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this library; if not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
unset CDPATH
-usage="Usage: $0 [OPTION]...
- Run \`aclocal' (if applicable) and \`autoconf' for a
- selection of packages in the TeX Live source tree.
+usage="Usage: $0 [OPTION]... [DIR]...
+ Run \`aclocal' (if applicable) and \`autoconf' in a selection
+ of the directories DIR... (default all) in TeX Live source tree.
Options:
-h, --help display this help and exit successfully
@@ -42,13 +42,16 @@ Selection:
packages using old autoconf versions are excluded
Environment variables:
- TL_AUTOCONF: program to use instead of autoconf from PATH
- TL_ACLOCAL: program to use instead of aclocal from PATH"
+ TL_ACLOCAL: program to use instead of aclocal from PATH
+ TL_AUTOCONF: program to use instead of autoconf from PATH
+ TL_AUTOHEADER: program to use instead of autoheader from PATH"
force=no
-do_cmd=
+do_cmd=eval
do_say=echo
+list=
+
for option
do
case $option in
@@ -62,9 +65,11 @@ do
;;
-v | --verbose) do_say=echo
;;
- *) echo "$0: *** unrecognized option \`$option'"
+ -*) echo "$0: *** unrecognized option \`$option'"
echo "$usage"; exit 1
;;
+ *) list="$list $option"
+ ;;
esac
done
@@ -75,14 +80,19 @@ done
exit 1
}
-: ${TL_AUTOCONF=autoconf}
-echo "$0: using \"$TL_AUTOCONF\" = `$TL_AUTOCONF --version | sed 1q`"
-echo "$0: if you want to use a different autoconf, set TL_AUTOCONF."
: ${TL_ACLOCAL=aclocal}
echo "$0: using \"$TL_ACLOCAL\" = `$TL_ACLOCAL --version | sed 1q`"
echo "$0: if you want to use a different aclocal, set TL_ACLOCAL."
+: ${TL_AUTOCONF=autoconf}
+echo "$0: using \"$TL_AUTOCONF\" = `$TL_AUTOCONF --version | sed 1q`"
+echo "$0: if you want to use a different autoconf, set TL_AUTOCONF."
+: ${TL_AUTOHEADER=autoheader}
+echo "$0: using \"$TL_AUTOHEADER\" = `$TL_AUTOHEADER --version | sed 1q`"
+echo "$0: if you want to use a different autoheader, set TL_AUTOHEADER."
-sleep 5 # Give users a chance to cancel and set TL_AUTOCONF and/or TL_ACLOCAL
+# Give users a chance to quit here
+# and set TL_ACLOCAL, TL_AUTOCONF and/or TL_AUTOHEADER
+$do_cmd sleep 5
do_it () {
$do_say "$0: running \"$@\""
@@ -95,8 +105,11 @@ do_one () { # $base=configure.{in,ac}, $dir=current, $dir/$rdir->./texk/m4 with
$do_say "$0: $dir/$base ... uses automake, skipped."
elif grep 'm4_include(\['$rdir'/kpse_.*\.m4])' aclocal.m4 >/dev/null 2>&1; then
$do_say "$0: $dir/$base ... uses KPSE macros"
- do_it $TL_ACLOCAL -I $rdir
+ do_it "$TL_ACLOCAL -I $rdir && date >stamp-aclocal"
do_it $TL_AUTOCONF
+ if grep '^kpse_include \.\./make/config.mk$' Makefile.in >/dev/null 2>&1; then
+ do_it "$TL_AUTOHEADER && date >stamp-auto.in"
+ fi
elif grep '# Generated by GNU Autoconf 2.6' configure >/dev/null 2>&1; then
if test "$force" = yes; then
$do_say "$0: $dir/$base ... uses modern autoconf, forced"
@@ -109,26 +122,35 @@ do_one () { # $base=configure.{in,ac}, $dir=current, $dir/$rdir->./texk/m4 with
fi
}
-# Autoconf in . (the top level).
-base=configure.in dir=. rdir=texk/m4
-do_one
-
-# Autoconf in all other directories
-for base in configure.{in,ac}; do
- for dir in `find utils libs texk -name $base | sed "s,/$base\$,,"`; do
- case $dir in
- texk)
- rdir=m4
- ;;
- texk/*)
- rdir=`echo $dir | sed -e 's,^texk/,,' -e 's,[^/]*,..,g'`/m4
- ;;
- *)
- rdir=`echo $dir | sed 's,[^/]*,..,g'`/texk/m4
- ;;
- esac
- (cd $dir; do_one)
- done
+if test "x$list" = x; then
+ list=". `find libs utils texk -name configure.in -o -name configure.ac |
+ sed 's,/configure\...\$,,'`"
+fi
+
+# Autoconf in all directories
+for dir in $list; do
+ if test -f "$dir/configure.in"; then
+ base=configure.in
+ elif test -f "$dir/configure.ac"; then
+ base=configure.ac
+ else
+ continue
+ fi
+ case $dir in
+ .)
+ rdir=texk/m4
+ ;;
+ texk)
+ rdir=m4
+ ;;
+ texk/*)
+ rdir=`echo $dir | sed -e 's,^texk/,,' -e 's,[^/]*,..,g'`/m4
+ ;;
+ *)
+ rdir=`echo $dir | sed 's,[^/]*,..,g'`/texk/m4
+ ;;
+ esac
+ (cd $dir; do_one)
done
echo "$0: done."