From 03119e29b4bb744478e6e01922da4d50cf4cbcbc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 23 Sep 2013 19:58:09 -0400 Subject: Makefile: fix xgettext rules --- src/chroot-tools/Makefile | 3 +-- src/lib/Makefile | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 0540636..db1cdf5 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -40,5 +40,4 @@ archroot: %: %.in Makefile @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } @chmod 755 "$@" || { rm -f -- '$@'; false; } -distcc-tool.pot: distcc-tool - xgettext --omit-header -i --from-code=UTF-8 -L shell --keyword={error,errusage} -o $@ $< +distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage diff --git a/src/lib/Makefile b/src/lib/Makefile index 45fd330..fd6d31d 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -23,8 +23,9 @@ pot: libreblacklist.pot common.sh.pot librelib.pot libreblacklist.pot: libreblacklist { \ - sed -n '/^# Usage:/,/()/{ /^#/ { =; p; } }' $< | sed -r -e 's/^# (.*)/msgid "\1"/' -e 's/^[0-9]*$$/#. embedded usage text\n#: $<:&/'; \ - sed -rn '/print /{ =; s/\s*print "([^"]*)".*/msgid "\1"/p; }' $< | sed 's/^[0-9]*$$/#. print\n#: $<:&/' ; \ - } | sed 's/^msgid .*/&\nmsgstr ""\n/' > $@ -common.sh.pot: common.sh - xgettext --omit-header -i --from-code=UTF-8 -L shell -o $@ $< + sed -n '/^# Usage:/,/()/{ /^#/ { =; p; } }' $< | \ + sed -r -e 's/^# (.*)/msgid "\1"\nmsgstr ""\n/' \ + -e 's/^[0-9]*$$/#. embedded usage text\n#: $<:&/'; \ + $(xgettext-sh-prose); \ + $(xgettext-sh-std); \ + } | $(pofmt) > $@ -- cgit v1.2.2