Commit 7b83ba73
7b83ba73df11Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified
Description
fix: link libspre.a and sp_bigint.o in test/bench rules
All 73 tests now pass including bm_regexp.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 7b83ba73df11
- Parent
- 86b10c7525ba
MakefilemodifiedView file
@@ -83,13 +83,13 @@
8383
@mkdir -p build8484
$(CC) -c -O2 -Wno-all -Ilib lib/sp_bigint.c -o build/sp_bigint.o8585
86-
test: spinel_parse spinel_codegen build/sp_bigint.o86+
test: spinel_parse spinel_codegen build/sp_bigint.o $(RE_LIB)8787
@pass=0; fail=0; err=0; \8888
for f in test/*.rb; do \8989
bn=$$(basename "$$f" .rb); \9090
./spinel_parse "$$f" /tmp/_sp_t.ast 2>/dev/null && \9191
./spinel_codegen /tmp/_sp_t.ast /tmp/_sp_t.c 2>/dev/null && \92-
$(CC) $(CFLAGS) /tmp/_sp_t.c build/sp_bigint.o -lm -o /tmp/_sp_t_bin 2>/dev/null; \92+
$(CC) $(CFLAGS) /tmp/_sp_t.c build/sp_bigint.o $(RE_LIB) -lm -o /tmp/_sp_t_bin 2>/dev/null; \9393
if [ $$? -eq 0 ]; then \9494
expected=$$(timeout 10 ruby "$$f" 2>/dev/null); \9595
actual=$$(timeout 10 /tmp/_sp_t_bin 2>/dev/null); \@@ -105,13 +105,13 @@
105105
rm -f /tmp/_sp_t.ast /tmp/_sp_t.c /tmp/_sp_t_bin; \106106
echo "Tests: $$pass pass, $$fail fail, $$err error"107107
108-
bench: spinel_parse spinel_codegen108+
bench: spinel_parse spinel_codegen build/sp_bigint.o $(RE_LIB)109109
@pass=0; fail=0; \110110
for f in benchmark/*.rb; do \111111
bn=$$(basename "$$f" .rb); \112112
./spinel_parse "$$f" /tmp/_sp_b.ast 2>/dev/null && \113113
./spinel_codegen /tmp/_sp_b.ast /tmp/_sp_b.c 2>/dev/null && \114-
$(CC) $(CFLAGS) /tmp/_sp_b.c -lm -o /tmp/_sp_b_bin 2>/dev/null; \114+
$(CC) $(CFLAGS) /tmp/_sp_b.c build/sp_bigint.o $(RE_LIB) -lm -o /tmp/_sp_b_bin 2>/dev/null; \115115
if [ $$? -eq 0 ]; then \116116
expected=$$(timeout 60 ruby "$$f" 2>/dev/null); \117117
actual=$$(timeout 60 /tmp/_sp_b_bin 2>/dev/null); \