Re: [PATCH] {master} Extend and improve tests on DejaGnu support.

2010-12-07 Thread Stefano Lattarini
Ping on this?  Reference:
 http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00143.html

I will wait the customary 72 hours (until friday evening) before pushing.

Regards,
  Stefano




Re: [PATCH] Improve and extend tests `pluseq*.test' (on `+=' support).

2010-12-07 Thread Stefano Lattarini
Ping on this?  Reference:
 http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00087.html

In the meantime, I've amended the patch a bit; in particular, I've rebased
it on the latest maint branch, I've removed some useless (I mean *really*
useless) make distcheck calls, and I've relaxed some too-picky grepping
checks (which were exposing too much automake internals without any
significant gain).

The updated patch and the squashed-in diffs are attached.

I will wait the customary 72 hours (until friday evening) before pushing.

Regards,
  Stefano

diff --git a/ChangeLog b/ChangeLog
index d1f4be2..82582af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,10 +10,10 @@
 	Makefile.in w.r.t. whitespaces, to avoid depending too much on
 	automake internals.
 	* tests/pluseq4.test: Improve testcase description.  Make grepping
-	of the generated Makefile.in slighty stricter.  Extend the test a
+	of the generated Makefile.in slightly stricter.  Extend the test a
 	bit.
 	* tests/pluseq6.test: Update testcase description.  Make grepping
-	of the generated Makefile.in slighty stricter.  Remove useless
+	of the generated Makefile.in slightly stricter.  Remove useless
 	AC_SUBST from configure.in and useless variable definition from
 	Makefile.am.  Avoid unnecessary use of a temporary variable.
 	Remove threatening comment.
@@ -27,9 +27,7 @@
 	* tests/pluseq12.test: ... this new test, similar to pluseq8.test,
 	but using leading tabs in continuation lines.
 	* tests/pluseq10.test: Prefer running tests from extra rules
-	in Makfile.am, rather then grepping `make' output.  Also run
-	make distcheck.
-	* tests/pluseq11.test: Also run make distcheck.
+	in Makfile.am, rather then grepping `make' output.
 	* tests/pluseq-comment.test: New test on `+=' and comments.
 	* tests/pluseq-comment-bslash.test: Likewise, but xfailing.
 	* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
diff --git a/tests/pluseq-comment-bslash.test b/tests/pluseq-comment-bslash.test
index e7e2c63..9cc30ce 100755
--- a/tests/pluseq-comment-bslash.test
+++ b/tests/pluseq-comment-bslash.test
@@ -36,7 +36,6 @@ VAR += bar
 .PHONY: test
 test:
 	test x'$(VAR)' = x'foo quux bar'
-check-local: test
 END
 
 $ACLOCAL
@@ -49,6 +48,5 @@ $AUTOCONF
 
 ./configure
 $MAKE test
-$MAKE distcheck
 
 :
diff --git a/tests/pluseq-comment.test b/tests/pluseq-comment.test
index 408aa4c..920512d 100755
--- a/tests/pluseq-comment.test
+++ b/tests/pluseq-comment.test
@@ -34,18 +34,16 @@ VAR += quux
 .PHONY: test
 test:
 	test x'$(VAR)' = x'foo bar baz1 baz2 quux'
-check-local: test
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-grep '^VAR *=.*#' Makefile.in  Exit 1
 grep '^VAR *=.*-bad' Makefile.in  Exit 1
 
 $AUTOCONF
 
 ./configure
 $MAKE test
-$MAKE distcheck
+
 :
diff --git a/tests/pluseq-header-vars.test b/tests/pluseq-header-vars.test
index aaea40e..141c205 100755
--- a/tests/pluseq-header-vars.test
+++ b/tests/pluseq-header-vars.test
@@ -31,7 +31,7 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^pkgdatadir *= *\$(datadir)/@PACKAGE@ foobar zardoz$' Makefile.in
+grep '^pkgdatadir *= *\$(datadir)/@PACKAGE@ foobar zardoz *$' Makefile.in
 test `grep '^pkgdatadir *=' Makefile.in | wc -l` -eq 1
 
 :
diff --git a/tests/pluseq.test b/tests/pluseq.test
index bf85ca8..8a07be6 100755
--- a/tests/pluseq.test
+++ b/tests/pluseq.test
@@ -14,7 +14,7 @@
 # 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 basic `+=' functionality.
