2006-02-09 06:46:49 +01:00
|
|
|
# Copyright (c) 2001-2004, Roger Dingledine
|
2008-02-07 06:31:47 +01:00
|
|
|
# Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
|
2015-01-02 20:27:39 +01:00
|
|
|
# Copyright (c) 2007-2015, The Tor Project, Inc.
|
2005-04-01 22:15:56 +02:00
|
|
|
# See LICENSE for licensing information
|
|
|
|
|
2010-10-01 06:01:08 +02:00
|
|
|
# "foreign" means we don't follow GNU package layout standards
|
2012-08-24 16:29:05 +02:00
|
|
|
# 1.9 means we require automake vesion 1.9
|
|
|
|
AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects
|
2002-06-29 01:26:42 +02:00
|
|
|
|
2013-02-07 22:23:48 +01:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2012-08-02 15:31:43 +02:00
|
|
|
noinst_LIBRARIES=
|
|
|
|
EXTRA_DIST=
|
|
|
|
noinst_HEADERS=
|
|
|
|
bin_PROGRAMS=
|
|
|
|
CLEANFILES=
|
|
|
|
TESTS=
|
|
|
|
noinst_PROGRAMS=
|
|
|
|
DISTCLEANFILES=
|
|
|
|
bin_SCRIPTS=
|
2012-08-27 16:00:22 +02:00
|
|
|
AM_CPPFLAGS=
|
2015-01-10 23:21:11 +01:00
|
|
|
AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@
|
2012-08-02 15:31:43 +02:00
|
|
|
include src/include.am
|
|
|
|
include doc/include.am
|
|
|
|
include contrib/include.am
|
2002-06-29 01:26:42 +02:00
|
|
|
|
2012-08-02 15:31:43 +02:00
|
|
|
EXTRA_DIST+= \
|
2010-11-11 20:22:48 +01:00
|
|
|
ChangeLog \
|
|
|
|
INSTALL \
|
|
|
|
LICENSE \
|
2011-08-01 18:36:59 +02:00
|
|
|
Makefile.nmake \
|
2010-11-11 20:22:48 +01:00
|
|
|
README \
|
2012-09-07 20:46:03 +02:00
|
|
|
ReleaseNotes
|
2002-07-22 06:07:34 +02:00
|
|
|
|
2013-07-09 18:37:11 +02:00
|
|
|
if COVERAGE_ENABLED
|
|
|
|
TEST_CFLAGS=-fno-inline -fprofile-arcs -ftest-coverage
|
|
|
|
else
|
|
|
|
TEST_CFLAGS=
|
|
|
|
endif
|
|
|
|
|
2003-10-22 06:33:11 +02:00
|
|
|
#install-data-local:
|
|
|
|
# $(INSTALL) -m 755 -d $(LOCALSTATEDIR)/lib/tor
|
2004-03-02 20:09:30 +01:00
|
|
|
|
2012-06-16 18:38:14 +02:00
|
|
|
# Allows to override rpmbuild with rpmbuild-md5 from fedora-packager so that
|
|
|
|
# building for EL5 won't fail on https://bugzilla.redhat.com/show_bug.cgi?id=490613
|
|
|
|
RPMBUILD ?= rpmbuild
|
|
|
|
|
2012-06-15 23:59:35 +02:00
|
|
|
# Use automake's dist-gzip target to build the tarball
|
|
|
|
dist-rpm: dist-gzip
|
|
|
|
TIMESTAMP=$$(date +"%Y-%m-%d_%H.%M.%S"); \
|
|
|
|
RPM_BUILD_DIR=$$(mktemp -d "/tmp/tor-rpm-build-$$TIMESTAMP-XXXX"); \
|
|
|
|
mkdir -p "$$RPM_BUILD_DIR"/{BUILD,RPMS,SOURCES/"tor-$(VERSION)",SPECS,SRPMS}; \
|
|
|
|
cp -fa "$(distdir).tar.gz" "$$RPM_BUILD_DIR"/SOURCES/; \
|
2012-06-16 18:38:14 +02:00
|
|
|
LIBS=-lrt $(RPMBUILD) -ba --define "_topdir $$RPM_BUILD_DIR" tor.spec; \
|
2012-06-15 23:59:35 +02:00
|
|
|
cp -fa "$$RPM_BUILD_DIR"/SRPMS/* .; \
|
|
|
|
cp -fa "$$RPM_BUILD_DIR"/RPMS/* .; \
|
|
|
|
rm -rf "$$RPM_BUILD_DIR"; \
|
|
|
|
echo "RPM build finished"; \
|
|
|
|
#end of dist-rpm
|
2004-05-07 19:03:52 +02:00
|
|
|
|
2008-06-04 20:41:32 +02:00
|
|
|
dist: check
|
|
|
|
|
2004-05-07 19:03:52 +02:00
|
|
|
doxygen:
|
2004-11-04 16:17:22 +01:00
|
|
|
doxygen && cd doc/doxygen/latex && make
|
2004-11-09 21:04:00 +01:00
|
|
|
|
2009-09-22 19:57:00 +02:00
|
|
|
test: all
|
2009-09-22 18:31:15 +02:00
|
|
|
./src/test/test
|
2006-10-08 05:17:24 +02:00
|
|
|
|
2013-06-05 15:48:57 +02:00
|
|
|
# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
|
|
|
|
# Chutney can be cloned from https://git.torproject.org/chutney.git .
|
2013-06-05 15:48:57 +02:00
|
|
|
test-network: all
|
|
|
|
./src/test/test-network.sh
|
|
|
|
|
2015-01-05 17:52:36 +01:00
|
|
|
test-stem: $(TESTING_TOR_BINARY)
|
|
|
|
@if test -d "$$STEM_SOURCE_DIR"; then \
|
2015-02-26 10:38:09 +01:00
|
|
|
$(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL; \
|
2015-01-05 17:52:36 +01:00
|
|
|
else \
|
|
|
|
echo '$$STEM_SOURCE_DIR was not set.'; echo; \
|
|
|
|
echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-07-16 07:33:39 +02:00
|
|
|
reset-gcov:
|
2015-01-06 15:01:59 +01:00
|
|
|
rm -f src/*/*.gcda src/*/*/*.gcda
|
2013-07-16 07:33:39 +02:00
|
|
|
|
2014-07-09 10:37:32 +02:00
|
|
|
HTML_COVER_DIR=./coverage_html
|
|
|
|
coverage-html: all
|
2014-07-16 12:01:18 +02:00
|
|
|
test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
|
|
|
|
test -d "$(HTML_COVER_DIR)" || mkdir -p "$(HTML_COVER_DIR)"
|
2014-07-09 10:37:32 +02:00
|
|
|
lcov --rc lcov_branch_coverage=1 --directory ./src --zerocounters
|
2014-07-16 12:01:18 +02:00
|
|
|
$(MAKE) reset-gcov
|
|
|
|
$(MAKE) check
|
2014-07-09 10:37:32 +02:00
|
|
|
lcov --capture --rc lcov_branch_coverage=1 --no-external --directory . --output-file "$(HTML_COVER_DIR)/lcov.tmp"
|
|
|
|
lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
|
|
|
|
genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
|
|
|
|
|
2009-10-17 15:12:40 +02:00
|
|
|
# Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
|
2010-07-26 05:51:15 +02:00
|
|
|
# eventdns.[hc], tinytest*.[ch]
|
2004-11-09 21:04:00 +01:00
|
|
|
check-spaces:
|
2014-04-28 17:59:55 +02:00
|
|
|
./scripts/maint/checkSpace.pl -C \
|
2012-10-12 23:16:20 +02:00
|
|
|
src/common/*.[ch] \
|
|
|
|
src/or/*.[ch] \
|
|
|
|
src/test/*.[ch] \
|
2012-06-28 17:04:52 +02:00
|
|
|
src/tools/*.[ch] \
|
2010-04-17 02:45:12 +02:00
|
|
|
src/tools/tor-fw-helper/*.[ch]
|
2004-11-09 21:04:00 +01:00
|
|
|
|
2006-12-20 18:05:48 +01:00
|
|
|
check-docs:
|
2014-04-28 17:59:55 +02:00
|
|
|
./scripts/maint/checkOptionDocs.pl
|
2006-12-20 18:05:48 +01:00
|
|
|
|
2006-09-30 00:33:28 +02:00
|
|
|
check-logs:
|
2014-04-28 17:59:55 +02:00
|
|
|
./scripts/maint/checkLogs.pl \
|
2006-09-30 00:33:28 +02:00
|
|
|
src/*/*.[ch] | sort -n
|
2006-10-08 05:17:24 +02:00
|
|
|
|
2015-03-06 11:56:57 +01:00
|
|
|
.PHONY: check-changes
|
|
|
|
check-changes:
|
|
|
|
@if test -d "$(top_srcdir)/changes"; then \
|
|
|
|
$(PYTHON) $(top_srcdir)/scripts/maint/lintChanges.py $(top_srcdir)/changes/*; \
|
|
|
|
fi
|
|
|
|
|
2011-11-25 05:53:18 +01:00
|
|
|
version:
|
|
|
|
@echo "Tor @VERSION@"
|
|
|
|
@if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
|
|
|
|
echo -n "git: " ;\
|
|
|
|
(cd "$(top_srcdir)" && git rev-parse --short=16 HEAD); \
|
|
|
|
fi
|
|
|
|
|
2013-07-09 18:37:11 +02:00
|
|
|
mostlyclean-local:
|
2015-01-06 15:01:59 +01:00
|
|
|
rm -f src/*/*.gc{da,no} src/*/*/*.gc{da,no}
|