Makefile.am 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2021 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) && $(PROG_FIND) . -type f -exec $(INSTALL_DATA) {} $(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) && $(PROG_FIND) . -type f -exec $(INSTALL_DATA) {} $(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. EXTRA_DIST += \
  63. $(top_srcdir)/doc/doxygen_dev/chapters/version.sty \
  64. $(top_srcdir)/doc/doxygen_dev/chapters/version.html
  65. config.h: $(top_srcdir)/src/common/config.h.in
  66. @$(SED) 's/#undef \(.*\)/#define \1 1/' $< > $@
  67. @$(SED) -i '1s/^/\/\*\* \@file \*\/\n/' $@
  68. chapters/version.sty: $(chapters)
  69. @for f in $(chapters) ; do \
  70. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  71. done | sort -r | head -1 > timestamp_sty
  72. @if test -s timestamp_sty ; then \
  73. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%d %B %Y" > timestamp_sty_updated ;\
  74. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_sty` +"%B %Y" > timestamp_sty_updated_month ;\
  75. fi
  76. @if test -s timestamp_sty_updated ; then \
  77. echo ':newcommand{:STARPUUPDATED}{'`cat timestamp_sty_updated`'}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  78. else \
  79. echo ':newcommand{:STARPUUPDATED}{unknown date}' > $(top_srcdir)/doc/doxygen_dev/chapters/version.sty;\
  80. fi
  81. @echo ':newcommand{:STARPUVERSION}{$(VERSION)}' >> $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  82. @$(SED) -i 's/:/\\/g' $(top_srcdir)/doc/doxygen_dev/chapters/version.sty
  83. @for f in timestamp_sty timestamp_sty_updated timestamp_sty_updated_month ; do \
  84. if test -f $$f ; then $(RM) $$f ; fi ;\
  85. done
  86. chapters/version.html: $(chapters)
  87. @for f in $(chapters) ; do \
  88. if test -f $(top_srcdir)/doc/doxygen_dev/$$f ; then $(PROG_STAT) --format=%Y $(top_srcdir)/doc/doxygen_dev/$$f ; fi \
  89. done | sort -r | head -1 > timestamp_html
  90. @if test -s timestamp_html ; then \
  91. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%d %B %Y" > timestamp_html_updated ;\
  92. LC_ALL=C $(PROG_DATE) --date=@`cat timestamp_html` +"%B %Y" > timestamp_html_updated_month ;\
  93. fi
  94. @echo "This manual documents the internal usage of StarPU version $(VERSION)." > $(top_srcdir)/doc/doxygen_dev/chapters/version.html
  95. @if test -s timestamp_html_updated ; then \
  96. echo "Its contents was last updated on "`cat timestamp_html_updated`"." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  97. else \
  98. echo "Its contents was last updated on <em>unknown_date</em>." >> $(top_srcdir)/doc/doxygen_dev/chapters/version.html;\
  99. fi
  100. @for f in timestamp_html timestamp_html_updated timestamp_html_updated_month ; do \
  101. if test -f $$f ; then $(RM) $$f ; fi ;\
  102. done
  103. dox_inputs = $(DOX_CONFIG) \
  104. $(chapters) \
  105. config.h \
  106. chapters/version.sty \
  107. chapters/version.html \
  108. $(top_srcdir)/src/datawizard/data_request.h \
  109. $(top_srcdir)/src/datawizard/coherency.h \
  110. $(top_srcdir)/src/datawizard/sort_data_handles.h \
  111. $(top_srcdir)/src/datawizard/memalloc.h \
  112. $(top_srcdir)/src/datawizard/copy_driver.h \
  113. $(top_srcdir)/src/datawizard/filters.h \
  114. $(top_srcdir)/src/datawizard/datastats.h \
  115. $(top_srcdir)/src/datawizard/write_back.h \
  116. $(top_srcdir)/src/datawizard/interfaces/data_interface.h \
  117. $(top_srcdir)/src/datawizard/memory_manager.h \
  118. $(top_srcdir)/src/datawizard/node_ops.h \
  119. $(top_srcdir)/src/datawizard/memstats.h \
  120. $(top_srcdir)/src/datawizard/datawizard.h \
  121. $(top_srcdir)/src/datawizard/memory_nodes.h \
  122. $(top_srcdir)/src/datawizard/footprint.h \
  123. $(top_srcdir)/src/datawizard/malloc.h \
  124. $(top_srcdir)/src/drivers/cpu/driver_cpu.h \
  125. $(top_srcdir)/src/drivers/cuda/driver_cuda.h \
  126. $(top_srcdir)/src/drivers/opencl/driver_opencl_utils.h \
  127. $(top_srcdir)/src/drivers/opencl/driver_opencl.h \
  128. $(top_srcdir)/src/drivers/disk/driver_disk.h \
  129. $(top_srcdir)/src/drivers/mpi/driver_mpi_common.h \
  130. $(top_srcdir)/src/drivers/mpi/driver_mpi_sink.h \
  131. $(top_srcdir)/src/drivers/mpi/driver_mpi_source.h \
  132. $(top_srcdir)/src/drivers/mp_common/sink_common.h \
  133. $(top_srcdir)/src/drivers/mp_common/mp_common.h \
  134. $(top_srcdir)/src/drivers/mp_common/source_common.h \
  135. $(top_srcdir)/src/drivers/driver_common/driver_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/sched_policies/fifo_queues.h \
  160. $(top_srcdir)/src/sched_policies/helper_mct.h \
  161. $(top_srcdir)/src/sched_policies/sched_component.h \
  162. $(top_srcdir)/src/sched_policies/prio_deque.h \
  163. $(top_srcdir)/src/core/jobs.h \
  164. $(top_srcdir)/src/core/disk_ops/unistd/disk_unistd_global.h \
  165. $(top_srcdir)/src/core/dependencies/tags.h \
  166. $(top_srcdir)/src/core/dependencies/data_concurrency.h \
  167. $(top_srcdir)/src/core/dependencies/implicit_data_deps.h \
  168. $(top_srcdir)/src/core/dependencies/cg.h \
  169. $(top_srcdir)/src/core/idle_hook.h \
  170. $(top_srcdir)/src/core/sched_ctx_list.h \
  171. $(top_srcdir)/src/core/perfmodel/multiple_regression.h \
  172. $(top_srcdir)/src/core/perfmodel/perfmodel.h \
  173. $(top_srcdir)/src/core/perfmodel/regression.h \
  174. $(top_srcdir)/src/core/debug.h \
  175. $(top_srcdir)/src/core/sched_ctx.h \
  176. $(top_srcdir)/src/core/simgrid.h \
  177. $(top_srcdir)/src/core/task_bundle.h \
  178. $(top_srcdir)/src/core/topology.h \
  179. $(top_srcdir)/src/core/combined_workers.h \
  180. $(top_srcdir)/src/core/detect_combined_workers.h \
  181. $(top_srcdir)/src/core/task.h \
  182. $(top_srcdir)/src/core/disk.h \
  183. $(top_srcdir)/src/core/sched_policy.h \
  184. $(top_srcdir)/src/core/errorcheck.h \
  185. $(top_srcdir)/src/core/progress_hook.h \
  186. $(top_srcdir)/src/core/drivers.h \
  187. $(top_srcdir)/src/core/workers.h
  188. $(DOX_HTML_DIR): $(DOX_TAG)
  189. @$(MKDIR_P) $(DOX_HTML_DIR)
  190. $(DOX_TAG): $(dox_inputs)
  191. @rm -fr $(DOX_HTML_DIR) $(DOX_LATEX_DIR)
  192. @$(DOXYGEN) $(DOX_CONFIG)
  193. @$(SED) -i 's/ModuleDocumentation <\/li>/<a class="el" href="modules.html">Modules<\/a>/' html_dev/index.html
  194. @$(SED) -i 's/FileDocumentation <\/li>/<a class="el" href="files.html">Files<\/a>/' html_dev/index.html
  195. # 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
  196. @if test -f html_dev/navtree.js ; then $(SED) -i 's/\[ "Files", "Files.html", null \]/\[ "", "Files.html", null \]/' html_dev/navtree.js ; fi
  197. @$(SED) -i 's/.*"Files.html".*//' html_dev/pages.html
  198. @if test -f latex/main.tex ; then mv latex/main.tex latex/index.tex ; fi
  199. @if test -f $(DOX_LATEX_DIR)/refman.tex ; then $(SED) -i '/\\begin{titlepage}/,$$d' $(DOX_LATEX_DIR)/refman.tex ; fi
  200. @if test -f $(DOX_LATEX_DIR)/refman.tex ; then cat $(top_srcdir)/doc/doxygen_dev/refman.tex >> $(DOX_LATEX_DIR)/refman.tex ; fi
  201. $(top_srcdir)/doc/doxygen/sectionNumbering.py $(top_srcdir)/doc/doxygen_dev/chapters/ $(DOX_HTML_DIR)
  202. $(DOX_PDF): $(DOX_TAG) refman.tex
  203. $(MKDIR_P) $(DOX_LATEX_DIR)
  204. @cp $(top_srcdir)/doc/doxygen_dev/chapters/version.sty $(DOX_LATEX_DIR)
  205. @cp $(top_srcdir)/doc/doxygen_dev/modules.tex $(DOX_LATEX_DIR)
  206. @echo $(PDFLATEX) $(DOX_LATEX_DIR)/refman.tex
  207. @cd $(DOX_LATEX_DIR) ;\
  208. rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out ;\
  209. $(SED) -i s'/\\item Module\\-Documentation/\\item \\hyperlink{ModuleDocumentation}{Module Documentation}/' index.tex ;\
  210. $(SED) -i s'/\\item File\\-Documentation/\\item \\hyperlink{FileDocumentation}{File Documentation}/' index.tex ;\
  211. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  212. ! < refman.log grep -v group__ | grep -v _amgrp | grep -v deprecated__ | grep "multiply defined" || exit 1 ;\
  213. $(MAKEINDEX) refman.idx ;\
  214. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex ;\
  215. for i in $(shell seq 1 5); do \
  216. if $(EGREP) 'Rerun (LaTeX|to get cross-references right)' refman.log > /dev/null 2>&1; then \
  217. max_print_line=1000000 $(PDFLATEX) -interaction batchmode refman.tex; \
  218. else \
  219. break ; \
  220. fi; \
  221. done
  222. mv $(DOX_LATEX_DIR)/refman.pdf $(DOX_PDF)
  223. CLEANFILES = $(DOX_TAG) config.h \
  224. -r \
  225. $(DOX_HTML_DIR) \
  226. $(DOX_LATEX_DIR) \
  227. $(DOX_PDF)
  228. endif
  229. EXTRA_DIST += doxygen.cfg refman.tex \
  230. $(chapters) $(images)