diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-05-01 13:48:49 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-05-01 13:48:49 +0000 |
commit | 0faaa16b0cb876d01f9267b047a642da477a0c52 (patch) | |
tree | 7e02eecd418eb0b7372f293d50cce27a7b43c9ca /src/or/Makefile.am | |
parent | d9f5f2cfa0cef479329f601b2ac35252c5200adb (diff) | |
download | tor-0faaa16b0cb876d01f9267b047a642da477a0c52.tar.gz tor-0faaa16b0cb876d01f9267b047a642da477a0c52.zip |
r12615@catbus: nickm | 2007-05-01 09:48:45 -0400
Only replace micro-revision.i if it changes.
svn:r10085
Diffstat (limited to 'src/or/Makefile.am')
-rw-r--r-- | src/or/Makefile.am | 12 |
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: |