Makefile.am 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.7 means we require automake vesion 1.7
  7. AUTOMAKE_OPTIONS = foreign 1.7
  8. SUBDIRS = src doc contrib
  9. DIST_SUBDIRS = src doc contrib
  10. EXTRA_DIST = \
  11. ChangeLog \
  12. INSTALL \
  13. LICENSE \
  14. Makefile.nmake \
  15. README \
  16. ReleaseNotes \
  17. tor.spec \
  18. tor.spec.in
  19. #install-data-local:
  20. # $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
  21. # Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
  22. # building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
  23. RPMBUILD ?= rpmbuild
  24. # Use automake's dist-gzip target to build the tarball
  25. dist-rpm: dist-gzip
  26. TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S"); \
  27. RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX"); \
  28. mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
  29. cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/; \
  30. LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
  31. cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .; \
  32. cp -fa "$$RPM_BUILD_DIR"/RPMS/* .; \
  33. rm -rf "$$RPM_BUILD_DIR"; \
  34. echo "RPM build finished"; \
  35. #end of dist-rpm
  36. dist: check
  37. doxygen:
  38. doxygen && cd doc/doxygen/latex && make
  39. test: all
  40. ./src/test/test
  41. # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
  42. # eventdns.[hc], tinytest*.[ch]
  43. check-spaces:
  44. ./contrib/checkSpace.pl -C \
  45. src/common/*.h \
  46. src/common/[^asO]*.c \
  47. src/common/address.c \
  48. src/or/[^e]*.[ch] \
  49. src/or/eventdns_tor.h \
  50. src/test/test*.[ch] \
  51. src/test/[^t]*.[ch] \
  52. src/tools/*.[ch] \
  53. src/tools/tor-fw-helper/*.[ch]
  54. check-docs:
  55. ./contrib/checkOptionDocs.pl
  56. check-logs:
  57. ./contrib/checkLogs.pl \
  58. src/*/*.[ch] | sort -n
  59. version:
  60. @echo "Tor @VERSION@"
  61. @if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
  62. echo -n "git: " ;\
  63. (cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
  64. fi