summaryrefslogtreecommitdiff
path: root/src/or/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/Makefile.am')
-rw-r--r--src/or/Makefile.am12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index 411c062faf..00939cf131 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -41,7 +41,7 @@ tor_main.o: micro-revision.i
micro-revision.i: FORCE
@if test -d ../../.svn -a x`which svn` != x ; then \
svn info ../.. | \
- sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.i \
+ sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.tmp \
|| true; \
else \
if test x`which svk` != x -a -d ~/.svk; then \
@@ -64,12 +64,16 @@ micro-revision.i: FORCE
fi; \
done; \
if test x$$rev != x; then \
- echo \"$$rev\" > micro-revision.i; \
+ echo \"$$rev\" > micro-revision.tmp; \
fi; \
fi; \
fi; \
- if test ! -f micro-revision.i; then \
- echo '""' > micro-revision.i; \
+ if test ! -f micro-revision.tmp; then \
+ echo '""' > micro-revision.tmp; \
+ fi; \
+ if test "`cat micro-revision.tmp`" != "`cat micro-revision.i`"; then \
+ mv micro-revision.tmp micro-revision.i; \
fi
+#Dummy target to ensure that micro-revision.i _always_ gets built.
FORCE: