summaryrefslogtreecommitdiffstats
path: root/win/makefile.vc
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2011-04-20 22:13:41 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2011-04-20 22:13:41 (GMT)
commit95c1b15bcdb4d087a64ead65b5b133d07513d5c8 (patch)
treec89445aa64180cf755e799eed6801ff68dc39fb3 /win/makefile.vc
parentd2a3e689071f70fd61345d002e2bcc87732049aa (diff)
parent7f792b880aa3a8d14f800a2f2bf5af2df9fe36da (diff)
downloadtcl-95c1b15bcdb4d087a64ead65b5b133d07513d5c8.zip
tcl-95c1b15bcdb4d087a64ead65b5b133d07513d5c8.tar.gz
tcl-95c1b15bcdb4d087a64ead65b5b133d07513d5c8.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 9cf4769..98d04a3 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -214,6 +214,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
@@ -1150,13 +1159,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"
#---------------------------------------------------------------------