Switch fat-c/boot using environment variable BOOT.
* GNUmakefile: check for BOOT, set CFLAGS. * mes.c: Remove hardcoded BOOT define. * scripts/include.mes: include loop-0 when BOOT is set.
This commit is contained in:
parent
596fa86cc4
commit
c8e87f3021
|
@ -10,6 +10,11 @@ CFLAGS:=-std=c99 -O3 -finline-functions
|
|||
#CFLAGS:=-pg -std=c99 -O0
|
||||
#CFLAGS:=-std=c99 -O0 -g
|
||||
|
||||
export BOOT
|
||||
ifneq ($(BOOT),)
|
||||
CFLAGS+=-DBOOT=1
|
||||
endif
|
||||
|
||||
include .config.make
|
||||
-include .local.make
|
||||
include make/install.make
|
||||
|
@ -47,7 +52,7 @@ mes.h: mes.c GNUmakefile
|
|||
echo "scm $$builtin = {FUNCTION$$args, .name=\"$$scm_name\", .function$$args=&$$name};";\
|
||||
echo "a = add_environment (a, \"$$scm_name\", &$$builtin);" 1>&2;\
|
||||
done; echo '#endif'; echo '#endif' 1>&2) > $@ 2>environment.i
|
||||
grep -oE '^scm ([a-z_]+) = {(SCM|SYMBOL),' mes.c | cut -d' ' -f 2 |\
|
||||
grep -oE '^scm ([a-z_0-9]+) = {(SCM|SYMBOL),' mes.c | cut -d' ' -f 2 |\
|
||||
while read f; do\
|
||||
echo "symbols = cons (&$$f, symbols);";\
|
||||
done > symbols.i
|
||||
|
@ -74,7 +79,7 @@ mes-check: all
|
|||
|
||||
guile-check:
|
||||
for i in $(TESTS); do\
|
||||
guile -s <(cat $(MES-0) $$(scripts/include.mes $$i | grep -Ev 'let.mes|quasiquote.mes|base-0|srfi-0') $$i);\
|
||||
guile -s <(cat $(MES-0) $$(scripts/include.mes $$i | grep -Ev 'let.mes|quasiquote.mes|base-0|loop-0|srfi-0') $$i);\
|
||||
done
|
||||
for i in $(TESTS); do\
|
||||
guile -s <(cat $(MES-0) module/mes/test.mes $$i);\
|
||||
|
|
1
mes.c
1
mes.c
|
@ -28,7 +28,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define BOOT 0
|
||||
#define DEBUG 0
|
||||
#define BUILTIN_QUASIQUOTE 1 // 6x speedup for mescc
|
||||
#define MES_FULL 1
|
||||
|
|
|
@ -9,6 +9,10 @@ for prefix in $(dirname $(dirname $0))/share/mes . $(dirname $(dirname $0)); do
|
|||
break;
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$BOOT" ]; then
|
||||
echo $prefix/module/mes/loop-0.mes
|
||||
fi
|
||||
cat $1 \
|
||||
| grep -Eo '(mes-use-module \([^()]+ [^()]+))' \
|
||||
| grep -Eo ' \([^)]+\)' \
|
||||
|
|
Loading…
Reference in a new issue