Makefile.am 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Copyright (c) 2001-2004, Roger Dingledine
  2. # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
  3. # Copyright (c) 2007-2011, The Tor Project, Inc.
  4. # See LICENSE for licensing information
  5. # "foreign" means we don't follow GNU package layout standards
  6. # 1.9 means we require automake vesion 1.9
  7. AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
  8. ACLOCAL_AMFLAGS = -I m4
  9. noinst_LIBRARIES=
  10. EXTRA_DIST=
  11. noinst_HEADERS=
  12. bin_PROGRAMS=
  13. CLEANFILES=
  14. TESTS=
  15. noinst_PROGRAMS=
  16. DISTCLEANFILES=
  17. bin_SCRIPTS=
  18. AM_CPPFLAGS=
  19. include src/include.am
  20. include doc/include.am
  21. include contrib/include.am
  22. EXTRA_DIST+= \
  23. ChangeLog \
  24. INSTALL \
  25. LICENSE \
  26. Makefile.nmake \
  27. README \
  28. ReleaseNotes
  29. if COVERAGE_ENABLED
  30. TEST_CFLAGS=-fno-inline -fprofile-arcs -ftest-coverage
  31. else
  32. TEST_CFLAGS=
  33. endif
  34. #install-data-local:
  35. # $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
  36. # Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
  37. # building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
  38. RPMBUILD ?= rpmbuild
  39. # Use automake's dist-gzip target to build the tarball
  40. dist-rpm: dist-gzip
  41. TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S"); \
  42. RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX"); \
  43. mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
  44. cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/; \
  45. LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
  46. cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .; \
  47. cp -fa "$$RPM_BUILD_DIR"/RPMS/* .; \
  48. rm -rf "$$RPM_BUILD_DIR"; \
  49. echo "RPM build finished"; \
  50. #end of dist-rpm
  51. dist: check
  52. doxygen:
  53. doxygen && cd doc/doxygen/latex && make
  54. test: all
  55. ./src/test/test
  56. # Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
  57. # Chutney can be cloned from https://git.torproject.org/chutney.git .
  58. test-network: all
  59. ./src/test/test-network.sh
  60. reset-gcov:
  61. rm -f src/*/*.gcda
  62. HTML_COVER_DIR=./coverage_html
  63. coverage-html: all
  64. test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
  65. test -d "$(HTML_COVER_DIR)" || mkdir -p "$(HTML_COVER_DIR)"
  66. lcov --rc lcov_branch_coverage=1 --directory ./src --zerocounters
  67. $(MAKE) reset-gcov
  68. $(MAKE) check
  69. lcov --capture --rc lcov_branch_coverage=1 --no-external --directory . --output-file "$(HTML_COVER_DIR)/lcov.tmp"
  70. lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
  71. genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
  72. # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
  73. # eventdns.[hc], tinytest*.[ch]
  74. check-spaces:
  75. ./scripts/maint/checkSpace.pl -C \
  76. src/common/*.[ch] \
  77. src/or/*.[ch] \
  78. src/test/*.[ch] \
  79. src/tools/*.[ch] \
  80. src/tools/tor-fw-helper/*.[ch]
  81. check-docs:
  82. ./scripts/maint/checkOptionDocs.pl
  83. check-logs:
  84. ./scripts/maint/checkLogs.pl \
  85. src/*/*.[ch] | sort -n
  86. version:
  87. @echo "Tor @VERSION@"
  88. @if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
  89. echo -n "git: " ;\
  90. (cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
  91. fi
  92. mostlyclean-local:
  93. rm -f src/*/*.gc{da,no}