aboutsummaryrefslogtreecommitdiff
path: root/src/or/include.am
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2015-02-25 16:04:02 +0100
committerNick Mathewson <nickm@torproject.org>2015-03-14 13:00:04 -0400
commit7a86d53deef573e110da9af35c9283349942c962 (patch)
treea112464cc7e63e3034283319c1209177396f4281 /src/or/include.am
parent17cbc4350f1b840c7f4878808c9610f7a7936592 (diff)
downloadtor-7a86d53deef573e110da9af35c9283349942c962.tar.gz
tor-7a86d53deef573e110da9af35c9283349942c962.zip
Clean up generated files.
Remove src/or/or_sha1.i and src/common/common_sha1.i on `make clean` and remove the temporary micro-revision file when its no longer needed. Additional changes; - show a message when generating the micro-revision file. - add the temporary micro revision file to the list of files to be removed on `make clean` just in case. - fix indentation of the make rule to improve readability.
Diffstat (limited to 'src/or/include.am')
-rw-r--r--src/or/include.am32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/or/include.am b/src/or/include.am
index 47746e22de..068519e1fb 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -193,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 \
@@ -220,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: