]> git.donarmstrong.com Git - lilypond.git/commitdiff
WEB: Integration of new web site [general.texi].
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 12 Aug 2009 13:13:01 +0000 (15:13 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 12 Aug 2009 13:15:56 +0000 (15:15 +0200)
Fixes:
  - eternal circular dependencies by not re-using/re-touching xref-maps
  - texi2html flags cleanups
  - new-lang target in Documentation produces working skeleton again
  - move some lilypond-specific code out of stepmake
  - fr: missing macro definitions
  - web css fix for footer

16 files changed:
Documentation/GNUmakefile
Documentation/css/lilypond-web.css
Documentation/fr/macros.itexi
Documentation/fr/notation.tely
Documentation/general.texi
Documentation/web-texi2html.init
make/doc-i18n-root-rules.make
make/doc-i18n-root-vars.make
python/auxiliar/buildlib.py
python/auxiliar/manuals_definitions.py
python/auxiliar/postprocess_html.py
scripts/auxiliar/texi-langutils.py
scripts/build/extract_texi_filenames.py
scripts/build/www_post.py
stepmake/stepmake/texinfo-rules.make
stepmake/stepmake/texinfo-vars.make

index 7b9c52fc8da63d6d180f04d5e7a12a25d2c6c088..e524b682ac7fd77d664308acc70f5f7417406716 100644 (file)
@@ -93,9 +93,10 @@ OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES)))
 ## No big page
 OUT_HTML_FILES := $(subst $(outdir)/general-big-page.html,,$(OUT_HTML_FILES))
 
-## Different init file and CSS
-$(outdir)/general/index.html: \
- TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/web-texi2html.init
+$(outdir)/general/index.html:\
+       TEXI2HTML_INIT = $(WEB_TEXI2HTML_INIT)
+$(outdir)/general/index.html:\
+       TEXI2HTML_SPLIT := $(WEB_TEXI2HTML_SPLIT)
 
 ###########
 ### Targets
@@ -144,6 +145,12 @@ endif
 #########
 ### Rules
 
