summaryrefslogtreecommitdiff
path: root/src/or/Makefile.am
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2011-09-07 18:04:45 +0200
committerNick Mathewson <nickm@torproject.org>2011-11-24 23:56:01 -0500
commit86be8fcf0a1d979c50452d681e5090418d444987 (patch)
tree664d5880b6a6df9b26c52bf6015de70425d5812d /src/or/Makefile.am
parent916aa8022d8bafac86966b71fb5b43f20cf91ccd (diff)
downloadtor-86be8fcf0a1d979c50452d681e5090418d444987.tar.gz
tor-86be8fcf0a1d979c50452d681e5090418d444987.zip
Handle build-trees better.
Properly create git revision and source file sha1sums include files when building tor not in its source tree but in a dedicated build tree.
Diffstat (limited to 'src/or/Makefile.am')
-rw-r--r--src/or/Makefile.am9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index 67adf504df..a5682081ae 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -126,8 +126,9 @@ tor_main.o: micro-revision.i
micro-revision.i: FORCE
@rm -f micro-revision.tmp; \
- if test -d ../../.git && test -x "`which git 2>&1;true`"; then \
- HASH="`git rev-parse --short=16 HEAD`"; \
+ 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 \
@@ -141,10 +142,10 @@ micro-revision.i: FORCE
or_sha1.i: $(tor_SOURCES) $(libtor_a_SOURCES)
if test "@SHA1SUM@" != none; then \
- @SHA1SUM@ $(tor_SOURCES) $(libtor_a_SOURCES) | \
+ (cd "$(srcdir)" && @SHA1SUM@ $(tor_SOURCES) $(libtor_a_SOURCES)) | \
@SED@ -n 's/^\(.*\)$$/"\1\\n"/p' > or_sha1.i; \
elif test "@OPENSSL@" != none; then \
- @OPENSSL@ sha1 $(tor_SOURCES) $(libtor_a_SOURCES) | \
+ (cd "$(srcdir)" && @OPENSSL@ sha1 $(tor_SOURCES) $(libtor_a_SOURCES)) | \
@SED@ -n 's/SHA1(\(.*\))= \(.*\)/"\2 \1\\n"/p' > or_sha1.i; \
else \
rm or_sha1.i; \