quieter output when building; use strlcpy in tools/retro-muri.c
FossilOrigin-Name: 637aea342f7adc3086dc4e32000859005cb9ec646fe2f27064435195734e290a
This commit is contained in:
parent
65c38bcaea
commit
1ada61d358
3 changed files with 36 additions and 34 deletions
60
Makefile
60
Makefile
|
@ -19,11 +19,11 @@ toolchain: dirs bin/retro-embedimage bin/retro-extend bin/retro-muri bin/retro-u
|
||||||
image: vm/nga-c/image.c
|
image: vm/nga-c/image.c
|
||||||
|
|
||||||
dirs:
|
dirs:
|
||||||
mkdir -p bin
|
@mkdir -p bin
|
||||||
cp tools/retro-document.sh bin/retro-document
|
@cp tools/retro-document.sh bin/retro-document
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f bin/*
|
@rm -f bin/*
|
||||||
|
|
||||||
# installation targets
|
# installation targets
|
||||||
|
|
||||||
|
@ -83,64 +83,64 @@ install-manpages:
|
||||||
# Toolchain ----------------------------------------------------
|
# Toolchain ----------------------------------------------------
|
||||||
|
|
||||||
bin/retro-describe: tools/retro-describe.retro doc/words.tsv
|
bin/retro-describe: tools/retro-describe.retro doc/words.tsv
|
||||||
cat tools/retro-describe.retro > bin/retro-describe
|
@cat tools/retro-describe.retro > bin/retro-describe
|
||||||
cat doc/words.tsv >> bin/retro-describe
|
@cat doc/words.tsv >> bin/retro-describe
|
||||||
chmod +x bin/retro-describe
|
@chmod +x bin/retro-describe
|
||||||
|
|
||||||
bin/retro-embedimage: tools/retro-embedimage.c
|
bin/retro-embedimage: tools/retro-embedimage.c
|
||||||
$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
@$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
||||||
|
|
||||||
bin/retro-extend: tools/retro-extend.c
|
bin/retro-extend: tools/retro-extend.c
|
||||||
$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
@$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
||||||
|
|
||||||
bin/retro-muri: tools/retro-muri.c
|
bin/retro-muri: tools/retro-muri.c
|
||||||
$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
@$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
||||||
|
|
||||||
bin/retro-unu: tools/retro-unu.c
|
bin/retro-unu: tools/retro-unu.c
|
||||||
$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
@$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
||||||
|
|
||||||
# Image --------------------------------------------------------
|
# Image --------------------------------------------------------
|
||||||
|
|
||||||
ngaImage: toolchain image/retro.muri image/retro.forth image/build.retro
|
ngaImage: toolchain image/retro.muri image/retro.forth image/build.retro
|
||||||
$(ASSEMBLE) image/retro.muri
|
@$(ASSEMBLE) image/retro.muri
|
||||||
$(EXTEND) ngaImage image/retro.forth image/build.retro
|
@$(EXTEND) ngaImage image/retro.forth image/build.retro
|
||||||
|
|
||||||
# Executables --------------------------------------------------
|
# Executables --------------------------------------------------
|
||||||
|
|
||||||
bin/retro-repl: vm/nga-c/repl.c vm/nga-c/image.c
|
bin/retro-repl: vm/nga-c/repl.c vm/nga-c/image.c
|
||||||
$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
@$(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o $@ $>
|
||||||
|
|
||||||
# retro on unix
|
# retro on unix
|
||||||
|
|
||||||
update-extensions: bin/retro
|
update-extensions: bin/retro
|
||||||
cd package/extensions && ../../bin/retro -f ../../tools/generate-extensions-list.retro >../load-extensions.retro
|
@cd package/extensions && ../../bin/retro -f ../../tools/generate-extensions-list.retro >../load-extensions.retro
|
||||||
|
|
||||||
vm/nga-c/image.c: toolchain ngaImage interface/retro-unix.retro $(DEVICES)
|
vm/nga-c/image.c: toolchain ngaImage interface/retro-unix.retro $(DEVICES)
|
||||||
cp ngaImage rre.image
|
@cp ngaImage rre.image
|
||||||
$(EXTEND) rre.image $(DEVICES) interface/retro-unix.retro
|
@$(EXTEND) rre.image $(DEVICES) interface/retro-unix.retro
|
||||||
$(EXPORT) rre.image >vm/nga-c/image.c
|
@$(EXPORT) rre.image >vm/nga-c/image.c
|
||||||
|
|
||||||
bin/retro: vm/nga-c/image.c vm/nga-c/retro.c package/list.forth package/load-extensions.retro
|
bin/retro: vm/nga-c/image.c vm/nga-c/retro.c package/list.forth package/load-extensions.retro
|
||||||
cd vm/nga-c && $(CC) -DFAST $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro.c $(LIBM) $(LIBDL)
|
@cd vm/nga-c && $(CC) -DFAST $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro.c $(LIBM) $(LIBDL)
|
||||||
cd package && ../bin/retro -u rre.image -f list.forth
|
@cd package && ../bin/retro -u rre.image -f list.forth
|
||||||
$(EXPORT) rre.image >vm/nga-c/image.c
|
@$(EXPORT) rre.image >vm/nga-c/image.c
|
||||||
rm rre.image
|
@rm rre.image
|
||||||
cd vm/nga-c && $(CC) -DFAST $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro.c $(LIBM) $(LIBDL)
|
@cd vm/nga-c && $(CC) -DFAST $(OPTIONS) $(ENABLED) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro retro.c $(LIBM) $(LIBDL)
|
||||||
|
|
||||||
|
|
||||||
# optional targets
|
# optional targets
|
||||||
|
|
||||||
bin/retro-compiler: toolchain vm/nga-c/retro-compiler.c vm/nga-c/retro-runtime.c
|
bin/retro-compiler: toolchain vm/nga-c/retro-compiler.c vm/nga-c/retro-runtime.c
|
||||||
cp ngaImage runtime.image
|
@cp ngaImage runtime.image
|
||||||
$(EXTEND) runtime.image $(DEVICES) interface/retro-unix.retro
|
@$(EXTEND) runtime.image $(DEVICES) interface/retro-unix.retro
|
||||||
cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../retro-runtime retro-runtime.c $(LIBM) $(LIBDL)
|
@cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../retro-runtime retro-runtime.c $(LIBM) $(LIBDL)
|
||||||
cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro-compiler retro-compiler.c
|
@cd vm/nga-c && $(CC) $(OPTIONS) $(CFLAGS) $(LDFLAGS) -o ../../bin/retro-compiler retro-compiler.c
|
||||||
objcopy --add-section .ngaImage=runtime.image --set-section-flags .ngaImage=noload,readonly bin/retro-compiler
|
@objcopy --add-section .ngaImage=runtime.image --set-section-flags .ngaImage=noload,readonly bin/retro-compiler
|
||||||
objcopy --add-section .runtime=retro-runtime --set-section-flags .runtime=noload,readonly bin/retro-compiler
|
@objcopy --add-section .runtime=retro-runtime --set-section-flags .runtime=noload,readonly bin/retro-compiler
|
||||||
rm runtime.image retro-runtime
|
@rm runtime.image retro-runtime
|
||||||
|
|
||||||
image-js: bin/retro
|
image-js: bin/retro
|
||||||
./bin/retro example/retro-generate-image-js.retro >vm/nga-js/image.js
|
@./bin/retro example/retro-generate-image-js.retro >vm/nga-js/image.js
|
||||||
|
|
||||||
# Documentation ------------------------------------------------
|
# Documentation ------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -19,5 +19,7 @@
|
||||||
- update tools/missing-dsource.retro
|
- update tools/missing-dsource.retro
|
||||||
- add missing source data for vocabularies:
|
- add missing source data for vocabularies:
|
||||||
a: d: double: err: file: fll: mem: script:
|
a: d: double: err: file: fll: mem: script:
|
||||||
|
- use strlcpy() in tools/retro-muri.c
|
||||||
|
- quieter output when building
|
||||||
|
|
||||||
================================================================
|
================================================================
|
||||||
|
|
|
@ -255,10 +255,10 @@ void pass5(char *buffer) {
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
strcpy(code_start, "~~~");
|
strlcpy(code_start, "~~~", 32);
|
||||||
strcpy(code_end, "~~~");
|
strlcpy(code_end, "~~~", 32);
|
||||||
strcpy(test_start, "```");
|
strlcpy(test_start, "```", 32);
|
||||||
strcpy(test_end, "```");
|
strlcpy(test_end, "```", 32);
|
||||||
np = 0;
|
np = 0;
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
here = 0; unu(argv[1], 0, &pass1);
|
here = 0; unu(argv[1], 0, &pass1);
|
||||||
|
|
Loading…
Reference in a new issue