From e92130391c5094a3919d3d782cee7ca1aa5ec159 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Fri, 22 Dec 2023 15:32:33 -0800 Subject: [PATCH] Enhance windows. --- Makefile | 24 ++++++------------------ tools/importation.py | 6 ++++-- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 83104ab..2ceea02 100644 --- a/Makefile +++ b/Makefile @@ -477,19 +477,13 @@ win64_target: $(WINDOWS)/uEf64.exe $(WINDOWS): mkdir -p $@ +-include $(WINDOWS)/uEf32.obj.dd + $(WINDOWS)/uEf32.obj: \ windows/main.c \ - common/tier0_opcodes.h \ - common/tier1_opcodes.h \ - common/tier2_opcodes.h \ - common/calls.h \ - common/calling.h \ - common/floats.h \ - common/bits.h \ - common/core.h \ - windows/interp.h \ $(GEN)/windows_boot_extra.h \ $(GEN)/windows_boot.h | $(WINDOWS) + ./tools/importation.py $< $@ --no-out -I . -I $(GEN) --depsout $@.dd $(CL32) /c /Fo$@ $(WIN_CFLAGS) $< $(WINDOWS)/uEf32.exe: \ @@ -497,19 +491,13 @@ $(WINDOWS)/uEf32.exe: \ $(RES)/ueforth_res32.res | $(WINDOWS) $(LINK32) /OUT:$@ $(WIN_LFLAGS32) $^ +-include $(WINDOWS)/uEf64.obj.dd + $(WINDOWS)/uEf64.obj: \ windows/main.c \ - common/tier0_opcodes.h \ - common/tier1_opcodes.h \ - common/tier2_opcodes.h \ - common/calls.h \ - common/calling.h \ - common/floats.h \ - common/bits.h \ - common/core.h \ - windows/interp.h \ $(GEN)/windows_boot_extra.h \ $(GEN)/windows_boot.h | $(WINDOWS) + ./tools/importation.py $< $@ --no-out -I . -I $(GEN) --depsout $@.dd $(CL64) /c /Fo$@ $(WIN_CFLAGS) $< $(WINDOWS)/uEf64.exe: \ diff --git a/tools/importation.py b/tools/importation.py index 2d727f5..88e8ef9 100755 --- a/tools/importation.py +++ b/tools/importation.py @@ -13,6 +13,7 @@ parser.add_argument('-I', action='append') parser.add_argument('--set-version') parser.add_argument('--set-revision') parser.add_argument('--depsout') +parser.add_argument('--no-out', action='store_true') args = parser.parse_args() bases = args.I or [] @@ -58,7 +59,8 @@ def Process(): with open(args.depsout, 'w') as fh: fh.write(args.output + ': ' + ' '.join([os.path.relpath(i) for i in imported]) + '\n') - with open(args.output, 'w') as fh: - fh.write('\n'.join(results) + '\n') + if not args.no_out: + with open(args.output, 'w') as fh: + fh.write('\n'.join(results) + '\n') Process()