Makefile.am 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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 STARPU_BUILD_DOC
  28. if STARPU_BUILD_DOC_PDF
  29. all: $(DOX_HTML_DIR) $(DOX_PDF)
  30. EXTRA_DIST += $(DOX_HTML_DIR) $(DOX_PDF)
  31. txt_DATA = $(DOX_PDF)
  32. else
  33. all: $(DOX_HTML_DIR)
  34. EXTRA_DIST += $(DOX_HTML_DIR)
  35. endif
  36. DOX_HTML_SRCDIR=$(DOX_HTML_DIR)
  37. install-exec-hook:
  38. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/html_dev
  39. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html_dev \;)
  40. uninstall-hook:
  41. rm -rf $(DESTDIR)$(docdir)/manual/html_dev
  42. else
  43. if STARPU_AVAILABLE_DOC
  44. EXTRA_DIST += $(top_srcdir)/doc/doxygen_dev/html_dev
  45. DOX_HTML_SRCDIR=$(top_srcdir)/doc/doxygen_dev/html_dev
  46. install-exec-hook:
  47. $(MKDIR_P) $(DESTDIR)$(docdir)/manual/html_dev
  48. (cd $(DOX_HTML_SRCDIR) && find . -type f -exec $(INSTALL) -c -m 644 {} $(DESTDIR)$(docdir)/manual/html_dev \;)
  49. uninstall-hook:
  50. rm -rf $(DESTDIR)$(docdir)/manual/html_dev
  51. endif
  52. if STARPU_AVAILABLE_DOC_PDF
  53. EXTRA_DIST += $(top_srcdir)/doc/doxygen_dev/starpu_dev.pdf
  54. txt_DATA = $(top_srcdir)/doc/doxygen_dev/starpu_dev.pdf
  55. endif
  56. endif
  57. chapters = \
  58. chapters/000_introduction.doxy \
  59. chapters/010_core.doxy
  60. images =
  61. if STARPU_BUILD_DOC
  62. config.h: $(top_srcdir)/src/common/config.h.in
  63. @$(SED) 's/#undef \(.*\)/#define \1 1/' $< > $@
  64. @$(SED) -i '1s/^/\/\*\* \@file \*\/\n/' $@
  65. chapters/version.sty: $(chapters)
  66. @for f in $(chapters) ; do \
  67. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  68. done | sort -r | head -1 > timestamp_sty
  69. @if test -s timestamp_sty ; then \
  70. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%d %B %Y" > timestamp_sty_updated ;\
  71. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%B %Y" > timestamp_sty_updated_month ;\
  72. fi
  73. @if test -s timestamp_sty_updated ; then \
  74. echo ':newcommand{:STARPUUPDATED}{'`cat timestamp_sty_updated`'}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  75. else \
  76. echo ':newcommand{:STARPUUPDATED}{unknown date}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  77. fi
  78. @echo ':newcommand{:STARPUVERSION}{$(VERSION)}' >> $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  79. @$(SED) -i 's/:/\\/g' $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  80. @for f in timestamp_sty timestamp_sty_updated timestamp_sty_updated_month ; do \
  81. if test -f $$f ; then $(RM) $$f ; fi ;\
  82. done
  83. chapters/version.html: $(chapters)
  84. @for f in $(chapters) ; do \
  85. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  86. done | sort -r | head -1 > timestamp_html
  87. @if test -s timestamp_html ; then \
  88. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%d %B %Y" > timestamp_html_updated ;\
  89. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%B %Y" > timestamp_html_updated_month ;\
  90. fi
  91. @echo "This manual documents the internal usage of StarPU version $(VERSION)." > $(top_srcdir)/doc/doxygen_dev/chapters/version.html
  92. @if test -s timestamp_html_updated ; then \
  93. echo "Its contents was last updated on "`cat timestamp_html_updated`"." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  94. else \
  95. echo "Its contents was last updated on <em>unknown_date</em>." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  96. fi
  97. @for f in timestamp_html timestamp_html_updated timestamp_html_updated_month ; do \
  98. if test -f $$f ; then $(RM) $$f ; fi ;\
  99. done
  100. dox_inputs = $(DOX_CONFIG) \
  101. $(chapters) \
  102. config.h \
  103. chapters/version.sty \
  104. chapters/version.html \
  105. $(top_srcdir)/src/datawizard/data_request.h \
  106. $(top_srcdir)/src/datawizard/coherency.h \
  107. $(top_srcdir)/src/datawizard/sort_data_handles.h \
  108. $(top_srcdir)/src/datawizard/memalloc.h \
  109. $(top_srcdir)/src/datawizard/copy_driver.h \
  110. $(top_srcdir)/src/datawizard/filters.h \
  111. $(top_srcdir)/src/datawizard/datastats.h \
  112. $(top_srcdir)/src/datawizard/write_back.h \
  113. $(top_srcdir)/src/datawizard/interfaces/data_interface.h \
  114. $(top_srcdir)/src/datawizard/memory_manager.h \
  115. $(top_srcdir)/src/datawizard/node_ops.h \
  116. $(top_srcdir)/src/datawizard/memstats.h \
  117. $(top_srcdir)/src/datawizard/datawizard.h \
  118. $(top_srcdir)/src/datawizard/memory_nodes.h \
  119. $(top_srcdir)/src/datawizard/footprint.h \
  120. $(top_srcdir)/src/datawizard/malloc.h \
  121. $(top_srcdir)/src/drivers/cpu/driver_cpu.h \
  122. $(top_srcdir)/src/drivers/cuda/driver_cuda.h \
  123. $(top_srcdir)/src/drivers/opencl/driver_opencl_utils.h \
  124. $(top_srcdir)/src/drivers/opencl/driver_opencl.h \
  125. $(top_srcdir)/src/drivers/disk/driver_disk.h \
  126. $(top_srcdir)/src/drivers/mpi/driver_mpi_common.h \
  127. $(top_srcdir)/src/drivers/mpi/driver_mpi_sink.h \
  128. $(top_srcdir)/src/drivers/mpi/driver_mpi_source.h \
  129. $(top_srcdir)/src/drivers/mp_common/sink_common.h \
  130. $(top_srcdir)/src/drivers/mp_common/mp_common.h \
  131. $(top_srcdir)/src/drivers/mp_common/source_common.h \
  132. $(top_srcdir)/src/drivers/driver_common/driver_common.h \
  133. $(top_srcdir)/src/drivers/mic/driver_mic_sink.h \
  134. $(top_srcdir)/src/drivers/mic/driver_mic_source.h \
  135. $(top_srcdir)/src/drivers/mic/driver_mic_common.h \
  136. $(top_srcdir)/src/profiling/profiling.h \
  137. $(top_srcdir)/src/profiling/bound.h \
  138. $(top_srcdir)/src/util/starpu_data_cpy.h \
  139. $(top_srcdir)/src/util/openmp_runtime_support.h \
  140. $(top_srcdir)/src/util/starpu_clusters_create.h \
  141. $(top_srcdir)/src/util/starpu_task_insert_utils.h \
  142. $(top_srcdir)/src/common/graph.h \
  143. $(top_srcdir)/src/common/fxt.h \
  144. $(top_srcdir)/src/common/starpu_spinlock.h \
  145. $(top_srcdir)/src/common/rbtree_i.h \
  146. $(top_srcdir)/src/common/rbtree.h \
  147. $(top_srcdir)/src/common/timing.h \
  148. $(top_srcdir)/src/common/rwlock.h \
  149. $(top_srcdir)/src/common/barrier.h \
  150. $(top_srcdir)/src/common/prio_list.h \
  151. $(top_srcdir)/src/common/barrier_counter.h \
  152. $(top_srcdir)/src/common/uthash.h \
  153. $(top_srcdir)/src/common/knobs.h \
  154. $(top_srcdir)/src/common/utils.h \
  155. $(top_srcdir)/src/common/thread.h \
  156. $(top_srcdir)/src/common/list.h \
  157. $(top_srcdir)/src/debug/starpu_debug_helpers.h \
  158. $(top_srcdir)/src/debug/traces/starpu_fxt.h \
  159. $(top_srcdir)/src/starpu_parameters.h \
  160. $(top_srcdir)/src/sched_policies/fifo_queues.h \
  161. $(top_srcdir)/src/sched_policies/helper_mct.h \
  162. $(top_srcdir)/src/sched_policies/sched_component.h \
  163. $(top_srcdir)/src/sched_policies/prio_deque.h \
  164. $(top_srcdir)/src/core/jobs.h \
  165. $(top_srcdir)/src/core/disk_ops/unistd/disk_unistd_global.h \
  166. $(top_srcdir)/src/core/dependencies/tags.h \
  167. $(top_srcdir)/src/core/dependencies/data_concurrency.h \
  168. $(top_srcdir)/src/core/dependencies/implicit_data_deps.h \
  169. $(top_srcdir)/src/core/dependencies/cg.h \
  170. $(top_srcdir)/src/core/idle_hook.h \
  171. $(top_srcdir)/src/core/sched_ctx_list.h \
  172. $(top_srcdir)/src/core/perfmodel/multiple_regression.h \
  173. $(top_srcdir)/src/core/perfmodel/perfmodel.h \
  174. $(top_srcdir)/src/core/perfmodel/regression.h \
  175. $(top_srcdir)/src/core/debug.h \
  176. $(top_srcdir)/src/core/sched_ctx.h \
  177. $(top_srcdir)/src/core/simgrid.h \
  178. $(top_srcdir)/src/core/task_bundle.h \
  179. $(top_srcdir)/src/core/topology.h \
  180. $(top_srcdir)/src/core/combined_workers.h \
  181. $(top_srcdir)/src/core/detect_combined_workers.h \
  182. $(top_srcdir)/src/core/task.h \
  183. $(top_srcdir)/src/core/disk.h \
  184. $(top_srcdir)/src/core/sched_policy.h \
  185. $(top_srcdir)/src/core/errorcheck.h \
  186. $(top_srcdir)/src/core/progress_hook.h \
  187. $(top_srcdir)/src/core/drivers.h \
  188. $(top_srcdir)/src/core/workers.h
  189. $(DOX_HTML_DIR): $(DOX_TAG)
  190. @$(MKDIR_P) $(DOX_HTML_DIR)
  191. $(DOX_TAG): $(dox_inputs)
  192. @rm -fr $(DOX_HTML_DIR) $(DOX_LATEX_DIR)
  193. @$(DOXYGEN) $(DOX_CONFIG)
  194. @$(SED) -i 's/ModuleDocumentation <\/li>/<a class="el" href="modules.html">Modules<\/a>/' html_dev/index.html
  195. @$(SED) -i 's/FileDocumentation <\/li>/<a class="el" href="files.html">Files<\/a>/' html_dev/index.html
  196. # 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
  197. @if test -f html_dev/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html_dev/navtree.js ; fi
  198. @$(SED) -i 's/.*"Files.html".*//' html_dev/pages.html
  199. @if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
  200. @$(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex
  201. @cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex
  202. $(DOX_PDF): $(DOX_TAG) refman.tex
  203. @cp $(top_srcdir)/doc/doxygen_dev/chapters/version.sty $(DOX_LATEX_DIR)
  204. @echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex
  205. @cd $(DOX_LATEX_DIR) ;\
  206. rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out ;\
  207. $(SED) -i s'/\\item Module\\-Documentation/\\item \\hyperlink{ModuleDocumentation}{Module Documentation}/' index.tex ;\
  208. $(SED) -i s'/\\item File\\-Documentation/\\item \\hyperlink{FileDocumentation}{File Documentation}/' index.tex ;\
  209. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  210. ! < refman.log grep -v group__ | grep -v _amgrp | grep -v deprecated__ | grep "multiply defined" || exit 1 ;\
  211. $(MAKEINDEX) refman.idx ;\
  212. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  213. for i in $(shell seq 1 5); do \
  214. if $(EGREP) 'Rerun (LaTeX|to get cross-references right)' refman.log > /dev/null 2>&1; then \
  215. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex; \
  216. else \
  217. break ; \
  218. fi; \
  219. done
  220. mv $(DOX_LATEX_DIR)/refman.pdf $(DOX_PDF)
  221. CLEANFILES = $(DOX_TAG) config.h \
  222. -r \
  223. $(DOX_HTML_DIR) \
  224. $(DOX_LATEX_DIR) \
  225. $(DOX_PDF)
  226. endif
  227. EXTRA_DIST += doxygen.cfg refman.tex \
  228. $(chapters) $(images)
  229. # Rule to update documentation on web server. Should only be used locally.
  230. PUBLISHHOST ?= gforge
  231. update-web: $(DOX_PDF)
  232. scp -pr starpu_dev.pdf html_dev $(PUBLISHHOST):/home/groups/starpu/htdocs/doc