From: Mark Wooding Date: Fri, 8 Mar 2013 02:53:11 +0000 (+0000) Subject: Makefile: Update the `auto.py' symlink correctly. X-Git-Tag: 1.0.0~35 X-Git-Url: https://git.distorted.org.uk/~mdw/chopwood/commitdiff_plain/ffd791dac34ccbaac654ee4f3b3fbe9dbf4bc97a Makefile: Update the `auto.py' symlink correctly. --- diff --git a/Makefile b/Makefile index 9cedd7f..a19c846 100644 --- 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