15 lines
610 B
Plaintext
Executable File
15 lines
610 B
Plaintext
Executable File
#!/usr/bin/env bqn
|
||
args←•args
|
||
"Usage: ./getRuntime.bqn path/to/mlochbaum/BQN output/path"!2≤≠args
|
||
bqnSrc‿outputPath ← •wdpath⊸•file.At¨ 2↑•args
|
||
|
||
rtSrc ← ⊑(<"src")∊2↓•args
|
||
|
||
CC ← {𝕨 •FChars (⟨1,bqnSrc⟩∾(rtSrc/⟨"-i"⟩)∾⟨𝕩⟩) •Import "cc.bqn"}
|
||
(outputPath•file.At "gen/src" )•FChars "#define RT_SRC "∾('0'+rtSrc)∾@+10
|
||
(outputPath•file.At "gen/compiles" )CC"cc"
|
||
(outputPath•file.At "gen/runtime0" )CC"r0"
|
||
(outputPath•file.At "gen/runtime1" )CC"r1"
|
||
(outputPath•file.At "gen/formatter")CC"f"
|
||
(outputPath•file.At "gen/explain" )CC"eu"
|