jotdown/tests/suite/Makefile
Noah Hellman 9bdb4c59fc suite make: specify gawk
broken for e.g. nawk

TODO: fix to work with any awk or replace awk script with something else
(e.g. separate crate with build.rs?)
2023-04-09 16:17:14 +02:00

26 lines
487 B
Makefile

.POSIX:
.SUFFIXES: .test .rs
TEST=$(shell find . -name '*.test' | sort)
TEST_RS=${TEST:.test=.rs}
BLACKLIST += filters # lua filters not implemented
BLACKLIST += symb # uses ast
BLACKLIST += sourcepos # not parsable
.PHONY: suite
suite: mod.rs
mod.rs: ${TEST_RS}
printf "" > $@
for f in ${TEST}; do \
name=$$(basename -s .test $$f); \
echo ${BLACKLIST} | tr ' ' '\n' | grep -q $$name || echo "mod $$name;" >> $@; \
done
.test.rs:
gawk -fgen.awk $< > $@
clean:
rm -f *.rs