Re: [PATCH] {testsuite-work} tests: new test dedicated to `--add-missing' and `--copy' (was: Re: [PATCH 2/3] {testsuite-work} tests: can use also $SHELL to check shell scripts from `lib/')

2011-06-12 Thread Stefano Lattarini
References:
 http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00048.html
 http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00065.html

I've pushed this patch now.

Regards,
  Stefano



Re: [PATCH 0/6] Some python patches

2011-06-12 Thread Stefano Lattarini
On Thursday 09 June 2011, Stefano Lattarini wrote:
 Hello automakers.
 
 In the first patch of this series I'll present the promised patch
 ensuring that the py-compile script is run with $(SHELL) in the
 automake-generated Makefiles.
 
 While writing that patch, I've noticed (and plucked) a couple of
 low-hanging fruits allowing small reductions in code duplication, and
 improvements in consistency and error reporting.  Also, I've added
 few test cases checking py-compile directly (not only through its use
 in generated Makefiles).
 
 The changes introduced by these patches should IMHO go in a separate
 new branch 'python-work' based off of maint; we can later decide
 whether to merge this into maint, or only into master.
 
 I will push in 72 hours if there is no comment by then.
 
 Regards,
   Stefano
 
 Stefano Lattarini (6):
   python: run the 'py-compile' script with $(SHELL)
   py-compile: the '--destdir' option now accepts a blank argument
   python tests: add unit tests on py-compile
   py-compile: normalize error and help messages
   py-compile: complain on unrecognized options
   py-compile: '--' and non-option arguments terminate the option list
 
  ChangeLog  |   61 ++
  NEWS   |5 ++
  lib/am/python.am   |   19 +++-
  lib/py-compile |   51 ++
  tests/Makefile.am  |7 +++
  tests/Makefile.in  |7 +++
  tests/py-compile-basedir.test  |   51 +
  tests/py-compile-basic.test|   64 +++
  tests/py-compile-basic2.test   |   71 ++
  tests/py-compile-destdir.test  |   44 +++
  tests/py-compile-env.test  |   60 +
  tests/py-compile-option-terminate.test |   44 +++
  tests/py-compile-usage.test|   75 
 
  13 files changed, 529 insertions(+), 30 deletions(-)
  create mode 100755 tests/py-compile-basedir.test
  create mode 100755 tests/py-compile-basic.test
  create mode 100755 tests/py-compile-basic2.test
  create mode 100755 tests/py-compile-destdir.test
  create mode 100755 tests/py-compile-env.test
  create mode 100755 tests/py-compile-option-terminate.test
  create mode 100755 tests/py-compile-usage.test
 
 
I've now pushed these patches to a new python-work branch.

Regards,
  Stefano



Re: [PATCH] {maint} Warnings about primary/prefix mismatch fixed and extended.

