]> git.donarmstrong.com Git - lilypond.git/commitdiff
Change Snippets compilation
authorJohn Mandereau <john.mandereau@gmail.com>
Fri, 29 Feb 2008 15:43:15 +0000 (16:43 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Fri, 29 Feb 2008 15:43:15 +0000 (16:43 +0100)
- clean up input/lsr/GNUmakefile

- compile Snippets (input/lsr) in Info, rename 'snippets' to
'lilypond-snippets' to avoid possible name clash in /usr/share/info,

- move local-install-info target from Documentation/user/GNUmakefile
to texinfo-targets.make,

- lilypond-book: fix output_print_filename (use format argument
iso. global options format) and call this function properly for
Texinfo snippet formatting,

- add generic purpose @rlsr macro; immediate use is for linking to
snippets tags, but it could be used later to link to individual
snippets,

- www_post.py, add_html_footer.py: add ad-hoc code to make xrefs
to Snippets work.

12 files changed:
.gitignore
Documentation/index.html.in
Documentation/user/GNUmakefile
Documentation/user/macros.itexi
buildscripts/add_html_footer.py
buildscripts/lys-to-tely.py
buildscripts/www_post.py
input/lsr/GNUmakefile
input/lsr/lilypond-snippets.tely [new file with mode: 0644]
input/lsr/snippets.tely [deleted file]
scripts/lilypond-book.py
stepmake/stepmake/texinfo-targets.make

index 78ddd2aade5ee09961d04eb11cc570b259b134f3..014cbcf08c8def43529e5d3365ab55d26903733f 100644 (file)
@@ -71,3 +71,4 @@ pats
 tags
 test-output-distance
 Documentation/user/lilypond
+input/lsr/lilypond-snippets
index adc97057782506d51b918fb9103adb3f7275e749..82f04b82b945c7ed835be2a513db310c0936239d 100644 (file)
@@ -101,9 +101,9 @@ href="user/lilypond-program/index.html">Application Usage (AU)</a>
 in <a class="title" href="user/lilypond-program.pdf">PDF</a>)
            <br>(how to install and run the program)
 
-<li><a class="title" href="../input/lsr/snippets/index.html">Snippets</a>
-(in <a class="title" href="../input/lsr/snippets-big-page.html">one big page</a>,
-in <a class="title" href="../input/lsr/snippets.pdf">PDF</a>)
+<li><a class="title" href="../input/lsr/lilypond-snippets/index.html">Snippets</a>
+(in <a class="title" href="../input/lsr/lilypond-snippets-big-page.html">one big page</a>,
+in <a class="title" href="user/lilypond-snippets.pdf">PDF</a>)
      <br>(Short tricks, tips, and examples)
 
        </ul>
index f94800161cf37f1577e46ff92e25bde34fb85717..0a39a41a4690a4c3c02b36be136b58816c6b12fe 100644 (file)
@@ -24,11 +24,13 @@ PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
 # this prevents aux files from being reused for translated docs
 TEXI2PDF_FLAGS = --tidy
 
+MAIN_INFO_DOC = lilypond
 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
 
 ifeq ($(out),www)
 INFO_IMAGES_DIR = lilypond
+DEST_INFO_IMAGES_SUBDIR = Documentation/user
 endif
 
 STEPMAKE_TEMPLATES=tex texinfo omf documentation
@@ -48,80 +50,6 @@ info: $(INFO_FILES)
 
 xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-internals.xml
 
