]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - intl/Makefile.in
intl: Unbreak intl build with bison 3 when no regeneration is needed [PR92008]
[thirdparty/binutils-gdb.git] / intl / Makefile.in
index bdb74ebb78c6af4be5fad7f37f31fd7fd5f13d72..356c8ab9b653d568d1d17dcf0bc3a07dc7ed589f 100644 (file)
@@ -57,6 +57,7 @@ HEADERS = \
   gettextP.h \
   hash-string.h \
   loadinfo.h \
+  plural-config.h \
   plural-exp.h \
   eval-plural.h \
   localcharset.h \
@@ -133,10 +134,12 @@ libintl.h: $(srcdir)/libgnuintl.h
        $(COMPILE) $<
 
 .y.c:
+@BISON3_YES@   echo '#define USE_BISON3' > $(patsubst %.c,%-config.h,$@)
 @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@    echo '/* #define USE_BISON3 */' > $(patsubst %.c,%-config.h,$@)
 @BISON3_NO@    $(YACC) $(YFLAGS) --output $@ $<
        rm -f $*.h
 
@@ -165,7 +168,7 @@ dngettext.o finddomain.o gettext.o intl-compat.o loadmsgcat.o \
 localealias.o ngettext.o textdomain.o: gettextP.h gmo.h loadinfo.h
 dcigettext.o loadmsgcat.o: hash-string.h
 explodename.o l10nflist.o: loadinfo.h
-dcigettext.o loadmsgcat.o plural.o plural-exp.o: plural-exp.h
+dcigettext.o loadmsgcat.o plural.o plural-exp.o: plural-exp.h plural-config.h
 dcigettext.o: eval-plural.h
 localcharset.o: localcharset.h
 localealias.o localcharset.o relocatable.o: relocatable.h
@@ -242,6 +245,8 @@ $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps)
 config.h: stamp-h1
        test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1)
 
+plural-config.h: plural.c
+
 stamp-h1: $(srcdir)/config.h.in config.status
        -rm -f stamp-h1
        $(SHELL) ./config.status config.h