2011-06-12 Thread Stefano Lattarini
On Saturday 11 June 2011, Stefano Lattarini wrote:
 Reference:
  http://lists.gnu.org/archive/html/automake-patches/2011-04/msg00121.html
 
 On Sunday 17 April 2011, Stefano Lattarini wrote:
  Reference:
   http://lists.gnu.org/archive/html/automake-patches/2011-03/msg00053.html
  
  On Wednesday 30 March 2011, Stefano Lattarini wrote:
   References:

   http://lists.gnu.org/archive/html/automake-patches/2011-01/msg00304.html
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7647
   
   Ping^2?
   
   I will push in 72 hours if there are no objections.
   
   Regards,
 Stefano
   
  I've just realized that the adjusted test java3.test has been made
  weaker, since $(javadir) is empty by default and thus nothing gets
  installed there anyway.  The following squash-in should solve this
  issue:
  
  -*-*-
  
  diff --git a/ChangeLog b/ChangeLog
  index 615a72d..0c54062 100644
  --- a/ChangeLog
  +++ b/ChangeLog
  @@ -1,4 +1,4 @@
  -2011-01-27  Stefano Lattarini  stefano.lattar...@gmail.com
  +2011-04-17  Stefano Lattarini  stefano.lattar...@gmail.com
   
  Warnings about primary/prefix mismatch fixed and extended.
  * automake.in (%standard_prefix): Add `doc' and `locale'.
  diff --git a/tests/java3.test b/tests/java3.test
  index 41dbb71..e1850a8 100755
  --- a/tests/java3.test
  +++ b/tests/java3.test
  @@ -1,5 +1,5 @@
   #! /bin/sh
  -# Copyright (C) 2004  Free Software Foundation, Inc.
  +# Copyright (C) 2004, 2011 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,8 +14,8 @@
   # 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 that Java rules don't attempt to install *.java files when
  -# there are none.
  +# Make sure that Java rules don't attempt to compile or install
  +# *.java files when there are none.
   # Report from Johannes Nicolai (PR/441).
   
   . ./defs || Exit 1
  @@ -32,10 +32,13 @@ if WHO_CARES
   JAVA_FILES = MyClass1.java
   endif
   
  -dist_java_JAVA = $(JAVA_FILES)
  +javadir = $(prefix)/java
  +java_JAVA = $(JAVA_FILES)
   END
   
  -: MyClass1.java
  +cat  MyClass1.java  'END'
  +class MyClass1 { // Deliberately missing right curly bracket.
  +END
   
   $ACLOCAL
   $AUTOCONF
  @@ -43,9 +46,10 @@ $AUTOMAKE
   
   cwd=`pwd` || Exit 1
   ./configure --prefix=$cwd/_inst
  +$MAKE
   $MAKE install
  -test ! -d _inst
  -test ! -r _inst
  +ls -l . _inst/java # For debugging.
  +find . -name '*.class' | grep .  Exit 1
   $MAKE uninstall
   $MAKE distcheck
   
  -*-*-
  
  I'll push in 72 hours if there is no review by then.
  
  Regards,
Stefano
 
 I've rebased the patch and re-run the testsuite, which still passes.
 The updated patch is attached, for reference.  I will push by tomorrow
 evening if there are no further objections.
 
 Regards,
   Stefano
 

I've pushed the patch now.

Regards,
  Stefano



[PATCH] tests: few fixlets and improvements

2011-06-12 Thread Stefano Lattarini
A simple patch with few minor improvements to four random test cases.

I'll push in 48 hours if there is no objection by then.

Regards,
  Stefano

-*-*-*-

tests: few fixlets and improvements

* tests/cond31.test ($required): Remove `cc', it's not really
needed.
* tests/confh.test: Call autoheader too.  The lack of this call
wasn't causing spurious failures because the automatic remake
rules were somehow invoking it on our behalf.
* tests/fn99subdir.test: Use $subdirname throughout, instead of
${subdirname}, for consistency with the rest of the testsuite.
Avoid an unnecessary subshell, which could also cause spurious
passes, being guarded by a trailing `|| Exit 1', which neutralize
the `errexit' flag.  Remove an unnecessary `|| Exit 1' guard.
* tests/insh2.test: Rewrite to avoid hackish Makefile.in munging,
and to also run configure and make.
---
 ChangeLog |   16 
 tests/cond31.test |1 -
 tests/confh.test  |1 +
 tests/fn99subdir.test |   36 +++-
 tests/insh2.test  |   15 +++
 5 files changed, 47 insertions(+), 22 deletions(-)
From 3fc47d1cd6054315178d9b86bbe8301ac6f73bda Mon Sep 17 00:00:00 2001
Message-Id: 3fc47d1cd6054315178d9b86bbe8301ac6f73bda.1307915577.git.stefano.lattar...@gmail.com
From: Stefano Lattarini stefano.lattar...@gmail.com
Date: Sun, 12 Jun 2011 19:35:53 +0200
Subject: [PATCH] tests: few fixlets and improvements

* tests/cond31.test ($required): Remove `cc', it's not really
needed.
* tests/confh.test: Call autoheader too.  The lack of this call
wasn't causing spurious failures because the automatic remake
rules were somehow invoking it on our behalf.
* tests/fn99subdir.test: Use $subdirname throughout, instead of
${subdirname}, for consistency with the rest of the testsuite.
Avoid an unnecessary subshell, which could also cause spurious
passes, being guarded by a trailing `|| Exit 1', which neutralize
the `errexit' flag.  Remove an unnecessary `|| Exit 1' guard.
* tests/insh2.test: Rewrite to avoid hackish Makefile.in munging,
and to also run configure and make.
---
 ChangeLog |   16 
 tests/cond31.test |1 -
 tests/confh.test  |1 +
 tests/fn99subdir.test |   36 +++-
 tests/insh2.test  |   15 +++
 5 files changed, 47 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a7f9a4a..df0f6ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-06-12  Stefano Lattarini  stefano.lattar...@gmail.com
+
+	tests: few fixlets and improvements
+	* tests/cond31.test ($required): Remove `cc', it's not really
+	needed.
+	* tests/confh.test: Call autoheader too.  The lack of this call
+	wasn't causing spurious failures because the automatic remake
+	rules were somehow invoking it on our behalf.
+	* tests/fn99subdir.test: Use $subdirname throughout, instead of
+	${subdirname}, for consistency with the rest of the testsuite.
+	Avoid an unnecessary subshell, which could also cause spurious
+	passes, being guarded by a trailing `|| Exit 1', which neutralize
+	the `errexit' flag.  Remove an unnecessary `|| Exit 1' guard.
+	* tests/insh2.test: Rewrite to avoid hackish Makefile.in munging,
+	and to also run configure and make.
+
 2011-06-08  Stefano Lattarini  stefano.lattar...@gmail.com
 
 	testsuite: use 'fatal_' and 'framework_failure_' for hard errors
diff --git a/tests/cond31.test b/tests/cond31.test
index 5110ab1..b94820e 100755
--- a/tests/cond31.test
+++ b/tests/cond31.test
@@ -16,7 +16,6 @@
 
 # Make sure we define conditional _DEPENDENCIES correctly.
 
-required=cc
 . ./defs || Exit 1
 
 cat configure.in 'EOF'
diff --git a/tests/confh.test b/tests/confh.test
index f900fd7..5b1c5a5 100755
--- a/tests/confh.test
+++ b/tests/confh.test
@@ -45,6 +45,7 @@ mkdir include
 
 $ACLOCAL
 $AUTOCONF
+$AUTOHEADER
 $AUTOMAKE
 
 ./configure
diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test
index 3f793c8..add730f 100755
--- a/tests/fn99subdir.test
+++ b/tests/fn99subdir.test
@@ -23,50 +23,52 @@
 subdirname='cnfsubdir'
 
 cat configure.in END
-AC_CONFIG_SUBDIRS([${subdirname}])
+AC_CONFIG_SUBDIRS([$subdirname])
 AC_OUTPUT
 END
 
 cat Makefile.am END
 AUTOMAKE_OPTIONS = filename-length-max=99
-SUBDIRS = ${subdirname}
+SUBDIRS = $subdirname
 END
 
-mkdir ${subdirname} || Exit 1
+mkdir $subdirname
 
-cat  ${subdirname}/configure.in EOF
-AC_INIT([${subdirname}], [1.0])
+cat  $subdirname/configure.in EOF
+AC_INIT([$subdirname], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 EOF
 
-cat ${subdirname}/Makefile.am 'END'
+cat $subdirname/Makefile.am 'END'
 AUTOMAKE_OPTIONS = filename-length-max=99
 EXTRA_DIST = 12345678
 END
 
-(cd ${subdirname} || Exit 1
+(cd $subdirname || Exit 1
 for i in 1 2 3 4 5 6 7 8; do
   mkdir -p 12345678  cd 12345678  touch x || Exit 1
 done) || skip_ failed to create deep directory hierarchy
 
 # AIX 5.3 `cp -R' is too buggy for `make dist'.
-cp -R ${subdirname} t 

flex header file

2011-06-12 Thread Pippijn van Steenhoven
Hi,

in some of my projects, I use (reentrant) flex with the header-file
option. This causes flex to generate a .h file in addition to the usual
lex.yy.c file. However, ylwrap doesn't know about this. What would be the
correct way to use flex with header files?

Regards,
-- 
Pippijn van Steenhoven


signature.asc
Description: Digital signature