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
|
|
|
|
|
|
|
|
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-07-02 09:29:47 +00:00
|
|
|
inctest.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
|
|
|
|
$(patsubst src/%, $(cpmfilesdir)/%, src/include.fb) \
|
|
|
|
$(patsubst tests/%, $(cpmfilesdir)/%, tests/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" \
|
|
|
|
"include inctest.fth" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
2022-04-30 21:07:46 +00:00
|
|
|
cp $(runcpmdir)/output.log $@
|
|
|
|
|
2023-07-02 09:29:47 +00:00
|
|
|
logtest.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
|
|
|
|
$(patsubst tests/%, $(cpmfilesdir)/%, tests/log2file.fb) \
|
2023-07-01 18:15:57 +00:00
|
|
|
| emu
|
2023-07-02 09:23:26 +00:00
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
|
|
|
".( hello world) cr" \
|
|
|
|
"logclose" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
2023-07-01 18:15:57 +00:00
|
|
|
cp $(runcpmdir)/output.log output.log
|
2023-07-01 22:11:52 +00:00
|
|
|
../../tools/trunc-ctrl-z.py $(runcpmdir)/A/0/LOGFILE.TXT \
|
|
|
|
$(runcpmdir)/logfile.txt
|
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
2023-07-01 18:15:57 +00:00
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
emu: $(runcpmdir)/RunCPM
|
|
|
|
|
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 $< $@
|