summaryrefslogtreecommitdiff
path: root/lib/am/lex.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/lex.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/lex.am')
-rw-r--r--lib/am/lex.am11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/am/lex.am b/lib/am/lex.am
index e78fb8918..24d9d44ae 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -16,18 +16,13 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-## FIXME: These two are to be removed once we trace Autoconf, since
-## they are AC_SUBST'ed.
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
-LEXLIB = @LEXLIB@
-
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
if %?MORE-THAN-ONE%
- $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
+ $(SHELL) $(YLWRAP) `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
else !%?MORE-THAN-ONE%
- %COMPILE% %SOURCE%
+ %COMPILE% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE%
## Edit out `#line' or `#' directives.
- sed '/^#/ s/$(LEX_OUTPUT_ROOT)\.c/%OBJ%/' $(LEX_OUTPUT_ROOT).c >%OBJ%
+ sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|%OBJ%|' $(LEX_OUTPUT_ROOT).c >%OBJ%
rm -f $(LEX_OUTPUT_ROOT).c
endif !%?MORE-THAN-ONE%