2022-01-06 13:55:53 +00:00
|
|
|
|
2022-01-12 21:25:40 +00:00
|
|
|
fbfiles = $(wildcard src/*.fb tests/*.fb)
|
|
|
|
fthfiles = $(patsubst %.fb, %.fth, $(fbfiles))
|
|
|
|
|
|
|
|
fbfiles_uppercase = $(wildcard src/*.FB tests/*.FB)
|
|
|
|
fthfiles_caseconverted = $(patsubst %.fb, %.fth, \
|
|
|
|
$(shell ../../tools/echo-tolower.py $(fbfiles_uppercase)))
|
|
|
|
|
2022-01-30 23:14:47 +00:00
|
|
|
test: incltest.result logtest.result test-min.result \
|
|
|
|
test-volks4th-min.result
|
2022-01-12 21:25:40 +00:00
|
|
|
|
|
|
|
fth: $(fthfiles) $(fthfiles_caseconverted)
|
2022-01-06 13:55:53 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.log *.LOG *.result *.golden
|
2022-01-30 23:14:47 +00:00
|
|
|
rm -f dosfiles/*
|
2022-01-06 13:55:53 +00:00
|
|
|
|
2022-01-30 23:14:47 +00:00
|
|
|
*.log: emulator/run-in-dosbox.sh
|
|
|
|
|
|
|
|
# TODO: Make v4th.log contain something and check its contents
|
|
|
|
v4th.com v4th.log: volks4th.com kernel.fb tests/log2file.fb
|
2022-01-19 23:00:40 +00:00
|
|
|
rm -f FORTH.COM forth.com v4th.com
|
2022-01-30 23:14:47 +00:00
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
|
|
|
volks4th.com "include kernel.fb"
|
|
|
|
dos2unix -n OUTPUT.LOG v4th.log
|
2022-01-19 23:00:40 +00:00
|
|
|
mv FORTH.COM v4th.com
|
2022-01-12 21:25:40 +00:00
|
|
|
|
|
|
|
v4thfile.com: volks4th.com src/include.fb src/v4thfile.fb \
|
2022-01-10 21:56:19 +00:00
|
|
|
emulator/run-in-dosbox.sh
|
|
|
|
rm -f V4THFILE.COM v4thfile.com
|
2022-01-30 23:14:47 +00:00
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh volks4th.com "include v4thfile.fb"
|
2022-01-10 21:56:19 +00:00
|
|
|
mv V4THFILE.COM v4thfile.com
|
2022-01-06 13:55:53 +00:00
|
|
|
|
2022-01-30 23:14:47 +00:00
|
|
|
logtest.log: volks4th.com tests/log2file.fb tests/logtest.fb
|
|
|
|
rm -f OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh volks4th.com "include logtest.fb"
|
|
|
|
dos2unix -n OUTPUT.LOG $@
|
|
|
|
|
|
|
|
incltest.log: v4thfile.com tests/log2file.fb tests/incltest.fth
|
|
|
|
rm -f OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\tests" ./emulator/run-in-dosbox.sh \
|
|
|
|
v4thfile.com "include incltest.fth"
|
|
|
|
dos2unix -n OUTPUT.LOG $@
|
|
|
|
|
|
|
|
test-volks4th-min.log: v4thfile.com tests/* emulator/run-in-dosbox.sh
|
|
|
|
rm -f OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh v4thfile.com "include test-min.fth"
|
|
|
|
dos2unix -n OUTPUT.LOG $@
|
|
|
|
|
|
|
|
test-min.log: dosfiles/v4th.com dosfiles/asm.fb dosfiles/extend.fb \
|
|
|
|
dosfiles/multi.vid dosfiles/dos.fb dosfiles/include.fb \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4th.com \
|
|
|
|
"include testprep.fb include test-min.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG $@
|
2022-01-16 20:16:48 +00:00
|
|
|
|
|
|
|
test-min.golden: $(patsubst %, tests/golden/%.golden, prelim core)
|
|
|
|
cat $? > $@
|
|
|
|
|
|
|
|
test-std.golden: $(patsubst %, tests/golden/%.golden, \
|
|
|
|
prelim core coreext double report-noblk)
|
|
|
|
cat $? > $@
|
2022-01-11 22:40:24 +00:00
|
|
|
|
2022-01-30 23:14:47 +00:00
|
|
|
test-volks4th-min.golden: $(patsubst %, tests/golden/%.golden, \
|
|
|
|
volks4th-prelim core)
|
|
|
|
cat $? > $@
|
|
|
|
|
2022-01-06 13:55:53 +00:00
|
|
|
|
2022-01-16 20:16:48 +00:00
|
|
|
%.golden: tests/golden/%.golden
|
2022-01-06 13:55:53 +00:00
|
|
|
cp -p $< $@
|
|
|
|
|
|
|
|
%.result: %.log %.golden tests/evaluate-test.sh
|
|
|
|
rm -f $@
|
|
|
|
tests/evaluate-test.sh $(basename $@)
|
|
|
|
|
2022-01-30 23:14:47 +00:00
|
|
|
|
|
|
|
dosfiles/%: %
|
|
|
|
test -d dosfiles || mkdir dosfiles
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
dosfiles/%: src/%
|
|
|
|
test -d dosfiles || mkdir dosfiles
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
dosfiles/%: tests/%
|
|
|
|
test -d dosfiles || mkdir dosfiles
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
|
2022-01-11 22:40:24 +00:00
|
|
|
src/%.fth: src/%.fb ../../tools/fb2fth.py
|
|
|
|
../../tools/fb2fth.py $< $@
|
|
|
|
|
|
|
|
tests/%.fth: tests/%.fb ../../tools/fb2fth.py
|
|
|
|
../../tools/fb2fth.py $< $@
|
|
|
|
|
2022-01-12 21:25:40 +00:00
|
|
|
# Collective rule for converting uppercase *.FB to lowercase *.fth.
|
|
|
|
# Because make doesn't provide case changing pattern matching,
|
|
|
|
# file-by-file dependencies as with the src/%.fth and tests/%.fth
|
|
|
|
# rules doesn't seem feasible here, hence the one collective rule.
|
2022-01-10 21:42:25 +00:00
|
|
|
|
|
|
|
.ONESHELL:
|
2022-01-16 10:06:28 +00:00
|
|
|
$(fthfiles_caseconverted): $(fbfiles_uppercase)
|
2022-01-10 21:42:25 +00:00
|
|
|
set -x
|
|
|
|
for fb in $^
|
|
|
|
do
|
|
|
|
echo fb: $$fb
|
|
|
|
fth=$$(../../tools/echo-tolower.py $$fb | sed -e 's/fb$$/fth/')
|
|
|
|
../../tools/fb2fth.py $$fb $$fth
|
|
|
|
done
|