[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 4/5] [ng] yacc/c++: prefer automake-time processing
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 4/5] [ng] yacc/c++: prefer automake-time processing over recipe-time one |
Date: |
Wed, 6 Jun 2012 00:52:11 +0200 |
* lib/am/yacc.am (am__yacc_c2h): Transform from a sed command to a
make function.
(Rules for Yacc -> C transform): Adjust.
Signed-off-by: Stefano Lattarini <address@hidden>
---
lib/am/yacc.am | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 4815087..e6f21b6 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -36,9 +36,7 @@ if %?FIRST%
if %?MAINTAINER-MODE%
@address@hidden = test -f $@ ||
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/
+am__yacc_c2h = $(basename $1)$(subst c,h,$(suffix $1))
endif %?FIRST%
?GENERIC?%%DERIVED-EXT%: %%EXT%
@@ -49,6 +47,6 @@ endif %?FIRST%
?!GENERIC??DIST_SOURCE? $(am__skipyacc) \
$(SHELL) $(YLWRAP) $< \
y.tab.c $@ \
- y.tab.h `echo %OBJ% | $(am__yacc_c2h)` \
+ y.tab.h $(call am__yacc_c2h,$@) \
y.output %BASE%.output \
-- %COMPILE%
--
1.7.9.5
[Automake-NG] [PATCH 5/5] [ng] yacc: prefer use of automatic variables over automake-time transforms, Stefano Lattarini, 2012/06/05
Re: [Automake-NG] [PATCH 0/5] Some minor cleanup and fixlets for lex and yacc, Akim Demaille, 2012/06/06