From cc58c137e041142c91019b30790d9fe61a5fedbc Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Sat, 8 Mar 2008 13:40:15 +0100 Subject: [PATCH] Clean up docs makefiles - scrap .nexi files generation for Info docs without images, replace with LILYPOND_BOOK_PROCESS variable defined conditionnally depending on $(out). - remove duplicate --process lilypond-book flag. - clean up topdocs-*.make, toplevel-*.make --- Documentation/topdocs/GNUmakefile | 10 ++++------ Documentation/user/GNUmakefile | 10 +--------- make/lilypond-vars.make | 9 ++++++++- make/ly-rules.make | 23 ++++------------------- make/ly-vars.make | 1 + stepmake/stepmake/texinfo-rules.make | 2 +- stepmake/stepmake/topdocs-targets.make | 4 ++-- stepmake/stepmake/topdocs-vars.make | 2 +- stepmake/stepmake/toplevel-targets.make | 2 +- 9 files changed, 23 insertions(+), 40 deletions(-) diff --git a/Documentation/topdocs/GNUmakefile b/Documentation/topdocs/GNUmakefile index 548636fdf5..7e2d2641d9 100644 --- a/Documentation/topdocs/GNUmakefile +++ b/Documentation/topdocs/GNUmakefile @@ -5,14 +5,12 @@ STEPMAKE_TEMPLATES=documentation tex texinfo topdocs LOCALSTEPMAKE_TEMPLATES=lilypond ly HTML_FILES=$(TEXI_FILES:%.texi=$(outdir)/%.html) $(TELY_FILES:%.tely=$(outdir)/%.html) PDF_FILES=$(outdir)/NEWS.pdf +README_TOP_FILES=NEWS AUTHORS INSTALL README +OUTTXT_FILES= $(outdir)/NEWS.txt + include $(depth)/make/stepmake.make MAKEINFO_FLAGS += -I $(top-src-dir)/Documentation/user -ifneq ($(out),www) -LILYPOND_BINARY='true' -endif - -$(outdir)/NEWS.nexi: NEWS.tely - +.SECONDARY: diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 0a39a41a46..4ba6660a17 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -38,10 +38,6 @@ OMF_FILES += $(outdir)/lilypond-internals.html.omf LOCALSTEPMAKE_TEMPLATES=lilypond ly - -TEXINPUTS=$(top-src-dir)/tex:: -export TEXINPUTS - include $(depth)/make/stepmake.make info: $(INFO_FILES) @@ -73,7 +69,6 @@ extra-local-help: # Generic rule using % twice not possible? # $(outdir)/%/%.html: $(outdir)/%.texi $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi -$(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi # # Split manuals in HTML @@ -143,7 +138,6 @@ $(top-build-dir)/mf/$(outconfbase)/feta16list.ly: $(MAKE) -C $(top-src-dir)/mf $(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi $(outdir)/music-glossary.texi: $(ITELY_FILES) $(ITEXI_FILES) -$(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learning.nexi $(outdir)/music-glossary.nexi: $(ITELY_FILES) $(ITEXI_FILES) # Rules for the automatically generated documentation @@ -152,10 +146,8 @@ $(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learn # of lilypond-internals every time. however, this triggers # compilation during install, which is a bad thing (tm). -$(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY) +$(outdir)/lilypond-internals.texi: $(LILYPOND_BINARY) cd $(outdir) && $(LILYPOND_BINARY) --verbose $(top-src-dir)/ly/generate-documentation - rm -f $(outdir)/lilypond-internals.nexi - -ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi ## unused diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index e7abca9b7c..45ed186353 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -32,7 +32,14 @@ LILYPOND_JOBS=$(if $(CPU_COUNT),-djob-count=$(CPU_COUNT),) LILYPOND_BOOK_LILYPOND_FLAGS=-dbackend=eps --formats=ps,png,pdf $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=$(ANTI_ALIAS_FACTOR) LILYPOND_BOOK_VERBOSE = --verbose LILYPOND_BOOK_INFO_IMAGES_DIR = $(if $(INFO_IMAGES_DIR),--info-images-dir=$(INFO_IMAGES_DIR),) -LILYPOND_BOOK_FLAGS = --process="$(LILYPOND_BINARY) $(LILYPOND_BOOK_LILYPOND_FLAGS)" $(LILYPOND_BOOK_VERBOSE) $(LILYPOND_BOOK_INFO_IMAGES_DIR) +LILYPOND_BOOK_FLAGS = $(LILYPOND_BOOK_VERBOSE) $(LILYPOND_BOOK_INFO_IMAGES_DIR) + +ifeq ($(out),) +LILYPOND_BOOK_PROCESS = true +else +LILYPOND_BOOK_PROCESS = $(LILYPOND_BINARY) +endif + TEXINPUTS=$(top-src-dir)/tex/:: export TEXINPUTS diff --git a/make/ly-rules.make b/make/ly-rules.make index 75a5eeebe5..28b46f7b9b 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -1,36 +1,21 @@ .SUFFIXES: .doc .tely .texi .ly - $(outdir)/%.latex: %.doc - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BINARY) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) $< - -ifneq ($(out),) + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) $(LILYPOND_BOOK_FLAGS) $< # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --srcdir builds $(outdir)/%.texi: %.tely - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BINARY) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< $(outdir)/%.texi: $(outdir)/%.tely - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BINARY) $(LILYPOND_BOOK_INCLUDES)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< + echo $(LILYPOND_BOOK_PROCESS) + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --process='$(LILYPOND_BOOK_PROCESS) $(LILYPOND_BOOK_INCLUDES) $(LILYPOND_BOOK_LILYPOND_FLAGS)' --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) $< # # DON'T REMOVE SOURCE FILES, otherwise the .TEXI ALWAYS OUT OF DATE. # rm -f $< -else # out is empty - -# nexi: n[o-lilypond t]exi -# for plain info doco: don't run lilypond -$(outdir)/%.nexi: %.tely - rm -f $(outdir)/$*.texi - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --output=$(outdir) --format=$(LILYPOND_BOOK_FORMAT) $(LILYPOND_BOOK_FLAGS) --process='true' $< - mv -f $(outdir)/$*.texinfo $@ 2>/dev/null || mv -f $(outdir)/$*.texi $@ - -$(outdir)/%.info: $(outdir)/%.nexi - $(MAKEINFO) -I $(outdir) --output=$(outdir)/$(*F).info $< - -endif # out is empty $(outdir)/%.html.omf: %.tely $(call GENERATE_OMF,html) diff --git a/make/ly-vars.make b/make/ly-vars.make index d355969130..e27b270ad8 100644 --- a/make/ly-vars.make +++ b/make/ly-vars.make @@ -18,3 +18,4 @@ EXTRA_DIST_FILES +=$(TELY_FILES) $(LY_FILES) $(ITEXI_FILES) $(ITELY_FILES) $(ILY DVIPS_FLAGS= -h $(subst .pdf,.psfonts,$(subst .ps,.psfonts, $(notdir $@ ))) + diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index fbf05402d6..88a4fe47a2 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -26,7 +26,7 @@ $(outdir)/%.info-images-dir.dep: $(outdir)/%.texi else $(outdir)/.info-images-dir.dep: - true + touch $@ endif diff --git a/stepmake/stepmake/topdocs-targets.make b/stepmake/stepmake/topdocs-targets.make index 0300803f84..5c4777ec92 100644 --- a/stepmake/stepmake/topdocs-targets.make +++ b/stepmake/stepmake/topdocs-targets.make @@ -1,6 +1,6 @@ default: local-doc -local-WWW: $(HTML_FILES) $(PDF_FILES) $(TO_TOP_FILES) +local-WWW: $(HTML_FILES) $(PDF_FILES) -make-txt-files: $(addprefix $(outdir)/,$(addsuffix .txt,$(TO_TOP_FILES))) +make-txt-files: $(TO_TOP_FILES) diff --git a/stepmake/stepmake/topdocs-vars.make b/stepmake/stepmake/topdocs-vars.make index 336c26b984..73adc87046 100644 --- a/stepmake/stepmake/topdocs-vars.make +++ b/stepmake/stepmake/topdocs-vars.make @@ -1,2 +1,2 @@ -TO_TOP_FILES=$(addprefix $(outdir)/, $(README_TOP_FILES)) +TO_TOP_FILES=$(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES))) diff --git a/stepmake/stepmake/toplevel-targets.make b/stepmake/stepmake/toplevel-targets.make index 8878b31ec1..28628efb02 100644 --- a/stepmake/stepmake/toplevel-targets.make +++ b/stepmake/stepmake/toplevel-targets.make @@ -29,7 +29,7 @@ $(package-icon): do-top-doc: - -$(MAKE) -C Documentation/topdocs/ TO_TOP_FILES="$(TOPDOC_FILES)" make-txt-files + -$(MAKE) -C Documentation/topdocs/ README_TOP_FILES="$(TOPDOC_FILES)" make-txt-files $(README_TXT_FILES): do-top-doc -- 2.39.5