bug#8969: improve synchronization between examples in the manual and test cases

2011-07-08 Thread Stefano Lattarini
On Wednesday 06 July 2011, Ralf Wildenhues wrote:
 * Stefano Lattarini wrote on Wed, Jul 06, 2011 at 10:32:56AM CEST:
  Oops, sorry.  Fixed by the attached patch.  OK for maint?  I'll wait
  the customary 72 hours before pushing.
 
 Thanks.  OK, but please remove all the comments about tar unportability
 in the tests.  It's so obvious.  ;-)

OK done.

 (and there are probably a dozen other places in the Automake source tree
 that you'd have to put the comment at as well, for any amount of
 consistency.  I think having one comment, the one that already exists in
 lib/am/distdir.am, is fully sufficient.)
 
   I'm ok with fixing the manual also, although it's
   usually clear for people still having to use those vendor tars (and
   inconvenient for the rest).
  
  Yes, I'd say we leave the examples in manual untouched.  Agreed?
 
 OK.
 
  Subject: [PATCH] tests: portability fixes in tests on amhello examples
  
  * tests/amhello-binpkg.test: Don't use tar xzf too.tag.gz to
  extract a gzip-compressed tarball, that's unportable to some
  tar implementations; use the gzip -dc fo.tar.gz | tar xf -
  idiom instead.
  * tests/amhello-cflags.test: Likewise.
  * tests/amhello-cross-compile.test: Likewise.
 
 Thanks,
 Ralf
 
Pushed now.

Thanks,
  Stefano





bug#9026: Supporting $ACLOCAL_PATH?

2011-07-08 Thread Ludovic Courtès
Hello,

On an FHS-style system, all macros are picked up from
/usr/share/aclocal.  Conversely, on a Stow/Nix-style installation,
macros are to be found in /foo/automake/share/aclocal,
/bar/guile/share/aclocal, /baz/pkg-config/share/aclocal, etc.

It seems to me that the latter calls for user environment-specific
settings, which an $ACLOCAL_PATH environment variable would handily
support [0].

WDYT?

Bruno rightfully noted the importance of having a reproducible way of
producing tarballs, and user-specific environment settings appear to go
counter this goal.  However, there will always be a need for this kind
of setting on Stow/Nix-style systems, AFAICS.

Thanks,
Ludo’.

[0] In fact Nixpkgs/NixOS has a wrapper around ‘aclocal’ that does
exactly this (see

https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/tools/misc/automake/builder.sh.)





bug#9026: Supporting $ACLOCAL_PATH?

2011-07-08 Thread Stefano Lattarini
tags 9026 patch
thanks

On Friday 08 July 2011, Ludovic Courtès wrote:
 Hello,

Hi Ludovic, thanks for the report.

 On an FHS-style system, all macros are picked up from
 /usr/share/aclocal.  Conversely, on a Stow/Nix-style installation,
 macros are to be found in /foo/automake/share/aclocal,
 /bar/guile/share/aclocal, /baz/pkg-config/share/aclocal, etc.
 
 It seems to me that the latter calls for user environment-specific
 settings, which an $ACLOCAL_PATH environment variable would handily
 support [0].
 
 WDYT?
 
 Bruno rightfully noted the importance of having a reproducible way of
 producing tarballs, and user-specific environment settings appear to go
 counter this goal.  However, there will always be a need for this kind
 of setting on Stow/Nix-style systems, AFAICS.
 
 Thanks,
 Ludo’.
 
 [0] In fact Nixpkgs/NixOS has a wrapper around ‘aclocal’ that does
 exactly this (see
 
 https://svn.nixos.org/repos/nix/nixpkgs/trunk/pkgs/development/tools/misc/automake/builder.sh.)
 
 
JFTR, there's a pending patch series by Paolo Bonzini that introduces
exactly the feature you're requesting:
 http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00089.html
I'm highly in favor of having the series applied to maint ASAP, but we
should wait for Ralf's ACK before doing that (and probably he won't be
avaiable this weekend).

Regards,
  Stefano





bug#9026: Supporting $ACLOCAL_PATH?

2011-07-08 Thread Bruno Haible
Ludovic Courtès wrote:
 ... having a reproducible way of
 producing tarballs, and user-specific environment settings appear to go
 counter this goal.

