From 7dafbfcc3ed6fafdbc5b44ed6cfb5c29aa8f3829 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Wed, 12 Jan 2022 22:25:40 +0100 Subject: [PATCH] Rename DOS-created uppercase *.FB files to lowercase, with corresponding Makefile changes. --- 8086/msdos/Makefile | 27 ++++++++++++------- 8086/msdos/src/{INCLUDE.FB => include.fb} | 0 8086/msdos/src/{V4THFILE.FB => v4thfile.fb} | 0 8086/msdos/tests/{LOG2FILE.FB => log2file.fb} | 0 8086/msdos/tests/{LOGTEST.FB => logtest.fb} | 0 5 files changed, 18 insertions(+), 9 deletions(-) rename 8086/msdos/src/{INCLUDE.FB => include.fb} (100%) rename 8086/msdos/src/{V4THFILE.FB => v4thfile.fb} (100%) rename 8086/msdos/tests/{LOG2FILE.FB => log2file.fb} (100%) rename 8086/msdos/tests/{LOGTEST.FB => logtest.fb} (100%) diff --git a/8086/msdos/Makefile b/8086/msdos/Makefile index 8fbfd2c..a1c3acf 100644 --- a/8086/msdos/Makefile +++ b/8086/msdos/Makefile @@ -1,23 +1,33 @@ -test: logtest.result +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))) + +test: incltest.result logtest.result + +fth: $(fthfiles) $(fthfiles_caseconverted) clean: rm -f *.log *.LOG *.result *.golden -v4thfile.com: volks4th.com src/V4THFILE.FB \ + +v4thfile.com: volks4th.com src/include.fb src/v4thfile.fb \ emulator/run-in-dosbox.sh rm -f V4THFILE.COM v4thfile.com ./emulator/run-in-dosbox.sh volks4th.com v4thfile.fb mv V4THFILE.COM v4thfile.com -incltest.log: v4thfile.com tests/LOG2FILE.FB tests/incltest.fth \ +incltest.log: v4thfile.com tests/log2file.fb tests/incltest.fth \ emulator/run-in-dosbox.sh ./emulator/run-in-dosbox.sh v4thfile.com incltest.fth incltest.golden: tests/golden/incltest.golden cp -p $< $@ -logtest.log: volks4th.com tests/LOG2FILE.FB tests/LOGTEST.FB \ +logtest.log: volks4th.com tests/log2file.fb tests/logtest.fb \ emulator/run-in-dosbox.sh ./emulator/run-in-dosbox.sh volks4th.com logtest.fb @@ -34,11 +44,10 @@ src/%.fth: src/%.fb ../../tools/fb2fth.py tests/%.fth: tests/%.fb ../../tools/fb2fth.py ../../tools/fb2fth.py $< $@ -fbfiles = $(wildcard src/*.FB tests/*.FB) -fthfiles = $(patsubst %.fb, %.fth, \ - $(shell ../../tools/echo-tolower.py $(fbfiles))) - -fth: $(fthfiles) +# 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. .ONESHELL: $(fthfiles): $(fbfiles) diff --git a/8086/msdos/src/INCLUDE.FB b/8086/msdos/src/include.fb similarity index 100% rename from 8086/msdos/src/INCLUDE.FB rename to 8086/msdos/src/include.fb diff --git a/8086/msdos/src/V4THFILE.FB b/8086/msdos/src/v4thfile.fb similarity index 100% rename from 8086/msdos/src/V4THFILE.FB rename to 8086/msdos/src/v4thfile.fb diff --git a/8086/msdos/tests/LOG2FILE.FB b/8086/msdos/tests/log2file.fb similarity index 100% rename from 8086/msdos/tests/LOG2FILE.FB rename to 8086/msdos/tests/log2file.fb diff --git a/8086/msdos/tests/LOGTEST.FB b/8086/msdos/tests/logtest.fb similarity index 100% rename from 8086/msdos/tests/LOGTEST.FB rename to 8086/msdos/tests/logtest.fb