chiark / gitweb /
Makefile support out of tree
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Sep 2012 03:27:41 +0000 (04:27 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Sep 2012 03:27:41 +0000 (04:27 +0100)
Makefile

index b21432a..df8862d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,12 @@ HRR=/home/reprap
 SLIC3R=$(HRR)/Slic3r/bin/slic3r
 SKEINFORGE=python $(HRR)/reprappro-software.git/skeinforge/skeinforge_application/skeinforge_utilities/skeinforge_craft.py
 
+PLAY ?= .
+
 CONFIG=slic3r-config.ini
 
-AUTO_TOPLEVELS := $(foreach m, filamentspool, $(shell ./toplevel-find $m))
+USING_AUTOS ?= filamentspool
+AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m))
 
 scads:         $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
 stls:          $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
@@ -24,13 +27,13 @@ default:
 #              $(SKEINFORGE) $<
 
 %.gcode:       manual-gcode-generator %.m-g
-               ./$^ >$@.tmp && mv -f $@.tmp $@
+               $(PLAY)/$^ >$@.tmp && mv -f $@.tmp $@
 
 dovecliptest.stl: doveclip.scad
 
-%.auto.scad: toplevel-make Makefile toplevel-find
+%.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
                @echo ' write $@'
-               ./$< $@ >$@.tmp
+               $< $@ >$@.tmp
                @mv -f $@.tmp $@
 
 clean: