chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
filamentspool, Makefile: automatic toplevels
[reprap-play.git]
/
toplevel-make
diff --git a/toplevel-make
b/toplevel-make
new file mode 100755
(executable)
index 0000000..
2df668b
--- /dev/null
+++ b/
toplevel-make
@@ -0,0
+1,10
@@
+#!/usr/bin/perl -w
+use strict;
+die unless @ARGV==1;
+die unless $ARGV[0] =~ m/^(.+),(\w+)(?:\..*)?/;
+my ($base,$obj) = ($1,$2);
+print <<END or die $!;
+include <$base.scad>
+$obj();
+END
+close STDOUT or die $!;