summaryrefslogtreecommitdiffstats
path: root/win/makefile.vc
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2011-04-20 22:05:10 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2011-04-20 22:05:10 (GMT)
commit45705463bf3ecc383fc2a1f3e6fc82f8bc1962d5 (patch)
treec5dd5d348d23f115c913b5dd52ac952121898282 /win/makefile.vc
parent6710971c2b879548683b5d3104fe7fdeaae726b4 (diff)
downloadtcl-45705463bf3ecc383fc2a1f3e6fc82f8bc1962d5.zip
tcl-45705463bf3ecc383fc2a1f3e6fc82f8bc1962d5.tar.gz
tcl-45705463bf3ecc383fc2a1f3e6fc82f8bc1962d5.tar.bz2
Support cross-compilation to x64 from ix86 hosts when using NMAKE.
Part of the build uses tclsh to generate files. Ensure we can specify a runnable executable using TCLSH_NATIVE when cross-compiling. This patch also gets smarter about finding the compiler version, the compiler target architecture and the native architecture. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'win/makefile.vc')
-rw-r--r--win/makefile.vc13
1 files changed, 11 insertions, 2 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index 35aef18..7dc96b7 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -208,6 +208,15 @@ TCLDDELIB = $(OUT_DIR)\$(TCLDDELIBNAME)
TCLTEST = $(OUT_DIR)\$(PROJECT)test.exe
CAT32 = $(OUT_DIR)\cat32.exe
+# Can we run what we build? IX86 runs on all architectures.
+!ifndef TCLSH_NATIVE
+!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
+TCLSH_NATIVE = $(TCLSH)
+!else
+!error You must explicitly set TCLSH_NATIVE for cross-compilation
+!endif
+!endif
+
### Make sure we use backslash only.
LIB_INSTALL_DIR = $(_INSTALLDIR)\lib
BIN_INSTALL_DIR = $(_INSTALLDIR)\bin
@@ -1015,13 +1024,13 @@ install-libraries: tclConfig install-msgs install-tzdata
install-tzdata:
@echo Installing time zone data
@set TCL_LIBRARY=$(ROOT)/library
- @$(TCLSH) "$(ROOT)/tools/installData.tcl" \
+ @$(TCLSH_NATIVE) "$(ROOT)/tools/installData.tcl" \
"$(ROOT)/library/tzdata" "$(SCRIPT_INSTALL_DIR)/tzdata"
install-msgs:
@echo Installing message catalogs
@set TCL_LIBRARY=$(ROOT)/library
- @$(TCLSH) "$(ROOT)/tools/installData.tcl" \
+ @$(TCLSH_NATIVE) "$(ROOT)/tools/installData.tcl" \
"$(ROOT)/library/msgs" "$(SCRIPT_INSTALL_DIR)/msgs"
#---------------------------------------------------------------------