Makefile.am 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2010-2018 CNRS
  4. # Copyright (C) 2013-2018 Inria
  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_dev
  24. DOX_LATEX_DIR = latex
  25. DOX_PDF = $(DOX_DIR)/starpu_dev.pdf
  26. DOX_TAG = starpu.tag
  27. txtdir = $(docdir)/manual
  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/html_dev
  36. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html_dev \;)
  37. uninstall-hook:
  38. rm -rf $(DESTDIR)$(docdir)/manual/html_dev
  39. else
  40. if AVAILABLE_DOC
  41. EXTRA_DIST += $(top_srcdir)/doc/doxygen_dev/html_dev $(top_srcdir)/doc/doxygen_dev/starpu_dev.pdf
  42. txt_DATA = $(top_srcdir)/doc/doxygen_dev/starpu_dev.pdf
  43. DOX_HTML_SRCDIR=$(top_srcdir)/doc/doxygen_dev/html_dev
  44. install-exec-hook:
  45. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/html_dev
  46. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html_dev \;)
  47. uninstall-hook:
  48. rm -rf $(DESTDIR)$(docdir)/manual/html_dev
  49. endif
  50. endif
  51. chapters = \
  52. chapters/000_introduction.doxy \
  53. chapters/010_core.doxy
  54. images =
  55. if BUILD_DOC
  56. starpu_config.h: $(top_srcdir)/include/starpu_config.h.in
  57. @$(SED) 's/#undef \(.*\)/#define \1 1/' $< > $@
  58. chapters/version.sty: $(chapters)
  59. @for f in $(chapters) ; do \
  60. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  61. done | sort -r | head -1 > timestamp_sty
  62. @if test -s timestamp_sty ; then \
  63. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%d %B %Y" > timestamp_sty_updated ;\
  64. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%B %Y" > timestamp_sty_updated_month ;\
  65. fi
  66. @if test -s timestamp_sty_updated ; then \
  67. echo ':newcommand{:STARPUUPDATED}{'`cat timestamp_sty_updated`'}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  68. else \
  69. echo ':newcommand{:STARPUUPDATED}{unknown date}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  70. fi
  71. @echo ':newcommand{:STARPUVERSION}{$(VERSION)}' >> $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  72. @$(SED) -i 's/:/\\/g' $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  73. @for f in timestamp_sty timestamp_sty_updated timestamp_sty_updated_month ; do \
  74. if test -f $$f ; then $(RM) $$f ; fi ;\
  75. done
  76. chapters/version.html: $(chapters)
  77. @for f in $(chapters) ; do \
  78. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  79. done | sort -r | head -1 > timestamp_html
  80. @if test -s timestamp_html ; then \
  81. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%d %B %Y" > timestamp_html_updated ;\
  82. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%B %Y" > timestamp_html_updated_month ;\
  83. fi
  84. @echo "This manual documents the internal usage of StarPU version $(VERSION)." > $(top_srcdir)/doc/doxygen_dev/chapters/version.html
  85. @if test -s timestamp_html_updated ; then \
  86. echo "Its contents was last updated on "`cat timestamp_html_updated`"." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  87. else \
  88. echo "Its contents was last updated on <em>unknown_date</em>." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  89. fi
  90. @for f in timestamp_html timestamp_html_updated timestamp_html_updated_month ; do \
  91. if test -f $$f ; then $(RM) $$f ; fi ;\
  92. done
  93. dox_inputs = $(DOX_CONFIG) \
  94. $(chapters) \
  95. starpu_config.h \
  96. chapters/version.sty \
  97. chapters/version.html \
  98. $(top_srcdir)/src/core/workers.h
  99. $(DOX_HTML_DIR): $(DOX_TAG) refman.tex
  100. @$(MKDIR_P) $(DOX_HTML_DIR)
  101. $(DOX_TAG): $(dox_inputs)
  102. @rm -fr $(DOX_HTML_DIR) $(DOX_LATEX_DIR)
  103. @$(DOXYGEN) $(DOX_CONFIG)
  104. @$(SED) -i 's/ModuleDocumentation <\/li>/<a class="el" href="modules.html">Modules<\/a>/' html_dev/index.html
  105. @$(SED) -i 's/FileDocumentation <\/li>/<a class="el" href="files.html">Files<\/a>/' html_dev/index.html
  106. # 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
  107. @if test -f html_dev/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html_dev/navtree.js ; fi
  108. @$(SED) -i 's/.*"Files.html".*//' html_dev/pages.html
  109. @if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
  110. @$(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex
  111. @cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex
  112. $(DOX_PDF): $(DOX_TAG) refman.tex
  113. @cp $(top_srcdir)/doc/doxygen_dev/chapters/version.sty $(DOX_LATEX_DIR)
  114. @-cp $(top_srcdir)/doc/doxygen_dev/chapters/images/*pdf $(DOX_LATEX_DIR)
  115. @echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex
  116. @cd $(DOX_LATEX_DIR) ;\
  117. rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out ;\
  118. $(SED) -i -e 's/__env__/\\_Environment Variables!/' -e 's/\\-\\_\\-\\-\\_\\-env\\-\\_\\-\\-\\_\\-//' ExecutionConfigurationThroughEnvironmentVariables.tex ;\
  119. $(SED) -i -e 's/__configure__/\\_Configure Options!/' -e 's/\\-\\_\\-\\-\\_\\-configure\\-\\_\\-\\-\\_\\-//' CompilationConfiguration.tex ;\
  120. $(SED) -i s'/\\item Module\\-Documentation/\\item \\hyperlink{ModuleDocumentation}{Module Documentation}/' index.tex ;\
  121. $(SED) -i s'/\\item File\\-Documentation/\\item \\hyperlink{FileDocumentation}{File Documentation}/' index.tex ;\
  122. $(PDFLATEX) refman.tex ;\
  123. $(MAKEINDEX) refman.idx ;\
  124. $(PDFLATEX) refman.tex ;\
  125. done=0; repeat=5 ;\
  126. while test $$done = 0 -a $$repeat -gt 0; do \
  127. if $(EGREP) 'Rerun (LaTeX|to get cross-references right)' refman.log > /dev/null 2>&1; then \
  128. $(PDFLATEX) refman.tex; \
  129. repeat=`expr $$repeat - 1`; \
  130. else \
  131. done=1; \
  132. fi; \
  133. done
  134. mv $(DOX_LATEX_DIR)/refman.pdf $(DOX_PDF)
  135. CLEANFILES = $(DOX_TAG) starpu_config.h \
  136. -r \
  137. $(DOX_HTML_DIR) \
  138. $(DOX_LATEX_DIR) \
  139. $(DOX_PDF)
  140. endif
  141. EXTRA_DIST += doxygen.cfg $(chapters) $(images)
  142. # Rule to update documentation on web server. Should only be used locally.
  143. PUBLISHHOST ?= gforge
  144. update-web: $(DOX_PDF)
  145. scp -pr starpu_dev.pdf html_dev $(PUBLISHHOST):/home/groups/starpu/htdocs/doc
  146. showcheck:
  147. -cat /dev/null