|
|
|
|
|
|
|
|
|
|
|
!ifndef _RULES_EXT_VC |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!if "$(MAKEFILEVC)" == "" |
|
|
|
|
|
!if exist("$(PROJECT).vc") |
|
|
MAKEFILEVC = $(PROJECT).vc |
|
|
!elseif exist("makefile.vc") |
|
|
MAKEFILEVC = makefile.vc |
|
|
!endif |
|
|
!endif |
|
|
|
|
|
!if !exist("$(MAKEFILEVC)") |
|
|
MSG = ^ |
|
|
You must run nmake from the directory containing the project makefile.^ |
|
|
If you are doing that and getting this message, set the MAKEFILEVC^ |
|
|
macro to the name of the project makefile. |
|
|
!message WARNING: $(MSG) |
|
|
!endif |
|
|
|
|
|
!if "$(PROJECT)" == "tcl" |
|
|
!error The rules-ext.vc file is not intended for Tcl itself. |
|
|
!endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!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 |
|
|
|
|
|
|
|
|
!if "$(TCLDIR)" != "" |
|
|
|
|
|
_RULESDIR = $(TCLDIR:/=\) |
|
|
|
|
|
!else |
|
|
|
|
|
|
|
|
|
|
|
!if defined(INSTALLDIR) && "$(PROJECT)" != "tk" |
|
|
_RULESDIR=$(INSTALLDIR:/=\) |
|
|
!else |
|
|
|
|
|
!if [echo _RULESDIR = \> nmakehlp.out] \ |
|
|
|| [nmakehlp -L generic\tcl.h >> nmakehlp.out] |
|
|
_RULESDIR = ..\..\tcl |
|
|
!else |
|
|
!include nmakehlp.out |
|
|
!endif |
|
|
|
|
|
!endif |
|
|
|
|
|
!endif |
|
|
|
|
|
|
|
|
|
|
|
!if exist("$(_RULESDIR)\lib\nmake\targets.vc") |
|
|
_RULESDIR = $(_RULESDIR)\lib\nmake |
|
|
!elseif exist("$(_RULESDIR)\win\targets.vc") |
|
|
_RULESDIR = $(_RULESDIR)\win |
|
|
!else |
|
|
|
|
|
|
|
|
_RULESDIR = . |
|
|
!endif |
|
|
|
|
|
!if "$(_RULESDIR)" != "." |
|
|
|
|
|
|
|
|
|
|
|
!if exist("rules.vc") |
|
|
|
|
|
!if [echo TCL_RULES_MAJOR = \> versions.vc] \ |
|
|
&& [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MAJOR >> versions.vc] |
|
|
!endif |
|
|
!if [echo TCL_RULES_MINOR = \>> versions.vc] \ |
|
|
&& [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MINOR >> versions.vc] |
|
|
!endif |
|
|
|
|
|
!if [echo OUR_RULES_MAJOR = \>> versions.vc] \ |
|
|
&& [nmakehlp -V "rules.vc" RULES_VERSION_MAJOR >> versions.vc] |
|
|
!endif |
|
|
!if [echo OUR_RULES_MINOR = \>> versions.vc] \ |
|
|
&& [nmakehlp -V "rules.vc" RULES_VERSION_MINOR >> versions.vc] |
|
|
!endif |
|
|
!include versions.vc |
|
|
|
|
|
!if ($(TCL_RULES_MAJOR) != $(OUR_RULES_MAJOR)) || ($(TCL_RULES_MINOR) < $(OUR_RULES_MINOR)) |
|
|
_RULESDIR = . |
|
|
!endif |
|
|
|
|
|
!endif |
|
|
|
|
|
!endif |
|
|
|
|
|
|
|
|
NMAKEHLPC = $(_RULESDIR)\nmakehlp.c |
|
|
|
|
|
|
|
|
!undef TCL_RULES_MAJOR |
|
|
!undef TCL_RULES_MINOR |
|
|
!undef OUR_RULES_MAJOR |
|
|
!undef OUR_RULES_MINOR |
|
|
|
|
|
!if exist("$(_RULESDIR)\rules.vc") |
|
|
!message *** Using $(_RULESDIR)\rules.vc |
|
|
!include "$(_RULESDIR)\rules.vc" |
|
|
!else |
|
|
!error *** Could not locate rules.vc in $(_RULESDIR) |
|
|
!endif |
|
|
|
|
|
!endif |