diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-27 19:33:06 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-27 19:33:06 -0400 |
commit | d7763f0a6cb902e969305d02a18ec13d84227d9d (patch) | |
tree | cc343ee3a753bf60aaedc9298c215703c30756e7 /common.mk | |
parent | fb94599dcea71cdf2cb448e1545cfbdc526288a1 (diff) |
Add librexgettext, to make generating .pot file easy for librelib users.
I don't like how much longer this is than the Makefile, but most of it is
option parsing and usage text.
Diffstat (limited to 'common.mk')
-rw-r--r-- | common.mk | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -22,17 +22,6 @@ indent = emacs --batch $1 \ # Normalize a .po(t) file pofmt = msguniq -Fi -xgettext-keywords-sh += --keyword={_,print} -xgettext-keywords-sh += --keyword={msg,msg2,warning,error,stat_busy,die} -xgettext-keywords-sh += --keyword={lock,slock}:3 - -xgettext-sh = xgettext --omit-header --from-code=UTF-8 -L shell -o - -xgettext-sh-std = $(xgettext-sh) $(xgettext-keywords-sh) $^ - -pot-remove-wrap = tr '\n' '\r' | sed 's/"\r\s*"//g' | tr '\r' '\n' -html-whitespace-collapse = sed -r -e 's/(\\n|\\t|\t)/ /g' -e 's/ +/ /g' -xgettext-sh-prose = $(xgettext-sh) -k --keyword={prose,bullet,flag:2} $^ | $(pot-remove-wrap) | $(html-whitespace-collapse) | sed '/^\#, sh-format/d' - # Usage: as a variable # relative path to `/` from $(bindir) # used for symlinking libexec files @@ -112,8 +101,8 @@ pot: everything.pot everything.pot: $(pot_files) cat $^ | $(pofmt) > '$@' -%.pot: % - { $(xgettext-sh-std); $(xgettext-sh-prose); } | $(pofmt) > '$@' +%.pot: % $(topdir)/src/lib/librexgettext + $(topdir)/src/lib/librexgettext $(LIBREXGETTEXT_FLAGS) $< > '$@' # Install ###################################################################### |