From 5bb496ae2e6ddee68a2d32fe8450b3647dffefc8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 16 Feb 2022 11:07:24 +0000 Subject: Sync rules.vc with Tcl --- win/rules-ext.vc | 5 +++++ win/rules.vc | 8 ++++---- win/targets.vc | 2 +- win/x86_64-w64-mingw32-nmakehlp.exe | Bin 0 -> 25600 bytes 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100755 win/x86_64-w64-mingw32-nmakehlp.exe diff --git a/win/rules-ext.vc b/win/rules-ext.vc index 6da5689..6d31a03 100644 --- a/win/rules-ext.vc +++ b/win/rules-ext.vc @@ -31,8 +31,13 @@ macro to the name of the project makefile. # We extract version numbers using the nmakehlp program. For now use # the local copy of nmakehlp. Once we locate Tcl, we will use that # one if it is newer. +!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)" !if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul] !endif +!else +!if [copy x86_64-w64-mingw32-nmakehlp.exe nmakehlp.exe >NUL] +!endif +!endif # First locate the Tcl directory that we are working with. !if "$(TCLDIR)" != "" diff --git a/win/rules.vc b/win/rules.vc index f8236f4..372d70a 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -550,9 +550,12 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c # We always build nmakehlp even if it exists since we do not know # what source it was built from. -!if "$(MACHINE)" == "$(NATIVE_ARCH)" +!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)" !if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul] !endif +!else +!if [copy $(NMAKEHLPC:nmakehlp.c=x86_64-w64-mingw32-nmakehlp.exe) nmakehlp.exe >NUL] +!endif !endif ################################################################ @@ -1610,9 +1613,6 @@ DEFAULT_BUILD_TARGET = $(PROJECT) default-target: $(DEFAULT_BUILD_TARGET) -nmakehlp: - $(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console - !if $(MULTIPLATFORM_INSTALL) default-pkgindex: @echo if {[package vsatisfies [package provide Tcl] 9.0-]} { > $(OUT_DIR)\pkgIndex.tcl diff --git a/win/targets.vc b/win/targets.vc index 6bfebc7..077e8f7 100644 --- a/win/targets.vc +++ b/win/targets.vc @@ -4,7 +4,7 @@ # Part of the nmake based build system for Tcl and its extensions. # This file defines some standard targets for the convenience of extensions # and can be optionally included by the extension makefile. -# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for docs. +# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for docs. $(PROJECT): setup pkgindex $(PRJLIB) diff --git a/win/x86_64-w64-mingw32-nmakehlp.exe b/win/x86_64-w64-mingw32-nmakehlp.exe new file mode 100755 index 0000000..2564ec9 Binary files /dev/null and b/win/x86_64-w64-mingw32-nmakehlp.exe differ -- cgit v0.12