]> git.donarmstrong.com Git - lilypond.git/blobdiff - website.make
Doc-hu: typo
[lilypond.git] / website.make
index f301272d6761345f92ffe1791a2610da4600ae85..3170bc6f6a68afe8dfdf0b78db5d6b52f0e0b05e 100644 (file)
@@ -27,13 +27,17 @@ endif
 
 ################################################################
 OUT=out-website
+WEB_LANGS=es fr
 
-TEXI2HTML=TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
+
+TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
 
 EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py
 CREATE_VERSION=python $(script-dir)/create-version-itexi.py
 CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py
+MASS_LINK=python $(script-dir)/mass-link.py
 
+SERVER_FILES=$(top-src-dir)/Documentation/web/server/
 
 # don't include web
 MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely)
@@ -54,6 +58,14 @@ website-xrefs: website-version
        $(foreach manual, $(MANUALS), \
                $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \
                -I $(OUT) -o $(OUT) $(manual) && ) :
+       # translations
+       for l in $(WEB_LANGS); do \
+               $(EXTRACT_TEXI_FILENAMES) \
+                       -I $(top-src-dir)/Documentation/"$$l" \
+                       -I $(OUT) -o $(OUT) --split=node \
+                       $(top-src-dir)/Documentation/"$$l"/web.texi ;\
+       done;
+
 
 website-texinfo: website-version website-xrefs
        $(TEXI2HTML) --prefix=index \
@@ -64,6 +76,21 @@ website-texinfo: website-version website-xrefs
                -D web_version \
                --output=$(OUT)/website/ \
                $(top-src-dir)/Documentation/web.texi
+       # translations
+       for l in $(WEB_LANGS); do \
+               $(TEXI2HTML) --prefix=index \
+                       --split=section \
+                       --I=$(top-src-dir)/Documentation/"$$l" \
+                       --I=$(top-src-dir)/Documentation/ \
+                       --I=$(OUT) \
+                       --lang="$$l" \
+                       --init-file=$(texi2html-init-file) \
+                       -D web_version \
+                       --output=$(OUT)/"$$l" \
+                       $(top-src-dir)/Documentation/"$$l"/web.texi ; \
+               find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \
+       done
+
 
 website-css:
        cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/
@@ -77,7 +104,8 @@ website-examples:
        mkdir -p $(OUT)/website/ly-examples
        cp $(EXAMPLES)/* $(OUT)/website/ly-examples
 
-
 website: website-texinfo website-css website-pictures website-examples
-
+       cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
+       cp $(SERVER_FILES)/lilypond.org.htaccess $(OUT)/website/.htaccess
+       cp $(SERVER_FILES)/robots.txt $(OUT)/website/