texlive[59748] Build/source: reautoconf: pass -Wno-obsolete by

commits+karl at tug.org commits+karl at tug.org
Tue Jun 29 03:19:17 CEST 2021


Revision: 59748
          http://tug.org/svn/texlive?view=revision&revision=59748
Author:   karl
Date:     2021-06-29 03:19:16 +0200 (Tue, 29 Jun 2021)
Log Message:
-----------
reautoconf: pass -Wno-obsolete by default, to prepare for autoconf 2.70

Modified Paths:
--------------
    trunk/Build/source/ChangeLog
    trunk/Build/source/m4/ChangeLog
    trunk/Build/source/m4/README
    trunk/Build/source/reautoconf

Modified: trunk/Build/source/ChangeLog
===================================================================
--- trunk/Build/source/ChangeLog	2021-06-28 23:49:12 UTC (rev 59747)
+++ trunk/Build/source/ChangeLog	2021-06-29 01:19:16 UTC (rev 59748)
@@ -1,3 +1,9 @@
+2021-06-27  Karl Berry  <karl at freefriends.org>
+
+	* reautoconf: pass -Wno-obsolete by default, since Autoconf 2.70
+	and later obsoletes many common macros. See m4/README for more.
+	Also standardize shell usage, etc., but no other functional changes.
+
 2021-04-17  Karl Berry  <karl at tug.org>
 
 	* version.ac: now 2022/dev since TL'21 is released.

Modified: trunk/Build/source/m4/ChangeLog
===================================================================
--- trunk/Build/source/m4/ChangeLog	2021-06-28 23:49:12 UTC (rev 59747)
+++ trunk/Build/source/m4/ChangeLog	2021-06-29 01:19:16 UTC (rev 59748)
@@ -1,3 +1,7 @@
+2021-06-28  Karl Berry  <karl at freefriends.org>
+
+	* README: list the macros obsoleted by autoconf 2.70 which we use.
+
 2021-02-09  Karl Berry  <karl at freefriends.org>
 
 	* kpse-setup.m4 (_KPSE_RECURSE): add debug if configure not found.

Modified: trunk/Build/source/m4/README
===================================================================
--- trunk/Build/source/m4/README	2021-06-28 23:49:12 UTC (rev 59747)
+++ trunk/Build/source/m4/README	2021-06-29 01:19:16 UTC (rev 59748)
@@ -1,22 +1,23 @@
 $Id$
-Copyright 2009-2017 Karl Berry <tex-live at tug.org>
+Copyright 2009-2021 Karl Berry <tex-live at tug.org>
 Copyright 2009-2012 Peter Breitenlohner <tex-live at tug.org>
 You may freely use, modify and/or distribute this file.
 
-This directory is the central repository for Autoconf macros needed to build
-the TeX Live (TL) tree. They are incorporated into the configure scripts.
+This m4/ directory is the central repository for Autoconf macros needed
+to build the TeX Live (TL) tree. They are incorporated into the
+configure scripts.
 
 (1) Public macros such as libtool.m4 used to build the libraries and
-programs in the TL subdirectories libs/*/, utils/*/, and texk/*/ that are
-owned by the TL tree, i.e., either not maintained independently or with a
-proxy Makefile.am using an (almost) unmodified source tree and bypassing the
-original build system.
+programs in the TL subdirectories libs/*/, utils/*/, and texk/*/ that
+are owned by the TL tree, i.e., either not maintained independently or
+with a proxy Makefile.am using an (essentially) unmodified source tree,
+bypassing the original/upstream build system, whatever it may be.
 
