]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/po-targets.make
Add support for measures split across lines.
[lilypond.git] / stepmake / stepmake / po-targets.make
index bb6215cf3025161afd1a5b7452f9e2abdfb011b9..c971e513c034b8dcc6e45ef4ae05db00ea33370c 100644 (file)
@@ -1,4 +1,6 @@
 XGETTEXT_OPTIONS = \
+        --directory=$(src-dir) \
+        --directory=. \
        --default-domain=$(package) \
        --from-code=UTF-8 \
        --join \
@@ -13,9 +15,10 @@ 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)),.)
@@ -30,21 +33,21 @@ ALL_PO_SOURCES = $(ALL_C_SOURCES) $(ALL_CC_SOURCES) $(PYTHON_SCRIPTS_IN) $(PY_MO
 local-po:
 ifneq ($(strip $(ALL_PO_SOURCES)),)
        @echo $(ALL_PO_SOURCES)
-       xgettext $(XGETTEXT_OPTIONS) --output-dir=$(po-dir)/$(outdir) \
+       xgettext $(XGETTEXT_OPTIONS) --output-dir=$(po-outdir) \
         --keyword=_ --keyword=_f --keyword=_i \
         $(XGETTEXT_FLAGS) $(ALL_PO_SOURCES)
 endif
 endif
-       sed -i '1,2d' $(po-dir)/$(outdir)/$(package).po
-       sed -i -e 's/^\# This file is distributed.*/$(sed-header)/' $(po-dir)/$(outdir)/$(package).po
-       sed -i -e 's/^\"Content-Type: text\/plain.*/$(sed-content)/' $(po-dir)/$(outdir)/$(package).po
+       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
 
 
 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-dir) po-replace
+       $(MAKE) -C $(po-outdir)/.. po-replace