]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - intl/Makefile.in
intl: Allow building both with old bison and bison >= 3 [PR92008]
[thirdparty/gcc.git] / intl / Makefile.in
index 3dd0b7fe8fdf3906898749bdeb2d914f60babac3..bdb74ebb78c6af4be5fad7f37f31fd7fd5f13d72 100644 (file)
@@ -133,7 +133,11 @@ libintl.h: $(srcdir)/libgnuintl.h
        $(COMPILE) $<
 
 .y.c:
-       $(YACC) $(YFLAGS) --output $@ $<
+@BISON3_YES@   sed 's,%pure_parser,,;s,^/\* BISON3 \(.*\) \*/$$,\1,' $< > $@.y
+@BISON3_YES@   $(YACC) $(YFLAGS) --output $@.c $@.y
+@BISON3_YES@   sed 's/\.c\.y"/.y"/' $@.c > $@
+@BISON3_YES@   rm -f $@.c $@.y $@.h
+@BISON3_NO@    $(YACC) $(YFLAGS) --output $@ $<
        rm -f $*.h
 
 INCLUDES = -I. -I$(srcdir)