From: Ian Jackson Date: Thu, 18 Oct 2012 00:38:37 +0000 (+0100) Subject: Makefile %.auto.{scads,stls} rule X-Git-Tag: filamentspool-v2-release~712 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b2c7ad45e20526716b928883126331b4708f1eb3;p=reprap-play.git Makefile %.auto.{scads,stls} rule --- diff --git a/Makefile b/Makefile index 98ebc48..2c677dc 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,11 @@ AUTO_TOPLEVELS := $(foreach m,$(USING_AUTOS),$(shell $(PLAY)/toplevel-find $m)) scads: $(addsuffix .auto.scad, $(AUTO_TOPLEVELS)) stls: $(addsuffix .auto.stl, $(AUTO_TOPLEVELS)) +%.auto.scads: + $(MAKE) $(addsuffix .auto.scad, $(shell $(PLAY)/toplevel-find $*)) +%.auto.stls: + $(MAKE) $(addsuffix .auto.stl, $(shell $(PLAY)/toplevel-find $*)) + default: -include .*.d diff --git a/toplevel-find b/toplevel-find index 227bb73..72d54a0 100755 --- a/toplevel-find +++ b/toplevel-find @@ -3,7 +3,7 @@ use strict; @ARGV==1 or die; my $base = $ARGV[0]; $base =~ m/^\-/ and die; -open F, "$base.scad" or die $!; +open F, "$base.scad" or die "$base.scad $!"; while () { next unless m#^\s*module\s+(\w+)\b.*////toplevel\b#; print "$base,$1\n" or die $!;