* [PATCH 0/1] old-fashioned suffix rules cannot have any prerequisites
@ 2020-04-01 12:26 Petr Ovtchenkov
2020-04-01 12:26 ` [PATCH 1/1] " Petr Ovtchenkov
0 siblings, 1 reply; 3+ messages in thread
From: Petr Ovtchenkov @ 2020-04-01 12:26 UTC (permalink / raw)
To: bug-gnulib; +Cc: Petr Ovtchenkov
Template po/Makefile.in.in use old-fashioned suffix rules
for generating .gmo. But this rules do not allow any prerequisites.
See:
https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html#Suffix-Rules
<snip>
Suffix rules cannot have any prerequisites of their own. If they have
any, they are treated as normal files with funny names, not as suffix
rules. Thus, the rule:
...
</snip>
This lead to problem when used relatively new GNU Make:
<snip>
make[3]: *** No rule to make target 'en.gmo', needed by ...
</snip>
In this patch I am avoid significant changes and gmake-specific
syntax. BTW, looks, that "%ts: %ds" notaion is preferable for BSD make too:
https://www.freebsd.org/cgi/man.cgi?query=make&apropos=0&sektion=0&manpath=SunOS+5.9&format=html
(Implicit Rules section).
Petr Ovtchenkov (1):
old-fashioned suffix rules cannot have any prerequisites
build-aux/po/Makefile.in.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.25.0.dirty
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] old-fashioned suffix rules cannot have any prerequisites
2020-04-01 12:26 [PATCH 0/1] old-fashioned suffix rules cannot have any prerequisites Petr Ovtchenkov
@ 2020-04-01 12:26 ` Petr Ovtchenkov
0 siblings, 0 replies; 3+ messages in thread
From: Petr Ovtchenkov @ 2020-04-01 12:26 UTC (permalink / raw)
To: bug-gnulib; +Cc: Petr Ovtchenkov
See:
https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html#Suffix-Rules
<snip>
Suffix rules cannot have any prerequisites of their own. If they have
any, they are treated as normal files with funny names, not as suffix
rules. Thus, the rule:
...
</snip>
---
build-aux/po/Makefile.in.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build-aux/po/Makefile.in.in b/build-aux/po/Makefile.in.in
index e4169b338..320cef068 100644
--- a/build-aux/po/Makefile.in.in
+++ b/build-aux/po/Makefile.in.in
@@ -107,7 +107,7 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
# the .pot file. This eliminates the need to update the .po files when the
# .pot file has changed, which would be troublesome if the .po files are put
# under version control.
-.po.gmo: $(srcdir)/$(DOMAIN).pot
+%.gmo: %.po $(srcdir)/$(DOMAIN).pot
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
@@ -118,7 +118,7 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
mv t-$${lang}.gmo $${lang}.gmo && \
rm -f $${lang}.1po
-.sin.sed:
+%.sed: %.sin
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
@@ -444,14 +444,14 @@ update-po: Makefile
# General rule for creating PO files.
-.nop.po-create:
+%.po-create: %.nop
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
-.nop.po-update:
+%.po-update: %.nop
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
--
2.25.0.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 1/1] old-fashioned suffix rules cannot have any prerequisites
2020-04-01 13:12 [PATCH 0/1] " Petr Ovtchenkov
@ 2020-04-01 13:12 ` Petr Ovtchenkov
0 siblings, 0 replies; 3+ messages in thread
From: Petr Ovtchenkov @ 2020-04-01 13:12 UTC (permalink / raw)
To: bug-gnulib; +Cc: Petr Ovtchenkov
See:
https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html#Suffix-Rules
<snip>
Suffix rules cannot have any prerequisites of their own. If they have
any, they are treated as normal files with funny names, not as suffix
rules. Thus, the rule:
...
</snip>
---
build-aux/po/Makefile.in.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/build-aux/po/Makefile.in.in b/build-aux/po/Makefile.in.in
index e4169b338..320cef068 100644
--- a/build-aux/po/Makefile.in.in
+++ b/build-aux/po/Makefile.in.in
@@ -107,7 +107,7 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
# the .pot file. This eliminates the need to update the .po files when the
# .pot file has changed, which would be troublesome if the .po files are put
# under version control.
-.po.gmo: $(srcdir)/$(DOMAIN).pot
+%.gmo: %.po $(srcdir)/$(DOMAIN).pot
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
@@ -118,7 +118,7 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
mv t-$${lang}.gmo $${lang}.gmo && \
rm -f $${lang}.1po
-.sin.sed:
+%.sed: %.sin
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
@@ -444,14 +444,14 @@ update-po: Makefile
# General rule for creating PO files.
-.nop.po-create:
+%.po-create: %.nop
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
-.nop.po-update:
+%.po-update: %.nop
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
--
2.25.0.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-01 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 12:26 [PATCH 0/1] old-fashioned suffix rules cannot have any prerequisites Petr Ovtchenkov
2020-04-01 12:26 ` [PATCH 1/1] " Petr Ovtchenkov
-- strict thread matches above, loose matches on Subject: below --
2020-04-01 13:12 [PATCH 0/1] " Petr Ovtchenkov
2020-04-01 13:12 ` [PATCH 1/1] " Petr Ovtchenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).