OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/base.git] / util / src / TclTk / tcl8.6.12 / pkgs / tdbcsqlite3-1.1.3 / win / rules-ext.vc
diff --git a/util/src/TclTk/tcl8.6.12/pkgs/tdbcsqlite3-1.1.3/win/rules-ext.vc b/util/src/TclTk/tcl8.6.12/pkgs/tdbcsqlite3-1.1.3/win/rules-ext.vc
new file mode 100644 (file)
index 0000000..531e070
--- /dev/null
@@ -0,0 +1,118 @@
+# This file should only be included in makefiles for Tcl extensions,\r
+# NOT in the makefile for Tcl itself.\r
+\r
+!ifndef _RULES_EXT_VC\r
+\r
+# We need to run from the directory the parent makefile is located in.\r
+# nmake does not tell us what makefile was used to invoke it so parent\r
+# makefile has to set the MAKEFILEVC macro or we just make a guess and\r
+# warn if we think that is not the case.\r
+!if "$(MAKEFILEVC)" == ""\r
+\r
+!if exist("$(PROJECT).vc")\r
+MAKEFILEVC = $(PROJECT).vc\r
+!elseif exist("makefile.vc")\r
+MAKEFILEVC = makefile.vc\r
+!endif\r
+!endif # "$(MAKEFILEVC)" == ""\r
+\r
+!if !exist("$(MAKEFILEVC)")\r
+MSG = ^\r
+You must run nmake from the directory containing the project makefile.^\r
+If you are doing that and getting this message, set the MAKEFILEVC^\r
+macro to the name of the project makefile.\r
+!message WARNING: $(MSG)\r
+!endif\r
+\r
+!if "$(PROJECT)" == "tcl"\r
+!error The rules-ext.vc file is not intended for Tcl itself.\r
+!endif\r
+\r
+# We extract version numbers using the nmakehlp program. For now use\r
+# the local copy of nmakehlp. Once we locate Tcl, we will use that\r
+# one if it is newer.\r
+!if [$(CC) -nologo "nmakehlp.c" -link -subsystem:console > nul]\r
+!endif\r
+\r
+# First locate the Tcl directory that we are working with.\r
+!if "$(TCLDIR)" != ""\r
+\r
+_RULESDIR = $(TCLDIR:/=\)\r
+\r
+!else\r
+\r
+# If an installation path is specified, that is also the Tcl directory.\r
+# Also Tk never builds against an installed Tcl, it needs Tcl sources\r
+!if defined(INSTALLDIR) && "$(PROJECT)" != "tk"\r
+_RULESDIR=$(INSTALLDIR:/=\)\r
+!else\r
+# Locate Tcl sources\r
+!if [echo _RULESDIR = \> nmakehlp.out] \\r
+   || [nmakehlp -L generic\tcl.h >> nmakehlp.out]\r
+_RULESDIR = ..\..\tcl\r
+!else\r
+!include nmakehlp.out\r
+!endif\r
+\r
+!endif # defined(INSTALLDIR)....\r
+\r
+!endif # ifndef TCLDIR\r
+\r
+# Now look for the targets.vc file under the Tcl root. Note we check this\r
+# file and not rules.vc because the latter also exists on older systems.\r
+!if exist("$(_RULESDIR)\lib\nmake\targets.vc") # Building against installed Tcl\r
+_RULESDIR = $(_RULESDIR)\lib\nmake\r
+!elseif exist("$(_RULESDIR)\win\targets.vc")   # Building against Tcl sources\r
+_RULESDIR = $(_RULESDIR)\win\r
+!else\r
+# If we have not located Tcl's targets file, most likely we are compiling\r
+# against an older version of Tcl and so must use our own support files.\r
+_RULESDIR = .\r
+!endif\r
+\r
+!if "$(_RULESDIR)" != "."\r
+# Potentially using Tcl's support files. If this extension has its own\r
+# nmake support files, need to compare the versions and pick newer.\r
+\r
+!if exist("rules.vc") # The extension has its own copy\r
+\r
+!if [echo TCL_RULES_MAJOR = \> versions.vc] \\r
+   && [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MAJOR >> versions.vc]\r
+!endif\r
+!if [echo TCL_RULES_MINOR = \>> versions.vc] \\r
+   && [nmakehlp -V "$(_RULESDIR)\rules.vc" RULES_VERSION_MINOR >> versions.vc]\r
+!endif\r
+\r
+!if [echo OUR_RULES_MAJOR = \>> versions.vc] \\r
+   && [nmakehlp -V "rules.vc" RULES_VERSION_MAJOR >> versions.vc]\r
+!endif\r
+!if [echo OUR_RULES_MINOR = \>> versions.vc] \\r
+   && [nmakehlp -V "rules.vc" RULES_VERSION_MINOR >> versions.vc]\r
+!endif\r
+!include versions.vc\r
+# We have a newer version of the support files, use them\r
+!if ($(TCL_RULES_MAJOR) != $(OUR_RULES_MAJOR)) || ($(TCL_RULES_MINOR) < $(OUR_RULES_MINOR))\r
+_RULESDIR = .\r
+!endif\r
+\r
+!endif # if exist("rules.vc")\r
+\r
+!endif # if $(_RULESDIR) != "."\r
+\r
+# Let rules.vc know what copy of nmakehlp.c to use.\r
+NMAKEHLPC = $(_RULESDIR)\nmakehlp.c\r
+\r
+# Get rid of our internal defines before calling rules.vc\r
+!undef TCL_RULES_MAJOR\r
+!undef TCL_RULES_MINOR\r
+!undef OUR_RULES_MAJOR\r
+!undef OUR_RULES_MINOR\r
+\r
+!if exist("$(_RULESDIR)\rules.vc")\r
+!message *** Using $(_RULESDIR)\rules.vc\r
+!include "$(_RULESDIR)\rules.vc"\r
+!else\r
+!error *** Could not locate rules.vc in $(_RULESDIR)\r
+!endif\r
+\r
+!endif # _RULES_EXT_VC
\ No newline at end of file