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