Makefile.am 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2013-2018 Inria
  4. # Copyright (C) 2010-2018 CNRS
  5. # Copyright (C) 2009,2011,2013-2014,2017 Université de Bordeaux
  6. #
  7. # StarPU is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation; either version 2.1 of the License, or (at
  10. # your option) any later version.
  11. #
  12. # StarPU is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. #
  16. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. #
  18. DOXYGEN = doxygen
  19. PDFLATEX = pdflatex
  20. MAKEINDEX = makeindex
  21. DOX_DIR = $(top_builddir)/doc/doxygen_dev
  22. DOX_CONFIG = $(top_srcdir)/doc/doxygen_dev/doxygen.cfg
  23. DOX_HTML_DIR = html
  24. DOX_LATEX_DIR = latex
  25. DOX_PDF = $(DOX_DIR)/starpu.pdf
  26. DOX_TAG = starpu.tag
  27. txtdir = $(docdir)/manual/dev
  28. EXTRA_DIST =
  29. if BUILD_DOC
  30. all: $(DOX_HTML_DIR) $(DOX_PDF)
  31. EXTRA_DIST += $(DOX_HTML_DIR) $(DOX_PDF)
  32. txt_DATA = $(DOX_PDF)
  33. DOX_HTML_SRCDIR=$(DOX_HTML_DIR)
  34. install-exec-hook:
  35. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/dev/html
  36. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/dev/html \;)
  37. uninstall-hook:
  38. rm -rf $(DESTDIR)$(docdir)/manual/dev/html
  39. else
  40. if AVAILABLE_DOC
  41. EXTRA_DIST += $(top_srcdir)/doc/doxygen_dev/html $(top_srcdir)/doc/doxygen_dev/starpu.pdf
  42. txt_DATA = $(top_srcdir)/doc/doxygen_dev/starpu.pdf
  43. DOX_HTML_SRCDIR=$(top_srcdir)/doc/doxygen_dev/html
  44. install-exec-hook:
  45. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/dev/html
  46. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/dev/html \;)
  47. uninstall-hook:
  48. rm -rf $(DESTDIR)$(docdir)/manual/dev/html
  49. endif
  50. endif
  51. chapters = \
  52. chapters/000_introduction.doxy
  53. images =
  54. if BUILD_DOC
  55. starpu_config.h: $(top_srcdir)/include/starpu_config.h.in
  56. @$(SED) 's/#undef \(.*\)/#define \1 1/' $< > $@
  57. chapters/version.sty: $(chapters)
  58. @for f in $(chapters) ; do \
  59. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  60. done | sort -r | head -1 > timestamp_sty
  61. @if test -s timestamp_sty ; then \
  62. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%d %B %Y" > timestamp_sty_updated ;\
  63. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%B %Y" > timestamp_sty_updated_month ;\
  64. fi
  65. @if test -s timestamp_sty_updated ; then \
  66. echo ':newcommand{:STARPUUPDATED}{'`cat timestamp_sty_updated`'}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  67. else \
  68. echo ':newcommand{:STARPUUPDATED}{unknown date}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  69. fi
  70. @echo ':newcommand{:STARPUVERSION}{$(VERSION)}' >> $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  71. @$(SED) -i 's/:/\\/g' $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  72. @for f in timestamp_sty timestamp_sty_updated timestamp_sty_updated_month ; do \
  73. if test -f $$f ; then $(RM) $$f ; fi ;\
  74. done
  75. chapters/version.html: $(chapters)
  76. @for f in $(chapters) ; do \
  77. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  78. done | sort -r | head -1 > timestamp_html
  79. @if test -s timestamp_html ; then \
  80. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%d %B %Y" > timestamp_html_updated ;\
  81. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%B %Y" > timestamp_html_updated_month ;\
  82. fi
  83. @echo "This manual documents the internal usage of StarPU version $(VERSION)." > $(top_srcdir)/doc/doxygen_dev/chapters/version.html
  84. @if test -s timestamp_html_updated ; then \
  85. echo "Its contents was last updated on "`cat timestamp_html_updated`"." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  86. else \
  87. echo "Its contents was last updated on <em>unknown_date</em>." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  88. fi
  89. @for f in timestamp_html timestamp_html_updated timestamp_html_updated_month ; do \
  90. if test -f $$f ; then $(RM) $$f ; fi ;\
  91. done
  92. dox_inputs = $(DOX_CONFIG) \
  93. $(chapters) \
  94. starpu_config.h \
  95. chapters/version.sty \
  96. chapters/version.html \
  97. $(top_srcdir)/src/core/workers.h
  98. $(DOX_TAG): $(dox_inputs)
  99. @rm -fr $(DOX_HTML_DIR) $(DOX_LATEX_DIR)
  100. @$(DOXYGEN) $(DOX_CONFIG)
  101. @$(SED) -i 's/ModuleDocumentation <\/li>/<a class="el" href="modules.html">Modules<\/a>/' html/index.html
  102. @$(SED) -i 's/FileDocumentation <\/li>/<a class="el" href="files.html">Files<\/a>/' html/index.html
  103. old:
  104. # comment for the line below: what we really want to do is to remove the line, but dy doing so, it avoids opening the interactive menu when browsing files
  105. @if test -f html/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html/navtree.js ; fi
  106. @$(SED) -i 's/.*"Files.html".*//' html/pages.html
  107. @if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
  108. @$(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex
  109. @cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex
  110. $(DOX_PDF): $(DOX_TAG) #refman.tex
  111. @cp $(top_srcdir)/doc/doxygen_dev/chapters/version.sty $(DOX_LATEX_DIR)
  112. @-cp $(top_srcdir)/doc/doxygen_dev/chapters/images/*pdf $(DOX_LATEX_DIR)
  113. @echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex
  114. @cd $(DOX_LATEX_DIR) ;\
  115. rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out ;\
  116. $(SED) -i -e 's/__env__/\\_Environment Variables!/' -e 's/\\-\\_\\-\\-\\_\\-env\\-\\_\\-\\-\\_\\-//' ExecutionConfigurationThroughEnvironmentVariables.tex ;\
  117. $(SED) -i -e 's/__configure__/\\_Configure Options!/' -e 's/\\-\\_\\-\\-\\_\\-configure\\-\\_\\-\\-\\_\\-//' CompilationConfiguration.tex ;\
  118. $(SED) -i s'/\\item Module\\-Documentation/\\item \\hyperlink{ModuleDocumentation}{Module Documentation}/' index.tex ;\
  119. $(SED) -i s'/\\item File\\-Documentation/\\item \\hyperlink{FileDocumentation}{File Documentation}/' index.tex ;\
  120. $(PDFLATEX) refman.tex ;\
  121. $(MAKEINDEX) refman.idx ;\
  122. $(PDFLATEX) refman.tex ;\
  123. done=0; repeat=5 ;\
  124. while test $$done = 0 -a $$repeat -gt 0; do \
  125. if $(EGREP) 'Rerun (LaTeX|to get cross-references right)' refman.log > /dev/null 2>&1; then \
  126. $(PDFLATEX) refman.tex; \
  127. repeat=`expr $$repeat - 1`; \
  128. else \
  129. done=1; \
  130. fi; \
  131. done
  132. mv $(DOX_LATEX_DIR)/refman.pdf $(DOX_PDF)
  133. CLEANFILES = $(DOX_TAG) starpu_config.h \
  134. -r \
  135. $(DOX_HTML_DIR) \
  136. $(DOX_LATEX_DIR) \
  137. $(DOX_PDF)
  138. endif
  139. EXTRA_DIST += doxygen.cfg refman.tex \
  140. $(chapters) $(images)
  141. # Rule to update documentation on web server. Should only be used locally.
  142. PUBLISHHOST ?= gforge
  143. update-web: $(DOX_PDF)
  144. scp -pr starpu.pdf html $(PUBLISHHOST):/home/groups/starpu/htdocs/doc/dev
  145. showcheck:
  146. -cat /dev/null