Makefile.am 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. ## Process this file with automake to produce Makefile.in
  2. if BUILD_DSELECT
  3. MAYBE_DSELECT = dselect
  4. endif
  5. SUBDIRS = \
  6. lib \
  7. dpkg-deb \
  8. dpkg-split \
  9. src \
  10. utils \
  11. $(MAYBE_DSELECT) \
  12. scripts \
  13. po \
  14. man
  15. ACLOCAL_AMFLAGS = -I m4
  16. dist_pkgdata_DATA = \
  17. data/cputable \
  18. data/ostable \
  19. data/abitable \
  20. data/triplettable
  21. EXTRA_DIST = \
  22. .mailmap \
  23. ChangeLog.old \
  24. README.l10n \
  25. get-version \
  26. run-script \
  27. doc/README.api \
  28. doc/README.feature-removal-schedule \
  29. doc/coding-style.txt \
  30. doc/frontend.txt \
  31. doc/lcov-inject.pl \
  32. doc/triggers.txt \
  33. debian/changelog \
  34. debian/compat \
  35. debian/control \
  36. debian/copyright \
  37. debian/dpkg-dev.docs \
  38. debian/dpkg-dev.install \
  39. debian/dpkg-dev.manpages \
  40. debian/dpkg-dev.preinst \
  41. debian/dpkg-dev.lintian-overrides \
  42. debian/dpkg.cfg \
  43. debian/dpkg.cron.daily \
  44. debian/dpkg.docs \
  45. debian/dpkg.install \
  46. debian/dpkg.manpages \
  47. debian/dpkg.postinst \
  48. debian/dpkg.postrm \
  49. debian/dpkg.preinst \
  50. debian/dpkg.prerm \
  51. debian/dpkg.logrotate \
  52. debian/dpkg.links \
  53. debian/dpkg.lintian-overrides \
  54. debian/dselect.cfg \
  55. debian/dselect.docs \
  56. debian/dselect.install \
  57. debian/dselect.manpages \
  58. debian/dselect.preinst \
  59. debian/dselect.lintian-overrides \
  60. debian/libdpkg-dev.docs \
  61. debian/libdpkg-dev.install \
  62. debian/libdpkg-dev.lintian-overrides \
  63. debian/libdpkg-perl.docs \
  64. debian/libdpkg-perl.install \
  65. debian/libdpkg-perl.lintian-overrides \
  66. debian/source/lintian-overrides \
  67. debian/source/format \
  68. debian/source/options \
  69. debian/usertags \
  70. debian/rules \
  71. debian/shlibs.default \
  72. debian/shlibs.override \
  73. $(test_scripts) \
  74. $(test_data) \
  75. $(nil)
  76. .PHONY: doc
  77. doc: doc/Doxyfile
  78. $(DOXYGEN) doc/Doxyfile
  79. doc-clean:
  80. rm -rf doc/html/
  81. # Code coverage support
  82. .PHONY: coverage coverage-clean
  83. if COVERAGE_ENABLED
  84. LCOV_OPTS = -q --rc geninfo_checksum=1 --rc lcov_branch_coverage=1
  85. LCOV_CAPTURE_OPTS = $(LCOV_OPTS) --no-recursion \
  86. -d $(top_builddir)/lib/dpkg \
  87. -d $(top_builddir)/src \
  88. -d $(top_builddir)/utils
  89. LCOV_INJECT = $(PERL) -i $(top_srcdir)/doc/lcov-inject.pl
  90. coverage: all
  91. : # Remove coverage data from any previous run
  92. rm -f *.lcov
  93. find -name '*.gcda' -o -name '*.gcov' | xargs rm -f
  94. : # Initialize data
  95. $(LCOV) $(LCOV_CAPTURE_OPTS) -c -o dpkg_base.lcov -i
  96. : # Run test cases
  97. $(MAKE) -C lib/dpkg check
  98. $(MAKE) -C src check
  99. $(MAKE) -C utils check
  100. : # Merge test coverage data
  101. $(LCOV) $(LCOV_CAPTURE_OPTS) -c -o dpkg_test.lcov
  102. $(LCOV) $(LCOV_OPTS) -a dpkg_base.lcov -a dpkg_test.lcov \
  103. -o dpkg_merge.lcov
  104. $(LCOV) $(LCOV_OPTS) -r dpkg_merge.lcov '/usr/include/*' -o dpkg.lcov
  105. : # Generate reports
  106. $(LCOV) $(LCOV_OPTS) -l dpkg.lcov
  107. $(LCOV_GENHTML) $(LCOV_OPTS) \
  108. --legend --title "dpkg $(VERSION) C code coverage" \
  109. -o doc/coverage dpkg.lcov
  110. $(MAKE) -C scripts $@
  111. : # XXX: Inject perl coverage into lcov index files. This is a fragile
  112. : # hack which might break depending on the html output generated.
  113. $(LCOV_INJECT) doc/coverage/index-sort-b.html
  114. $(LCOV_INJECT) doc/coverage/index-sort-f.html
  115. $(LCOV_INJECT) doc/coverage/index-sort-l.html
  116. $(LCOV_INJECT) doc/coverage/index.html
  117. coverage-clean:
  118. rm -rf doc/coverage/
  119. find -name '*.gcno' -o -name '*.gcda' -o \
  120. -name '*.gcov' -o -name '*.lcov' | xargs rm -f
  121. $(MAKE) -C scripts $@
  122. else
  123. coverage:
  124. @echo "Need to reconfigure with --enable-coverage"
  125. coverage-clean:
  126. endif
  127. test_scripts = \
  128. t/pod.t \
  129. t/pod-spell.t \
  130. t/pod-coverage.t \
  131. t/synopsis.t \
  132. t/minimum-version.t \
  133. t/syntax.t \
  134. t/strict.t \
  135. t/critic.t \
  136. $(nil)
  137. test_data = \
  138. t/critic/perlcriticrc \
  139. $(nil)
  140. # We need to use absolute paths here due to strict.t invoking a sub-perl,
  141. # while changing dir to source dir on out-of-tree builds.
  142. TEST_ENV_VARS = \
  143. DPKG_DATADIR=$(abs_top_srcdir)/data \
  144. $(nil)
  145. include $(top_srcdir)/check.am
  146. .PHONY: update-po
  147. update-po:
  148. $(MAKE) -C po update-po
  149. $(MAKE) -C scripts/po update-po
  150. $(MAKE) -C dselect/po update-po
  151. $(MAKE) -C man update-po
  152. # If we create the dist tarball from the git repository, make sure
  153. # that we're not forgetting some files...
  154. dist-hook:
  155. echo $(VERSION) >$(distdir)/.dist-version
  156. if [ -e .git ]; then \
  157. for file in `git ls-files | grep -v .gitignore`; do \
  158. if [ ! -e "$(distdir)/$$file" ]; then \
  159. echo "$$file is missing in $(distdir)" >&2 ; \
  160. exit 1 ; \
  161. fi ; \
  162. done ; \
  163. XDG_CONFIG_HOME= HOME= \
  164. git log -C --stat 1.15.0.. >$(distdir)/ChangeLog; \
  165. fi
  166. clean-local: doc-clean coverage-clean check-clean