* 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 <stefano.lattarini@gmail.com>
if %?MAINTAINER-MODE%
@MAINTAINER_MODE_FALSE@am__skipyacc = 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%
?!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%