Makefile.am 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright (c) 2001-2004, Roger Dingledine
  2. # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
  3. # Copyright (c) 2007-2010, The Tor Project, Inc.
  4. # See LICENSE for licensing information
  5. # "foreign" means we don't follow GNU package layout standards
  6. # 1.6 means we require automake vesion 1.6
  7. AUTOMAKE_OPTIONS = foreign 1.6
  8. SUBDIRS = src doc contrib
  9. DIST_SUBDIRS = src doc contrib
  10. EXTRA_DIST = INSTALL README LICENSE ChangeLog \
  11. ReleaseNotes tor.spec tor.spec.in
  12. #install-data-local:
  13. # $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
  14. # Assume a tarball is in .. for now.
  15. dist-rpm:
  16. RPM_BUILD_DIR="/tmp/tor-rpm-build-$$$$"; \
  17. rm -rf $$RPM_BUILD_DIR; \
  18. mkdir $$RPM_BUILD_DIR || exit 1; \
  19. for subdir in BUILD RPMS SOURCES SPECS SRPMS; do \
  20. mkdir $$RPM_BUILD_DIR/$$subdir; \
  21. done; \
  22. mkdir $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION); \
  23. cp -R ./ $$RPM_BUILD_DIR/SOURCES/tor-$(VERSION)/; \
  24. pushd $$RPM_BUILD_DIR/SOURCES/; \
  25. tar zcf tor-$(VERSION).tar.gz ./; \
  26. popd; \
  27. LIBS=-lrt rpmbuild -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
  28. mv $$RPM_BUILD_DIR/SRPMS/* .; \
  29. mv $$RPM_BUILD_DIR/RPMS/* .; \
  30. rm -rf $$RPM_BUILD_DIR
  31. dist-osx:
  32. @if [ "x$(prefix)" != 'x/Library/Tor' ]; then \
  33. echo "Configure with --prefix=/Library/Tor, please"; \
  34. exit 1; \
  35. fi; \
  36. if [ "x$(bindir)" != 'x/Library/Tor' ]; then \
  37. echo "Configure with --bindir=/Library/Tor, please"; \
  38. exit 1; \
  39. fi; \
  40. if [ "x$(sysconfdir)" != 'x/Library' ]; then \
  41. echo "Configure with --sysconfdir=/Library, please"; \
  42. exit 1; \
  43. fi; \
  44. if [ "x$(CONFDIR)" != 'x/Library/Tor' ]; then \
  45. echo "Configure with CONFDIR=/Library/Tor, please"; \
  46. fi
  47. $(MAKE) all
  48. VERSION=$(VERSION) sh ./contrib/osx/package.sh
  49. dist: check
  50. doxygen:
  51. doxygen && cd doc/doxygen/latex && make
  52. test: all
  53. ./src/test/test
  54. # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
  55. # eventdns.[hc], tinytest*.[ch]
  56. check-spaces:
  57. ./contrib/checkSpace.pl -C \
  58. src/common/*.h \
  59. src/common/[^asO]*.c src/common/address.c \
  60. src/or/[^e]*.[ch] src/or/eventdns_tor.h \
  61. src/test/test*.[ch] src/tools/*.[ch] \
  62. src/tools/tor-fw-helper/*.[ch]
  63. check-docs:
  64. ./contrib/checkOptionDocs.pl
  65. check-logs:
  66. ./contrib/checkLogs.pl \
  67. src/*/*.[ch] | sort -n