2
0

texinfos.am 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 1994-2017 Free Software Foundation, Inc.
  3. ## This program is free software; you can redistribute it and/or modify
  4. ## it under the terms of the GNU General Public License as published by
  5. ## the Free Software Foundation; either version 2, or (at your option)
  6. ## any later version.
  7. ## This program is distributed in the hope that it will be useful,
  8. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ## GNU General Public License for more details.
  11. ## You should have received a copy of the GNU General Public License
  12. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ## ----------- ##
  14. ## Variables. ##
  15. ## ----------- ##
  16. if %?LOCAL-TEXIS%
  17. TEXI2DVI = texi2dvi
  18. TEXI2PDF = $(TEXI2DVI) --pdf --batch
  19. MAKEINFOHTML = $(MAKEINFO) --html
  20. AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
  21. endif %?LOCAL-TEXIS%
  22. ## ---------- ##
  23. ## Building. ##
  24. ## ---------- ##
  25. ## The way to make PostScript, for those who want it.
  26. if %?LOCAL-TEXIS%
  27. DVIPS = dvips
  28. .dvi.ps:
  29. %AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
  30. $(DVIPS) %TEXIQUIET% -o $@ $<
  31. endif %?LOCAL-TEXIS%
  32. .PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
  33. if %?SUBDIRS%
  34. RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
  35. RECURSIVE_TARGETS += pdf-recursive ps-recursive
  36. dvi: dvi-recursive
  37. html: html-recursive
  38. info: info-recursive
  39. pdf: pdf-recursive
  40. ps: ps-recursive
  41. else !%?SUBDIRS%
  42. dvi: dvi-am
  43. html: html-am
  44. info: info-am
  45. pdf: pdf-am
  46. ps: ps-am
  47. endif !%?SUBDIRS%
  48. if %?LOCAL-TEXIS%
  49. dvi-am: $(DVIS)
  50. html-am: $(HTMLS)
  51. info-am: $(INFO_DEPS)
  52. pdf-am: $(PDFS)
  53. ps-am: $(PSS)
  54. else ! %?LOCAL-TEXIS%
  55. dvi-am:
  56. html-am:
  57. info-am:
  58. pdf-am:
  59. ps-am:
  60. endif ! %?LOCAL-TEXIS%
  61. ## ------------ ##
  62. ## Installing. ##
  63. ## ------------ ##
  64. ## Some code should be run only if install-info actually exists, and
  65. ## if the user doesn't request it not to be run (through the
  66. ## 'AM_UPDATE_INFO_DIR' environment variable). See automake bug#9773
  67. ## and Debian Bug#543992.
  68. am__can_run_installinfo = \
  69. case $$AM_UPDATE_INFO_DIR in \
  70. n|no|NO) false;; \
  71. *) (install-info --version) >/dev/null 2>&1;; \
  72. esac
  73. ## Look in both . and srcdir because the info pages might have been
  74. ## rebuilt in the build directory. Can't cd to srcdir; that might
  75. ## break a possible install-sh reference.
  76. ##
  77. ## Funny name due to --cygnus influence; we want to reserve
  78. ## 'install-info' for the user.
  79. ##
  80. ## TEXINFOS primary are always installed in infodir, hence install-data
  81. ## is hard coded.
  82. if %?INSTALL-INFO%
  83. if %?LOCAL-TEXIS%
  84. am__installdirs += "$(DESTDIR)$(infodir)"
  85. install-data-am: install-info-am
  86. endif %?LOCAL-TEXIS%
  87. endif %?INSTALL-INFO%
  88. .PHONY: \
  89. install-dvi install-dvi-am \
  90. install-html install-html-am \
  91. install-info install-info-am \
  92. install-pdf install-pdf-am \
  93. install-ps install-ps-am
  94. if %?SUBDIRS%
  95. RECURSIVE_TARGETS += \
  96. install-dvi-recursive \
  97. install-html-recursive \
  98. install-info-recursive \
  99. install-pdf-recursive \
  100. install-ps-recursive
  101. install-dvi: install-dvi-recursive
  102. install-html: install-html-recursive
  103. install-info: install-info-recursive
  104. install-pdf: install-pdf-recursive
  105. install-ps: install-ps-recursive
  106. else !%?SUBDIRS%
  107. install-dvi: install-dvi-am
  108. install-html: install-html-am
  109. install-info: install-info-am
  110. install-pdf: install-pdf-am
  111. install-ps: install-ps-am
  112. endif !%?SUBDIRS%
  113. if %?LOCAL-TEXIS%
  114. include inst-vars.am
  115. install-dvi-am: $(DVIS)
  116. @$(NORMAL_INSTALL)
  117. @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
  118. if test -n "$$list"; then \
  119. echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
  120. $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
  121. fi; \
  122. for p in $$list; do \
  123. if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  124. echo "$$d$$p"; \
  125. done | $(am__base_list) | \
  126. while read files; do \
  127. echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
  128. $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
  129. done
  130. install-html-am: $(HTMLS)
  131. @$(NORMAL_INSTALL)
  132. @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
  133. if test -n "$$list"; then \
  134. echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
  135. $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
  136. fi; \
  137. for p in $$list; do \
  138. if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
  139. $(am__strip_dir) \
  140. ## This indirection is required to work around a bug of the Solaris 10
  141. ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
  142. ## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
  143. ## and the report of the original failure can be found at automake
  144. ## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
  145. d2=$$d$$p; \
  146. if test -d "$$d2"; then \
  147. echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
  148. $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
  149. echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
  150. $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
  151. else \
  152. list2="$$list2 $$d2"; \
  153. fi; \
  154. done; \
  155. test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
  156. while read files; do \
  157. echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
  158. $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
  159. done; }
  160. install-info-am: $(INFO_DEPS)
  161. @$(NORMAL_INSTALL)
  162. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  163. list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
  164. if test -n "$$list"; then \
  165. echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
  166. $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
  167. fi; \
  168. for file in $$list; do \
  169. ## Strip possible $(srcdir) prefix.
  170. case $$file in \
  171. $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
  172. esac; \
  173. if test -f $$file; then d=.; else d=$(srcdir); fi; \
  174. ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
  175. ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
  176. ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
  177. ## is patched to grok these filenames. However we have to account
  178. ## for the renaming when installing the info files.
  179. ##
  180. ## If $file == foo.info, then $file_i == foo.i. The reason we use two
  181. ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
  182. ## 'foo' becomes 'foo.i' too.
  183. file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
  184. for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
  185. $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
  186. if test -f $$ifile; then \
  187. echo "$$ifile"; \
  188. else : ; fi; \
  189. done; \
  190. done | $(am__base_list) | \
  191. while read files; do \
  192. echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
  193. $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
  194. @$(POST_INSTALL)
  195. @if $(am__can_run_installinfo); then \
  196. list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
  197. for file in $$list; do \
  198. ## Strip directory
  199. relfile=`echo "$$file" | sed 's|^.*/||'`; \
  200. ## Run ":" after install-info in case install-info fails. We really
  201. ## don't care about failures here, because they can be spurious. For
  202. ## instance if you don't have a dir file, install-info will fail. I
  203. ## think instead it should create a new dir file for you. This bug
  204. ## causes the "make distcheck" target to fail reliably.
  205. echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
  206. ## Use "|| :" here because Sun make passes -e to sh; if install-info
  207. ## fails then we'd fail if we used ";".
  208. install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
  209. done; \
  210. else : ; fi
  211. install-pdf-am: $(PDFS)
  212. @$(NORMAL_INSTALL)
  213. @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
  214. if test -n "$$list"; then \
  215. echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
  216. $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
  217. fi; \
  218. for p in $$list; do \
  219. if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  220. echo "$$d$$p"; \
  221. done | $(am__base_list) | \
  222. while read files; do \
  223. echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
  224. $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
  225. install-ps-am: $(PSS)
  226. @$(NORMAL_INSTALL)
  227. @list='$(PSS)'; test -n "$(psdir)" || list=; \
  228. if test -n "$$list"; then \
  229. echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
  230. $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
  231. fi; \
  232. for p in $$list; do \
  233. if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  234. echo "$$d$$p"; \
  235. done | $(am__base_list) | \
  236. while read files; do \
  237. echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
  238. $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
  239. else ! %?LOCAL-TEXIS%
  240. install-dvi-am:
  241. install-html-am:
  242. install-info-am:
  243. install-pdf-am:
  244. install-ps-am:
  245. endif ! %?LOCAL-TEXIS%
  246. ## -------------- ##
  247. ## Uninstalling. ##
  248. ## -------------- ##
  249. if %?LOCAL-TEXIS%
  250. .PHONY uninstall-am: \
  251. uninstall-dvi-am \
  252. uninstall-html-am \
  253. uninstall-info-am \
  254. uninstall-ps-am \
  255. uninstall-pdf-am
  256. uninstall-dvi-am:
  257. @$(NORMAL_UNINSTALL)
  258. @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
  259. for p in $$list; do \
  260. $(am__strip_dir) \
  261. echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
  262. rm -f "$(DESTDIR)$(dvidir)/$$f"; \
  263. done
  264. uninstall-html-am:
  265. @$(NORMAL_UNINSTALL)
  266. @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
  267. for p in $$list; do \
  268. $(am__strip_dir) \
  269. ## $f can be a directory, hence the -r.
  270. echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
  271. rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
  272. done
  273. uninstall-info-am:
  274. @$(PRE_UNINSTALL)
  275. ## Run two loops here so that we can handle PRE_UNINSTALL and
  276. ## NORMAL_UNINSTALL correctly.
  277. @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
  278. list='$(INFO_DEPS)'; \
  279. for file in $$list; do \
  280. relfile=`echo "$$file" | sed 's|^.*/||'`; \
  281. ## install-info needs the actual info file. We use the installed one,
  282. ## rather than relying on one still being in srcdir or builddir.
  283. ## However, "make uninstall && make uninstall" should not fail,
  284. ## so we ignore failure if the file did not exist.
  285. echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
  286. if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
  287. then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
  288. done; \
  289. else :; fi
  290. @$(NORMAL_UNINSTALL)
  291. @list='$(INFO_DEPS)'; \
  292. for file in $$list; do \
  293. relfile=`echo "$$file" | sed 's|^.*/||'`; \
  294. ## DJGPP-style info files. See comment in install-info-am.
  295. relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
  296. (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
  297. echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
  298. rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
  299. else :; fi); \
  300. done
  301. uninstall-pdf-am:
  302. @$(NORMAL_UNINSTALL)
  303. @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
  304. for p in $$list; do \
  305. $(am__strip_dir) \
  306. echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
  307. rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
  308. done
  309. uninstall-ps-am:
  310. @$(NORMAL_UNINSTALL)
  311. @list='$(PSS)'; test -n "$(psdir)" || list=; \
  312. for p in $$list; do \
  313. $(am__strip_dir) \
  314. echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
  315. rm -f "$(DESTDIR)$(psdir)/$$f"; \
  316. done
  317. endif %?LOCAL-TEXIS%
  318. if %?LOCAL-TEXIS%
  319. .PHONY: dist-info
  320. dist-info: $(INFO_DEPS)
  321. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
  322. list='$(INFO_DEPS)'; \
  323. for base in $$list; do \
  324. ## Strip possible $(srcdir) prefix.
  325. case $$base in \
  326. $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
  327. esac; \
  328. if test -f $$base; then d=.; else d=$(srcdir); fi; \
  329. base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
  330. for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
  331. if test -f $$file; then \
  332. ## Strip leading '$$d/'.
  333. relfile=`expr "$$file" : "$$d/\(.*\)"`; \
  334. test -f "$(distdir)/$$relfile" || \
  335. cp -p $$file "$(distdir)/$$relfile"; \
  336. else :; fi; \
  337. done; \
  338. done
  339. endif %?LOCAL-TEXIS%
  340. ## ---------- ##
  341. ## Cleaning. ##
  342. ## ---------- ##
  343. ## The funny name is due to --cygnus influence; in Cygnus mode,
  344. ## 'clean-info' is a target that users can use.
  345. if %?LOCAL-TEXIS%
  346. .PHONY mostlyclean-am: mostlyclean-aminfo
  347. .PHONY: mostlyclean-aminfo
  348. mostlyclean-aminfo:
  349. ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
  350. ## contain any directory created by "makeinfo --html", as well as the
  351. ## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
  352. -rm -rf %MOSTLYCLEAN%
  353. .PHONY clean-am: clean-aminfo
  354. clean-aminfo:
  355. ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
  356. ## above for details.
  357. ?TEXICLEAN? -test -z "%TEXICLEAN%" \
  358. ?TEXICLEAN? || rm -rf %TEXICLEAN%
  359. .PHONY maintainer-clean-am: maintainer-clean-aminfo
  360. maintainer-clean-aminfo:
  361. @list='$(INFO_DEPS)'; for i in $$list; do \
  362. ## .iNN files are DJGPP-style info files.
  363. i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
  364. echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
  365. rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
  366. done
  367. ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
  368. ## above for details.
  369. ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
  370. ?MAINTCLEAN? || rm -rf %MAINTCLEAN%
  371. endif %?LOCAL-TEXIS%