automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.13.1-69-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.13.1-69-g0dee02d
Date: Sat, 12 Jan 2013 17:31:20 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=0dee02df98e29cc6a2d43ba60d6a2b93e715bfc4

The branch, maint has been updated
       via  0dee02df98e29cc6a2d43ba60d6a2b93e715bfc4 (commit)
       via  52b2af5d14fb180aa39bccc8b22df8d1ff33a664 (commit)
       via  b8d77c81afbbcf314ff21d84643c9189923c55a4 (commit)
       via  610d2e5cc49f0b89a2659e36c259ee98087ad9da (commit)
       via  16574dac612eff9e6b6eb1e9c378b840724f93b4 (commit)
      from  1e44f8532f6b7d9d4c59efdb8e2850bc212260af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 doc/automake.texi           |    8 ++--
 lib/ylwrap                  |   26 +++++------
 maintainer/syntax-checks.mk |    4 ++
 t/lex-multiple.sh           |  107 +++++++++++++++++++++++++++++++++++++++++++
 t/list-of-tests.mk          |    1 +
 5 files changed, 128 insertions(+), 18 deletions(-)
 create mode 100755 t/lex-multiple.sh

diff --git a/doc/automake.texi b/doc/automake.texi
index a333a1c..239f9ef 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -6248,10 +6248,10 @@ 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
--i} automatically installs an auxiliary program called
address@hidden in your package (@pxref{Auxiliary Programs}).  This
-program is used by the build rules to rename the output of these
+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
diff --git a/lib/ylwrap b/lib/ylwrap
index 1c4d776..8f072a8 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -1,7 +1,7 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
 
-scriptversion=2012-12-21.17; # UTC
+scriptversion=2013-01-12.17; # UTC
 
 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
@@ -40,7 +40,7 @@ get_dirname ()
 # guard FILE
 # ----------
 # The CPP macro used to guard inclusion of FILE.
-guard()
+guard ()
 {
   printf '%s\n' "$1"                                                    \
     | sed                                                               \
@@ -96,17 +96,17 @@ esac
 
 
 # The input.
-input="$1"
+input=$1
 shift
 # We'll later need for a correct munging of "#line" directives.
 input_sub_rx=`get_dirname "$input" | quote_for_sed`
-case "$input" in
+case $input in
   [\\/]* | ?:[\\/]*)
     # Absolute path; do nothing.
     ;;
   *)
     # Relative path.  Make it absolute.
-    input="`pwd`/$input"
+    input=`pwd`/$input
     ;;
 esac
 input_rx=`get_dirname "$input" | quote_for_sed`
@@ -132,8 +132,8 @@ sed_fix_filenames=
 # guard in its implementation file.
 sed_fix_header_guards=
 
-while test "$#" -ne 0; do
-  if test "$1" = "--"; then
+while test $# -ne 0; do
+  if test x"$1" = x"--"; then
     shift
     break
   fi
@@ -153,16 +153,14 @@ while test "$#" -ne 0; do
 done
 
 # The program to run.
-prog="$1"
+prog=$1
 shift
 # Make any relative path in $prog absolute.
-case "$prog" in
+case $prog in
   [\\/]* | ?:[\\/]*) ;;
-  *[\\/]*) prog="`pwd`/$prog" ;;
+  *[\\/]*) prog=`pwd`/$prog ;;
 esac
 
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines.  But that might take us over the 14-char limit.
 dirname=ylwrap$$
 do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit 
$ret'
 trap "ret=129; $do_exit" 1
@@ -188,7 +186,7 @@ if test $ret -eq 0; then
       # otherwise prepend '../'.
       case $to in
         [\\/]* | ?:[\\/]*) target=$to;;
-        *) target="../$to";;
+        *) target=../$to;;
       esac
 
       # Do not overwrite unchanged header files to avoid useless
@@ -197,7 +195,7 @@ if test $ret -eq 0; then
       # output of all other files to a temporary file so we can
       # compare them to existing versions.
       if test $from != $parser; then
-        realtarget="$target"
+        realtarget=$target
         target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
       fi
 
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index 375738b..6bb7662 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -542,3 +542,7 @@ maintainer-check: $(syntax_check_rules)
 ## Check that the list of tests given in the Makefile is equal to the
 ## list of all test scripts in the Automake testsuite.
 maintainer-check: maintainer-check-list-of-tests
+
+# I'm a lazy typist.
+lint: maintainer-check
+.PHONY: lint
diff --git a/t/lex-multiple.sh b/t/lex-multiple.sh
new file mode 100755
index 0000000..e1c71a1
--- /dev/null
+++ b/t/lex-multiple.sh
@@ -0,0 +1,107 @@
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Check that we can build a program using several lexers at once
+# (assuming Flex is used).  That is a little tricky, but possible.
+# See:
+# <http://lists.gnu.org/archive/html/automake/2010-10/msg00081.html>
+# <http://lists.gnu.org/archive/html/automake/2009-03/msg00061.html>
+
+required='cc flex'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_LEX
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+
+zardoz_SOURCES = main.c
+# Convenience libraries.
+noinst_LIBRARIES = liblex.a liblex-foo.a liblex-bar.a
+zardoz_LDADD = $(noinst_LIBRARIES)
+
+liblex_a_SOURCES = 0.l
+
+# We need the output to always be named 'lex.yy.c', in order for
+# ylwrap to pick it up.
+liblex_foo_a_LFLAGS = -Pfoo --outfile=lex.yy.c
+liblex_foo_a_SOURCES = a.l
+
+# Ditto.
+liblex_bar_a_LFLAGS = -Pbar_ --outfile=lex.yy.c
+liblex_bar_a_SOURCES = b.l
+END
+
+cat > main.c << 'END'
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main (int argc, char *argv[])
+{
+  if (argc != 2)
+    abort ();
+  else if (!strcmp(argv[1], "--vanilla"))
+    return (yylex () != 121);
+  else if (!strcmp(argv[1], "--foo"))
+    return (foolex () != 121);
+  else if (!strcmp(argv[1], "--bar"))
+    return (bar_lex () != 121);
+  else
+    abort ();
+}
+END
+
+cat > 0.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%%
+"VANILLA" { printf (":%s:\n", yytext); return 121; }
+. { printf (":%s:\n", yytext); return 1; }
+%%
+/* Avoid possible link errors. */
+int yywrap (void) { return 1; }
+END
+
+sed 's/VANILLA/FOO/' 0.l > a.l
+sed 's/VANILLA/BAR/' 0.l > b.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+
+if ! cross_compiling; then
+  echo VANILLA | ./zardoz --vanilla
+  echo FOO | ./zardoz --foo
+  echo BAR | ./zardoz --bar
+  ./zardoz --vanilla </dev/null && exit 1
+  echo BAR | ./zardoz --foo && exit 1
+  : For shells with busted 'set -e'.
+fi
+
+$MAKE distcheck
+
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index a6e1cee..44f598e 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -569,6 +569,7 @@ t/lex-header.sh \
 t/lex-lib.sh \
 t/lex-lib-external.sh \
 t/lex-libobj.sh \
+t/lex-multiple.sh \
 t/lex-noyywrap.sh \
 t/lex-clean-cxx.sh \
 t/lex-clean.sh \


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]