You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2003/10/22 19:40:43 UTC

cvs commit: tcl-rivet/win makefile.vc nmakehlp.c rules.vc

davidw      2003/10/22 10:40:43

  Modified:    win      makefile.vc nmakehlp.c rules.vc
  Log:
  * win/: Numerous updates from Pat Thoyts
    <pa...@users.sourceforge.net>.
  
  Revision  Changes    Path
  1.2       +3 -879    tcl-rivet/win/makefile.vc
  
  Index: makefile.vc
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/win/makefile.vc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- makefile.vc	5 Jul 2003 14:23:18 -0000	1.1
  +++ makefile.vc	22 Oct 2003 17:40:43 -0000	1.2
  @@ -268,8 +268,8 @@
   !endif
   !endif
   
  -TCL_INCLUDES	= -I"$(TCLDIR)\include" -I"$(WINDIR)" -I"$(GENERICDIR)"
  -BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) -I"$(APACHE_INCLUDE_DIR)" \
  +INCLUDES	= $(TCL_INCLUDES) -I"$(WINDIR)" -I"$(GENERICDIR)"
  +BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(INCLUDES) -I"$(APACHE_INCLUDE_DIR)" \
   		  -DWIN32 -D_WIN32 -D_WINDOWS -DNAMEOFEXECUTABLE="\"$(TCLSH:\=/)\""
   CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
   TCL_CFLAGS	= -DVERSION="\"$(DOTVERSION)\"" $(BASE_CLFAGS) $(OPTDEFINES)
  @@ -306,883 +306,7 @@
   dlllflags = $(lflags) -dll
   conlflags = $(lflags) -subsystem:console
   guilflags = $(lflags) -subsystem:windows
  -baselibs   = "c:\opt\tcl\lib\tcl84.lib" #$(TCLIMPLIB)
  -
  -#---------------------------------------------------------------------
  -# TclTest flags
  -#---------------------------------------------------------------------
  -
  -!IF "$(TESTPAT)" != ""
  -TESTFLAGS = -file $(TESTPAT)
  -!ENDIF
  -
  -#---------------------------------------------------------------------
  -# Project specific targets (EDIT)
  -#---------------------------------------------------------------------
  -
  -all:	    setup $(PROJECT)
  -$(PROJECT): setup $(MOD_RIVET) $(RIVET_LIB) $(RIVETPARSER_LIB)
  -install:    install-binaries install-libraries install-docs
  -
  -
  -test: setup $(PROJECT)
  -	set TCL_LIBRARY=$(ROOT)/library
  -!if "$(OS)" == "Windows_NT"  || "$(MSVCDIR)" == "IDE"
  -	$(TCLSH) "$(ROOT)/tests/all.tcl" $(TESTFLAGS)
  -!else
  -	@echo Please wait while the tests are collected...
  -	$(TCLSH) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) > tests.log
  -	type tests.log | more
  -!endif
  -
  -setup:
  -	@if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
  -	@if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
  -
  -$(MOD_RIVET): $(MOD_RIVET_OBJS)
  -	$(link32) $(dlllflags) -out:$@ $(baselibs) $(APACHE_LIB) @<<
  -$**
  -<<
  -	-@del $*.exp > NUL
  -
  -$(RIVET_LIB): $(RIVET_OBJS)
  -	$(link32) $(dlllflags) -out:$@ $(baselibs) @<<
  -$**
  -<<
  -	-@del $*.exp > NUL
  -
  -$(RIVETPARSER_LIB): $(RIVETPARSER_OBJS)
  -	$(link32) $(dlllflags) -out:$@ $(baselibs) @<<
  -$**
  -<<
  -	-@del $*.exp > NUL
  -
  -$(PRJSTUBLIB): $(PRJSTUBOBJS)
  -	$(lib32) -nologo -out:$@ $(PRJSTUBOBJS)
  -
  -#---------------------------------------------------------------------
  -# Implicit rules
  -#---------------------------------------------------------------------
  -
  -{$(WINDIR)}.c{$(TMP_DIR)}.obj::
  -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
  -$<
  -<<
  -
  -{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
  -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
  -$<
  -<<
  -
  -{$(COMPATDIR)}.c{$(TMP_DIR)}.obj::
  -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
  -$<
  -<<
  -
  -{$(WINDIR)}.rc{$(TMP_DIR)}.res:
  -	$(rc32) -fo $@ -r -i "$(GENERICDIR)" -D__WIN32__ \
  -!if $(DEBUG)
  -	-d DEBUG \
  -!endif
  -!if $(TCL_THREADS)
  -	-d TCL_THREADS \
  -!endif
  -!if $(STATIC_BUILD)
  -	-d STATIC_BUILD \
  -!endif
  -	$<
  -
  -.SUFFIXES:
  -.SUFFIXES:.c .rc
  -
  -#---------------------------------------------------------------------
  -# Installation. (EDIT)
  -#
  -# You may need to modify this section to reflect the final distribution
  -# of your files and possibly to generate documentation.
  -#
  -#---------------------------------------------------------------------
  -
  -install-binaries:
  -	@echo Installing to '$(SCRIPT_INSTALL_DIR)'
  -	@if not exist $(SCRIPT_INSTALL_DIR)\nul mkdir $(SCRIPT_INSTALL_DIR)
  -	@if not exist $(SCRIPT_INSTALL_DIR)\packages \
  -		mkdir $(SCRIPT_INSTALL_DIR)\packages
  -	@if not exist $(SCRIPT_INSTALL_DIR)\packages\rivet \
  -		mkdir $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@$(CPY) $(RIVET_LIB) $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@$(CPY) $(RIVETPARSER_LIB) $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@echo Installing $(MOD_RIVET) to $(APACHE_MODULES_DIR)
  -	@$(CPY) $(MOD_RIVET) $(APACHE_MODULES_DIR)
  -
  -install-libraries:
  -	@echo Installing to '$(SCRIPT_INSTALL_DIR)'
  -	@if exist $(LIBDIR)\nul $(CPY) /s $(LIBDIR) $(SCRIPT_INSTALL_DIR)
  -	@cd $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@echo pkg_mkIndex -verbose . | $(TCLSH)
  -
  -install-docs:
  -
  -#---------------------------------------------------------------------
  -# Clean up
  -#---------------------------------------------------------------------
  -
  -clean:
  -	@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
  -
  -realclean: clean
  -	@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
  -
  -distclean: realclean
  -	@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
  -	@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
  -# makefile.vc --                                               -*- Makefile -*-
  -#
  -# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
  -#
  -# This makefile is based upon the Tcl 8.4 Makefile.vc and modified to 
  -# make it suitable as a general package makefile. Look for the word EDIT
  -# which marks sections that may need modification. As a minumum you will
  -# need to change the PROJECT, DOTVERSION and DLLOBJS variables to values
  -# relevant to your package.
  -#
  -# See the file "license.terms" for information on usage and redistribution
  -# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  -# 
  -# Copyright (c) 1995-1996 Sun Microsystems, Inc.
  -# Copyright (c) 1998-2000 Ajuba Solutions.
  -# Copyright (c) 2001 ActiveState Corporation.
  -# Copyright (c) 2001-2002 David Gravereaux.
  -# Copyright (c) 2003 Pat Thoyts
  -#
  -#-------------------------------------------------------------------------
  -# RCS: @(#)$Id$
  -#-------------------------------------------------------------------------
  -
  -!if "$(MSVCDIR)" == ""
  -MSG = ^
  -You will need to run vcvars32.bat from Developer Studio, first, to setup^
  -the environment.  Jump to this line to read the new instructions.
  -!error $(MSG)
  -!endif
  -
  -#------------------------------------------------------------------------------
  -# HOW TO USE this makefile:
  -#
  -# 1)  It is now necessary to have %MSVCDir% set in the environment.  This is
  -#     used  as a check to see if vcvars32.bat had been run prior to running
  -#     nmake or during the installation of Microsoft Visual C++, MSVCDir had
  -#     been set globally and the PATH adjusted.  Either way is valid.
  -#
  -#     You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
  -#     directory to setup the proper environment, if needed, for your current
  -#     setup.  This is a needed bootstrap requirement and allows the swapping of
  -#     different environments to be easier.
  -#
  -# 2)  To use the Platform SDK (not expressly needed), run setenv.bat after
  -#     vcvars32.bat according to the instructions for it.  This can also turn on
  -#     the 64-bit compiler, if your SDK has it.
  -#
  -# 3)  Targets are:
  -#	all       -- Builds everything.
  -#       <project> -- Builds the project (eg: nmake sample)
  -#	test      -- Builds and runs the test suite.
  -#	install   -- Installs the built binaries and libraries to $(INSTALLDIR)
  -#		     in an appropriate subdirectory.
  -#	clean/realclean/distclean -- varying levels of cleaning.
  -#
  -# 4)  Macros usable on the commandline:
  -#	INSTALLDIR=<path>
  -#		Sets where to install Tcl from the built binaries.
  -#		C:\Progra~1\Tcl is assumed when not specified.
  -#
  -#	OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none
  -#		Sets special options for the core.  The default is for none.
  -#		Any combination of the above may be used (comma separated).
  -#		'none' will over-ride everything to nothing.
  -#
  -#		static  =  Builds a static library of the core instead of a
  -#			   dll.  The shell will be static (and large), as well.
  -#		msvcrt  =  Effects the static option only to switch it from
  -#			   using libcmt(d) as the C runtime [by default] to
  -#			   msvcrt(d). This is useful for static embedding
  -#			   support.
  -#		staticpkg = Effects the static option only to switch
  -#			   tclshXX.exe to have the dde and reg extension linked
  -#			   inside it.
  -#		threads =  Turns on full multithreading support.
  -#		thrdalloc = Use the thread allocator (shared global free pool).
  -#		symbols =  Adds symbols for step debugging.
  -#		profile =  Adds profiling hooks.  Map file is assumed.
  -#		loimpact =  Adds a flag for how NT treats the heap to keep memory
  -#			   in use, low.  This is said to impact alloc performance.
  -#
  -#	STATS=memdbg,compdbg,none
  -#		Sets optional memory and bytecode compiler debugging code added
  -#		to the core.  The default is for none.  Any combination of the
  -#		above may be used (comma separated).  'none' will over-ride
  -#		everything to nothing.
  -#
  -#		memdbg   = Enables the debugging memory allocator.
  -#		compdbg  = Enables byte compilation logging.
  -#
  -#	MACHINE=(IX86|IA64|ALPHA)
  -#		Set the machine type used for the compiler, linker, and
  -#		resource compiler.  This hook is needed to tell the tools
  -#		when alternate platforms are requested.  IX86 is the default
  -#		when not specified.
  -#
  -#	TMP_DIR=<path>
  -#	OUT_DIR=<path>
  -#		Hooks to allow the intermediate and output directories to be
  -#		changed.  $(OUT_DIR) is assumed to be 
  -#		$(BINROOT)\(Release|Debug) based on if symbols are requested.
  -#		$(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
  -#
  -#	TESTPAT=<file>
  -#		Reads the tests requested to be run from this file.
  -#
  -#	CFG_ENCODING=encoding
  -#		name of encoding for configuration information. Defaults
  -#		to cp1252
  -#
  -# 5)  Examples:
  -#
  -#	Basic syntax of calling nmake looks like this:
  -#	nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
  -#
  -#                        Standard (no frills)
  -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
  -#       Setting environment for using Microsoft Visual C++ tools.
  -#       c:\tcl_src\win\>nmake -f makefile.vc all
  -#       c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
  -#
  -#                         Building for Win64
  -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
  -#       Setting environment for using Microsoft Visual C++ tools.
  -#       c:\tcl_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
  -#       Targeting Windows pre64 RETAIL
  -#       c:\tcl_src\win\>nmake -f makefile.vc MACHINE=IA64
  -#
  -#------------------------------------------------------------------------------
  -#==============================================================================
  -###############################################################################
  -#------------------------------------------------------------------------------
  -
  -!if !exist("makefile.vc")
  -MSG = ^
  -You must run this makefile only from the directory it is in.^
  -Please `cd` to its location first.
  -!error $(MSG)
  -!endif
  -
  -#-------------------------------------------------------------------------
  -# Project specific information (EDIT)
  -#
  -# You should edit this with the name and version of your project. This
  -# information is used to generate the name of the package library and
  -# it's install location.
  -#
  -# For example, the sample extension is  going to build sample04.dll and
  -# would install it into $(INSTALLDIR)\lib\sample04
  -#
  -# You need to specify the object files that need to be linked into your
  -# binary here.
  -#
  -#-------------------------------------------------------------------------
  -
  -PROJECT = rivet
  -!include "rules.vc"
  -
  -DOTVERSION      = 1.1
  -VERSION         = $(DOTVERSION:.=)
  -STUBPREFIX      = $(PROJECT)stub
  -
  -MOD_RIVET_OBJS = \
  -	$(TMP_DIR)\apache_multipart_buffer.obj \
  -	$(TMP_DIR)\apache_request.obj \
  -	$(TMP_DIR)\rivetChannel.obj \
  -	$(TMP_DIR)\rivetParser.obj \
  -	$(TMP_DIR)\rivetCore.obj \
  -	$(TMP_DIR)\mod_rivet.obj \
  -	$(TMP_DIR)\TclWebapache.obj
  -
  -RIVET_OBJS = \
  -	$(TMP_DIR)\rivetList.obj \
  -	$(TMP_DIR)\rivetWWW.obj \
  -	$(TMP_DIR)\rivetCrypt.obj \
  -	$(TMP_DIR)\rivetPkgInit.obj
  -
  -RIVETPARSER_OBJS = \
  -	$(TMP_DIR)\rivetParser.obj \
  -	$(TMP_DIR)\parserPkgInit.obj
  -
  -MOD_RIVET =  $(OUT_DIR)\mod_rivet.so
  -RIVET_LIB =  $(OUT_DIR)\rivet.dll
  -RIVETPARSER_LIB= $(OUT_DIR)\rivetparser.dll
  -
  -
  -APACHE_ROOT        = c:\opt\apache
  -APACHE_LIB_DIR     = $(APACHE_ROOT)\libexec
  -APACHE_INCLUDE_DIR = $(APACHE_ROOT)\include
  -APACHE_MODULES_DIR = $(APACHE_ROOT)\modules
  -
  -APACHE_LIB         = $(APACHE_LIB_DIR)\ApacheCore.lib
  -
  -#-------------------------------------------------------------------------
  -# Target names and paths ( shouldn't need changing )
  -#-------------------------------------------------------------------------
  -
  -BINROOT		= .
  -ROOT            = ..
  -
  -PRJIMPLIB	= $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
  -PRJLIBNAME	= $(PROJECT)$(VERSION)$(SUFX).$(EXT)
  -PRJLIB		= $(OUT_DIR)\$(PRJLIBNAME)
  -
  -PRJSTUBLIBNAME	= $(STUBPREFIX)$(VERSION).lib
  -PRJSTUBLIB	= $(OUT_DIR)\$(PRJSTUBLIBNAME)
  -
  -### Make sure we use backslash only.
  -LIB_INSTALL_DIR		= $(_INSTALLDIR)\lib
  -BIN_INSTALL_DIR		= $(_INSTALLDIR)\bin
  -DOC_INSTALL_DIR		= $(_INSTALLDIR)\doc
  -SCRIPT_INSTALL_DIR	= $(_INSTALLDIR)\lib\$(PROJECT)$(DOTVERSION)
  -INCLUDE_INSTALL_DIR	= $(_INSTALLDIR)\include
  -
  -### The following paths CANNOT have spaces in them.
  -GENERICDIR	= $(ROOT)\src
  -WINDIR		= $(ROOT)\win
  -LIBDIR          = $(ROOT)\rivet
  -DOCDIR		= $(ROOT)\doc
  -TOOLSDIR	= $(ROOT)\tools
  -COMPATDIR	= $(ROOT)\compat
  -
  -### Find a tclsh for testing and installation.
  -!if !exist("$(TCLSH)")
  -TCLSH           = $(BIN_INSTALL_DIR)\tclsh$(TCL_VERSION).exe
  -!endif
  -
  -#---------------------------------------------------------------------
  -# Compile flags
  -#---------------------------------------------------------------------
  -
  -!if !$(DEBUG)
  -!if $(OPTIMIZING)
  -### This cranks the optimization level to maximize speed
  -cdebug	= -O2 -Op -Gs
  -!else
  -cdebug	=
  -!endif
  -!else if "$(MACHINE)" == "IA64"
  -### Warnings are too many, can't support warnings into errors.
  -cdebug	= -Z7 -Od
  -!else
  -cdebug	= -Z7 -WX -Od
  -!endif
  -
  -### Declarations common to all compiler options
  -cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\
  -
  -!if $(PENT_0F_ERRATA)
  -cflags = $(cflags) -QI0f
  -!endif
  -
  -!if $(ITAN_B_ERRATA)
  -cflags = $(cflags) -QIA64_Bx
  -!endif
  -
  -!if $(MSVCRT)
  -!if $(DEBUG)
  -crt = -MDd
  -!else
  -crt = -MD
  -!endif
  -!else
  -!if $(DEBUG)
  -crt = -MTd
  -!else
  -crt = -MT
  -!endif
  -!endif
  -
  -TCL_INCLUDES	= -I"$(TCLDIR)\include" -I"$(WINDIR)" -I"$(GENERICDIR)"
  -BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) -I"$(APACHE_INCLUDE_DIR)" \
  -		  -DWIN32 -D_WIN32 -D_WINDOWS -DNAMEOFEXECUTABLE="\"$(TCLSH:\=/)\""
  -CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
  -TCL_CFLAGS	= -DVERSION="\"$(DOTVERSION)\"" $(BASE_CLFAGS) $(OPTDEFINES)
  -
  -#---------------------------------------------------------------------
  -# Link flags
  -#---------------------------------------------------------------------
  -
  -!if $(DEBUG)
  -ldebug	= -debug:full -debugtype:cv
  -!else
  -ldebug	= -release -opt:ref -opt:icf,3
  -!endif
  -
  -### Declarations common to all linker options
  -lflags	= -nologo -machine:$(MACHINE) $(ldebug)
  -
  -!if $(PROFILE)
  -lflags	= $(lflags) -profile
  -!endif
  -
  -!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
  -### Align sections for PE size savings.
  -lflags	= $(lflags) -opt:nowin98
  -!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
  -### Align sections for speed in loading by choosing the virtual page size.
  -lflags	= $(lflags) -align:4096
  -!endif
  -
  -!if $(LOIMPACT)
  -lflags	= $(lflags) -ws:aggressive
  -!endif
  -
  -dlllflags = $(lflags) -dll
  -conlflags = $(lflags) -subsystem:console
  -guilflags = $(lflags) -subsystem:windows
  -baselibs   = "c:\opt\tcl\lib\tcl84.lib" #$(TCLIMPLIB)
  -
  -#---------------------------------------------------------------------
  -# TclTest flags
  -#---------------------------------------------------------------------
  -
  -!IF "$(TESTPAT)" != ""
  -TESTFLAGS = -file $(TESTPAT)
  -!ENDIF
  -
  -#---------------------------------------------------------------------
  -# Project specific targets (EDIT)
  -#---------------------------------------------------------------------
  -
  -all:	    setup $(PROJECT)
  -$(PROJECT): setup $(MOD_RIVET) $(RIVET_LIB) $(RIVETPARSER_LIB)
  -install:    install-binaries install-libraries install-docs
  -
  -
  -test: setup $(PROJECT)
  -	set TCL_LIBRARY=$(ROOT)/library
  -!if "$(OS)" == "Windows_NT"  || "$(MSVCDIR)" == "IDE"
  -	$(TCLSH) "$(ROOT)/tests/all.tcl" $(TESTFLAGS)
  -!else
  -	@echo Please wait while the tests are collected...
  -	$(TCLSH) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) > tests.log
  -	type tests.log | more
  -!endif
  -
  -setup:
  -	@if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
  -	@if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
  -
  -$(MOD_RIVET): $(MOD_RIVET_OBJS)
  -	$(link32) $(dlllflags) -out:$@ $(baselibs) $(APACHE_LIB) @<<
  -$**
  -<<
  -	-@del $*.exp > NUL
  -
  -$(RIVET_LIB): $(RIVET_OBJS)
  -	$(link32) $(dlllflags) -out:$@ $(baselibs) @<<
  -$**
  -<<
  -	-@del $*.exp > NUL
  -
  -$(RIVETPARSER_LIB): $(RIVETPARSER_OBJS)
  -	$(link32) $(dlllflags) -out:$@ $(baselibs) @<<
  -$**
  -<<
  -	-@del $*.exp > NUL
  -
  -$(PRJSTUBLIB): $(PRJSTUBOBJS)
  -	$(lib32) -nologo -out:$@ $(PRJSTUBOBJS)
  -
  -#---------------------------------------------------------------------
  -# Implicit rules
  -#---------------------------------------------------------------------
  -
  -{$(WINDIR)}.c{$(TMP_DIR)}.obj::
  -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
  -$<
  -<<
  -
  -{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
  -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
  -$<
  -<<
  -
  -{$(COMPATDIR)}.c{$(TMP_DIR)}.obj::
  -    $(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
  -$<
  -<<
  -
  -{$(WINDIR)}.rc{$(TMP_DIR)}.res:
  -	$(rc32) -fo $@ -r -i "$(GENERICDIR)" -D__WIN32__ \
  -!if $(DEBUG)
  -	-d DEBUG \
  -!endif
  -!if $(TCL_THREADS)
  -	-d TCL_THREADS \
  -!endif
  -!if $(STATIC_BUILD)
  -	-d STATIC_BUILD \
  -!endif
  -	$<
  -
  -.SUFFIXES:
  -.SUFFIXES:.c .rc
  -
  -#---------------------------------------------------------------------
  -# Installation. (EDIT)
  -#
  -# You may need to modify this section to reflect the final distribution
  -# of your files and possibly to generate documentation.
  -#
  -#---------------------------------------------------------------------
  -
  -install-binaries:
  -	@echo Installing to '$(SCRIPT_INSTALL_DIR)'
  -	@if not exist $(SCRIPT_INSTALL_DIR)\nul mkdir $(SCRIPT_INSTALL_DIR)
  -	@if not exist $(SCRIPT_INSTALL_DIR)\packages \
  -		mkdir $(SCRIPT_INSTALL_DIR)\packages
  -	@if not exist $(SCRIPT_INSTALL_DIR)\packages\rivet \
  -		mkdir $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@$(CPY) $(RIVET_LIB) $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@$(CPY) $(RIVETPARSER_LIB) $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@echo Installing $(MOD_RIVET) to $(APACHE_MODULES_DIR)
  -	@$(CPY) $(MOD_RIVET) $(APACHE_MODULES_DIR)
  -
  -install-libraries:
  -	@echo Installing to '$(SCRIPT_INSTALL_DIR)'
  -	@if exist $(LIBDIR)\nul $(CPY) /s $(LIBDIR) $(SCRIPT_INSTALL_DIR)
  -	@cd $(SCRIPT_INSTALL_DIR)\packages\rivet
  -	@echo pkg_mkIndex -verbose . | $(TCLSH)
  -
  -install-docs:
  -
  -#---------------------------------------------------------------------
  -# Clean up
  -#---------------------------------------------------------------------
  -
  -clean:
  -	@if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
  -
  -realclean: clean
  -	@if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
  -
  -distclean: realclean
  -	@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
  -	@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
  -# makefile.vc --                                               -*- Makefile -*-
  -#
  -# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
  -#
  -# This makefile is based upon the Tcl 8.4 Makefile.vc and modified to 
  -# make it suitable as a general package makefile. Look for the word EDIT
  -# which marks sections that may need modification. As a minumum you will
  -# need to change the PROJECT, DOTVERSION and DLLOBJS variables to values
  -# relevant to your package.
  -#
  -# See the file "license.terms" for information on usage and redistribution
  -# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  -# 
  -# Copyright (c) 1995-1996 Sun Microsystems, Inc.
  -# Copyright (c) 1998-2000 Ajuba Solutions.
  -# Copyright (c) 2001 ActiveState Corporation.
  -# Copyright (c) 2001-2002 David Gravereaux.
  -# Copyright (c) 2003 Pat Thoyts
  -#
  -#-------------------------------------------------------------------------
  -# RCS: @(#)$Id$
  -#-------------------------------------------------------------------------
  -
  -!if "$(MSVCDIR)" == ""
  -MSG = ^
  -You will need to run vcvars32.bat from Developer Studio, first, to setup^
  -the environment.  Jump to this line to read the new instructions.
  -!error $(MSG)
  -!endif
  -
  -#------------------------------------------------------------------------------
  -# HOW TO USE this makefile:
  -#
  -# 1)  It is now necessary to have %MSVCDir% set in the environment.  This is
  -#     used  as a check to see if vcvars32.bat had been run prior to running
  -#     nmake or during the installation of Microsoft Visual C++, MSVCDir had
  -#     been set globally and the PATH adjusted.  Either way is valid.
  -#
  -#     You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
  -#     directory to setup the proper environment, if needed, for your current
  -#     setup.  This is a needed bootstrap requirement and allows the swapping of
  -#     different environments to be easier.
  -#
  -# 2)  To use the Platform SDK (not expressly needed), run setenv.bat after
  -#     vcvars32.bat according to the instructions for it.  This can also turn on
  -#     the 64-bit compiler, if your SDK has it.
  -#
  -# 3)  Targets are:
  -#	all       -- Builds everything.
  -#       <project> -- Builds the project (eg: nmake sample)
  -#	test      -- Builds and runs the test suite.
  -#	install   -- Installs the built binaries and libraries to $(INSTALLDIR)
  -#		     in an appropriate subdirectory.
  -#	clean/realclean/distclean -- varying levels of cleaning.
  -#
  -# 4)  Macros usable on the commandline:
  -#	INSTALLDIR=<path>
  -#		Sets where to install Tcl from the built binaries.
  -#		C:\Progra~1\Tcl is assumed when not specified.
  -#
  -#	OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none
  -#		Sets special options for the core.  The default is for none.
  -#		Any combination of the above may be used (comma separated).
  -#		'none' will over-ride everything to nothing.
  -#
  -#		static  =  Builds a static library of the core instead of a
  -#			   dll.  The shell will be static (and large), as well.
  -#		msvcrt  =  Effects the static option only to switch it from
  -#			   using libcmt(d) as the C runtime [by default] to
  -#			   msvcrt(d). This is useful for static embedding
  -#			   support.
  -#		staticpkg = Effects the static option only to switch
  -#			   tclshXX.exe to have the dde and reg extension linked
  -#			   inside it.
  -#		threads =  Turns on full multithreading support.
  -#		thrdalloc = Use the thread allocator (shared global free pool).
  -#		symbols =  Adds symbols for step debugging.
  -#		profile =  Adds profiling hooks.  Map file is assumed.
  -#		loimpact =  Adds a flag for how NT treats the heap to keep memory
  -#			   in use, low.  This is said to impact alloc performance.
  -#
  -#	STATS=memdbg,compdbg,none
  -#		Sets optional memory and bytecode compiler debugging code added
  -#		to the core.  The default is for none.  Any combination of the
  -#		above may be used (comma separated).  'none' will over-ride
  -#		everything to nothing.
  -#
  -#		memdbg   = Enables the debugging memory allocator.
  -#		compdbg  = Enables byte compilation logging.
  -#
  -#	MACHINE=(IX86|IA64|ALPHA)
  -#		Set the machine type used for the compiler, linker, and
  -#		resource compiler.  This hook is needed to tell the tools
  -#		when alternate platforms are requested.  IX86 is the default
  -#		when not specified.
  -#
  -#	TMP_DIR=<path>
  -#	OUT_DIR=<path>
  -#		Hooks to allow the intermediate and output directories to be
  -#		changed.  $(OUT_DIR) is assumed to be 
  -#		$(BINROOT)\(Release|Debug) based on if symbols are requested.
  -#		$(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
  -#
  -#	TESTPAT=<file>
  -#		Reads the tests requested to be run from this file.
  -#
  -#	CFG_ENCODING=encoding
  -#		name of encoding for configuration information. Defaults
  -#		to cp1252
  -#
  -# 5)  Examples:
  -#
  -#	Basic syntax of calling nmake looks like this:
  -#	nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
  -#
  -#                        Standard (no frills)
  -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
  -#       Setting environment for using Microsoft Visual C++ tools.
  -#       c:\tcl_src\win\>nmake -f makefile.vc all
  -#       c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
  -#
  -#                         Building for Win64
  -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
  -#       Setting environment for using Microsoft Visual C++ tools.
  -#       c:\tcl_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
  -#       Targeting Windows pre64 RETAIL
  -#       c:\tcl_src\win\>nmake -f makefile.vc MACHINE=IA64
  -#
  -#------------------------------------------------------------------------------
  -#==============================================================================
  -###############################################################################
  -#------------------------------------------------------------------------------
  -
  -!if !exist("makefile.vc")
  -MSG = ^
  -You must run this makefile only from the directory it is in.^
  -Please `cd` to its location first.
  -!error $(MSG)
  -!endif
  -
  -#-------------------------------------------------------------------------
  -# Project specific information (EDIT)
  -#
  -# You should edit this with the name and version of your project. This
  -# information is used to generate the name of the package library and
  -# it's install location.
  -#
  -# For example, the sample extension is  going to build sample04.dll and
  -# would install it into $(INSTALLDIR)\lib\sample04
  -#
  -# You need to specify the object files that need to be linked into your
  -# binary here.
  -#
  -#-------------------------------------------------------------------------
  -
  -PROJECT = rivet
  -!include "rules.vc"
  -
  -DOTVERSION      = 1.1
  -VERSION         = $(DOTVERSION:.=)
  -STUBPREFIX      = $(PROJECT)stub
  -
  -MOD_RIVET_OBJS = \
  -	$(TMP_DIR)\apache_multipart_buffer.obj \
  -	$(TMP_DIR)\apache_request.obj \
  -	$(TMP_DIR)\rivetChannel.obj \
  -	$(TMP_DIR)\rivetParser.obj \
  -	$(TMP_DIR)\rivetCore.obj \
  -	$(TMP_DIR)\mod_rivet.obj \
  -	$(TMP_DIR)\TclWebapache.obj
  -
  -RIVET_OBJS = \
  -	$(TMP_DIR)\rivetList.obj \
  -	$(TMP_DIR)\rivetWWW.obj \
  -	$(TMP_DIR)\rivetCrypt.obj \
  -	$(TMP_DIR)\rivetPkgInit.obj
  -
  -RIVETPARSER_OBJS = \
  -	$(TMP_DIR)\rivetParser.obj \
  -	$(TMP_DIR)\parserPkgInit.obj
  -
  -MOD_RIVET =  $(OUT_DIR)\mod_rivet.so
  -RIVET_LIB =  $(OUT_DIR)\rivet.dll
  -RIVETPARSER_LIB= $(OUT_DIR)\rivetparser.dll
  -
  -
  -APACHE_ROOT        = c:\opt\apache
  -APACHE_LIB_DIR     = $(APACHE_ROOT)\libexec
  -APACHE_INCLUDE_DIR = $(APACHE_ROOT)\include
  -APACHE_MODULES_DIR = $(APACHE_ROOT)\modules
  -
  -APACHE_LIB         = $(APACHE_LIB_DIR)\ApacheCore.lib
  -
  -#-------------------------------------------------------------------------
  -# Target names and paths ( shouldn't need changing )
  -#-------------------------------------------------------------------------
  -
  -BINROOT		= .
  -ROOT            = ..
  -
  -PRJIMPLIB	= $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
  -PRJLIBNAME	= $(PROJECT)$(VERSION)$(SUFX).$(EXT)
  -PRJLIB		= $(OUT_DIR)\$(PRJLIBNAME)
  -
  -PRJSTUBLIBNAME	= $(STUBPREFIX)$(VERSION).lib
  -PRJSTUBLIB	= $(OUT_DIR)\$(PRJSTUBLIBNAME)
  -
  -### Make sure we use backslash only.
  -LIB_INSTALL_DIR		= $(_INSTALLDIR)\lib
  -BIN_INSTALL_DIR		= $(_INSTALLDIR)\bin
  -DOC_INSTALL_DIR		= $(_INSTALLDIR)\doc
  -SCRIPT_INSTALL_DIR	= $(_INSTALLDIR)\lib\$(PROJECT)$(DOTVERSION)
  -INCLUDE_INSTALL_DIR	= $(_INSTALLDIR)\include
  -
  -### The following paths CANNOT have spaces in them.
  -GENERICDIR	= $(ROOT)\src
  -WINDIR		= $(ROOT)\win
  -LIBDIR          = $(ROOT)\rivet
  -DOCDIR		= $(ROOT)\doc
  -TOOLSDIR	= $(ROOT)\tools
  -COMPATDIR	= $(ROOT)\compat
  -
  -### Find a tclsh for testing and installation.
  -!if !exist("$(TCLSH)")
  -TCLSH           = $(BIN_INSTALL_DIR)\tclsh$(TCL_VERSION).exe
  -!endif
  -
  -#---------------------------------------------------------------------
  -# Compile flags
  -#---------------------------------------------------------------------
  -
  -!if !$(DEBUG)
  -!if $(OPTIMIZING)
  -### This cranks the optimization level to maximize speed
  -cdebug	= -O2 -Op -Gs
  -!else
  -cdebug	=
  -!endif
  -!else if "$(MACHINE)" == "IA64"
  -### Warnings are too many, can't support warnings into errors.
  -cdebug	= -Z7 -Od
  -!else
  -cdebug	= -Z7 -WX -Od
  -!endif
  -
  -### Declarations common to all compiler options
  -cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\
  -
  -!if $(PENT_0F_ERRATA)
  -cflags = $(cflags) -QI0f
  -!endif
  -
  -!if $(ITAN_B_ERRATA)
  -cflags = $(cflags) -QIA64_Bx
  -!endif
  -
  -!if $(MSVCRT)
  -!if $(DEBUG)
  -crt = -MDd
  -!else
  -crt = -MD
  -!endif
  -!else
  -!if $(DEBUG)
  -crt = -MTd
  -!else
  -crt = -MT
  -!endif
  -!endif
  -
  -TCL_INCLUDES	= -I"$(TCLDIR)\include" -I"$(WINDIR)" -I"$(GENERICDIR)"
  -BASE_CLFAGS	= $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) -I"$(APACHE_INCLUDE_DIR)" \
  -		  -DWIN32 -D_WIN32 -D_WINDOWS -DNAMEOFEXECUTABLE="\"$(TCLSH:\=/)\""
  -CON_CFLAGS	= $(cflags) $(cdebug) $(crt) -DCONSOLE
  -TCL_CFLAGS	= -DVERSION="\"$(DOTVERSION)\"" $(BASE_CLFAGS) $(OPTDEFINES)
  -
  -#---------------------------------------------------------------------
  -# Link flags
  -#---------------------------------------------------------------------
  -
  -!if $(DEBUG)
  -ldebug	= -debug:full -debugtype:cv
  -!else
  -ldebug	= -release -opt:ref -opt:icf,3
  -!endif
  -
  -### Declarations common to all linker options
  -lflags	= -nologo -machine:$(MACHINE) $(ldebug)
  -
  -!if $(PROFILE)
  -lflags	= $(lflags) -profile
  -!endif
  -
  -!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
  -### Align sections for PE size savings.
  -lflags	= $(lflags) -opt:nowin98
  -!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
  -### Align sections for speed in loading by choosing the virtual page size.
  -lflags	= $(lflags) -align:4096
  -!endif
  -
  -!if $(LOIMPACT)
  -lflags	= $(lflags) -ws:aggressive
  -!endif
  -
  -dlllflags = $(lflags) -dll
  -conlflags = $(lflags) -subsystem:console
  -guilflags = $(lflags) -subsystem:windows
  -baselibs   = "c:\opt\tcl\lib\tcl84.lib" #$(TCLIMPLIB)
  +baselibs   = $(TCLIMPLIB)
   
   #---------------------------------------------------------------------
   # TclTest flags
  
  
  
  1.2       +59 -1     tcl-rivet/win/nmakehlp.c
  
  Index: nmakehlp.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/win/nmakehlp.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- nmakehlp.c	5 Jul 2003 14:23:18 -0000	1.1
  +++ nmakehlp.c	22 Oct 2003 17:40:43 -0000	1.2
  @@ -4,6 +4,7 @@
    *	This is used to fix limitations within nmake and the environment.
    *
    * Copyright (c) 2002 by David Gravereaux.
  + * Copyright (c) 2003 by Patrick Thoyts
    *
    * See the file "license.terms" for information on usage and redistribution
    * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  @@ -13,6 +14,7 @@
    * ----------------------------------------------------------------------------
    */
   #include <windows.h>
  +#include <stdio.h>
   #pragma comment (lib, "user32.lib")
   #pragma comment (lib, "kernel32.lib")
   
  @@ -21,6 +23,7 @@
   int CheckForLinkerFeature (const char *option);
   int IsIn (const char *string, const char *substring);
   DWORD WINAPI ReadFromPipe (LPVOID args);
  +int GetVersionFromHeader(const char *tclh, const char *tkh);
   
   /* globals */
   typedef struct {
  @@ -74,6 +77,15 @@
   	    } else {
   		return IsIn(argv[2], argv[3]);
   	    }
  +	case 'v':
  +	    if (argc != 4) {
  +		chars = wsprintf(msg, "usage: %s -v <tcl.h> <tk.h>\n"
  +		    "Search for versions from the tcl and tk headers.",
  +		    argv[0]);
  +		WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, chars, &dwWritten, NULL);
  +		return 0;
  +	    }
  +	    return GetVersionFromHeader(argv[2], argv[3]);
   	}
       }
       chars = wsprintf(msg, "usage: %s -c|-l|-f ...\n"
  @@ -294,4 +306,50 @@
   IsIn (const char *string, const char *substring)
   {
       return (strstr(string, substring) != NULL);
  +}
  +
  +	
  +static double
  +ReadVersionFromHeader(const char *file, const char *macro)
  +{
  +    double d = 0.0;
  +    CHAR szBuffer[100];
  +    LPSTR p;
  +    DWORD cbBuffer = 100;
  +    FILE *fp = fopen(file, "r");
  +    if (fp != NULL) {
  +	while (fgets(szBuffer, cbBuffer, fp) != NULL) {
  +	    if ((p = strstr(szBuffer, macro)) != NULL) {
  +		while (*p && !isdigit(*p)) ++p;
  +		d = strtod(p, NULL);
  +		break;
  +	    }
  +	}
  +	fclose(fp);
  +    }
  +    return d;
  +}
  +
  +int
  +GetVersionFromHeader(const char *tclh, const char *tkh)
  +{
  +    double dTcl = 0.0, dTk = 0.0;
  +    
  +    if (tclh != NULL)
  +	dTcl = ReadVersionFromHeader(tclh, "TCL_VERSION");
  +    if (tkh != NULL)
  +	dTk = ReadVersionFromHeader(tkh, "TK_VERSION");
  +
  +    if (dTcl > 0 || dTk > 0) {
  +	FILE *ofp = fopen("version.vc", "w");
  +	if (dTcl > 0)
  +	    fprintf(ofp, "TCL_DOTVERSION\t= %0.1f\nTCL_VERSION\t= %u\n",
  +		    dTcl, (int)(dTcl * 10.0));
  +	if (dTk > 0)
  +	    fprintf(ofp, "TK_DOTVERSION\t= %0.1f\nTK_VERSION\t= %u\n",
  +		    dTk, (int)(dTk * 10.0));
  +	fclose(ofp);
  +	return 0;
  +    }
  +    return 1;
   }
  
  
  
  1.2       +70 -14    tcl-rivet/win/rules.vc
  
  Index: rules.vc
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/win/rules.vc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- rules.vc	5 Jul 2003 14:23:18 -0000	1.1
  +++ rules.vc	22 Oct 2003 17:40:43 -0000	1.2
  @@ -4,10 +4,14 @@
   #	Microsoft Visual C++ makefile include for decoding the commandline
   #	macros.  This file does not need editing to build Tcl.
   #
  +#	This version is modified from the Tcl source version to support
  +#	building extensions using nmake.
  +#
   # See the file "license.terms" for information on usage and redistribution
   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
   # 
   # Copyright (c) 2001-2002 David Gravereaux.
  +# Copyright (c) 2003 Patrick Thoyts
   #
   #------------------------------------------------------------------------------
   # RCS: @(#) $Id$
  @@ -310,9 +314,11 @@
   !if exist("$(_INSTALLDIR)\include\tcl.h")
   TCLINSTALL	= 1
   _TCLDIR		= $(_INSTALLDIR)
  +_TCL_H          = $(_INSTALLDIR)\include\tcl.h
  +TCLDIR          = $(_INSTALLDIR)
   !else
   MSG=^
  -Don't know where tcl.h is.  Set the TCLDIR macro.
  +Failed to find tcl.h.  Set the TCLDIR macro.
   !error $(MSG)
   !endif
   !else
  @@ -323,23 +329,18 @@
   TCLINSTALL	= 0
   !else
   MSG =^
  -Don't know where tcl.h is.  The TCLDIR macro doesn't appear correct.
  +Failed to find tcl.h.  The TCLDIR macro does not appear correct.
   !error $(MSG)
   !endif
  +_TCL_H          = $(_TCLDIR)\generic\tcl.h
   !endif
   
  -### TODO: add a command to nmakehlp.c to grep for Tcl's version from tcl.h.
  -### Because nmake can't return a string, we'll need to play games with return
  -### codes.  It might look something like this:
  -#!if [nmakehlp -g $(TCL.H)] == 81
  -#TCL_DOTVERSION	= 8.1
  -#!elseif [nmakehlp -g $(TCL.H)] == 82
  -#TCL_DOTVERSION	= 8.2
  -#...
  -#!endif
  -
  -TCL_DOTVERSION	= 8.4
  +!if [nmakehlp -v $(_TCL_H) ""] == 0
  +!include version.vc
  +!else
  +TCL_DOTVERSION  = 8.5
   TCL_VERSION	= $(TCL_DOTVERSION:.=)
  +!endif
   
   !if $(TCLINSTALL)
   TCLSH		= "$(_INSTALLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX).exe"
  @@ -350,6 +351,7 @@
   TCLDDELIB	= "$(_INSTALLDIR)\lib\tcldde12$(SUFX:t=).lib"
   COFFBASE	= \must\have\tcl\sources\to\build\this\target
   TCLTOOLSDIR	= \must\have\tcl\sources\to\build\this\target
  +TCL_INCLUDES    = -I"$(_INSTALLDIR)\include"
   !else
   TCLSH		= "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX).exe"
   TCLSTUBLIB	= "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
  @@ -359,9 +361,63 @@
   TCLDDELIB	= "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde12$(SUFX:t=).lib"
   COFFBASE	= "$(_TCLDIR)\win\coffbase.txt"
   TCLTOOLSDIR	= $(_TCLDIR)\tools
  +TCL_INCLUDES	= -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
  +!endif
  +
  +!endif
  +
  +#----------------------------------------------------------
  +# Get Tk info for building extensions.
  +#----------------------------------------------------------
  +
  +!if "$(PROJECT)" != "tcl" && "$(PROJECT)" != "tk"
  +
  +!if !defined(TKDIR)
  +!if exist("$(_INSTALLDIR)\include\tk.h")
  +TKINSTALL      = 1
  +_TKDIR         = $(_INSTALLDIR)
  +_TK_H          = $(_INSTALLDIR)\include\tk.h
  +TKDIR          = $(_INSTALLDIR)
  +!else
  +MSG =^
  +Failed to find tk.h. Set the TKDIR macro.
  +!error $(MSG)
  +!endif
  +!else
  +_TKDIR = $(TKDIR:/=\)
  +!if exist("$(_TKDIR)\include\tk.h")
  +TKINSTALL      = 1
  +!elseif exist("$(_TKDIR)\generic\tk.h")
  +TKINSTALL      = 0
  +!else
  +MSG =^
  +Failed to find tk.h. The TKDIR macro does not appear correct.
  +!error $(MSG)
  +!endif
  +_TK_H          = $(_TKDIR)\generic\tk.h
   !endif
   
  +!if [nmakehlp -v $(_TCL_H) $(_TK_H)] == 0
  +!include version.vc
  +!else
  +TK_DOTVERSION	= 8.5
  +TK_VERSION	= $(TK_DOTVERSION:.=)
  +!endif
  +
  +!if $(TKINSTALL)
  +WISH		= "$(_INSTALLDIR)\bin\wish$(TK_VERSION)$(SUFX).exe"
  +TKSTUBLIB	= "$(_INSTALLDIR)\lib\tkstub$(TK_VERSION).lib"
  +TKIMPLIB	= "$(_INSTALLDIR)\lib\tk$(TK_VERSION)$(SUFX).lib"
  +TK_INCLUDES     = -I"$(_INSTALLDIR)\include"
  +!else
  +WISH		= "$(_TKDIR)\win\$(BUILDDIRTOP)\wish$(TCL_VERSION)$(SUFX).exe"
  +TKSTUBLIB	= "$(_TKDIR)\win\$(BUILDDIRTOP)\tkstub$(TCL_VERSION).lib"
  +TKIMPLIB	= "$(_TKDIR)\win\$(BUILDDIRTOP)\tk$(TCL_VERSION)$(SUFX).lib"
  +TK_INCLUDES     = -I"$(_TKDIR)\generic" -I"$(_TKDIR)\win" -I"$(_TKDIR)\xlib"
   !endif
  +
  +!endif
  +
   
   
   #----------------------------------------------------------
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org