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-03-23 07:50:04 +00:00
|
|
|
test: incltest.result logtest.result test-std.result test-blk.result \
|
2022-01-31 06:21:14 +00:00
|
|
|
incltest-volks4th.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
|
|
|
|
|
2022-03-01 13:02:46 +00:00
|
|
|
metafile.com: v4thfile.com src/meta.fb src/mk-meta.fth tests/log2file.fb
|
|
|
|
rm -f METAFILE.COM OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
|
|
|
v4thfile.com "include mk-meta.fth"
|
|
|
|
dos2unix -n OUTPUT.LOG metafile.log
|
|
|
|
grep -F 'Metacompiler saved as metafile.com' metafile.log
|
|
|
|
|
2022-03-22 23:23:43 +00:00
|
|
|
v4th.com: metafile.com src/meta.fb src/v4th.fth src/vf86core.fth \
|
|
|
|
src/vf86dos.fth src/vf86file.fth src/vf86end.fth
|
2022-03-01 13:02:46 +00:00
|
|
|
rm -f v4th.com V4TH.COM OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
2022-03-22 23:23:43 +00:00
|
|
|
metafile.com "include v4th.fth"
|
2022-03-01 13:02:46 +00:00
|
|
|
dos2unix -n OUTPUT.LOG v4th.log
|
|
|
|
mv V4TH.COM v4th.com
|
2022-03-21 08:27:51 +00:00
|
|
|
grep -F 'unresolved:' v4th.log
|
2022-03-01 13:02:46 +00:00
|
|
|
grep -F 'new kernel written as v4th.com' v4th.log
|
2022-03-20 23:50:22 +00:00
|
|
|
grep -i 'unresolved:.*[^ ]' v4th.log && exit 1 || true
|
2022-03-01 13:02:46 +00:00
|
|
|
|
2022-03-22 23:23:43 +00:00
|
|
|
v4thblk.com: metafile.com src/meta.fb src/v4thblk.fth src/vf86core.fth \
|
|
|
|
src/vf86dos.fth src/vf86file.fth src/vf86bufs.fth src/vf86end.fth
|
|
|
|
rm -f v4thblk.com V4THBLK.COM OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
|
|
|
metafile.com "include v4thblk.fth"
|
|
|
|
dos2unix -n OUTPUT.LOG v4thblk.log
|
|
|
|
mv V4THBLK.COM v4thblk.com
|
|
|
|
grep -F 'unresolved:' v4thblk.log
|
|
|
|
grep -F 'new kernel written as v4thblk.com' v4thblk.log
|
|
|
|
grep -i 'unresolved:.*[^ ]' v4thblk.log && exit 1 || true
|
|
|
|
|
2022-03-01 13:02:46 +00:00
|
|
|
# o4th for old volks4th - the new v4th is built with precompiled
|
|
|
|
# metacompiler metafile.com and mk-v4th.fth which writes a compile log.
|
|
|
|
o4th.com o4th.log: volks4th.com src/kernel.fb
|
2022-03-13 23:25:57 +00:00
|
|
|
rm -f FORTH.COM forth.com o4th.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"
|
2022-03-01 13:02:46 +00:00
|
|
|
dos2unix -n OUTPUT.LOG o4th.log
|
|
|
|
mv FORTH.COM o4th.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 $@
|
|
|
|
|
2022-03-01 13:02:46 +00:00
|
|
|
logappendtest.log: v4thfile.com tests/logapp.fth
|
|
|
|
rm -f OUTPUT.LOG
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh v4thfile.com "include logapp.fth"
|
|
|
|
dos2unix -n OUTPUT.LOG $@
|
|
|
|
|
2022-01-31 06:21:14 +00:00
|
|
|
prepsrcs = asm.fb extend.fb multi.vid dos.fb include.fb
|
|
|
|
|
2022-03-20 23:50:22 +00:00
|
|
|
prepfths = asm.fb extend.fb multi.vid dos.fb include.fb 86asm.fth \
|
|
|
|
t86asm.fth extend2.fth multivid.fth dos2.fth dos3.fth
|
|
|
|
|
2022-01-31 06:21:14 +00:00
|
|
|
incltest.log: \
|
2022-03-23 21:34:40 +00:00
|
|
|
$(patsubst %, dosfiles/%, v4thblk.com $(prepsrcs) log2file.fb \
|
2022-01-31 06:21:14 +00:00
|
|
|
incltest.fth)
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh \
|
2022-03-23 21:34:40 +00:00
|
|
|
v4thblk.com "include incltest.fth")
|
2022-01-31 06:21:14 +00:00
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG $@
|
|
|
|
|
2022-03-17 21:18:14 +00:00
|
|
|
test-std.log: \
|
2022-03-20 23:50:22 +00:00
|
|
|
$(patsubst %, dosfiles/%, v4th.com $(prepfths)) \
|
2022-03-17 21:18:14 +00:00
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4th.com \
|
|
|
|
"include logprep.fth include test-std.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG $@
|
|
|
|
|
2022-03-19 21:37:33 +00:00
|
|
|
test-blk.log: \
|
2022-03-22 23:23:43 +00:00
|
|
|
$(patsubst %, dosfiles/%, v4thblk.com $(prepfths)) \
|
2022-03-19 21:37:33 +00:00
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
2022-03-22 23:23:43 +00:00
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4thblk.com \
|
2022-03-19 21:37:33 +00:00
|
|
|
"include logprep.fth include test-blk.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG $@
|
|
|
|
|
2022-03-23 21:12:09 +00:00
|
|
|
forthblkdos: v4thblk.dos v4thblk.forth
|
|
|
|
|
|
|
|
forthdos: forthblkdos v4thfile.dos v4thfile.forth v4th0.dos v4th0.forth
|
|
|
|
|
|
|
|
v4th0.dos: \
|
|
|
|
$(patsubst %, dosfiles/%, v4th.com $(prepfths)) \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4th.com \
|
|
|
|
"include logprep.fth include vocdos.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG output.log
|
|
|
|
tr " " "\n" <output.log | sort >$@
|
|
|
|
|
|
|
|
v4th0.forth: \
|
|
|
|
$(patsubst %, dosfiles/%, v4th.com $(prepfths)) \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4th.com \
|
|
|
|
"include logprep.fth include vocforth.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG output.log
|
|
|
|
tr " " "\n" <output.log | sort >$@
|
|
|
|
|
|
|
|
v4thblk.dos: \
|
|
|
|
$(patsubst %, dosfiles/%, v4thblk.com $(prepfths)) \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4thblk.com \
|
|
|
|
"include logprep.fth include vocdos.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG output.log
|
|
|
|
tr " " "\n" <output.log | sort >$@
|
|
|
|
|
|
|
|
v4thblk.forth: \
|
|
|
|
$(patsubst %, dosfiles/%, v4thblk.com $(prepfths)) \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4thblk.com \
|
|
|
|
"include logprep.fth include vocforth.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG output.log
|
|
|
|
tr " " "\n" <output.log | sort >$@
|
|
|
|
|
|
|
|
v4thfile.dos: \
|
|
|
|
$(patsubst %, dosfiles/%, v4thfile.com $(prepfths)) \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4thfile.com \
|
|
|
|
"include log2file.fth include vocdos.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG output.log
|
|
|
|
tr " " "\n" <output.log | sort >$@
|
|
|
|
|
|
|
|
v4thfile.forth: \
|
|
|
|
$(patsubst %, dosfiles/%, v4thfile.com $(prepfths)) \
|
|
|
|
$(patsubst tests/%, dosfiles/%, $(wildcard tests/*.*))
|
|
|
|
rm -f dosfiles/OUTPUT.LOG
|
|
|
|
(cd dosfiles && ../emulator/run-in-dosbox.sh v4thfile.com \
|
|
|
|
"include log2file.fth include vocforth.fth")
|
|
|
|
dos2unix -n dosfiles/OUTPUT.LOG output.log
|
|
|
|
tr " " "\n" <output.log | sort >$@
|
2022-01-31 06:21:14 +00:00
|
|
|
|
|
|
|
incltest-volks4th.log: v4thfile.com tests/log2file.fb tests/incltest.fth
|
2022-01-30 23:14:47 +00:00
|
|
|
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
|
2022-01-31 06:21:14 +00:00
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh \
|
|
|
|
v4thfile.com "include test-min.fth"
|
2022-01-30 23:14:47 +00:00
|
|
|
dos2unix -n OUTPUT.LOG $@
|
|
|
|
|
2022-01-31 06:21:14 +00:00
|
|
|
|
|
|
|
run-editor: volks4th.com emulator/run-in-dosbox.sh
|
|
|
|
FORTHPATH="f:\\;f:\\src;f:\\tests" ./emulator/run-in-dosbox.sh volks4th.com
|
|
|
|
|
2022-01-16 20:16:48 +00:00
|
|
|
|
|
|
|
test-min.golden: $(patsubst %, tests/golden/%.golden, prelim core)
|
2022-03-17 21:18:14 +00:00
|
|
|
cat $^ > $@
|
2022-01-16 20:16:48 +00:00
|
|
|
|
|
|
|
test-std.golden: $(patsubst %, tests/golden/%.golden, \
|
2022-03-17 21:18:14 +00:00
|
|
|
prelim core coreplus coreext doubltst report-noblk)
|
|
|
|
cat $^ > $@
|
2022-01-11 22:40:24 +00:00
|
|
|
|
2022-03-19 22:55:06 +00:00
|
|
|
test-blk.golden: $(patsubst %, tests/golden/%.golden, \
|
|
|
|
prelim core coreplus coreext doubltst block report-blk)
|
|
|
|
cat $^ > $@
|
|
|
|
|
2022-01-30 23:14:47 +00:00
|
|
|
test-volks4th-min.golden: $(patsubst %, tests/golden/%.golden, \
|
|
|
|
volks4th-prelim core)
|
2022-03-17 21:18:14 +00:00
|
|
|
cat $^ > $@
|
2022-01-30 23:14:47 +00:00
|
|
|
|
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 $< $@
|
|
|
|
|
2022-01-31 06:21:14 +00:00
|
|
|
%-volks4th.golden: tests/golden/%.golden
|
|
|
|
cp -p $< $@
|
|
|
|
|
2022-01-06 13:55:53 +00:00
|
|
|
%.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
|