diff options
Diffstat (limited to 'src/lib/Makefile')
-rw-r--r-- | src/lib/Makefile | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/src/lib/Makefile b/src/lib/Makefile index 97b30eb..f9ec1e8 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -1,17 +1,17 @@ -copy_files = common.sh.in -libexecs = $(filter-out librelib,$(progs)) -# include common.sh in libs explicitly, because it might not exist yet -# when the wildcard is performed -libs = $(sort $(wildcard *.sh) common.sh conf.sh) +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk -include ../../common.mk +install-libs += common.sh conf.sh +devtools-files = common.sh.in # Build ############################################################## -common.sh: %: %.in %.top Makefile - @echo "GEN $@" +$(outdir)/conf.sh: $(var)sysconfdir $(var)pkgconfdir + +$(outdir)/common.sh: $(outdir)/%: $(srcdir)/%.in $(srcdir)/%.head $(srcdir)/%.tail $(outdir)/Makefile + @echo "OUT $@" @{ \ - cat '$*.top' && \ + cat '$(<D)/$*.head' && \ echo && \ sed -r \ -e '/encoding problem/d;/LANG=/d' \ @@ -19,21 +19,27 @@ common.sh: %: %.in %.top Makefile -e 's/gettext /_l _ /g' \ -e "s/^(\s+)(msg|error) '/\1_l \2 '/" \ -e 's|lock\(\)\s*\{|lock()\n{|' \ - '$*.in' && \ + '$(<D)/$*.in' && \ echo && \ - cat '$*.bottom' && \ + cat '$(<D)/$*.tail' && \ :; } > '$@' # Translate ########################################################## -LIBREXGETTEXT_FLAGS += --simple=_l:2 - -libreblacklist.pot: libreblacklist librexgettext - { \ +$(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#: $<:&/'; \ - ./librexgettext $<; \ - } | $(pofmt) > $@ + -e 's/^[0-9]*$$/#. embedded usage text\n#: $<:&/' && \ + $(<D)/librexgettext --simple=_l:2 $< && \ + :; } | $(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 + +###################################################################### -librexgettext.pot: LIBREXGETTEXT_FLAGS += --simple=errusage +include $(topsrcdir)/automake.tail.mk |