X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fpo-targets.make;h=ef8b1c5cae3b1c82a44d0518e6ea70cff5427843;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=6b5e125743c26a5e46ef8d8d3a7703ab42273f50;hpb=47d57fc7c6db37f356f7d0a4413e36fd9d25718a;p=lilypond.git diff --git a/stepmake/stepmake/po-targets.make b/stepmake/stepmake/po-targets.make index 6b5e125743..ef8b1c5cae 100644 --- a/stepmake/stepmake/po-targets.make +++ b/stepmake/stepmake/po-targets.make @@ -1,36 +1,53 @@ - - +XGETTEXT_OPTIONS = \ + --directory=$(src-dir) \ + --directory=. \ + --default-domain=$(package) \ + --from-code=UTF-8 \ + --join \ + --add-comments \ + --msgid-bugs-address="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs" \ + --package-name=$(package) \ + --package-version=$(VERSION) + +sed-header = \# Translation of LilyPond\n\# Copyright \(C\) 1998--2015 Han-Wen Nienhuys, Jan Nieuwenhuizen.\n\# This file is distributed under the same license as the LilyPond package. +sed-content = "Content-Type: text\/plain; charset=UTF-8\\n" #### #### UGH! new-po: - if test -r $(po-dir); then \ - rm -f $(po-dir)/$(outdir)/$(package).po; \ - touch $(po-dir)/$(outdir)/$(package).po; \ + if test -r $(po-srcdir); then \ + rm -f $(po-outdir)/$(package).po; \ + mkdir -p $(po-outdir); \ + touch $(po-outdir)/$(package).po; \ fi ifeq ($(strip $(depth)),.) po: new-po $(LOOP) -localpo: +local-po: @true else -po: localpo +po: local-po $(LOOP) -ALL_PO_SOURCES = $(ALL_C_SOURCES) $(ALL_CC_SOURCES) $(wildcard $(outdir)/*.hh) $(wildcard $(outdir)/*.cc) -localpo: +ALL_PO_SOURCES = $(ALL_C_SOURCES) $(ALL_CC_SOURCES) $(PYTHON_SCRIPTS_IN) $(PY_MODULES_IN) $(SCM_FILES) +local-po: ifneq ($(strip $(ALL_PO_SOURCES)),) @echo $(ALL_PO_SOURCES) - xgettext --c++ --default-domain=$(package) --join \ - --output-dir=$(po-dir)/$(outdir) --add-comments \ - --keyword=_ --keyword=_f --keyword=_i $(ALL_PO_SOURCES) + xgettext $(XGETTEXT_OPTIONS) --output-dir=$(po-outdir) \ + --keyword=_ --keyword=_f --keyword=_i \ + $(XGETTEXT_FLAGS) $(ALL_PO_SOURCES) endif + sed -i '1,2d' $(po-outdir)/$(package).po + sed -i -e 's/^\# This file is distributed.*/$(sed-header)/' $(po-outdir)/$(package).po + sed -i -e 's/^\"Content-Type: text\/plain.*/$(sed-content)/' $(po-outdir)/$(package).po endif po-update: po - $(MAKE) -C $(po-dir) po-update + $(MAKE) -C $(po-outdir)/.. po-update po-changes: - $(MAKE) -C $(po-dir) po-changes + $(MAKE) -C $(po-outdir)/.. po-changes +po-replace: po + $(MAKE) -C $(po-outdir)/.. po-replace