+$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
+
+$(outdir)/lilypond.info: $(src-dir)/general.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
+
 # cd $(outdir) rule gets bit hairy for --srcdir configure builds
 txt-to-html:
        $(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
@@ -226,27 +233,54 @@ CHECK_TRANSLATION_FLAGS = --no-color
 endif
 
 ifneq ($(ISOLANG),)
+new-lang-dir:
+       mkdir -p $(ISOLANG)/$(DIR)
+       cp fr/GNUmakefile $(ISOLANG)
+       cp fr/$(DIR)/GNUmakefile $(ISOLANG)/$(DIR)
+       sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/$(DIR)/GNUmakefile
+ifeq (ugh,urgh)
+# Law of conservation of badness in action :-)
+       cd $(ISOLANG)/$(DIR) && ../../$(auxscript-dir)/texi-langutils.py -l $(ISOLANG) -o ../../$(outdir)/doc.pot --skeleton --gettext $$(ls -1 ../../$(DIR).tely ../../$(DIR).texi)
+# gets written to wrong directory; texi-langutils.py outdir/output is a mess
+       mv $(ISOLANG)/$(DIR)/$(DIR).* $(ISOLANG) || : 
+# cleanup cruft
+       rm -f $(ISOLANG)/node_list $(ISOLANG)/*/node_list
+else
+       $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext $$(cd $(ISOLANG) && ls -1 ../$(DIR).tely ../$(DIR).texi)
+       mv $$(ls $(outdir)/$(DIR).tely $(outdir)/$(DIR).texi) $(ISOLANG) || :
+       mv $$(ls $(outdir)/*.*tely $(outdir)/*.*texi) $(ISOLANG)/$(DIR) ||: 
+endif
+
 new-lang:
+# FIXME: allow this target to update a language too
+#        do not blindly overwrite, use test -e and only create missing files
+#        for inspiration, see [old] lilypond/web GNUmakefile's target new:
        @if (( $$(file -b $(ISOLANG)) == directory )) 2>/dev/null; \
        then echo "Error: $(ISOLANG) directory already exists. Exiting." ; \
        exit 3 ; \
        fi
-       mkdir -p $(ISOLANG)/learning
-       cp fr/GNUmakefile $(ISOLANG)
-       cp fr/learning/GNUmakefile $(ISOLANG)/learning
-       sed -i -e 's/ISOLANG *= *fr/ISOLANG = $(ISOLANG)/' $(ISOLANG)/GNUmakefile $(ISOLANG)/learning/GNUmakefile
-       $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) -o doc.pot --skeleton --gettext ../learning.tely
-       mv $(outdir)/*.*tely $(ISOLANG)/learning
+       $(foreach i,$(TRANSLATION_DIRS),$(MAKE) new-lang-dir DIR=$(i) &&) :
+       cd fr && cp $(EXTRA_TRANSLATION_FILES) ../$(ISOLANG)
        msgmerge -U po/lilypond-doc.pot $(outdir)/doc.pot
        cp po/lilypond-doc.pot po/$(ISOLANG).po
        @echo "***  Please add a language definition for $(ISOLANG) in python/langdefs.py  ***"
 
-CHECKED_FILES = $(ISOLANG)/index.html.in $(foreach i,learning notation application, \
-  $(shell find $(ISOLANG)/$(manual) -name '*.*te??' -not -wholename '*out-www*')) \
-  $(shell find $(ISOLANG)/texidocs/ -name '*.texidoc')
+#TRANSLATION_DIRS = $(shell git ls-files $(ISOLANG) | $(PYTHON) $(buildscript-dir)/pytt.py '/[^/]*$$' / | sort -u )
+TRANSLATION_DIRS = application general learning notation texidocs
+TRANSLATION_FILES = $(shell git ls-files $(ISOLANG) | grep -v GNUmakefile)
+EXTRA_TRANSLATION_FILES =\
+ dedication.itely\
+ index.html.in\
+ common-macros.itexi\
+ macros.itexi\
+ translations.html.in\
+ translations.template.html.in\
+#
+
 
 TELY_FILES = $(call src-wildcard,$(ISOLANG)/*.tely)
 skeleton-update:
+       mkdir -p $(ISOLANG)
        $(auxscript-dir)/texi-langutils.py -d $(outdir) -l $(ISOLANG) --skeleton $(TELY_FILES:$(ISOLANG)/%.tely=../%.tely)
        $(auxscript-dir)/texi-skeleton-update.py $(ISOLANG) $(outdir)
 
@@ -276,10 +310,10 @@ fix-xrefs:
        $(DOCUMENTS_INCLUDES) $(auxpython-dir)/manuals_definitions.py
 
 check-translation:
-       ISOLANG=$(ISOLANG) $(auxscript-dir)/check_translation.py $(CHECK_TRANSLATION_FLAGS) $(CHECKED_FILES)
+       ISOLANG=$(ISOLANG) $(auxscript-dir)/check_translation.py $(CHECK_TRANSLATION_FLAGS) $(TRANSLATION_FILES)
 
 update-translation:
-       ISOLANG=$(ISOLANG) $(auxscript-dir)/check_translation.py --update $(CHECK_TRANSLATION_FLAGS) $(CHECKED_FILES)
+       ISOLANG=$(ISOLANG) $(auxscript-dir)/check_translation.py --update $(CHECK_TRANSLATION_FLAGS) $(TRANSLATION_FILES)
 
 translation-status:
        make -C po out=www messages
index 3b3994905fee6490879ebc4c98d8fe121d65cf0c..0507b1fca9590eb7f6c41edafb490ba2ddfa78cf 100644 (file)
@@ -503,9 +503,10 @@ div#language {
 
 #verifier_texinfo {
   position: absolute;
-  top: 0;
+  bottom: 0;
   right: 0;
   left: 50%;
+  width: 50%;
 }
 
 #verifier_texinfo h3 {
index 9180519f028c29bf67fe41605df034a77bc2fd46..b06d76f8431e4520e3d568a9b051a82934ee6e7b 100644 (file)
 @ref{\TEXT\,,\DISPLAY\,notation-big-page,Manuel de notation}
 @end macro
 
+@macro ressay{TEXT}
+@vindex \TEXT\
+@ref{\TEXT\,,,essay-big-page,Essay}
+@end macro
+
+@macro ressaynamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,essay-big-page,Essay}
+@end macro
+
 @macro rprogram{TEXT}
 @vindex \TEXT\
 @ref{\TEXT\,,,application-big-page,Manuel d'utilisation du programme}
 @ref{\TEXT\,,\DISPLAY\,notation,Manuel de notation}
 @end macro
 
+@macro ressay{TEXT}
+@vindex \TEXT\
+@ref{\TEXT\,,,essay,Essay}
+@end macro
+
+@macro ressaynamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,essay,Essay}
+@end macro
+
 @macro rprogram{TEXT}
 @vindex \TEXT\
 @ref{\TEXT\,,,application,Manuel d'utilisation du programme}
 @ref{\TEXT\,,\DISPLAY\,notation.fr,Manuel de notation}
 @end macro
 
+@macro ressay{TEXT}
+@vindex \TEXT\
+@ref{\TEXT\,,,lilypond-essay,Essay}
+@end macro
+
+@macro ressaynamed{TEXT,DISPLAY}
+@vindex \TEXT\
+@ref{\TEXT\,,\DISPLAY\,lilypond-essay,Essay}
+@end macro
+
 @macro rprogram{TEXT}
 @lilyvindex{\TEXT\}
 @ref{\TEXT\,,,application.fr,Manuel d'utilisation du programme}
index 8adc46eaddf551a23962d62d6ac51b3b7d5a5e48..8f1162b8e901c9948488651931afb59409b991b0 100644 (file)
@@ -7,7 +7,7 @@
 @end ignore
 
 @documentencoding UTF-8
-@setfilename lilypond.info
+@setfilename lilypond-notation.info
 @settitle GNU LilyPond -- Manuel de notation
 
 @include macros.itexi
index f152ce03db40b2844bee4d05295c53d6bfb8b3a1..a7a9dc3dc7dbc717f6125d7d331b5a082002a030 100644 (file)
@@ -6,8 +6,8 @@
     version that you are working on.  See TRANSLATION for details.
 @end ignore
 
-@setfilename lilypond.info
-@settitle GNU LilyPond New Website
+@setfilename general.info
+@settitle LilyPond -- Music notation for everyone
 @documentencoding UTF-8
 @documentlanguage en
 
@@ -18,8 +18,8 @@
 
 @ifnottex
 @node Top
-@top GNU LilyPond --- Web site
-@chapheading The music typesetter
+@top
+@chapheading
 @end ifnottex
 
 
@@ -27,7 +27,7 @@
 
 @titlepage
 @title LilyPond
-@subtitle The music typesetter
+@c @subtitle The music typesetter
 @titlefont{New Website}
 @author The LilyPond development team
 
@@ -73,10 +73,13 @@ Free Documentation License''.
 @divId{quickSummary}
 @subheading What is LilyPond?
 
-LilyPond is a free open-source music engraving program, devoted to
+LilyPond is an open-source music engraving program, devoted to
 producing the highest-quality sheet music possible.  We bring the
 aesthetics of traditionally engraved music to computer printouts.
 
+LilyPond is Free Software and part of the
+@uref{http://@/www@/.gnu@/.org/, GNU} project.
+
 @divClass{align-right}
 Read more in our @ref{Introduction}!
 @divEnd
@@ -88,7 +91,7 @@ FIXME: process news items like the old web site:
 select first 4 items to insert here, and generate
 RSS.
 
-@c @include news-front.itexi
+@include news-front.itexi
 
 @divClass{float-right}
 (@ref{Old news})
index 9ea38e8c1d8896e057ad51b0f178186f6f6e6039..f266657c8d3cdc42409d763b7997a06125309986 100644 (file)
@@ -719,6 +719,7 @@ sub print_lilypond_page_foot($)
   # Do not include language selection in div#main
   print $fh "<!-- end div#main here -->\n</div>\n\n";
 
+  if (0) {
   print $fh "<!-- FOOTER -->\n\n";
   print $fh "<div id=\"footer\">\n";
   print $fh "<div id=\"language\">\n";
@@ -726,6 +727,7 @@ sub print_lilypond_page_foot($)
   print $fh "<p><a href=\"\">Deutsch</a>, Español, Français, Magyar.</p>\n";
   print $fh "<p>About automatic language selection.</p>\n";
   print $fh "</div>\n";
+  }
 
   print $fh "<div id=\"verifier_texinfo\">\n";
   print $fh "<h3>Validation</h3>\n";
index e63acb4f65c68b22133d7a5d9bf1f877d5089433..c7d8d4a99c41e5f52eb5509145e2d2989746872c 100644 (file)
@@ -1,20 +1,23 @@
+$(outdir)/%.texi: %.texi
+       cp -p $< $@
+
 $(top-build-dir)/Documentation/$(outdir)/%/index.$(ISOLANG).html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map $(TRANSLATION_LILY_IMAGES)
        mkdir -p $(dir $@)
        mkdir -p $(outdir)/$*
-       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) $(TEXI2HTML_FLAGS) --output=$(outdir)/$* --prefix=index --split=section $(TEXI2HTML_INIT) $<
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) $(TEXI2HTML_SPLIT) --output=$(outdir)/$* $<
        find $(outdir)/$* -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/$(outdir)
 
-
 $(top-build-dir)/Documentation/$(outdir)/%-big-page.$(ISOLANG).html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map $(TRANSLATION_LILY_IMAGES)
-       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) -D bigpage $(TEXI2HTML_FLAGS) --output=$@ $(TEXI2HTML_INIT) $<
+       echo foebar
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) -D bigpage --output=$@ $<
 
 $(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map $(outdir)/version.itexi
-       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) $(TEXI2HTML_FLAGS) --output=$@ $(TEXI2HTML_INIT) $<
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) --output=$@ $<
 
 $(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).pdf: $(outdir)/%.texi
        cd $(outdir) && \
-       texi2pdf $(TEXI2PDF_FLAGS) $(TEXINFO_PAPERSIZE_OPTION) $*.texi && \
-       mkdir -p $(dir $@) && mv $*.pdf $@
+           texi2pdf $(TEXI2PDF_FLAGS) $(TEXINFO_PAPERSIZE_OPTION) $*.texi && \
+           mkdir -p $(dir $@) && mv $*.pdf $@
 
 $(outdir)/version.%: $(top-src-dir)/VERSION
        echo '@macro version'> $@
@@ -26,6 +29,7 @@ $(outdir)/%.png: $(top-build-dir)/Documentation/$(outdir)/%.png
 
 $(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map
        $(buildscript-dir)/extract_texi_filenames -o $(XREF_MAPS_DIR) $(XREF_MAP_FLAGS) --master-map-file=$(XREF_MAPS_DIR)/$*.xref-map $<
+       touch -r $^ $@
 
 $(MASTER_TEXI_FILES): $(ITELY_FILES) $(ITEXI_FILES) $(outdir)/pictures
 
@@ -37,4 +41,12 @@ $(TRANSLATION_LILY_IMAGES): $(MASTER_TEXI_FILES)
        find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/$(outdir)
        touch $@
 
+$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
+
+$(outdir)/lilypond.info: $(outdir)/general.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
+
+$(outdir)/general/index.html: $(outdir)/macros.itexi $(outdir)/common-macros.itexi
+
 .SECONDARY:
index ed68660f74a9966a7aeeeb875b4591209ee3352a..4219dbf39317d33bbd24af20fe51be4a86da1806 100644 (file)
@@ -9,15 +9,20 @@ LANGS = $(shell $(PYTHON) $(buildscript-dir)/langdefs.py)
 CSS_SOURCE_FILES = $(shell ls $(top-src-dir)/Documentation/lilypond*.css)
 
 TELY_FILES := $(call src-wildcard,*.tely)
-MASTER_TEXI_FILES := $(TELY_FILES:%.tely=$(outdir)/%.texi)
+TEXI_FILES := $(call src-wildcard,*.texi)
+MASTER_TEXI_FILES := $(TEXI_FILES) $(TELY_FILES:%.tely=$(outdir)/%.texi)
 
-SPLITTED_HTML_MANUALS = $(foreach manual, $(TELY_FILES:%.tely=%),\
+TEXINFO_MANUALS =\
+ $(TELY_FILES:%.tely=%)\
+ $(TEXI_FILES:%.texi=%)
+
+SPLITTED_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
  $(if $(findstring $(manual), $(UNSPLITTED_HTML_MANUALS)),,$(manual)))
 
 OUT_HTML_FILES += $(UNSPLITTED_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).html)
 BIG_PAGE_HTML_FILES := $(SPLITTED_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%-big-page.$(ISOLANG).html)
 DEEP_HTML_FILES := $(SPLITTED_HTML_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%/index.$(ISOLANG).html)
-PDF_FILES := $(TELY_FILES:%.tely=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).pdf)
+#PDF_FILES := $(TEXINFO_MANUALS:%=$(top-build-dir)/Documentation/$(outdir)/%.$(ISOLANG).pdf)
 
 ITELY_FILES := $(call src-wildcard,*.itely)
 ITEXI_FILES := $(call src-wildcard,*.itexi)
@@ -31,18 +36,38 @@ MAKEINFO_FLAGS += --force --enable-encoding $(DOCUMENTATION_INCLUDES)
 MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 
 # texi2html xref map files
-XREF_MAPS_DIR=$(top-build-dir)/out/xref-maps
-XREF_MAPS_FILES=$(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
+# FIXME: duplicated in stepake/texinfo-vars.make make/doc-i18n-root-vars.make
+XREF_MAPS_DIR=$(top-build-dir)/$(outbase)/xref-maps
+XREF_MAPS_FILES=$(TEXINFO_MANUALS:%=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
 XREF_MAP_FLAGS += -I $(outdir)
 
-# texi2html flags
-TEXI2HTML_INIT= --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
-TEXI2HTML_LANG=--lang=$(ISOLANG)
-TEXI2HTML_FLAGS += $(TEXI2HTML_LANG) $(DOCUMENTATION_INCLUDES) \
-  -I $(XREF_MAPS_DIR)
-TEXI2HTML = PERL_UNICODE=SD LANG= $(TEXI2HTML_PROGRAM)
+WEB_MANUALS=general
+
+###########
+ifneq ($(ISOLANG),)
+TEXI2HTML_LANG = --lang=$(ISOLANG)
+endif
+
+DOC_TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
+WEB_TEXI2HTML_INIT =--init-file=$(top-src-dir)/Documentation/web-texi2html.init
+TEXI2HTML_INIT = $(DOC_TEXI2HTML_INIT)
+
+DOC_TEXI2HTML_SPLIT = --prefix=index --split=section
+WEB_TEXI2HTML_SPLIT = --prefix=index --split=node --node-files
+TEXI2HTML_SPLIT = $(DOC_TEXI2HTML_SPLIT)
+
+$(top-build-dir)/Documentation/$(outdir)/general/index.$(ISOLANG).html:\
+       TEXI2HTML_INIT = $(WEB_TEXI2HTML_INIT)
+$(top-build-dir)/Documentation/$(outdir)/general/index.$(ISOLANG).html:\
+       TEXI2HTML_SPLIT := $(WEB_TEXI2HTML_SPLIT)
+
+TEXI2HTML_INCLUDES += $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR)
+TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG)
+TEXI2HTML = PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS)
+###########
 
 TEXI2PDF_FLAGS += --batch $(DOCUMENTATION_INCLUDES)
+TEXI2PDF_FLAGS += -I $(LYS_OUTPUT_DIR)
 
 ifdef QUIET_BUILD
 TEXI2PDF_FLAGS += -q
index 5ec022e16af31bc81c285bf5b55c68bab6bb1301..b0bf9cfcc579b1bff27a5cb4472f5a50abf1a67e 100644 (file)
@@ -28,8 +28,9 @@ renames_map = {
     'changes.tely': 'topdocs/NEWS.tely',
 }
 
+# FIXME: Hardcoded file names!?
 manuals_subdirectories_re = \
-    re.compile ('(application|essay|learning|notation)/')
+    re.compile ('(application|essay|general|learning|notation)/')
 
 def add_old_name (file_path):
     for new_path in renames_map:
index 4b548f11e19397fe0dc57cfcb768b2ca530614ce..d0542b073f690f62676e4c55f117cb99cb3e7792 100644 (file)
@@ -6,6 +6,8 @@ references_dict = {
     'notation': 'ruser',
     'learning': 'rlearning',
     'application': 'rprogram',
+    'essay': 'ressay',
     'snippets': 'rlsr',
     'music-glossary': 'rglos',
-    'internals': 'rinternals' }
+    'internals': 'rinternals',
+    }
index 3db9fda8d149526e9c0fdc83661e813e99501ce5..9e624e2de2c9398f1453a59f73ada7df69fe47fb 100644 (file)
@@ -44,6 +44,12 @@ footer = '''
 </p>
 </div>
 '''
+
+web_footer = '''
+<div class="footer">
+</div>
+'''
+
 footer_name_version = _doc ('This page is for %(package_name)s-%(package_version)s (%(branch_str)s).')
 # ugh, must not have "_doc" in strings because it is naively replaced with "_" in hacked gettext process
 footer_report_links = _doc ('Your <a href="%(suggest_Docs_url)s">suggestions for the documentation</a> are welcome, please report errors to our <a href="%(mail_address_url)s">bug list</a>.')
@@ -342,7 +348,10 @@ def process_html_files (package_name = '',
 
             ### add footer
             if footer_tag_re.search (s) == None:
-                s = add_footer (s, footer_tag + footer)
+                if 'general' in file_name:
+                    s = add_footer (s, footer_tag + web_footer)
+                else:
+                    s = add_footer (s, footer_tag + footer)
 
                 available, missing = find_translations (prefix, lang_ext)
                 page_flavors = process_links (s, prefix, lang_ext, file_name, missing, target)
index d5666becf85552028d93fd0132fd77f7270a1637..e9798a619167c2ba925dd2277e17fe49379a983e 100755 (executable)
@@ -32,7 +32,7 @@ node_blurb = '''@untranslated
 '''
 doclang = ''
 head_committish = read_pipe ('git rev-parse HEAD')
-intro_blurb = '''@c -*- coding: utf-8; mode: texinfo%(doclang)s -*-
+intro_blurb = '''\\input texinfo @c -*- coding: utf-8; mode: texinfo%(doclang)s -*-
 @c This file is part of %(topfile)s
 @ignore
     Translation of GIT committish: %(head_committish)s
@@ -49,6 +49,8 @@ for x in optlist:
     if x[0] == '-o': # -o NAME   set PO output file name to NAME
         output_name = x[1]
     elif x[0] == '-d': # -d DIR    set working directory to DIR
+        print 'FIXME: this is evil.  use cd DIR && texi-langutils ...'
+        # even better, add a sane -o option
         os.chdir (x[1])
     elif x[0] == '-b': # -b BLURB  set blurb written at each node to BLURB
         node_blurb = x[1]
@@ -57,7 +59,7 @@ for x in optlist:
     elif x[0] == '-l': # -l ISOLANG  set documentlanguage to ISOLANG
         doclang = '; documentlanguage: ' + x[1]
 
-texinfo_with_menus_re = re.compile (r"^(\*) +([^:\n]+)::.*?$|^@(include|menu|end menu|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.*?)$|@(rglos){(.+?)}", re.M)
+texinfo_with_menus_re = re.compile (r"^(\*) +([^:\n]+)::.*?$|^@(afourpaper|author|bye|contents|copying|end copying|divClass|divEnd|divId|documentencoding|documentlanguage|finalout|ifnottex|end ifnottex|imageFloat|imageId|include|menu|end menu|node|quotation|end quotation|ref|rgloss|setfilename|settitle|set|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|titlefont|titlepage|end titlepage|title|subtitle|top|vskip|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading|c) *(([^ \n].*)|$)", re.M)
 
 texinfo_re = re.compile (r"^@(include|node|(?:unnumbered|appendix)(?:(?:sub){0,2}sec)?|top|chapter|(?:sub){0,2}section|(?:major|chap|(?:sub){0,2})heading) *(.+?)$|@(rglos){(.+?)}", re.M)
 
@@ -119,7 +121,10 @@ def process_texi (texifilename, i_blurb, n_blurb, write_skeleton, topfile, outpu
                 elif item[2] == 'end menu':
                     g.write ('@end menu\n\n')
                 else:
-                    g.write ('@' + item[2] + ' ' + item[3] + '\n')
+                    space = ' '
+                    if item[3].startswith ('{') or not item[3].strip ():
+                        space = ''
+                    g.write ('@' + item[2] + space + item[3] + '\n')
                     if node_trigger:
                         g.write (n_blurb)
                         node_trigger = False
@@ -162,7 +167,15 @@ if make_gettext:
     node_list.write ('# -*- coding: utf-8 -*-\n')
     for texi_file in texi_files:
         # Urgly: scan ly comments and variable names only in English doco
-        is_english_doc = 'Documentation/user' in texi_file
+        is_english_doc = (
+            True
+            and not 'Documentation/de/' in texi_file
+            and not 'Documentation/es/' in texi_file
+            and not 'Documentation/fr/' in texi_file
+            and not 'Documentation/ja/' in texi_file
+            and not 'Documentation/nl/' in texi_file
+            and not 'Documentation/po/' in texi_file
+            )
         process_texi (texi_file, intro_blurb, node_blurb, make_skeleton,
                       os.path.basename (texi_file), node_list,
                       scan_ly=is_english_doc)
index 36adb50ea215946209e7734f2fe8f080115d105a..f91bae398250d0e283baca5743138d56f0af47bd 100644 (file)
@@ -60,6 +60,8 @@ for opt in options_list:
     if o == '-I' or o == '--include':
         if os.path.isdir (a):
             include_path.append (a)
+        else:
+            print 'NOT A DIR from: ', os.getcwd (), a
     elif o == '-o' or o == '--output':
         outdir = a
     elif o == '-s' or o == '--split':
@@ -93,7 +95,7 @@ def expand_includes (m, filename):
             filepath = os.path.join (directory, m.group(1))
             if os.path.exists (filepath):
                 return extract_sections (filepath)[1]
-        print "Unable to locate include file " + filepath
+        print 'No such file: ' + filepath
         return ''
 
 lang_re = re.compile (r'^@documentlanguage (.+)', re.M)
index b329390a5deab9dd7c5675d68a67490e184f36ea..2df5b38468761f6d8237e19f03ee2f83c5be896f 100644 (file)
@@ -39,7 +39,7 @@ dirs, symlinks, files = mirrortree.walk_tree (
     tree_roots = doc_dirs,
     process_dirs = outdir,
     exclude_dirs = '(^|/)((' + \
-        r'po|out|out-test|out-cov|.*?[.]t2d|\w*?-root)|^Documentation/(' + \
+        r'po|xref-maps|out|out-test|out-cov|.*?[.]t2d|\w*?-root)|^Documentation/(' + \
         '|'.join ([l.code for l in langdefs.LANGUAGES]) + '))(/|$)',
     find_files = r'.*?\.(?:midi|html|pdf|png|txt|i?ly|signature|css|zip)$|VERSION',
     exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)')
index 97256f4c626177be069f7577722062e50f087d21..5bc1b1684875f14747a1261ada4568fadb891ea0 100644 (file)
@@ -23,32 +23,25 @@ ifneq ($(INFO_IMAGES_DIR),)
 endif
        touch $@
 
-$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
-       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
-
-$(outdir)/lilypond-%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
-       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
+$(outdir)/%.texi: %.texi
+       cp -p $< $@
 
-$(outdir)/lilypond.info: general.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
+$(outdir)/%.info: $(outdir)/%.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
        $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
 
 $(outdir)/%-big-page.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi
-       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) -D bigpage --output=$@ $(TEXI2HTML_INIT) $<
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) -D bigpage --output=$@ $<
 
 $(outdir)/%.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi
-       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) --output=$@ $(TEXI2HTML_INIT) $<
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) --output=$@ $<
 
 $(outdir)/%/index.html: $(outdir)/%.texi $(XREF_MAPS_DIR)/%.xref-map $(outdir)/version.itexi $(outdir)/%.html.omf
        mkdir -p $(dir $@)
-       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) --output=$(dir $@) --prefix=index --split=section $(TEXI2HTML_INIT) $<
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) --output=$(dir $@) $(TEXI2HTML_SPLIT) $<
        cp $(top-src-dir)/Documentation/css/*.css $(dir $@)
 
-
-$(outdir)/%.html.omf: %.texi
-       $(call GENERATE_OMF,html)
-
-$(outdir)/%.pdf.omf: %.texi
-       $(call GENERATE_OMF,pdf)
+$(outdir)/%.info: %.texi $(outdir)/$(INFO_IMAGES_DIR).info-images-dir-dep $(outdir)/version.itexi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) --output=$@ $<
 
 $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.itexi $(outdir)/%.pdf.omf
        cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) -I $(abs-src-dir) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
@@ -56,11 +49,11 @@ $(outdir)/%.pdf: $(outdir)/%.texi $(outdir)/version.itexi $(outdir)/%.pdf.omf
 $(outdir)/%.txt: $(outdir)/%.texi $(outdir)/version.itexi
        $(MAKEINFO) -I$(src-dir) -I$(outdir) --no-split --no-headers --output $@ $<
 
-$(XREF_MAPS_DIR)/%.xref-map: $(outdir)/%.texi
-       $(buildscript-dir)/extract_texi_filenames $(XREF_MAP_FLAGS) -o $(XREF_MAPS_DIR) $<
+$(outdir)/%.html.omf: %.texi
+       $(call GENERATE_OMF,html)
 
-$(outdir)/%.texi: %.texi
-       cp -f $< $@
+$(outdir)/%.pdf.omf: %.texi
+       $(call GENERATE_OMF,pdf)
 
 $(outdir)/version.%: $(top-src-dir)/VERSION
        echo '@macro version'> $@
index 1db4b06ef598d39e398b84fa961400712a4edffb..c6104cc35915126ed1e38f83a29ec2c57019a446 100644 (file)
@@ -16,18 +16,30 @@ MAKEINFO_FLAGS += --enable-encoding $(DOCUMENTATION_INCLUDES)
 MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 
 # texi2html xref map files
-XREF_MAPS_DIR = $(top-build-dir)/out/xref-maps
+# FIXME: duplicated in stepake/texinfo-vars.make make/doc-i18n-root-vars.make
+XREF_MAPS_DIR = $(top-build-dir)/$(outbase)/xref-maps
 XREF_MAPS_FILES += $(TEXI_FILES:%.texi=$(XREF_MAPS_DIR)/%.xref-map) \
  $(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.xref-map)
 XREF_MAP_FLAGS += -I $(outdir)
 
-# texi2html flags
+###########
 ifneq ($(ISOLANG),)
 TEXI2HTML_LANG = --lang=$(ISOLANG)
 endif
-TEXI2HTML_FLAGS += $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR)
-TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
-TEXI2HTML = PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS) $(TEXI2HTML_LANG)
+
+DOC_TEXI2HTML_INIT = --init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
+WEB_TEXI2HTML_INIT =--init-file=$(top-src-dir)/Documentation/web-texi2html.init
+TEXI2HTML_INIT = $(DOC_TEXI2HTML_INIT)
+
+DOC_TEXI2HTML_SPLIT = --prefix=index --split=section
+WEB_TEXI2HTML_SPLIT = --prefix=index --split=node --node-files
+TEXI2HTML_SPLIT = $(DOC_TEXI2HTML_SPLIT)
+
+TEXI2HTML_INCLUDES += $(DOCUMENTATION_INCLUDES) --I=$(XREF_MAPS_DIR)
+TEXI2HTML_FLAGS += $(TEXI2HTML_INCLUDES) $(TEXI2HTML_INIT) $(TEXI2HTML_LANG)
+TEXI2HTML = PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) $(TEXI2HTML_FLAGS)
+###########
+
 
 TEXI2PDF_FLAGS += $(DOCUMENTATION_INCLUDES)