chiark / gitweb /
Makefile: Update the `auto.py' symlink correctly.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 8 Mar 2013 02:53:11 +0000 (02:53 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 Mar 2013 02:54:15 +0000 (02:54 +0000)
Makefile

index 9cedd7f13e4a27f1392bc6f4033dce765195783e..a19c84619b0a15a860da1e09779568f6642405aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -79,16 +79,16 @@ CLEANFILES           = *.pyc
 
 TARGETS                        += auto.py auto-$(VERSION).py
 
-auto-$(VERSION).py: Makefile get-version $(SOURCES)
+auto-$(VERSION).py: Makefile get-version $(SOURCES) $(wildcard RELEASE)
        { echo "### -*-python-*-"; \
          echo "PACKAGE = '$(PACKAGE)'"; \
          echo "VERSION = '$(VERSION)'"; \
          echo "HOME = '$$(pwd)'"; \
        } >$@.new
        mv $@.new $@
-       rm -f auto.py.new && ln -s $@ auto.py.new && mv auto.py.new auto.py
 
 auto.py: auto-$(VERSION).py
+       rm -f auto.py.new && ln -s $^ auto.py.new && mv auto.py.new auto.py
        for i in auto-*.py; do \
          case $$i in auto-$(VERSION).py) ;; *) rm -f $$i ;; esac; \
        done