summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 33beed6..ea89de1 100644
--- a/common.mk
+++ b/common.mk
@@ -55,6 +55,9 @@ install_files += $(addprefix $(DESTDIR)$(bindir)/,$(progs)) \
$(addprefix $(DESTDIR)$(mandir)/man8/,$(filter %.8,$(mans)))
clean_files += $(patsubst %.in,%,$(copy_files)) $(copy_files) $(mans) $(wildcard *.pot)
+pots += $(filter-out $(no-pots) ,$(progs))
+pot_files += $(addsuffix .pot,$(pots))
+
# Set the default target #######################################################
all: PHONY build
@@ -81,6 +84,13 @@ build: PHONY $(build_files)
@$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; }
@chmod 755 "$@" || { rm -f -- '$@'; false; }
+# Build ########################################################################
+
+pot: everything.pot
+
+everything.pot: $(pot_files)
+ cat $^ | $(pofmt) > '$@'
+
%.pot: %
{ $(xgettext-sh-std); $(xgettext-sh-prose); } | $(pofmt) > '$@'