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 ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
35 ## Can not have absolute symlinks because some binary packages build schemes
36 ## install files in nonstandard root. Best we can do is to notify the
37 ## builder or packager.
38 local-install-info: info
39 -$(INSTALL) -d $(DESTDIR)$(infodir)
41 @echo "***************************************************************"
42 @echo "Please add or update the LilyPond direntries, do"
44 @echo " install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info"
46 @echo "For images in the INFO docs to work, do: "
48 @echo " (cd $(infodir) && ln -sfT ../doc/lilypond/html/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR))"
49 @echo "or add something like that to the postinstall script."
53 -rmdir $(DESTDIR)$(infodir)
55 else # installing directly into standard /usr/...
56 local-install-info: info
57 -$(INSTALL) -d $(DESTDIR)$(infodir)
58 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
59 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
60 cd $(infodir) && ln -sfT $(webdir)/$(DEST_INFO_IMAGES_SUBDIR) $(INFO_IMAGES_DIR)
63 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
64 rm -f $(infodir)/$(INFO_IMAGES_DIR)
66 endif # installing directly into standard /usr/...
70 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
71 ## Can not have absolute symlinks because some binary packages build schemes
72 ## install files in nonstandard root. Best we can do is to notify the
73 ## builder or packager.
74 local-install-info: info
75 -$(INSTALL) -d $(DESTDIR)$(infodir)
77 @echo "***************************************************************"
78 @echo "Please add or update the LilyPond direntries, do"
80 @echo " install-info --info-dir=$(infodir) out/$(MAIN_INFO_DOC).info"
82 @echo "For images in the INFO docs to work, do"
84 @echo " make out=www install-info "
86 @echo "and read the extra instructions."
90 -rmdir $(DESTDIR)$(infodir)
92 else # installing directly into standard /usr/...
93 local-install-info: info
94 -$(INSTALL) -d $(DESTDIR)$(infodir)
95 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
96 install-info --info-dir=$(infodir) $(outdir)/$(MAIN_INFO_DOC).info
98 @echo "***************************************************************"
99 @echo "For images in the INFO docs to work, do"
101 @echo " make out=www install-info "
104 local-uninstall-info:
105 $(foreach f,$(INFO_FILES),install-info --remove --info-dir=$(infodir) $(f) ; )true
107 endif # installing into standard /usr/* root
111 endif # $(INFO_FILES) non empty
113 TEXINFO_ALL_MENUS_UPDATE_EL ='\
115 (version-control nil))\
116 (load-library "texinfo")\
118 (texinfo-all-menus-update)\
119 (if (buffer-modified-p (current-buffer))\
123 # buffer-modified-p is ALWAYS true, even if there were no actual
124 # changes, so we try setting origal (timestamp) back if there
127 # ugh: emacs20.7 batch mode is not really batch:
129 # answer `echo q' to the question:
130 # FILE locked by EMAIL (pid PID): (s, q, p, ?)?
132 texinfo-all-menus-update:
133 -$(foreach i, $(TEXINFO_SOURCES), echo q | emacs --batch --no-site-file $(i) --eval $(TEXINFO_ALL_MENUS_UPDATE_EL); )
134 $(foreach i, $(sort $(TEXINFO_SOURCES)), if diff -u $(i)~ $(i); then mv $(i)~ $(i); fi && ) true
136 local-help: local-texinfo-help
140 info [out=www] update Info documentation (use \`out=www' for having images)\n\
141 install-info [out=www] install Info documentation (idem)\n\
142 texinfo-all-menus-update update node menus in Texinfo source files (use with caution)\n"