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
@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 (<F>) {
next unless m#^\s*module\s+(\w+)\b.*////toplevel\b#;
print "$base,$1\n" or die $!;