Makefile.am 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. DOXYGEN = doxygen
  17. PDFLATEX = pdflatex
  18. MAKEINDEX = makeindex
  19. DOX_DIR = $(top_builddir)/doc/doxygen_dev
  20. DOX_CONFIG = $(top_srcdir)/doc/doxygen_dev/doxygen.cfg
  21. DOX_HTML_DIR = html_dev
  22. DOX_LATEX_DIR = latex
  23. DOX_PDF = $(DOX_DIR)/starpu_dev.pdf
  24. DOX_TAG = starpu.tag
  25. txtdir = $(docdir)/manual
  26. EXTRA_DIST =
  27. if BUILD_DOC
  28. all: $(DOX_HTML_DIR) $(DOX_PDF)
  29. EXTRA_DIST += $(DOX_HTML_DIR) $(DOX_PDF)
  30. txt_DATA = $(DOX_PDF)
  31. DOX_HTML_SRCDIR=$(DOX_HTML_DIR)
  32. install-exec-hook:
  33. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/html_dev
  34. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html_dev \;)
  35. uninstall-hook:
  36. rm -rf $(DESTDIR)$(docdir)/manual/html_dev
  37. else
  38. if AVAILABLE_DOC
  39. EXTRA_DIST += $(top_srcdir)/doc/doxygen_dev/html_dev $(top_srcdir)/doc/doxygen_dev/starpu_dev.pdf
  40. txt_DATA = $(top_srcdir)/doc/doxygen_dev/starpu_dev.pdf
  41. DOX_HTML_SRCDIR=$(top_srcdir)/doc/doxygen_dev/html_dev
  42. install-exec-hook:
  43. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/html_dev
  44. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html_dev \;)
  45. uninstall-hook:
  46. rm -rf $(DESTDIR)$(docdir)/manual/html_dev
  47. endif
  48. endif
  49. chapters = \
  50. chapters/000_introduction.doxy \
  51. chapters/010_core.doxy
  52. images =
  53. if BUILD_DOC
  54. starpu_config.h: $(top_srcdir)/include/starpu_config.h.in
  55. @$(SED) 's/#undef \(.*\)/#define \1 1/' $< > $@
  56. chapters/version.sty: $(chapters)
  57. @for f in $(chapters) ; do \
  58. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  59. done | sort -r | head -1 > timestamp_sty
  60. @if test -s timestamp_sty ; then \
  61. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%d %B %Y" > timestamp_sty_updated ;\
  62. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%B %Y" > timestamp_sty_updated_month ;\
  63. fi
  64. @if test -s timestamp_sty_updated ; then \
  65. echo ':newcommand{:STARPUUPDATED}{'`cat timestamp_sty_updated`'}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  66. else \
  67. echo ':newcommand{:STARPUUPDATED}{unknown date}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  68. fi
  69. @echo ':newcommand{:STARPUVERSION}{$(VERSION)}' >> $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  70. @$(SED) -i 's/:/\\/g' $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  71. @for f in timestamp_sty timestamp_sty_updated timestamp_sty_updated_month ; do \
  72. if test -f $$f ; then $(RM) $$f ; fi ;\
  73. done
  74. chapters/version.html: $(chapters)
  75. @for f in $(chapters) ; do \
  76. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  77. done | sort -r | head -1 > timestamp_html
  78. @if test -s timestamp_html ; then \
  79. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%d %B %Y" > timestamp_html_updated ;\
  80. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%B %Y" > timestamp_html_updated_month ;\
  81. fi
  82. @echo "This manual documents the internal usage of StarPU version $(VERSION)." > $(top_srcdir)/doc/doxygen_dev/chapters/version.html
  83. @if test -s timestamp_html_updated ; then \
  84. echo "Its contents was last updated on "`cat timestamp_html_updated`"." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  85. else \
  86. echo "Its contents was last updated on <em>unknown_date</em>." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  87. fi
  88. @for f in timestamp_html timestamp_html_updated timestamp_html_updated_month ; do \
  89. if test -f $$f ; then $(RM) $$f ; fi ;\
  90. done
  91. dox_inputs = $(DOX_CONFIG) \
  92. $(chapters) \
  93. starpu_config.h \
  94. chapters/version.sty \
  95. chapters/version.html \
  96. $(top_srcdir)/src/core/workers.h
  97. $(DOX_HTML_DIR): $(DOX_TAG) refman.tex
  98. @$(MKDIR_P) $(DOX_HTML_DIR)
  99. $(DOX_TAG): $(dox_inputs)
  100. @rm -fr $(DOX_HTML_DIR) $(DOX_LATEX_DIR)
  101. @$(DOXYGEN) $(DOX_CONFIG)
  102. @$(SED) -i 's/ModuleDocumentation <\/li>/<a class="el" href="modules.html">Modules<\/a>/' html_dev/index.html
  103. @$(SED) -i 's/FileDocumentation <\/li>/<a class="el" href="files.html">Files<\/a>/' html_dev/index.html
  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_dev/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html_dev/navtree.js ; fi
  106. @$(SED) -i 's/.*"Files.html".*//' html_dev/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. @echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex
  113. @cd $(DOX_LATEX_DIR) ;\
  114. rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out ;\
  115. $(SED) -i -e 's/__env__/\\_Environment Variables!/' -e 's/\\-\\_\\-\\-\\_\\-env\\-\\_\\-\\-\\_\\-//' ExecutionConfigurationThroughEnvironmentVariables.tex ;\
  116. $(SED) -i -e 's/__configure__/\\_Configure Options!/' -e 's/\\-\\_\\-\\-\\_\\-configure\\-\\_\\-\\-\\_\\-//' CompilationConfiguration.tex ;\
  117. $(SED) -i s'/\\item Module\\-Documentation/\\item \\hyperlink{ModuleDocumentation}{Module Documentation}/' index.tex ;\
  118. $(SED) -i s'/\\item File\\-Documentation/\\item \\hyperlink{FileDocumentation}{File Documentation}/' index.tex ;\
  119. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  120. ! < refman.log grep -v group__ | grep -v _amgrp | grep -v deprecated__ | grep "multiply defined" || exit 1 ;\
  121. $(MAKEINDEX) refman.idx ;\
  122. max_print_line=1000000 $(PDFLATEX) -interaction batchmode 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. max_print_line=1000000 $(PDFLATEX) -interaction batchmode 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_dev.pdf html_dev $(PUBLISHHOST):/home/groups/starpu/htdocs/doc