2022-04-01 23:10:56 +00:00
|
|
|
|
2023-07-01 18:15:57 +00:00
|
|
|
srcfbfiles = $(wildcard src/*.fb)
|
|
|
|
srcfthfiles = $(patsubst src/%.fb, src/%.fth, $(srcfbfiles))
|
|
|
|
testsfbfiles = $(wildcard tests/*.fb)
|
|
|
|
testsfthfiles = $(patsubst tests/%.fb, tests/%.fth, $(testsfbfiles))
|
|
|
|
fthfiles = $(srcfthfiles) $(testsfthfiles)
|
2022-04-01 23:10:56 +00:00
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
whitch_runcpm = $(shell which RunCPM)
|
|
|
|
runcpmdir = runcpm
|
|
|
|
cpmfilesdir = cpmfiles
|
|
|
|
|
|
|
|
fth: $(fthfiles)
|
|
|
|
|
|
|
|
clean:
|
2023-07-01 22:11:52 +00:00
|
|
|
rm -f *.log *.golden *.result
|
2022-04-30 21:07:46 +00:00
|
|
|
rm -rf $(runcpmdir)
|
|
|
|
rm -f msdos
|
|
|
|
|
2023-09-02 20:00:12 +00:00
|
|
|
test: logtest.result inctest.result test-min.result
|
2023-07-02 14:43:54 +00:00
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
run-editor: | msdos
|
2023-07-01 18:15:57 +00:00
|
|
|
FORTHPATH="f:\\src;f:\\tests;f:\\msdos" \
|
|
|
|
../../8086/msdos/emulator/run-in-dosbox.sh f:\\msdos\\volks4th.com
|
2022-04-01 23:10:56 +00:00
|
|
|
|
|
|
|
msdos:
|
|
|
|
ln -s ../../8086/msdos msdos
|
|
|
|
|
2023-05-21 20:57:17 +00:00
|
|
|
src/%.fth: src/%.fb ../../tools/fb2fth.py
|
2022-04-01 23:10:56 +00:00
|
|
|
../../tools/fb2fth.py $< $@
|
2022-04-30 21:07:46 +00:00
|
|
|
|
2023-07-01 18:15:57 +00:00
|
|
|
tests/%.fth: tests/%.fb ../../tools/fb2fth.py
|
|
|
|
../../tools/fb2fth.py $< $@
|
|
|
|
|
2023-09-02 19:16:39 +00:00
|
|
|
run-volks4th: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th"
|
|
|
|
|
2023-07-02 21:21:44 +00:00
|
|
|
logtest.log: \
|
2023-09-02 20:58:20 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com log2file.fb) \
|
2023-07-02 21:21:44 +00:00
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
|
|
|
".( hello world) cr" \
|
2023-08-20 19:54:27 +00:00
|
|
|
".( 0123456789abcdef0123456789abcdef) cr" \
|
|
|
|
".( 1123456789abcdef0123456789abcdef) cr" \
|
|
|
|
".( 2123456789abcdef0123456789abcdef) cr" \
|
|
|
|
".( 3123456789abcdef0123456789abcdef) cr" \
|
2023-07-02 21:21:44 +00:00
|
|
|
"logclose" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
|
|
|
|
2023-07-02 09:29:47 +00:00
|
|
|
inctest.log: \
|
2023-09-02 20:58:20 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com \
|
|
|
|
include.fb log2file.fb inctest.fth) \
|
2022-04-30 21:07:46 +00:00
|
|
|
| emu
|
2023-07-02 09:23:26 +00:00
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include include.fb" \
|
2023-07-02 09:47:08 +00:00
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
2023-07-02 09:23:26 +00:00
|
|
|
"include inctest.fth" \
|
2023-07-02 09:47:08 +00:00
|
|
|
"logclose" \
|
2023-07-02 09:23:26 +00:00
|
|
|
"bye" \
|
|
|
|
"exit"
|
2023-07-02 09:47:08 +00:00
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
2022-04-30 21:07:46 +00:00
|
|
|
|
2023-09-02 19:16:39 +00:00
|
|
|
test-min.log: \
|
2023-09-02 20:58:20 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com \
|
|
|
|
include.fb log2file.fb \
|
|
|
|
ans-shim.fth prelim.fth tester.fth core.fr test-min.fth) \
|
2023-09-02 19:16:39 +00:00
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include include.fb" \
|
|
|
|
"include test-min.fth" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
emu: $(runcpmdir)/RunCPM
|
|
|
|
|
2023-09-02 19:40:10 +00:00
|
|
|
test-min.golden: $(patsubst %, tests/golden/%.golden, prelim core)
|
|
|
|
cat $^ > $@
|
|
|
|
|
2023-07-01 22:11:52 +00:00
|
|
|
%.golden: tests/golden/%.golden
|
|
|
|
cp -p $< $@
|
|
|
|
|
|
|
|
%.result: %.log %.golden tests/evaluate-test.sh
|
|
|
|
rm -f $@
|
|
|
|
tests/evaluate-test.sh $(basename $@)
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
$(runcpmdir)/RunCPM: $(whitch_runcpm)
|
|
|
|
test -d $(runcpmdir) || mkdir -p $(runcpmdir)
|
|
|
|
cp $< $@
|
|
|
|
|
2023-05-21 20:48:35 +00:00
|
|
|
$(cpmfilesdir)/%: src/%
|
|
|
|
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
|
|
|
|
cp $< $@
|
|
|
|
|
2023-07-01 18:15:57 +00:00
|
|
|
$(cpmfilesdir)/%: tests/%
|
|
|
|
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
|
|
|
|
cp $< $@
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
$(cpmfilesdir)/%: %
|
|
|
|
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
|
|
|
|
cp $< $@
|