+# Test very basic `+=' functionality.
 
 . ./defs || Exit 1
 
diff --git a/tests/pluseq10.test b/tests/pluseq10.test
index 28120c0..aa52cdb 100755
--- a/tests/pluseq10.test
+++ b/tests/pluseq10.test
@@ -40,14 +40,16 @@ foo += b0.h \
   b1.h
 endif
 
-.PHONY: test
-test:
+.PHONY: test1 test2
+test1:
+	## The value of $(foo) shouldn't contain any backslash character.
+	case '$(foo)' in *\\*) exit 1;; *) exit 0;; esac
+test2:
 	## Take care of possible extra whitespaces introduced by automake
-	## when conditionals are involved.  These extra spaces must be
-	## considered an an implementation detail, and shouldn't cause
+	## when conditionals are involved.  These extra spaces must
+	## beconsidered an implementation detail, and shouldn't cause
 	## spurious testsuite failure.
 	test x`echo $(foo)` = x'0.h a0.h a1.h a2.h a3.h'
-check-local: test
 END
 
 $ACLOCAL
@@ -55,6 +57,6 @@ $AUTOCONF
 $AUTOMAKE
 
 ./configure
-$MAKE test
-$MAKE distcheck
+$MAKE test1 test2
+
 :
diff --git a/tests/pluseq11.test b/tests/pluseq11.test
index e691042..12ec4d7 100755
--- a/tests/pluseq11.test
+++ b/tests/pluseq11.test
@@ -40,7 +40,6 @@ FOO += baz
 .PHONY: test
 test:
 	case '$(FOO)' in *\\*) exit 1;; *) exit 0;; esac
-check-local: test
 END
 
 $ACLOCAL
@@ -51,6 +50,5 @@ grep '^ *FOO *=.*\\.' Makefile.in  Exit 1
 $AUTOCONF
 ./configure
 $MAKE test
-$MAKE distcheck
 
 :
diff --git a/tests/pluseq12.test b/tests/pluseq12.test
index 5404c66..4fa6d54 100755
--- a/tests/pluseq12.test
+++ b/tests/pluseq12.test

Re: [PATCH 0/5] More patches for the tests-init branch

2010-12-07 Thread Stefano Lattarini
Hello automakers.

In reference to this thread:
 http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00186.html

On Monday 15 November 2010, Stefano Lattarini wrote:
 Stefano Lattarini (5):
   Tests defs: avoid some useless subshells.
   Tests required tools: also try `-v' option for GNU compilers.
 
I've now pushed these two approved patches to the tests-init branch.

   Tests defs: don't let useless variables leak in test scripts.
   Tests defs: new subroutine `skip' for test skipping.
   Tests defs: some cleanup and minor fixes.

OTOH, There are still problems with these patches?  Can I apply
those too?

Regards,
  Stefano



Re: Fwd: [Bug 347095] installing m4 macros that break random packages

2010-12-07 Thread Bruce Korb
Hi Eric,

Thank you.  automake list folks -- the main question is
Why are .m4 files being installed and how can I prevent it?
  Original Message 
  Subject: [Bug 347095] sys-devel/autogen installs colliding \
   m4 macros which break random packages
 
  Clear-Text: http://bugs.gentoo.org/show_bug.cgi?id=347095
  Secure: https://bugs.gentoo.org/show_bug.cgi?id=347095
 In this comment:
  http://bugs.gentoo.org/show_bug.cgi?id=347095#c29

On 12/07/10 09:49, Eric Blake wrote:
 Which macro are you using?  Can you show the .m4 file that you are
 installing as part of your public interface to autogen that is depending
 on extensions.m4 under the hood?

