chiark / gitweb /
cgi.py: Implement a wrapping operation.
[chopwood] / 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