From e5403d7e8ddcaff48a9f9fbb969a087a12e9510d Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 17 Sep 1999 14:28:39 +0200 Subject: [PATCH] patch::: 1.2.8.jcn2 pl 8.jcn2 - scripts/mudela-book.py: use hash of full .ly contents (by default) - bf: footify html doc upon creation too --- CHANGES | 4 ++ Documentation/metadoc/GNUmakefile | 3 ++ Documentation/tex/GNUmakefile | 1 + Documentation/tex/regression-test.tely | 4 +- Documentation/tex/tutorial.tely | 12 ------ VERSION | 2 +- make/mutopia-targets.make | 1 + make/toplevel.make.in | 5 +-- scripts/mudela-book.py | 45 +++++++++++++++----- stepmake/stepmake/documentation-targets.make | 3 ++ stepmake/stepmake/documentation-vars.make | 2 +- stepmake/stepmake/texinfo-rules.make | 1 + stepmake/stepmake/yolily-toplevel-vars.make | 4 +- 13 files changed, 56 insertions(+), 31 deletions(-) diff --git a/CHANGES b/CHANGES index 488c5a93cd..193094e989 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +pl 8.jcn2 + - scripts/mudela-book.py: use hash of full .ly contents (by default) + - bf: footify html doc upon creation too + pl 8.jcn1 - Documentation/Localisation.texi: still some issues - Uniformised locale strings diff --git a/Documentation/metadoc/GNUmakefile b/Documentation/metadoc/GNUmakefile index d40a30064f..169d6efe15 100644 --- a/Documentation/metadoc/GNUmakefile +++ b/Documentation/metadoc/GNUmakefile @@ -44,6 +44,7 @@ OUTGENHTMLS = $(addprefix $(outdir)/, $(GENHTMLS:%=%.html)) # URG. Lilypond specific. Move out. $(outdir)/%.html: %.data $(depth)/VERSION $(PYTHON) $(step-bindir)/table-to-html.py --columns=7 --linesep=' ' --package=$(topdir) -o $@ $< + $(footify) $@ $(outdir)/%.tex: %.data $(depth)/VERSION $(PYTHON) $(step-bindir)/table-to-html.py --columns=7 --linesep=' ' --package=$(topdir) -o $@ --latex $< @@ -54,6 +55,7 @@ local-WWW-donotdoit: $(HTML_FILES) $(OUTTEX_FILES:.doc=.ps.gz) $(addprefix $(ou $(PYTHON) $(step-bindir)/ls-latex.py --title 'LaTeX documents about design and implementation of LilyPond' \ $(TELY_FILES) $(BIB_FILES) $(DOC_FILES) $(TEX_FILES)\ | sed "s!$(outdir)/!!g" > $(outdir)/index.html + $(footify) $(outdir)/index.html $(outdir)/%.bib: %.bib ln -f $< $@ @@ -61,6 +63,7 @@ $(outdir)/%.bib: %.bib # ignore result since bib2html is nonstandard. Errors would halt the RPM build.j $(outdir)/%.html: %.bib -bib2html $< $@ + $(footify) $@ # Yeah right: # make -k out/mudela.dvi => cp -f out/vocabulary.tex out/mudela.dvi diff --git a/Documentation/tex/GNUmakefile b/Documentation/tex/GNUmakefile index 93174baed7..f0f86b38a4 100644 --- a/Documentation/tex/GNUmakefile +++ b/Documentation/tex/GNUmakefile @@ -54,6 +54,7 @@ local-WWW: $(HTML_FILES) $(datafiles) $(PS_GZ_FILES) $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation about LilyPond' \ $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \ | sed "s!$(outdir)/!!g" > $(outdir)/index.html + $(footify) $(outdir)/index.html $(outdir)/%.bib: %.bib ln -f $< $@ diff --git a/Documentation/tex/regression-test.tely b/Documentation/tex/regression-test.tely index f0fc7f15ad..6a0443e728 100644 --- a/Documentation/tex/regression-test.tely +++ b/Documentation/tex/regression-test.tely @@ -8,7 +8,9 @@ @title LilyPond Regression test @end ignore -@node Top, , , +@node Top, , , + +@section Introduction This document tries give an brief overview of LilyPond features. When the text correspond with the shown notation, we consider LilyPond diff --git a/Documentation/tex/tutorial.tely b/Documentation/tex/tutorial.tely index 4fdabc66c3..208bed282b 100644 --- a/Documentation/tex/tutorial.tely +++ b/Documentation/tex/tutorial.tely @@ -40,13 +40,6 @@ Copyright @copyright{} 1999 by its author(s) - - - - - - - @node Typesetting music with LilyPond, Introduction, , Top @menu * Introduction:: Introduction @@ -59,11 +52,6 @@ Copyright @copyright{} 1999 by its author(s) @end menu @chapter Typesetting music with LilyPond - - - - - @node Introduction, tutorial-introduction, Typesetting music with LilyPond, Typesetting music with LilyPond @section Introduction @node tutorial-introduction, The first tune, Introduction, Typesetting music with LilyPond diff --git a/VERSION b/VERSION index b2bb40abc7..0f09166943 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=2 PATCH_LEVEL=8 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=jcn2 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/make/mutopia-targets.make b/make/mutopia-targets.make index 133f2dd536..7bc061169d 100644 --- a/make/mutopia-targets.make +++ b/make/mutopia-targets.make @@ -6,6 +6,7 @@ all: $(OUT_FILES) local-WWW: $(ly_examples) $(fly_examples) $(ps_examples) $(png_examples) (cd $(outdir); $(PYTHON) ../$(buildscripts)/mutopia-index.py --prefix=../ --suffix=/$(outdir) $(html_subdirs) $(all_examples)) echo $^ > $(depth)/wwwlist +# $(footify) $(outdir)/index.html convert-mudela: local-convert-mudela $(LOOP) diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 8e7fde2a73..8088044844 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -32,11 +32,10 @@ website: fonts htmldoc examples doc++ fonts: $(MAKE) -C $(depth)/mf - examples: $(MAKE) CONFIGSUFFIX='www' -C input WWW $(MAKE) CONFIGSUFFIX='www' -C mutopia WWW - $(footify) + $(footify) `$(FIND) . -name '*.html' -print` tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' --exclude='*.ppm' -czf $(outdir)/examples.tar.gz `find input mutopia -type d -name 'out-www' -print` localinstall: @@ -48,4 +47,4 @@ local-WWW-clean: $(depth)/buildscripts/out/clean-fonts footify: - $(footify) + $(footify) `$(FIND) . -name '*.html' -print` diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index e679cae1d8..bed9d1c12e 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -57,6 +57,7 @@ options = [ format = '' run_lilypond = 1 +use_hash = 1 no_match = 'a\ba' # format specific strings, ie. regex-es for input, and % strings for output @@ -516,7 +517,7 @@ def schedule_mudela_block (base, chunk, extra_opts): for the main file). The .ly is written, and scheduled in TODO. - Return: a chunk (TYPE_STR, MAIN_STR, OPTIONS, TODO) + Return: a chunk (TYPE_STR, MAIN_STR, OPTIONS, TODO, BASE) TODO has format [basename, extension, extension, ... ] @@ -531,10 +532,13 @@ def schedule_mudela_block (base, chunk, extra_opts): newbody = output_verbatim (body) file_body = compose_full_body (body, opts) - updated = update_file (file_body, base + '.ly') - todo = [base] # UGH. + basename = base + if __main__.use_hash: + basename = `hash (file_body)` + updated = update_file (file_body, basename + '.ly') + todo = [basename] # UGH. - if not os.path.isfile (base + '.tex') or updated: + if not os.path.isfile (basename + '.tex') or updated: todo.append ('tex') updated = 1 @@ -550,25 +554,24 @@ def schedule_mudela_block (base, chunk, extra_opts): opts.append ('eps') if 'eps' in opts and ('tex' in todo or - not os.path.isfile (base + '.eps')): + not os.path.isfile (basename + '.eps')): todo.append ('eps') if 'png' in opts and ('eps' in todo or - not os.path.isfile (base + '.png')): + not os.path.isfile (basename + '.png')): todo.append ('png') if format == 'latex': if 'eps' in opts : - newbody = newbody + get_output ('output-eps') % (base, base) + newbody = newbody + get_output ('output-eps') % (basename, basename) else: - newbody = newbody + get_output ('output-tex') % base + newbody = newbody + get_output ('output-tex') % basename elif format == 'texi': - newbody = newbody + get_output ('output-all') % (base, base) + newbody = newbody + get_output ('output-all') % (basename, basename) + return ('mudela', newbody, opts, todo, base) - - return ('mudela', newbody, opts, todo) def find_eps_dims (match): "Fill in dimensions of EPS files." @@ -654,6 +657,7 @@ def compile_all_files (chunks): eps = [] tex = [] png = [] + hash_dict = {} for c in chunks: if c[0] <> 'mudela': @@ -668,6 +672,9 @@ def compile_all_files (chunks): elif e == 'png': png.append (base) + if __main__.use_hash: + hash_dict[c[4]] = c[3][0] + if tex: lilyopts = map (lambda x: '-I ' + x, include_path) lilyopts = string.join (lilyopts, ' ' ) @@ -685,6 +692,22 @@ def compile_all_files (chunks): cmd = cmd % (g + '.eps', g + '.png') system (cmd) + if __main__.use_hash: + name = '' + last_name = '' + f = 0 + ks = hash_dict.keys () + ks.sort () + for i in ks: + name = re.sub ("(.*)-[0-9]+\.[0-9]+\.[0-9]+", "\\1", i) + name = name + '.mix' + if name != last_name: + if last_name: + f.close () + f = open (name, 'w') + last_name = name + f.write ("%s:%s\n" % (i, hash_dict[i])) + def update_file (body, name): same = 0 diff --git a/stepmake/stepmake/documentation-targets.make b/stepmake/stepmake/documentation-targets.make index d02041f4d2..fc2d648a1f 100644 --- a/stepmake/stepmake/documentation-targets.make +++ b/stepmake/stepmake/documentation-targets.make @@ -10,6 +10,9 @@ local-WWW: $(OUTHTML_FILES) doc: do-doc +footify: + $(footify) $(sort $(wildcard $(outdir)/*.html out/*.html out-www/*.html)) + # what to do here? ifeq (a,b) diff --git a/stepmake/stepmake/documentation-vars.make b/stepmake/stepmake/documentation-vars.make index a4e84683e1..dfe32198c6 100644 --- a/stepmake/stepmake/documentation-vars.make +++ b/stepmake/stepmake/documentation-vars.make @@ -3,6 +3,7 @@ AT_FILES = $(BLURBS) # at-dir = $(doc-dir)/ at-ext = .in +footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) --footer $(depth)/Documentation/footer.html.in # YO_FILES := $(wildcard *.yo) @@ -20,5 +21,4 @@ OUTHTML_FILES = $(OUTYO_FILES:.yo=.html) $(OUTIN_FILES:.yo=.html) OUTREADME_TXT_FILES=$(addprefix $(outdir)/,$(addsuffix .txt, $(README_TOP_FILES))) OUTREADME_HTML_FILES=$(addprefix $(outdir)/,$(addsuffix .html, $(README_TOP_FILES))) - ALL_SOURCES += $(ALL_DOC_FILES) diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index cdda14839a..045a8da175 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -7,6 +7,7 @@ $(outdir)/%.info: $(outdir)/%.texi $(outdir)/%.html: $(outdir)/%.texi -makeinfo --force --output=$@ --html --no-headers $< + $(footify) $@ $(outdir)/%.dvi: $(outdir)/%.texi # --clean only in >= 3.12s diff --git a/stepmake/stepmake/yolily-toplevel-vars.make b/stepmake/stepmake/yolily-toplevel-vars.make index 8d4dd0c13c..eff32717f5 100644 --- a/stepmake/stepmake/yolily-toplevel-vars.make +++ b/stepmake/stepmake/yolily-toplevel-vars.make @@ -1,5 +1,5 @@ # -*-Makefile-*- # title Yolily_Toplevel_vars.make -footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) \ - --footer Documentation/footer.html.in `$(FIND) . -name '*.html' -print` +include $(stepdir)/documentation-vars.make + -- 2.39.2