Makefile.am 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Copyright (C) 1996-2021 Free Software Foundation, Inc.
  2. #
  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 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. AM_CFLAGS = $(WARN_CFLAGS)
  16. info_TEXINFOS = find.texi find-maint.texi
  17. find_TEXINFOS = perm.texi parse-datetime.texi regexprops.texi fdl.texi
  18. BUILT_SOURCES = dblocation.texi
  19. nodist_find_TEXINFOS = dblocation.texi
  20. find_maint_TEXINFOS = fdl.texi
  21. MOSTLYCLEANFILES = find.cps
  22. CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz dblocation.texi \
  23. find_mono.html findutils.texi_html_node.tar.gz \
  24. find-info.tar.gz find.texi.tar.gz \
  25. find.txt tmp-doc-install find_mono.html.gz
  26. MAKEINFOTXT = $(MAKEINFO) --plaintext
  27. find.txt: find.texi $(srcdir)/version.texi $(find_TEXINFOS)
  28. # find.txt is a file which we need to know how to build
  29. # because it gets put on the www.gnu.org website.
  30. # This rule is derived from the .texi.html rule.
  31. .texi.txt:
  32. rm -rf $(@:.txt=.tmp)
  33. if $(MAKEINFOTXT) $(AM_MAKEINFOTXTFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
  34. -o $(@:.txt=.tmp) $<; \
  35. then \
  36. rm -rf $@; \
  37. if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
  38. mv $(@:.txt=) $@; else mv $(@:.txt=.tmp) $@; fi; \
  39. else \
  40. if test ! -d $(@:.txt=.tmp) && test -d $(@:.txt=); then \
  41. rm -rf $(@:.txt=); else rm -Rf $(@:.txt=.tmp) $@; fi; \
  42. exit 1; \
  43. fi
  44. # find_mono.html is a file which we need to know how to build
  45. # because it gets put on the www.gnu.org website.
  46. # This rule is derived from the generic .texi.html rule.
  47. find_mono.html: find.texi
  48. rm -rf $(@:.html=.htp)
  49. if $(MAKEINFOHTML) --no-split $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
  50. -o $(@:.html=.htp) find.texi; \
  51. then \
  52. rm -rf $@; \
  53. if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
  54. mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
  55. else \
  56. if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
  57. rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
  58. exit 1; \
  59. fi
  60. # findutils.texi_html_node.tar.gz is a file which we need to know
  61. # how to build because it gets put on the www.gnu.org website.
  62. # This rule depends on GNU tar, but it's principally used
  63. # by the maintainer, and we don't need to build the file
  64. # for "make all" or "make install" (or even "make check").
  65. findutils.texi_html_node.tar.gz: find.html
  66. tar zcf $@ find.html
  67. dblocation.texi: ../locate/dblocation.texi
  68. $(LN_S) ../locate/dblocation.texi $@
  69. find-info.tar.gz:
  70. $(MKDIR_P) tmp-doc-install/info
  71. $(MAKE) $(AM_MAKEFLAGS) \
  72. top_distdir="tmp-doc-install" distdir="tmp-doc-install/info" \
  73. dist-info
  74. ( cd tmp-doc-install && tar -c -f - info ) | GZIP=$(GZIP_ENV) gzip -c >| $@
  75. rm -rf tmp-doc-install/info
  76. rmdir tmp-doc-install
  77. find.texi.tar.gz: $(TEXINFOS) $(find_TEXINFOS) $(nodist_find_TEXINFOS) $(info_TEXINFOS) $(find_maint_TEXINFOS) $(srcdir)/version.texi $(srcdir)/versionmaint.texi Makefile
  78. $(MKDIR_P) tmp-doc-install/texi
  79. for f in $(TEXINFOS) $(find_TEXINFOS) $(info_TEXINFOS) $(find_maint_TEXINFOS) version.texi versionmaint.texi ; \
  80. do cp $(srcdir)/"$$f" tmp-doc-install/texi/ || break; done && cp dblocation.texi tmp-doc-install/texi/
  81. ( cd tmp-doc-install/texi/ && tar -c -f - *.texi ) | GZIP=$(GZIP_ENV) gzip -c >| $@
  82. rm -rf tmp-doc-install/texi
  83. rmdir tmp-doc-install