summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-07-02 00:13:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-07-02 00:13:02 -0400
commitb23df57cd271ecae89892336eaadcf26b7e9bce8 (patch)
treefe0ee0b806d2ab4fc9ad7abff2fa41ee5689ec28
parent1a7c98894c985df6aa6a695865b6c0f6b0a11265 (diff)
Generate po/*.pot files
-rw-r--r--Makefile10
-rw-r--r--common.mk2
-rw-r--r--po/.gitignore1
3 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 8b811e6..db4735f 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ copy: PHONY $(addprefix copy-, $(packages))
build: PHONY $(addprefix build-, $(packages))
install: PHONY $(addprefix install-,$(packages))
clean: PHONY $(addprefix clean-, $(packages))
+ rm -f po/*.pot
pot: PHONY $(addprefix pot-, $(filter-out doc,$(packages)))
check:
@cd test && ./testenv $(TESTENVFLAGS) roundup
@@ -42,16 +43,21 @@ check:
$(MAKE) -C $* clean
%/pot: PHONY %
$(MAKE) -C $* pot
+%/everything.pot: FORCE %
+ $(MAKE) -C $* everything.pot
.SECONDEXPANSION:
$(addprefix copy-, $(packages)): copy-%: PHONY $$(addsuffix /copy, $$($$*))
$(addprefix build-, $(packages)): build-%: PHONY $$(addsuffix /build, $$($$*))
$(addprefix install-,$(packages)): install-%: PHONY $$(addsuffix /install,$$($$*))
$(addprefix clean-, $(packages)): clean-%: PHONY $$(addsuffix /clean, $$($$*))
-$(addprefix pot-, $(packages)): pot-%: PHONY $$(addsuffix /pot, $$($$*))
+$(addprefix pot-, $(packages)): pot-%: PHONY po/%.pot
+$(addprefix pot-, $(packages)): pot-%: PHONY po/%.pot
+$(foreach p,$(packages),po/$p.pot): po/%.pot: $$(addsuffix /everything.pot,$$($$*))
+ cat $^ | msguniq -Fi > '$@' || rm -f '$@'
################################################################################
FORCE: PHONY
PHONY:
-.PHONY: FORCE PHONY
+.PHONY: PHONY
diff --git a/common.mk b/common.mk
index 0bcc2b8..30c95e0 100644
--- a/common.mk
+++ b/common.mk
@@ -53,7 +53,7 @@ install_files += $(addprefix $(DESTDIR)$(bindir)/,$(progs)) \
$(addprefix $(DESTDIR)$(mandir)/man8/,$(filter %.8,$(mans)))
clean_files += $(patsubst %.in,%,$(copy_files)) $(copy_files) $(mans) $(wildcard *.pot *.ugly*)
-pots += $(filter-out $(no-pots) ,$(progs))
+pots += $(filter-out $(no-pots) ,$(sort $(progs) $(libexecs) $(libs)))
pot_files += $(addsuffix .pot,$(pots))
# Set the default target #######################################################
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..e3a8c5d
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1 @@
+*.pot