From d11311f66524dd61b4f186bbbc91d0e47b7e4f4d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 23 Sep 2013 20:00:05 -0400 Subject: Makefile: create a standard 'pot' target --- common.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common.mk') 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) > '$@' -- cgit v1.2.3