+2004-08-03 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * automake.in (yacc_lex_finish_helper): Fix definition of YLWRAP
+ when ylwrap is installed in a default aux dir found in a parent
+ package.
+ * tests/subpkg.test: Augment to check that YLWRAP is installed
+ properly.
+ * doc/automake.texi (Yacc and Lex): ylwrap is not sought is the
+ current directory.
+ Report from Norman Gray.
+
2004-08-02 Alexandre Duret-Lutz <adl@gnu.org>
* doc/automake.texi (Optional): Update documentation for
# This is a helper for both lex and yacc.
sub yacc_lex_finish_helper
{
- return if defined $language_scratch{'lex-yacc-done'};
- $language_scratch{'lex-yacc-done'} = 1;
-
- # If there is more than one distinct yacc (resp lex) source file
- # in a given directory, then the `ylwrap' program is required to
- # allow parallel builds to work correctly. FIXME: for now, no
- # line number.
- require_conf_file ($configure_ac, FOREIGN, 'ylwrap');
- if ($config_aux_dir_set_in_configure_ac)
- {
- &define_variable ('YLWRAP', "$am_config_aux_dir/ylwrap", INTERNAL);
- }
- else
- {
- &define_variable ('YLWRAP', '$(top_srcdir)/ylwrap', INTERNAL);
- }
+ return if defined $language_scratch{'lex-yacc-done'};
+ $language_scratch{'lex-yacc-done'} = 1;
+
+ # If there is more than one distinct yacc (resp lex) source file
+ # in a given directory, then the `ylwrap' program is required to
+ # allow parallel builds to work correctly. FIXME: for now, no
+ # line number.
+ require_conf_file ($configure_ac, FOREIGN, 'ylwrap');
+ &define_variable ('YLWRAP', "$am_config_aux_dir/ylwrap", INTERNAL);
}
sub lang_yacc_finish
Automake uses a small program called @code{ylwrap} to run @code{yacc}
(or @code{lex}) in a subdirectory. This is necessary because yacc's
output filename is fixed, and a parallel make could conceivably invoke
-more than one instance of @code{yacc} simultaneously. The @code{ylwrap}
-program is distributed with Automake. It should appear in the directory
-specified by @samp{AC_CONFIG_AUX_DIR} (@pxref{Input, , Finding
-`configure' Input, autoconf, The Autoconf Manual}), or the current
-directory if that macro is not used in @file{configure.ac}.
+more than one instance of @code{yacc} simultaneously. The
+@code{ylwrap} program is distributed with Automake. It should appear
+in the directory specified by @samp{AC_CONFIG_AUX_DIR}, or one of its
+default locations (@pxref{Input, , Finding `configure' Input,
+autoconf, The Autoconf Manual}).
For @code{yacc}, simply managing locking is insufficient. The output of
@code{yacc} always uses the same symbol names internally, so it isn't
-@set UPDATED 28 July 2004
-@set UPDATED-MONTH July 2004
+@set UPDATED 3 August 2004
+@set UPDATED-MONTH August 2004
@set EDITION 1.9.0a
@set VERSION 1.9.0a
-@set UPDATED 28 July 2004
-@set UPDATED-MONTH July 2004
+@set UPDATED 3 August 2004
+@set UPDATED-MONTH August 2004
@set EDITION 1.9.0a
@set VERSION 1.9.0a
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# Check subpackage handling.
-required=gcc
+required='gcc bison'
. ./defs || exit 1
set -e
AC_INIT([lib], [2.3])
AM_INIT_AUTOMAKE
AC_PROG_RANLIB
+AC_PROG_YACC
AC_CONFIG_FILES([Makefile])
FOO
EOF
cat >lib/Makefile.am <<'EOF'
noinst_LIBRARIES = liblib.a
-liblib_a_SOURCES = src/x.c
+liblib_a_SOURCES = src/x.c foo.y
+EXTRA_liblib_a_SOURCES = bar.y
dist-hook:
test ! -f $(distdir)/LDADD.c
test -f $(top_distdir)/LDADD.c
test -f $(distdir)/src/x.c
test ! -f $(top_distdir)/src/x.c
+ test -f $(YLWRAP)
ACLOCAL_AMFLAGS = -I ../m4
EOF
+cat > lib/foo.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cp lib/foo.y lib/bar.y
+
cat >lib/src/x.c <<'EOF'
int lib ()
{
$ACLOCAL -I ../m4
$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
$AUTOCONF
-$AUTOMAKE -Wno-override
+$AUTOMAKE -Wno-override --add-missing
cd ..
./configure