bin/picrin -> picrin
This commit is contained in:
parent
e0786a7015
commit
9377999579
|
@ -1,5 +1,4 @@
|
|||
*.o
|
||||
bin/
|
||||
src/load_piclib.c
|
||||
src/init_contrib.c
|
||||
docs/contrib.rst
|
||||
|
|
22
Makefile
22
Makefile
|
@ -18,7 +18,7 @@ CONTRIB_DOCS = $(wildcard contrib/*/docs/*.rst)
|
|||
PICRIN_ISSUE_TESTS = $(wildcard t/issue/*.scm)
|
||||
REPL_ISSUE_TESTS = $(wildcard t/issue/*.sh)
|
||||
|
||||
TEST_RUNNER = bin/picrin
|
||||
TEST_RUNNER = picrin
|
||||
|
||||
CFLAGS += -I./lib/include -Wall -Wextra
|
||||
LDFLAGS += -lm
|
||||
|
@ -26,15 +26,15 @@ LDFLAGS += -lm
|
|||
prefix ?= /usr/local
|
||||
|
||||
all: CFLAGS += -O2 -DNDEBUG=1
|
||||
all: bin/picrin
|
||||
all: picrin
|
||||
|
||||
debug: CFLAGS += -O0 -g
|
||||
debug: bin/picrin
|
||||
debug: picrin
|
||||
|
||||
include $(sort $(wildcard contrib/*/nitro.mk))
|
||||
|
||||
bin/picrin: CFLAGS += $(CONTRIB_DEFS)
|
||||
bin/picrin: $(PICRIN_OBJS) $(CONTRIB_OBJS) $(LIBPICRIN_OBJS)
|
||||
picrin: CFLAGS += $(CONTRIB_DEFS)
|
||||
picrin: $(PICRIN_OBJS) $(CONTRIB_OBJS) $(LIBPICRIN_OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $(PICRIN_OBJS) $(CONTRIB_OBJS) $(LIBPICRIN_OBJS) $(LDFLAGS)
|
||||
|
||||
src/load_piclib.c: $(CONTRIB_LIBS)
|
||||
|
@ -63,12 +63,12 @@ docs/contrib.rst: $(CONTRIB_DOCS)
|
|||
echo "" >> $@
|
||||
cat $(CONTRIB_DOCS) >> $@
|
||||
|
||||
run: bin/picrin
|
||||
bin/picrin
|
||||
run: picrin
|
||||
./picrin
|
||||
|
||||
test: test-contribs test-nostdlib test-issue
|
||||
|
||||
test-contribs: bin/picrin $(CONTRIB_TESTS)
|
||||
test-contribs: picrin $(CONTRIB_TESTS)
|
||||
|
||||
test-nostdlib:
|
||||
$(CC) -I lib/include -D'PIC_USE_LIBC=0' -D'PIC_USE_STDIO=0' -D'PIC_USE_WRITE=0' -ffreestanding -nostdlib -Os -fPIC -shared -std=c89 -pedantic -Wall -Wextra -Werror -o lib/libpicrin-tiny.so $(LIBPICRIN_SRCS) etc/libc_polyfill.c -fno-stack-protector
|
||||
|
@ -80,16 +80,16 @@ test-issue: test-picrin-issue test-repl-issue
|
|||
|
||||
test-picrin-issue: $(TEST_RUNNER) $(PICRIN_ISSUE_TESTS)
|
||||
for test in $(PICRIN_ISSUE_TESTS); do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
||||
test-repl-issue: $(REPL_ISSUE_TESTS)
|
||||
|
||||
$(REPL_ISSUE_TESTS):
|
||||
PICRIN=$(TEST_RUNNER) ./$@
|
||||
PICRIN=./$(TEST_RUNNER) ./$@
|
||||
|
||||
install: all
|
||||
install -c bin/picrin $(prefix)/bin/picrin
|
||||
install -c picrin $(prefix)/bin/picrin
|
||||
|
||||
clean:
|
||||
rm -f src/load_piclib.c src/init_contrib.c
|
||||
|
|
|
@ -2,5 +2,5 @@ CONTRIB_LIBS += $(wildcard contrib/10.macro/*.scm)
|
|||
|
||||
CONTRIB_TESTS += test-macro
|
||||
|
||||
test-macro: bin/picrin
|
||||
$(TEST_RUNNER) contrib/10.macro/t/ir-macro.scm
|
||||
test-macro: $(TEST_RUNNER)
|
||||
./$(TEST_RUNNER) contrib/10.macro/t/ir-macro.scm
|
||||
|
|
|
@ -5,5 +5,5 @@ CONTRIB_SRCS += contrib/10.roundtrip/emyg_dtoa.c \
|
|||
|
||||
CONTRIB_TESTS += test-roundtrip
|
||||
|
||||
test-roundtrip: bin/picrin
|
||||
$(TEST_RUNNER) contrib/10.roundtrip/t/roundtrip.scm
|
||||
test-roundtrip: $(TEST_RUNNER)
|
||||
./$(TEST_RUNNER) contrib/10.roundtrip/t/roundtrip.scm
|
||||
|
|
|
@ -24,7 +24,7 @@ CONTRIB_LIBS += \
|
|||
|
||||
CONTRIB_TESTS += test-r7rs
|
||||
|
||||
test-r7rs: bin/picrin
|
||||
test-r7rs: $(TEST_RUNNER)
|
||||
for test in `ls contrib/20.r7rs/t/*.scm`; do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CONTRIB_LIBS += $(wildcard contrib/30.optional/piclib/*.scm)
|
||||
CONTRIB_TESTS += test-optional
|
||||
|
||||
test-optional: bin/picrin
|
||||
test-optional: $(TEST_RUNNER)
|
||||
for test in `ls contrib/30.optional/t/*.scm`; do \
|
||||
$(TEST_RUNNER) $$test; \
|
||||
./$(TEST_RUNNER) $$test; \
|
||||
done
|
||||
|
|
|
@ -2,7 +2,7 @@ CONTRIB_INITS += random
|
|||
CONTRIB_SRCS += $(wildcard contrib/30.random/src/*.c)
|
||||
CONTRIB_TESTS += test-random
|
||||
|
||||
test-random: bin/picrin
|
||||
test-random: $(TEST_RUNNER)
|
||||
for test in `ls contrib/30.random/t/*.scm`; do \
|
||||
$(TEST_RUNNER) $$test; \
|
||||
./$(TEST_RUNNER) $$test; \
|
||||
done
|
||||
|
|
|
@ -10,7 +10,7 @@ endif
|
|||
contrib/30.readline/src/readline.o: contrib/30.readline/src/readline.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $< `pkg-config libedit --cflags`
|
||||
|
||||
test-readline: bin/picrin
|
||||
test-readline: $(TEST_RUNNER)
|
||||
for test in `ls contrib/30.readline/t/*.scm`; do \
|
||||
$(TEST_RUNNER) $$test; \
|
||||
./$(TEST_RUNNER) $$test; \
|
||||
done
|
||||
|
|
|
@ -2,7 +2,7 @@ CONTRIB_SRCS += contrib/30.regexp/src/regexp.c
|
|||
CONTRIB_INITS += regexp
|
||||
CONTRIB_TESTS += test-regexp
|
||||
|
||||
test-regexp: bin/picrin
|
||||
test-regexp: $(TEST_RUNNER)
|
||||
for test in `ls contrib/30.regexp/t/*.scm`; do \
|
||||
$(TEST_RUNNER) $$test; \
|
||||
./$(TEST_RUNNER) $$test; \
|
||||
done
|
||||
|
|
|
@ -17,7 +17,7 @@ CONTRIB_SRCS += \
|
|||
contrib/40.srfi/src/106.c
|
||||
CONTRIB_TESTS += test-srfi
|
||||
|
||||
test-srfi: bin/picrin
|
||||
test-srfi: $(TEST_RUNNER)
|
||||
for test in `ls contrib/40.srfi/t/*.scm`; do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CONTRIB_LIBS += $(wildcard contrib/50.for/piclib/*.scm)
|
||||
CONTRIB_TESTS += test-for
|
||||
|
||||
test-for: bin/picrin
|
||||
test-for: $(TEST_RUNNER)
|
||||
for test in `ls contrib/50.for/t/*.scm`; do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CONTRIB_LIBS += $(wildcard contrib/50.option/*.scm)
|
||||
CONTRIB_TESTS += test-option
|
||||
|
||||
test-option: bin/picrin
|
||||
test-option: $(TEST_RUNNER)
|
||||
for test in `ls contrib/50.option/t/*.scm`; do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CONTRIB_LIBS += $(wildcard contrib/60.logic/*.scm)
|
||||
CONTRIB_TESTS += test-logic
|
||||
|
||||
test-logic: bin/picrin
|
||||
test-logic: $(TEST_RUNNER)
|
||||
for test in `ls contrib/60.logic/t/*.scm`; do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
|
|
@ -2,7 +2,7 @@ CONTRIB_LIBS += contrib/60.peg/picrin/parser.scm contrib/60.peg/picrin/parser/st
|
|||
|
||||
CONTRIB_TESTS += test-peg
|
||||
|
||||
test-peg: bin/picrin
|
||||
test-peg: $(TEST_RUNNER)
|
||||
for test in `ls contrib/60.peg/t/*.scm`; do \
|
||||
$(TEST_RUNNER) "$$test"; \
|
||||
./$(TEST_RUNNER) "$$test"; \
|
||||
done
|
||||
|
|
|
@ -2,5 +2,5 @@ CONTRIB_LIBS += $(wildcard contrib/90.array/*.scm)
|
|||
|
||||
CONTRIB_TESTS += test-array
|
||||
|
||||
test-array: bin/picrin
|
||||
$(TEST_RUNNER) contrib/90.array/t/array.scm
|
||||
test-array: $(TEST_RUNNER)
|
||||
./$(TEST_RUNNER) contrib/90.array/t/array.scm
|
||||
|
|
Loading…
Reference in New Issue