-# There are two modes for info: with and without images.
-ifeq ($(out),www)
-
-# This builds all .info targets with images, in out-www.
-# Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
-
-local-install-info: info
-       -$(INSTALL) -d $(DESTDIR)$(infodir)
-ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
-## Can not have absolute symlinks because some binary packages build schemes
-## install files in nonstandard root.  Best we can do is to notify the
-## builder or packager.
-       @echo
-       @echo "***************************************************************"
-       @echo "Please add or update the LilyPond direntries, do"
-       @echo
-       @echo "    install-info --info-dir=$(infodir) $(outdir)/lilypond.info"
-       @echo
-       @echo "For images in the INFO docs to work, do: "
-       @echo
-       @echo "    (cd $(infodir) && ln -sfT ../doc/lilypond/html/Documentation/user lilypond)"
-       @echo "or add something like that to the postinstall script."
-       @echo
-else # installing directly into standard /usr/...
-       -$(INSTALL) -d $(DESTDIR)$(infodir)
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
-       install-info --info-dir=$(infodir) $(outdir)/lilypond.info
-       cd $(infodir) && ln -sfT $(webdir)/Documentation/user lilypond
-endif # installing directly into standard /usr/...
-
-local-uninstall-WWW:
-       rm -f $(infodir)/lilypond
-
-else # out!=www
-
-local-install-info: info
-       -$(INSTALL) -d $(DESTDIR)$(package_infodir)
-ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
-## Can not have absolute symlinks because some binary packages build schemes
-## install files in nonstandard root.  Best we can do is to notify the
-## builder or packager.
-       @echo
-       @echo "***************************************************************"
-       @echo "Please add or update the LilyPond direntries, do"
-       @echo
-       @echo "    install-info --info-dir=$(infodir) out/lilypond.info"
-       @echo
-       @echo "For images in the INFO docs to work, do"
-       @echo
-       @echo "    make out=www install-info "
-       @echo
-       @echo "and read the extra instructions."
-       @echo
-else # installing directly into standard /usr/...
-       -$(INSTALL) -d $(DESTDIR)$(infodir)
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
-       -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
-       install-info --info-dir=$(infodir) $(outdir)/lilypond.info
-       @echo
-       @echo "***************************************************************"
-       @echo "For images in the INFO docs to work, do"
-       @echo
-       @echo "    make out=www install-info "
-       @echo
-endif # installing into standard /usr/* root# installing into /usr/...
-
-endif # out!=www
 
 # All web targets, except info image symlinks and info docs are
 # installed in non-recursing target from TOP-SRC-DIR
@@ -191,7 +119,8 @@ DEEP_HTML_FILES =\
  $(outdir)/lilypond-learning/index.html
 
 # Symlinks to refer to external source documents from split and non-split HTML
-source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
+source-links = $(outdir)/source $(outdir)/lilypond/source $(outdir)/music-glossary/source \
+ $(outdir)/lilypond-program/source $(outdir)/lilypond-learning/source
 
 $(outdir)/source:
        @rm -f $(@)
index 40905c233310e60ea0179bc7fa7425bb3b19bbd0..4ef3123bfdbed271a2cd015e2b581f5ef4a555c9 100644 (file)
 @ref{\TEXT\,,,lilypond-learning-big-page}
 @end macro
 
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets-big-page}
+@end macro
+
 @end ifset
 
 
 @ref{\TEXT\,,,lilypond-learning}
 @end macro
 
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
+@end macro
+
 @end ifclear
 
 @end ifhtml
 @ref{\TEXT\,,,lilypond-learning}
 @end macro
 
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
+@end macro
+
 @end ifdocbook
 
 
 @ref{\TEXT\,,,lilypond-learning}
 @end macro
 
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
+@end macro
+
 @end ifinfo
 
 
 
 @macro rprogram{TEXT}
 program usage manual, @ref{\TEXT\,,,lilypond-program}
-@c @internalsref{\TEXT\}
 @end macro
 
 @macro ruser{TEXT}
 notation reference, @ref{\TEXT\,,,lilypond}
-@c @internalsref{\TEXT\}
 @end macro
 
 @macro rlearning{TEXT}
 learning manual, @ref{\TEXT\,,,lilypond-learning}
-@c @internalsref{\TEXT\}
+@end macro
+
+@macro rlsr{TEXT}
+@ref{\TEXT\,,,lilypond-snippets}
 @end macro
 
 @end iftex
index b410b2a39e9fd72661e1edddde7c833f8bdff784..da827c130164de217acb3ae553191f28c6d4d287 100644 (file)
@@ -89,13 +89,19 @@ def source_links_replace (m, source_val):
 
 splitted_docs_re = re.compile ('(input/lsr/out-www/snippets|Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|lilypond-learning))/')
 
-# On systems without symlinks (e.g. Windows), docs are not very usable
-# Get rid of symlinks references here
+snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets')
+
+## Windows does not support symlinks.
+# This function avoids creating symlinks for splitted HTML manuals
 # Get rid of symlinks in GNUmakefile.in (local-WWW-post)
 # this also fixes missing PNGs only present in translated docs
