From 27cd5f76629a2601557c868c5c701cbd38ca99b4 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 22 May 2009 09:10:45 +0000 Subject: build system: cleanup, remove unused files, regenerate git-svn-id: svn://tug.org/texlive/trunk@13371 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/reautoconf | 104 +++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 64 deletions(-) (limited to 'Build/source/reautoconf') diff --git a/Build/source/reautoconf b/Build/source/reautoconf index 57d2d011f13..bac114fcf79 100755 --- a/Build/source/reautoconf +++ b/Build/source/reautoconf @@ -20,37 +20,27 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -echo "The TeX Live build system is currently under reconstruction" -exit 1 - unset CDPATH 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. + Run \`autoreconf --no-recursive' in the directories DIR... + (default all) of the TeX Live source tree. Options: -h, --help display this help and exit successfully - -f, --force include some optional packages -n, --dry-run don't run any commands; just print them -q, --quiet don't echo commands -v, --verbose verbosely report processing (default) -Selection: - packages using KPSE macros are included - packages using automake are excluded - packages using GNU autoconf 2.60 or later: - with \`--force' included, otherwise excluded - packages using old autoconf versions are excluded - Environment variables: - 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" + TL_AUTOHEADER: program to use instead of autoheader from PATH + TL_AUTOMAKE: program to use instead of automake from PATH + TL_ACLOCAL: program to use instead of aclocal from PATH" -force=no do_cmd=eval do_say=echo +verbose=-v list= @@ -59,13 +49,11 @@ do case $option in -h | --help) echo "$usage"; exit 0 ;; - -f | --force) force=yes - ;; -n | --dry-run) do_cmd=: ;; - -q | --quiet) do_say=: + -q | --quiet) do_say=:; verbose= ;; - -v | --verbose) do_say=echo + -v | --verbose) do_say=echo; verbose=-v ;; -*) echo "$0: *** unrecognized option \`$option'" echo "$usage"; exit 1 @@ -77,77 +65,65 @@ done [ "$do_cmd" = : ] && do_say=echo # -n implies -v -[ -f ./texk/make/common.mk ] || { - echo "$0: *** can't find ./texk/make/common.mk (from `pwd`)" >&2 +[ -f ./m4/kpse-setup.m4 ] || { + echo "$0: *** can't find ./m4/kpse-setup.m4 (from `pwd`)" >&2 exit 1 } -: ${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." +: ${TL_AUTOMAKE=automake} +echo "$0: using \"$TL_AUTOMAKE\" = `$TL_AUTOMAKE --version | sed 1q`" +: ${TL_ACLOCAL=aclocal} +echo "$0: using \"$TL_ACLOCAL\" = `$TL_ACLOCAL --version | sed 1q`" +echo "$0: if you want to use different versions, set TL_AUTOCONF," +echo "$0: TL_AUTOHEADER, TL_AUTOMAKE, and/or TL_ACLOCAL." # Give users a chance to quit here -# and set TL_ACLOCAL, TL_AUTOCONF and/or TL_AUTOHEADER +# and set TL_AUTOCONF, TL_AUTOHEADER, TL_AUTOMAKE, and/or TL_ACLOCAL $do_cmd sleep 5 +AUTOCONF=$TL_AUTOCONF +AUTOHEADER=$TL_AUTOHEADER +AUTOMAKE=$TL_AUTOMAKE +ACLOCAL=$TL_ACLOCAL +export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL + do_it () { $do_say "$0: running \"$@\"" $do_cmd "$@" } -# process one directory -do_one () { # $base=configure.{in,ac}, $dir=current, $dir/$rdir->./texk/m4 with the KPSE macros - if grep 'AM_INIT_AUTOMAKE' $base >/dev/null 2>&1; then - $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 && date >stamp-aclocal" - if grep '^kpse_include \.\./make/config.mk$' Makefile.in >/dev/null 2>&1; then - do_it "$TL_AUTOHEADER && date >stamp-auto.in" - fi - do_it "$TL_AUTOCONF && date >stamp-configure" - 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" - do_it $TL_AUTOCONF - else - $do_say "$0: $dir/$base ... uses modern autoconf, skipped" - fi - else - $do_say "$0: $dir/$base ... uses older autoconf, skipped." - fi -} - if test "x$list" = x; then - list=". `find libs utils texk -name configure.in -o -name configure.ac | - sed 's,/configure\...\$,,'`" + list=". libs utils texk `find libs utils texk -type d -name ac | + sed 's,/ac\$,,'`" fi -# Autoconf in all directories +# Autoreconf in all directories for dir in $list; do + # Remove trailing slash from shell filename completion + dir=`echo $dir | sed 's,/\$,,'` if test ! -d "$dir"; then echo "$0: $dir not a directory, skipping." >&2 continue - elif test -f "$dir/configure.in"; then - base=configure.in - elif test -f "$dir/configure.ac"; then - base=configure.ac - else + fi + if test ! -f "$dir/configure.ac"; then + echo "$0: $dir/configure.ac: no such file, skipping." >&2 continue fi + extra_dirs= 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 ;; + .) ;; + libs | utils | texk) + extra_dirs=$dir/dummy ;; + *) if test -f "$dir/ac/withenable.ac"; then + extra_dirs=`grep 'dnl extra_dirs = ' $dir/ac/withenable.ac | + sed 's,^.*= ,,'` + fi ;; esac - (cd $dir; do_one) + do_it "autoreconf $verbose --no-recursive $dir $extra_dirs" done echo "$0: done." -- cgit v1.2.3