]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/doclang-targets.make
Fix #303.
[lilypond.git] / make / doclang-targets.make
index 575e6840e9afd0c30a78996b4680c9acb2d320a1..a25935017511d63bac5a83658f40074e26fbbf34 100644 (file)
@@ -3,12 +3,10 @@
 OUT_ITEXI_FILES = $(ITELY_FILES:%.itely=$(outdir)/%.itexi)
 
 LILYPOND_BOOK_INCLUDES += \
-  -I$(depth)/Documentation/$(ISOLANG) \
-  -I$(depth)/Documentation/$(ISOLANG)/user \
-  -I$(depth)/Documentation/user \
-  -I$(builddir)/Documentation/user/$(outdir)
+  -I$(top-src-dir)/Documentation/user \
+  -I$(top-build-dir)/Documentation/user/$(outdir)
 
-default: 
+default:
 
 $(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
 
@@ -16,33 +14,28 @@ MAKEINFO = LANG=$(ISOLANG) $(MAKEINFO_PROGRAM) --force
 
 $(outdir)/lilypond/index.html: $(outdir)/lilypond.nexi doc-po
        mkdir -p $(dir $@)
-       -$(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(depth)/Documentation/texinfo.css --html $<
-       find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(depth)/buildscripts/html-gettext.py $(depth)/Documentation/po/$(outdir) $(ISOLANG)
+       -$(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
+       find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(ISOLANG)
 
-$(outdir)/lilypond.html: $(outdir)/lilypond.nexi
-       -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(depth)/Documentation/texinfo.css --html --no-split --no-headers $< 
+# we don't make the big page until the whole manual is translated
+# if this happens, we'll have to define local-WWW differently for this language
+#$(outdir)/lilypond.html: $(outdir)/lilypond.nexi
+#      -$(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $< 
 
-local-WWW: png-ln $(outdir)/lilypond.html $(outdir)/lilypond/index.html deep-ln lang-merge
+local-WWW: png-ln $(outdir)/lilypond/index.html lang-merge
 
 lang-merge:
-       $(foreach i, $(shell find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME'), ln -f $(i) $(i:$(outdir)/%.html=$(depth)/Documentation/user/$(outdir)/%.$(ISOLANG).html) &&) true
+       $(foreach i, $(shell find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME'), ln -f $(i) $(i:$(outdir)/%.html=$(depth)/Documentation/user/$(outdir)/%.$(ISOLANG).html) &&) true
 
-png-ln:
-       mkdir -p $(outdir)/lilypond
-       # makeinfo is broken, it MUST have PNGs in output dir
-       # symlinking PNGs...
-       $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir) -maxdepth 1 -name '*.png'), ln -sf ../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
-       $(foreach i, $(shell find $(depth)/Documentation/user/$(outdir)/lilypond -name '*.png'), ln -sf ../../$(i) $(i:$(depth)/Documentation/user/$(outdir)/%.png=$(outdir)/%.png) &&) true
-
-# Links referred to by Documentation index
-# BROKEN: the following makes broken symlinks
-#LILYPOND_LINKS = Reference-Manual.html Tutorial.html Ly2dvi.html Midi2ly.html
+LINKED_PNGS = henle-flat-gray.png baer-flat-gray.png lily-flat-bw.png
 
-
-deep-ln:
+# makeinfo is broken, it MUST have PNGs in output dir
+# strangely, this is not true for ly PNGs
+# symlinking PNGs...
+png-ln:
        mkdir -p $(outdir)/lilypond
-       cd $(outdir)/lilypond && $(foreach i, $(LILYPOND_LINKS),\
-                rm -f $(i) && ln -s lilypond.html $(i) &&) true
+       cd $(outdir) && $(foreach i, $(LINKED_PNGS), ln -sf ../$(depth)/Documentation/user/$(i) $(i) &&) true
+       cd $(outdir)/lilypond && $(foreach i, $(LINKED_PNGS), ln -sf ../../$(depth)/Documentation/user/$(i) $(i) &&) true
 
 local-WWW-clean: deep-WWW-clean