]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/website.make
Uses langdefs.py for make website
[lilypond.git] / make / website.make
index 7d6ed7cb84f1d6e107e6514d7526b2f27362ec50..e84a216486ab5e9a425fb300bbfe2cb8ba48b55d 100644 (file)
@@ -4,6 +4,7 @@
 ################################################################
 #####  SECURITY -- check these values for lilypond.org #########
 ################################################################
+
 ifeq ($(WEBSITE_ONLY_BUILD),1)
   ### for lilypond.org
   TOP_SRC_DIR=$(HOME)/lilypond/lilypond-git
@@ -18,6 +19,7 @@ ifeq ($(WEBSITE_ONLY_BUILD),1)
   TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
   EXAMPLES=$(HOME)/lilypond/media/ly-examples
   PICTURES=$(HOME)/lilypond/media/pictures
+  PYTHON=python
 else
   ### for normal git
   script-dir=$(top-src-dir)/scripts/build
@@ -30,14 +32,28 @@ else
   PICTURES=Documentation/pictures/out-www
 endif
 
+################################################################
+#The 4 lines below present an option to force make website to run
+# quietly only when it is run as make -s website.  However, we've
+# decided not to use this switch, and run the scripts quietly all
+# the time
+################################################################
+#quiet-run = $(findstring s, $(MAKEFLAGS))
+#ifeq ($(quiet-run),s)
+#  quiet-flag=-q
+#endif
+
+#Nothing clever here - just allows the use of a boolean to control
+#  quiet running
+quiet-run = true
+ifeq ($(quiet-run),true)
+  quiet-flag=-q
+endif
 
 ################################################################
 OUT=out-website
 
-### only update this when the language compiles correctly!
-# LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh)
-#WEB_LANGS = de es fr hu it ja nl zh cs
-WEB_LANGS = cs de es fr hu it ja nl zh
+WEB_LANGS = $(shell MAKEWEB=1 $(PYTHON) $(top-src-dir)/python/langdefs.py)
 
 TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
 
@@ -64,10 +80,17 @@ website-version:
 
 website-xrefs: website-version
        for l in '' $(WEB_LANGS); do \
+               len="$${#l}" ; \
+               r="$$l"; \
+               if [ "$$len" -gt "0" ] ; then \
+                       r="$$r"/; \
+               fi ; \
                $(EXTRACT_TEXI_FILENAMES) \
                        -I $(top-src-dir)/Documentation \
                        -I $(top-src-dir)/Documentation/"$$l" \
                        -I $(OUT) -o $(OUT) --split=node \
+                       --known-missing-files=$(top-src-dir)/scripts/build/website-known-missing-files.txt \
+                       $(quiet-flag) \
                        $(top-src-dir)/Documentation/"$$l"/web.texi ;\
                for m in $(MANUALS); do \
                        n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
@@ -77,7 +100,9 @@ website-xrefs: website-version
                                $(EXTRACT_TEXI_FILENAMES) \
                                -I $(top-src-dir)/Documentation \
                                -I $(top-src-dir)/Documentation/"$$l" \
-                               -I $(top-src-dir)/Documentation/"$$l"/"$$d" \
+                               -I $(top-src-dir)/Documentation/"$$r""$$d" \
+                               --known-missing-files=$(top-src-dir)/scripts/build/website-known-missing-files.txt \
+                         $(quiet-flag) \
                                -I $(OUT) -o $(OUT) "$$n" ; \
                        fi ; \
                done; \
@@ -86,11 +111,15 @@ website-xrefs: website-version
 website-bibs: website-version
        BSTINPUTS=$(top-src-dir)/Documentation/web \
                $(WEB_BIBS) -s web \
+               -s $(top-src-dir)/Documentation/lily-bib \
                -o $(OUT)/others-did.itexi \
+               $(quiet-flag) \
                $(top-src-dir)/Documentation/web/others-did.bib
        BSTINPUTS=$(top-src-dir)/Documentation/web \
                $(WEB_BIBS) -s web \
+               -s $(top-src-dir)/Documentation/lily-bib \
                -o $(OUT)/we-wrote.itexi \
+               $(quiet-flag) \
                $(top-src-dir)/Documentation/web/we-wrote.bib
 
 
@@ -119,12 +148,18 @@ website-css:
 
 website-pictures:
        mkdir -p $(OUT)/website/pictures
-       cp $(PICTURES)/* $(OUT)/website/pictures
-       ln -sf website/pictures $(OUT)/pictures
+       if [ -d $(PICTURES) ]; \
+       then \
+               cp $(PICTURES)/* $(OUT)/website/pictures ; \
+               ln -sf website/pictures $(OUT)/pictures  ;\
+       fi
 
 website-examples:
        mkdir -p $(OUT)/website/ly-examples
-       cp $(EXAMPLES)/* $(OUT)/website/ly-examples
+       if [ -d $(EXAMPLES) ]; \
+       then \
+               cp $(EXAMPLES)/* $(OUT)/website/ly-examples ; \
+       fi
 
 web-post:
        $(WEB_POST) $(OUT)/website