summaryrefslogtreecommitdiff
path: root/src/lib/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 10:18:04 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:43:36 -0400
commit4b9f4323abfaa0f4030cc29aed97e0716f9c5852 (patch)
tree1dca8650a1a5857f180aaa7704b7b7ee3ba77d32 /src/lib/Makefile
parent5bbf15572626010ce6e2bc783d0a980fc24662b2 (diff)
libremessages: add a few more message routines, and make them gettext-aware.
- Don't set LANG=C in common.sh - Move TEXTDOMAIN stuff into common.sh; so devtools stuff will use it. - Add _(): Basically an alias for `gettext`, but falls back if gettext is not available. - Add panic(): First showed up in `distcc-tool`, does what it sounds like. - Add prose(), bullet(), and flag(): they do word wrapping and such to make it easy to internationalize `--help` text. - Teach common.mk how to make .pot files based on these routines.
Diffstat (limited to 'src/lib/Makefile')
-rw-r--r--src/lib/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/Makefile b/src/lib/Makefile
index d7b4049..255bc05 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -10,8 +10,9 @@ include ../../common.mk
common.sh: %: %.in %.top Makefile
@echo "GEN $@"
@{ \
- cat "$*.top" && \
- echo 'if [[ -z $${_INCLUDE_COMMON_SH:-} ]]; then' && \
- echo '_INCLUDE_COMMON_SH=true' && \
- cat "$*.in" && \
- echo 'fi'; } > "$@"
+ cat '$*.top' && \
+ echo && \
+ sed -r -e '/encoding problem/d;/LANG=/d' -e 's/mesg=\$$(.)/mesg="$$(_ "$$\1")"/' '$*.in' && \
+ echo && \
+ cat '$*.bottom' && \
+ :; } > '$@'