summaryrefslogtreecommitdiff
path: root/lib/am/yacc.am
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2002-02-25 11:00:35 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2002-02-25 11:00:35 +0000
commitc03cf7393343167c0c363ae5a16489ec066bd328 (patch)
tree9af3892f29d8af535bab0803f58edd68f37a3c39 /lib/am/yacc.am
parentc3f0c7666b8d7d95a7646d9d8257556f715f3a45 (diff)
downloadautomake-c03cf7393343167c0c363ae5a16489ec066bd328.tar.gz
* automake.in (scan_one_autoconf_file): Declare
LEX_OUTPUT_ROOT and LEXLIB as configure variables when AM_PROG_LEX or AC_PROG_LEX are seen. This allows to ... * lib/am/lex.am: ... remove the LEX_OUTPUT_ROOT and LEXLIB definitions. Search %SOURCE% in $(srcdir). Use s||| instead of s/// in the sed invocation, to support filenames containing slashes. * lib/am/yacc.am: Search %SOURCE% in $(srcdir). Use s||| too. * tests/lex5.test, tests/yacc8.test: New files. * tests/Makefile.am (TESTS): Add them.
Diffstat (limited to 'lib/am/yacc.am')
-rw-r--r--lib/am/yacc.am6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 563ba3e83..02d758080 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -19,11 +19,11 @@
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
if %?MORE-THAN-ONE%
- $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
+ $(SHELL) $(YLWRAP) `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
else !%?MORE-THAN-ONE%
- %COMPILE% %SOURCE%
+ %COMPILE% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE%
## Edit out `#line' or `#' directives.
- sed '/^#/ s/y\.tab\.c/%OBJ%/' y.tab.c >%OBJ%
+ sed '/^#/ s|y\.tab\.c|%OBJ%|' y.tab.c >%OBJ%
rm -f y.tab.c
## Edit out Bison multiple inclusion guards. It may be BISON_Y_TAB_H,
## or Y_TAB_H depending upon the version, that's why the regexp is