1 .PHONY : texinfo-all-menus-update
6 local-WWW-1: $(OUT_TEXINFO_MANUALS) $(XREF_MAPS_FILES)
9 local-txt-doc: $(OUTTXT_FILES)
11 check-info: texinfo-all-menus-update
14 local-install: install-info
15 local-uninstall: uninstall-info
16 install-info: local-install-info
17 uninstall-info: local-uninstall-info
19 install-info: $(INFO_FILES)
20 $(INFO_INSTALL_COMMAND) local-install
23 $(INFO_INSTALL_COMMAND) local-uninstall
29 else # $(INFO_FILES) non empty
30 # There are two modes for info: with and without images.
33 # This builds all .info targets with images, in out-www.
34 # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
36 ifneq ($(COPY_INFO_IMAGES),)
37 # only Info docs are installed (not HTML nor PDF),
38 # so images should be copied
41 # remove $(infodir)/$(INFO_IMAGES_DIR) in case it is a symlink
42 -rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
43 $(INSTALL) -d $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
44 rsync -r --include '[0-9a-f][0-9a-f]' --include '*.png' --exclude '*' $(outdir)/ $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
46 uninstall-info-images:
47 rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
49 else # if HTML and PDF docs are installed too, symlink image directories
50 install-info-images: uninstall-info-images
51 cd $(DESTDIR)$(infodir) && ln -sf $$($(PYTHON) $(buildscript-dir)/relative $(DESTDIR)$(webdir)/$(DEST_INFO_IMAGES_SUBDIR)) $(INFO_IMAGES_DIR)
53 uninstall-info-images:
54 rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
55 endif # copying info images
58 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
59 ## install-info can't do all its job for binary packages' build systems.
60 ## Best we can do is to notify the builder or packager.
61 local-install-info: info
62 -$(INSTALL) -d $(DESTDIR)$(infodir)
64 @echo "***************************************************************"
65 @echo "Please add or update the LilyPond direntries,"
66 @echo "do or add in the postinstall script"
68 @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info"
70 $(MAKE) install-info-images
72 local-uninstall-info: uninstall-info-images
73 -rmdir $(DESTDIR)$(infodir)
75 else # installing directly into standard /usr/...
76 local-install-info: info
77 -$(INSTALL) -d $(DESTDIR)$(infodir)
78 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
79 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
80 $(MAKE) install-info-images
82 local-uninstall-info: uninstall-info-images
83 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
85 endif # installing directly into standard /usr/...
89 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
90 ## install-info can't do all his job for binary packages build systems.
91 ## Best we can do is to notify the builder or packager.
92 local-install-info: info
93 -$(INSTALL) -d $(DESTDIR)$(infodir)
95 @echo "***************************************************************"
96 @echo "Please add or update the LilyPond direntries, do"
98 @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info"
100 @echo "To compile Info documentation with images, please read"
101 @echo "Application Usage document, section \"Building documentation\"."
104 local-uninstall-info:
105 -rmdir $(DESTDIR)$(infodir)
107 else # installing directly into standard /usr/...
108 local-install-info: info
109 -$(INSTALL) -d $(DESTDIR)$(infodir)
110 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
111 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
113 @echo "***************************************************************"
114 @echo "To compile Info documentation with images, do from top of the build tree"
118 @echo "which builds documentation in all formats; to build only Info documentation, do"
122 @echo "To list all available targets, do"
126 @echo "For details, please read Application Usage document, section \"Building documentation\"."
129 local-uninstall-info:
130 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
132 endif # installing into standard /usr/* root
136 endif # $(INFO_FILES) non empty
138 TEXINFO_ALL_MENUS_UPDATE_EL ='\
140 (version-control nil))\
141 (load-library "texinfo")\
143 (texinfo-all-menus-update)\
144 (if (buffer-modified-p (current-buffer))\
148 # buffer-modified-p is ALWAYS true, even if there were no actual
149 # changes, so we try setting origal (timestamp) back if there
152 # ugh: emacs20.7 batch mode is not really batch:
154 # answer `echo q' to the question:
155 # FILE locked by EMAIL (pid PID): (s, q, p, ?)?
157 texinfo-all-menus-update:
158 -$(foreach i, $(TEXINFO_SOURCES), echo q | emacs --batch --no-site-file $(i) --eval $(TEXINFO_ALL_MENUS_UPDATE_EL); )
159 $(foreach i, $(sort $(TEXINFO_SOURCES)), if diff -u $(i)~ $(i); then mv $(i)~ $(i); fi && ) true
161 local-help: local-texinfo-help
164 @echo " info [out=www] update Info documentation"
165 @echo " (use \`out=www' for having images)"
166 @echo " install-info [out=www] install Info documentation (idem)"
167 @echo " texinfo-all-menus-update update node menus in Texinfo source files"
168 @echo " (use with caution)"