-Note: the files libtool.m4 and ../build-aux/ltmain.sh must match.
+Note: the files libtool.m4 and ../build-aux/ltmain.sh must be kept in sync.
 
 (2) `Public' macros for the TL build system and for the TL libraries in the
 subdirectories libs/*/, texk/kpathsea/, and texk/ptexenc/, used to configure
-programs and other libraries requiring these TL libraries.  The macros are
+programs and other libraries requiring these TL libraries. The macros are
 designed with the aim that programs maintained independently can be built as
 part of the TL tree or without TL (using installed versions of the required
 libraries), ideally using the same unmodified sources.
@@ -25,11 +26,64 @@
 owned by the TL tree.
 
 kpse-pkgs.m4: defines lists of subdirectories libs/Lib/, utils/Util/, and
-	tex/Prog/ with libraries and programs that can be built as part of
-	the TL tree.
+   tex/Prog/ with libraries and programs that can be built as part of
+  the TL tree.
 
 kpse-setup.m4: macros that walk through these lists to provide configure
-	options.  They depend on configure fragments */*/ac/withenable.ac
-	defining the dependencies between these libraries and programs.
+  options. They depend on configure fragments */*/ac/withenable.ac
+  defining the dependencies between these libraries and programs.
 
-See also the sibling top-level am/ directory.
+
+--- See also the sibling top-level am/ directory, which contains
+fragments for our Makefile.am files.
+
+
+---- "Obsolete" AC_* macros in Autoconf.
+
+In Autoconf 2.70, many commonly used AC_ macros were designated obsolete
+(though they still work fine), and now their use generates warnings. In
+the case of TeX Live, many hundreds of warnings, obscuring any real
+diagnostics. Therefore our top-level reautoconf script now passes
+-Wno-obsolete to autoreconf in order to eliminate the "obsolete"
+warnings (so glad this option is provided).
+
+To undo this and see the warnings, our reautoconf can be given the option
+--warn-obsolete. One reason to do this would be to work on updating our
+configure.ac/etc. source files (an onerous task); and communicate
+changes to upstream (even more onerously), who probably won't want to
+require the latest Autoconf anyway (though we can). All in all, it feels
+like a tremendous amount of time to spend merely to end up in the same
+place, with no discernible benefit. Thus there is no particular
+timeframe, or, apparently, need, for fixing the warnings.
+
+Most of the obsolete macros are straightforward to replace with the new
+"approved" macros, and described in the Autoconf manual. In a few cases
+(marked with "caveat" in the list below), however, the replacement is
+not obvious or does not have exactly the same behavior, and therefore
+requires further checking.
+
+The following is a terse list of the deprecated macros used in TL
+(typically many times each), and the replacement given in the Autoconf
+manual -- which needs to be referenced to do any actual work in this
+area; these are just hints about what's going on.
+
+AC_ERROR - replaced by AC_MSG_ERROR
+AC_FOREACH - alias of m4_foreach_w
+AC_HEADER_STDC - This macro is obsolescent. Its sole effect ...
+AC_HELP_STRING - replaced by AS_HELP_STRING
+AC_LANG_C - Same as AC_LANG([C])
+AC_LANG_CPLUSPLUS - Same as AC_LANG([C++])
+AC_PROG_CC_C99 - now done by AC_PROG_CC
+AC_TRY_COMPILE - same as AC_COMPILE_IFELSE(...
+AC_TRY_LINK - Same as: AC_LINK_IFELSE(...
+AC_TRY_RUN - same as AC_RUN_IFELSE(...
+AC_TYPE_SIGNAL - just use void
+AC_UNISTD_H - same as AC_CHECK_HEADERS([unistd.h])
+
+AC_HEADER_TIME - (caveat) although it does still define TIME_WITH_SYS_TIME 
+
+AC_PROG_LEX - (caveat) still does this if neither the yywrap nor
+  the noyywrap option is given.
+
+AC_FUNC_VFORK - (caveat) does not appear in manual (except in index).
+  Same as AC_FUNC_FORK?

Modified: trunk/Build/source/reautoconf
===================================================================
--- trunk/Build/source/reautoconf	2021-06-28 23:49:12 UTC (rev 59747)
+++ trunk/Build/source/reautoconf	2021-06-29 01:19:16 UTC (rev 59748)
@@ -1,11 +1,11 @@
 #! /bin/sh
 # $Id$
-# This "reautoconf" script found at the root of the TeX Live source tree 
-# runs aclocal and autoconf (from PATH) in all relevant directories.
+# This "reautoconf" script at the root of the TeX Live source tree 
+# runs autoreconf (from PATH) in all relevant TL directories.
 #
-# Copyright 2008 Karl Berry.
+# Copyright 2008-2021 Karl Berry.
+# Copyright 2004-2009 Peter Breitenlohner.
 # Copyright 2005 Olaf Weber.
-# Copyright 2004 - 2009 Peter Breitenlohner.
 #
 # 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
@@ -25,6 +25,11 @@
 usage="Usage: $0 [OPTION]... [DIR]...
   Run \`autoreconf --no-recursive' in the directories DIR...
   (default all) of the TeX Live source tree.
+  
+  By default, also pass -Wno-obsolete, because Autoconf 2.70
+  and later deprecated many widely used macros. See Build/m4/README for
+  a lengthy discussion of this. To see the obsolete warnings (perhaps
+  because you want to spend time fixing them), use --warn-obsolete here.
 
 Options:
   -h, --help      display this help and exit successfully
@@ -31,16 +36,27 @@
   -n, --dry-run   don't run any commands; just print them
   -q, --quiet     don't echo commands
   -v, --verbose   verbosely report processing (default)
+      --warn-obsolete  do not pass -Wno-obsolete
 
 Environment variables:
   TL_AUTOCONF:   program to use instead of autoconf 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"
+  TL_ACLOCAL:    program to use instead of aclocal from PATH
 
+This script should be invoked only from the top level of the TeX Live
+source tree.
+
+Report bugs (and any other discussion) to:
+  tlbuild at tug.org (https://lists.tug.org/tlbuild)
+
+Version: $Id$
+"
+
 do_cmd=eval
 do_say=echo
 verbose=-v
+warn_obsolete=-Wno-obsolete
 
 list=
 
@@ -47,28 +63,23 @@
 for option
 do
   case $option in
-    -h | --help) echo "$usage"; exit 0
-      ;;
-    -n | --dry-run) do_cmd=:
-      ;;
-    -q | --quiet) do_say=:; verbose=
-      ;;
-    -v | --verbose) do_say=echo; verbose=-v
-      ;;
-    -*) echo "$0: *** unrecognized option \`$option'"
-      echo "$usage"; exit 1
-      ;;
-    *) list="$list $option"
-      ;;
+    -h | --help | --version) echo "$usage"; exit 0 ;;
+    -n | --dry-run)  do_cmd=:                ;;
+    -q | --quiet)    do_say=:;    verbose=   ;;
+    -v | --verbose)  do_say=echo; verbose=-v ;;
+    --warn-obsolete) warn_obsolete=          ;;
+    -*) echo "$0: *** unrecognized option \`$option'" >&2
+        echo "Try --help if you need it." >&2; exit 1 ;;
+     *) list="$list $option" ;;
   esac
 done
 
-[ "$do_cmd" = : ] && do_say=echo	# -n implies -v
+test x"$do_cmd" = x: && do_say=echo	# -n implies -v
 
-[ -f ./m4/kpse-setup.m4 ] || {
-	echo "$0: *** can't find ./m4/kpse-setup.m4 (from `pwd`)" >&2
-	exit 1
-}
+if test ! -f ./m4/kpse-setup.m4; then
+  echo "$0: *** can't find ./m4/kpse-setup.m4 (from `pwd`)" >&2
+  exit 1
+fi
 
 : ${TL_AUTOCONF=autoconf}
 echo "$0: using \"$TL_AUTOCONF\" = `$TL_AUTOCONF --version | sed 1q`"
@@ -83,7 +94,8 @@
 
 # Give users a chance to quit here
 # and set TL_AUTOCONF, TL_AUTOHEADER, TL_AUTOMAKE, and/or TL_ACLOCAL
-$do_cmd sleep 5
+$do_cmd sleep 4
+$do_say "$0: starting at `date`."
 
 AUTOCONF=$TL_AUTOCONF
 AUTOHEADER=$TL_AUTOHEADER
@@ -94,17 +106,19 @@
 do_it () {
   $do_say "$0: running \"$@\""
   $do_cmd "$@"
+  if test $? -ne 0; then
+    echo "exit status of $*: $?" >&2
+  fi
 }
 
 if test "x$list" = x; then
-  list=". auxdir/auxsub libs utils texk `find libs utils texk -type d -name ac |
-    sed 's,/ac\$,,'`"
+  list=". auxdir/auxsub libs utils texk \
+        `find libs utils texk -type d -name ac | sed 's,/ac\$,,'`"
 fi
 
 # 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
@@ -119,7 +133,7 @@
   else
     extra_dirs=
   fi
-  do_it autoreconf $verbose --no-recursive $dir $extra_dirs
+  do_it autoreconf $verbose --no-recursive $warn_obsolete $dir $extra_dirs
 done
 
-echo "$0: done."
+echo "$0: done at `date`."



More information about the tex-live-commits mailing list.