1 .PHONY : texinfo-all-menus-update
6 local-WWW-1: $(XREF_MAPS_FILES)
8 local-WWW-2: $(OUT_CSS_FILES)
11 local-txt-doc: $(OUTTXT_FILES)
13 check-info: texinfo-all-menus-update
16 local-install: install-info
17 local-uninstall: uninstall-info
18 install-info: local-install-info
19 uninstall-info: local-uninstall-info
21 install-info: $(INFO_FILES)
22 $(INFO_INSTALL_COMMAND) local-install
25 $(INFO_INSTALL_COMMAND) local-uninstall
31 else # $(INFO_FILES) non empty
32 # There are two modes for info: with and without images.
35 # This builds all .info targets with images, in out-www.
36 # Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
38 ifneq ($(COPY_INFO_IMAGES),)
39 # only Info docs are installed (not HTML nor PDF),
40 # so images should be copied
43 # remove $(infodir)/$(INFO_IMAGES_DIR) in case it is a symlink
44 -rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
45 $(INSTALL) -d $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
46 rsync -r --include '[0-9a-f][0-9a-f]' --include '*.png' --exclude '*' $(outdir)/ $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
48 uninstall-info-images:
49 rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
51 else # if HTML and PDF docs are installed too, symlink image directories
52 install-info-images: uninstall-info-images
53 cd $(DESTDIR)$(infodir) && ln -sf $$($(PYTHON) $(buildscript-dir)/relative $(DESTDIR)$(webdir)/$(DEST_INFO_IMAGES_SUBDIR)) $(INFO_IMAGES_DIR)
55 uninstall-info-images:
56 rm -f $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR) || rm -rf $(DESTDIR)$(infodir)/$(INFO_IMAGES_DIR)
57 endif # copying info images
60 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
61 ## install-info can't do all its job for binary packages' build systems.
62 ## Best we can do is to notify the builder or packager.
63 local-install-info: info
64 -$(INSTALL) -d $(DESTDIR)$(infodir)
66 @echo "***************************************************************"
67 @echo "Please add or update the LilyPond direntries,"
68 @echo "do or add in the postinstall script"
70 @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info"
72 $(MAKE) install-info-images
74 local-uninstall-info: uninstall-info-images
75 -rmdir $(DESTDIR)$(infodir)
77 else # installing directly into standard /usr/...
78 local-install-info: info
79 -$(INSTALL) -d $(DESTDIR)$(infodir)
80 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
81 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
82 $(MAKE) install-info-images
84 local-uninstall-info: uninstall-info-images
85 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
87 endif # installing directly into standard /usr/...
91 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
92 ## install-info can't do all his job for binary packages build systems.
93 ## Best we can do is to notify the builder or packager.
94 local-install-info: info
95 -$(INSTALL) -d $(DESTDIR)$(infodir)
97 @echo "***************************************************************"
98 @echo "Please add or update the LilyPond direntries, do"
100 @echo " install-info --info-dir=$(infodir) $(DESTDIR)$(infodir)/$(MAIN_INFO_DOC).info"
102 @echo "To compile Info documentation with images, please read"
103 @echo "Application Usage document, section \"Building documentation\"."
106 local-uninstall-info:
107 -rmdir $(DESTDIR)$(infodir)
109 else # installing directly into standard /usr/...
110 local-install-info: info
111 -$(INSTALL) -d $(DESTDIR)$(infodir)
112 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
113 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
115 @echo "***************************************************************"
116 @echo "To compile Info documentation with images, do from top of the build tree"
120 @echo "which builds documentation in all formats; to build only Info documentation, do"
124 @echo "To list all available targets, do"
128 @echo "For details, please read Application Usage document, section \"Building documentation\"."
131 local-uninstall-info:
132 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
134 endif # installing into standard /usr/* root
138 endif # $(INFO_FILES) non empty
140 TEXINFO_ALL_MENUS_UPDATE_EL ='\
142 (version-control nil))\
143 (load-library "texinfo")\
145 (texinfo-all-menus-update)\
146 (if (buffer-modified-p (current-buffer))\
150 # buffer-modified-p is ALWAYS true, even if there were no actual
151 # changes, so we try setting origal (timestamp) back if there
154 # ugh: emacs20.7 batch mode is not really batch:
156 # answer `echo q' to the question:
157 # FILE locked by EMAIL (pid PID): (s, q, p, ?)?
159 texinfo-all-menus-update:
160 -$(foreach i, $(TEXINFO_SOURCES), echo q | emacs --batch --no-site-file $(i) --eval $(TEXINFO_ALL_MENUS_UPDATE_EL); )
161 $(foreach i, $(sort $(TEXINFO_SOURCES)), if diff -u $(i)~ $(i); then mv $(i)~ $(i); fi && ) true
163 local-help: local-texinfo-help
166 @echo " info [out=www] update Info documentation"
167 @echo " (use \`out=www' for having images)"
168 @echo " install-info [out=www] install Info documentation (idem)"
169 @echo " texinfo-all-menus-update update node menus in Texinfo source files"
170 @echo " (use with caution)"