diff options
author | TizenOpenSource <tizenopensrc@samsung.com> | 2022-12-27 11:44:34 +0900 |
---|---|---|
committer | TizenOpenSource <tizenopensrc@samsung.com> | 2022-12-27 11:44:34 +0900 |
commit | a158b40451a19caa06e43f5605c4a1acfd840b42 (patch) | |
tree | d12bc962a8a107c63162017d8d39471e3a031892 | |
parent | 19d04ea285be5c7b1640fbdde69267353f65b8e5 (diff) | |
download | automake-upstream.tar.gz automake-upstream.tar.bz2 automake-upstream.zip |
Imported Upstream version 1.16.5upstream/1.16.5upstream
66 files changed, 1045 insertions, 654 deletions
@@ -1,3 +1,179 @@ +2021-10-03 Jim Meyering <meyering@fb.com> + + version 1.16.5 + + * configure.ac (AC_INIT): Bump version number to 1.16.5. + * m4/amversion.m4: Likewise (auto-updated by "make bootstrap"). + * NEWS: Record release version. + +2021-10-03 Jim Meyering <meyering@fb.com> + + maint: don't use obsolescent "egrep" + + * maintainer/syntax-checks.mk (sc_perl_local): Use grep -E + in place of "egrep". + +2021-10-03 Jim Meyering <meyering@fb.com> + + maint: remove trailing white space from a few files + + * NEWS: Remove trailing white space. + * NEWS-2.0: Likewise. + * contrib/checklinkx: Likewise. + * doc/local.mk (chlx_args): Likewise. + * m4/python.m4: Likewise. + * t/test-extensions-empty.sh: Likewise. + +2021-09-28 Karl Berry <karl@freefriends.org> + + doc: show "RUNNING: <testname>" example using [AM_]TESTS_ENVIRONMENT. + + This change addresses https://bugs.gnu.org/49309. + + * doc/automake.texi (Testsuite Environment Overrides): new + subsubsection, separating out [AM_]TESTS_ENVIRONMENT description. + Add example to get "RUNNING: <testname>" when a test starts. + +2021-09-28 Karl Berry <karl@freefriends.org> + + doc: tweak Yacc/Lex text; subnode for the yacc linking hack. + + * doc/automake.texi (Alternative): remove obsolete footnote. + (Yacc and Lex): tweak wording, more consistent capitalization. + (Linking Multiple Yacc Parsers): new subsection. + + Also add @shortcontents. + Also update texinfo-master-menu (for the first time in ages). + +2021-09-26 Karl Berry <karl@freefriends.org> + + maint: Update files from upstream with 'make fetch'. + + * lib/config.sub: Update. + +2021-09-19 Jim Meyering <meyering@fb.com> + + maint: Post-release administrivia + + * configure.ac (AC_INIT): Bump version number to 1.16h. + * m4/amversion.m4: Likewise (auto-updated by "make bootstrap"). + +2021-09-19 Jim Meyering <meyering@fb.com> + + maint: adjust version for snapshot + + * configure.ac (AC_INIT): Bump version number to 1.16g for snapshot. + * m4/amversion.m4: Likewise (auto-updated by "make bootstrap"). + +2021-09-19 Karl Berry <karl@freefriends.org> + + python: only use Python's sys.* values if the new option + + --with-python-sys-prefix is specified; otherwise, return to + previous behavior of using the GNU ${prefix} and ${exec_prefix}. + + * doc/automake.texi (Python): document the new behavior. + * m4/python.m4 (AM_PATH_PYTHON): conditionalize use of Python's + sys.* values on the new option --with-python-sys-prefix. + * t/python-prefix.sh: doc update. + * t/python-vars.sh: test both GNU and Python prefix values. + * NEWS: mention this. + +2021-09-18 Karl Berry <karl@freefriends.org> + + doc: update NEWS for yyerror const arg; update THANKS. + + * THANKS: update with missed recent committer. + * NEWS: mention yyerror decl in our tests now uses const. + +2021-09-11 Akim Demaille <akim@lrde.epita.fr> + + tests: let yacc's yyerror take its argument as a const string + + Some of yacc error messages are const strings; it makes no sense for + yyerror to take a 'char *', it should be a 'const char *' as POSIX now + requires. + + Fixes all the failures reported by Kiyoshi Kanazawa. + <https://lists.gnu.org/r/bug-bison/2021-09/msg00005.html> + See bug#50469 <https://debbugs.gnu.org/50469>. + + * t/cond35.sh, t/silent-many-languages.sh, t/silent-yacc-headers.sh, + * t/silent-yacc.sh, t/subpkg-yacc.sh, t/suffix10.tap, t/yacc-basic.sh, + * t/yacc-clean.sh, t/yacc-d-basic.sh, t/yacc-d-vpath.sh, + * t/yacc-deleted-headers.sh, t/yacc-depend.sh, t/yacc-depend2.sh, + * t/yacc-dist-nobuild-subdir.sh, t/yacc-dist-nobuild.sh, t/yacc-dry.sh, + * t/yacc-line.sh, t/yacc-misc.sh, t/yacc-mix-c-cxx.sh, t/yacc-nodist.sh, + * t/yacc-pr204.sh, t/yacc-subdir.sh, t/yacc-vpath.sh, + * t/yflags-cmdline-override.sh, t/yflags-force-override.sh + (yyerror): From 'char *' to 'const char *'. + Enforce consistency: prefer '{}' to '{ return; }'. + +2021-09-10 Jan Engelhardt <jengelh@inai.de> + + automake: consistently depend on install-libLTLIBRARIES. + + Report and patch: + https://lists.gnu.org/archive/html/automake/2021-08/msg00016.html + + * bin/automake.in (generate_makefile): depend on + install-libLTLIBRARIES for all PROGRAMS and LTLIBRARIES, + such as install-pkglibLTLIBRARIES. + * NEWS: mention this. + +2021-08-17 Nick Bowler <nbowler@draconx.ca> + + automake: fatal error on second AM_INIT_AUTOMAKE. + + This change addresses https://bugs.gnu.org/50046. + Patch posted: + https://lists.gnu.org/archive/html/automake-patches/2021-08/msg00000.html + + * m4/init.m4: Make attempts to expand AM_INIT_AUTOMAKE more than + once a fatal error at m4 time. + +2021-08-08 Karl Berry <karl@freefriends.org> + + maint: Update doc/help2man. + + * doc/help2man: update to 1.48.24 + +2021-08-07 Karl Berry <karl@freefriends.org> + + maint: Update doc/help2man. + + * doc/help2man: update to 1.48.2. + +2021-08-07 Dimitri Papadopoulos <dimitri.papadopoulos@gmail.com> + + doc: typos from codespell. + + * HACKING: typo from codespell. + * doc/local.mk: likewise. + * lib/am/header-vars.am: likewise. + * lib/am/lisp.am: likewise. + * t/cond24.sh: likewise. + * t/cond36.sh: likewise. + * t/dist-auxdir-many-subdirs.sh: likewise. + * t/link_override.sh: likewise. + * t/parallel-tests-console-output.sh: likewise. + * t/subobj11a.sh: likewise. + * t/subobj11b.sh: likewise. + +2021-07-26 Karl Berry <karl@freefriends.org> + + cosmetics: py-compile consistently use test, not [ ... ]; indentation. + + * lib/py-compile: consistently use test rather than [ ... ]; + use consistent sh indentation; check exit status consistently. + +2021-07-26 Jim Meyering <meyering@fb.com> + + maint: Post-release administrivia + + * configure.ac (AC_INIT): Bump version number to 1.16f. + * m4/amversion.m4: Likewise (auto-updated by "make bootstrap"). + 2021-07-25 Jim Meyering <meyering@fb.com> version 1.16.4 @@ -259,7 +259,7 @@ Here goes a more detailed explanation of why the commit is needed, and a general overview of what it does, and how. This section - should almost always be provided, possibly only with the expection + should almost always be provided, possibly only with the exception of obvious fixes or very trivial changes. And if the detailed explanation is quite long or detailed, you can @@ -415,7 +415,7 @@ * To add tags "help" and "confirmed" to bug 12345, mail to control@debbugs.gnu.org with a one-line body: - tags 35322 + help confirmed + tags 12345 + help confirmed * In general, all bug operations are done by mail. Reference information: https://debbugs.gnu.org/server-control.html # dev info diff --git a/Makefile.in b/Makefile.in index bbe2d048f..18850e72a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.16.4 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. @@ -713,7 +713,7 @@ chlx_args = -v --sleep 8 #--exclude-url-file=/tmp/xf # - mailto urls, they are always forbidden. # - vala, redirects to a Gnome subpage and returns 403 to us. # - cfortran, forbidden by site's robots.txt. -# - search.cpan.org, gets +# - search.cpan.org, gets # - debbugs.gnu.org/automake, forbidden by robots.txt. # - autoconf.html, forbidden by robots.txt (since served from savannah). # - https://fsf.org redirects to https://www.fsf.org and nothing to do @@ -3750,7 +3750,7 @@ checklinkx: $(srcdir)/doc/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac $(AM_V_GEN)tmp=amhello-output.tmp \ && $(am__cd) $(srcdir)/doc/amhello \ - && : Make our aclocal and automake avaiable before system ones. \ + && : Make our aclocal and automake available before system ones. \ && $(setup_autotools_paths) \ && ( \ { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \ @@ -3,7 +3,20 @@ please see NEWS-2.0 and start following the advice there now. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -New in ?.?.?: +New in 1.16.5: + +* Bugs fixed + + - PYTHON_PREFIX and PYTHON_EXEC_PREFIX are now set according to + Python's sys.* values only if the new configure option + --with-python-sys-prefix is specified. Otherwise, GNU default values + are used, as in the past. (The change in 1.16.3 was too incompatible.) + + - consistently depend on install-libLTLIBRARIES. + +* Distribution + + - use const for yyerror declaration in bison/yacc tests. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -62,8 +62,8 @@ warranted. For more info, see the ./PLANS/ directory. certainty about this though: we'd first like to wait and see whether future Autoconf versions will be enhanced to guarantee that such a shell is always found and provided by the checks in - ./configure. - + ./configure. + In 2020, config.guess was changed by its then-maintainer to require $(...); the ensuing bug reports and maintenance hassle (unfortunately the changes have not been reverted) are a convincing @@ -105,6 +105,7 @@ Dieter Baron dillo@stieltjes.smc.univie.ac.at Dieter Jurzitza DJurzitza@harmanbecker.com Дилян Палаузов dilyan.palauzov@aegee.org Dirk Mueller josef.moellers@suse.com +Dimitri Papadopoulos dimitri.papadopoulos@gmail.com Dmitry Mikhin dmitrym@acres.com.au Dmitry V. Levin ldv@altlinux.org Doug Evans devans@cygnus.com diff --git a/aclocal.m4 b/aclocal.m4 index 9fdd1aa0d..82bcbe1e2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.16.4 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.4], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.4])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -171,6 +171,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl diff --git a/bin/automake.in b/bin/automake.in index f04f5d5f5..30babd607 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -8042,13 +8042,26 @@ sub generate_makefile handle_all ($makefile); # FIXME: Gross! - if (var ('lib_LTLIBRARIES') && var ('bin_PROGRAMS')) + my $have_lt1 = !!var("lib_LTLIBRARIES"); + my $have_lt2 = !!var("nobase_lib_LTLIBRARIES"); + for my $var (variables("PROGRAMS"), variables("LTLIBRARIES")) { - $output_rules .= "install-binPROGRAMS: install-libLTLIBRARIES\n\n"; - } - if (var ('nobase_lib_LTLIBRARIES') && var ('bin_PROGRAMS')) - { - $output_rules .= "install-binPROGRAMS: install-nobase_libLTLIBRARIES\n\n"; + if ($var->name eq "lib_LTLIBRARIES" + || $var->name eq "nobase_lib_LTLIBRARIES" + || substr($var->name, 0, 7) eq "noinst_") + { + next; + } + my $shortname = $var->name; + $shortname =~ tr{_}{}d; + if ($have_lt1) + { + $output_rules .= "install-$shortname: install-libLTLIBRARIES\n\n"; + } + if ($have_lt2) + { + $output_rules .= "install-$shortname: install-nobase_libLTLIBRARIES\n\n"; + } } handle_install; @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for GNU Automake 1.16.4. +# Generated by GNU Autoconf 2.71 for GNU Automake 1.16.5. # # Report bugs to <bug-automake@gnu.org>. # @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU Automake' PACKAGE_TARNAME='automake' -PACKAGE_VERSION='1.16.4' -PACKAGE_STRING='GNU Automake 1.16.4' +PACKAGE_VERSION='1.16.5' +PACKAGE_STRING='GNU Automake 1.16.5' PACKAGE_BUGREPORT='bug-automake@gnu.org' PACKAGE_URL='https://www.gnu.org/software/automake/' @@ -1333,7 +1333,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Automake 1.16.4 to adapt to many kinds of systems. +\`configure' configures GNU Automake 1.16.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1404,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Automake 1.16.4:";; + short | recursive ) echo "Configuration of GNU Automake 1.16.5:";; esac cat <<\_ACEOF @@ -1513,7 +1513,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Automake configure 1.16.4 +GNU Automake configure 1.16.5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1706,7 +1706,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Automake $as_me 1.16.4, which was +It was created by GNU Automake $as_me 1.16.5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3279,7 +3279,7 @@ fi # Define the identity of the package. PACKAGE='automake' - VERSION='1.16.4' + VERSION='1.16.5' # Some tools Automake needs. @@ -8125,7 +8125,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Automake $as_me 1.16.4, which was +This file was extended by GNU Automake $as_me 1.16.5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8186,7 +8186,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -GNU Automake config.status 1.16.4 +GNU Automake config.status 1.16.5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index f7656ffea..2b878c28b 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. AC_PREREQ([2.69]) -AC_INIT([GNU Automake], [1.16.4], [bug-automake@gnu.org]) +AC_INIT([GNU Automake], [1.16.5], [bug-automake@gnu.org]) AC_CONFIG_SRCDIR([bin/automake.in]) AC_CONFIG_AUX_DIR([lib]) diff --git a/contrib/checklinkx b/contrib/checklinkx index 1c0a135c1..2e81bb17f 100755 --- a/contrib/checklinkx +++ b/contrib/checklinkx @@ -870,14 +870,14 @@ sub parse_arguments () # was that string all along. $Opts{Exclude} = $exclude_rx; } - + if ($Opts{Exclude_Url_File}) { # The idea is that if the specified file exists, we read it and # treat it as a list of excludes. If the file doesn't exist, we # write it with all the urls that were successful. That way, we # can avoid re-checking them on every run, and it can be removed # externally (from cron) to get re-updated. - # + # # We distinguish the cases here, and either add to # $Opts{Exclude} if reading, or setting Exclude_File_Write in # %Opts if writing (even though it is not really an option, diff --git a/doc/amhello-1.0.tar.gz b/doc/amhello-1.0.tar.gz Binary files differindex 3f7b52195..cd40d02ad 100644 --- a/doc/amhello-1.0.tar.gz +++ b/doc/amhello-1.0.tar.gz diff --git a/doc/automake.info b/doc/automake.info index 4132a33c7..c285e76b7 100644 --- a/doc/automake.info +++ b/doc/automake.info @@ -1,7 +1,7 @@ This is automake.info, produced by makeinfo version 6.8 from automake.texi. -This manual is for GNU Automake (version 1.16.4, 16 July 2021), a +This manual is for GNU Automake (version 1.16.5, 1 October 2021), a program that creates GNU standards-compliant Makefiles from template files. @@ -27,215 +27,215 @@ END-INFO-DIR-ENTRY Indirect: -automake.info-1: 1081 -automake.info-2: 301558 +automake.info-1: 1083 +automake.info-2: 301994 Tag Table: (Indirect) -Node: Top1081 -Node: Introduction14332 -Ref: Introduction-Footnote-115741 -Node: Autotools Introduction15900 -Node: GNU Build System17282 -Node: Use Cases20030 -Node: Basic Installation22158 -Node: Standard Targets25744 -Node: Standard Directory Variables27347 -Node: Standard Configuration Variables29204 -Node: config.site30563 -Node: VPATH Builds31989 -Node: Two-Part Install36047 -Node: Cross-Compilation38491 -Node: Renaming41457 -Node: DESTDIR42615 -Node: Preparing Distributions44797 -Node: Dependency Tracking47167 -Node: Nested Packages49275 -Node: Why Autotools50791 -Node: Hello World52433 -Ref: amhello Explained52855 -Node: Creating amhello53027 -Node: amhello's configure.ac Setup Explained58382 -Node: amhello's Makefile.am Setup Explained63303 -Node: Generalities67003 -Node: General Operation67697 -Node: Strictness71121 -Ref: Gnits71255 -Node: Uniform75155 -Node: Length Limitations80052 -Node: Canonicalization82363 -Node: User Variables83435 -Node: Auxiliary Programs84925 -Node: Examples88862 -Node: Complete89732 -Node: true91837 -Node: automake Invocation94328 -Ref: Invoking automake94483 -Node: configure103098 -Node: Requirements104027 -Node: Optional109265 -Node: aclocal Invocation119008 -Ref: Invoking aclocal119169 -Node: aclocal Options122207 -Node: Macro Search Path125917 -Ref: ACLOCAL_PATH130291 -Node: Extending aclocal131861 -Node: Local Macros135560 -Node: Serials139543 -Node: Future of aclocal144763 -Node: Macros147113 -Node: Public Macros147654 -Ref: Modernize AM_INIT_AUTOMAKE invocation149277 -Node: Obsolete Macros153759 -Node: Private Macros155101 -Node: Directories156551 -Node: Subdirectories158146 -Node: Conditional Subdirectories161538 -Node: SUBDIRS vs DIST_SUBDIRS163219 -Node: Subdirectories with AM_CONDITIONAL164857 -Node: Subdirectories with AC_SUBST166051 -Node: Unconfigured Subdirectories166878 -Node: Alternative170336 -Ref: Alternative-Footnote-1172488 -Node: Subpackages172613 -Node: Programs175968 -Node: A Program177510 -Node: Program Sources178233 -Node: Linking180138 -Node: Conditional Sources183782 -Node: Conditional Programs186710 -Node: A Library188600 -Node: A Shared Library191277 -Node: Libtool Concept192281 -Node: Libtool Libraries194371 -Node: Conditional Libtool Libraries196105 -Node: Conditional Libtool Sources198562 -Node: Libtool Convenience Libraries199949 -Node: Libtool Modules203376 -Node: Libtool Flags204692 -Node: LTLIBOBJS206603 -Node: Libtool Issues207238 -Node: Error required file ltmain.sh not found207579 -Node: Objects created both with libtool and without208800 -Node: Program and Library Variables210716 -Node: Default _SOURCES222876 -Node: LIBOBJS225353 -Node: Program Variables230580 -Node: Yacc and Lex234125 -Ref: Yacc and Lex-Footnote-1239753 -Node: C++ Support240016 -Node: Objective C Support240878 -Node: Objective C++ Support241834 -Node: Unified Parallel C Support242839 -Node: Assembly Support243817 -Node: Fortran 77 Support244989 -Ref: Fortran 77 Support-Footnote-1246656 -Node: Preprocessing Fortran 77246859 -Node: Compiling Fortran 77 Files247463 -Node: Mixing Fortran 77 With C and C++248075 -Ref: Mixing Fortran 77 With C and C++-Footnote-1250398 -Node: How the Linker is Chosen250706 -Node: Fortran 9x Support252245 -Node: Compiling Fortran 9x Files253273 -Node: Java Support with gcj253909 -Node: Vala Support255390 -Node: Support for Other Languages257663 -Node: Dependencies258371 -Node: EXEEXT260258 -Node: Other Objects262498 -Node: Scripts263080 -Node: Headers265939 -Node: Data267734 -Node: Sources268419 -Node: Built Sources Example271424 -Node: Other GNU Tools278596 -Node: Emacs Lisp279125 -Node: gettext281222 -Node: Libtool281910 -Node: Java282169 -Node: Python284828 -Node: Documentation289863 -Node: Texinfo290167 -Node: Man Pages297352 -Node: Install301558 -Node: Basics of Installation302253 -Node: The Two Parts of Install303783 -Node: Extending Installation305323 -Node: Staged Installs306087 -Node: Install Rules for the User307500 -Node: Clean308058 -Node: Dist310230 -Node: Basics of Distribution310734 -Node: Fine-grained Distribution Control314907 -Node: The dist Hook315834 -Node: Checking the Distribution318364 -Node: The Types of Distributions325671 -Node: Tests328824 -Node: Generalities about Testing330020 -Node: Simple Tests332960 -Node: Scripts-based Testsuites333341 -Ref: Testsuite progress on console335714 -Ref: Simple tests and color-tests337807 -Node: Serial Test Harness341830 -Node: Parallel Test Harness343920 -Ref: Basics of test metadata344426 -Node: Custom Test Drivers353519 -Node: Overview of Custom Test Drivers Support353810 -Node: Declaring Custom Test Drivers356862 -Node: API for Custom Test Drivers358284 -Node: Command-line arguments for test drivers359056 -Node: Log files generation and test results recording361770 -Node: Testsuite progress output365985 -Node: Using the TAP test protocol367407 -Node: Introduction to TAP367769 -Node: Use TAP with the Automake test harness369553 -Node: Incompatibilities with other TAP parsers and drivers374976 -Node: Links and external resources on TAP376377 -Node: DejaGnu Tests377969 -Node: Install Tests380097 -Node: Rebuilding380407 -Node: Options384501 -Node: Options generalities384802 -Node: List of Automake options386583 -Ref: tar-formats393990 -Node: Miscellaneous397503 -Node: Tags397848 -Node: Suffixes401044 -Node: Include402676 -Node: Conditionals404411 -Node: Usage of Conditionals405269 -Node: Limits of Conditionals408627 -Node: Silencing Make409812 -Node: Make verbosity410168 -Ref: Make verbosity-Footnote-1411490 -Node: Tricks For Silencing Make411564 -Node: Automake Silent Rules414071 -Node: Not Enough421049 -Node: Extending421505 -Node: Third-Party Makefiles426539 -Node: Distributing433598 -Node: API Versioning434247 -Node: Upgrading436952 -Node: FAQ438997 -Node: CVS440121 -Node: maintainer-mode448557 -Node: Wildcards452732 -Node: Limitations on File Names456170 -Node: Errors with distclean458800 -Node: Flag Variables Ordering463742 -Node: Renamed Objects471751 -Node: Per-Object Flags473346 -Node: Multiple Outputs476356 -Node: Hard-Coded Install Paths488700 -Node: Debugging Make Rules493844 -Ref: Debugging Make Rules-Footnote-1495990 -Node: Reporting Bugs496168 -Node: Copying This Manual497806 -Node: GNU Free Documentation License498036 -Node: Indices523340 -Node: Macro Index523629 -Node: Variable Index529479 -Node: General Index562289 +Node: Top1083 +Node: Introduction14520 +Ref: Introduction-Footnote-115929 +Node: Autotools Introduction16088 +Node: GNU Build System17470 +Node: Use Cases20218 +Node: Basic Installation22346 +Node: Standard Targets25932 +Node: Standard Directory Variables27535 +Node: Standard Configuration Variables29392 +Node: config.site30751 +Node: VPATH Builds32177 +Node: Two-Part Install36235 +Node: Cross-Compilation38679 +Node: Renaming41645 +Node: DESTDIR42803 +Node: Preparing Distributions44985 +Node: Dependency Tracking47355 +Node: Nested Packages49463 +Node: Why Autotools50979 +Node: Hello World52621 +Ref: amhello Explained53043 +Node: Creating amhello53215 +Node: amhello's configure.ac Setup Explained58570 +Node: amhello's Makefile.am Setup Explained63491 +Node: Generalities67191 +Node: General Operation67885 +Node: Strictness71309 +Ref: Gnits71443 +Node: Uniform75343 +Node: Length Limitations80240 +Node: Canonicalization82551 +Node: User Variables83623 +Node: Auxiliary Programs85113 +Node: Examples89050 +Node: Complete89920 +Node: true92025 +Node: automake Invocation94516 +Ref: Invoking automake94671 +Node: configure103286 +Node: Requirements104215 +Node: Optional109453 +Node: aclocal Invocation119196 +Ref: Invoking aclocal119357 +Node: aclocal Options122395 +Node: Macro Search Path126105 +Ref: ACLOCAL_PATH130479 +Node: Extending aclocal132049 +Node: Local Macros135748 +Node: Serials139731 +Node: Future of aclocal144951 +Node: Macros147301 +Node: Public Macros147842 +Ref: Modernize AM_INIT_AUTOMAKE invocation149465 +Node: Obsolete Macros153947 +Node: Private Macros155289 +Node: Directories156739 +Node: Subdirectories158334 +Node: Conditional Subdirectories161726 +Node: SUBDIRS vs DIST_SUBDIRS163407 +Node: Subdirectories with AM_CONDITIONAL165045 +Node: Subdirectories with AC_SUBST166239 +Node: Unconfigured Subdirectories167066 +Node: Alternative170524 +Node: Subpackages172711 +Node: Programs176066 +Node: A Program177608 +Node: Program Sources178331 +Node: Linking180236 +Node: Conditional Sources183880 +Node: Conditional Programs186808 +Node: A Library188698 +Node: A Shared Library191375 +Node: Libtool Concept192379 +Node: Libtool Libraries194469 +Node: Conditional Libtool Libraries196203 +Node: Conditional Libtool Sources198660 +Node: Libtool Convenience Libraries200047 +Node: Libtool Modules203474 +Node: Libtool Flags204790 +Node: LTLIBOBJS206701 +Node: Libtool Issues207336 +Node: Error required file ltmain.sh not found207677 +Node: Objects created both with libtool and without208898 +Node: Program and Library Variables210814 +Node: Default _SOURCES222974 +Node: LIBOBJS225451 +Node: Program Variables230678 +Node: Yacc and Lex234223 +Node: Linking Multiple Yacc Parsers238439 +Node: C++ Support240252 +Node: Objective C Support241114 +Node: Objective C++ Support242070 +Node: Unified Parallel C Support243075 +Node: Assembly Support244053 +Node: Fortran 77 Support245225 +Ref: Fortran 77 Support-Footnote-1246892 +Node: Preprocessing Fortran 77247095 +Node: Compiling Fortran 77 Files247699 +Node: Mixing Fortran 77 With C and C++248311 +Ref: Mixing Fortran 77 With C and C++-Footnote-1250634 +Node: How the Linker is Chosen250942 +Node: Fortran 9x Support252481 +Node: Compiling Fortran 9x Files253509 +Node: Java Support with gcj254145 +Node: Vala Support255626 +Node: Support for Other Languages257899 +Node: Dependencies258607 +Node: EXEEXT260494 +Node: Other Objects262734 +Node: Scripts263316 +Node: Headers266175 +Node: Data267970 +Node: Sources268655 +Node: Built Sources Example271660 +Node: Other GNU Tools278832 +Node: Emacs Lisp279361 +Node: gettext281458 +Node: Libtool282146 +Node: Java282405 +Node: Python285064 +Node: Documentation290297 +Node: Texinfo290601 +Node: Man Pages297786 +Node: Install301994 +Node: Basics of Installation302689 +Node: The Two Parts of Install304219 +Node: Extending Installation305759 +Node: Staged Installs306523 +Node: Install Rules for the User307936 +Node: Clean308494 +Node: Dist310666 +Node: Basics of Distribution311170 +Node: Fine-grained Distribution Control315343 +Node: The dist Hook316270 +Node: Checking the Distribution318800 +Node: The Types of Distributions326107 +Node: Tests329260 +Node: Generalities about Testing330456 +Node: Simple Tests333396 +Node: Scripts-based Testsuites333777 +Ref: Testsuite progress on console336150 +Ref: Simple tests and color-tests338243 +Node: Testsuite Environment Overrides340365 +Node: Serial Test Harness342964 +Node: Parallel Test Harness345054 +Ref: Basics of test metadata345560 +Node: Custom Test Drivers354653 +Node: Overview of Custom Test Drivers Support354944 +Node: Declaring Custom Test Drivers357996 +Node: API for Custom Test Drivers359418 +Node: Command-line arguments for test drivers360190 +Node: Log files generation and test results recording362904 +Node: Testsuite progress output367119 +Node: Using the TAP test protocol368541 +Node: Introduction to TAP368903 +Node: Use TAP with the Automake test harness370687 +Node: Incompatibilities with other TAP parsers and drivers376110 +Node: Links and external resources on TAP377511 +Node: DejaGnu Tests379103 +Node: Install Tests381231 +Node: Rebuilding381541 +Node: Options385635 +Node: Options generalities385936 +Node: List of Automake options387717 +Ref: tar-formats395124 +Node: Miscellaneous398637 +Node: Tags398982 +Node: Suffixes402178 +Node: Include403810 +Node: Conditionals405545 +Node: Usage of Conditionals406403 +Node: Limits of Conditionals409761 +Node: Silencing Make410946 +Node: Make verbosity411302 +Ref: Make verbosity-Footnote-1412624 +Node: Tricks For Silencing Make412698 +Node: Automake Silent Rules415205 +Node: Not Enough422183 +Node: Extending422639 +Node: Third-Party Makefiles427673 +Node: Distributing434732 +Node: API Versioning435381 +Node: Upgrading438086 +Node: FAQ440131 +Node: CVS441255 +Node: maintainer-mode449691 +Node: Wildcards453866 +Node: Limitations on File Names457304 +Node: Errors with distclean459934 +Node: Flag Variables Ordering464876 +Node: Renamed Objects472885 +Node: Per-Object Flags474480 +Node: Multiple Outputs477490 +Node: Hard-Coded Install Paths489834 +Node: Debugging Make Rules494978 +Ref: Debugging Make Rules-Footnote-1497124 +Node: Reporting Bugs497302 +Node: Copying This Manual498940 +Node: GNU Free Documentation License499170 +Node: Indices524474 +Node: Macro Index524763 +Node: Variable Index530613 +Node: General Index563584 End Tag Table diff --git a/doc/automake.info-1 b/doc/automake.info-1 index 5771278bf..57b58dbbc 100644 --- a/doc/automake.info-1 +++ b/doc/automake.info-1 @@ -1,7 +1,7 @@ This is automake.info, produced by makeinfo version 6.8 from automake.texi. -This manual is for GNU Automake (version 1.16.4, 16 July 2021), a +This manual is for GNU Automake (version 1.16.5, 1 October 2021), a program that creates GNU standards-compliant Makefiles from template files. @@ -31,7 +31,7 @@ File: automake.info, Node: Top, Next: Introduction, Up: (dir) GNU Automake ************ -This manual is for GNU Automake (version 1.16.4, 16 July 2021), a +This manual is for GNU Automake (version 1.16.5, 1 October 2021), a program that creates GNU standards-compliant Makefiles from template files. @@ -140,6 +140,7 @@ Auto-generating aclocal.m4 Autoconf macros supplied with Automake * Public Macros:: Macros that you can use. +* Obsolete Macros:: Macros that will soon be removed. * Private Macros:: Macros that you should not use. Directories @@ -204,6 +205,10 @@ Common Issues Related to Libtool’s Use * Error required file ltmain.sh not found:: The need to run libtoolize * Objects created both with libtool and without:: Avoid a specific build race +Yacc and Lex support + +* Linking Multiple Yacc Parsers:: + Fortran 77 Support * Preprocessing Fortran 77:: Preprocessing Fortran 77 sources @@ -260,7 +265,7 @@ What Goes in a Distribution Support for test suites -* Generalities about Testing:: Generic concepts and terminology about testing +* Generalities about Testing:: Concepts and terminology about testing * Simple Tests:: Listing test scripts in ‘TESTS’ * Custom Test Drivers:: Writing and using custom test drivers * Using the TAP test protocol:: Integrating test scripts that use the TAP protocol @@ -273,12 +278,9 @@ Simple Tests * Serial Test Harness:: Older (and discouraged) serial test harness * Parallel Test Harness:: Generic concurrent test harness -Using the TAP test protocol +Scripts-based Testsuites -* Introduction to TAP:: -* Use TAP with the Automake test harness:: -* Incompatibilities with other TAP parsers and drivers:: -* Links and external resources on TAP:: +* Testsuite Environment Overrides:: Custom Test Drivers @@ -292,6 +294,13 @@ API for Custom Test Drivers * Log files generation and test results recording:: * Testsuite progress output:: +Using the TAP test protocol + +* Introduction to TAP:: +* Use TAP with the Automake test harness:: +* Incompatibilities with other TAP parsers and drivers:: +* Links and external resources on TAP:: + Changing Automake’s Behavior * Options generalities:: Semantics of Automake option @@ -307,7 +316,7 @@ Conditionals * Usage of Conditionals:: Declaring conditional content * Limits of Conditionals:: Enclosing complete statements -Silencing Make +Silencing ‘make’ * Make verbosity:: Make is verbose by default * Tricks For Silencing Make:: Standard and generic ways to silence make @@ -3844,9 +3853,9 @@ will probably come as unwelcome advice. For those who haven’t read the paper, Miller’s main thesis is that recursive ‘make’ invocations are both slow and error-prone. - Automake provides sufficient cross-directory support (1) to enable -you to write a single ‘Makefile.am’ for a complex multi-directory -package. + Automake is intended to have sufficient cross-directory support to +enable you to write a single ‘Makefile.am’ for a complex multi-directory +package. (If it seems to be lacking, please report the issue as usual.) By default an installable file specified in a subdirectory will have its directory name stripped before installation. For instance, in this @@ -3883,11 +3892,6 @@ without changing the layout of the source tree. rule, in that there is no particular installation order guarantee for an otherwise equivalent set of variables without ‘nobase_’ prefix. - ---------- Footnotes ---------- - - (1) We believe. This work is new and there are probably warts. -*Note Introduction::, for information on reporting bugs. - File: automake.info, Node: Subpackages, Prev: Alternative, Up: Directories @@ -5279,21 +5283,21 @@ File: automake.info, Node: Yacc and Lex, Next: C++ Support, Prev: Program Var Automake has somewhat idiosyncratic support for Yacc and Lex. - Automake assumes that the ‘.c’ file generated by ‘yacc’ (or ‘lex’) + Automake assumes that the ‘.c’ file generated by ‘yacc’ or ‘lex’ should be named using the basename of the input file. That is, for a -yacc source file ‘foo.y’, Automake will cause the intermediate file to +Yacc source file ‘foo.y’, Automake will cause the intermediate file to be named ‘foo.c’ (as opposed to ‘y.tab.c’, which is more traditional). - The extension of a yacc source file is used to determine the -extension of the resulting C or C++ source and header files. Note that -header files are generated only when the ‘-d’ Yacc option is used; see -below for more information about this flag, and how to specify it. -Files with the extension ‘.y’ will thus be turned into ‘.c’ sources and -‘.h’ headers; likewise, ‘.yy’ will become ‘.cc’ and ‘.hh’, ‘.y++’ will -become ‘c++’ and ‘h++’, ‘.yxx’ will become ‘.cxx’ and ‘.hxx’, and ‘.ypp’ -will become ‘.cpp’ and ‘.hpp’. + The extension of a Yacc source file is used to determine the +extension of the resulting C or C++ source and header files. Be aware +that header files are generated only when the option ‘-d’ is given to +Yacc; see below for more information about this flag, and how to specify +it. Files with the extension ‘.y’ will thus be turned into ‘.c’ sources +and ‘.h’ headers; likewise, ‘.yy’ will become ‘.cc’ and ‘.hh’, ‘.y++’ +will become ‘c++’ and ‘h++’, ‘.yxx’ will become ‘.cxx’ and ‘.hxx’, and +‘.ypp’ will become ‘.cpp’ and ‘.hpp’. - Similarly, lex source files can be used to generate C or C++; the + Similarly, Lex source files can be used to generate C or C++; the extensions ‘.l’, ‘.ll’, ‘.l++’, ‘.lxx’, and ‘.lpp’ are recognized. You should never explicitly mention the intermediate (C or C++) file @@ -5303,7 +5307,7 @@ in any ‘SOURCES’ variable; only list the source file. included in any distribution that is made. That way the user doesn’t need to have ‘yacc’ or ‘lex’. - If a ‘yacc’ source file is seen, then your ‘configure.ac’ must define + If a Yacc source file is seen, then your ‘configure.ac’ must define the variable ‘YACC’. This is most easily done by invoking the macro ‘AC_PROG_YACC’ (*note Particular Program Checks: (autoconf)Particular Programs.). @@ -5314,19 +5318,24 @@ latter is a user variable and the former is intended for the ‘AM_YFLAGS’ is usually used to pass the ‘-d’ option to ‘yacc’. Automake knows what this means and will automatically adjust its rules -to update and distribute the header file built by ‘yacc -d’(1). What -Automake cannot guess, though, is where this header will be used: it is -up to you to ensure the header gets built before it is first used. -Typically this is necessary in order for dependency tracking to work -when the header is included by another file. The common solution is -listing the header file in ‘BUILT_SOURCES’ (*note Sources::) as follows. +to update and distribute the header file built by ‘yacc -d’. Caveat: +‘automake’ recognizes ‘-d’ in ‘AM_YFLAGS’ only if it is not clustered +with other options; for example, it won’t be recognized if ‘AM_YFLAGS’ +is ‘-dt’, but it will be if ‘AM_YFLAGS’ is ‘-d -t’ or ‘-t -d’. + + What Automake cannot guess, though, is where this header will be +used: it is up to you to ensure the header gets built before it is first +used. Typically this is necessary in order for dependency tracking to +work when the header is included by another file. The common solution +is listing the header file in ‘BUILT_SOURCES’ (*note Sources::) as +follows. BUILT_SOURCES = parser.h AM_YFLAGS = -d bin_PROGRAMS = foo foo_SOURCES = ... parser.y ... - If a ‘lex’ source file is seen, then your ‘configure.ac’ must define + If a Lex source file is seen, then your ‘configure.ac’ must define the variable ‘LEX’. You can use ‘AC_PROG_LEX’ to do this (*note Particular Program Checks: (autoconf)Particular Programs.), but using the ‘AM_PROG_LEX’ macro (*note Macros::) is recommended. @@ -5335,22 +5344,31 @@ the ‘AM_PROG_LEX’ macro (*note Macros::) is recommended. latter is a user variable and the former is intended for the ‘Makefile.am’ author. - When ‘AM_MAINTAINER_MODE’ (*note maintainer-mode::) is used, the -rebuild rule for distributed Yacc and Lex sources are only used when + When ‘AM_MAINTAINER_MODE’ (*note maintainer-mode::) is in effect, the +rebuild rules for distributed Yacc and Lex sources are only used when ‘maintainer-mode’ is enabled, or when the files have been erased. - When ‘lex’ or ‘yacc’ sources are used, ‘automake -a’ automatically + When Yacc or Lex sources are used, ‘automake -a’ automatically installs an auxiliary program called ‘ylwrap’ in your package (*note Auxiliary Programs::). This program is used by the build rules to rename the output of these tools, and makes it possible to include -multiple ‘yacc’ (or ‘lex’) source files in a single directory. (This is -necessary because yacc’s output file name is fixed, and a parallel make -could conceivably invoke more than one instance of ‘yacc’ -simultaneously.) +multiple ‘yacc’ (or ‘lex’) source files in a single directory. This is +necessary because Yacc’s output file name is fixed, and a parallel make +could invoke more than one instance of ‘yacc’ simultaneously. + +* Menu: + +* Linking Multiple Yacc Parsers:: + +8.8.1 Linking Multiple Yacc Parsers +----------------------------------- + + +File: automake.info, Node: Linking Multiple Yacc Parsers, Up: Yacc and Lex - For ‘yacc’, simply managing locking is insufficient. The output of -‘yacc’ always uses the same symbol names internally, so it isn’t -possible to link two ‘yacc’ parsers into the same executable. +For ‘yacc’, simply managing locking as with ‘ylwrap’ is insufficient. +The output of ‘yacc’ always uses the same symbol names internally, so it +isn’t possible to link two ‘yacc’ parsers into the same executable. We recommend using the following renaming hack used in ‘gdb’: #define yymaxdepth c_maxdepth @@ -5399,13 +5417,6 @@ These defines work for ‘bison’, ‘byacc’, and traditional ‘yacc’s. I you find a parser generator that uses a symbol not covered here, please report the new name so it can be added to the list. - ---------- Footnotes ---------- - - (1) Please note that ‘automake’ recognizes ‘-d’ in ‘AM_YFLAGS’ only -if it is not clustered with other options; for example, it won’t be -recognized if ‘AM_YFLAGS’ is ‘-dt’, but it will be if ‘AM_YFLAGS’ is ‘-d --t’ or ‘-t -d’. - File: automake.info, Node: C++ Support, Next: Objective C Support, Prev: Yacc and Lex, Up: Programs @@ -6622,12 +6633,17 @@ installed in ‘pythondir’ or ‘pkgpythondir’, respectively. ‘PYTHON_PREFIX’ ‘PYTHON_EXEC_PREFIX’ - The value of Python’s ‘sys.prefix’ (resp. ‘sys.exec_prefix’) - variable. Sometimes the same as the standard ‘${prefix}’ - (‘${exec_prefix}’), but differs on some platforms such as Mac OS x - (where Python is usually installed as a Framework). Can be set - explicitly with the ‘--with-python_prefix’ - (‘--with-python_exec_prefix’) ‘configure’ option. + With no special options given, these have values ‘${prefix}’ and + ‘${exec_prefix}’, respectively (unexpanded; see below). + + The ‘configure’ options ‘--with-python_prefix’ and + ‘--with-python_exec_prefix’ set them to an explicit value. + + The ‘configure’ option ‘--with-python-sys-prefix’ set them to the + values of Python’s ‘sys.prefix’ and ‘sys.exec_prefix’ variables. + These often differ from ‘${prefix}’ and ‘${exec_prefix}’, e.g., on + platforms such as Mac OS x (where Python is usually installed as a + Framework). ‘PYTHON_PLATFORM’ The canonical name used by Python to describe the operating system, diff --git a/doc/automake.info-2 b/doc/automake.info-2 index 332bd6783..c195529a4 100644 --- a/doc/automake.info-2 +++ b/doc/automake.info-2 @@ -1,7 +1,7 @@ This is automake.info, produced by makeinfo version 6.8 from automake.texi. -This manual is for GNU Automake (version 1.16.4, 16 July 2021), a +This manual is for GNU Automake (version 1.16.5, 1 October 2021), a program that creates GNU standards-compliant Makefiles from template files. @@ -814,12 +814,38 @@ directory (*note Build Directories: (autoconf)Build Directories.), and in particular for the ‘distcheck’ rule (*note Checking the Distribution::). - The ‘AM_TESTS_ENVIRONMENT’ and ‘TESTS_ENVIRONMENT’ variables can be -used to run initialization code and set environment variables for the -test scripts. The former variable is developer-reserved, and can be -defined in the ‘Makefile.am’, while the latter is reserved for the user, -which can employ it to extend or override the settings in the former; -for this to work portably, however, the contents of a non-empty + Automake ensures that each file listed in ‘TESTS’ is built before it +is run; you can list both source and derived programs (or scripts) in +‘TESTS’; the generated rule will look both in ‘srcdir’ and ‘‘..’’. For +instance, you might want to run a C program as a test. To do this you +would list its name in ‘TESTS’ and also in ‘check_PROGRAMS’, and then +specify it as you would any other program. + + Programs listed in ‘check_PROGRAMS’ (and ‘check_LIBRARIES’, +‘check_LTLIBRARIES’, ...) are only built during ‘make check’, not +during ‘make all’. You should list there any program needed by your +tests that does not need to be built by ‘make all’. The programs in +‘check_PROGRAMS’ are _not_ automatically added to ‘TESTS’ because +‘check_PROGRAMS’ usually lists programs used by the tests, not the tests +themselves. If all your programs are in fact test cases, you can set +‘TESTS = $(check_PROGRAMS)’. + +* Menu: + +* Testsuite Environment Overrides:: + + +File: automake.info, Node: Testsuite Environment Overrides, Up: Scripts-based Testsuites + +15.2.1.1 Testsuite Environment Overrides +........................................ + +The ‘AM_TESTS_ENVIRONMENT’ and ‘TESTS_ENVIRONMENT’ variables can be used +to run initialization code and set environment variables for the test +scripts. The former variable is developer-reserved, and can be defined +in the ‘Makefile.am’, while the latter is reserved for the user, which +can employ it to extend or override the settings in the former; for this +to work portably, however, the contents of a non-empty ‘AM_TESTS_ENVIRONMENT’ _must_ be terminated by a semicolon. The ‘AM_TESTS_FD_REDIRECT’ variable can be used to define file @@ -830,7 +856,7 @@ hurdle is constituted by Korn shells, which usually set the close-on-exec flag on file descriptors opened with the ‘exec’ builtin, thus rendering an idiom like ‘AM_TESTS_ENVIRONMENT = exec 9>&2;’ ineffectual. This issue also affects some Bourne shells, such as the -HP-UX’s ‘/bin/sh’, +HP-UX’s ‘/bin/sh’. AM_TESTS_ENVIRONMENT = \ ## Some environment initializations are kept in a separate shell @@ -842,36 +868,31 @@ HP-UX’s ‘/bin/sh’, if test -d /usr/xpg4/bin; then \ PATH=/usr/xpg4/bin:$$PATH; export PATH; \ fi; + ## With this, the test scripts will be able to print diagnostic ## messages to the original standard error stream, even if the test ## driver redirects the stderr of the test scripts to a log file ## before executing them. AM_TESTS_FD_REDIRECT = 9>&2 -Note however that ‘AM_TESTS_ENVIRONMENT’ is, for historical and -implementation reasons, _not_ supported by the serial harness (*note -Serial Test Harness::). + As another example, a notice that a test is starting can be emitted +using ‘AM_TESTS_ENVIRONMENT’ (for package maintainers) or +‘TESTS_ENVIRONMENT’ by users: - Automake ensures that each file listed in ‘TESTS’ is built before it -is run; you can list both source and derived programs (or scripts) in -‘TESTS’; the generated rule will look both in ‘srcdir’ and ’‘..’’. For -instance, you might want to run a C program as a test. To do this you -would list its name in ‘TESTS’ and also in ‘check_PROGRAMS’, and then -specify it as you would any other program. + make -j12 ... TESTS_ENVIRONMENT='echo RUNNING: "$$f";' check - Programs listed in ‘check_PROGRAMS’ (and ‘check_LIBRARIES’, -‘check_LTLIBRARIES’...) are only built during ‘make check’, not during -‘make all’. You should list there any program needed by your tests that -does not need to be built by ‘make all’. Note that ‘check_PROGRAMS’ are -_not_ automatically added to ‘TESTS’ because ‘check_PROGRAMS’ usually -lists programs used by the tests, not the tests themselves. Of course -you can set ‘TESTS = $(check_PROGRAMS)’ if all your programs are test -cases. +The shell variable ‘$f’ contains the test name. (Although technically +this is not guaranteed, in practice it is extremely unlikely to ever +change.) This can be helpful to see when trying to debug test failures. + + Notwithstanding these benefits, ‘AM_TESTS_ENVIRONMENT’ is, for +historical and implementation reasons, _not_ supported by the serial +harness (*note Serial Test Harness::). File: automake.info, Node: Serial Test Harness, Next: Parallel Test Harness, Prev: Scripts-based Testsuites, Up: Simple Tests -15.2.2 Older (and discouraged) serial test harness +15.2.2 Older (and discouraged) Serial Test Harness -------------------------------------------------- First, note that today the use of this harness is strongly discouraged @@ -4953,7 +4974,7 @@ B.2 Variable Index * AM_JAVACFLAGS: Java. (line 44) * AM_LDFLAGS: Linking. (line 10) * AM_LDFLAGS <1>: Program Variables. (line 59) -* AM_LFLAGS: Yacc and Lex. (line 60) +* AM_LFLAGS: Yacc and Lex. (line 65) * AM_LIBTOOLFLAGS: Libtool Flags. (line 6) * AM_LOG_DRIVER_FLAGS: Declaring Custom Test Drivers. (line 6) @@ -4969,10 +4990,10 @@ B.2 Variable Index * AM_RUNTESTFLAGS: DejaGnu Tests. (line 24) * AM_TESTSUITE_SUMMARY_HEADER: Scripts-based Testsuites. (line 69) -* AM_TESTS_ENVIRONMENT: Scripts-based Testsuites. - (line 104) -* AM_TESTS_FD_REDIRECT: Scripts-based Testsuites. - (line 112) +* AM_TESTS_ENVIRONMENT: Testsuite Environment Overrides. + (line 6) +* AM_TESTS_FD_REDIRECT: Testsuite Environment Overrides. + (line 14) * AM_UPCFLAGS: Unified Parallel C Support. (line 21) * AM_UPDATE_INFO_DIR: Texinfo. (line 92) @@ -5012,6 +5033,8 @@ B.2 Variable Index (line 6) * check_PROGRAMS: Program Sources. (line 6) * check_PROGRAMS <1>: Default _SOURCES. (line 28) +* check_PROGRAMS <2>: Scripts-based Testsuites. + (line 111) * check_SCRIPTS: Scripts. (line 18) * CLASSPATH_ENV: Java. (line 53) * CLEANFILES: Clean. (line 13) @@ -5125,7 +5148,7 @@ B.2 Variable Index * JAVAROOT: Java. (line 49) * LDADD: Linking. (line 10) * LDFLAGS: Program Variables. (line 12) -* LFLAGS: Yacc and Lex. (line 60) +* LFLAGS: Yacc and Lex. (line 65) * libexec_PROGRAMS: Program Sources. (line 6) * libexec_SCRIPTS: Scripts. (line 18) * LIBOBJS: Optional. (line 75) @@ -5262,16 +5285,16 @@ B.2 Variable Index * pkglibexec_SCRIPTS: Scripts. (line 18) * pkglib_LIBRARIES: A Library. (line 6) * pkglib_LTLIBRARIES: Libtool Libraries. (line 6) -* pkgpyexecdir: Python. (line 104) -* pkgpythondir: Python. (line 90) +* pkgpyexecdir: Python. (line 109) +* pkgpythondir: Python. (line 95) * PROGRAMS: Uniform. (line 17) * PROGRAMS <1>: Uniform. (line 101) -* pyexecdir: Python. (line 95) +* pyexecdir: Python. (line 100) * PYTHON: Uniform. (line 101) * PYTHON <1>: Python. (line 56) -* pythondir: Python. (line 86) +* pythondir: Python. (line 91) * PYTHON_EXEC_PREFIX: Python. (line 73) -* PYTHON_PLATFORM: Python. (line 81) +* PYTHON_PLATFORM: Python. (line 86) * PYTHON_PREFIX: Python. (line 72) * PYTHON_VERSION: Python. (line 68) * RECHECK_LOGS: Parallel Test Harness. @@ -5292,7 +5315,7 @@ B.2 Variable Index (line 73) * SUFFIXES: Suffixes. (line 6) * sys.exec_prefix Python variable: Python. (line 74) -* sys.platform Python variable: Python. (line 82) +* sys.platform Python variable: Python. (line 87) * sys.prefix Python variable: Python. (line 74) * sys.version_info Python variable: Python. (line 69) * sysconf_DATA: Data. (line 9) @@ -5304,8 +5327,8 @@ B.2 Variable Index (line 104) * TESTS <1>: Parallel Test Harness. (line 12) -* TESTS_ENVIRONMENT: Scripts-based Testsuites. - (line 104) +* TESTS_ENVIRONMENT: Testsuite Environment Overrides. + (line 6) * TEST_EXTENSIONS: Parallel Test Harness. (line 34) * TEST_LOGS: Parallel Test Harness. @@ -5421,6 +5444,7 @@ B.3 General Index * --warnings: automake Invocation. (line 133) * --warnings <1>: aclocal Options. (line 80) * --with-dmalloc: Public Macros. (line 122) +* --with-python-sys-prefix: Python. (line 74) * --with-python_exec_prefix: Python. (line 74) * --with-python_prefix: Python. (line 74) * -a: automake Invocation. (line 41) @@ -5967,7 +5991,7 @@ B.3 General Index * LDFLAGS and AM_LDFLAGS: Flag Variables Ordering. (line 20) * lex problems with HP-UX 10: Public Macros. (line 94) -* lex, multiple lexers: Yacc and Lex. (line 68) +* lex, multiple lexers: Yacc and Lex. (line 73) * LFLAGS and AM_LFLAGS: Flag Variables Ordering. (line 20) * libltdl, introduction: Libtool Concept. (line 29) @@ -5992,6 +6016,8 @@ B.3 General Index * Limitations of automake parser: General Operation. (line 33) * Linking Fortran 77 with C and C++: Mixing Fortran 77 With C and C++. (line 6) +* Linking multiple yacc parsers: Linking Multiple Yacc Parsers. + (line 3) * LISP primary, defined: Emacs Lisp. (line 6) * LN_S example: Extending. (line 86) * local targets: Extending. (line 37) @@ -6051,9 +6077,9 @@ B.3 General Index * mostlyclean-local <1>: Extending. (line 41) * multiple configurations, example: VPATH Builds. (line 48) * Multiple configure.ac files: automake Invocation. (line 6) -* Multiple lex lexers: Yacc and Lex. (line 68) +* Multiple lex lexers: Yacc and Lex. (line 73) * multiple outputs, rules with: Multiple Outputs. (line 6) -* Multiple yacc parsers: Yacc and Lex. (line 68) +* Multiple yacc parsers: Yacc and Lex. (line 73) * Nested packages: Nested Packages. (line 6) * Nesting packages: Subpackages. (line 6) * no-define: Public Macros. (line 54) @@ -6189,6 +6215,8 @@ B.3 General Index * Overriding make variables: General Operation. (line 51) * overriding rules: Extending. (line 26) * overriding semantics: Extending. (line 26) +* Overriding testsuite environment: Testsuite Environment Overrides. + (line 6) * PACKAGE, directory: Uniform. (line 19) * PACKAGE, prevent definition: Public Macros. (line 54) * Packages, nested: Nested Packages. (line 6) @@ -6300,7 +6328,7 @@ B.3 General Index * Silent rules: Silencing Make. (line 6) * silent rules and libtool: Automake Silent Rules. (line 59) -* site-packages Python directory: Python. (line 87) +* site-packages Python directory: Python. (line 92) * site.exp: DejaGnu Tests. (line 26) * source tree and build tree: VPATH Builds. (line 6) * source tree, read-only: VPATH Builds. (line 91) @@ -6383,6 +6411,8 @@ B.3 General Index * test-driver: Auxiliary Programs. (line 73) * Tests, expected failure: Scripts-based Testsuites. (line 32) +* Testsuite environment overrides: Testsuite Environment Overrides. + (line 6) * testsuite harness: Generalities about Testing. (line 18) * Testsuite progress on console: Scripts-based Testsuites. @@ -6447,11 +6477,11 @@ B.3 General Index (line 39) * xz: The Types of Distributions. (line 30) -* yacc, multiple parsers: Yacc and Lex. (line 68) +* yacc, multiple parsers: Yacc and Lex. (line 73) * YFLAGS and AM_YFLAGS: Flag Variables Ordering. (line 20) * ylwrap: Auxiliary Programs. (line 85) -* ylwrap <1>: Yacc and Lex. (line 68) +* ylwrap <1>: Yacc and Lex. (line 73) * zardoz example: Complete. (line 35) * zip: The Types of Distributions. (line 37) diff --git a/doc/automake.texi b/doc/automake.texi index 0a0da6168..ab4e2aeb6 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -62,6 +62,7 @@ section entitled ``GNU Free Documentation License.'' @insertcopying @end titlepage +@shortcontents @contents @c We use the following macros to define indices: @@ -192,6 +193,7 @@ Auto-generating aclocal.m4 Autoconf macros supplied with Automake * Public Macros:: Macros that you can use. +* Obsolete Macros:: Macros that will soon be removed. * Private Macros:: Macros that you should not use. Directories @@ -256,6 +258,10 @@ Common Issues Related to Libtool's Use * Error required file ltmain.sh not found:: The need to run libtoolize * Objects created both with libtool and without:: Avoid a specific build race +Yacc and Lex support + +* Linking Multiple Yacc Parsers:: + Fortran 77 Support * Preprocessing Fortran 77:: Preprocessing Fortran 77 sources @@ -312,7 +318,7 @@ What Goes in a Distribution Support for test suites -* Generalities about Testing:: Generic concepts and terminology about testing +* Generalities about Testing:: Concepts and terminology about testing * Simple Tests:: Listing test scripts in @code{TESTS} * Custom Test Drivers:: Writing and using custom test drivers * Using the TAP test protocol:: Integrating test scripts that use the TAP protocol @@ -325,12 +331,9 @@ Simple Tests * Serial Test Harness:: Older (and discouraged) serial test harness * Parallel Test Harness:: Generic concurrent test harness -Using the TAP test protocol +Scripts-based Testsuites -* Introduction to TAP:: -* Use TAP with the Automake test harness:: -* Incompatibilities with other TAP parsers and drivers:: -* Links and external resources on TAP:: +* Testsuite Environment Overrides:: Custom Test Drivers @@ -344,6 +347,13 @@ API for Custom Test Drivers * Log files generation and test results recording:: * Testsuite progress output:: +Using the TAP test protocol + +* Introduction to TAP:: +* Use TAP with the Automake test harness:: +* Incompatibilities with other TAP parsers and drivers:: +* Links and external resources on TAP:: + Changing Automake's Behavior * Options generalities:: Semantics of Automake option @@ -359,7 +369,7 @@ Conditionals * Usage of Conditionals:: Declaring conditional content * Limits of Conditionals:: Enclosing complete statements -Silencing Make +Silencing @command{make} * Make verbosity:: Make is verbose by default * Tricks For Silencing Make:: Standard and generic ways to silence make @@ -4599,11 +4609,10 @@ recursion will probably come as unwelcome advice. For those who haven't read the paper, Miller's main thesis is that recursive @command{make} invocations are both slow and error-prone. -Automake provides sufficient cross-directory support @footnote{We -believe. This work is new and there are probably warts. -@xref{Introduction}, for information on reporting bugs.} to enable you -to write a single @file{Makefile.am} for a complex multi-directory -package. +Automake is intended to have sufficient cross-directory support to +enable you to write a single @file{Makefile.am} for a complex +multi-directory package. (If it seems to be lacking, please report +the issue as usual.) By default an installable file specified in a subdirectory will have its directory name stripped before installation. For instance, in this @@ -6293,14 +6302,14 @@ variable. Automake has somewhat idiosyncratic support for Yacc and Lex. Automake assumes that the @file{.c} file generated by @command{yacc} -(or @command{lex}) should be named using the basename of the input -file. That is, for a yacc source file @file{foo.y}, Automake will +or @command{lex} should be named using the basename of the input +file. That is, for a Yacc source file @file{foo.y}, Automake will cause the intermediate file to be named @file{foo.c} (as opposed to @file{y.tab.c}, which is more traditional). -The extension of a yacc source file is used to determine the extension -of the resulting C or C++ source and header files. Note that header -files are generated only when the @option{-d} Yacc option is used; see +The extension of a Yacc source file is used to determine the extension +of the resulting C or C++ source and header files. Be aware that header +files are generated only when the option @option{-d} is given to Yacc; see below for more information about this flag, and how to specify it. Files with the extension @file{.y} will thus be turned into @file{.c} sources and @file{.h} headers; likewise, @file{.yy} will become @@ -6308,7 +6317,7 @@ sources and @file{.h} headers; likewise, @file{.yy} will become @file{h++}, @file{.yxx} will become @file{.cxx} and @file{.hxx}, and @file{.ypp} will become @file{.cpp} and @file{.hpp}. -Similarly, lex source files can be used to generate C or C++; the +Similarly, Lex source files can be used to generate C or C++; the extensions @file{.l}, @file{.ll}, @file{.l++}, @file{.lxx}, and @file{.lpp} are recognized. @@ -6319,10 +6328,10 @@ The intermediate files generated by @command{yacc} (or @command{lex}) will be included in any distribution that is made. That way the user doesn't need to have @command{yacc} or @command{lex}. -If a @command{yacc} source file is seen, then your @file{configure.ac} must +If a Yacc source file is seen, then your @file{configure.ac} must define the variable @code{YACC}. This is most easily done by invoking -the macro @code{AC_PROG_YACC} (@pxref{Particular Programs, , Particular -Program Checks, autoconf, The Autoconf Manual}). +the macro @code{AC_PROG_YACC} (@pxref{Particular Programs, , +Particular Program Checks, autoconf, The Autoconf Manual}). @vindex YFLAGS @vindex AM_YFLAGS @@ -6333,17 +6342,18 @@ intended for the @file{Makefile.am} author. @code{AM_YFLAGS} is usually used to pass the @option{-d} option to @command{yacc}. Automake knows what this means and will automatically adjust its rules to update and distribute the header file built by -@samp{yacc -d}@footnote{Please note that @command{automake} recognizes -@option{-d} in @code{AM_YFLAGS} only if it is not clustered with other -options; for example, it won't be recognized if @code{AM_YFLAGS} is -@option{-dt}, but it will be if @code{AM_YFLAGS} is @option{-d -t} or -@option{-t -d}.}. -What Automake cannot guess, though, is where this -header will be used: it is up to you to ensure the header gets built -before it is first used. Typically this is necessary in order for -dependency tracking to work when the header is included by another -file. The common solution is listing the header file in -@code{BUILT_SOURCES} (@pxref{Sources}) as follows. +@samp{yacc -d}. Caveat: @command{automake} recognizes @option{-d} in +@code{AM_YFLAGS} only if it is not clustered with other options; for +example, it won't be recognized if @code{AM_YFLAGS} is @option{-dt}, +but it will be if @code{AM_YFLAGS} is @option{-d -t} or @option{-t +-d}. + +What Automake cannot guess, though, is where this header will be used: +it is up to you to ensure the header gets built before it is first +used. Typically this is necessary in order for dependency tracking to +work when the header is included by another file. The common solution +is listing the header file in @code{BUILT_SOURCES} (@pxref{Sources}) +as follows. @example BUILT_SOURCES = parser.h @@ -6352,11 +6362,11 @@ bin_PROGRAMS = foo foo_SOURCES = @dots{} parser.y @dots{} @end example -If a @command{lex} source file is seen, then your @file{configure.ac} -must define the variable @code{LEX}. You can use @code{AC_PROG_LEX} -to do this (@pxref{Particular Programs, , Particular Program Checks, -autoconf, The Autoconf Manual}), but using the @code{AM_PROG_LEX} macro -(@pxref{Macros}) is recommended. +If a Lex source file is seen, then your @file{configure.ac} must +define the variable @code{LEX}. You can use @code{AC_PROG_LEX} to do +this (@pxref{Particular Programs, , Particular Program Checks, +autoconf, The Autoconf Manual}), but using the @code{AM_PROG_LEX} +macro (@pxref{Macros}) is recommended. @vindex LFLAGS @vindex AM_LFLAGS @@ -6364,9 +6374,10 @@ When @command{lex} is invoked, it is passed @code{AM_LFLAGS} and @code{LFLAGS}. The latter is a user variable and the former is intended for the @file{Makefile.am} author. -When @code{AM_MAINTAINER_MODE} (@pxref{maintainer-mode}) is used, the -rebuild rule for distributed Yacc and Lex sources are only used when -@code{maintainer-mode} is enabled, or when the files have been erased. +When @code{AM_MAINTAINER_MODE} (@pxref{maintainer-mode}) is in effect, +the rebuild rules for distributed Yacc and Lex sources are only used +when @code{maintainer-mode} is enabled, or when the files have been +erased. @cindex @command{ylwrap} @cindex @command{yacc}, multiple parsers @@ -6374,19 +6385,28 @@ rebuild rule for distributed Yacc and Lex sources are only used when @cindex Multiple @command{lex} lexers @cindex @command{lex}, multiple lexers -When @command{lex} or @command{yacc} sources are used, @code{automake -a} -automatically installs an auxiliary program called @command{ylwrap} in -your package (@pxref{Auxiliary Programs}). -This program is used by the build rules to rename the output of these -tools, and makes it possible to include multiple @command{yacc} (or -@command{lex}) source files in a single directory. (This is necessary -because yacc's output file name is fixed, and a parallel make could -conceivably invoke more than one instance of @command{yacc} -simultaneously.) +When Yacc or Lex sources are used, @code{automake -a} automatically +installs an auxiliary program called @command{ylwrap} in your package +(@pxref{Auxiliary Programs}). This program is used by the build rules +to rename the output of these tools, and makes it possible to include +multiple @command{yacc} (or @command{lex}) source files in a single +directory. This is necessary because Yacc's output file name is +fixed, and a parallel make could invoke more than one instance of +@command{yacc} simultaneously. -For @command{yacc}, simply managing locking is insufficient. The output of -@command{yacc} always uses the same symbol names internally, so it isn't -possible to link two @command{yacc} parsers into the same executable. +@menu +* Linking Multiple Yacc Parsers:: +@end menu + +@subsection Linking Multiple Yacc Parsers +@node Linking Multiple Yacc Parsers + +@cindex Linking multiple @command{yacc} parsers + +For @command{yacc}, simply managing locking as with @code{ylwrap} is +insufficient. The output of @command{yacc} always uses the same +symbol names internally, so it isn't possible to link two +@command{yacc} parsers into the same executable. We recommend using the following renaming hack used in @command{gdb}: @example @@ -7882,17 +7902,22 @@ The Python version number, in the form @var{major}.@var{minor} @item PYTHON_PREFIX @itemx PYTHON_EXEC_PREFIX +@opindex --with-python-sys-prefix @opindex --with-python_prefix @opindex --with-python_exec_prefix @vindex sys.prefix @r{Python variable} @vindex sys.exec_prefix @r{Python variable} -The value of Python's @samp{sys.prefix} (resp.@: -@samp{sys.exec_prefix}) variable. Sometimes the same as the standard -@samp{$@{prefix@}} (@samp{$@{exec_prefix@}}), but differs on some -platforms such as Mac@tie{}OS@tie{}x (where Python is usually -installed as a Framework). Can be set explicitly with the -@option{--with-python_prefix} (@option{--with-python_exec_prefix}) -@file{configure} option. +With no special options given, these have values @samp{$@{prefix@}} +and @samp{$@{exec_prefix@}}, respectively (unexpanded; see below). + +The @file{configure} options @option{--with-python_prefix} +and @option{--with-python_exec_prefix} set them to an explicit value. + +The @file{configure} option @option{--with-python-sys-prefix} set them +to the values of Python's @samp{sys.prefix} and @samp{sys.exec_prefix} +variables. These often differ from @samp{$@{prefix@}} and +@samp{$@{exec_prefix@}}, e.g., on platforms such as Mac@tie{}OS@tie{}x +(where Python is usually installed as a Framework). @item PYTHON_PLATFORM @vindex sys.platform @r{Python variable} @@ -9208,6 +9233,35 @@ The Autoconf Manual}), and in particular for the @code{distcheck} rule (@pxref{Checking the Distribution}). @vindex TESTS +Automake ensures that each file listed in @code{TESTS} is built before +it is run; you can list both source and derived programs (or scripts) +in @code{TESTS}; the generated rule will look both in @code{srcdir} and +`@file{..}'. For instance, you might want to run a C program as a test. +To do this you would list its name in @code{TESTS} and also in +@code{check_PROGRAMS}, and then specify it as you would any other +program. + +@vindex check_PROGRAMS +Programs listed in @code{check_PROGRAMS} (and @code{check_LIBRARIES}, +@code{check_LTLIBRARIES}, ...) are only built during @code{make +check}, not during @code{make all}. You should list there any program +needed by your tests that does not need to be built by @code{make +all}. The programs in @code{check_PROGRAMS} are @emph{not} +automatically added to @code{TESTS} because @code{check_PROGRAMS} +usually lists programs used by the tests, not the tests themselves. +If all your programs are in fact test cases, you can set @code{TESTS = +$(check_PROGRAMS)}. + +@menu +* Testsuite Environment Overrides:: +@end menu + +@node Testsuite Environment Overrides +@subsubsection Testsuite Environment Overrides + +@cindex Testsuite environment overrides +@cindex Overriding testsuite environment + @vindex TESTS_ENVIRONMENT @vindex AM_TESTS_ENVIRONMENT The @code{AM_TESTS_ENVIRONMENT} and @code{TESTS_ENVIRONMENT} variables can @@ -9227,7 +9281,7 @@ hurdle is constituted by Korn shells, which usually set the close-on-exec flag on file descriptors opened with the @command{exec} builtin, thus rendering an idiom like @code{AM_TESTS_ENVIRONMENT = exec 9>&2;} ineffectual. This issue also affects some Bourne shells, such as the -HP-UX's @command{/bin/sh}, +HP-UX's @command{/bin/sh}. @c Keep in sync with tests-environment-backcompat.sh @example @@ -9241,6 +9295,7 @@ AM_TESTS_ENVIRONMENT = \ if test -d /usr/xpg4/bin; then \ PATH=/usr/xpg4/bin:$$PATH; export PATH; \ fi; + @c $$ restore font-lock ## With this, the test scripts will be able to print diagnostic ## messages to the original standard error stream, even if the test @@ -9249,30 +9304,27 @@ AM_TESTS_ENVIRONMENT = \ AM_TESTS_FD_REDIRECT = 9>&2 @end example -@noindent -Note however that @code{AM_TESTS_ENVIRONMENT} is, for historical and -implementation reasons, @emph{not} supported by the serial harness -(@pxref{Serial Test Harness}). +@c https://bugs.gnu.org/49309 +As another example, a notice that a test is starting can be emitted +using @code{AM_TESTS_ENVIRONMENT} (for package maintainers) or +@code{TESTS_ENVIRONMENT} by users: -Automake ensures that each file listed in @code{TESTS} is built before -it is run; you can list both source and derived programs (or scripts) -in @code{TESTS}; the generated rule will look both in @code{srcdir} and -'@file{..}'. For instance, you might want to run a C program as a test. -To do this you would list its name in @code{TESTS} and also in -@code{check_PROGRAMS}, and then specify it as you would any other -program. +@example +make -j12 ... TESTS_ENVIRONMENT='echo RUNNING: "$$f";' check +@end example -Programs listed in @code{check_PROGRAMS} (and @code{check_LIBRARIES}, -@code{check_LTLIBRARIES}...) are only built during @code{make check}, -not during @code{make all}. You should list there any program needed -by your tests that does not need to be built by @code{make all}. Note -that @code{check_PROGRAMS} are @emph{not} automatically added to -@code{TESTS} because @code{check_PROGRAMS} usually lists programs used -by the tests, not the tests themselves. Of course you can set -@code{TESTS = $(check_PROGRAMS)} if all your programs are test cases. +@noindent +The shell variable @code{$f} contains the test name. (Although +technically this is not guaranteed, in practice it is extremely +unlikely to ever change.) This can be helpful to see when trying to +debug test failures. + +Notwithstanding these benefits, @code{AM_TESTS_ENVIRONMENT} is, for +historical and implementation reasons, @emph{not} supported by the +serial harness (@pxref{Serial Test Harness}). @node Serial Test Harness -@subsection Older (and discouraged) serial test harness +@subsection Older (and discouraged) Serial Test Harness @cindex @option{serial-tests}, Using First, note that today the use of this harness is strongly discouraged in diff --git a/doc/help2man b/doc/help2man index db8bedf3f..a8bea9896 100755 --- a/doc/help2man +++ b/doc/help2man @@ -1,7 +1,9 @@ #!/usr/bin/perl -w # Generate a short man page from --help and --version output. -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, +# 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021 Free Software +# Foundation, Inc. # 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 @@ -27,7 +29,7 @@ use Text::Tabs qw(expand); use POSIX qw(strftime setlocale LC_ALL); my $this_program = 'help2man'; -my $this_version = '1.47.4'; +my $this_version = '1.48.4'; sub _ { $_[0] } sub configure_locale @@ -51,8 +53,9 @@ sub fix_italic_spacing; my $version_info = enc_user sprintf _(<<'EOT'), $this_program, $this_version; GNU %s %s -Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, -2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. +Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, +2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020, 2021 Free Software +Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -247,7 +250,7 @@ my $help_text = get_option_value $ARGV[0], $help_option; $version_text ||= get_option_value $ARGV[0], $version_option; # By default the generated manual pages will include the current date. This may -# however be overriden by setting the environment variable $SOURCE_DATE_EPOCH +# however be overridden by setting the environment variable $SOURCE_DATE_EPOCH # to an integer value of the seconds since the UNIX epoch. This is primarily # intended to support reproducible builds (wiki.debian.org/ReproducibleBuilds) # and will additionally ensure that the output date string is UTC. @@ -255,7 +258,7 @@ my $epoch_secs = time; if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/) { $epoch_secs = $1; - $ENV{TZ} = 'UTC'; + $ENV{TZ} = 'UTC0'; } # Translators: the following message is a strftime(3) format string, which in @@ -282,21 +285,23 @@ if ($opt_output) # <version> # <program> <version> # {GNU,Free} <program> <version> -# <program> ({GNU,Free} <package>) <version> -# <program> - {GNU,Free} <package> <version> +# <program> ({GNU,Free,} <package>) <version> +# <program> - {GNU,Free,} <package> <version> +# <program> - {GNU,Free,} <package> - <version> # # and separated from any copyright/author details by a blank line. ($_, $version_text) = ((split /\n+/, $version_text, 2), ''); -if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or - /^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/) +if (/^(\S+) +\(((?:(?:GNU|Free) +)?[^)]+)\) +(\S.*)$/ or + /^(\S+) +- +((?:(?:GNU|Free) +)?\S.*) +- +(\S.*)$/ or + /^(\S+) +- +((?:(?:GNU|Free) +)?\S+) +(\S.*)$/) { $program = program_basename $1; $package = $2; $version = $3; } -elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/) +elsif (/^((?:GNU|Free) +)?(\S+) +(\S.*)$/) { $program = program_basename $2; $package = $1 ? "$1$program" : $program; @@ -336,7 +341,7 @@ for ($replace{_('NAME')} || ($include{_('NAME')} ||= '')) my $PROGRAM = uc $program; # Set default page head/footers -$source ||= "$program $version"; +$source ||= "$package $version"; unless ($manual) { for ($section) diff --git a/doc/local.mk b/doc/local.mk index 7bd1f3907..f61a7288e 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -65,7 +65,7 @@ chlx_args = -v --sleep 8 #--exclude-url-file=/tmp/xf # - mailto urls, they are always forbidden. # - vala, redirects to a Gnome subpage and returns 403 to us. # - cfortran, forbidden by site's robots.txt. -# - search.cpan.org, gets +# - search.cpan.org, gets # - debbugs.gnu.org/automake, forbidden by robots.txt. # - autoconf.html, forbidden by robots.txt (since served from savannah). # - https://fsf.org redirects to https://www.fsf.org and nothing to do @@ -126,7 +126,7 @@ setup_autotools_paths = { \ $(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac $(AM_V_GEN)tmp=amhello-output.tmp \ && $(am__cd) $(srcdir)/%D%/amhello \ - && : Make our aclocal and automake avaiable before system ones. \ + && : Make our aclocal and automake available before system ones. \ && $(setup_autotools_paths) \ && ( \ { $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \ diff --git a/doc/stamp-vti b/doc/stamp-vti index 583ef9568..43622a919 100644 --- a/doc/stamp-vti +++ b/doc/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 16 July 2021 -@set UPDATED-MONTH July 2021 -@set EDITION 1.16.4 -@set VERSION 1.16.4 +@set UPDATED 1 October 2021 +@set UPDATED-MONTH October 2021 +@set EDITION 1.16.5 +@set VERSION 1.16.5 diff --git a/doc/version.texi b/doc/version.texi index 583ef9568..43622a919 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 16 July 2021 -@set UPDATED-MONTH July 2021 -@set EDITION 1.16.4 -@set VERSION 1.16.4 +@set UPDATED 1 October 2021 +@set UPDATED-MONTH October 2021 +@set EDITION 1.16.5 +@set VERSION 1.16.5 diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index f4a0102d2..e7f6ba895 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -31,7 +31,7 @@ VPATH = @srcdir@ ## Why the this needs to be so convoluted? ## ## (1) We can't unconditionally use make functions or special variables -## starting with a dot, as those cause non-GNU implmentations to +## starting with a dot, as those cause non-GNU implementations to ## crash hard. ## ## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 6029ee343..11b5e5842 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -28,7 +28,7 @@ endif %?INSTALL% ## We prefer files from the build directory to those from the source ## directory, in true VPATH spirit. ## The destination file is normally determined by appending "c" to the -## input (which would erronously put it in $(srcdir) in VPATH builds), +## input (which would erroneously put it in $(srcdir) in VPATH builds), ## so we override that, too. if test '$(EMACS)' != no; then \ am__dir=. am__subdir_includes=''; \ diff --git a/lib/config.sub b/lib/config.sub index d80c5d759..d74fb6dea 100755 --- a/lib/config.sub +++ b/lib/config.sub @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-07-03' +timestamp='2021-08-14' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -121,9 +121,11 @@ esac # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <<EOF $1 EOF +IFS=$saved_IFS # Separate into logical components for further validation case $1 in @@ -172,6 +174,10 @@ case $1 in basic_machine=$field1 basic_os=$field2 ;; + zephyr*) + basic_machine=$field1-unknown + basic_os=$field2 + ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ @@ -931,9 +937,11 @@ case $basic_machine in *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read cpu vendor <<EOF $basic_machine EOF + IFS=$saved_IFS ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -1313,9 +1321,11 @@ case $basic_os in ;; *-*) # shellcheck disable=SC2162 + saved_IFS=$IFS IFS="-" read kernel os <<EOF $basic_os EOF + IFS=$saved_IFS ;; # Default OS when just kernel was specified nto*) @@ -1697,7 +1707,7 @@ fi # Now, validate our (potentially fixed-up) OS. case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. - musl* | newlib* | uclibc*) + musl* | newlib* | relibc* | uclibc*) ;; # Likewise for "kernel-abi" eabi* | gnueabi*) @@ -1738,7 +1748,7 @@ case $os in | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) @@ -1755,11 +1765,12 @@ esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in - linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ + | linux-musl* | linux-relibc* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; - -dietlibc* | -newlib* | -musl* | -uclibc* ) + -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 diff --git a/lib/py-compile b/lib/py-compile index c45a77de2..81b122b0a 100755 --- a/lib/py-compile +++ b/lib/py-compile @@ -1,7 +1,7 @@ #!/bin/sh # py-compile - Compile a Python program -scriptversion=2020-02-19.23; # UTC +scriptversion=2021-02-27.01; # UTC # Copyright (C) 2000-2021 Free Software Foundation, Inc. @@ -27,7 +27,7 @@ scriptversion=2020-02-19.23; # UTC # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. -if [ -z "$PYTHON" ]; then +if test -z "$PYTHON"; then PYTHON=python fi @@ -96,23 +96,23 @@ done files=$* if test -z "$files"; then - usage_error "no files given" + usage_error "no files given" fi # if basedir was given, then it should be prepended to filenames before # byte compilation. -if [ -z "$basedir" ]; then - pathtrans="path = file" +if test -z "$basedir"; then + pathtrans="path = file" else - pathtrans="path = os.path.join('$basedir', file)" + pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. -if [ -z "$destdir" ]; then - filetrans="filepath = path" +if test -z "$destdir"; then + filetrans="filepath = path" else - filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" + filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi python_major=`$PYTHON -V 2>&1 | sed -e 's/.* //;s/\..*$//;1q'` @@ -176,7 +176,7 @@ for file in files.split(): py_compile.compile(filepath, $import_call(filepath$import_arg2), path) else: py_compile.compile(filepath, filepath + 'o', path) -sys.stdout.write('\n')" 2>/dev/null || : +sys.stdout.write('\n')" 2>/dev/null || exit $? # Local Variables: # mode: shell-script diff --git a/m4/amversion.m4 b/m4/amversion.m4 index e71cdaaa6..f4acbd262 100644 --- a/m4/amversion.m4 +++ b/m4/amversion.m4 @@ -15,7 +15,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.4], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -31,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.4])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff --git a/m4/init.m4 b/m4/init.m4 index c5807d211..b4686b140 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -28,6 +28,10 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl diff --git a/m4/python.m4 b/m4/python.m4 index 56d9eb2bb..4e7de9427 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -82,7 +82,7 @@ AC_DEFUN([AM_PATH_PYTHON], ]) if test "$PYTHON" = :; then - dnl Run any user-specified action, or abort. + dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else @@ -91,38 +91,63 @@ AC_DEFUN([AM_PATH_PYTHON], dnl trailing zero was eliminated. So now we output just the major dnl and minor version numbers, as numbers. Apparently the tertiary dnl version is not of interest. - + dnl AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) - dnl Use the values of sys.prefix and sys.exec_prefix for the corresponding - dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made - dnl distinct variables so they can be overridden if need be. However, - dnl general consensus is that you shouldn't need this ability. - dnl Also allow directly setting the prefixes via configure args. + dnl At times, e.g., when building shared libraries, you may want + dnl to know which OS platform Python thinks this is. + dnl + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) - if test "x$prefix" = xNONE - then - am__usable_prefix=$ac_default_prefix + dnl emacs-page + dnl If --with-python-sys-prefix is given, use the values of sys.prefix + dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX + dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and + dnl ${exec_prefix} variables. + dnl + dnl The two are made distinct variables so they can be overridden if + dnl need be, although general consensus is that you shouldn't need + dnl this separation. + dnl + dnl Also allow directly setting the prefixes via configure options, + dnl overriding any default. + dnl + if test "x$prefix" = xNONE; then + am__usable_prefix=$ac_default_prefix else - am__usable_prefix=$prefix + am__usable_prefix=$prefix fi + # Allow user to request using sys.* values from Python, + # instead of the GNU $prefix values. + AC_ARG_WITH([python-sys-prefix], + [AS_HELP_STRING([--with-python-sys-prefix], + [use Python's sys.prefix and sys.exec_prefix values])], + [am_use_python_sys=:], + [am_use_python_sys=false]) + + # Allow user to override whatever the default Python prefix is. AC_ARG_WITH([python_prefix], [AS_HELP_STRING([--with-python_prefix], - [override the default PYTHON_PREFIX])], - [ am_python_prefix_subst="$withval" - am_cv_python_prefix="$withval" - AC_MSG_CHECKING([for $am_display_PYTHON prefix]) + [override the default PYTHON_PREFIX])], + [am_python_prefix_subst=$withval + am_cv_python_prefix=$withval + AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix]) AC_MSG_RESULT([$am_cv_python_prefix])], [ - AC_CACHE_CHECK([for $am_display_PYTHON prefix], [am_cv_python_prefix], - [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`]) + if $am_use_python_sys; then + # using python sys.prefix value, not GNU + AC_CACHE_CHECK([for python default $am_display_PYTHON prefix], + [am_cv_python_prefix], + [am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`]) - dnl If sys.prefix is a subdir of $prefix, replace the literal value of $prefix - dnl with a variable reference so it can be overridden. - case $am_cv_python_prefix in + dnl If sys.prefix is a subdir of $prefix, replace the literal value of + dnl $prefix with a variable reference so it can be overridden. + case $am_cv_python_prefix in $am__usable_prefix*) am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'` am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"` @@ -130,55 +155,68 @@ AC_DEFUN([AM_PATH_PYTHON], *) am_python_prefix_subst=$am_cv_python_prefix ;; - esac - ]) + esac + else # using GNU prefix value, not python sys.prefix + am_python_prefix_subst='${prefix}' + am_python_prefix=$am_python_prefix_subst + AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix]) + AC_MSG_RESULT([$am_python_prefix]) + fi]) + # Substituting python_prefix_subst value. AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst]) + # emacs-page Now do it all over again for Python exec_prefix, but with yet + # another conditional: fall back to regular prefix if that was specified. AC_ARG_WITH([python_exec_prefix], [AS_HELP_STRING([--with-python_exec_prefix], - [override the default PYTHON_EXEC_PREFIX])], - [ am_python_exec_prefix_subst="$withval" - am_cv_python_exec_prefix="$withval" - AC_MSG_CHECKING([for $am_display_PYTHON exec_prefix]) + [override the default PYTHON_EXEC_PREFIX])], + [am_python_exec_prefix_subst=$withval + am_cv_python_exec_prefix=$withval + AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix]) AC_MSG_RESULT([$am_cv_python_exec_prefix])], [ - dnl --with-python_prefix was given - use its value for python_exec_prefix too - AS_IF([test -n "$with_python_prefix"], [am_python_exec_prefix_subst="$with_python_prefix" - am_cv_python_exec_prefix="$with_python_prefix" - AC_MSG_CHECKING([for $am_display_PYTHON exec_prefix]) - AC_MSG_RESULT([$am_cv_python_exec_prefix])], - [ - AC_CACHE_CHECK([for $am_display_PYTHON exec_prefix], [am_cv_python_exec_prefix], - [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`]) - dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the - dnl literal value of $exec_prefix with a variable reference so it can - dnl be overridden. - if test "x$exec_prefix" = xNONE - then - am__usable_exec_prefix=$am__usable_prefix - else - am__usable_exec_prefix=$exec_prefix - fi - case $am_cv_python_exec_prefix in - $am__usable_exec_prefix*) - am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` - am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` - ;; - *) - am_python_exec_prefix_subst=$am_cv_python_exec_prefix - ;; - esac - ])]) + # no explicit --with-python_exec_prefix, but if + # --with-python_prefix was given, use its value for python_exec_prefix too. + AS_IF([test -n "$with_python_prefix"], + [am_python_exec_prefix_subst=$with_python_prefix + am_cv_python_exec_prefix=$with_python_prefix + AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix]) + AC_MSG_RESULT([$am_cv_python_exec_prefix])], + [ + # Set am__usable_exec_prefix whether using GNU or Python values, + # since we use that variable for pyexecdir. + if test "x$exec_prefix" = xNONE; then + am__usable_exec_prefix=$am__usable_prefix + else + am__usable_exec_prefix=$exec_prefix + fi + # + if $am_use_python_sys; then # using python sys.exec_prefix, not GNU + AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix], + [am_cv_python_exec_prefix], + [am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`]) + dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the + dnl literal value of $exec_prefix with a variable reference so it can + dnl be overridden. + case $am_cv_python_exec_prefix in + $am__usable_exec_prefix*) + am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'` + am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"` + ;; + *) + am_python_exec_prefix_subst=$am_cv_python_exec_prefix + ;; + esac + else # using GNU $exec_prefix, not python sys.exec_prefix + am_python_exec_prefix_subst='${exec_prefix}' + am_python_exec_prefix=$am_python_exec_prefix_subst + AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix]) + AC_MSG_RESULT([$am_python_exec_prefix]) + fi])]) + # Substituting python_exec_prefix_subst. AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst]) - dnl At times (like when building shared libraries) you may want - dnl to know which OS platform Python thinks this is. - - AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], - [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) - AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) - - # Just factor out some code duplication. + # Factor out some code duplication into this shell variable. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility @@ -198,96 +236,95 @@ try: except ImportError: pass" - dnl Set up 4 directories: + dnl emacs-page Set up 4 directories: - dnl pythondir -- where to install python scripts. This is the - dnl site-packages directory, not the python standard library - dnl directory like in previous automake betas. This behavior - dnl is more consistent with lispdir.m4 for example. + dnl 1. pythondir: where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. - AC_CACHE_CHECK([for $am_display_PYTHON script directory], - [am_cv_python_pythondir], - [if test "x$am_cv_python_prefix" = x - then - am_py_prefix=$am__usable_prefix - else - am_py_prefix=$am_cv_python_prefix - fi - am_cv_python_pythondir=`$PYTHON -c " + dnl + AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)], + [am_cv_python_pythondir], + [if test "x$am_cv_python_prefix" = x; then + am_py_prefix=$am__usable_prefix + else + am_py_prefix=$am_cv_python_prefix + fi + am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` - ;; - *) - case $am_py_prefix in - /usr|/System*) ;; - *) - am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" - ;; - esac - ;; + # + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages" + ;; esac - ]) + ;; + esac + ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) - dnl pkgpythondir -- $PACKAGE directory under pythondir. Was - dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is - dnl more consistent with the rest of automake. - + dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + dnl AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) - dnl pyexecdir -- directory for installing python extension modules - dnl (shared libraries) + dnl 3. pyexecdir: directory for installing python extension modules + dnl (shared libraries). dnl Query distutils for this directory. - AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], - [am_cv_python_pyexecdir], - [if test "x$am_cv_python_exec_prefix" = x - then - am_py_exec_prefix=$am__usable_exec_prefix - else - am_py_exec_prefix=$am_cv_python_exec_prefix - fi - am_cv_python_pyexecdir=`$PYTHON -c " + dnl + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)], + [am_cv_python_pyexecdir], + [if test "x$am_cv_python_exec_prefix" = x; then + am_py_exec_prefix=$am__usable_exec_prefix + else + am_py_exec_prefix=$am_cv_python_exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) else: - from distutils import sysconfig - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') sys.stdout.write(sitedir)"` - case $am_cv_python_pyexecdir in - $am_py_exec_prefix*) - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` - ;; - *) - case $am_py_exec_prefix in - /usr|/System*) ;; - *) - am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" - ;; - esac - ;; + # + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages" + ;; esac - ]) + ;; + esac + ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) - dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) - + dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE) + dnl AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi - ]) diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk index 56f853888..6b7ec020f 100644 --- a/maintainer/syntax-checks.mk +++ b/maintainer/syntax-checks.mk @@ -230,7 +230,7 @@ sc_perl_at_uscore_in_scalar_context: ## Allow only few variables to be localized in automake and aclocal. sc_perl_local: - @if egrep -v '^[ \t]*local \$$[_~]( *=|;)' \ + @if grep -Ev '^[ \t]*local \$$[_~]( *=|;)' \ $(automake_in) $(aclocal_in) | \ grep '^[ \t]*local [^*]'; then \ echo "Please avoid 'local'." 1>&2; \ diff --git a/t/cond24.sh b/t/cond24.sh index 3868ae32e..f8f2a3077 100644 --- a/t/cond24.sh +++ b/t/cond24.sh @@ -26,7 +26,7 @@ EOF cat >Makefile.am <<EOF if COND -## A dummy comment to change line numer. +## A dummy comment to change line number. foo = baz endif EOF diff --git a/t/cond35.sh b/t/cond35.sh index 786bb3cf5..37a25eae3 100644 --- a/t/cond35.sh +++ b/t/cond35.sh @@ -73,7 +73,7 @@ END cat > tparse.y << 'END' %{ -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %token EOF %% diff --git a/t/cond36.sh b/t/cond36.sh index 8cfb9d5f5..78d1e23a5 100644 --- a/t/cond36.sh +++ b/t/cond36.sh @@ -46,7 +46,7 @@ EOF $ACLOCAL -# Presently Automake doesn't fully support partially overriden rules +# Presently Automake doesn't fully support partially overridden rules # and should complain. AUTOMAKE_fails --add-missing grep 'tparse\.h.*already defined' stderr diff --git a/t/dist-auxdir-many-subdirs.sh b/t/dist-auxdir-many-subdirs.sh index cfbb223e8..fe53cccb5 100644 --- a/t/dist-auxdir-many-subdirs.sh +++ b/t/dist-auxdir-many-subdirs.sh @@ -100,7 +100,7 @@ END else for f in $required_files; do cp "$am_scriptdir"/$f $auxdir/$f \ - || fatal_ "faild to fetch auxiliary script '$f'" + || fatal_ "failed to fetch auxiliary script '$f'" # See comments above. chmod a-w $auxdir/$f done diff --git a/t/link_override.sh b/t/link_override.sh index 81787af91..a4cd62438 100644 --- a/t/link_override.sh +++ b/t/link_override.sh @@ -43,7 +43,7 @@ grep '.\$(LINK).*foo' Makefile.in && exit 1 grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && exit 1 grep '.\$(bar_LINK).*bar' Makefile.in -# Silent make rules should use AM_V_GEN unless overriden. +# Silent make rules should use AM_V_GEN unless overridden. grep '.\$(AM_V_GEN)\$(foo_LINK)' Makefile.in grep '.\$(AM_V_baz_LINK)\$(baz_LINK)' Makefile.in grep '.\$(AM_V_GEN)\$(baz_LINK)' Makefile.in && exit 1 diff --git a/t/parallel-tests-console-output.sh b/t/parallel-tests-console-output.sh index 37d80b2b2..5464d8907 100644 --- a/t/parallel-tests-console-output.sh +++ b/t/parallel-tests-console-output.sh @@ -60,7 +60,7 @@ cat > xfail.test << 'END' #!/bin/sh # The sleep should ensure expected execution order of tests # even when make is run in parallel mode. -# Creative quoting below to plase maintainer-check. +# Creative quoting below to please maintainer-check. sleep '10' exit 1 END diff --git a/t/python-prefix.sh b/t/python-prefix.sh index 3179d42e5..6231a571c 100755 --- a/t/python-prefix.sh +++ b/t/python-prefix.sh @@ -15,8 +15,6 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # Test configure options --with-python_prefix and --with-python_exec_prefix. -# We can't test with no prefixes specified, since the default is to -# install in Python's sys.prefix and sys.exec_prefix directories. required=python . test-init.sh diff --git a/t/python-vars.sh b/t/python-vars.sh index 9070c7501..c6da7e49a 100644 --- a/t/python-vars.sh +++ b/t/python-vars.sh @@ -15,7 +15,8 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # Check that AM_PATH_PYTHON correctly sets all the output variables -# advertised in the manual. +# advertised in the manual, both with the GNU prefix values and the +# Python sys.* prefix values. required=python . test-init.sh @@ -61,16 +62,22 @@ check-local: test-in test-am .PHONY: test-in test-am test-in: + @echo "> doing test-in" + @echo ">> contents of pythondir:" cat pythondir case `cat pythondir` in '$${PYTHON_PREFIX}'/*);; *) exit 1;; esac + @echo ">> contents of pyexecdir:" cat pyexecdir case `cat pyexecdir` in '$${PYTHON_EXEC_PREFIX}'/*);; *) exit 1;; esac + @echo ">> contents of vars-exp:" cat $(srcdir)/vars-exp + @echo ">> contents of vars-got:" cat $(builddir)/vars-got diff $(srcdir)/vars-exp $(builddir)/vars-got ## Note: this target's rules will be extended in the "for" loop below. test-am: + @echo "> doing test-am" case '$(pythondir)' in '$(PYTHON_PREFIX)'/*);; *) exit 1;; esac case '$(pyexecdir)' in '$(PYTHON_EXEC_PREFIX)'/*);; *) exit 1;; esac END @@ -78,35 +85,59 @@ END echo @pythondir@ > pythondir.in echo @pyexecdir@ > pyexecdir.in -: > vars-exp -: > vars-got.in - -for var in $pyvars; do - eval val=\$$var - echo "var=$val" >> vars-exp - echo "var=@$var@" >> vars-got.in - echo "${tab}test x'\$($var)' = x'$val' || test \"\$NO_CHECK_PYTHON_PREFIX\"" >> Makefile.am -done - -cat Makefile.am -cat vars-got.in +# This depends on whether we're doing GNU or Python values, per arg. +setup_vars_file () +{ + vartype=$1 + : > vars-exp + : > vars-got.in + + for var in $pyvars; do + if test x"$vartype" = xgnu; then + # when not using Python sys.* values, PYTHON_*PREFIX will vary; + # the computed value will be (something like) "/usr", + # but the expected value will be "${prefix}". + if test x"$var" = xPYTHON_PREFIX \ + || test x"$var" = xPYTHON_EXEC_PREFIX; then + continue + fi + fi + eval val=\$$var + echo "var=$val #$var" >> vars-exp + echo "var=@$var@ #$var" >> vars-got.in + echo "${tab}test x'\$($var)' = x'$val' || test \"\$NO_CHECK_PYTHON_PREFIX\"" >> Makefile.am + done +} + +setup_vars_file gnu $ACLOCAL $AUTOMAKE --add-missing +# some debugging output. for var in pythondir pyexecdir $pyvars; do grep "^$var *=" Makefile.in done -instdir=$(pwd)/inst - $AUTOCONF -./configure --prefix="$instdir" PYTHON="$PYTHON" +# Do GNU values. +./configure PYTHON="$PYTHON" $MAKE test-in test-am +run_make distcheck + +# Do Python values. +setup_vars_file python +instdir=$(pwd)/inst +./configure PYTHON="$PYTHON" --with-python-sys-prefix --prefix="$instdir" +$MAKE test-in test-am +# # This tries to install to $PYTHON_PREFIX, which may not be writable. # Override it to something safe, but then of course we have to skip # checking that it is what we originally set it to. -run_make distcheck PYTHON_PREFIX="$instdir" NO_CHECK_PYTHON_PREFIX=1 +run_make distcheck \ + PYTHON_PREFIX="$instdir" \ + NO_CHECK_PYTHON_PREFIX=1 \ + AM_DISTCHECK_CONFIGURE_FLAGS=--with-python-sys-prefix : diff --git a/t/silent-many-languages.sh b/t/silent-many-languages.sh index edb59e7c9..9361b2bf8 100644 --- a/t/silent-many-languages.sh +++ b/t/silent-many-languages.sh @@ -188,7 +188,7 @@ EOF cat > foo6.y <<'EOF' %{ extern int yylex (void); -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %token EOF %% diff --git a/t/silent-yacc-headers.sh b/t/silent-yacc-headers.sh index c10fc5cc4..0582973f5 100644 --- a/t/silent-yacc-headers.sh +++ b/t/silent-yacc-headers.sh @@ -39,7 +39,7 @@ EOF cat > parse.y <<'EOF' %{ -void yyerror (char *s) { return; } +void yyerror (const char *s) {} int yylex (void) { return 0; } int main (void) { return 0; } %} diff --git a/t/silent-yacc.sh b/t/silent-yacc.sh index d11fc2ab2..3254d4014 100644 --- a/t/silent-yacc.sh +++ b/t/silent-yacc.sh @@ -50,7 +50,7 @@ EOF cat > foo.y <<'EOF' %{ -void yyerror (char *s) { return; } +void yyerror (const char *s) {} int yylex (void) { return 0; } int main (void) { return 0; } %} diff --git a/t/subobj11a.sh b/t/subobj11a.sh index e9f980acb..f9c494d57 100644 --- a/t/subobj11a.sh +++ b/t/subobj11a.sh @@ -15,7 +15,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # Test that automake works around a bug of Solaris Make. The bug is the -# following. If we have a Makefile containg a file inclusion like this: +# following. If we have a Makefile containing a file inclusion like this: # include .//foo.mk # Solaris make fails with a message like: # make: ... can't find '/foo.mk': No such file or directory diff --git a/t/subobj11b.sh b/t/subobj11b.sh index ee63680a8..d3500a9a6 100644 --- a/t/subobj11b.sh +++ b/t/subobj11b.sh @@ -15,7 +15,7 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # Test that automake works around a bug of Solaris Make. The bug is the -# following. If we have a Makefile containg a file inclusion like this: +# following. If we have a Makefile containing a file inclusion like this: # include .//foo.mk # Solaris make fails with a message like: # make: ... can't find '/foo.mk': No such file or directory diff --git a/t/subpkg-yacc.sh b/t/subpkg-yacc.sh index eac56cb1f..9e31c5151 100644 --- a/t/subpkg-yacc.sh +++ b/t/subpkg-yacc.sh @@ -88,7 +88,7 @@ EOF cat > lib/foo.y << 'END' %{ int yylex (void) { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; diff --git a/t/suffix10.tap b/t/suffix10.tap index 2258120e7..d233c6c21 100644 --- a/t/suffix10.tap +++ b/t/suffix10.tap @@ -39,7 +39,7 @@ libfoo_la_SOURCES = foo.x_ :; { echo '/* autogenerated */' \ && echo '%{' \ && echo 'int yylex () {return 0;}' \ - && echo 'void yyerror (char *s) {}' \ + && echo 'void yyerror (const char *s) {}' \ && echo '%}' \ && echo '%%' \ && echo "foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};" \ diff --git a/t/test-extensions-empty.sh b/t/test-extensions-empty.sh index 915bf5c9b..d9d3cd1df 100755 --- a/t/test-extensions-empty.sh +++ b/t/test-extensions-empty.sh @@ -35,7 +35,7 @@ END touch foo.test -autoreconf -fi >reconf.out 2>&1 +autoreconf -fi >reconf.out 2>&1 grep 'uninitialized value' reconf.out && exit 1 # What we're trying to avoid: diff --git a/t/yacc-basic.sh b/t/yacc-basic.sh index cfbaa1957..d50157099 100644 --- a/t/yacc-basic.sh +++ b/t/yacc-basic.sh @@ -42,7 +42,7 @@ cat > parse.y << 'END' #include <stdio.h> #include <stdlib.h> int yylex () { return getchar (); } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% a : 'a' { exit(0); }; diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh index 60e85dd85..6069489da 100644 --- a/t/yacc-bison-skeleton.sh +++ b/t/yacc-bison-skeleton.sh @@ -44,7 +44,7 @@ void yyerror (const char *s); foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; %% int yylex () { return 0; } -void yyerror (const char *s) { return; } +void yyerror (const char *s) {} END cat > foo.c << 'END' diff --git a/t/yacc-clean-cxx.sh b/t/yacc-clean-cxx.sh index fe2795894..811d46939 100644 --- a/t/yacc-clean-cxx.sh +++ b/t/yacc-clean-cxx.sh @@ -70,7 +70,7 @@ cat > sub1/parsefoo.yxx << 'END' #include <cstdio> // "std::" qualification required by Sun C++ 5.9. int yylex (void) { return std::getchar (); } -void yyerror (const char *s) { return; } +void yyerror (const char *s) {} %} %% x : 'x' { }; diff --git a/t/yacc-clean.sh b/t/yacc-clean.sh index 9ea13a704..c248e5c89 100644 --- a/t/yacc-clean.sh +++ b/t/yacc-clean.sh @@ -66,7 +66,7 @@ END cat > sub1/parse.y << 'END' %{ int yylex () { return (getchar ()); } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% x : 'x' { }; diff --git a/t/yacc-cxx.sh b/t/yacc-cxx.sh index 0e163eb44..b9dcd458b 100644 --- a/t/yacc-cxx.sh +++ b/t/yacc-cxx.sh @@ -48,7 +48,7 @@ cat > parse1.yy << 'END' #include <cstdlib> // "std::" qualification required by Sun C++ 5.9. int yylex (void) { return std::getchar (); } -void yyerror (const char *s) { return; } +void yyerror (const char *s) {} %} %% a : 'a' { exit(0); }; diff --git a/t/yacc-d-basic.sh b/t/yacc-d-basic.sh index 66c11063e..b468d5532 100644 --- a/t/yacc-d-basic.sh +++ b/t/yacc-d-basic.sh @@ -48,7 +48,7 @@ cat > foo/parse.y << 'END' %{ #include "parse.h" int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% x : 'x' {}; diff --git a/t/yacc-d-vpath.sh b/t/yacc-d-vpath.sh index e0fb951f2..86ae07b0c 100644 --- a/t/yacc-d-vpath.sh +++ b/t/yacc-d-vpath.sh @@ -41,7 +41,7 @@ END cat > parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %token FOOBAR %% @@ -74,7 +74,7 @@ $sleep cat > ../parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %token FUBAR %% @@ -94,7 +94,7 @@ $sleep cat > ../parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %token MAUDE %% diff --git a/t/yacc-deleted-headers.sh b/t/yacc-deleted-headers.sh index 766caac5c..5b661d1e5 100644 --- a/t/yacc-deleted-headers.sh +++ b/t/yacc-deleted-headers.sh @@ -56,7 +56,7 @@ cat > parse1.y << 'END' %{ #include "parse1.h" int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %token ZARDOZ %% @@ -81,7 +81,7 @@ sed 's/"parse1\.h"/"parse3.h"/' main1.c > main3.c cat > parse4.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %% x : 'x' {}; diff --git a/t/yacc-depend.sh b/t/yacc-depend.sh index 27c704b3d..dc82a316a 100644 --- a/t/yacc-depend.sh +++ b/t/yacc-depend.sh @@ -36,7 +36,7 @@ END cat > foo.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %token TOKEN %% diff --git a/t/yacc-depend2.sh b/t/yacc-depend2.sh index ce730f42b..c2b1b9be5 100644 --- a/t/yacc-depend2.sh +++ b/t/yacc-depend2.sh @@ -42,7 +42,7 @@ END cat > foo.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %token TOKEN %% diff --git a/t/yacc-dist-nobuild-subdir.sh b/t/yacc-dist-nobuild-subdir.sh index c918c3996..8b15d2c2a 100644 --- a/t/yacc-dist-nobuild-subdir.sh +++ b/t/yacc-dist-nobuild-subdir.sh @@ -36,7 +36,7 @@ mkdir sub cat > sub/parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %% x : 'x' {}; diff --git a/t/yacc-dist-nobuild.sh b/t/yacc-dist-nobuild.sh index 5e1a2a70a..f4d3fbcb2 100644 --- a/t/yacc-dist-nobuild.sh +++ b/t/yacc-dist-nobuild.sh @@ -37,7 +37,7 @@ END cat > parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; diff --git a/t/yacc-dry.sh b/t/yacc-dry.sh index c9c1aa2e0..43e1422a6 100644 --- a/t/yacc-dry.sh +++ b/t/yacc-dry.sh @@ -38,7 +38,7 @@ END cat > parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; diff --git a/t/yacc-line.sh b/t/yacc-line.sh index 10e8a8cd4..ef48d83c5 100644 --- a/t/yacc-line.sh +++ b/t/yacc-line.sh @@ -57,7 +57,7 @@ END cat > zardoz.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %% x : 'x' {}; diff --git a/t/yacc-misc.sh b/t/yacc-misc.sh index 2371a099f..9dc8f9dfd 100644 --- a/t/yacc-misc.sh +++ b/t/yacc-misc.sh @@ -35,7 +35,7 @@ END cat > parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; @@ -45,7 +45,7 @@ END cat > bar.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% fubar : 'f' 'o' 'o' 'b' 'a' 'r' {}; diff --git a/t/yacc-mix-c-cxx.sh b/t/yacc-mix-c-cxx.sh index ad9bf9523..45dffa0d2 100644 --- a/t/yacc-mix-c-cxx.sh +++ b/t/yacc-mix-c-cxx.sh @@ -53,7 +53,7 @@ END cat > p.y <<'END' %{ int yylex (void) { int new = 0; return new; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} %} %token ZARDOZ %% @@ -85,7 +85,7 @@ cat > parse.yy <<'END' #include <cstdlib> #include "parse.hh" int yylex (void) { return 0; } -void yyerror (const char *s) { return; } +void yyerror (const char *s) {} %} %token FOOBAR %% @@ -97,7 +97,7 @@ cat > parse2.y++ <<'END' %{ #include <cstdlib> int yylex (void) { return 0; } -void yyerror (const char *s) { return; } +void yyerror (const char *s) {} %} %% x : 'x' {}; diff --git a/t/yacc-nodist.sh b/t/yacc-nodist.sh index 075e07743..3b523e888 100644 --- a/t/yacc-nodist.sh +++ b/t/yacc-nodist.sh @@ -59,7 +59,7 @@ parse.y: :; { : \ && echo "%{" \ && echo "int yylex () { return 0; }" \ - && echo "void yyerror (char *s) {}" \ + && echo "void yyerror (const char *s) {}" \ && echo "%}" \ && echo "%%" \ && echo "maude : 'm' 'a' 'u' 'd' 'e' {}"; \ diff --git a/t/yacc-pr204.sh b/t/yacc-pr204.sh index 9606f7b3d..e07f5e5c9 100644 --- a/t/yacc-pr204.sh +++ b/t/yacc-pr204.sh @@ -51,7 +51,7 @@ EOF cat > parse.y << 'END' %{ int yylex () {return 0;} -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% maude : 'm' 'a' 'u' 'd' 'e' {}; diff --git a/t/yacc-subdir.sh b/t/yacc-subdir.sh index 5f3862187..879b433c6 100644 --- a/t/yacc-subdir.sh +++ b/t/yacc-subdir.sh @@ -49,7 +49,7 @@ mkdir foo cat > foo/parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; diff --git a/t/yacc-vpath.sh b/t/yacc-vpath.sh index f9bb719da..5481d9646 100644 --- a/t/yacc-vpath.sh +++ b/t/yacc-vpath.sh @@ -40,7 +40,7 @@ END cat > parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; @@ -67,7 +67,7 @@ $sleep cat > ../parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% fubar : 'f' 'o' 'o' 'b' 'a' 'r' {}; @@ -85,7 +85,7 @@ $sleep cat > ../parse.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) {} +void yyerror (const char *s) {} %} %% maude : 'm' 'a' 'u' 'd' 'e' {}; diff --git a/t/yflags-cmdline-override.sh b/t/yflags-cmdline-override.sh index eaee47849..63d31fbfa 100644 --- a/t/yflags-cmdline-override.sh +++ b/t/yflags-cmdline-override.sh @@ -43,7 +43,7 @@ END cat > foo.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} int main () { return 0; } %} %% diff --git a/t/yflags-force-override.sh b/t/yflags-force-override.sh index 2d5cb55e1..1346c1259 100644 --- a/t/yflags-force-override.sh +++ b/t/yflags-force-override.sh @@ -37,7 +37,7 @@ END cat > foo.y << 'END' %{ int yylex () { return 0; } -void yyerror (char *s) { return; } +void yyerror (const char *s) {} int main () { return 0; } %} %% |