summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Doxyfile.in6
-rw-r--r--Makefile.am47
-rw-r--r--changes/bug150534
-rw-r--r--configure.ac8
-rw-r--r--doc/include.am4
-rw-r--r--[-rwxr-xr-x]scripts/maint/checkOptionDocs.pl.in (renamed from scripts/maint/checkOptionDocs.pl)8
-rwxr-xr-xscripts/maint/updateVersions.pl.in (renamed from scripts/maint/updateVersions.pl)6
-rw-r--r--src/common/crypto.c4
-rw-r--r--src/common/include.am6
-rw-r--r--src/common/tortls.c4
-rw-r--r--src/ext/eventdns.c2
-rw-r--r--src/or/buffers.c4
-rw-r--r--src/or/dns.c2
-rw-r--r--src/or/include.am43
-rw-r--r--src/or/main.c2
-rw-r--r--src/or/or.h2
-rw-r--r--src/or/routerlist.c2
-rw-r--r--src/test/include.am10
-rw-r--r--src/tools/tor-checkkey.c2
-rw-r--r--src/tools/tor-gencert.c4
-rw-r--r--src/tools/tor-resolve.c4
22 files changed, 98 insertions, 80 deletions
diff --git a/.gitignore b/.gitignore
index 0cdf2c4e61..b31a7132d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -110,6 +110,10 @@ cscope.*
/doc/spec/Makefile
/doc/spec/Makefile.in
+# /scripts
+/scripts/maint/checkOptionDocs.pl
+/scripts/maint/updateVersions.pl
+
# /src/
/src/Makefile
/src/Makefile.in
diff --git a/Doxyfile.in b/Doxyfile.in
index 344ee27149..a39348f2cb 100644
--- a/Doxyfile.in
+++ b/Doxyfile.in
@@ -38,7 +38,7 @@ PROJECT_NUMBER = @VERSION@
# 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
@@ -534,8 +534,8 @@ WARN_LOGFILE =
# 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
diff --git a/Makefile.am b/Makefile.am
index 03dff91b53..1c2d2c1909 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,6 +20,7 @@ DISTCLEANFILES=
bin_SCRIPTS=
AM_CPPFLAGS=
AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@
+SHELL = @SHELL@
include src/include.am
include doc/include.am
include contrib/include.am
@@ -64,12 +65,12 @@ doxygen:
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 \
@@ -81,35 +82,39 @@ test-stem: $(TESTING_TOR_BINARY)
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
+if COVERAGE_ENABLED
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"
+else
+ @printf "Not configured with --enable-coverage, run ./configure --enable-coverage\n"
+endif
# 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
+check-docs: all
+ $(PERL) $(top_builddir)/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:
@@ -117,6 +122,10 @@ check-changes:
$(PYTHON) $(top_srcdir)/scripts/maint/lintChanges.py $(top_srcdir)/changes/*; \
fi
+.PHONY: update-versions
+update-versions:
+ $(PERL) $(top_builddir)/scripts/maint/updateVersions.pl
+
version:
@echo "Tor @VERSION@"
@if test -d "$(top_srcdir)/.git" && test -x "`which git 2>&1;true`"; then \
@@ -125,4 +134,6 @@ version:
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
diff --git a/changes/bug15053 b/changes/bug15053
new file mode 100644
index 0000000000..5dde9d7a97
--- /dev/null
+++ b/changes/bug15053
@@ -0,0 +1,4 @@
+ o Minor bugfixes (build):
+ - Improve out-of-tree builds by making non-standard rules work and clean up
+ additional files and directories. Fixes bug 15053; bugfix on
+ 0.2.7.0-alpha.
diff --git a/configure.ac b/configure.ac
index 143cb722fa..610a431129 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,6 +215,8 @@ AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_RANLIB
+AC_PATH_PROG([PERL], [perl])
+
dnl autoconf 2.59 appears not to support AC_PROG_SED
AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
@@ -1661,6 +1663,8 @@ AC_CONFIG_FILES([
contrib/dist/tor.service
src/config/torrc.sample
src/config/torrc.minimal
+ scripts/maint/checkOptionDocs.pl
+ scripts/maint/updateVersions.pl
])
if test x$asciidoc = xtrue && test "$ASCIIDOC" = "none" ; then
@@ -1682,7 +1686,3 @@ if test x$asciidoc = xtrue && test "$ASCIIDOC" = "none" ; then
fi
AC_OUTPUT
-
-if test -x /usr/bin/perl && test -x ./scripts/maint/updateVersions.pl ; then
- ./scripts/maint/updateVersions.pl
-fi
diff --git a/doc/include.am b/doc/include.am
index 30d3e20d83..783aa95c4e 100644
--- a/doc/include.am
+++ b/doc/include.am
@@ -64,14 +64,14 @@ doc/tor-gencert.html.in: doc/tor-gencert.1.txt
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
diff --git a/scripts/maint/checkOptionDocs.pl b/scripts/maint/checkOptionDocs.pl.in
index 94307c6cef..1f53adf099 100755..100644
--- a/scripts/maint/checkOptionDocs.pl
+++ b/scripts/maint/checkOptionDocs.pl.in
@@ -7,7 +7,7 @@ my %torrcSampleOptions = ();
my %manPageOptions = ();
# Load the canonical list as actually accepted by Tor.
-open(F, "./src/or/tor --list-torrc-options |") or die;
+open(F, "@abs_top_builddir@/src/or/tor --list-torrc-options |") or die;
while (<F>) {
next if m!\[notice\] Tor v0\.!;
if (m!^([A-Za-z0-9_]+)!) {
@@ -34,12 +34,12 @@ sub loadTorrc {
0;
}
-loadTorrc("./src/config/torrc.sample.in", \%torrcSampleOptions);
+loadTorrc("@abs_top_srcdir@/src/config/torrc.sample.in", \%torrcSampleOptions);
# Try to figure out what's in the man page.
my $considerNextLine = 0;
-open(F, "./doc/tor.1.txt") or die;
+open(F, "@abs_top_srcdir@/doc/tor.1.txt") or die;
while (<F>) {
if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*!) {
$manPageOptions{$2} = 1;
@@ -67,5 +67,3 @@ subtractHashes("Orphaned in torrc.sample.in", \%torrcSampleOptions, \%options);
subtractHashes("Not in man page", \%options, \%manPageOptions);
subtractHashes("Orphaned in man page", \%manPageOptions, \%options);
-
-
diff --git a/scripts/maint/updateVersions.pl b/scripts/maint/updateVersions.pl.in
index 15c83b80a7..65c51a1f2d 100755
--- a/scripts/maint/updateVersions.pl
+++ b/scripts/maint/updateVersions.pl.in
@@ -1,8 +1,8 @@
#!/usr/bin/perl -w
-$CONFIGURE_IN = './configure.ac';
-$ORCONFIG_H = './src/win32/orconfig.h';
-$TOR_NSI = './contrib/win32build/tor-mingw.nsi.in';
+$CONFIGURE_IN = '@abs_top_srcdir@/configure.ac';
+$ORCONFIG_H = '@abs_top_srcdir@/src/win32/orconfig.h';
+$TOR_NSI = '@abs_top_srcdir@/contrib/win32build/tor-mingw.nsi.in';
$quiet = 1;
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 218c7bea1e..91c4025ac2 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -51,9 +51,9 @@
#define CRYPTO_PRIVATE
#include "crypto.h"
-#include "../common/torlog.h"
+#include "torlog.h"
#include "aes.h"
-#include "../common/util.h"
+#include "util.h"
#include "container.h"
#include "compat.h"
#include "sandbox.h"
diff --git a/src/common/include.am b/src/common/include.am
index 5417cca5d8..ec4893594b 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -11,9 +11,7 @@ noinst_LIBRARIES += \
src/common/libor-event-testing.a
endif
-EXTRA_DIST+= \
- src/common/common_sha1.i \
- src/common/Makefile.nmake
+EXTRA_DIST += src/common/Makefile.nmake
#CFLAGS = -Wall -Wpointer-arith -O2
AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common -I$(srcdir)/src/ext/trunnel -I$(srcdir)/src/trunnel
@@ -135,7 +133,7 @@ COMMONHEADERS = \
noinst_HEADERS+= $(COMMONHEADERS)
-DISTCLEANFILES+= src/common/common_sha1.i
+CLEANFILES+= src/common/common_sha1.i
src/common/common_sha1.i: $(libor_SOURCES) $(libor_crypto_a_SOURCES) $(COMMONHEADERS)
$(AM_V_GEN)if test "@SHA1SUM@" != none; then \
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 97a82bf6e1..32106eb2df 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -789,7 +789,7 @@ const char UNRESTRICTED_SERVER_CIPHER_LIST[] =
/** List of ciphers that clients should advertise, omitting items that
* our OpenSSL doesn't know about. */
static const char CLIENT_CIPHER_LIST[] =
-#include "./ciphers.inc"
+#include "ciphers.inc"
/* Tell it not to use SSLv2 ciphers, so that it can select an SSLv3 version
* of any cipher we say. */
"!SSLv2"
@@ -804,7 +804,7 @@ typedef struct cipher_info_t { unsigned id; const char *name; } cipher_info_t;
static const cipher_info_t CLIENT_CIPHER_INFO_LIST[] = {
#define CIPHER(id, name) { id, name },
#define XCIPHER(id, name) { id, #name },
-#include "./ciphers.inc"
+#include "ciphers.inc"
#undef CIPHER
#undef XCIPHER
};
diff --git a/src/ext/eventdns.c b/src/ext/eventdns.c
index 2b2988f1ec..a0c7ff29fa 100644
--- a/src/ext/eventdns.c
+++ b/src/ext/eventdns.c
@@ -37,7 +37,7 @@
*/
#include "eventdns_tor.h"
-#include "../common/util.h"
+#include "util.h"
#include <sys/types.h>
/* #define NDEBUG */
diff --git a/src/or/buffers.c b/src/or/buffers.c
index be9974418d..8ef3279fde 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -20,8 +20,8 @@
#include "control.h"
#include "reasons.h"
#include "ext_orport.h"
-#include "../common/util.h"
-#include "../common/torlog.h"
+#include "util.h"
+#include "torlog.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/src/or/dns.c b/src/or/dns.c
index cc4a169422..db77d20783 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -24,7 +24,7 @@
#include "relay.h"
#include "router.h"
#include "ht.h"
-#include "../common/sandbox.h"
+#include "sandbox.h"
#ifdef HAVE_EVENT2_DNS_H
#include <event2/event.h>
#include <event2/dns.h>
diff --git a/src/or/include.am b/src/or/include.am
index b44e1099dc..92980932d1 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -15,7 +15,7 @@ else
tor_platform_source=
endif
-EXTRA_DIST+= src/or/ntmain.c src/or/or_sha1.i src/or/Makefile.nmake
+EXTRA_DIST+= src/or/ntmain.c src/or/Makefile.nmake
if USE_EXTERNAL_EVDNS
evdns_source=
@@ -85,8 +85,9 @@ LIBTOR_A_SOURCES = \
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
@@ -123,9 +124,9 @@ src_or_tor_cov_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \
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 = \
@@ -192,20 +193,22 @@ noinst_HEADERS+= $(ORHEADERS) micro-revision.i
src/or/config_codedigest.o: src/or/or_sha1.i
micro-revision.i: FORCE
- @rm -f micro-revision.tmp; \
- if test -d "$(top_srcdir)/.git" && \
- test -x "`which git 2>&1;true`"; then \
- HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
- echo \"$$HASH\" > micro-revision.tmp; \
- fi; \
- if test ! -f micro-revision.tmp ; then \
- if test ! -f micro-revision.i ; then \
- echo '""' > micro-revision.i; \
- fi; \
- elif test ! -f micro-revision.i || \
- test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
- mv micro-revision.tmp micro-revision.i; \
- fi; true
+ $(AM_V_GEN)rm -f micro-revision.tmp; \
+ if test -d "$(top_srcdir)/.git" && \
+ test -x "`which git 2>&1;true`"; then \
+ HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
+ echo \"$$HASH\" > micro-revision.tmp; \
+ fi; \
+ if test ! -f micro-revision.tmp; then \
+ if test ! -f micro-revision.i; then \
+ echo '""' > micro-revision.i; \
+ fi; \
+ elif test ! -f micro-revision.i || \
+ test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
+ mv micro-revision.tmp micro-revision.i; \
+ fi; \
+ rm -f micro-revision.tmp; \
+ true
src/or/or_sha1.i: $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)
$(AM_V_GEN)if test "@SHA1SUM@" != none; then \
@@ -219,6 +222,6 @@ src/or/or_sha1.i: $(src_or_tor_SOURCES) $(src_or_libtor_a_SOURCES) $(ORHEADERS)
touch src/or/or_sha1.i; \
fi
-CLEANFILES+= micro-revision.i src/or/micro-revision.i
+CLEANFILES+= src/or/or_sha1.i micro-revision.i src/or/micro-revision.i micro-revision.tmp
FORCE:
diff --git a/src/or/main.c b/src/or/main.c
index ddb4529904..a816fad2bb 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -63,7 +63,7 @@
#include <openssl/crypto.h>
#endif
#include "memarea.h"
-#include "../common/sandbox.h"
+#include "sandbox.h"
#ifdef HAVE_EVENT2_EVENT_H
#include <event2/event.h>
diff --git a/src/or/or.h b/src/or/or.h
index 6723f93f77..f75e776730 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -88,7 +88,7 @@
#include "crypto.h"
#include "tortls.h"
-#include "../common/torlog.h"
+#include "torlog.h"
#include "container.h"
#include "torgzip.h"
#include "address.h"
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index f4f6200bbc..98c3bb1831 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -37,7 +37,7 @@
#include "routerlist.h"
#include "routerparse.h"
#include "routerset.h"
-#include "../common/sandbox.h"
+#include "sandbox.h"
// #define DEBUG_ROUTERLIST
/****************************************************************************/
diff --git a/src/test/include.am b/src/test/include.am
index 369bc1a77a..c56e887ca0 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -140,9 +140,9 @@ src_test_test_ntor_cl_AM_CPPFLAGS = \
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
@@ -158,10 +158,10 @@ check-local: $(NTOR_TEST_DEPS) $(CMDLINE_TEST_TOR)
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 \
diff --git a/src/tools/tor-checkkey.c b/src/tools/tor-checkkey.c
index e404b682cf..ed68bdf52c 100644
--- a/src/tools/tor-checkkey.c
+++ b/src/tools/tor-checkkey.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include "crypto.h"
#include "torlog.h"
-#include "../common/util.h"
+#include "util.h"
#include "compat.h"
#include <openssl/bn.h>
#include <openssl/rsa.h>
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c
index c599822e07..5ae155609a 100644
--- a/src/tools/tor-gencert.c
+++ b/src/tools/tor-gencert.c
@@ -28,8 +28,8 @@
#endif
#include "compat.h"
-#include "../common/util.h"
-#include "../common/torlog.h"
+#include "util.h"
+#include "torlog.h"
#include "crypto.h"
#include "address.h"
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index 04815a63f7..19e3a554fa 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -5,9 +5,9 @@
#include "orconfig.h"
#include "compat.h"
-#include "../common/util.h"
+#include "util.h"
#include "address.h"
-#include "../common/torlog.h"
+#include "torlog.h"
#include "sandbox.h"
#include <stdio.h>