move build utils to within build/

This commit is contained in:
dzaima 2022-11-18 00:25:54 +02:00
parent 966b78693b
commit ba571949b1
6 changed files with 11 additions and 10 deletions

View File

@ -44,9 +44,9 @@ By default, the CBQN will use [precompiled bytecode](https://github.com/dzaima/c
1. get another BQN implementation; [dzaima/BQN](https://github.com/dzaima/BQN) is one that is completely implemented in Java (clone it & run `./build`). 1. get another BQN implementation; [dzaima/BQN](https://github.com/dzaima/BQN) is one that is completely implemented in Java (clone it & run `./build`).
2. clone [mlochbaum/BQN](https://github.com/mlochbaum/BQN). 2. clone [mlochbaum/BQN](https://github.com/mlochbaum/BQN).
2. From within CBQNs directory, run `mkdir -p build/bytecodeLocal/gen` 3. From within CBQNs directory, run `mkdir -p build/bytecodeLocal/gen`
3. Run `said-other-bqn-impl ./genRuntime path/to/mlochbaum/BQN build/bytecodeLocal` 4. Run `said-other-bqn-impl ./build/genRuntime path/to/mlochbaum/BQN build/bytecodeLocal`
In the case of the Java impl, `java -jar path/to/dzaima/BQN/BQN.jar ./genRuntime ~/git/BQN build/bytecodeLocal` In the case of the Java impl, `java -jar path/to/dzaima/BQN/BQN.jar ./build/genRuntime ~/git/BQN build/bytecodeLocal`
## macOS ## macOS

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bqn #!/usr/bin/env bqn
args←•args args←•args
"Usage: ./getRuntime.bqn path/to/mlochbaum/BQN output/path"!2≤≠args "Usage: ./getRuntime.bqn path/to/mlochbaum/BQN output/path"!2≤≠args
bqnSrc‿outputPath←2↑•args bqnSrc‿outputPath •wdpath⊸•file.At¨ 2↑•args
rtSrc ← ⊑(<"src")∊2↓•args rtSrc ← ⊑(<"src")∊2↓•args

View File

@ -3,12 +3,13 @@
# resolve arguments & files # resolve arguments & files
siDirRsrcfileRresfileRbuildDir •args siDirRsrcfileRresfileRbuildDir •args
filename ('/') srcfileR filename ('/') srcfileR
siDir •file.At siDirR At •wdpath•file.At
siDir At siDirR
srcfile •file.At srcfileR srcfile At srcfileR
resfile •file.At resfileR resfile At resfileR
tmpfile (•file.At buildDir) •file.At filename".d.orig" tmpfile (At buildDir) •file.At filename".d.orig"
depfile (•file.At buildDir) •file.At filename".d" depfile (At buildDir) •file.At filename".d"
prefix "si_" (`'.')/ •file.Name srcfile prefix "si_" (`'.')/ •file.Name srcfile
# invoke singeli, which creates the result file # invoke singeli, which creates the result file

View File

@ -257,7 +257,7 @@ build_singeli: ${addprefix src/singeli/gen/, cmp.c dyarith.c copy.c equal.c sque
@echo $(postmsg) @echo $(postmsg)
src/singeli/gen/%.c: src/singeli/src/%.singeli preSingeliBin src/singeli/gen/%.c: src/singeli/src/%.singeli preSingeliBin
@echo $< | cut -c 17- | sed 's/^/ /' @echo $< | cut -c 17- | sed 's/^/ /'
@build/obj/presingeli/BQN SingeliMake.bqn "$(SINGELI_DIR)" $< $@ "build/obj/singeli/" @build/obj/presingeli/BQN build/singeliMake.bqn "$(SINGELI_DIR)" $< $@ "build/obj/singeli/"
ifeq (${i_singeli}, 1) ifeq (${i_singeli}, 1)
# arithmetic table generator # arithmetic table generator