[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun ChangeLog GNUmakef...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun ChangeLog GNUmakef... |
Date: |
Mon, 13 May 2013 10:42:27 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 13/05/13 10:42:27
Modified files:
gnun/server/gnun: ChangeLog GNUmakefile.team
Log message:
(html-only, www-only): Rewrite assignments using make functions instead
of
shell invocations; the former is considerably faster.
(pos, team-pos, htmls): New variables.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.370&r2=1.371
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&r1=1.32&r2=1.33
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.370
retrieving revision 1.371
diff -u -b -r1.370 -r1.371
--- ChangeLog 25 Apr 2013 05:52:52 -0000 1.370
+++ ChangeLog 13 May 2013 10:42:27 -0000 1.371
@@ -1,3 +1,10 @@
+2013-05-13 Pavel Kharitonov <address@hidden>
+
+ * GNUmakefile.team (html-only, www-only): Rewrite assignments
+ using make functions instead of shell invocations; the former
+ is considerably faster.
+ (pos, team-pos, htmls): New variables.
+
2013-04-25 Pavel Kharitonov <address@hidden>
* GNUmakefile (generate-translinks): Make spaces
Index: GNUmakefile.team
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- GNUmakefile.team 21 Mar 2013 04:25:44 -0000 1.32
+++ GNUmakefile.team 13 May 2013 10:42:27 -0000 1.33
@@ -374,29 +374,43 @@
pots := $(articles-pot) $(root-articles-pot) $(template-pots)
endif # ! eq (,$(ALL_DIRS))
+pos := \
+$(wildcard $(patsubst %.pot,%.$(TEAM).po,$(filter %.pot,$(pots)))\
+ $(patsubst %.pot.opt,%.$(TEAM).po,$(filter %.pot.opt,$(pots))))
+team-pos := \
+$(wildcard $(patsubst $(wwwdir)%,%,$(subst /po/,/,$(pos))))
+htmls := \
+$(wildcard $(subst /po/,/,\
+ $(patsubst %.pot.opt,%.$(TEAM).html, $(filter %.pot.opt,$(pots)))\
+ $(patsubst %.pot,%.$(TEAM).html, $(filter %.pot,$(pots)))))
+
# Team's translations that lack PO file.
-# Note: optional templates can't have HTML translations, so grep -v '\.opt$$'.
-html-only := $(shell echo $(pots) | sed 's/ /\n/g' \
- | grep -v '\.opt$$' | while read pot; do \
- po=$${po%pot}$(TEAM).po; \
- team_po=`echo $$po | sed 's,/po/,/,; s,^$(wwwdir),./,'`; \
- html=$${po%po}html; html=$${html/\/po\//\/}; \
- if ! test -f $$po && ! test -f $$team_po && test -f $$html; then \
- echo $${team_po}; \
- fi; \
- done)
+# Note: optional templates can't have HTML translations, so $(filter %.pot...
+html-only := \
+$(strip \
+ $(foreach pot, $(filter %.pot,$(pots)),\
+ $(if $(findstring $(subst /po/,/,$(pot:%.pot=%.$(TEAM).html)),$(htmls)),\
+ $(if $(or $(findstring $(pot:%.pot=%.$(TEAM).po),$(pos)),\
+ $(findstring $(subst /po/,/,$(pot)),\
+ $(addprefix $(wwwdir),$(team-pos)))\
+ ),,\
+ $(patsubst $(wwwdir)%.pot,%.$(TEAM).po,$(subst /po/,/,$(pot)))))\
+ )\
+ )
$(eval $(call sorted-files,html,${html-only}))
# Team's translations that lack PO file.
-www-only := $(shell echo $(pots) | sed 's/ /\n/g' \
- | while read pot; do \
- po=$${pot%.opt}; po=$${po%pot}$(TEAM).po; \
- team_po=`echo $$po | sed 's,/po/,/,; s,^$(wwwdir),./,'`; \
- html=$${po%po}html; html=$${html/\/po\//\/}; \
- if test -f $$po && ! test -f $$team_po; then \
- echo $${team_po}; \
- fi; \
- done)
+www-only := \
+$(strip \
+ $(foreach base, $(patsubst %.pot.opt,%,$(filter %.pot.opt,$(pots)))\
+ $(patsubst %.pot,%,$(filter %.pot,$(pots))),\
+ $(if $(findstring $(base).$(TEAM).po,$(pos)),\
+ $(if $(findstring $(subst /po/,/,$(base)).$(TEAM).po,\
+ $(addprefix $(wwwdir),$(team-pos))),,\
+ $(patsubst $(wwwdir)%,%.$(TEAM).po,$(subst /po/,/,$(base))))\
+ )\
+ )\
+ )
$(eval $(call sorted-files,www,${www-only}))
# Function to report a group of PO files.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- trans-coord/gnun/server/gnun ChangeLog GNUmakef...,
Pavel Kharitonov <=