From 32795ecf0382e281a24e2198a8387cf9004e57b0 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 13 Mar 2018 21:48:53 -0500 Subject: [PATCH] Nmakefile: Use the manifest file. Use the :: feature because there is a race condition if ``link`` and ``mt`` are used in a single rule (on my machine). This unfortunately causes ``mt`` to run if ``nmake`` is invoked twice in a row, but I don't see a way around it right now. --- Nmakefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Nmakefile b/Nmakefile index 81751fff1a..aa05f9471f 100644 --- a/Nmakefile +++ b/Nmakefile @@ -132,11 +132,19 @@ libfactor-ffi-test.dll: vm/ffi_test.obj factor.dll.lib: $(DLL_OBJS) link $(LINK_FLAGS) /implib:factor.dll.lib /out:factor.dll /dll $(DLL_OBJS) -factor.com: $(EXE_OBJS) $(DLL_OBJS) +# If we ``link`` factor.com and then ``mt`` it in the same rule (for retina support) +# then factor.com is still open and ``mt`` fails +# sleep hack fixes it... +factor.com :: $(EXE_OBJS) $(DLL_OBJS) link $(LINK_FLAGS) /out:factor.com /SUBSYSTEM:$(SUBSYSTEM_COM_FLAGS) $(EXE_OBJS) $(DLL_OBJS) +factor.com :: + mt -manifest factor.exe.manifest -outputresource:factor.com;#1 -factor.exe: $(EXE_OBJS) $(DLL_OBJS) +factor.exe :: $(EXE_OBJS) $(DLL_OBJS) link $(LINK_FLAGS) /out:factor.exe /SUBSYSTEM:$(SUBSYSTEM_EXE_FLAGS) $(EXE_OBJS) $(DLL_OBJS) +factor.exe :: + mt -manifest factor.exe.manifest -outputresource:factor.exe;#1 + all: factor.com factor.exe factor.dll.lib libfactor-ffi-test.dll