The m4 cruft I am using for configuring autogen uses extensions.m4.
I do not deliberately install those macros.  In fact:

 So, the questions:

 1. Should these m4 files be installed?

I did not believe that autogen configury macros should be installed
in the first place.

 Probably not - since extensions.m4 is not providing a public m4 macro
 directly related to autogen, you are probably better off rewriting your
 public macro to work without having to rely on extensions.m4.

I do not really have public macros.  (Should I have?
To what end?  Mostly, any client project that builds using
autogen probably should not be.  They probably ought to
do the autogen-ing in a bootstrap phase.  But if not, then
just see if ``autogen --help'' works and they ought not
need an m4 macro for a test that simple.)

The public macro I _do_ intentionally install, I install to
/usr/share/autogen and is for the purpose of testing the
existence and version of libopts, and for allowing the
location to be specified with a configure program option.
It is autoopts.m4 and Gentoo folks are not complaining of it.

 3. If not, where's the magic for suppressing the installation?
 
 I'm not sure where the magic for installing it was located in the first
 place; can you track down why extensions.m4 was being installed?  (and
 that may be more of an automake question)

I spent some time looking at all my Makefile.am's and I am sure
I don't know where the magic is, either.  As far as I understand,
of these files:
 $ (cd ~/tmp/_I ; find * -type f|fgrep m4)
 usr/local/share/autogen/autoopts.m4
 usr/local/share/aclocal/extensions.m4
 usr/local/share/aclocal/ag_macros.m4
 usr/local/share/aclocal/liboptschk.m4
 usr/local/share/aclocal/autoopts.m4
 usr/local/share/aclocal/snprintfv.m4
 usr/local/share/aclocal/unlocked-io.m4
 usr/local/share/aclocal/libopts.m4

I only mean to install the very first file.  The rest are private
and publicly installed via implicit means that I do not understand.

