Makefile.am 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. config.h: $(top_srcdir)/src/common/config.h.in
  55. @$(SED) 's/#undef \(.*\)/#define \1 1/' $< > $@
  56. @$(SED) -i '1s/^/\/\*\* \@file \*\/\n/' $@
  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. config.h \
  95. chapters/version.sty \
  96. chapters/version.html \
  97. $(top_srcdir)/src/datawizard/data_request.h \
  98. $(top_srcdir)/src/datawizard/coherency.h \
  99. $(top_srcdir)/src/datawizard/sort_data_handles.h \
  100. $(top_srcdir)/src/datawizard/memalloc.h \
  101. $(top_srcdir)/src/datawizard/copy_driver.h \
  102. $(top_srcdir)/src/datawizard/filters.h \
  103. $(top_srcdir)/src/datawizard/datastats.h \
  104. $(top_srcdir)/src/datawizard/write_back.h \
  105. $(top_srcdir)/src/datawizard/interfaces/data_interface.h \
  106. $(top_srcdir)/src/datawizard/memory_manager.h \
  107. $(top_srcdir)/src/datawizard/node_ops.h \
  108. $(top_srcdir)/src/datawizard/memstats.h \
  109. $(top_srcdir)/src/datawizard/datawizard.h \
  110. $(top_srcdir)/src/datawizard/memory_nodes.h \
  111. $(top_srcdir)/src/datawizard/footprint.h \
  112. $(top_srcdir)/src/datawizard/malloc.h \
  113. $(top_srcdir)/src/drivers/cpu/driver_cpu.h \
  114. $(top_srcdir)/src/drivers/cuda/driver_cuda.h \
  115. $(top_srcdir)/src/drivers/opencl/driver_opencl_utils.h \
  116. $(top_srcdir)/src/drivers/opencl/driver_opencl.h \
  117. $(top_srcdir)/src/drivers/disk/driver_disk.h \
  118. $(top_srcdir)/src/drivers/mpi/driver_mpi_common.h \
  119. $(top_srcdir)/src/drivers/mpi/driver_mpi_sink.h \
  120. $(top_srcdir)/src/drivers/mpi/driver_mpi_source.h \
  121. $(top_srcdir)/src/drivers/mp_common/sink_common.h \
  122. $(top_srcdir)/src/drivers/mp_common/mp_common.h \
  123. $(top_srcdir)/src/drivers/mp_common/source_common.h \
  124. $(top_srcdir)/src/drivers/driver_common/driver_common.h \
  125. $(top_srcdir)/src/drivers/mic/driver_mic_sink.h \
  126. $(top_srcdir)/src/drivers/mic/driver_mic_source.h \
  127. $(top_srcdir)/src/drivers/mic/driver_mic_common.h \
  128. $(top_srcdir)/src/profiling/profiling.h \
  129. $(top_srcdir)/src/profiling/bound.h \
  130. $(top_srcdir)/src/util/starpu_data_cpy.h \
  131. $(top_srcdir)/src/util/openmp_runtime_support.h \
  132. $(top_srcdir)/src/util/starpu_clusters_create.h \
  133. $(top_srcdir)/src/util/starpu_task_insert_utils.h \
  134. $(top_srcdir)/src/common/graph.h \
  135. $(top_srcdir)/src/common/fxt.h \
  136. $(top_srcdir)/src/common/starpu_spinlock.h \
  137. $(top_srcdir)/src/common/rbtree_i.h \
  138. $(top_srcdir)/src/common/rbtree.h \
  139. $(top_srcdir)/src/common/timing.h \
  140. $(top_srcdir)/src/common/rwlock.h \
  141. $(top_srcdir)/src/common/barrier.h \
  142. $(top_srcdir)/src/common/prio_list.h \
  143. $(top_srcdir)/src/common/barrier_counter.h \
  144. $(top_srcdir)/src/common/uthash.h \
  145. $(top_srcdir)/src/common/knobs.h \
  146. $(top_srcdir)/src/common/utils.h \
  147. $(top_srcdir)/src/common/thread.h \
  148. $(top_srcdir)/src/common/list.h \
  149. $(top_srcdir)/src/debug/starpu_debug_helpers.h \
  150. $(top_srcdir)/src/debug/traces/starpu_fxt.h \
  151. $(top_srcdir)/src/starpu_parameters.h \
  152. $(top_srcdir)/src/sched_policies/fifo_queues.h \
  153. $(top_srcdir)/src/sched_policies/helper_mct.h \
  154. $(top_srcdir)/src/sched_policies/sched_component.h \
  155. $(top_srcdir)/src/sched_policies/prio_deque.h \
  156. $(top_srcdir)/src/core/jobs.h \
  157. $(top_srcdir)/src/core/disk_ops/unistd/disk_unistd_global.h \
  158. $(top_srcdir)/src/core/dependencies/tags.h \
  159. $(top_srcdir)/src/core/dependencies/data_concurrency.h \
  160. $(top_srcdir)/src/core/dependencies/implicit_data_deps.h \
  161. $(top_srcdir)/src/core/dependencies/cg.h \
  162. $(top_srcdir)/src/core/idle_hook.h \
  163. $(top_srcdir)/src/core/sched_ctx_list.h \
  164. $(top_srcdir)/src/core/perfmodel/multiple_regression.h \
  165. $(top_srcdir)/src/core/perfmodel/perfmodel.h \
  166. $(top_srcdir)/src/core/perfmodel/regression.h \
  167. $(top_srcdir)/src/core/debug.h \
  168. $(top_srcdir)/src/core/sched_ctx.h \
  169. $(top_srcdir)/src/core/simgrid.h \
  170. $(top_srcdir)/src/core/task_bundle.h \
  171. $(top_srcdir)/src/core/topology.h \
  172. $(top_srcdir)/src/core/combined_workers.h \
  173. $(top_srcdir)/src/core/detect_combined_workers.h \
  174. $(top_srcdir)/src/core/task.h \
  175. $(top_srcdir)/src/core/disk.h \
  176. $(top_srcdir)/src/core/sched_policy.h \
  177. $(top_srcdir)/src/core/errorcheck.h \
  178. $(top_srcdir)/src/core/progress_hook.h \
  179. $(top_srcdir)/src/core/drivers.h \
  180. $(top_srcdir)/src/core/workers.h
  181. $(DOX_HTML_DIR): $(DOX_TAG) refman.tex
  182. @$(MKDIR_P) $(DOX_HTML_DIR)
  183. $(DOX_TAG): $(dox_inputs)
  184. @rm -fr $(DOX_HTML_DIR) $(DOX_LATEX_DIR)
  185. @$(DOXYGEN) $(DOX_CONFIG)
  186. @$(SED) -i 's/ModuleDocumentation <\/li>/<a class="el" href="modules.html">Modules<\/a>/' html_dev/index.html
  187. @$(SED) -i 's/FileDocumentation <\/li>/<a class="el" href="files.html">Files<\/a>/' html_dev/index.html
  188. # 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
  189. @if test -f html_dev/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html_dev/navtree.js ; fi
  190. @$(SED) -i 's/.*"Files.html".*//' html_dev/pages.html
  191. @if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
  192. @$(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex
  193. @cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex
  194. $(DOX_PDF): $(DOX_TAG) refman.tex
  195. @cp $(top_srcdir)/doc/doxygen_dev/chapters/version.sty $(DOX_LATEX_DIR)
  196. @echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex
  197. @cd $(DOX_LATEX_DIR) ;\
  198. rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out ;\
  199. $(SED) -i s'/\\item Module\\-Documentation/\\item \\hyperlink{ModuleDocumentation}{Module Documentation}/' index.tex ;\
  200. $(SED) -i s'/\\item File\\-Documentation/\\item \\hyperlink{FileDocumentation}{File Documentation}/' index.tex ;\
  201. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  202. ! < refman.log grep -v group__ | grep -v _amgrp | grep -v deprecated__ | grep "multiply defined" || exit 1 ;\
  203. $(MAKEINDEX) refman.idx ;\
  204. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  205. for i in $(shell seq 1 5); do \
  206. if $(EGREP) 'Rerun (LaTeX|to get cross-references right)' refman.log > /dev/null 2>&1; then \
  207. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex; \
  208. else \
  209. break ; \
  210. fi; \
  211. done
  212. mv $(DOX_LATEX_DIR)/refman.pdf $(DOX_PDF)
  213. CLEANFILES = $(DOX_TAG) config.h \
  214. -r \
  215. $(DOX_HTML_DIR) \
  216. $(DOX_LATEX_DIR) \
  217. $(DOX_PDF)
  218. endif
  219. EXTRA_DIST += doxygen.cfg refman.tex \
  220. $(chapters) $(images)
  221. # Rule to update documentation on web server. Should only be used locally.
  222. PUBLISHHOST ?= gforge
  223. update-web: $(DOX_PDF)
  224. scp -pr starpu_dev.pdf html_dev $(PUBLISHHOST):/home/groups/starpu/htdocs/doc