Re: [PATCH] texi: info files can be generated in the builddir
And here is the patch deprecating the CLEANFILES hack. This too is for maint, and scheduled to appear in Automake 1.13.2. I will push it with together with the patch introducing the new 'info-in-builddir' option, tomorrow. Regards, Stefano 8 8 8 8 8 8 8 8 8 From c1a8f56295d9c1621c65de28400cd1d93f037063 Mon Sep 17 00:00:00 2001 Message-Id: c1a8f56295d9c1621c65de28400cd1d93f037063.1357128164.git.stefano.lattar...@gmail.com From: Stefano Lattarini stefano.lattar...@gmail.com Date: Wed, 2 Jan 2013 00:33:42 +0100 Subject: [PATCH] texi: deprecate hack about info files in CLEANFILES variables For quite a long time, Automake has been implementing an undocumented hack which ensured that '.info' files which appeared to be cleaned (by e.g. being listed in the CLEANFILES or DISTCLEANFILES variables) were built in the builddir rather than in the srcdir; this hack was introduced to ensure better backward-compatibility with packages such as Texinfo, which did things like: info_TEXINFOS = texinfo.txi info-stnd.texi info.texi DISTCLEANFILES = texinfo texinfo-* info*.info* # Do not create info files for distribution. dist-info: @: in order not to distribute .info files. Now that we have the 'info-in-builddir' option that explicitly causes generated '.info' files to be placed in the builddir, this hack should be longer necessary, so we deprecate it with runtime warnings. It is scheduled to be removed altogether in Automake 1.14. * automake.in (handle_texinfo_helper): Raise proper runtime warnings if the hack is triggered. * NEWS: Update. * t/txinfo28.sh: Adjust. * t/txinfo23.sh: Likewise. * t/txinfo25.sh: Adjust and extend. * t/txinfo24.sh: Likewise. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- NEWS | 20 automake.in | 15 +++ t/txinfo23.sh | 5 - t/txinfo24.sh | 2 +- t/txinfo25.sh | 7 ++- t/txinfo28.sh | 2 +- 6 files changed, 47 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 804805e..6fd1c75 100644 --- a/NEWS +++ b/NEWS @@ -58,6 +58,26 @@ New in 1.13.2: bfd library. See the extensive discussion about automake bug#11034 for more details. + - For quite a long time, Automake has been implementing an undocumented +hack which ensured that '.info' files which appeared to be cleaned +(by e.g. being listed in the CLEANFILES or DISTCLEANFILES variables) +were built in the builddir rather than in the srcdir; this hack was +introduced to ensure better backward-compatibility with packages such +as Texinfo, which did things like: + +info_TEXINFOS = texinfo.txi info-stnd.texi info.texi +DISTCLEANFILES = texinfo texinfo-* info*.info* +# Do not create info files for distribution. +dist-info: +@: + +in order not to distribute generated '.info' files. + +Now that we have the 'info-in-builddir' option that explicitly causes +generated '.info' files to be placed in the builddir, this hack should +be longer necessary, so we deprecate it with runtime warnings. It will +likely be removed altogether in Automake 1.14. + New in 1.13.1: diff --git a/automake.in b/automake.in index e56ea65..fe7f459 100644 --- a/automake.in +++ b/automake.in @@ -3140,6 +3140,21 @@ sub handle_texinfo_helper ($) my @f = (); push @f, $d-value_as_list_recursive (inner_expand = 1) if $d; push @f, $c-value_as_list_recursive (inner_expand = 1) if $c; + if (@f !option 'info-in-builddir') + { +msg 'obsolete', $am_file.am, EOF; +Oops! +It appears this file (or files included by it) are triggering +an undocumented, soon-to-be-removed automake hack. +Future automake versions will no longer place in the builddir +(rather than in the srcdir) the generated '.info' files that +appear to be cleaned, by e.g. being listed in CLEANFILES or +DISTCLEANFILES. +If you want your '.info' files to be placed in the builddir +rather than in the srcdir, you have to use the shiny new +'info-in-builddir' automake option. +EOF + } @f = map { s|[^A-Za-z_0-9*\[\]\-]|\\$|g; s|\*|[^/]*|g; $_; } @f; my $user_cleaned_files = '^(?:' . join ('|', @f) . ')$'; diff --git a/t/txinfo23.sh b/t/txinfo23.sh index c2b2797..6c2d9ce 100755 --- a/t/txinfo23.sh +++ b/t/txinfo23.sh @@ -53,9 +53,12 @@ I'm included. END $ACLOCAL -$AUTOMAKE --add-missing $AUTOCONF +AUTOMAKE_run --add-missing -Wno-error +grep Makefile\.am:.*undocumented.* automake hack stderr +grep Makefile\.am:.*'info-in-builddir' automake option stderr + mkdir build cd build ../configure diff --git a/t/txinfo24.sh b/t/txinfo24.sh index bfad312..9daa82e 100755 --- a/t/txinfo24.sh +++ b/t/txinfo24.sh @@ -41,7 +41,7 @@ Hello walls. END $ACLOCAL -$AUTOMAKE --add-missing +$AUTOMAKE --add-missing -Wno-obsolete $AUTOCONF mkdir build
[PATCH] tests: reorganize tests on backslash issues
* t/backsl.sh, t/backsl2.sh, t/backsl3.sh: Merge ... * t/backslash-issues.sh: ... into this test. * t/backsl4.sh: Rename ... * t/backslash-before-trailing-whitespace.sh: ... like this. * t/list-of-tests.mk: Adjust. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- t/backsl.sh| 34 -- t/backsl2.sh | 30 --- sh = backslash-before-trailing-whitespace.sh} | 0 t/{backsl3.sh = backslash-issues.sh} | 30 +++ t/list-of-tests.mk | 6 ++-- 5 files changed, 26 insertions(+), 74 deletions(-) delete mode 100755 t/backsl.sh delete mode 100755 t/backsl2.sh rename t/{backsl4.sh = backslash-before-trailing-whitespace.sh} (100%) rename t/{backsl3.sh = backslash-issues.sh} (63%) mode change 100755 = 100644 diff --git a/t/backsl.sh b/t/backsl.sh deleted file mode 100755 index f316ac2..000 --- a/t/backsl.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh -# Copyright (C) 1996-2013 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 -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. - -# Test for \ problems. Bug report from Joerg-Martin Schwarz. - -. test-init.sh - -cat configure.ac 'END' -AC_PROG_CC -END - -cat Makefile.am 'END' -bin_PROGRAMS = \ - frob -END - -$ACLOCAL -$AUTOMAKE - -grep '^_SOURCE' Makefile.in exit 1 -exit 0 diff --git a/t/backsl2.sh b/t/backsl2.sh deleted file mode 100755 index ae33894..000 --- a/t/backsl2.sh +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -# Copyright (C) 1999-2013 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 -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. - -# We must skip the backslash, not complain about './\' not existing. -# Reported by Rick Scott rwsc...@omnisig.com - -. test-init.sh - -cat Makefile.am 'END' -SUBDIRS = \ - . -END - -$ACLOCAL -$AUTOMAKE - -: diff --git a/t/backsl4.sh b/t/backslash-before-trailing-whitespace.sh similarity index 100% rename from t/backsl4.sh rename to t/backslash-before-trailing-whitespace.sh diff --git a/t/backsl3.sh b/t/backslash-issues.sh old mode 100755 new mode 100644 similarity index 63% rename from t/backsl3.sh rename to t/backslash-issues.sh index eed651e..9dae715 --- a/t/backsl3.sh +++ b/t/backslash-issues.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 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 @@ -14,16 +14,34 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/. -# Make sure we diagnose trailing backslash at the end of a file. -# Report from Akim Demaile a...@epita.fr. +# Test for \ problems. +# TODO: might be nice to convert this to TAP... . test-init.sh +echo AC_PROG_CC configure.ac +$ACLOCAL + +# Bug report from Joerg-Martin Schwarz. cat Makefile.am 'END' -foo = \ +bin_PROGRAMS = \ + frob END +$AUTOMAKE +grep '^_SOURCE' Makefile.in exit 1 -$ACLOCAL +# We must skip the backslash, not complain about './\' not existing. +# Reported by Rick Scott rwsc...@omnisig.com +cat Makefile.am 'END' +SUBDIRS = \ + . +END +$AUTOMAKE + +# Make sure we diagnose trailing backslash at the end of a file. +# Report from Akim Demaile a...@epita.fr. +echo 'foo = \' Makefile.am AUTOMAKE_fails -cat stderr grep 'trailing backslash' stderr + +: diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index ba96774..2a042ef 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -185,10 +185,8 @@ t/backcompat2.sh \ t/backcompat3.sh \ t/backcompat6.sh \ t/backcompat-acout.sh \ -t/backsl.sh \ -t/backsl2.sh \ -t/backsl3.sh \ -t/backsl4.sh
[FYI] Merge branch 'maint' into master
commit 97d770d69c3522beab5aec18d135d84b3b5eb449 Merge: db64467 fe05207 Author: Stefano Lattarini stefano.lattar...@gmail.com Date: Wed Jan 2 14:45:42 2013 +0100 Merge branch 'maint' * maint: tests: reorganize tests on backslash issues style: add trailing ':' to some test cases tests: tweak tests on obsolete EXTRA_DATA variable tests: more significant names for some tests cosmetics: remove few occurrences of trailing whitespace docs: re-introduce mention of two-args AM_INIT_AUTOMAKE invocation texi: warn against '.txi' and '.texinfo' input suffixes cleanup: remove two lines of dead code in automake texi: warn against suffix-less info files build: respect silent rules in generation of amhello example tarball
[IMPORTANT] Should I stop flooding the list with patches?
Hello automakers. In a private mail recently, it has been pointed out to me that the amount of patches posted on the automake-list make it difficult to spot the user-relevant and/or possibly controversial patches among the huge crowd of typofixes, trivial changes, minor refactorings, or testsuite tweaks. So I ask: do you think it would be worthwhile to curb the quantity of patches posted here, by posting only the patches judged worth of general interest? Or, if that sounds overly harsh, what should I/we do to ensure important changes have more visibility? I'd be especially interested in a solution that wouldn't increase the amount of clerical workload required from the Automake developers ;-) Opinions? Ideas? Thanks, Stefano
Re: [IMPORTANT] Should I stop flooding the list with patches?
Stefano Lattarini stefano.lattar...@gmail.com writes: So I ask: do you think it would be worthwhile to curb the quantity of patches posted here, by posting only the patches judged worth of general interest? Or, if that sounds overly harsh, what should I/we do to ensure important changes have more visibility? I like the situation as it is. I'm an occasional commentator and a very occasional contributor, so take my opinion with some salt. It's easier for readers to filter the list in a way that makes sense to them, because one developer's deprecation of a misfeature can easily become a user's sudden breaking change. I'm not saying this is done on purpose, but it's easy for it to accidentally happen. Perhaps a severity tag in the subject line is the answer? -- Jack
[FYI] {maint} maint: add some of my maintainer-specific scripts
They are likely not general enough for widespread use, but they are useful nonetheless. In the best-case scenario, they will start to be used by other people, and thus accordingly improved and made more general and flexible. In the worst case scenario, well, I still get to keep them in a centralized, blessed place, simplifying the deployment and use of them; so still a win for me :-) * maint/am-ft: New script. * maint/am-xft: Likewise. * maint/rename-tests: Likewise. * Makefile.am (EXTRA_DIST): Add them. Signed-off-by: Stefano Lattarini stefano.lattar...@gmail.com --- Makefile.am| 9 + maint/am-ft| 109 + maint/am-xft | 3 ++ maint/rename-tests | 52 + 4 files changed, 173 insertions(+) create mode 100755 maint/am-ft create mode 100755 maint/am-xft create mode 100755 maint/rename-tests diff --git a/Makefile.am b/Makefile.am index 030c2eb..f6db092 100644 --- a/Makefile.am +++ b/Makefile.am @@ -679,3 +679,12 @@ EXTRA_DIST += \ old/ChangeLog.09 \ old/ChangeLog.11 \ old/TODO + +## ## +## Maintainer-specific files and scripts. ## +## ## + +EXTRA_DIST += \ + maint/am-ft \ + maint/am-xft \ + maint/rename-tests diff --git a/maint/am-ft b/maint/am-ft new file mode 100755 index 000..d8a2722 --- /dev/null +++ b/maint/am-ft @@ -0,0 +1,109 @@ +#!/usr/bin/env bash +# Remote testing of Automake tarballs made easy. +# This script requires Bash 4.x or later. +# TODO: some documentation would be nice ... + +set -u +me=${0##*/} + +fatal () { echo $me: $* 2; exit 1; } + +cmd=' + test_script=$HOME/.am-test/run + if test -f $test_script test -x $test_script; then +$test_script $@ + else +nice -n19 ./configure nice -n19 make -j10 check + fi +' + +remote= +interactive=1 +while test $# -gt 0; do + case $1 in + -b|--batch) interactive=0;; + -c|--command) cmd=${2-}; shift;; + -*) fatal '$1': invalid option;; +*) remote=$1; shift; break;; + esac + shift +done +[[ -n $remote ]] || fatal no remote given + +if ((interactive)); then + do_on_error='{ +AM_TESTSUITE_FAILED=yes +export AM_TESTSUITE_FAILED +# We should not modify the environment with which the failed +# tests have run, hence do not read .profile, .bashrc, and +# company. +exec bash --noprofile --norc -i + }' +else + do_on_error='exit $?' +fi + +tarball=$(echo automake*.tar.xz) + +case $tarball in + *' '*) fatal too many automake tarballs: $tarball;; +esac + +test -f $tarball || fatal no automake tarball found + +distdir=${tarball%%.tar.xz} + +env='PATH=$HOME/bin:$PATH' +if test -t 1; then + env+= TERM='$TERM' AM_COLOR_TESTS=always +fi + +# This is tempting: +# $ ssh command arg-1 ... arg-2 +# but doesn't work as expected. So we need the following hack +# to propagate the command line arguments to the remote shell. +quoted_args=-- +while (($# 0)); do + case $1 in +*\'*) quoted_args+= $(printf '%s\n' $1 | sed s/'/'\\''/g);; + *) quoted_args+= '$1';; + esac + shift +done + +set -e +set -x + +scp $tarball $remote:tmp/ + +# Multiple '-t' to force tty allocation. +ssh -t -t $remote + set -x; set -e; set -u; + set $quoted_args + cd tmp + if test -e $distdir; then +# Use 'perl', not only 'rm -rf', to correctly handle read-only +# files or directory. Fall back to 'rm' if something goes awry. +perl -e 'use File::Path qw/rmtree/; rmtree(\$distdir\)' \ + || rm -rf $distdir || exit 1 +test ! -e $distdir + fi + xz -dc $tarball | tar xf - + cd $distdir + ' + am_extra_acdir=$HOME/.am-test/extra-aclocal + am_extra_bindir=$HOME/.am-test/extra-bin + am_extra_setup=$HOME/.am-test/extra-setup.sh + if test -d $am_extra_acdir; then +export ACLOCAL_PATH=$am_extra_acdir${ACLOCAL_PATH+:$ACLOCAL_PATH} + fi + if test -d $am_extra_bindir; then +export PATH=$am_extra_bindir:$PATH + fi + ' + export $env + if test -f \\$am_extra_setup\; then +. \\$am_extra_setup\ + fi + ($cmd) || $do_on_error + diff --git a/maint/am-xft b/maint/am-xft new file mode 100755 index 000..564aa3b --- /dev/null +++ b/maint/am-xft @@ -0,0 +1,3 @@ +#!/bin/sh +MAKE=${MAKE-make} GIT=${GIT-git} +$GIT clean -fdx $MAKE bootstrap $MAKE dist exec am-ft $@ diff --git a/maint/rename-tests b/maint/rename-tests new file mode 100755 index 000..6fce9fe --- /dev/null +++ b/maint/rename-tests @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# Convenience script to rename test cases in Automake. + +set -e -u + +me=${0##*/} +fatal () { echo $me: $* 2; exit 1; } + +case $# in + 0) input=$(cat);; + 1) input=$(cat -- $1);; + *) fatal too many arguments;; +esac + +AWK=${AWK-awk} +SED=${SED-sed} + +[[ -f automake.in -d lib/Automake ]] \ + || fatal can only be run from the top-level of the Automake source tree + +$SED --version 21 | grep GNU /dev/null 21 \ + || fatal GNU sed is required by this script + +#