Makefile.am 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. ## Process this file with automake to produce Makefile.in
  2. SUBDIRS = man
  3. info_TEXINFOS = check.texi
  4. check_TEXINFOS = fdl.texi
  5. check_html: $(srcdir)/check.texi
  6. texi2html --output=check_html --top-file=index.html --split=chapter check.texi
  7. doxygen:
  8. doxygen $(srcdir)/doxygen.conf
  9. ## if graphviz does not exist disable graph generation
  10. if USE_GRAPHVIZ
  11. doxygen-devel:
  12. doxygen $(srcdir)/doxygen-devel.conf
  13. else
  14. doxygen-devel:
  15. ( cat $(srcdir)/doxygen-devel.conf; echo "HAVE_DOT = NO" ) | doxygen -
  16. @ >&2 echo "graphviz not found, graphs will not be rendered."
  17. endif
  18. ## we need to include several diffs as we evolve the example in the
  19. ## tutorial. this means we'll generate them from the example source.
  20. $(srcdir)/check.texi: money.1-2.h.diff \
  21. money.1-3.c.diff \
  22. money.3-4.c.diff \
  23. money.4-5.c.diff \
  24. money.5-6.c.diff \
  25. check_money.1-2.c.diff \
  26. check_money.2-3.c.diff \
  27. check_money.3-6.c.diff \
  28. check_money.6-7.c.diff
  29. eg_root = $(top_srcdir)/doc/example
  30. eg_src = $(eg_root)/src
  31. eg_tests = $(eg_root)/tests
  32. # If the filterdiff tool is available, use it to filter timestamps
  33. # from diff files. Otherwise, the timestamps change between builds
  34. # and the built output will not be reproducible
  35. if USE_FILTERDIFF
  36. filter_timestapms = | filterdiff --remove-timestamps
  37. else
  38. filter_timestapms =
  39. endif
  40. ## now a rule for each diff. the redundancy here can probably be
  41. ## parameterized, but I don't know how. if you know, please tell us!
  42. # diff returns 1 if there is a difference, but we don't want make to
  43. # think that means there is an error
  44. money.1-2.h.diff: $(eg_src)/money.1.h $(eg_src)/money.2.h
  45. cd $(eg_root); \
  46. diff -U 100 src/money.1.h src/money.2.h ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  47. cd -;
  48. money.1-3.c.diff: $(eg_src)/money.1.c $(eg_src)/money.3.c
  49. cd $(eg_root); \
  50. diff -U 100 src/money.1.c src/money.3.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  51. cd -;
  52. money.3-4.c.diff: $(eg_src)/money.3.c $(eg_src)/money.4.c
  53. cd $(eg_root); \
  54. diff -U 100 src/money.3.c src/money.4.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  55. cd -;
  56. money.4-5.c.diff: $(eg_src)/money.4.c $(eg_src)/money.5.c
  57. cd $(eg_root); \
  58. diff -U 100 src/money.4.c src/money.5.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  59. cd -;
  60. money.5-6.c.diff: $(eg_src)/money.5.c $(eg_src)/money.6.c
  61. cd $(eg_root); \
  62. diff -U 100 src/money.5.c src/money.6.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  63. cd -;
  64. check_money.1-2.c.diff: $(eg_tests)/check_money.1.c $(eg_tests)/check_money.2.c
  65. cd $(eg_root); \
  66. diff -U 100 tests/check_money.1.c tests/check_money.2.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  67. cd -;
  68. check_money.2-3.c.diff: $(eg_tests)/check_money.2.c $(eg_tests)/check_money.3.c
  69. cd $(eg_root); \
  70. diff -U 100 tests/check_money.2.c tests/check_money.3.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  71. cd -;
  72. check_money.3-6.c.diff: $(eg_tests)/check_money.3.c $(eg_tests)/check_money.6.c
  73. cd $(eg_root); \
  74. diff -U 100 tests/check_money.3.c tests/check_money.6.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  75. cd -;
  76. check_money.6-7.c.diff: $(eg_tests)/check_money.6.c $(eg_tests)/check_money.7.c
  77. cd $(eg_root); \
  78. diff -U 100 tests/check_money.6.c tests/check_money.7.c ${filter_timestapms} > @abs_builddir@/$@ || test $$? -eq 1; \
  79. cd -;
  80. # explicitly list every file in the example.
  81. example_docs = example/Makefile.am \
  82. example/README \
  83. example/configure.ac
  84. example_src_docs = example/src/Makefile.am \
  85. example/src/main.c \
  86. example/src/money.c \
  87. example/src/money.h \
  88. example/src/money.1.h \
  89. example/src/money.2.h \
  90. example/src/money.1.c \
  91. example/src/money.3.c \
  92. example/src/money.4.c \
  93. example/src/money.5.c \
  94. example/src/money.6.c
  95. example_tests_docs = example/tests/Makefile.am \
  96. example/tests/check_money.c \
  97. example/tests/check_money.1.c \
  98. example/tests/check_money.2.c \
  99. example/tests/check_money.3.c \
  100. example/tests/check_money.6.c \
  101. example/tests/check_money.7.c
  102. example_cmake = example/CMakeLists.txt \
  103. example/src/CMakeLists.txt \
  104. example/tests/CMakeLists.txt \
  105. example/cmake/config.h.in \
  106. example/cmake/COPYING-CMAKE-SCRIPTS.txt \
  107. example/cmake/FindCheck.cmake
  108. ## what to clean
  109. CLEANFILES = *~ *.diff
  110. clean-local:
  111. rm -rf check_html
  112. rm -rf doxygen
  113. ## what to distribute
  114. EXTRA_DIST = $(example_docs) \
  115. $(example_src_docs) \
  116. $(example_tests_docs) \
  117. $(example_cmake)
  118. ## what to install
  119. docdir = $(datadir)/doc/$(PACKAGE)
  120. # install money example
  121. exampledir = $(docdir)/example
  122. example_DATA = $(example_docs)
  123. examplesrcdir = $(docdir)/example/src
  124. examplesrc_DATA = $(example_src_docs)
  125. exampletestsdir = $(docdir)/example/tests
  126. exampletests_DATA = $(example_tests_docs)