diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-23 20:00:05 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-09-26 16:26:29 -0400 |
commit | d11311f66524dd61b4f186bbbc91d0e47b7e4f4d (patch) | |
tree | 71305c620216a15dda02439d64dac7418c1b1baf /common.mk | |
parent | 03119e29b4bb744478e6e01922da4d50cf4cbcbc (diff) |
Makefile: create a standard 'pot' target
Diffstat (limited to 'common.mk')
-rw-r--r-- | common.mk | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) > '$@' |