summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-02-15 18:29:57 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-02-15 18:29:57 +0100
commitf4d2f3b76702ee43025c809d3588662859146943 (patch)
tree747e82e7be1ae6b77ecbb6a5443c54e60804bd29 /lib
parentde839e5b0f4a95242f03f731110ac07e72cf146c (diff)
parentb42514b48a5104785737cb4459e177b98d023ed7 (diff)
downloadautomake-f4d2f3b76702ee43025c809d3588662859146943.tar.gz
Merge branch 'yl-work-for-master'
* yl-work-for-master: (44 commits) tests: truly use Lex and Yacc selected by configure news: fix grammaros related to Yacc yacc/lex tests: avoid spurious skips with non-GNU make fixup: remove double news entry tests: workaround for shells with broken 'set -e' tests: avoid spurious failure with non-bison yacc tests: fix spurious failures due to missing 'yywrap()' function fixup: list of yacc/lex tests was botched tests: work around bug#7884 in many yacc/lex tests yacc/lex tests: remove an unneeded workaround for bug#8485 yacc/lex tests: avoid too much failures with FreeBSD make yacc-dist-nobuild.test: add reference to bug#7884 yacc tests: fix bug in 'yacc-cxx.test' lex tests: fix spurious link errors on Solaris lex: "make clean" removes .c files from non-distributed .l lex tests: make test on Lex dependency tracking more "semantic" lex tests: remove erroneous check about ylwrap distribution yacc tests: "make clean" removes C++ files from non-distributed .y tests: add a workaround for automake bug#8485 tests: add a couple of inter-tests reference ...
Diffstat (limited to 'lib')
-rw-r--r--lib/am/yacc.am11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 6d35cd4ba..8ad40742e 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -33,16 +33,19 @@
## distributed or not. We cannot have a generic rule that works in
## both cases, so we ensure in automake that nodist_ parsers always
## use non-generic rules.
-if %?MAINTAINER-MODE%
if %?FIRST%
+if %?MAINTAINER-MODE%
@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
-endif %?FIRST%
endif %?MAINTAINER-MODE%
+## The 's/c$/h/' substitution *must* be the last one.
+am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
+ -e s/c++$$/h++/ -e s/c$$/h/
+endif %?FIRST%
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
-?GENERIC? %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
+?GENERIC? %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
?!GENERIC? %VERBOSE% \
?!GENERIC??DIST_SOURCE? $(am__skipyacc) \
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
+?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%