X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Ftexinfo-targets.make;h=6dbc031de55d1df68a7f4f78dbb86e75062fc3af;hb=51d4e23ad19c445ca4037a98dee15c838da71c39;hp=8b6669af21a28dcb24a68a297c5d4ee821656f5a;hpb=0a06536c058cd7641a29a0b4c80cf9fd8e334fb2;p=lilypond.git diff --git a/stepmake/stepmake/texinfo-targets.make b/stepmake/stepmake/texinfo-targets.make index 8b6669af21..6dbc031de5 100644 --- a/stepmake/stepmake/texinfo-targets.make +++ b/stepmake/stepmake/texinfo-targets.make @@ -2,9 +2,11 @@ default: $(INFO_FILES) -local-WWW-2: $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.html)) +ifeq ($(out),www) +local-WWW-1: $(OUT_TEXINFO_MANUALS) $(XREF_MAPS_FILES) +endif -local-doc: $(OUTTXT_FILES) +local-txt-doc: $(OUTTXT_FILES) check-info: texinfo-all-menus-update @@ -31,64 +33,103 @@ ifeq ($(out),www) # This builds all .info targets with images, in out-www. # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info +ifneq ($(COPY_INFO_IMAGES),) +# only Info docs are installed (not HTML nor PDF), +# so images should be copied + +install-info-images: +# remove $(infodir)/$(INFO_IMAGES_DIR) in case it is a symlink + -rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) + $(INSTALL) -d $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) + rsync -r --include '[0-9a-f][0-9a-f]' --include '*.png' --exclude '*' $(outdir)/ $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) + +uninstall-info-images: + rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) + +else # if HTML and PDF docs are installed too, symlink image directories +install-info-images: uninstall-info-images + cd $(DESTDIR)$(infodir) && ln -sf $$($(PYTHON) $(buildscript-dir)/relative $(DESTDIR)$(webdir)/$(DEST_INFO_IMAGES_SUBDIR)) $(INFO_IMAGES_DIR) + +uninstall-info-images: + rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) +endif # copying info images + + +ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr) +## install-info can't do all its job for binary packages' build systems. +## Best we can do is to notify the builder or packager. local-install-info: info -$(INSTALL) -d $(DESTDIR)$(infodir) -ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr) -## Can not have absolute symlinks because some binary packages build schemes -## install files in nonstandard root. Best we can do is to notify the -## builder or packager. @echo @echo "***************************************************************" - @echo "Please add or update the LilyPond direntries, do" + @echo "Please add or update the LilyPond direntries," + @echo "do or add in the postinstall script" @echo - @echo " install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info" - @echo - @echo "For images in the INFO docs to work, do: " - @echo - @echo " (cd $(infodir) && ln -sfT ../doc/lilypond/html/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR))" - @echo "or add something like that to the postinstall script." + @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info" @echo + $(MAKE) install-info-images + +local-uninstall-info: uninstall-info-images + -rmdir $(DESTDIR)$(infodir) + else # installing directly into standard /usr/... +local-install-info: info -$(INSTALL) -d $(DESTDIR)$(infodir) $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info - cd $(infodir) && ln -sfT $(webdir)/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR) -endif # installing directly into standard /usr/... + $(MAKE) install-info-images + +local-uninstall-info: uninstall-info-images + $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true -local-uninstall-WWW: - rm -f $(infodir)/$(INFO_IMAGES_DIR) +endif # installing directly into standard /usr/... else # out!=www -local-install-info: info - -$(INSTALL) -d $(DESTDIR)$(package_infodir) ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr) -## Can not have absolute symlinks because some binary packages build schemes -## install files in nonstandard root. Best we can do is to notify the -## builder or packager. +## install-info can't do all his job for binary packages build systems. +## Best we can do is to notify the builder or packager. +local-install-info: info + -$(INSTALL) -d $(DESTDIR)$(infodir) @echo @echo "***************************************************************" @echo "Please add or update the LilyPond direntries, do" @echo - @echo " install-info --info-dir=$(infodir) out/$(MAIN_INFO_DOC).info" - @echo - @echo "For images in the INFO docs to work, do" - @echo - @echo " make out=www install-info " + @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info" @echo - @echo "and read the extra instructions." + @echo "To compile Info documentation with images, please read" + @echo "Application Usage document, section \"Building documentation\"." @echo + +local-uninstall-info: + -rmdir $(DESTDIR)$(infodir) + else # installing directly into standard /usr/... +local-install-info: info -$(INSTALL) -d $(DESTDIR)$(infodir) $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info @echo @echo "***************************************************************" - @echo "For images in the INFO docs to work, do" + @echo "To compile Info documentation with images, do from top of the build tree" @echo - @echo " make out=www install-info " + @echo " make doc" @echo -endif # installing into standard /usr/* root# installing into /usr/... + @echo "which builds documentation in all formats; to build only Info documentation, do" + @echo + @echo " make info" + @echo + @echo "To list all available targets, do" + @echo + @echo " make help" + @echo + @echo "For details, please read Application Usage document, section \"Building documentation\"." + @echo + +local-uninstall-info: + $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true + +endif # installing into standard /usr/* root endif # out!=www @@ -120,8 +161,9 @@ texinfo-all-menus-update: local-help: local-texinfo-help local-texinfo-help: - @echo -e "\ - info [out=www] update Info documentation (use \`out=www' for having images)\n\ - install-info [out=www] install Info documentation (idem)\n\ - texinfo-all-menus-update update node menus in Texinfo source files (use with caution)\n" + @echo " info [out=www] update Info documentation" + @echo " (use \`out=www' for having images)" + @echo " install-info [out=www] install Info documentation (idem)" + @echo " texinfo-all-menus-update update node menus in Texinfo source files" + @echo " (use with caution)"