-def replace_symlinks_urls (s, prefix):
+def _urls (s, prefix):
     if splitted_docs_re.match (prefix):
         s = re.sub ('(href|src)="(lily-.*?|.*?[.]png)"', '\\1="../\\2"', s)
+
+    # fix Snippets xrefs ad hoc
+    s = snippets_ref_re.sub ('href="source/input/lsr/lilypond-snippets', s)
+
     source_path = os.path.join (os.path.dirname (prefix), 'source')
     if not os.path.islink (source_path):
         return s
index 22aff30be503cc4a72839f286538556fdd046c49..e2df5a6bc3fbb2f282d755bd54f17a7f1fa8d8d3 100644 (file)
@@ -81,7 +81,6 @@ for opt in options:
         raise Exception ('unknown option: ' + o)
 
 def name2line (n):
-    # UGR
     s = r"""
 @ifhtml
 @html
@@ -89,7 +88,8 @@ def name2line (n):
 @end html
 @end ifhtml
 
-@lilypondfile[%s]{%s}""" % (os.path.basename (n), fragment_options, n)
+@lilypondfile[%s]{%s}
+""" % (os.path.basename (n), fragment_options, n)
     return s
 
 if files:
index e27aeb7d2ee02807205ba95507c793026dff18a4..278895aff93b7cc51ea73e9cd980fe932cfa2e0b 100644 (file)
@@ -82,6 +82,10 @@ for t in targets:
         if not os.path.exists (dest):
             os.symlink (p, dest)
 
+    ## ad-hoc renaming to make xrefs between PDFs work
+    os.rename (os.path.join (out_root, 'input/lsr/lilypond-snippets.pdf'),
+               os.path.join (out_root, 'Documentation/user/lilypond-snippets.pdf'))
+
 # need this for content negotiation with documentation index
 if 'online' in targets:
     f = open (os.path.join (target_pattern % 'online', 'Documentation/.htaccess'), 'w')
index 1ca2cbbf522039e1f7854647bcd263819ad48302..ec25f7310d5bda726fa87686ea9c1eba92bbd6b5 100644 (file)
@@ -6,6 +6,12 @@ STEPMAKE_TEMPLATES=documentation texinfo tex
 LOCALSTEPMAKE_TEMPLATES=lilypond ly
 EXTRA_DIST_FILES += README $(call src-wildcard,*.snippet-list)
 
+MAIN_INFO_DOC = lilypond-snippets
+INFO_DOCS = lilypond-snippets
+INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
+INFO_IMAGES_DIR = lilypond-snippets
+DEST_INFO_IMAGES_SUBDIR = input/lsr
+
 include $(depth)/make/stepmake.make
 
 IN_ITELY_FILES = $(call src-wildcard,*-intro.itely)
@@ -14,14 +20,25 @@ GENERATED_ITELY_FILES = $(IN_ITELY_FILES:%-intro.itely=$(outdir)/%.itely)
 $(outdir)/%.itely: %-intro.itely %.snippet-list
        xargs $(PYTHON) $(buildscript-dir)/lys-to-tely.py -f printfilename,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
 
-$(outdir)/snippets.texi: snippets.tely $(GENERATED_ITELY_FILES)
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BINARY) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $<
+$(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES)
+
+info: $(INFO_FILES)
+
+ifneq ($(out),www)
+# cancel install-info target
+# (there is no lilypond-snippets.info without images)
+local-install-info:
+       true
+endif
 
-$(outdir)/snippets-big-page.html: $(outdir)/snippets.texi $(OUT_PNG_IMAGES)
-       $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
+# All web targets, except info image symlinks and info docs are
+# installed in non-recursing target from TOP-SRC-DIR
+local-install-WWW: local-install-info
+local-uninstall-WWW: local-uninstall-info
 
-$(outdir)/snippets/index.html: $(outdir)/snippets.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
-       mkdir -p $(dir $@)
-       $(MAKEINFO) -I$(outdir) --output=$(dir $@) --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
+local-clean:
+       rm -f $(INFO_IMAGES_DIR)
 
-local-WWW: $(outdir)/snippets.pdf $(outdir)/snippets/index.html $(outdir)/snippets-big-page.html
+local-WWW: info $(outdir)/lilypond-snippets.pdf \
+  $(outdir)/lilypond-snippets/index.html \
+  $(outdir)/lilypond-snippets-big-page.html
diff --git a/input/lsr/lilypond-snippets.tely b/input/lsr/lilypond-snippets.tely
new file mode 100644 (file)
index 0000000..85cde17
--- /dev/null
@@ -0,0 +1,141 @@
+\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
+@setfilename lilypond-snippets.info
+@settitle LilyPond snippets
+@documentencoding UTF-8
+@documentlanguage en
+
+@iftex
+@afourpaper
+@c don't replace quotes with directed quotes
+@tex
+\gdef\SETtxicodequoteundirected{Foo}
+\gdef\SETtxicodequotebacktick{Bla}
+@end tex
+@end iftex
+
+@dircategory GNU LilyPond --- the music typesetter
+@direntry
+* LilyPond Snippets: (lilypond-snippets)        Short tricks, tips, and examples.
+@end direntry
+
+@finalout
+
+@titlepage
+@title LilyPond
+@subtitle The music typesetter
+@titlefont{Snippets}
+@author LilyPond Snippet Repository contributors
+
+@vskip 20pt
+
+This document shows a selected set of LilyPond snippets from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
+(LSR). It is in the public domain.
+
+We would like to address many thanks to Sebastiano Vigna for maintaining
+LSR web site and database, and the University of Milano for hosting LSR.
+
+Please note that this document is not an exact subset of LSR: some
+snippets come from @file{input/new} LilyPond sources directory, and
+snippets from LSR are converted through @command{convert-ly}, as LSR is
+based on a stable LilyPond version, and this document is for version
+@value{version}.
+
+Snippets are grouped by tags; tags listed in the table of contents match
+a section of LilyPond notation manual.  Snippets may have several tags,
+and not all LSR tags may appear in this document.
+
+In the HTML version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+@end titlepage
+
+@iftex
+@contents
+@end iftex
+
+@ifnottex
+@node Top
+@top LilyPond examples
+
+This document shows a selected set of LilyPond snippets from the
+@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
+(LSR). It is in the public domain.
+
+Please note that it is not an exact subset of LSR: some snippets come
+from @file{input/new} LilyPond sources directory, and snippets from LSR
+are converted through @command{convert-ly}, as LSR is based on a stable
+LilyPond version, and this document is for version @value{version}.
+
+Snippets are grouped by tags; tags listed in the table of contents match
+a section of LilyPond notation manual.  Snippets may have several tags,
+and not all LSR tags may appear in this document.
+
+In the HTML version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+@end ifnottex
+
+@c maybe generate/update @menu and @includes automatically? --jm
+@menu
+Musical notation
+* Pitches::
+* Rhythms::
+* Expressive marks::
+* Repeats::
+* Simultaneous notes::
+* Staff notation::
+* Editorial and educational use::
+* Text::
+
+Specialist notation
+* Vocal music::
+* Chords::
+* Piano::
+* Percussion::
+* Guitar::
+* Strings::
+@c * Bagpipes::
+* Ancient notation::
+
+Other collections
+* Contexts and engravers::
+* Tweaks and overrides::
+* Paper and layout::
+* Titles::
+* Spacing::
+* MIDI::
+* Templates::
+@end menu
+
+
+@c Please take care of naming every .itely
+@c with an existing tag name.
+
+@include pitches.itely
+@include rhythms.itely
+@include expressive-marks.itely
+@include repeats.itely
+@include simultaneous-notes.itely
+@include staff-notation.itely
+@include editorial-and-educational-use.itely
+@include text.itely
+
+@include vocal-music.itely
+@include chords.itely
+@include piano-music.itely
+@include percussion.itely
+@include guitar.itely
+@include strings.itely
+@c ignore empty section
+@c @include bagpipes.itely
+@include ancient-notation.itely
+
+@include contexts-and-engravers.itely
+@include tweaks-and-overrides.itely
+@include paper-and-layout.itely
+@include titles.itely
+@include spacing.itely
+@include midi.itely
+@include template.itely
+
+@bye
diff --git a/input/lsr/snippets.tely b/input/lsr/snippets.tely
deleted file mode 100644 (file)
index 5059eb7..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-\input texinfo @c -*- coding: utf-8; mode: texinfo; -*-
-@setfilename snippets.info
-@settitle LilyPond snippets
-@documentencoding UTF-8
-@documentlanguage en
-
-@iftex
-@afourpaper
-@c don't replace quotes with directed quotes
-@tex
-\gdef\SETtxicodequoteundirected{Foo}
-\gdef\SETtxicodequotebacktick{Bla}
-@end tex
-@end iftex
-
-@finalout
-
-@titlepage
-@title LilyPond
-@subtitle The music typesetter
-@titlefont{Snippets}
-@author LilyPond Snippet Repository contributors
-
-@vskip 20pt
-
-This document shows a selected set of LilyPond snippets from the
-@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
-(LSR). It is in the public domain.
-
-We would like to address many thanks to Sebastiano Vigna for maintaining
-LSR web site and database, and the University of Milano for hosting LSR.
-
-Please note that this document is not an exact subset of LSR: some
-snippets come from @file{input/new} LilyPond sources directory, and
-snippets from LSR are converted through @command{convert-ly}, as LSR is
-based on a stable LilyPond version, and this document may be for a newer
-version (see below).
-
-Snippets are grouped by tags; tags listed in the table of contents match
-a section of LilyPond notation manual.  Snippets may have several tags,
-and not all LSR tags may appear in this document.
-
-In the HTML version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-
-@lilypond[ragged-right]
-\score {
-  \context Lyrics {
-    \override Score.RehearsalMark #'self-alignment-X = #LEFT
-    \override Score.RehearsalMark #'font-size = #-1
-    \mark #(ly:export (string-append
-      "This document is for LilyPond version " (lilypond-version) "."))
-    s2
-  }
-  \layout {
-    indent = 0.0\pt
-  }
-}
-@end lilypond
-@end titlepage
-
-@iftex
-@contents
-@end iftex
-
-@ifnottex
-@node Top
-@top LilyPond examples
-
-This document shows a selected set of LilyPond snippets from the
-@uref{http://lsr@/.dsi@/.unimi@/.it,LilyPond Snippet Repository}
-(LSR). It is in the public domain.
-
-Please note that it is not an exact subset of LSR: some snippets come
-from @file{input/new} LilyPond sources directory, and snippets from LSR
-are converted through @command{convert-ly}, as LSR is based on a stable
-LilyPond version, and this document may be for a newer version (see
-below).
-
-Snippets are grouped by tags; tags listed in the table of contents match
-a section of LilyPond notation manual.  Snippets may have several tags,
-and not all LSR tags may appear in this document.
-
-In the HTML version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-@end ifnottex
-
-@c maybe generate/update @menu and @includes automatically? --jm
-@menu
-Musical notation
-* Pitches::
-* Rhythms::
-* Expressive marks::
-* Repeats::
-* Simultaneous notes::
-* Staff notation::
-* Editorial and educational use::
-* Text::
-
-Specialist notation
-* Vocal music::
-* Chords::
-* Piano::
-* Percussion::
-* Guitar::
-* Strings::
-@c * Bagpipes::
-* Ancient notation::
-
-Other collections
-* Contexts and engravers::
-* Tweaks and overrides::
-* Paper and layout::
-* Titles::
-* Spacing::
-* MIDI::
-* Templates::
-@end menu
-
-
-@c Please take care of naming every .itely
-@c with an existing tag name.
-
-@include pitches.itely
-@include rhythms.itely
-@include expressive-marks.itely
-@include repeats.itely
-@include simultaneous-notes.itely
-@include staff-notation.itely
-@include editorial-and-educational-use.itely
-@include text.itely
-
-@include vocal-music.itely
-@include chords.itely
-@include piano-music.itely
-@include percussion.itely
-@include guitar.itely
-@include strings.itely
-@c ignore empty section
-@c @include bagpipes.itely
-@include ancient-notation.itely
-
-@include contexts-and-engravers.itely
-@include tweaks-and-overrides.itely
-@include paper-and-layout.itely
-@include titles.itely
-@include spacing.itely
-@include midi.itely
-@include template.itely
-
-@bye
index 96c5dcc9c5f7360c3ae1fda604a3aac5f00b9985..824cbabef9f5a69cdc081ba0223eddae1d303df5 100644 (file)
@@ -1245,19 +1245,12 @@ class Lilypond_snippet (Snippet):
         if PRINTFILENAME in self.option_dict:
             base = self.basename ()
             filename = os.path.basename (self.substring ('filename'))
-            str = output[global_options.format][PRINTFILENAME] % vars ()
+            str = output[format][PRINTFILENAME] % vars ()
 
         return str
 
     def output_texinfo (self):
-        str = ''
-        if self.output_print_filename (TEXINFO):
-            str += ('@html\n'
-                + self.output_print_filename (HTML)
-                + '\n@end html\n')
-            str += ('@tex\n'
-                + self.output_print_filename (LATEX)
-                + '\n@end tex\n')
+        str = self.output_print_filename (TEXINFO)
         base = self.basename ()
         if TEXIDOC in self.option_dict:
             texidoc = base + '.texidoc'
index 875a5e929cbfc83bf80d902aacf839bb46330fe9..8f421dfedcc9d52496cb51d943ab5faa58369427 100644 (file)
@@ -11,8 +11,6 @@ check-info: texinfo-all-menus-update
 ## info stuff
 local-install: install-info
 local-uninstall: uninstall-info
-local-install-info:
-local-uninstall-info:
 install-info: local-install-info
 uninstall-info: local-uninstall-info
 
@@ -22,6 +20,73 @@ install-info: $(INFO_FILES)
 uninstall-info:
        $(INFO_INSTALL_COMMAND) local-uninstall
 
+# There are two modes for info: with and without images.
+ifeq ($(out),www)
+
+# This builds all .info targets with images, in out-www.
+# Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
+
+local-install-info: info
+       -$(INSTALL) -d $(DESTDIR)$(infodir)
+ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
+## Can not have absolute symlinks because some binary packages build schemes
+## install files in nonstandard root.  Best we can do is to notify the
+## builder or packager.
+       @echo
+       @echo "***************************************************************"
+       @echo "Please add or update the LilyPond direntries, do"
+       @echo
+       @echo "    install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info"
+       @echo
+       @echo "For images in the INFO docs to work, do: "
+       @echo
+       @echo "    (cd $(infodir) && ln -sfT ../doc/lilypond/html/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR))"
+       @echo "or add something like that to the postinstall script."
+       @echo
+else # installing directly into standard /usr/...
+       -$(INSTALL) -d $(DESTDIR)$(infodir)
+       $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
+       install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
+       cd $(infodir) && ln -sfT $(webdir)/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR)
+endif # installing directly into standard /usr/...
+
+local-uninstall-WWW:
+       rm -f $(infodir)/$(INFO_IMAGES_DIR)
+
+else # out!=www
+
+local-install-info: info
+       -$(INSTALL) -d $(DESTDIR)$(package_infodir)
+ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
+## Can not have absolute symlinks because some binary packages build schemes
+## install files in nonstandard root.  Best we can do is to notify the
+## builder or packager.
+       @echo
+       @echo "***************************************************************"
+       @echo "Please add or update the LilyPond direntries, do"
+       @echo
+       @echo "    install-info --info-dir=$(infodir) out/$(MAIN_INFO_DOC).info"
+       @echo
+       @echo "For images in the INFO docs to work, do"
+       @echo
+       @echo "    make out=www install-info "
+       @echo
+       @echo "and read the extra instructions."
+       @echo
+else # installing directly into standard /usr/...
+       -$(INSTALL) -d $(DESTDIR)$(infodir)
+       $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
+       install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
+       @echo
+       @echo "***************************************************************"
+       @echo "For images in the INFO docs to work, do"
+       @echo
+       @echo "    make out=www install-info "
+       @echo
+endif # installing into standard /usr/* root# installing into /usr/...
+
+endif # out!=www
+
 
 TEXINFO_ALL_MENUS_UPDATE_EL ='\
   (let ((error nil)\