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>
@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.
$(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:
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
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')
$(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.
$(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 $<
# 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 $@
g_read_lys = 0
g_do_pictures = 1
g_do_music = 1
+g_make_html = 0
format = ''
g_run_lilypond = 1
'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'),
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):
__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
$(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)/*