From d71294a12d9a0ec1fe5acfce9d0e95e4a7882b47 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 27 May 2023 01:46:03 +0200 Subject: [PATCH] build: Make bison rules more reliable. * gettext-runtime/intl/Makefile.am ($(srcdir)/plural.c): Fix sed expressions. * gettext-tools/src/Makefile.am (po-gram-gen.c, cldr-plural.c): Likewise. --- gettext-runtime/intl/Makefile.am | 4 ++-- gettext-tools/src/Makefile.am | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gettext-runtime/intl/Makefile.am b/gettext-runtime/intl/Makefile.am index 1eff31b45..110ede8c6 100644 --- a/gettext-runtime/intl/Makefile.am +++ b/gettext-runtime/intl/Makefile.am @@ -269,11 +269,11 @@ MOSTLYCLEANFILES += libintl.h $(srcdir)/plural.c: $(srcdir)/plural.y $(AM_V_YACC)$(BISON) -d $(BISONFLAGS) $(srcdir)/plural.y \ && test ':' = '$(BISON)' || { \ - sed -e 's|".*/plural.y"|"plural.y"|' \ + sed -e 's|".*/plural\.y"|"plural.y"|' \ -e 's|"plural\.tab\.c"|"plural.c"|' \ -e 's|"plural\.tab\.h"|"plural.h"|' \ < plural.tab.c > plural.c-tmp \ - && sed -e 's|".*/plural.y"|"plural.y"|' \ + && sed -e 's|".*/plural\.y"|"plural.y"|' \ -e 's|"plural\.tab\.h"|"plural.h"|' \ < plural.tab.h > plural.h-tmp \ && rm -f plural.tab.c plural.tab.h \ diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 0d6979fe2..ad495ec96 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -568,11 +568,11 @@ endif po-gram-gen.c po-gram-gen.h: po-gram-gen.y $(AM_V_YACC)$(BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/po-gram-gen.y \ && test ':' = '$(BISON)' || { \ - sed -e 's|".*/po-gram-gen.y"|"po-gram-gen.y"|' \ + sed -e 's|".*/po-gram-gen\.y"|"po-gram-gen.y"|' \ -e 's|"po-gram-gen\.tab\.c"|"po-gram-gen.c"|' \ -e 's|"po-gram-gen\.tab\.h"|"po-gram-gen.h"|' \ < po-gram-gen.tab.c > po-gram-gen.c-tmp \ - && sed -e 's|".*/po-gram-gen.y"|"po-gram-gen.y"|' \ + && sed -e 's|".*/po-gram-gen\.y"|"po-gram-gen.y"|' \ -e 's|"po-gram-gen\.tab\.h"|"po-gram-gen.h"|' \ < po-gram-gen.tab.h > po-gram-gen.h-tmp \ && rm -f po-gram-gen.tab.c po-gram-gen.tab.h \ @@ -602,11 +602,11 @@ po-lex.o po-lex.lo: po-gram-gen2.h cldr-plural.c cldr-plural.h: cldr-plural.y $(AM_V_YACC)$(BISON) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/cldr-plural.y \ && test ':' = '$(BISON)' || { \ - sed -e 's|".*/cldr-plural.y"|"cldr-plural.y"|' \ + sed -e 's|".*/cldr-plural\.y"|"cldr-plural.y"|' \ -e 's|"cldr-plural\.tab\.c"|"cldr-plural.c"|' \ -e 's|"cldr-plural\.tab\.h"|"cldr-plural.h"|' \ < cldr-plural.tab.c > cldr-plural.c-tmp \ - && sed -e 's|".*/cldr-plural.y"|"cldr-plural.y"|' \ + && sed -e 's|".*/cldr-plural\.y"|"cldr-plural.y"|' \ -e 's|"cldr-plural\.tab\.h"|"cldr-plural.h"|' \ < cldr-plural.tab.h > cldr-plural.h-tmp \ && rm -f cldr-plural.tab.c cldr-plural.tab.h \ -- 2.47.2