]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scripts/lilypond-book.py (g_make_html): New global variable.
authorWerner Lemberg <wl@gnu.org>
Tue, 15 Oct 2002 14:57:09 +0000 (14:57 +0000)
committerWerner Lemberg <wl@gnu.org>
Tue, 15 Oct 2002 14:57:09 +0000 (14:57 +0000)
(schedule_lilypond_block): Don't compute EPS and PNG for `texi'
if `g_make_html' isn't set.
[main]: Add format `texi-html'.
(option_definitions): Updated.
* Documentation/user/lilypond-book.itely: Updated.

* make/lilypond-vars.make (LILYPOND_BOOK_FORMAT): New variable.
* make/ly-rules.make (%.texi, %.nexi): Use it.
* stepmake/stepmake/www-targets.make (web): Pass `tex-html' as
format to lilypond-book.
* GNUmakefile.in (web-doc): Ditto.

ChangeLog
Documentation/user/lilypond-book.itely
GNUmakefile.in
make/lilypond-vars.make
make/ly-rules.make
scripts/lilypond-book.py
stepmake/stepmake/www-targets.make

index 177d3b0ff99d378dd10f23c2c7a3930f84e367d0..6eabdc55b111d9370f4861167fc398617e60260e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,17 @@
 2002-10-15  Werner Lemberg  <wl@gnu.org>
 
-       * scripts/lilypond-book.py (schedule_lilypond_block): Don't compute
-       EPS and PNG for texinfo.
+       * scripts/lilypond-book.py (g_make_html): New global variable.
+       (schedule_lilypond_block): Don't compute EPS and PNG for `texi'
+       if `g_make_html' isn't set.
+       [main]: Add format `texi-html'.
+       (option_definitions): Updated.
+       * Documentation/user/lilypond-book.itely: Updated.
+
+       * make/lilypond-vars.make (LILYPOND_BOOK_FORMAT): New variable.
+       * make/ly-rules.make (%.texi, %.nexi): Use it.
+       * stepmake/stepmake/www-targets.make (web): Pass `tex-html' as
+       format to lilypond-book.
+       * GNUmakefile.in (web-doc): Ditto.
 
 2002-10-14  Werner Lemberg  <wl@gnu.org>
 
index 5023fc7f152bf09b2a85312a2e68ae35c7bb6dac..1b23cbd4a2b8c8c54aa0fe80cae9ccc8f7700178 100644 (file)
@@ -361,6 +361,11 @@ Specify the document type to process: @code{html}, @code{latex} or
 @code{texi} (the default).  @command{lilypond-book} usually figures this
 out automatically.
 
+Note that the @code{texi} document type produces a DVI file; to
+convert a texinfo document to @code{html}, you should use the additional
+format @code{texi-html} instead of @code{texi} to convert lilypond
+fragments to PNG images.
+
 @item @option{--default-music-fontsize=@var{sz}pt}
 Set the fontsize to use for LilyPond if no fontsize is given
 as option.
index 3aa2b41d3ea187ccd65e8c68e7ec695c42f492c5..94f0da5eaaf265e9674fa716a4bd2f29fa51a152 100644 (file)
@@ -44,10 +44,10 @@ doc: run-reqs
        $(MAKE) -C Documentation
 
 web-doc: web-reqs
-       $(MAKE) out=www -C input/regression/ WWW
-       $(MAKE) out=www -C input/template/ WWW
-       $(MAKE) out=www -C input/test/ WWW
-       $(MAKE) out=www -C Documentation WWW
+       $(MAKE) out=www -C LILYPOND_BOOK_FORMAT=tex-html input/regression/ WWW
+       $(MAKE) out=www -C LILYPOND_BOOK_FORMAT=tex-html input/template/ WWW
+       $(MAKE) out=www -C LILYPOND_BOOK_FORMAT=tex-html input/test/ WWW
+       $(MAKE) out=www -C LILYPOND_BOOK_FORMAT=tex-html Documentation WWW
        $(MAKE) footify
 
 pfa-fonts:
index 7d0d40cd6f1b9d50312799cd1698c9ea614b0902..cdb4b61466fcddb53cd952571b97c32048e0762b 100644 (file)
@@ -44,6 +44,7 @@ CONVERT_LY = $(script-dir)/convert-ly.py
 LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
 LILYPOND_BOOK = $(script-dir)/lilypond-book.py
 LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/  -I $(builddir)/mf/out/
+LILYPOND_BOOK_FORMAT = texi
 LY2DVI = $(script-dir)/ly2dvi.py
 LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py
 
@@ -57,6 +58,7 @@ CONVERT_LY = $(shell $(SHELL) -c 'type -p convert-ly')
 LILYPOND = $(shell $(SHELL) -c 'type -p lilypond')
 LILYPOND_BOOK = $(shell $(SHELL) -c 'type -p lilypond-book')
 LILYPOND_BOOK_INCLUDES = -I. -I.. -I$(outdir)
+LILYPOND_BOOK_FORMAT = texi
 LY2DVI = $(shell $(SHELL) -c 'type -p ly2dvi')
 LYS_TO_TELY = $(shell $(SHELL) -c 'type -p lys-to-tely')
 
index dd3f297c4f5cea5c0d14172f894085c5121b9739..4876e5bb9b1a6247a00915617fc7b5645de1b481 100644 (file)
@@ -5,8 +5,7 @@
 
 $(outdir)/%.latex: %.doc
        -chmod a+w $@
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES)\
-$(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $<
        chmod -w $@
 
 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
@@ -14,14 +13,14 @@ $(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $<
 $(outdir)/%.texi: %.tely
        -chmod a+w $@
        set|egrep '(TEX|LILY)'  # ugh, what's this?
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --verbose $(LILYPOND_BOOK_FLAGS) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
        chmod -w $@
 
 $(outdir)/%.texi: $(outdir)/%.tely
        -chmod a+w $@
 # debugging:
 #      set|egrep '(TEX|LILY)'
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --verbose $(LILYPOND_BOOK_FLAGS) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --verbose $(LILYPOND_BOOK_FLAGS) $<
 #
 # DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE.
 #      rm -f $<
@@ -31,7 +30,7 @@ $(outdir)/%.texi: $(outdir)/%.tely
 # for plain info doco: don't run lily
 $(outdir)/%.nexi: %.tely
        -chmod a+w $@
-       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --no-lily $(LILYPOND_BOOK_FLAGS) $<
+       $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) --no-lily $(LILYPOND_BOOK_FLAGS) $<
        mv $(@D)/$(*F).texi $@
        chmod -w $@
 
index 9edddb14744869385d674a51652f2a24c4dbfaf8..68ff22873f5e3424573affb665f68fe8f921347a 100644 (file)
@@ -169,6 +169,7 @@ g_force_music_fontsize = 0
 g_read_lys = 0
 g_do_pictures = 1
 g_do_music = 1
+g_make_html = 0
 
 format = ''
 g_run_lilypond = 1
@@ -329,7 +330,7 @@ html_linewidths = {
        'letterpaper': {12: in2pt(6)}}
 
 option_definitions = [
-       ('EXT', 'f', 'format', 'use output format EXT (texi [default], latex, html)'),
+       ('EXT', 'f', 'format', 'use output format EXT (texi [default], texi-html, latex, html)'),
        ('DIM',  '', 'default-music-fontsize', 'default fontsize for music.  DIM is assumed to be in points'),
        ('DIM',  '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'),
        ('OPT', '', 'extra-options' , 'pass OPT quoted to the lilypond command line'),
@@ -1039,7 +1040,7 @@ def schedule_lilypond_block (chunk):
                update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
        needed_filetypes = ['tex']
 
-       if format == 'html':
+       if format == 'html' or g_make_html:
                needed_filetypes.append ('eps')
                needed_filetypes.append ('png')
        if 'eps' in opts and not ('eps' in needed_filetypes):
@@ -1497,6 +1498,9 @@ for opt in options:
                __main__.verbose_p = 1
        elif o == '--format' or o == '-f':
                __main__.format = a
+               if a == 'texi-html':
+                       __main__.format = 'texi'
+                       g_make_html = 1
        elif o == '--outname' or o == '-o':
                if len(files) > 1:
                        #HACK
index 58f2d4ed6a4b5ea18e05d0b8f044b7d95769c664..a3a86cbf96d38f50502ec9f8d2126d4df05ce028 100644 (file)
@@ -13,7 +13,7 @@ local-web:
        $(MAKE) out=www local-WWW
 
 web:
-       $(MAKE) out=www WWW
+       $(MAKE) out=www LILYPOND_BOOK_FORMAT=texi-html WWW
 
 local-WWW-clean:
        rm -f $(outdir)/*