Here are the macros I use that pull other stuff:

 AC_INIT([GNU AutoGen],[5.11.4pre6],[autogen-us...@lists.sourceforge.net])
 AC_CONFIG_SRCDIR(agen5/autogen.c)
 AC_CONFIG_AUX_DIR(config)
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE([gnu check-news 1.5 dist-bzip2])
 AC_USE_SYSTEM_EXTENSIONS
 AC_LIBTOOL_WIN32_DLLm4_define(AC_PROVIDE_AC_LIBTOOL_WIN32_DLL)
 AC_PROG_LIBTOOL
 AM_WITH_DMALLOC
 AM_PROG_CC_C_O
 AC_PROG_CC_STDC
 gl_FUNC_GLIBC_UNLOCKED_IO
 AC_EXEEXT
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html, :)
 AC_C_CONST
 AC_C_INLINE
 AC_CHECK_LIB(dl, dlopen)
 AC_TYPE_MODE_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
 AC_TYPE_UID_T
 AC_C_LONG_DOUBLE
 AC_CHECK_TYPES([u_int, long long, uintmax_t, size_t, wchar_t])
 AC_CHECK_SIZEOF(char*, 4)
 AC_CHECK_SIZEOF(int,   4)
 AC_CHECK_SIZEOF(long,  4)
 AC_CHECK_SIZEOF(short, 2)
 AC_CHECK_FUNCS(strchr strlcpy snprintf dlopen)
 AC_SEARCH_LIBS(copysign, [m],
[AC_DEFINE(HAVE_COPYSIGN, 1,
   [Define to 1 if you have the `copysign' 
 function.])])
 AC_SEARCH_LIBS(copysignl, [m],
[AC_DEFINE(HAVE_COPYSIGNL, 1,
   [Define to 1 if you have the `copysignl' 
 function.])])
 AC_SEARCH_LIBS(modfl, [m],
[AC_DEFINE(HAVE_MODFL, 1,
   [Define to 1 if you have the `modfl' function.])])
 AM_CONDITIONAL([NEED_PATHFIND], [test X$ac_cv_func_pathfind = Xyes])

The interesting pullers of other stuff are likely AC_USE_SYSTEM_EXTENSIONS
and gl_FUNC_GLIBC_UNLOCKED_IO.

Nowhere that I have found have I set any magic make macro with 'DATA'
in its name to any of the .m4 files.

So I do not know how they get installed.  I don't want 'em installed.



Re: recursive make variables coming to POSIX

2010-12-07 Thread Bruce Korb
On 12/07/10 01:54, Schwarz, Konrad wrote:
 as well as listing in the rationale examples such as $($(@)_FLAGS) and
 $(V$O) that are unspecified.
 
 $($...@_flags) is a very useful, as it allows target-specific
 flags.

For all targets whose name conforms to make macro name requirements.

It would make $($(shell echo $@ | tr '[:punct:]' _)_FLAGS)
an interesting construct, but you get very far afield that way
Still, I like it and I'd like it more if there were an abbreviation
for it.  :)



Re: recursive make variables coming to POSIX

2010-12-07 Thread Ralf Wildenhues
* Bruce Korb wrote on Tue, Dec 07, 2010 at 08:36:16PM CET:
 On 12/07/10 01:54, Schwarz, Konrad wrote:
  $($...@_flags) is a very useful, as it allows target-specific
  flags.
 
 For all targets whose name conforms to make macro name requirements.

Right.  But since period is allowed, only hyphen would be a problem in
practice.

 It would make $($(shell echo $@ | tr '[:punct:]' _)_FLAGS)
 an interesting construct, but you get very far afield that way

Well, $(shell ...) still is GNU make-specific, so that still won't work.

Cheers,
Ralf



RE: recursive make variables coming to POSIX

2010-12-07 Thread Schwarz, Konrad
 Meanwhile, this may work as an appropriate wording that still 
 permits IRIX behavior, by stating that recursive expansion is 
 only specified for parenthesized variables that are not one 
 of the five internal macros (@, %, ?, , *), and only when 
 nested with () or {}:
 
 Change line 95800:
 The parentheses or braces are optional if string1 is a 
 single character.
 to:
 The parentheses or braces are optional if string1 is a 
 single character, except when the expansion is nested inside 
 another macro expansion.
 
 Lines 95801-95802 and 95807-95808 both contain:
 If string1 in a macro expansion contains a macro expansion, 
 the results are unspecified.
 In both cases, replace them with:
 If string1 in a macro expansion contains a macro expansion 
 where the inner expansion uses parenthesis or braces and is 
 not an internal macro, that inner macro expansion shall be 
 recursively expanded before use.
 Any other form of macro expansion in string1 has unspecified results.
 
 as well as listing in the rationale examples such as $($(@)_FLAGS) and
 $(V$O) that are unspecified.

$($...@_flags) is a very useful, as it allows target-specific
flags.  For me, this would be a major reason for including
recursive macro expansion in the first place.

According to Wikipedia, SGI end-of-lifed IRIX in 2006;
last deliveries of IRIX based systems were early 2007.

It would surprise me if IRIX supported a current POSIX
standard; I would find it a shame to include these
limitations solely for its benefit.

Konrad Schwarz


Re: Fwd: [Bug 347095] installing m4 macros that break random packages

2010-12-07 Thread Mike Frysinger
On Tuesday, December 07, 2010 13:56:35 Bruce Korb wrote:
 Thank you.  automake list folks -- the main question is
 Why are .m4 files being installed and how can I prevent it?

because your top level Makefile.am is using:
aclocal_DATA = ...
when i think you should be using:
noinst_DATA = ...
(obviously the ones you mean to install should remain in aclocal_DATA)

i'd test it, but the .texi file that comes with autogen-5.11.1 is causing my 
automake to error out:
doc/Makefile.am: `doc/autogen.texi' missing @setfilename
-mike


signature.asc
Description: This is a digitally signed message part.