chiark / gitweb /
scad: break out writeout_core (nfc)
[moebius3.git] / Makefile
1
2 all: moebius-core.scad
3
4 PLAY = /home/reprap/play
5 USING_AUTOS = moebius
6
7 $(shell set -xe; $(PLAY)/commitid.scad.pl >commitid.scad.tmp; cmp commitid.scad.tmp commitid.scad || mv -f commitid.scad.tmp commitid.scad )
8
9 moebius-core.scad: genscad moebius.py
10                 ./$< >$@.tmp && mv -f $@.tmp $@
11
12 AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m))
13
14 autoincs:       $(AUTO_INCS)
15 scads:          $(addsuffix .auto.scad, $(AUTO_TOPLEVELS))
16 stls:           $(addsuffix .auto.stl, $(AUTO_TOPLEVELS))
17
18 %.auto.scads: %.scad
19         $(MAKE) $(addsuffix .auto.scad, $(shell $(PLAY)/toplevel-find $*))
20 %.auto.stls:
21         $(MAKE) $(addsuffix .auto.stl, $(shell $(PLAY)/toplevel-find $*))
22
23 .PRECIOUS: %.auto.scad
24 %.auto.scad: $(PLAY)/toplevel-make Makefile $(PLAY)/toplevel-find
25                 @echo ' write $@'
26                 $< $@ >$@.tmp
27                 @mv -f $@.tmp $@
28
29 .PRECIOUS:      %.stl %.gcode %.eps %.dxf
30