Makefrag.am 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. # Makefile fragment for the documentation.
  2. # Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
  3. # This program is free software; you can redistribute it and/or modify it
  4. # under the terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option) any later
  6. # version.
  7. #
  8. # This program is distributed in the hope that it will be useful, but
  9. # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. # for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License along
  14. # with this program; if not, write to the Free Software Foundation, Inc.,
  15. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16. #
  17. # The GNU Mach Reference Manual.
  18. #
  19. info_TEXINFOS += \
  20. doc/mach.texi
  21. mach_TEXINFOS = \
  22. doc/fdl.texi doc/gpl.texi
  23. EXTRA_DIST += \
  24. $(mach_TEXINFOS)
  25. #
  26. # Web pages of the GNU Mach Reference Manual.
  27. #
  28. web = doc/web
  29. # Prepare a checkout in `$(web)/' of the web pages of the GNU Mach Reference
  30. # Manual, using the same account that was used for the source code. Then
  31. # install the potentially updated files into `$(web)/'.
  32. .PHONY: $(web)
  33. $(web):
  34. if test -d $@/CVS; then :; else \
  35. mkdir -p $@ $@/CVS && \
  36. sed -e s%cvsroot%web% \
  37. < $(top_srcdir)/CVS/Root \
  38. > $@/CVS/Root && \
  39. echo hurd/gnumach-doc \
  40. > $@/CVS/Repository && \
  41. : > $@/CVS/Entries; \
  42. fi
  43. cd $@/ && \
  44. cvs update
  45. $(MAKE) $(AM_MAKEFLAGS) \
  46. html \
  47. ps \
  48. pdf
  49. # Update the files, if such a checkout exists.
  50. html-local:
  51. if test -d $(web); then \
  52. ( cd $(web)/ && \
  53. for f in *.html; do \
  54. if test -f ../../$(HTMLS)/"$$f"; then :; else \
  55. echo "\`$$f' isn't anymore. Removing." && \
  56. rm "$$f" && \
  57. cvs remove "$$f"; \
  58. fi; \
  59. done ) && \
  60. cp $(HTMLS)/*.html $(web)/ && \
  61. cd $(web)/ && \
  62. { cvs add *.html || :; }; \
  63. fi
  64. ps-local:
  65. if test -d $(web); then \
  66. ( cd $(web)/ && \
  67. for f in *.ps; do \
  68. case \ $(PSS)\ in \
  69. \ doc/"$$f"\ ) :;; \
  70. *) echo "\`$$f' isn't anymore. Removing." && \
  71. rm -f "$$f" "$$f".ps && \
  72. cvs remove "$$f" "$$f".ps ;; \
  73. esac; \
  74. done ) && \
  75. cp $(PSS) $(web)/ && \
  76. cd $(web)/ && \
  77. for f in *.ps; do \
  78. gzip -9 < "$$f" > "$$f".gz; \
  79. done && \
  80. { cvs add *.ps *.ps.gz || :; }; \
  81. fi
  82. pdf-local:
  83. if test -d $(web); then \
  84. ( cd $(web)/ && \
  85. for f in *.pdf; do \
  86. case \ $(PDFS)\ in \
  87. \ doc/"$$f"\ ) :;; \
  88. *) echo "\`$$f' isn't anymore. Removing." && \
  89. rm "$$f" && \
  90. cvs remove "$$f";; \
  91. esac; \
  92. done ) && \
  93. cp $(PDFS) $(web)/ && \
  94. cd $(web)/ && \
  95. { cvs add *.pdf || :; }; \
  96. fi
  97. # TODO. There doesn't seem to be a hook or `-local' target suitable for this.
  98. $(srcdir)/doc/version.texi: $(srcdir)/doc/stamp-vti
  99. @if test -d $(web); then :; \
  100. elif grep 2> /dev/null \
  101. -q :ext: $(top_srcdir)/CVS/Root 2> /dev/null && \
  102. grep 2> /dev/null \
  103. -q ^Tgnumach-1-branch$$ $(top_srcdir)/CVS/Tag; \
  104. then \
  105. echo "*** As it seems that you'd be allowed to check in the" \
  106. "possible resulting fixes, you may consider running" \
  107. " \`make $(web)' to get a checkout of the web pages of the" \
  108. "GNU Mach manual and have possible changes installed into" \
  109. "\`$(web)/', ready for checking them in in there." && \
  110. sleep 2; \
  111. fi