# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = ./doc/doxygen
+OUTPUT_DIRECTORY = @top_builddir@/doc/doxygen
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = src/common \
- src/or
+INPUT = @top_srcdir@/src/common \
+ @top_srcdir@/src/or
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
bin_SCRIPTS=
AM_CPPFLAGS=
AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@
+SHELL = @SHELL@
include src/include.am
include doc/include.am
include contrib/include.am
doxygen && cd doc/doxygen/latex && make
test: all
- ./src/test/test
+ $(top_builddir)/src/test/test
# Note that test-network requires a copy of Chutney in $CHUTNEY_PATH.
# Chutney can be cloned from https://git.torproject.org/chutney.git .
test-network: all
- ./src/test/test-network.sh
+ $(top_srcdir)/src/test/test-network.sh
test-stem: $(TESTING_TOR_BINARY)
@if test -d "$$STEM_SOURCE_DIR"; then \
reset-gcov:
- rm -f src/*/*.gcda src/*/*/*.gcda
+ rm -f $(top_builddir)/src/*/*.gcda $(top_builddir)/src/*/*/*.gcda
-HTML_COVER_DIR=./coverage_html
+HTML_COVER_DIR=$(top_builddir)/coverage_html
coverage-html: all
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)"
- lcov --rc lcov_branch_coverage=1 --directory ./src --zerocounters
+ test -d "$(HTML_COVER_DIR)" || $(MKDIR_P) "$(HTML_COVER_DIR)"
+ lcov --rc lcov_branch_coverage=1 --directory $(top_builddir)/src --zerocounters
$(MAKE) reset-gcov
$(MAKE) check
- lcov --capture --rc lcov_branch_coverage=1 --no-external --directory . --output-file "$(HTML_COVER_DIR)/lcov.tmp"
+ lcov --capture --rc lcov_branch_coverage=1 --no-external --directory $(top_builddir) --base-directory $(top_srcdir) --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"
# Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
# eventdns.[hc], tinytest*.[ch]
check-spaces:
- ./scripts/maint/checkSpace.pl -C \
- src/common/*.[ch] \
- src/or/*.[ch] \
- src/test/*.[ch] \
- src/tools/*.[ch] \
- src/tools/tor-fw-helper/*.[ch]
+ $(top_srcdir)/scripts/maint/checkSpace.pl -C \
+ $(top_srcdir)/src/common/*.[ch] \
+ $(top_srcdir)/src/or/*.[ch] \
+ $(top_srcdir)/src/test/*.[ch] \
+ $(top_srcdir)/src/tools/*.[ch] \
+ $(top_srcdir)/src/tools/tor-fw-helper/*.[ch]
check-docs:
- ./scripts/maint/checkOptionDocs.pl
+ $(top_srcdir)/scripts/maint/checkOptionDocs.pl
check-logs:
- ./scripts/maint/checkLogs.pl \
- src/*/*.[ch] | sort -n
+ $(top_srcdir)/scripts/maint/checkLogs.pl \
+ $(top_srcdir)/src/*/*.[ch] | sort -n
.PHONY: check-changes
check-changes:
fi
mostlyclean-local:
- rm -f src/*/*.gc{da,no} src/*/*/*.gc{da,no}
+ rm -f $(top_builddir)/src/*/*.gc{da,no} $(top_builddir)/src/*/*/*.gc{da,no}
+ rm -rf $(HTML_COVER_DIR)
+ rm -rf $(top_builddir)/doc/doxygen
doc/tor-resolve.html.in: doc/tor-resolve.1.txt
doc/tor-fw-helper.html.in: doc/tor-fw-helper.1.txt
-# use ../config.status to swap all machine-specific magic strings
+# use config.status to swap all machine-specific magic strings
# in the asciidoc with their replacements.
$(asciidoc_product) :
$(AM_V_GEN)$(MKDIR_P) $(@D)
$(AM_V_at)if test -e $(top_srcdir)/$@.in && ! test -e $@.in ; then \
cp $(top_srcdir)/$@.in $@; \
fi
- $(AM_V_at)./config.status -q --file=$@;
+ $(AM_V_at)$(top_builddir)/config.status -q --file=$@;
doc/tor.html: doc/tor.html.in
doc/tor-gencert.html: doc/tor-gencert.html.in
src_or_libtor_a_SOURCES = $(LIBTOR_A_SOURCES)
src_or_libtor_testing_a_SOURCES = $(LIBTOR_A_SOURCES)
-#libtor_a_LIBADD = ../common/libor.a ../common/libor-crypto.a \
-# ../common/libor-event.a
+#libtor_a_LIBADD = $(top_builddir)/common/libor.a \
+# $(top_builddir)/common/libor-crypto.a \
+# $(top_builddir)/common/libor-event.a
src_or_tor_SOURCES = src/or/tor_main.c
src/common/libor-event-testing.a \
@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
@TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@
-TESTING_TOR_BINARY = ./src/or/tor-cov
+TESTING_TOR_BINARY = $(top_builddir)/src/or/tor-cov
else
-TESTING_TOR_BINARY = ./src/or/tor
+TESTING_TOR_BINARY = $(top_builddir)/src/or/tor
endif
ORHEADERS = \
NTOR_TEST_DEPS=src/test/test-ntor-cl
if COVERAGE_ENABLED
-CMDLINE_TEST_TOR = ./src/or/tor-cov
+CMDLINE_TEST_TOR = $(top_builddir)/src/or/tor-cov
else
-CMDLINE_TEST_TOR = ./src/or/tor
+CMDLINE_TEST_TOR = $(top_builddir)/src/or/tor
endif
noinst_PROGRAMS += src/test/test-bt-cl
if USEPYTHON
$(PYTHON) $(top_srcdir)/src/test/ntor_ref.py test-tor
$(PYTHON) $(top_srcdir)/src/test/ntor_ref.py self-test
- ./src/test/test-bt-cl assert | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
- ./src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
+ $(top_builddir)/src/test/test-bt-cl assert | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
+ $(top_builddir)/src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
endif
- $(top_srcdir)/src/test/zero_length_keys.sh
+ $(SHELL) $(top_srcdir)/src/test/zero_length_keys.sh
EXTRA_DIST += \
src/test/bt_test.py \