From: Werner Lemberg Date: Tue, 15 Oct 2002 14:57:09 +0000 (+0000) Subject: * scripts/lilypond-book.py (g_make_html): New global variable. X-Git-Tag: release/1.6.6~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a03a7e37649efd1d4c241478c11c697f21a684e1;p=lilypond.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 177d3b0ff9..6eabdc55b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,17 @@ 2002-10-15 Werner Lemberg - * 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 diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index 5023fc7f15..1b23cbd4a2 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -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. diff --git a/GNUmakefile.in b/GNUmakefile.in index 3aa2b41d3e..94f0da5eaa 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -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: diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index 7d0d40cd6f..cdb4b61466 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -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') diff --git a/make/ly-rules.make b/make/ly-rules.make index dd3f297c4f..4876e5bb9b 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -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 $@ diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 9edddb1474..68ff22873f 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -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 diff --git a/stepmake/stepmake/www-targets.make b/stepmake/stepmake/www-targets.make index 58f2d4ed6a..a3a86cbf96 100644 --- a/stepmake/stepmake/www-targets.make +++ b/stepmake/stepmake/www-targets.make @@ -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)/*