From 456d20f8f4a581e3ac77b0e1d912b90f682af08e Mon Sep 17 00:00:00 2001 From: John Mandereau <john.mandereau@gmail.com> Date: Fri, 24 Apr 2009 02:17:47 +0200 Subject: [PATCH] Update documentation targets - remove old target 'doc': text documentation is already generated by 'make all'. - user target name changes: web -> doc web-1 -> doc-stage-1 web-clean -> doc-clean web-install -> install-doc web-uninstall -> uninstall-doc info-install -> install-info - internal target names changes: do-top-doc -> top-doc localpo -> local-po - protect private documentation targets with conditional testing of out==www; - automatically generate README.txt and INSTALL.txt even for a Git checkout when autogen.sh and configure are successful. (cherry picked from commit 55c49859e8b5125438e0503c681d565d2944a01f) --- .gitignore | 1 + Documentation/GNUmakefile | 3 +- Documentation/bibliography/GNUmakefile | 3 +- Documentation/devel/GNUmakefile | 2 ++ Documentation/pictures/GNUmakefile | 3 ++ Documentation/topdocs/GNUmakefile | 2 ++ Documentation/user/GNUmakefile | 2 ++ Documentation/user/compile.itely | 14 ++++----- GNUmakefile.in | 39 ++++++++++++------------- configure.in | 5 ++++ input/lsr/GNUmakefile | 8 +++-- input/regression/musicxml/GNUmakefile | 2 ++ make/doc-i18n-root-targets.make | 2 ++ make/doc-i18n-topdocs-targets.make | 4 +++ make/doc-i18n-user-targets.make | 2 ++ make/lysdoc-targets.make | 2 ++ make/mutopia-targets.make | 2 ++ stepmake/stepmake/generic-targets.make | 21 +++++++------ stepmake/stepmake/po-targets.make | 6 ++-- stepmake/stepmake/texinfo-targets.make | 2 ++ stepmake/stepmake/topdocs-targets.make | 4 ++- stepmake/stepmake/toplevel-targets.make | 24 +++++++-------- 22 files changed, 96 insertions(+), 57 deletions(-) diff --git a/.gitignore b/.gitignore index ab48958870..5f51beb6fe 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ ?.* AUTHORS.txt INSTALL.txt +README.txt TAGS \#* \#.* diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 747a8e304e..eaed920a9a 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -7,7 +7,6 @@ STEPMAKE_TEMPLATES=documentation texinfo tex LOCALSTEPMAKE_TEMPLATES=lilypond ly LILYPOND_BOOK_FLAGS=--extra-options '-e "(ly:set-option (quote internal-type-checking) \#t)"' README_TOP_FILES= DEDICATION THANKS -EXTRA_DIST_FILES= TRANSLATION include $(depth)/make/stepmake.make @@ -17,12 +16,14 @@ OUT_CSS_FILES= $(CSS_FILES:%.css=$(outdir)/%.css) default: local-doc +ifeq ($(out),www) local-WWW-2: txt-to-html $(OUT_HTML_FILES) local-WWW-clean: deep-WWW-clean deep-WWW-clean: rm -rf $(outdir)/wiki-dump +endif OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES))) diff --git a/Documentation/bibliography/GNUmakefile b/Documentation/bibliography/GNUmakefile index 798dad58a6..06055b5808 100644 --- a/Documentation/bibliography/GNUmakefile +++ b/Documentation/bibliography/GNUmakefile @@ -15,13 +15,14 @@ dvi: $(DVI_FILES) $(OUT_BIB_FILES) ps: $(PS_FILES) -# urg default: GENHTMLS = engraving colorado computer-notation OUTGENHTMLS = $(addprefix $(outdir)/, $(GENHTMLS:%=%.html)) +ifeq ($(out),www) local-WWW-2: $(addprefix $(outdir)/, $(BIB_FILES:.bib=.html) index.html) +endif $(outdir)/%.bib: %.bib ln -f $< $@ diff --git a/Documentation/devel/GNUmakefile b/Documentation/devel/GNUmakefile index 640afbac98..1096add366 100644 --- a/Documentation/devel/GNUmakefile +++ b/Documentation/devel/GNUmakefile @@ -28,8 +28,10 @@ $(outdir)/%/source: mkdir -p $(dir $@) ln -sf $(depth)/.. $(@) +ifeq ($(out),www) local-WWW-1: $(PDF_FILES) local-WWW-2: $(HTML_FILES) $(OUT_HTML_FILES) $(source-links) +endif $(PDF_FILES) $(HTML_FILES): $(ITEXI_FILES) diff --git a/Documentation/pictures/GNUmakefile b/Documentation/pictures/GNUmakefile index 35ef738ae4..4a8f2eb72f 100644 --- a/Documentation/pictures/GNUmakefile +++ b/Documentation/pictures/GNUmakefile @@ -21,4 +21,7 @@ endif # PLATFORM_WINDOWS local-dist: $(icon) xgifs: $(OUTGIF_FILES) pngs: $(OUTPNG_FILES) + +ifeq ($(out),www) local-WWW-1: $(OUTPNG_FILES) +endif diff --git a/Documentation/topdocs/GNUmakefile b/Documentation/topdocs/GNUmakefile index 0f81c76f11..231598d8f4 100644 --- a/Documentation/topdocs/GNUmakefile +++ b/Documentation/topdocs/GNUmakefile @@ -11,6 +11,8 @@ OUTTXT_FILES= $(outdir)/NEWS.txt include $(depth)/make/stepmake.make +ifeq ($(out),www) local-WWW-1: $(OUT_TEXI_FILES) +endif .SECONDARY: diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 6e0dbe3a56..237bb973a0 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -122,9 +122,11 @@ $(outdir)/%/source: mkdir -p $(dir $@) ln -sf $(depth)/.. $(@) +ifeq ($(out),www) local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) info local-WWW-2: $(HTML_FILES) $(DEEP_HTML_FILES) $(source-links) +endif $(outdir)/%.bib: %.bib ln -f $< $@ diff --git a/Documentation/user/compile.itely b/Documentation/user/compile.itely index 5ceaa57720..4f9ac333a5 100644 --- a/Documentation/user/compile.itely +++ b/Documentation/user/compile.itely @@ -224,7 +224,7 @@ LilyPond binary. The documentation is built by issuing @example -make web +make doc @end example After compilation, the HTML documentation tree is available in @@ -234,7 +234,7 @@ The HTML, PDF and if available Info files can be installed into the standard documentation path by issuing @example -make web-install +make install-doc @end example @noindent @@ -253,14 +253,14 @@ make info Separate installation of this documentation is done by issuing @example -make info-install +make install-info @end example @noindent -Note that to get the images in Info documentation, @code{web-install} +Note that to get the images in Info documentation, @code{install-doc} target creates symbolic links to HTML and PDF installed documentation tree in @file{@var{prefix}/share/info}, in order to save disk space, -whereas @code{info-install} copies images in +whereas @code{install-info} copies images in @file{@var{prefix}/share/info} subdirectories. It is possible to build a documentation tree in @@ -269,7 +269,7 @@ used on a website with content negotiation for automatic language selection; this can be achieved by issuing @example -make WEB_TARGETS=online web +make WEB_TARGETS=online doc @end example @noindent @@ -344,7 +344,7 @@ From a fresh Git checkout, do ./autogen.sh # ignore any warning messages cp GNUmakefile.in GNUmakefile make -C python -nice make LILYPOND_EXTERNAL_BINARY=/path/to/bin/lilypond web +nice make LILYPOND_EXTERNAL_BINARY=/path/to/bin/lilypond doc @end example Please note that this may break sometimes -- for example, if a new diff --git a/GNUmakefile.in b/GNUmakefile.in index aee8bfe20b..a45f486208 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -59,31 +59,42 @@ refresh-release-files: python-modules: $(MAKE) -C python -do-top-doc: python-modules +top-doc: python-modules local-clean: local-clean-ChangeLog local-clean-ChangeLog: rm -f ChangeLog -dist-toplevel-txt-files: do-top-doc +dist-toplevel-txt-files: top-doc -mkdir -p $(distdir) ln $(TOPDOC_TXT_FILES) $(distdir)/ ln $(top-src-dir)/stepmake/aclocal.m4 $(distdir)/ -doc: - $(MAKE) -C Documentation - info: $(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) out=www info && ) true -info-install: info +install-info: info $(MAKE) out=www COPY_INFO_IMAGES=1 install-info-WWW install-help2man: $(MAKE) -C scripts man install-help2man $(MAKE) -C lily man install-help2man +install-doc: + $(MAKE) out=www install-WWW + $(MAKE) out=www install-info-WWW + +uninstall-doc: + $(MAKE) out=www uninstall-WWW + +local-install: + $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir) + +final-install: + @true + +ifeq ($(out),www) # All web targets, except info image symlinks and info docs are # installed in non-recursing target from TOP-SRC-DIR install-WWW: @@ -93,25 +104,12 @@ install-WWW: install-info-WWW: $(foreach d, $(INFO_DIRECTORIES),$(MAKE) -C $(d) install-info && ) true -web-install: - $(MAKE) out=www install-WWW - $(MAKE) out=www install-info-WWW - uninstall-WWW: rm -rf $(DESTDIR)$(webdir) -rmdir $(package_docdir) $(MAKE) -C Documentation/user uninstall $(MAKE) -C input/lsr uninstall -web-uninstall: - $(MAKE) out=www uninstall-WWW - -local-install: - $(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir) - -final-install: - @true - # For online docs with content negotiation, issue `make web WEB_TARGETS=online' # For both online and offline docs, issue `make web WEB_TARGETS="offline online"' @@ -124,6 +122,7 @@ WWW-post: find $(outdir) -name '*-root' | xargs rm -rf $(buildscript-dir)/www_post $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(outdir) "$(WEB_TARGETS)" find $(outdir)/offline-root -type l -delete +endif tree-prefix = $(outdir) @@ -143,7 +142,7 @@ c-clean: src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh -web-clean: snippets-clean $(tree-share-prefix)/lilypond-force +doc-clean: snippets-clean $(tree-share-prefix)/lilypond-force default: $(config_h) build-dir-setup diff --git a/configure.in b/configure.in index d45c4c0a44..b067305f9d 100644 --- a/configure.in +++ b/configure.in @@ -205,6 +205,11 @@ STEPMAKE_END test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc="" +if make top-doc 1>/dev/null 2>&1; then + rm -f INSTALL.txt && ln Documentation/topdocs/out/INSTALL.txt . + rm -f README.txt && ln Documentation/topdocs/out/README.txt . +fi + cat <<EOF Type: diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile index 9f06be94de..8afa862bb2 100644 --- a/input/lsr/GNUmakefile +++ b/input/lsr/GNUmakefile @@ -50,19 +50,21 @@ $(INFO_FILES): true endif +local-clean: + rm -f $(INFO_IMAGES_DIR) + +ifeq ($(out),www) # All web targets, except info image symlinks and info docs are # installed in non-recursing target from TOP-SRC-DIR local-install-WWW: local-install-info local-uninstall-WWW: local-uninstall-info -local-clean: - rm -f $(INFO_IMAGES_DIR) - local-WWW-1: info $(outdir)/lilypond-snippets.pdf \ $(outdir)/lilypond-snippets.texi local-WWW-2: $(outdir)/lilypond-snippets/index.html \ $(outdir)/lilypond-snippets-big-page.html \ $(source-links) +endif .SECONDARY: diff --git a/input/regression/musicxml/GNUmakefile b/input/regression/musicxml/GNUmakefile index 888616e7e7..b5ca56513e 100644 --- a/input/regression/musicxml/GNUmakefile +++ b/input/regression/musicxml/GNUmakefile @@ -17,7 +17,9 @@ include $(depth)/make/stepmake.make TITLE=Unofficial MusicXML test suite TEST_SUITE_VERSION=0.1 +ifeq ($(out),www) local-WWW-2: zip +endif zip: $(outdir)/MusicXML-TestSuite-$(TEST_SUITE_VERSION).zip diff --git a/make/doc-i18n-root-targets.make b/make/doc-i18n-root-targets.make index 3b97883dfd..213e478fa8 100644 --- a/make/doc-i18n-root-targets.make +++ b/make/doc-i18n-root-targets.make @@ -1,4 +1,6 @@ default: +ifeq ($(out),www) local-WWW-2: $(OUT_HTML_FILES) $(buildscript-dir)/mass-link --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/$(outdir) $(HTML_FILES) +endif diff --git a/make/doc-i18n-topdocs-targets.make b/make/doc-i18n-topdocs-targets.make index 0c0a018b7a..d7e26a95ce 100644 --- a/make/doc-i18n-topdocs-targets.make +++ b/make/doc-i18n-topdocs-targets.make @@ -1,5 +1,9 @@ +default: + +ifeq ($(out),www) local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) local-WWW-2: $(HTML_FILES) find $(outdir) -name '*.html' | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/topdocs/$(outdir) NEWS.pdf find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/topdocs/$(outdir) +endif diff --git a/make/doc-i18n-user-targets.make b/make/doc-i18n-user-targets.make index 4bb7c5b9c9..478bfac498 100644 --- a/make/doc-i18n-user-targets.make +++ b/make/doc-i18n-user-targets.make @@ -1,5 +1,6 @@ default: +ifeq ($(out),www) local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) $(XREF_MAPS_FILES) local-WWW-2: $(DEEP_HTML_FILES) $(BIG_PAGE_HTML_FILES) $(DOCUMENTATION_LOCALE_TARGET) @@ -10,3 +11,4 @@ local-WWW-2: $(DEEP_HTML_FILES) $(BIG_PAGE_HTML_FILES) $(DOCUMENTATION_LOCALE_TA $(DOCUMENTATION_LOCALE_TARGET): $(MAKE) -C $(depth)/Documentation/po out=www messages touch $@ +endif diff --git a/make/lysdoc-targets.make b/make/lysdoc-targets.make index 0b5d6ec2ed..7f58e9692f 100644 --- a/make/lysdoc-targets.make +++ b/make/lysdoc-targets.make @@ -1,6 +1,8 @@ +ifeq ($(out),www) local-WWW-1: $(outdir)/collated-files.texi $(outdir)/collated-files.pdf local-WWW-2: $(outdir)/collated-files.html +endif local-test-baseline: rm -rf $(outdir)-baseline diff --git a/make/mutopia-targets.make b/make/mutopia-targets.make index deaf240861..f89fcc4060 100644 --- a/make/mutopia-targets.make +++ b/make/mutopia-targets.make @@ -6,7 +6,9 @@ all: $(OUT_FILES) +ifeq ($(out),www) local-WWW-1: $(ly_examples) $(pdf_examples) $(png_examples) +endif tar: mkdir -p $(outdir)/$(tarball) diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make index d0c0bf44d1..a36faaeb23 100644 --- a/stepmake/stepmake/generic-targets.make +++ b/stepmake/stepmake/generic-targets.make @@ -1,5 +1,5 @@ -.PHONY : all clean bin-clean config default dist doc exe help html lib TAGS\ - po web web-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2 +.PHONY : all clean bin-clean config default dist exe help html lib TAGS\ + po doc doc-stage-1 WWW-1 WWW-2 WWW-post local-WWW-1 local-WWW-2 all: default $(LOOP) @@ -56,17 +56,18 @@ Targets specific to current directory:\n" help: generic-help local-help @echo -e "Generic targets:\n\ - all * update everything except website documentation\n\ + all * update everything except documentation with images\n\ clean * remove all generated stuff in $(outdir)\n\ bin-clean * same as clean, except that mf/out is preserved\n\ default same as the empty target\n\ + doc * update documentation with images in directory \`out-www'\n\ + doc-stage-1 * update only PDF and Info documentation in directory \`out-www'\n\ + doc-clean * clean \`out-www' directory\n\ exe update all executables\n\ help this help\n\ install * install programs and data (prefix=$(prefix))\n\ - uninstall* uninstall programs and data\n\ lib update all libraries\n\ - web * update website in directory \`out-www'\n\ - web-clean * clean \`out-www' directory\n\ + uninstall* uninstall programs and data\n\ TAGS generate tagfiles\n\ \n\ \`make' may be invoked from any subdirectory.\n\ @@ -173,6 +174,7 @@ $(config_make): $(top-src-dir)/configure # plus WWW-post (only at toplevel) # see INSTALL for more information. +ifeq ($(out),www) local-WWW-1: local-WWW-2: WWW-post: @@ -182,14 +184,15 @@ WWW-1: local-WWW-1 WWW-2: local-WWW-2 $(LOOP) +endif -web: web-1 +doc: doc-stage-1 $(MAKE) out=www WWW-2 $(MAKE) out=www WWW-post -web-1: +doc-stage-1: $(MAKE) -C $(depth)/scripts/build out= $(MAKE) out=www WWW-1 -web-clean: +doc-clean: $(MAKE) out=www clean diff --git a/stepmake/stepmake/po-targets.make b/stepmake/stepmake/po-targets.make index 4221f8ed45..05088ee170 100644 --- a/stepmake/stepmake/po-targets.make +++ b/stepmake/stepmake/po-targets.make @@ -12,13 +12,13 @@ new-po: ifeq ($(strip $(depth)),.) po: new-po $(LOOP) -localpo: +local-po: @true else -po: localpo +po: local-po $(LOOP) ALL_PO_SOURCES = $(ALL_C_SOURCES) $(ALL_CC_SOURCES) $(PYTHON_SCRIPTS_IN) $(PY_MODULES_IN) $(SCM_FILES) $(wildcard $(outdir)/*.hh) $(wildcard $(outdir)/*.cc) -localpo: +local-po: ifneq ($(strip $(ALL_PO_SOURCES)),) @echo $(ALL_PO_SOURCES) xgettext --default-domain=$(package) --join \ diff --git a/stepmake/stepmake/texinfo-targets.make b/stepmake/stepmake/texinfo-targets.make index e9cbf16aec..133a9bb218 100644 --- a/stepmake/stepmake/texinfo-targets.make +++ b/stepmake/stepmake/texinfo-targets.make @@ -2,7 +2,9 @@ default: $(INFO_FILES) +ifeq ($(out),www) local-WWW-1: $(XREF_MAPS_FILES) +endif local-doc: $(OUTTXT_FILES) diff --git a/stepmake/stepmake/topdocs-targets.make b/stepmake/stepmake/topdocs-targets.make index 93d2f9cccf..acacbb3c69 100644 --- a/stepmake/stepmake/topdocs-targets.make +++ b/stepmake/stepmake/topdocs-targets.make @@ -1,8 +1,10 @@ default: local-doc +ifeq ($(out),www) local-WWW-1: $(PDF_FILES) local-WWW-2: $(HTML_FILES) +endif -make-txt-files: $(TO_TOP_FILES) +txt-files: $(TO_TOP_FILES) diff --git a/stepmake/stepmake/toplevel-targets.make b/stepmake/stepmake/toplevel-targets.make index cc4a156e1a..94f9e234f3 100644 --- a/stepmake/stepmake/toplevel-targets.make +++ b/stepmake/stepmake/toplevel-targets.make @@ -1,6 +1,6 @@ -.PHONY: web-install -web-install: -web-uninstall: +.PHONY: install-doc uninstall-doc +install-doc: +uninstall-doc: local-dist: configure @@ -30,11 +30,11 @@ $(package-icon): $(MAKE) -C Documentation/pictures icon -do-top-doc: - -$(MAKE) -C Documentation/topdocs/ README_TOP_FILES="$(TOPDOC_FILES)" make-txt-files +top-doc: + $(MAKE) -C Documentation/topdocs/ README_TOP_FILES="$(TOPDOC_FILES)" txt-files -$(README_TXT_FILES): do-top-doc +$(README_TXT_FILES): top-doc local-clean: @@ -44,7 +44,7 @@ ifeq ($(strip $(SRCMAKE)),) $(MAKE) final-install endif -local-dist: do-top-doc +local-dist: top-doc dist: rm -rf $(distdir) @@ -59,17 +59,17 @@ local-help: config rerun configure\n\ dist roll tarball: $(depth)/$(outdir)/$(distname).tar.gz\n\ distclean also remove configure output\n\ - doc update all documentation (without images)\n\ - info build Info documentation with images\n\ - info-install install Info documentation with images\n\ cvs-clean also remove out directories and generated files\n\ maintainerclean also remove distributed generated files\n\ po make new translation Portable Object database\n\ po-replace do po-update and replace catalogs with msgmerged versions\n\ po-update update translation Portable Object database\n\ - web-install * install website documentation in (webdir=$(webdir))\n\ +\n\ + install-doc install website documentation in (webdir=$(webdir))\n\ and Info documentation with images\n\ - web-uninstall * remove installed documentation with images\n\ + uninstall-doc remove installed documentation with images\n\ + info build Info documentation with images\n\ + install-info install Info documentation with images\n\ \n\ Some more targets are available for testing changes:\n\ test-baseline check test-redo test-clean\n\ -- 2.39.5