]> git.donarmstrong.com Git - lilypond.git/commitdiff
Uses langdefs.py for make website
authorPhil Holmes <mail@philholmes.net>
Wed, 14 Sep 2011 15:57:41 +0000 (16:57 +0100)
committerPhil Holmes <mail@philholmes.net>
Thu, 15 Sep 2011 09:49:54 +0000 (10:49 +0100)
make/website.make
python/langdefs.py
scripts/build/create-weblinks-itexi.py

index 62ca4b803d71f74d40d5a68c1db593c7428f1903..e84a216486ab5e9a425fb300bbfe2cb8ba48b55d 100644 (file)
@@ -19,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
@@ -49,15 +50,10 @@ 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)
 
index 983fe3bb300a8050395cf634c07dabb128d4fa5e..d3d6c07813083a7f224e3f9db42662f2487c704e 100644 (file)
@@ -73,8 +73,11 @@ zh = LanguageDef ('zh', '中文', enable_ly_identifier_l10n=False)
 # (please run 'make doc-clean' before doing that):
 #fr.enabled = False
 
-# LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh)
 LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh)
+WEB_LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh)
+
+if os.getenv("MAKEWEB") == '1':
+    LANGUAGES=WEB_LANGUAGES
 
 if __name__ == '__main__':
     print ' '.join ([l.code for l in LANGUAGES if l.enabled and l.code != 'en'])
index d799925909c9c4933527cafe77bfb56149977c4b..106dcee6579492c0d1776000769714d6fdb607ac 100644 (file)
@@ -9,14 +9,14 @@ import sys
 import os
 import glob
 
-# these links are relative from /website/ on lilypond.org
-depth = "../"
-
 ### translation data -- shouldn't be here; see issue
 ### http://code.google.com/p/lilypond/issues/detail?id=1050
 
-#langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh']
-langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh']
+import langdefs
+langs = [i.code if i.code != 'en' else '' for i in langdefs.WEB_LANGUAGES]
+
+# these links are relative from /website/ on lilypond.org
+depth = "../"
 
 # Get/update node translations
 '''