]> granicus.if.org Git - sudo/commitdiff
Mark ChangeLog as PHONY
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Oct 2010 13:36:01 +0000 (09:36 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Oct 2010 13:36:01 +0000 (09:36 -0400)
Don't overwrite ChangeLog if we can't run hg

Makefile.in

index 13af4366bb9dc56d04bb30de0cd4cba59207bc4a..1badcc56d19bda61a1daf5e5bda904f648956b88 100644 (file)
@@ -63,7 +63,13 @@ autoconf:
        autoconf -I m4
 
 ChangeLog:
-       (cd $(srcdir) && test -d .hg && hg log --style=changelog -b default > $@)
+       if test -d $(srcdir)/.hg && cd $(srcdir); then \
+           if hg log --style=changelog -b default > $@.tmp; then \
+               mv $@.tmp $@; \
+           else \
+               rm -f $@.tmp; \
+           fi; \
+       fi
 
 check:
        @echo nothing to check
@@ -119,3 +125,5 @@ cleandir: distclean
 clobber: distclean
 
 realclean: distclean
+
+.PHONY: ChangeLog