Not only that. Also, it is important for distributors to be able to
regenerate the 'configure' file of packages, for a variety of reasons.
They can only do so if the tarball contains the _complete_ source code
of the configure file, that is, all the .m4 files that were used to
create it, except the .m4 files of Automake and Autoconf.

Have you ever tried to rebuild the configure file of a package that
did not package pkgconfig.m4 or glib.m4? It's a nightmare.

Therefore, please don't encourage maintainers to omit nontrivial .m4 files
from the tarball. Adding support $ACLOCAL_PATH would do exactly that.

Bruno
-- 
In memoriam Jean Moulin http://en.wikipedia.org/wiki/Jean_Moulin





bug#9026: Supporting $ACLOCAL_PATH?

2011-07-08 Thread Stefano Lattarini
Hi Bruno.

On Friday 08 July 2011, Bruno Haible wrote:
 Ludovic Courtès wrote:
  ... having a reproducible way of
  producing tarballs, and user-specific environment settings appear to go
  counter this goal.
 
 Not only that. Also, it is important for distributors to be able to
 regenerate the 'configure' file of packages, for a variety of reasons.
 They can only do so if the tarball contains the _complete_ source code
 of the configure file, that is, all the .m4 files that were used to
 create it, except the .m4 files of Automake and Autoconf.
 
 Have you ever tried to rebuild the configure file of a package that
 did not package pkgconfig.m4 or glib.m4? It's a nightmare.
 
 Therefore, please don't encourage maintainers to omit nontrivial .m4 files
 from the tarball. Adding support $ACLOCAL_PATH would do exactly that.

Following your line of thinking, we should also drop the support for the
`dirlist' special file then.  The fact that a feature can be misused is
IMHO not a good reason against its introduction, if it can also be used
legitimately and profitably.  Also, a conscientious user would anyway add
`--install -I m4' to his ACLOCAL_AMFLAGS, so that third-party m4 files
would be copied in the local m4 directory (and thus automatically
distributed by automake).

I say we should instead follow the UNIX practice of giving the user enough
rope to hang himself, but advise him not to do so; metaphors aside, this
means we should implement $ACLOCAL_PATH, but also vouch your concerns
clearly and strongly in the manual (as usual, patches welcome ;-)

Regards,
  Stefano





bug#9026: Supporting $ACLOCAL_PATH?

2011-07-08 Thread Bruno Haible
Hi Stefano,

 I say we should instead follow the UNIX practice of giving the user enough
 rope to hang himself, but advise him not to do so

This is a good attitude for the many features with which a developer can
only harm himself and which cause no harm to others.

But with $ACLOCAL_PATH he can harm the freedom of the distributors of his
package; I think this requires special consideration.

Bruno
-- 
In memoriam Jean Moulin http://en.wikipedia.org/wiki/Jean_Moulin





bug#9026: Supporting $ACLOCAL_PATH?

2011-07-08 Thread Bruno Haible
Hi Stefano,

 Also, a conscientious user would anyway add
 `--install -I m4' to his ACLOCAL_AMFLAGS, so that third-party m4 files
 would be copied in the local m4 directory (and thus automatically
 distributed by automake).

Hey, the --install option is something I need to mention in the GNU gettext
documentation. I wasn't aware of it up to now.


2011-07-08  Bruno Haible  br...@clisp.org

* gettext.texi (aclocal): Recommend the use of aclocal's --install
option.
Suggested by Stefano Lattarini stefano.lattar...@gmail.com.

--- gettext-tools/doc/gettext.texi.orig Fri Jul  8 23:22:44 2011
+++ gettext-tools/doc/gettext.texi  Fri Jul  8 23:22:39 2011
@@ -7990,6 +7990,18 @@
 @noindent
 to your top level @file{Makefile.am}.
 
+If you are using GNU @code{automake} 1.10 or newer, it is even easier:
+Add the line
+
+@example
+ACLOCAL_AMFLAGS = --install -I m4
+@end example
+
+@noindent
+to your top level @file{Makefile.am}, and run @samp{aclocal --install -I m4}.
+This will copy the needed files to the @file{m4/} subdirectory automatically,
+before updating @file{aclocal.m4}.
+
 These macros check for the internationalization support functions
 and related informations.  Hopefully, once stabilized, these macros
 might be integrated in the standard Autoconf set, because this

-- 
In memoriam Jean Moulin http://en.wikipedia.org/wiki/Jean_Moulin