blob: 1871e1940352429b8828863270567e3203160ee1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
libretools.pkg = librelib
libretools.src.devtools = common.sh.in archroot.sh.in
libretools.out.libs += common.sh archroot.sh conf.sh
# Build ##############################################################
$(outdir)/conf.sh: $(var.)sysconfdir $(var.)pkgconfdir
# Translate ##########################################################
$(outdir)/blacklist.sh.pot: $(srcdir)/blacklist.sh $(srcdir)/librexgettext
@echo "OUT $@"
@{ \
sed -n '/^# Usage:/,/()/{ /^#/ { =; p; } }' $< | \
sed -r -e 's/^# (.*)/msgid "\1"\nmsgstr ""\n/' \
-e 's|^[0-9]*$$|#. embedded usage text\n#: $(<F):&|' && \
cd $(<D) && ./librexgettext --simple=_l:2 $(<F) && \
:; } | $(libretools.pofmt) > $@
$(outdir)/common.sh.pot : LIBREXGETTEXT_FLAGS += --simple=_l:2
$(outdir)/conf.sh.pot : LIBREXGETTEXT_FLAGS += --simple=_l:2
$(outdir)/librelib.pot : LIBREXGETTEXT_FLAGS += --simple=_l:2
$(outdir)/messages.sh.pot : LIBREXGETTEXT_FLAGS += --simple=_l:2
$(outdir)/librexgettext.pot: LIBREXGETTEXT_FLAGS += --simple=errusage
######################################################################
include $(topsrcdir)/build-aux/Makefile.tail.mk
|