[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: YLWRAP should always be found in $config_aux_dir?
From: |
Alexandre Duret-Lutz |
Subject: |
Re: YLWRAP should always be found in $config_aux_dir? |
Date: |
Tue, 03 Aug 2004 22:19:23 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
>>> "Norman" == Norman Gray <address@hidden> writes:
[...]
Norman> * configure.ac does not define AC_CONFIG_AUX_DIR, but does declare
Norman> AM_PROG_LEX, along with the corresponding snippet described in
Norman> the autoconf manual;
Norman> * there is a symlink ../install-sh (and ../missing, and so on) from
Norman> an earlier/higher-level autoreconf;
Norman> * there are multiple lex files in the directory.
Norman> Running "automake --add-missing" installs ../ylwrap as it should, but
Norman> defines and substitutes YLWRAP to be $(top_srcdir)/ylwrap in the
Norman> generated Makefile.in. When this is configured, of course, this turns
Norman> into ./ylwrap, which loses.
Thanks for the report and the analysis. I'm installing this on
HEAD and branch-1-9.
2004-08-03 Alexandre Duret-Lutz <address@hidden>
* 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.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1569.2.1
diff -u -r1.1569.2.1 automake.in
--- automake.in 1 Aug 2004 22:18:33 -0000 1.1569.2.1
+++ automake.in 3 Aug 2004 20:16:10 -0000
@@ -5310,22 +5310,15 @@
# 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;
+ 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);
- }
+ # 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
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.44.2.1
diff -u -r1.44.2.1 automake.texi
--- doc/automake.texi 2 Aug 2004 20:27:16 -0000 1.44.2.1
+++ doc/automake.texi 3 Aug 2004 20:16:18 -0000
@@ -3777,11 +3777,11 @@
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
address@hidden 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
Index: tests/subpkg.test
===================================================================
RCS file: /cvs/automake/automake/tests/subpkg.test,v
retrieving revision 1.8
diff -u -r1.8 subpkg.test
--- tests/subpkg.test 14 Nov 2003 21:26:01 -0000 1.8
+++ tests/subpkg.test 3 Aug 2004 20:16:18 -0000
@@ -1,5 +1,5 @@
#! /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.
#
@@ -20,7 +20,7 @@
# Check subpackage handling.
-required=gcc
+required='gcc bison'
. ./defs || exit 1
set -e
@@ -73,23 +73,37 @@
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 ()
{
@@ -105,7 +119,7 @@
$ACLOCAL -I ../m4
$FGREP 'm4_include([../m4/foo.m4])' aclocal.m4
$AUTOCONF
-$AUTOMAKE -Wno-override
+$AUTOMAKE -Wno-override --add-missing
cd ..
./configure
--
Alexandre Duret-Lutz