diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2011-04-20 22:05:10 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2011-04-20 22:05:10 (GMT) |
commit | 7f792b880aa3a8d14f800a2f2bf5af2df9fe36da (patch) | |
tree | c5dd5d348d23f115c913b5dd52ac952121898282 /win/makefile.vc | |
parent | 8556b1aba054954e5f7f386dc1833ca08fdb5e9f (diff) | |
download | tcl-7f792b880aa3a8d14f800a2f2bf5af2df9fe36da.zip tcl-7f792b880aa3a8d14f800a2f2bf5af2df9fe36da.tar.gz tcl-7f792b880aa3a8d14f800a2f2bf5af2df9fe36da.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.vc | 13 |
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" #--------------------------------------------------------------------- |