1 .PHONY : texinfo-all-menus-update
5 local-WWW-1: $(XREF_MAPS_FILES)
7 local-doc: $(OUTTXT_FILES)
9 check-info: texinfo-all-menus-update
12 local-install: install-info
13 local-uninstall: uninstall-info
14 install-info: local-install-info
15 uninstall-info: local-uninstall-info
17 install-info: $(INFO_FILES)
18 $(INFO_INSTALL_COMMAND) local-install
21 $(INFO_INSTALL_COMMAND) local-uninstall
27 else # $(INFO_FILES) non empty
28 # There are two modes for info: with and without images.
31 # This builds all .info targets with images, in out-www.
32 # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
34 ifneq ($(COPY_INFO_IMAGES),)
35 # only Info docs are installed (not HTML nor PDF),
36 # so images should be copied
39 # remove $(infodir)/$(INFO_IMAGES_DIR) in case it is a symlink
40 -rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
41 $(INSTALL) -d $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
42 rsync -r --include '[0-9a-f][0-9a-f]' --include '*.png' --exclude '*' $(outdir)/ $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)/
44 uninstall-info-images:
45 rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
47 else # if HTML and PDF docs are installed too, symlink image directories
48 install-info-images: uninstall-info-images
49 cd $(DESTDIR)$(infodir) && ln -sf $$($(PYTHON) $(buildscript-dir)/relative $(DESTDIR)$(webdir)/$(DEST_INFO_IMAGES_SUBDIR)) $(INFO_IMAGES_DIR)
51 uninstall-info-images:
52 rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
53 endif # copying info images
56 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
57 ## install-info can't do all his job for binary packages build systems.
58 ## Best we can do is to notify the builder or packager.
59 local-install-info: info
60 -$(INSTALL) -d $(DESTDIR)$(infodir)
62 @echo "***************************************************************"
63 @echo "Please add or update the LilyPond direntries,"
64 @echo "do or add in the postinstall script"
66 @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info"
68 $(MAKE) install-info-images
70 local-uninstall-info: uninstall-info-images
71 -rmdir $(DESTDIR)$(infodir)
73 else # installing directly into standard /usr/...
74 local-install-info: info
75 -$(INSTALL) -d $(DESTDIR)$(infodir)
76 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
77 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
78 $(MAKE) install-info-images
80 local-uninstall-info: uninstall-info-images
81 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
83 endif # installing directly into standard /usr/...
87 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
88 ## install-info can't do all his job for binary packages build systems.
89 ## Best we can do is to notify the builder or packager.
90 local-install-info: info
91 -$(INSTALL) -d $(DESTDIR)$(infodir)
93 @echo "***************************************************************"
94 @echo "Please add or update the LilyPond direntries, do"
96 @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info"
98 @echo "To compile Info documentation with images, please read"
99 @echo "Application Usage document, section \"Building documentation\"."
102 local-uninstall-info:
103 -rmdir $(DESTDIR)$(infodir)
105 else # installing directly into standard /usr/...
106 local-install-info: info
107 -$(INSTALL) -d $(DESTDIR)$(infodir)
108 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
109 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
111 @echo "***************************************************************"
112 @echo "To compile Info documentation with images, do from top of the build tree"
116 @echo "which builds documentation in all formats; to build only Info documentation, do"
120 @echo "To list all available targets, do"
124 @echo "For details, please read Application Usage document, section \"Building documentation\"."
127 local-uninstall-info:
128 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
130 endif # installing into standard /usr/* root
134 endif # $(INFO_FILES) non empty
136 TEXINFO_ALL_MENUS_UPDATE_EL ='\
138 (version-control nil))\
139 (load-library "texinfo")\
141 (texinfo-all-menus-update)\
142 (if (buffer-modified-p (current-buffer))\
146 # buffer-modified-p is ALWAYS true, even if there were no actual
147 # changes, so we try setting origal (timestamp) back if there
150 # ugh: emacs20.7 batch mode is not really batch:
152 # answer `echo q' to the question:
153 # FILE locked by EMAIL (pid PID): (s, q, p, ?)?
155 texinfo-all-menus-update:
156 -$(foreach i, $(TEXINFO_SOURCES), echo q | emacs --batch --no-site-file $(i) --eval $(TEXINFO_ALL_MENUS_UPDATE_EL); )
157 $(foreach i, $(sort $(TEXINFO_SOURCES)), if diff -u $(i)~ $(i); then mv $(i)~ $(i); fi && ) true
159 local-help: local-texinfo-help
163 info [out=www] update Info documentation (use \`out=www' for having images)\n\
164 install-info [out=www] install Info documentation (idem)\n\
165 texinfo-all-menus-update update node menus in Texinfo source files (use with caution)\n"