chiark / gitweb /
Makefile fix dependency generation after .tmp change
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 Sep 2012 17:29:35 +0000 (18:29 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 Sep 2012 17:29:35 +0000 (18:29 +0100)
Makefile

index 1751058..b5d73e6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,8 +19,11 @@ default:
 -include .*.d
 
 %.stl:         %.scad
-               openscad -d .$@.d -o $*.tmp.stl $<
-               @mv -f $*.tmp.stl $@
+               openscad -d .$@.d.tmp -o $*.tmp.stl $<
+               @rm -f $@
+               @sed -e 's/\.tmp\.stl:/.stl:/' <.$@.d.tmp >.$@.d
+               @rm .$@.d.tmp
+               mv -f $*.tmp.stl $@
 
 %.gcode:       $(CONFIG) %.stl
                $(SLIC3R) --load $^ --output $@.tmp