2022-11-12 12:46:13 -05:00
|
|
|
.POSIX:
|
|
|
|
|
|
|
|
.SUFFIXES: .test .rs
|
|
|
|
|
2023-04-28 14:58:08 -04:00
|
|
|
TEST=$(shell find ut -name '*.test' | sort)
|
2022-11-12 12:46:13 -05:00
|
|
|
TEST_RS=${TEST:.test=.rs}
|
|
|
|
|
2023-04-08 12:17:31 -04:00
|
|
|
BLACKLIST += djot_js_filters # lua filters not implemented
|
|
|
|
BLACKLIST += djot_js_symb # uses ast
|
|
|
|
BLACKLIST += djot_js_sourcepos # not parsable
|
2023-01-29 12:21:44 -05:00
|
|
|
|
2023-04-28 14:58:08 -04:00
|
|
|
ut/mod.rs: ${TEST_RS}
|
|
|
|
mkdir -p ut
|
|
|
|
rm -f $@
|
2022-11-12 12:46:13 -05:00
|
|
|
for f in ${TEST}; do \
|
|
|
|
name=$$(basename -s .test $$f); \
|
2023-01-29 12:21:44 -05:00
|
|
|
echo ${BLACKLIST} | tr ' ' '\n' | grep -q $$name || echo "mod $$name;" >> $@; \
|
2022-11-12 12:46:13 -05:00
|
|
|
done
|
|
|
|
|
|
|
|
.test.rs:
|
2023-04-28 14:58:08 -04:00
|
|
|
gawk -fgen.awk $< | head -n-1 > $@
|
2022-11-12 12:46:13 -05:00
|
|
|
|
|
|
|
clean:
|
2023-04-28 14:58:08 -04:00
|
|
|
rm -f ut/*.rs
|