Tcl UDP

Check-in [9ce8fa7778]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Purged old comments
Timelines: family | ancestors | descendants | both | vc-reform
Files: files | file ages | folders
SHA1: 9ce8fa777812ab0b3fb221876a328bb409f626b4
User & Date: apnadkarni 2017-10-26 15:13:51
Context
2017-12-14
11:34
Latest version of nmake reform from Tcl Closed-Leaf check-in: 41602b0e71 user: apnadkarni tags: vc-reform
2017-10-26
15:13
Purged old comments check-in: 9ce8fa7778 user: apnadkarni tags: vc-reform
2017-10-16
13:17
Updated to latest Tcl rules check-in: b01a44a88a user: apnadkarni tags: vc-reform
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to win/makefile.vc.

     1         -# makefile.vc --                                               -*- Makefile -*-
            1  +#------------------------------------------------------------- -*- makefile -*-
     2      2   #
     3         -# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
            3  +# Makefile for tcludp
     4      4   #
     5         -# This makefile is based upon the Tcl 8.4 Makefile.vc and modified to 
     6         -# make it suitable as a general package makefile. Look for the word EDIT
     7         -# which marks sections that may need modification. As a minumum you will
     8         -# need to change the PROJECT, DOTVERSION and DLLOBJS variables to values
     9         -# relevant to your package.
            5  +# Basic build, test and install
            6  +#   nmake /f makefile.vc INSTALLDIR=c:\tcl
            7  +#   nmake /f makefile.vc INSTALLDIR=c:\tcl test
            8  +#   nmake /f makefile.vc INSTALLDIR=c:\tcl install
    10      9   #
           10  +# For other build options (debug, static etc.),
           11  +# See TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for
           12  +# detailed documentation.
           13  +# 
    11     14   # See the file "license.terms" for information on usage and redistribution
    12     15   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    13         -# 
    14         -# Copyright (c) 1995-1996 Sun Microsystems, Inc.
    15         -# Copyright (c) 1998-2000 Ajuba Solutions.
    16         -# Copyright (c) 2001 ActiveState Corporation.
    17         -# Copyright (c) 2001-2002 David Gravereaux.
    18         -# Copyright (c) 2003-2006 Pat Thoyts
    19         -#
    20         -#-------------------------------------------------------------------------
    21         -# RCS: @(#)$Id$
    22         -#-------------------------------------------------------------------------
    23         -
    24         -# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
    25         -# or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define
    26         -# VCINSTALLDIR instead. The MSVC Toolkit release defines yet another.
    27         -!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(MSSDK) && !defined(VCINSTALLDIR) && !defined(VCToolkitInstallDir)
    28         -MSG = ^
    29         -You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
    30         -Platform SDK first to setup the environment.  Jump to this line to read^
    31         -the build instructions.
    32         -!error $(MSG)
    33         -!endif
    34         -
    35         -#------------------------------------------------------------------------------
    36         -# HOW TO USE this makefile:
    37         -#
    38         -# 1)  It is now necessary to have %MSVCDir% set in the environment.  This is
    39         -#     used  as a check to see if vcvars32.bat had been run prior to running
    40         -#     nmake or during the installation of Microsoft Visual C++, MSVCDir had
    41         -#     been set globally and the PATH adjusted.  Either way is valid.
    42         -#
    43         -#     You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
    44         -#     directory to setup the proper environment, if needed, for your current
    45         -#     setup.  This is a needed bootstrap requirement and allows the swapping of
    46         -#     different environments to be easier.
    47         -#
    48         -# 2)  To use the Platform SDK (not expressly needed), run setenv.bat after
    49         -#     vcvars32.bat according to the instructions for it.  This can also turn on
    50         -#     the 64-bit compiler, if your SDK has it.
    51         -#
    52         -# 3)  Targets are:
    53         -#	all       -- Builds everything.
    54         -#       <project> -- Builds the project (eg: nmake sample)
    55         -#	test      -- Builds and runs the test suite.
    56         -#	install   -- Installs the built binaries and libraries to $(INSTALLDIR)
    57         -#		     in an appropriate subdirectory.
    58         -#	clean/realclean/distclean -- varying levels of cleaning.
    59         -#
    60         -# 4)  Macros usable on the commandline:
    61         -#	INSTALLDIR=<path>
    62         -#		Sets where to install Tcl from the built binaries.
    63         -#		C:\Progra~1\Tcl is assumed when not specified.
    64         -#
    65         -#	OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none
    66         -#		Sets special options for the core.  The default is for none.
    67         -#		Any combination of the above may be used (comma separated).
    68         -#		'none' will over-ride everything to nothing.
    69         -#
    70         -#		static  =  Builds a static library of the core instead of a
    71         -#			   dll.  The shell will be static (and large), as well.
    72         -#		msvcrt  =  Effects the static option only to switch it from
    73         -#			   using libcmt(d) as the C runtime [by default] to
    74         -#			   msvcrt(d). This is useful for static embedding
    75         -#			   support.
    76         -#		staticpkg = Effects the static option only to switch
    77         -#			   tclshXX.exe to have the dde and reg extension linked
    78         -#			   inside it.
    79         -#		nothreads = Turns off multithreading support (not recommended)
    80         -#		thrdalloc = Use the thread allocator (shared global free pool).
    81         -#		symbols =  Adds symbols for step debugging.
    82         -#		profile =  Adds profiling hooks.  Map file is assumed.
    83         -#		loimpact =  Adds a flag for how NT treats the heap to keep memory
    84         -#			   in use, low.  This is said to impact alloc performance.
    85         -#
    86         -#	STATS=memdbg,compdbg,none
    87         -#		Sets optional memory and bytecode compiler debugging code added
    88         -#		to the core.  The default is for none.  Any combination of the
    89         -#		above may be used (comma separated).  'none' will over-ride
    90         -#		everything to nothing.
    91         -#
    92         -#		memdbg   = Enables the debugging memory allocator.
    93         -#		compdbg  = Enables byte compilation logging.
    94         -#
    95         -#	MACHINE=(IX86|IA64|ALPHA|AMD64)
    96         -#		Set the machine type used for the compiler, linker, and
    97         -#		resource compiler.  This hook is needed to tell the tools
    98         -#		when alternate platforms are requested.  IX86 is the default
    99         -#		when not specified. If the CPU environment variable has been
   100         -#		set (ie: recent Platform SDK) then MACHINE is set from CPU.
   101         -#
   102         -#	TMP_DIR=<path>
   103         -#	OUT_DIR=<path>
   104         -#		Hooks to allow the intermediate and output directories to be
   105         -#		changed.  $(OUT_DIR) is assumed to be 
   106         -#		$(BINROOT)\(Release|Debug) based on if symbols are requested.
   107         -#		$(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
   108         -#
   109         -#	TESTPAT=<file>
   110         -#		Reads the tests requested to be run from this file.
   111         -#
   112         -#	CFG_ENCODING=encoding
   113         -#		name of encoding for configuration information. Defaults
   114         -#		to cp1252
   115         -#
   116         -# 5)  Examples:
   117         -#
   118         -#	Basic syntax of calling nmake looks like this:
   119         -#	nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
   120         -#
   121         -#                        Standard (no frills)
   122         -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
   123         -#       Setting environment for using Microsoft Visual C++ tools.
   124         -#       c:\tcl_src\win\>nmake -f makefile.vc all
   125         -#       c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
   126         -#
   127         -#                         Building for Win64
   128         -#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
   129         -#       Setting environment for using Microsoft Visual C++ tools.
   130         -#       c:\tcl_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
   131         -#       Targeting Windows pre64 RETAIL
   132         -#       c:\tcl_src\win\>nmake -f makefile.vc MACHINE=IA64
   133     16   #
   134     17   #------------------------------------------------------------------------------
   135         -#==============================================================================
   136         -###############################################################################
   137         -#------------------------------------------------------------------------------
   138         -
   139         -!if !exist("makefile.vc")
   140         -MSG = ^
   141         -You must run this makefile only from the directory it is in.^
   142         -Please `cd` to its location first.
   143         -!error $(MSG)
   144         -!endif
   145     18   
   146     19   PROJECT = udp
   147     20   !include "rules-ext.vc"
   148     21   
   149     22   PRJ_OBJS = $(TMP_DIR)\udp_tcl.obj
           23  +PRJ_DEFINES     = -D_CRT_SECURE_NO_WARNINGS \
           24  +		  -D_WINSOCK_DEPRECATED_NO_WARNINGS
           25  +PRJ_LIBS	= ws2_32.lib
   150     26   
   151     27   PRJ_DOCS = $(OUT_DIR)\udp.html
   152     28   
   153         -#-------------------------------------------------------------------------
   154         -# Target names and paths ( shouldn't need changing )
   155         -#-------------------------------------------------------------------------
   156         -
   157         -
   158         -PRJ_DEFINES     = -D_CRT_SECURE_NO_WARNINGS \
   159         -		  -D_WINSOCK_DEPRECATED_NO_WARNINGS
   160         -PRJ_LIBS	= ws2_32.lib
   161     29   
   162     30   # Define the standard targets
   163     31   !include "$(_RULESDIR)\targets.vc"
   164     32   
   165         -#---------------------------------------------------------------------
   166         -# Project specific targets (EDIT)
   167         -#---------------------------------------------------------------------
           33  +# Project specific targets
   168     34   
   169         -doc:        setup $(PRJ_DOCS)
   170         -install:    install-docs install-demos
           35  +install:    install-docs default-install-demos
   171     36   pkgindex:   default-pkgindex
   172     37   
   173         -test: setup $(PROJECT)
   174         -        $(TCLSH) <<
   175         -load $(PRJLIB:\=/)
   176         -cd {$(ROOT)/tests}
   177         -set argv "$(TESTFLAGS)"
   178         -source all.tcl
   179         -<<
   180         -
   181         -#---------------------------------------------------------------------
   182         -# Implicit rules
   183         -#---------------------------------------------------------------------
   184         -
           38  +# Implicit rule to generate html from man files
   185     39   DOC2HTML = $(TCLSH) "$(TOOLSDIR)\mpexpand.tcl" html
   186         -
   187     40   {$(DOCDIR)}.man{$(OUT_DIR)}.html:
   188     41   	$(DOC2HTML) $< [email protected]
   189     42           @$(TCLSH) <<
   190     43   set name $(@:\=/)
   191     44   set f [open $$name r]; set d [read $$f]; close $$f
   192     45   set d [regsub {</head>} $$d {<link rel="stylesheet" href="manpage.css" type="text/css"></head>}]
   193     46   set f [open $$name w]; puts -nonewline $$f $$d; close $$f
   194     47   <<
   195     48   
   196     49   .SUFFIXES: .man
   197     50   
   198         -install-docs: $(PRJ_DOCS)
           51  +# Cannot use default-install-docs because we generate docs on the fly
           52  +doc:        setup $(PRJ_DOCS)
           53  +install-docs: doc
   199     54   	@echo Installing documentation to '$(DOC_INSTALL_DIR)'
   200     55   	@if not exist $(DOC_INSTALL_DIR)\NUL mkdir "$(DOC_INSTALL_DIR)"
   201     56   	@$(CPY) "$(DOCDIR)\manpage.css" "$(DOC_INSTALL_DIR)\" >NUL
   202     57   	@for %i in ($(PRJ_DOCS)) do @$(CPY) %i "$(DOC_INSTALL_DIR)\" > NUL
   203     58   
   204         -install-demos:
   205         -	@echo Installing demos to '$(DEMO_INSTALL_DIR)'
   206         -	@if not exist $(DEMO_INSTALL_DIR)\nul mkdir "$(DEMO_INSTALL_DIR)"
   207         -	@$(CPY) $(DEMODIR)\*.tcl "$(DEMO_INSTALL_DIR)" >NUL
   208     59