summaryrefslogtreecommitdiff
path: root/src/lib/Makefile
blob: 900623d0fb9b4e8805ce2bd88da2bab090b7d2bb (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
include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk

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#: $<:&|' && \
		$(<D)/librexgettext --simple=_l:2 $< && \
	:; } | $(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