diff options
author | cypherpunks <cypherpunks@torproject.org> | 2015-02-25 16:04:02 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-03-14 13:00:04 -0400 |
commit | 7a86d53deef573e110da9af35c9283349942c962 (patch) | |
tree | a112464cc7e63e3034283319c1209177396f4281 | |
parent | 17cbc4350f1b840c7f4878808c9610f7a7936592 (diff) | |
download | tor-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.
-rw-r--r-- | src/common/include.am | 2 | ||||
-rw-r--r-- | src/or/include.am | 32 |
2 files changed, 18 insertions, 16 deletions
diff --git a/src/common/include.am b/src/common/include.am index 5b63392541..cad0fe1b54 100644 --- a/src/common/include.am +++ b/src/common/include.am @@ -133,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/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: |