0000: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d #---------------
0010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 20 2d -------------- -
0040: 2a 2d 20 6d 61 6b 65 66 69 6c 65 20 2d 2a 2d 0d *- makefile -*-.
0050: 0a 23 20 72 75 6c 65 73 2e 76 63 20 2d 2d 0d 0a .# rules.vc --..
0060: 23 0d 0a 23 20 50 61 72 74 20 6f 66 20 74 68 65 #..# Part of the
0070: 20 6e 6d 61 6b 65 20 62 61 73 65 64 20 62 75 69 nmake based bui
0080: 6c 64 20 73 79 73 74 65 6d 20 66 6f 72 20 54 63 ld system for Tc
0090: 6c 20 61 6e 64 20 69 74 73 20 65 78 74 65 6e 73 l and its extens
00a0: 69 6f 6e 73 2e 0d 0a 23 20 54 68 69 73 20 66 69 ions...# This fi
00b0: 6c 65 20 64 6f 65 73 20 61 6c 6c 20 74 68 65 20 le does all the
00c0: 68 61 72 64 20 77 6f 72 6b 20 69 6e 20 74 65 72 hard work in ter
00d0: 6d 73 20 6f 66 20 70 61 72 73 69 6e 67 20 62 75 ms of parsing bu
00e0: 69 6c 64 20 6f 70 74 69 6f 6e 73 2c 0d 0a 23 20 ild options,..#
00f0: 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 compiler switche
0100: 73 2c 20 64 65 66 69 6e 69 6e 67 20 63 6f 6d 6d s, defining comm
0110: 6f 6e 20 74 61 72 67 65 74 73 20 61 6e 64 20 6d on targets and m
0120: 61 63 72 6f 73 2e 20 54 68 65 20 54 63 6c 20 6d acros. The Tcl m
0130: 61 6b 65 66 69 6c 65 0d 0a 23 20 64 69 72 65 63 akefile..# direc
0140: 74 6c 79 20 69 6e 63 6c 75 64 65 73 20 74 68 69 tly includes thi
0150: 73 2e 20 45 78 74 65 6e 73 69 6f 6e 73 20 69 6e s. Extensions in
0160: 63 6c 75 64 65 20 69 74 20 76 69 61 20 22 72 75 clude it via "ru
0170: 6c 65 73 2d 65 78 74 2e 76 63 22 2e 0d 0a 23 0d les-ext.vc"...#.
0180: 0a 23 20 53 65 65 20 54 49 50 20 34 37 37 20 28 .# See TIP 477 (
0190: 68 74 74 70 73 3a 2f 2f 63 6f 72 65 2e 74 63 6c https://core.tcl
01a0: 2d 6c 61 6e 67 2e 6f 72 67 2f 74 69 70 73 2f 64 -lang.org/tips/d
01b0: 6f 63 2f 6d 61 69 6e 2f 74 69 70 2f 34 37 37 2e oc/main/tip/477.
01c0: 6d 64 29 20 66 6f 72 0d 0a 23 20 64 65 74 61 69 md) for..# detai
01d0: 6c 65 64 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f led documentatio
01e0: 6e 2e 0d 0a 23 0d 0a 23 20 53 65 65 20 74 68 65 n...#..# See the
01f0: 20 66 69 6c 65 20 22 6c 69 63 65 6e 73 65 2e 74 file "license.t
0200: 65 72 6d 73 22 20 66 6f 72 20 69 6e 66 6f 72 6d erms" for inform
0210: 61 74 69 6f 6e 20 6f 6e 20 75 73 61 67 65 20 61 ation on usage a
0220: 6e 64 20 72 65 64 69 73 74 72 69 62 75 74 69 6f nd redistributio
0230: 6e 0d 0a 23 20 6f 66 20 74 68 69 73 20 66 69 6c n..# of this fil
0240: 65 2c 20 61 6e 64 20 66 6f 72 20 61 20 44 49 53 e, and for a DIS
0250: 43 4c 41 49 4d 45 52 20 4f 46 20 41 4c 4c 20 57 CLAIMER OF ALL W
0260: 41 52 52 41 4e 54 49 45 53 2e 0d 0a 23 0d 0a 23 ARRANTIES...#..#
0270: 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 Copyright (c) 2
0280: 30 30 31 2d 32 30 30 33 20 44 61 76 69 64 20 47 001-2003 David G
0290: 72 61 76 65 72 65 61 75 78 2e 0d 0a 23 20 43 6f ravereaux...# Co
02a0: 70 79 72 69 67 68 74 20 28 63 29 20 32 30 30 33 pyright (c) 2003
02b0: 2d 32 30 30 38 20 50 61 74 72 69 63 6b 20 54 68 -2008 Patrick Th
02c0: 6f 79 74 73 0d 0a 23 20 43 6f 70 79 72 69 67 68 oyts..# Copyrigh
02d0: 74 20 28 63 29 20 32 30 31 37 20 20 20 20 20 20 t (c) 2017
02e0: 41 73 68 6f 6b 20 50 2e 20 4e 61 64 6b 61 72 6e Ashok P. Nadkarn
02f0: 69 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d i..#------------
0300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0330: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0340: 2d 2d 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f 52 --....!ifndef _R
0350: 55 4c 45 53 5f 56 43 0d 0a 5f 52 55 4c 45 53 5f ULES_VC.._RULES_
0360: 56 43 20 3d 20 31 0d 0a 0d 0a 23 20 54 68 65 20 VC = 1....# The
0370: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
0380: 20 64 65 66 69 6e 65 20 74 68 65 20 76 65 72 73 define the vers
0390: 69 6f 6e 20 6f 66 20 74 68 65 20 72 75 6c 65 73 ion of the rules
03a0: 2e 76 63 20 6e 6d 61 6b 65 20 62 75 69 6c 64 20 .vc nmake build
03b0: 73 79 73 74 65 6d 0d 0a 23 20 46 6f 72 20 6d 6f system..# For mo
03c0: 64 69 66 69 63 61 74 69 6f 6e 73 20 74 68 61 74 difications that
03d0: 20 61 72 65 20 6e 6f 74 20 62 61 63 6b 77 61 72 are not backwar
03e0: 64 2d 63 6f 6d 70 61 74 69 62 6c 65 2c 20 79 6f d-compatible, yo
03f0: 75 20 2a 6d 75 73 74 2a 20 63 68 61 6e 67 65 0d u *must* change.
0400: 0a 23 20 74 68 65 20 6d 61 6a 6f 72 20 76 65 72 .# the major ver
0410: 73 69 6f 6e 2e 0d 0a 52 55 4c 45 53 5f 56 45 52 sion...RULES_VER
0420: 53 49 4f 4e 5f 4d 41 4a 4f 52 20 3d 20 31 0d 0a SION_MAJOR = 1..
0430: 52 55 4c 45 53 5f 56 45 52 53 49 4f 4e 5f 4d 49 RULES_VERSION_MI
0440: 4e 4f 52 20 3d 20 31 31 0d 0a 0d 0a 23 20 54 68 NOR = 11....# Th
0450: 65 20 50 52 4f 4a 45 43 54 20 6d 61 63 72 6f 20 e PROJECT macro
0460: 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 20 must be defined
0470: 62 79 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 by parent makefi
0480: 6c 65 2e 0d 0a 21 69 66 20 22 24 28 50 52 4f 4a le...!if "$(PROJ
0490: 45 43 54 29 22 20 3d 3d 20 22 22 0d 0a 21 65 72 ECT)" == ""..!er
04a0: 72 6f 72 20 2a 2a 2a 20 45 72 72 6f 72 3a 20 4d ror *** Error: M
04b0: 61 63 72 6f 20 50 52 4f 4a 45 43 54 20 6e 6f 74 acro PROJECT not
04c0: 20 64 65 66 69 6e 65 64 21 20 50 6c 65 61 73 65 defined! Please
04d0: 20 64 65 66 69 6e 65 20 69 74 20 62 65 66 6f 72 define it befor
04e0: 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 e including rule
04f0: 73 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a s.vc..!endif....
0500: 21 69 66 20 22 24 28 50 52 4a 5f 50 41 43 4b 41 !if "$(PRJ_PACKA
0510: 47 45 5f 54 43 4c 4e 41 4d 45 29 22 20 3d 3d 20 GE_TCLNAME)" ==
0520: 22 22 0d 0a 50 52 4a 5f 50 41 43 4b 41 47 45 5f ""..PRJ_PACKAGE_
0530: 54 43 4c 4e 41 4d 45 20 3d 20 24 28 50 52 4f 4a TCLNAME = $(PROJ
0540: 45 43 54 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ECT)..!endif....
0550: 23 20 41 6c 73 6f 20 73 70 65 63 69 61 6c 20 63 # Also special c
0560: 61 73 65 20 54 63 6c 20 61 6e 64 20 54 6b 20 74 ase Tcl and Tk t
0570: 6f 20 73 61 76 65 20 73 6f 6d 65 20 74 79 70 69 o save some typi
0580: 6e 67 20 6c 61 74 65 72 0d 0a 44 4f 49 4e 47 5f ng later..DOING_
0590: 54 43 4c 20 3d 20 30 0d 0a 44 4f 49 4e 47 5f 54 TCL = 0..DOING_T
05a0: 4b 20 20 3d 20 30 0d 0a 21 69 66 20 22 24 28 50 K = 0..!if "$(P
05b0: 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 74 63 6c ROJECT)" == "tcl
05c0: 22 0d 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 31 "..DOING_TCL = 1
05d0: 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 50 52 4f ..!elseif "$(PRO
05e0: 4a 45 43 54 29 22 20 3d 3d 20 22 74 6b 22 0d 0a JECT)" == "tk"..
05f0: 44 4f 49 4e 47 5f 54 4b 20 3d 20 31 0d 0a 21 65 DOING_TK = 1..!e
0600: 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 ndif....!ifndef
0610: 4e 45 45 44 5f 54 4b 0d 0a 23 20 42 61 63 6b 77 NEED_TK..# Backw
0620: 61 72 64 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 ards compatibili
0630: 74 79 0d 0a 21 69 66 64 65 66 20 50 52 4f 4a 45 ty..!ifdef PROJE
0640: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 0d 0a CT_REQUIRES_TK..
0650: 4e 45 45 44 5f 54 4b 20 3d 20 24 28 50 52 4f 4a NEED_TK = $(PROJ
0660: 45 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 29 ECT_REQUIRES_TK)
0670: 0d 0a 21 65 6c 73 65 0d 0a 4e 45 45 44 5f 54 4b ..!else..NEED_TK
0680: 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 = 0..!endif..!e
0690: 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 ndif....!ifndef
06a0: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 0d NEED_TCL_SOURCE.
06b0: 0a 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 .NEED_TCL_SOURCE
06c0: 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a = 0..!endif....
06d0: 21 69 66 64 65 66 20 4e 45 45 44 5f 54 4b 5f 53 !ifdef NEED_TK_S
06e0: 4f 55 52 43 45 0d 0a 21 69 66 20 24 28 4e 45 45 OURCE..!if $(NEE
06f0: 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a 4e 45 D_TK_SOURCE)..NE
0700: 45 44 5f 54 4b 20 3d 20 31 0d 0a 21 65 6e 64 69 ED_TK = 1..!endi
0710: 66 0d 0a 21 65 6c 73 65 0d 0a 4e 45 45 44 5f 54 f..!else..NEED_T
0720: 4b 5f 53 4f 55 52 43 45 20 3d 20 30 0d 0a 21 65 K_SOURCE = 0..!e
0730: 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 ndif....########
0740: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0750: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0760: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0770: 23 23 23 23 23 23 23 23 0d 0a 23 20 4e 6d 61 6b ########..# Nmak
0780: 65 20 69 73 20 61 20 70 72 65 74 74 79 20 77 65 e is a pretty we
0790: 61 6b 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 69 ak environment i
07a0: 6e 20 73 79 6e 74 61 78 20 61 6e 64 20 63 61 70 n syntax and cap
07b0: 61 62 69 6c 69 74 69 65 73 0d 0a 23 20 73 6f 20 abilities..# so
07c0: 74 68 69 73 20 66 69 6c 65 20 69 73 20 6e 65 63 this file is nec
07d0: 65 73 73 61 72 69 6c 79 20 76 65 72 62 6f 73 65 essarily verbose
07e0: 2e 20 49 74 27 73 20 62 72 6f 6b 65 6e 20 64 6f . It's broken do
07f0: 77 6e 20 69 6e 74 6f 0d 0a 23 20 74 68 65 20 66 wn into..# the f
0800: 6f 6c 6c 6f 77 69 6e 67 20 70 61 72 74 73 2e 0d ollowing parts..
0810: 0a 23 0d 0a 23 20 30 2e 20 53 61 6e 69 74 79 20 .#..# 0. Sanity
0820: 63 68 65 63 6b 20 74 68 61 74 20 63 6f 6d 70 69 check that compi
0830: 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 ler environment
0840: 69 73 20 73 65 74 20 75 70 20 61 6e 64 20 69 6e is set up and in
0850: 69 74 69 61 6c 69 7a 65 0d 0a 23 20 20 20 20 61 itialize..# a
0860: 6e 79 20 62 75 69 6c 74 2d 69 6e 20 73 65 74 74 ny built-in sett
0870: 69 6e 67 73 20 66 72 6f 6d 20 74 68 65 20 70 61 ings from the pa
0880: 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 0d 0a 23 rent makefile..#
0890: 20 31 2e 20 46 69 72 73 74 20 64 65 66 69 6e 65 1. First define
08a0: 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20 74 6f the external to
08b0: 6f 6c 73 20 75 73 65 64 20 66 6f 72 20 63 6f 6d ols used for com
08c0: 70 69 6c 69 6e 67 2c 20 63 6f 70 79 69 6e 67 20 piling, copying
08d0: 65 74 63 2e 0d 0a 23 20 20 20 20 61 73 20 74 68 etc...# as th
08e0: 69 73 20 69 73 20 69 6e 64 65 70 65 6e 64 65 6e is is independen
08f0: 74 20 6f 66 20 65 76 65 72 79 74 68 69 6e 67 20 t of everything
0900: 65 6c 73 65 2e 0d 0a 23 20 32 2e 20 46 69 67 75 else...# 2. Figu
0910: 72 65 20 6f 75 74 20 6f 75 72 20 62 75 69 6c 64 re out our build
0920: 20 73 74 72 75 63 74 75 72 65 20 69 6e 20 74 65 structure in te
0930: 72 6d 73 20 6f 66 20 74 68 65 20 64 69 72 65 63 rms of the direc
0940: 74 6f 72 79 2c 20 77 68 65 74 68 65 72 0d 0a 23 tory, whether..#
0950: 20 20 20 20 77 65 20 61 72 65 20 62 75 69 6c 64 we are build
0960: 69 6e 67 20 54 63 6c 20 6f 72 20 61 6e 20 65 78 ing Tcl or an ex
0970: 74 65 6e 73 69 6f 6e 2c 20 65 74 63 2e 0d 0a 23 tension, etc...#
0980: 20 33 2e 20 44 65 74 65 72 6d 69 6e 65 20 74 68 3. Determine th
0990: 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c e compiler and l
09a0: 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 0d 0a inker versions..
09b0: 23 20 34 2e 20 42 75 69 6c 64 20 74 68 65 20 6e # 4. Build the n
09c0: 6d 61 6b 65 68 6c 70 20 68 65 6c 70 65 72 20 61 makehlp helper a
09d0: 70 70 6c 69 63 61 74 69 6f 6e 0d 0a 23 20 35 2e pplication..# 5.
09e0: 20 44 65 74 65 72 6d 69 6e 65 20 74 68 65 20 73 Determine the s
09f0: 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 6c 65 upported compile
0a00: 72 20 6f 70 74 69 6f 6e 73 20 61 6e 64 20 66 65 r options and fe
0a10: 61 74 75 72 65 73 0d 0a 23 20 36 2e 20 45 78 74 atures..# 6. Ext
0a20: 72 61 63 74 20 54 63 6c 2c 20 54 6b 2c 20 61 6e ract Tcl, Tk, an
0a30: 64 20 70 6f 73 73 69 62 6c 79 20 65 78 74 65 6e d possibly exten
0a40: 73 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e 20 6e sions, version n
0a50: 75 6d 62 65 72 73 20 66 72 6f 6d 20 74 68 65 0d umbers from the.
0a60: 0a 23 20 20 20 20 68 65 61 64 65 72 73 0d 0a 23 .# headers..#
0a70: 20 37 2e 20 50 61 72 73 65 20 74 68 65 20 4f 50 7. Parse the OP
0a80: 54 53 20 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 TS macro value f
0a90: 6f 72 20 75 73 65 72 2d 73 70 65 63 69 66 69 65 or user-specifie
0aa0: 64 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 d build configur
0ab0: 61 74 69 6f 6e 0d 0a 23 20 38 2e 20 50 61 72 73 ation..# 8. Pars
0ac0: 65 20 74 68 65 20 53 54 41 54 53 20 6d 61 63 72 e the STATS macr
0ad0: 6f 20 76 61 6c 75 65 20 66 6f 72 20 73 74 61 74 o value for stat
0ae0: 69 73 74 69 63 73 20 69 6e 73 74 72 75 6d 65 6e istics instrumen
0af0: 74 61 74 69 6f 6e 0d 0a 23 20 39 2e 20 50 61 72 tation..# 9. Par
0b00: 73 65 20 74 68 65 20 43 48 45 43 4b 53 20 6d 61 se the CHECKS ma
0b10: 63 72 6f 20 66 6f 72 20 61 64 64 69 74 69 6f 6e cro for addition
0b20: 61 6c 20 63 6f 6d 70 69 6c 61 74 69 6f 6e 20 63 al compilation c
0b30: 68 65 63 6b 73 0d 0a 23 20 31 30 2e 20 42 61 73 hecks..# 10. Bas
0b40: 65 64 20 6f 6e 20 74 68 69 73 20 73 65 6c 65 63 ed on this selec
0b50: 74 65 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ted configuratio
0b60: 6e 2c 20 63 6f 6e 73 74 72 75 63 74 20 74 68 65 n, construct the
0b70: 20 6f 75 74 70 75 74 0d 0a 23 20 20 20 20 20 64 output..# d
0b80: 69 72 65 63 74 6f 72 79 20 61 6e 64 20 66 69 6c irectory and fil
0b90: 65 20 70 61 74 68 73 0d 0a 23 20 31 31 2e 20 43 e paths..# 11. C
0ba0: 6f 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 74 onstruct the pat
0bb0: 68 73 20 77 68 65 72 65 20 74 68 65 20 70 61 63 hs where the pac
0bc0: 6b 61 67 65 20 69 73 20 74 6f 20 62 65 20 69 6e kage is to be in
0bd0: 73 74 61 6c 6c 65 64 0d 0a 23 20 31 32 2e 20 53 stalled..# 12. S
0be0: 65 74 20 75 70 20 74 68 65 20 61 63 74 75 61 6c et up the actual
0bf0: 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 options passed
0c00: 74 6f 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 to compiler and
0c10: 6c 69 6e 6b 65 72 20 62 61 73 65 64 0d 0a 23 20 linker based..#
0c20: 20 20 20 20 6f 6e 20 74 68 65 20 69 6e 66 6f 72 on the infor
0c30: 6d 61 74 69 6f 6e 20 67 61 74 68 65 72 65 64 20 mation gathered
0c40: 61 62 6f 76 65 2e 0d 0a 23 20 31 33 2e 20 44 65 above...# 13. De
0c50: 66 69 6e 65 20 73 6f 6d 65 20 73 74 61 6e 64 61 fine some standa
0c60: 72 64 20 62 75 69 6c 64 20 74 61 72 67 65 74 73 rd build targets
0c70: 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 and implicit ru
0c80: 6c 65 73 2e 20 54 68 65 73 65 20 6d 61 79 0d 0a les. These may..
0c90: 23 20 20 20 20 20 62 65 20 6f 70 74 69 6f 6e 61 # be optiona
0ca0: 6c 6c 79 20 64 69 73 61 62 6c 65 64 20 62 79 20 lly disabled by
0cb0: 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 the parent makef
0cc0: 69 6c 65 2e 0d 0a 23 20 31 34 2e 20 28 46 6f 72 ile...# 14. (For
0cd0: 20 65 78 74 65 6e 73 69 6f 6e 73 20 6f 6e 6c 79 extensions only
0ce0: 2e 29 20 43 6f 6d 70 61 72 65 20 74 68 65 20 63 .) Compare the c
0cf0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 66 20 onfiguration of
0d00: 74 68 65 20 74 61 72 67 65 74 0d 0a 23 20 20 20 the target..#
0d10: 20 20 54 63 6c 20 61 6e 64 20 74 68 65 20 65 78 Tcl and the ex
0d20: 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 77 61 72 tensions and war
0d30: 6e 20 61 67 61 69 6e 73 74 20 64 69 73 63 72 65 n against discre
0d40: 70 61 6e 63 69 65 73 2e 0d 0a 23 0d 0a 23 20 4f pancies...#..# O
0d50: 6e 65 20 66 69 6e 61 6c 20 6e 6f 74 65 20 61 62 ne final note ab
0d60: 6f 75 74 20 74 68 65 20 6d 61 63 72 6f 20 6e 61 out the macro na
0d70: 6d 65 73 20 75 73 65 64 2e 20 54 68 65 79 20 61 mes used. They a
0d80: 72 65 20 61 73 20 74 68 65 79 20 61 72 65 0d 0a re as they are..
0d90: 23 20 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c # for historical
0da0: 20 72 65 61 73 6f 6e 73 2e 20 57 65 20 77 6f 75 reasons. We wou
0db0: 6c 64 20 6c 69 6b 65 20 6c 65 67 61 63 79 20 65 ld like legacy e
0dc0: 78 74 65 6e 73 69 6f 6e 73 20 74 6f 0d 0a 23 20 xtensions to..#
0dd0: 63 6f 6e 74 69 6e 75 65 20 74 6f 20 77 6f 72 6b continue to work
0de0: 20 77 69 74 68 20 74 68 69 73 20 6d 61 6b 65 20 with this make
0df0: 69 6e 63 6c 75 64 65 20 66 69 6c 65 20 73 6f 20 include file so
0e00: 62 65 20 77 61 72 79 20 6f 66 0d 0a 23 20 63 68 be wary of..# ch
0e10: 61 6e 67 69 6e 67 20 74 68 65 6d 20 66 6f 72 20 anging them for
0e20: 63 6f 6e 73 69 73 74 65 6e 63 79 20 6f 72 20 63 consistency or c
0e30: 6c 61 72 69 74 79 2e 0d 0a 0d 0a 23 20 30 2e 20 larity.....# 0.
0e40: 53 61 6e 69 74 79 20 63 68 65 63 6b 20 63 6f 6d Sanity check com
0e50: 70 69 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e piler environmen
0e60: 74 0d 0a 0d 0a 23 20 43 68 65 63 6b 20 74 6f 20 t....# Check to
0e70: 73 65 65 20 77 65 20 61 72 65 20 63 6f 6e 66 69 see we are confi
0e80: 67 75 72 65 64 20 74 6f 20 62 75 69 6c 64 20 77 gured to build w
0e90: 69 74 68 20 4d 53 56 43 20 28 4d 53 44 45 56 44 ith MSVC (MSDEVD
0ea0: 49 52 2c 20 4d 53 56 43 44 49 52 20 6f 72 0d 0a IR, MSVCDIR or..
0eb0: 23 20 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 # VCINSTALLDIR)
0ec0: 6f 72 20 77 69 74 68 20 74 68 65 20 4d 53 20 50 or with the MS P
0ed0: 6c 61 74 66 6f 72 6d 20 53 44 4b 20 28 4d 53 53 latform SDK (MSS
0ee0: 44 4b 20 6f 72 20 57 69 6e 64 6f 77 73 53 44 4b DK or WindowsSDK
0ef0: 44 69 72 29 0d 0a 0d 0a 21 69 66 20 21 64 65 66 Dir)....!if !def
0f00: 69 6e 65 64 28 4d 53 44 45 56 44 49 52 29 20 26 ined(MSDEVDIR) &
0f10: 26 20 21 64 65 66 69 6e 65 64 28 4d 53 56 43 44 & !defined(MSVCD
0f20: 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 IR) && !defined(
0f30: 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 26 26 VCINSTALLDIR) &&
0f40: 20 21 64 65 66 69 6e 65 64 28 4d 53 53 44 4b 29 !defined(MSSDK)
0f50: 20 26 26 20 21 64 65 66 69 6e 65 64 28 57 49 4e && !defined(WIN
0f60: 44 4f 57 53 53 44 4b 44 49 52 29 0d 0a 4d 53 47 DOWSSDKDIR)..MSG
0f70: 20 3d 20 5e 0d 0a 56 69 73 75 61 6c 20 43 2b 2b = ^..Visual C++
0f80: 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 72 6f compiler enviro
0f90: 6e 6d 65 6e 74 20 6e 6f 74 20 69 6e 69 74 69 61 nment not initia
0fa0: 6c 69 7a 65 64 2e 0d 0a 21 65 72 72 6f 72 20 24 lized...!error $
0fb0: 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d (MSG)..!endif...
0fc0: 0a 23 20 57 65 20 6e 65 65 64 20 74 6f 20 72 75 .# We need to ru
0fd0: 6e 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 63 n from the direc
0fe0: 74 6f 72 79 20 74 68 65 20 70 61 72 65 6e 74 20 tory the parent
0ff0: 6d 61 6b 65 66 69 6c 65 20 69 73 20 6c 6f 63 61 makefile is loca
1000: 74 65 64 20 69 6e 2e 0d 0a 23 20 6e 6d 61 6b 65 ted in...# nmake
1010: 20 64 6f 65 73 20 6e 6f 74 20 74 65 6c 6c 20 75 does not tell u
1020: 73 20 77 68 61 74 20 6d 61 6b 65 66 69 6c 65 20 s what makefile
1030: 77 61 73 20 75 73 65 64 20 74 6f 20 69 6e 76 6f was used to invo
1040: 6b 65 20 69 74 20 73 6f 20 70 61 72 65 6e 74 0d ke it so parent.
1050: 0a 23 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 .# makefile has
1060: 74 6f 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46 to set the MAKEF
1070: 49 4c 45 56 43 20 6d 61 63 72 6f 20 6f 72 20 77 ILEVC macro or w
1080: 65 20 6a 75 73 74 20 6d 61 6b 65 20 61 20 67 75 e just make a gu
1090: 65 73 73 20 61 6e 64 0d 0a 23 20 77 61 72 6e 20 ess and..# warn
10a0: 69 66 20 77 65 20 74 68 69 6e 6b 20 74 68 61 74 if we think that
10b0: 20 69 73 20 6e 6f 74 20 74 68 65 20 63 61 73 65 is not the case
10c0: 2e 0d 0a 21 69 66 20 22 24 28 4d 41 4b 45 46 49 ...!if "$(MAKEFI
10d0: 4c 45 56 43 29 22 20 3d 3d 20 22 22 0d 0a 0d 0a LEVC)" == ""....
10e0: 21 69 66 20 65 78 69 73 74 28 22 24 28 50 52 4f !if exist("$(PRO
10f0: 4a 45 43 54 29 2e 76 63 22 29 0d 0a 4d 41 4b 45 JECT).vc")..MAKE
1100: 46 49 4c 45 56 43 20 3d 20 24 28 50 52 4f 4a 45 FILEVC = $(PROJE
1110: 43 54 29 2e 76 63 0d 0a 21 65 6c 73 65 69 66 20 CT).vc..!elseif
1120: 65 78 69 73 74 28 22 6d 61 6b 65 66 69 6c 65 2e exist("makefile.
1130: 76 63 22 29 0d 0a 4d 41 4b 45 46 49 4c 45 56 43 vc")..MAKEFILEVC
1140: 20 3d 20 6d 61 6b 65 66 69 6c 65 2e 76 63 0d 0a = makefile.vc..
1150: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 23 !endif..!endif #
1160: 20 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 "$(MAKEFILEVC)"
1170: 20 3d 3d 20 22 22 0d 0a 0d 0a 21 69 66 20 21 65 == ""....!if !e
1180: 78 69 73 74 28 22 24 28 4d 41 4b 45 46 49 4c 45 xist("$(MAKEFILE
1190: 56 43 29 22 29 0d 0a 4d 53 47 20 3d 20 5e 0d 0a VC)")..MSG = ^..
11a0: 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 6e 6d 61 You must run nma
11b0: 6b 65 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 ke from the dire
11c0: 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 ctory containing
11d0: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 6b the project mak
11e0: 65 66 69 6c 65 2e 5e 0d 0a 49 66 20 79 6f 75 20 efile.^..If you
11f0: 61 72 65 20 64 6f 69 6e 67 20 74 68 61 74 20 61 are doing that a
1200: 6e 64 20 67 65 74 74 69 6e 67 20 74 68 69 73 20 nd getting this
1210: 6d 65 73 73 61 67 65 2c 20 73 65 74 20 74 68 65 message, set the
1220: 20 4d 41 4b 45 46 49 4c 45 56 43 5e 0d 0a 6d 61 MAKEFILEVC^..ma
1230: 63 72 6f 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 cro to the name
1240: 6f 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d of the project m
1250: 61 6b 65 66 69 6c 65 2e 0d 0a 21 6d 65 73 73 61 akefile...!messa
1260: 67 65 20 57 41 52 4e 49 4e 47 3a 20 24 28 4d 53 ge WARNING: $(MS
1270: 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a G)..!endif......
1280: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12c0: 0d 0a 23 20 31 2e 20 44 65 66 69 6e 65 20 65 78 ..# 1. Define ex
12d0: 74 65 72 6e 61 6c 20 70 72 6f 67 72 61 6d 73 20 ternal programs
12e0: 62 65 69 6e 67 20 75 73 65 64 0d 0a 0d 0a 23 2d being used....#-
12f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 53 65 74 ---------..# Set
1330: 20 74 68 65 20 70 72 6f 70 65 72 20 63 6f 70 79 the proper copy
1340: 20 6d 65 74 68 6f 64 20 74 6f 20 61 76 6f 69 64 method to avoid
1350: 20 6f 76 65 72 77 72 69 74 65 20 71 75 65 73 74 overwrite quest
1360: 69 6f 6e 73 0d 0a 23 20 74 6f 20 74 68 65 20 75 ions..# to the u
1370: 73 65 72 20 77 68 65 6e 20 63 6f 70 79 69 6e 67 ser when copying
1380: 20 66 69 6c 65 73 20 61 6e 64 20 73 65 6c 65 63 files and selec
1390: 74 69 6e 67 20 74 68 65 20 72 69 67 68 74 0d 0a ting the right..
13a0: 23 20 22 64 65 6c 65 74 65 20 61 6c 6c 22 20 6d # "delete all" m
13b0: 65 74 68 6f 64 2e 0d 0a 23 2d 2d 2d 2d 2d 2d 2d ethod...#-------
13c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
13d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
13e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
13f0: 2d 2d 2d 0d 0a 0d 0a 52 4d 44 49 52 09 3d 20 72 ---....RMDIR.= r
1400: 6d 64 69 72 20 2f 53 20 2f 51 0d 0a 43 50 59 09 mdir /S /Q..CPY.
1410: 3d 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e = xcopy /i /y >N
1420: 55 4c 0d 0a 43 50 59 44 49 52 20 20 3d 20 78 63 UL..CPYDIR = xc
1430: 6f 70 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e 55 opy /e /i /y >NU
1440: 4c 0d 0a 43 4f 50 59 09 3d 20 63 6f 70 79 20 2f L..COPY.= copy /
1450: 79 20 3e 4e 55 4c 0d 0a 4d 4b 44 49 52 20 20 20 y >NUL..MKDIR
1460: 3d 20 6d 6b 64 69 72 0d 0a 0d 0a 23 23 23 23 23 = mkdir....#####
1470: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1480: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1490: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
14a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
14b0: 23 0d 0a 23 20 32 2e 20 46 69 67 75 72 65 20 6f #..# 2. Figure o
14c0: 75 74 20 6f 75 72 20 62 75 69 6c 64 20 65 6e 76 ut our build env
14d0: 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 74 65 72 6d ironment in term
14e0: 73 20 6f 66 20 77 68 61 74 20 77 65 27 72 65 20 s of what we're
14f0: 62 75 69 6c 64 69 6e 67 2e 0d 0a 23 0d 0a 23 20 building...#..#
1500: 28 61 29 20 54 63 6c 20 69 74 73 65 6c 66 0d 0a (a) Tcl itself..
1510: 23 20 28 62 29 20 54 6b 0d 0a 23 20 28 63 29 20 # (b) Tk..# (c)
1520: 61 20 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 a Tcl extension
1530: 75 73 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f using libraries/
1540: 69 6e 63 6c 75 64 65 73 20 66 72 6f 6d 20 61 6e includes from an
1550: 20 2a 69 6e 73 74 61 6c 6c 65 64 2a 20 54 63 6c *installed* Tcl
1560: 0d 0a 23 20 28 64 29 20 61 20 54 63 6c 20 65 78 ..# (d) a Tcl ex
1570: 74 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 tension using li
1580: 62 72 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 braries/includes
1590: 20 66 72 6f 6d 20 54 63 6c 20 73 6f 75 72 63 65 from Tcl source
15a0: 20 64 69 72 65 63 74 6f 72 79 0d 0a 23 0d 0a 23 directory..#..#
15b0: 20 54 68 69 73 20 6c 61 73 74 20 69 73 20 6e 65 This last is ne
15c0: 65 64 65 64 20 62 65 63 61 75 73 65 20 73 6f 6d eded because som
15d0: 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 73 74 69 e extensions sti
15e0: 6c 6c 20 6e 65 65 64 0d 0a 23 20 73 6f 6d 65 20 ll need..# some
15f0: 54 63 6c 20 69 6e 74 65 72 66 61 63 65 73 20 74 Tcl interfaces t
1600: 68 61 74 20 61 72 65 20 6e 6f 74 20 70 75 62 6c hat are not publ
1610: 69 63 6c 79 20 65 78 70 6f 73 65 64 2e 0d 0a 23 icly exposed...#
1620: 0d 0a 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74 ..# The fragment
1630: 20 77 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f will set the fo
1640: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0d llowing macros:.
1650: 0a 23 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f .# ROOT - root o
1660: 66 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f f this module so
1670: 75 72 63 65 73 0d 0a 23 20 43 4f 4d 50 41 54 44 urces..# COMPATD
1680: 49 52 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 IR - source dire
1690: 63 74 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 73 ctory that holds
16a0: 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 73 compatibility s
16b0: 6f 75 72 63 65 73 0d 0a 23 20 44 4f 43 44 49 52 ources..# DOCDIR
16c0: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 - source direct
16d0: 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64 ory containing d
16e0: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c ocumentation fil
16f0: 65 73 0d 0a 23 20 47 45 4e 45 52 49 43 44 49 52 es..# GENERICDIR
1700: 20 2d 20 70 6c 61 74 66 6f 72 6d 2d 69 6e 64 65 - platform-inde
1710: 70 65 6e 64 65 6e 74 20 73 6f 75 72 63 65 20 64 pendent source d
1720: 69 72 65 63 74 6f 72 79 0d 0a 23 20 57 49 4e 5f irectory..# WIN_
1730: 44 49 52 20 2d 20 57 69 6e 64 6f 77 73 2d 73 70 DIR - Windows-sp
1740: 65 63 69 66 69 63 20 73 6f 75 72 63 65 20 64 69 ecific source di
1750: 72 65 63 74 6f 72 79 0d 0a 23 20 54 45 53 54 44 rectory..# TESTD
1760: 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 IR - directory c
1770: 6f 6e 74 61 69 6e 69 6e 67 20 74 65 73 74 20 66 ontaining test f
1780: 69 6c 65 73 0d 0a 23 20 54 4f 4f 4c 53 44 49 52 iles..# TOOLSDIR
1790: 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e - directory con
17a0: 74 61 69 6e 69 6e 67 20 62 75 69 6c 64 20 74 6f taining build to
17b0: 6f 6c 73 0d 0a 23 20 5f 54 43 4c 44 49 52 20 2d ols..# _TCLDIR -
17c0: 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c root of the Tcl
17d0: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f 52 installation OR
17e0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 73 the Tcl sources
17f0: 2e 20 4e 6f 74 20 73 65 74 0d 0a 23 20 20 20 20 . Not set..#
1800: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 63 when building Tc
1810: 6c 20 69 74 73 65 6c 66 2e 0d 0a 23 20 5f 49 4e l itself...# _IN
1820: 53 54 41 4c 4c 44 49 52 20 2d 20 6e 61 74 69 76 STALLDIR - nativ
1830: 65 20 66 6f 72 6d 20 6f 66 20 74 68 65 20 69 6e e form of the in
1840: 73 74 61 6c 6c 61 74 69 6f 6e 20 70 61 74 68 2e stallation path.
1850: 20 46 6f 72 20 54 63 6c 0d 0a 23 20 20 20 20 74 For Tcl..# t
1860: 68 69 73 20 77 69 6c 6c 20 62 65 20 74 68 65 20 his will be the
1870: 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c 20 root of the Tcl
1880: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2e 20 46 6f installation. Fo
1890: 72 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 r extensions..#
18a0: 20 20 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 this will be
18b0: 74 68 65 20 6c 69 62 20 64 69 72 65 63 74 6f 72 the lib director
18c0: 79 20 75 6e 64 65 72 20 74 68 65 20 72 6f 6f 74 y under the root
18d0: 2e 0d 0a 23 20 54 43 4c 49 4e 53 54 41 4c 4c 20 ...# TCLINSTALL
18e0: 20 2d 20 73 65 74 20 74 6f 20 31 20 69 66 20 5f - set to 1 if _
18f0: 54 43 4c 44 49 52 20 72 65 66 65 72 73 20 74 6f TCLDIR refers to
1900: 0d 0a 23 20 20 20 20 68 65 61 64 65 72 73 20 61 ..# headers a
1910: 6e 64 20 6c 69 62 72 61 72 69 65 73 20 66 72 6f nd libraries fro
1920: 6d 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 m an installed T
1930: 63 6c 2c 20 61 6e 64 20 30 20 69 66 20 62 75 69 cl, and 0 if bui
1940: 6c 74 20 61 67 61 69 6e 73 74 0d 0a 23 20 20 20 lt against..#
1950: 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e 6f Tcl sources. No
1960: 74 20 73 65 74 20 77 68 65 6e 20 62 75 69 6c 64 t set when build
1970: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e 20 ing Tcl itself.
1980: 59 65 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 65 Yes, not very we
1990: 6c 6c 0d 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0d ll..# named..
19a0: 0a 23 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69 .# _TCL_H - nati
19b0: 76 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 ve path to the t
19c0: 63 6c 2e 68 20 66 69 6c 65 0d 0a 23 0d 0a 23 20 cl.h file..#..#
19d0: 49 66 20 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65 If Tk is involve
19e0: 64 2c 20 61 6c 73 6f 20 73 65 74 73 20 74 68 65 d, also sets the
19f0: 20 66 6f 6c 6c 6f 77 69 6e 67 0d 0a 23 20 5f 54 following..# _T
1a00: 4b 44 49 52 20 2d 20 6e 61 74 69 76 65 20 66 6f KDIR - native fo
1a10: 72 6d 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74 69 rm Tk installati
1a20: 6f 6e 20 4f 52 20 54 6b 20 73 6f 75 72 63 65 2e on OR Tk source.
1a30: 20 4e 6f 74 20 73 65 74 20 69 66 20 62 75 69 6c Not set if buil
1a40: 64 69 6e 67 0d 0a 23 20 20 20 20 54 6b 20 69 74 ding..# Tk it
1a50: 73 65 6c 66 2e 0d 0a 23 20 54 4b 49 4e 53 54 41 self...# TKINSTA
1a60: 4c 4c 20 2d 20 73 65 74 20 31 20 69 66 20 5f 54 LL - set 1 if _T
1a70: 4b 44 49 52 20 72 65 66 65 72 73 20 74 6f 20 69 KDIR refers to i
1a80: 6e 73 74 61 6c 6c 65 64 20 54 6b 20 61 6e 64 20 nstalled Tk and
1a90: 30 20 69 66 20 54 6b 20 73 6f 75 72 63 65 73 0d 0 if Tk sources.
1aa0: 0a 23 20 5f 54 4b 5f 48 20 2d 20 6e 61 74 69 76 .# _TK_H - nativ
1ab0: 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 6b e path to the tk
1ac0: 2e 68 20 66 69 6c 65 0d 0a 0d 0a 23 20 52 6f 6f .h file....# Roo
1ad0: 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 t directory for
1ae0: 73 6f 75 72 63 65 73 20 61 6e 64 20 61 73 73 75 sources and assu
1af0: 6d 65 64 20 73 75 62 64 69 72 65 63 74 6f 72 69 med subdirectori
1b00: 65 73 0d 0a 52 4f 4f 54 20 3d 20 24 28 4d 41 4b es..ROOT = $(MAK
1b10: 45 44 49 52 29 5c 2e 2e 0d 0a 23 20 54 68 65 20 EDIR)\....# The
1b20: 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 74 68 73 20 following paths
1b30: 43 41 4e 4e 4f 54 20 68 61 76 65 20 73 70 61 63 CANNOT have spac
1b40: 65 73 20 69 6e 20 74 68 65 6d 20 61 73 20 74 68 es in them as th
1b50: 65 79 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65 ey appear on the
1b60: 0d 0a 23 20 6c 65 66 74 20 73 69 64 65 20 6f 66 ..# left side of
1b70: 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 2e implicit rules.
1b80: 0d 0a 21 69 66 6e 64 65 66 20 43 4f 4d 50 41 54 ..!ifndef COMPAT
1b90: 44 49 52 0d 0a 43 4f 4d 50 41 54 44 49 52 09 3d DIR..COMPATDIR.=
1ba0: 20 24 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 74 0d $(ROOT)\compat.
1bb0: 0a 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 .!endif..!ifndef
1bc0: 20 44 4f 43 44 49 52 0d 0a 44 4f 43 44 49 52 09 DOCDIR..DOCDIR.
1bd0: 09 3d 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0d 0a .= $(ROOT)\doc..
1be0: 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 !endif..!ifndef
1bf0: 47 45 4e 45 52 49 43 44 49 52 0d 0a 47 45 4e 45 GENERICDIR..GENE
1c00: 52 49 43 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 RICDIR.= $(ROOT)
1c10: 5c 67 65 6e 65 72 69 63 0d 0a 21 65 6e 64 69 66 \generic..!endif
1c20: 0d 0a 21 69 66 6e 64 65 66 20 54 4f 4f 4c 53 44 ..!ifndef TOOLSD
1c30: 49 52 0d 0a 54 4f 4f 4c 53 44 49 52 09 3d 20 24 IR..TOOLSDIR.= $
1c40: 28 52 4f 4f 54 29 5c 74 6f 6f 6c 73 0d 0a 21 65 (ROOT)\tools..!e
1c50: 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 54 45 ndif..!ifndef TE
1c60: 53 54 44 49 52 0d 0a 54 45 53 54 44 49 52 09 3d STDIR..TESTDIR.=
1c70: 20 24 28 52 4f 4f 54 29 5c 74 65 73 74 73 0d 0a $(ROOT)\tests..
1c80: 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 !endif..!ifndef
1c90: 4c 49 42 44 49 52 0d 0a 21 69 66 20 65 78 69 73 LIBDIR..!if exis
1ca0: 74 28 22 24 28 52 4f 4f 54 29 5c 6c 69 62 72 61 t("$(ROOT)\libra
1cb0: 72 79 22 29 0d 0a 4c 49 42 44 49 52 20 20 20 20 ry")..LIBDIR
1cc0: 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 29 5c = $(ROOT)\
1cd0: 6c 69 62 72 61 72 79 0d 0a 21 65 6c 73 65 0d 0a library..!else..
1ce0: 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20 LIBDIR
1cf0: 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 0d 0a 21 = $(ROOT)\lib..!
1d00: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 endif..!endif..!
1d10: 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 52 0d 0a ifndef DEMODIR..
1d20: 21 69 66 20 65 78 69 73 74 28 22 24 28 4c 49 42 !if exist("$(LIB
1d30: 44 49 52 29 5c 64 65 6d 6f 73 22 29 0d 0a 44 45 DIR)\demos")..DE
1d40: 4d 4f 44 49 52 09 09 3d 20 24 28 4c 49 42 44 49 MODIR..= $(LIBDI
1d50: 52 29 5c 64 65 6d 6f 73 0d 0a 21 65 6c 73 65 0d R)\demos..!else.
1d60: 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 28 52 4f .DEMODIR..= $(RO
1d70: 4f 54 29 5c 64 65 6d 6f 73 0d 0a 21 65 6e 64 69 OT)\demos..!endi
1d80: 66 0d 0a 21 65 6e 64 69 66 20 23 20 69 66 6e 64 f..!endif # ifnd
1d90: 65 66 20 44 45 4d 4f 44 49 52 0d 0a 23 20 44 6f ef DEMODIR..# Do
1da0: 20 4e 4f 54 20 75 73 65 20 57 49 4e 44 49 52 20 NOT use WINDIR
1db0: 62 65 63 61 75 73 65 20 69 74 20 69 73 20 57 69 because it is Wi
1dc0: 6e 64 6f 77 73 20 69 6e 74 65 72 6e 61 6c 20 65 ndows internal e
1dd0: 6e 76 69 72 6f 6e 6d 65 6e 74 0d 0a 23 20 76 61 nvironment..# va
1de0: 72 69 61 62 6c 65 20 74 6f 20 70 6f 69 6e 74 20 riable to point
1df0: 74 6f 20 63 3a 5c 77 69 6e 64 6f 77 73 21 0d 0a to c:\windows!..
1e00: 57 49 4e 5f 44 49 52 09 09 3d 20 24 28 52 4f 4f WIN_DIR..= $(ROO
1e10: 54 29 5c 77 69 6e 0d 0a 0d 0a 21 69 66 6e 64 65 T)\win....!ifnde
1e20: 66 20 52 43 44 49 52 0d 0a 21 69 66 20 65 78 69 f RCDIR..!if exi
1e30: 73 74 28 22 24 28 57 49 4e 5f 44 49 52 29 5c 72 st("$(WIN_DIR)\r
1e40: 63 22 29 0d 0a 52 43 44 49 52 20 20 20 20 20 20 c")..RCDIR
1e50: 20 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 = $(WIN_DIR
1e60: 29 5c 72 63 0d 0a 21 65 6c 73 65 0d 0a 52 43 44 )\rc..!else..RCD
1e70: 49 52 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 IR = $
1e80: 28 57 49 4e 5f 44 49 52 29 0d 0a 21 65 6e 64 69 (WIN_DIR)..!endi
1e90: 66 0d 0a 21 65 6e 64 69 66 0d 0a 52 43 44 49 52 f..!endif..RCDIR
1ea0: 20 3d 20 24 28 52 43 44 49 52 3a 2f 3d 5c 29 0d = $(RCDIR:/=\).
1eb0: 0a 0d 0a 23 20 54 68 65 20 74 61 72 67 65 74 20 ...# The target
1ec0: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 directory where
1ed0: 74 68 65 20 62 75 69 6c 74 20 70 61 63 6b 61 67 the built packag
1ee0: 65 73 20 61 6e 64 20 62 69 6e 61 72 69 65 73 20 es and binaries
1ef0: 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65 will be installe
1f00: 64 2e 0d 0a 23 20 49 4e 53 54 41 4c 4c 44 49 52 d...# INSTALLDIR
1f10: 20 69 73 20 74 68 65 20 28 6f 70 74 69 6f 6e 61 is the (optiona
1f20: 6c 29 20 70 61 74 68 20 73 70 65 63 69 66 69 65 l) path specifie
1f30: 64 20 62 79 20 74 68 65 20 75 73 65 72 2e 0d 0a d by the user...
1f40: 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 73 # _INSTALLDIR is
1f50: 20 49 4e 53 54 41 4c 4c 44 49 52 20 75 73 69 6e INSTALLDIR usin
1f60: 67 20 74 68 65 20 62 61 63 6b 73 6c 61 73 68 20 g the backslash
1f70: 73 65 70 61 72 61 74 6f 72 20 73 79 6e 74 61 78 separator syntax
1f80: 0d 0a 21 69 66 64 65 66 20 49 4e 53 54 41 4c 4c ..!ifdef INSTALL
1f90: 44 49 52 0d 0a 23 23 23 20 46 69 78 20 74 68 65 DIR..### Fix the
1fa0: 20 70 61 74 68 20 73 65 70 61 72 61 74 6f 72 73 path separators
1fb0: 2e 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 09 3d ..._INSTALLDIR.=
1fc0: 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 3a 2f 3d $(INSTALLDIR:/=
1fd0: 5c 29 0d 0a 21 65 6c 73 65 0d 0a 23 23 23 20 41 \)..!else..### A
1fe0: 73 73 75 6d 65 20 74 68 65 20 6e 6f 72 6d 61 6c ssume the normal
1ff0: 20 64 65 66 61 75 6c 74 2e 0d 0a 5f 49 4e 53 54 default..._INST
2000: 41 4c 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 44 ALLDIR.= $(HOMED
2010: 52 49 56 45 29 5c 54 63 6c 0d 0a 21 65 6e 64 69 RIVE)\Tcl..!endi
2020: 66 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 f....!if $(DOING
2030: 5f 54 43 4c 29 0d 0a 0d 0a 23 20 42 45 47 49 4e _TCL)....# BEGIN
2040: 20 43 61 73 65 20 32 28 61 29 20 2d 20 42 75 69 Case 2(a) - Bui
2050: 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 lding Tcl itself
2060: 0d 0a 0d 0a 23 20 4f 6e 6c 79 20 6e 65 65 64 20 ....# Only need
2070: 74 6f 20 64 65 66 69 6e 65 20 5f 54 43 4c 5f 48 to define _TCL_H
2080: 0d 0a 5f 54 43 4c 5f 48 20 3d 20 2e 2e 5c 67 65 .._TCL_H = ..\ge
2090: 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a 0d 0a 23 neric\tcl.h....#
20a0: 20 45 4e 44 20 43 61 73 65 20 32 28 61 29 20 2d END Case 2(a) -
20b0: 20 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 Building Tcl it
20c0: 73 65 6c 66 0d 0a 0d 0a 21 65 6c 73 65 69 66 20 self....!elseif
20d0: 24 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 0d 0a 23 $(DOING_TK)....#
20e0: 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 62 29 BEGIN Case 2(b)
20f0: 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 6b 0d 0a - Building Tk..
2100: 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 30 ..TCLINSTALL = 0
2110: 20 23 20 54 6b 20 61 6c 77 61 79 73 20 62 75 69 # Tk always bui
2120: 6c 64 73 20 61 67 61 69 6e 73 74 20 54 63 6c 20 lds against Tcl
2130: 73 6f 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 69 source, not an i
2140: 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 21 69 nstalled Tcl..!i
2150: 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d f "$(TCLDIR)" ==
2160: 20 22 22 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 ""..!if [echo T
2170: 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 CLDIR = \> nmake
2180: 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20 7c hlp.out] \.. |
2190: 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 | [nmakehlp -L g
21a0: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 eneric\tcl.h >>
21b0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21 nmakehlp.out]..!
21c0: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
21d0: 6e 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 not locate Tcl s
21e0: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e ource directory.
21f0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75 ..!endif..!inclu
2200: 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d de nmakehlp.out.
2210: 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 44 49 52 .!endif # TCLDIR
2220: 20 3d 3d 20 22 22 0d 0a 0d 0a 5f 54 43 4c 44 49 == ""...._TCLDI
2230: 52 09 3d 20 24 28 54 43 4c 44 49 52 3a 2f 3d 5c R.= $(TCLDIR:/=\
2240: 29 0d 0a 5f 54 43 4c 5f 48 20 20 3d 20 24 28 5f ).._TCL_H = $(_
2250: 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 5c TCLDIR)\generic\
2260: 74 63 6c 2e 68 0d 0a 21 69 66 20 21 65 78 69 73 tcl.h..!if !exis
2270: 74 28 22 24 28 5f 54 43 4c 5f 48 29 22 29 0d 0a t("$(_TCL_H)")..
2280: 21 65 72 72 6f 72 20 43 6f 75 6c 64 20 6e 6f 74 !error Could not
2290: 20 6c 6f 63 61 74 65 20 74 63 6c 2e 68 2e 20 50 locate tcl.h. P
22a0: 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 54 43 lease set the TC
22b0: 4c 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 6f LDIR macro to po
22c0: 69 6e 74 20 74 6f 20 74 68 65 20 54 63 6c 20 2a int to the Tcl *
22d0: 73 6f 75 72 63 65 2a 20 64 69 72 65 63 74 6f 72 source* director
22e0: 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 5f 54 y...!endif...._T
22f0: 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 K_H = ..\generic
2300: 5c 74 6b 2e 68 0d 0a 0d 0a 23 20 45 4e 44 20 43 \tk.h....# END C
2310: 61 73 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 ase 2(b) - Build
2320: 69 6e 67 20 54 6b 0d 0a 0d 0a 21 65 6c 73 65 0d ing Tk....!else.
2330: 0a 0d 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 ...# BEGIN Case
2340: 32 28 63 29 20 6f 72 20 28 64 29 20 2d 20 42 75 2(c) or (d) - Bu
2350: 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 ilding an extens
2360: 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 ion other than T
2370: 6b 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d 6d 61 6e k....# If comman
2380: 64 20 6c 69 6e 65 20 68 61 73 20 73 70 65 63 69 d line has speci
2390: 66 69 65 64 20 54 63 6c 20 6c 6f 63 61 74 69 6f fied Tcl locatio
23a0: 6e 20 74 68 72 6f 75 67 68 20 54 43 4c 44 49 52 n through TCLDIR
23b0: 2c 20 75 73 65 20 69 74 0d 0a 23 20 65 6c 73 65 , use it..# else
23c0: 20 64 65 66 61 75 6c 74 20 74 6f 20 74 68 65 20 default to the
23d0: 49 4e 53 54 41 4c 4c 44 49 52 20 73 65 74 74 69 INSTALLDIR setti
23e0: 6e 67 0d 0a 21 69 66 20 22 24 28 54 43 4c 44 49 ng..!if "$(TCLDI
23f0: 52 29 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 43 R)" != ""...._TC
2400: 4c 44 49 52 09 3d 20 24 28 54 43 4c 44 49 52 3a LDIR.= $(TCLDIR:
2410: 2f 3d 5c 29 0d 0a 21 69 66 20 65 78 69 73 74 28 /=\)..!if exist(
2420: 22 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c "$(_TCLDIR)\incl
2430: 75 64 65 5c 74 63 6c 2e 68 22 29 20 23 20 43 61 ude\tcl.h") # Ca
2440: 73 65 20 32 28 63 29 20 77 69 74 68 20 54 43 4c se 2(c) with TCL
2450: 44 49 52 20 64 65 66 69 6e 65 64 0d 0a 54 43 4c DIR defined..TCL
2460: 49 4e 53 54 41 4c 4c 09 3d 20 31 0d 0a 5f 54 43 INSTALL.= 1.._TC
2470: 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 L_H = $
2480: 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 (_TCLDIR)\includ
2490: 65 5c 74 63 6c 2e 68 0d 0a 21 65 6c 73 65 69 66 e\tcl.h..!elseif
24a0: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 exist("$(_TCLDI
24b0: 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 R)\generic\tcl.h
24c0: 22 29 20 23 20 43 61 73 65 20 32 28 64 29 20 77 ") # Case 2(d) w
24d0: 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e ith TCLDIR defin
24e0: 65 64 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d ed..TCLINSTALL.=
24f0: 20 30 0d 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 0.._TCL_H
2500: 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 = $(_TCLDIR)
2510: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a \generic\tcl.h..
2520: 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6c 73 65 20 !endif....!else
2530: 20 23 20 20 23 20 43 61 73 65 20 32 28 63 29 20 # # Case 2(c)
2540: 66 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 77 for extensions w
2550: 69 74 68 20 54 43 4c 44 49 52 20 75 6e 64 65 66 ith TCLDIR undef
2560: 69 6e 65 64 0d 0a 0d 0a 23 20 4e 65 65 64 20 74 ined....# Need t
2570: 6f 20 6c 6f 63 61 74 65 20 54 63 6c 20 64 65 70 o locate Tcl dep
2580: 65 6e 64 69 6e 67 20 6f 6e 20 77 68 65 74 68 65 ending on whethe
2590: 72 20 69 74 20 6e 65 65 64 73 20 54 63 6c 20 73 r it needs Tcl s
25a0: 6f 75 72 63 65 20 6f 72 20 6e 6f 74 2e 0d 0a 23 ource or not...#
25b0: 20 49 66 20 77 65 20 64 6f 6e 27 74 2c 20 63 68 If we don't, ch
25c0: 65 63 6b 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 eck the INSTALLD
25d0: 49 52 20 66 6f 72 20 61 6e 20 69 6e 73 74 61 6c IR for an instal
25e0: 6c 65 64 20 54 63 6c 20 66 69 72 73 74 0d 0a 0d led Tcl first...
25f0: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 49 .!if exist("$(_I
2600: 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 NSTALLDIR)\inclu
2610: 64 65 5c 74 63 6c 2e 68 22 29 20 26 26 20 21 24 de\tcl.h") && !$
2620: 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 (NEED_TCL_SOURCE
2630: 29 0d 0a 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 )....TCLINSTALL.
2640: 3d 20 31 0d 0a 54 43 4c 44 49 52 20 20 20 20 20 = 1..TCLDIR
2650: 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c = $(_INSTAL
2660: 4c 44 49 52 29 5c 2e 2e 0d 0a 23 20 4e 4f 54 45 LDIR)\....# NOTE
2670: 3a 20 77 65 20 77 69 6c 6c 20 62 65 20 72 65 73 : we will be res
2680: 65 74 74 69 6e 67 20 5f 49 4e 53 54 41 4c 4c 44 etting _INSTALLD
2690: 49 52 20 74 6f 20 5f 49 4e 53 54 41 4c 4c 44 49 IR to _INSTALLDI
26a0: 52 2f 6c 69 62 20 66 6f 72 20 65 78 74 65 6e 73 R/lib for extens
26b0: 69 6f 6e 73 0d 0a 23 20 6c 61 74 65 72 20 73 6f ions..# later so
26c0: 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f 75 6e 74 the \.. account
26d0: 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 62 0d 0a s for the /lib..
26e0: 5f 54 43 4c 44 49 52 09 09 3d 20 24 28 5f 49 4e _TCLDIR..= $(_IN
26f0: 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54 STALLDIR)\...._T
2700: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 CL_H =
2710: 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 $(_TCLDIR)\inclu
2720: 64 65 5c 74 63 6c 2e 68 0d 0a 0d 0a 21 65 6c 73 de\tcl.h....!els
2730: 65 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 e # exist(...) &
2740: 26 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f & !$(NEED_TCL_SO
2750: 55 52 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 URCE)....!if [ec
2760: 68 6f 20 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20 ho _TCLDIR = \>
2770: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d nmakehlp.out] \.
2780: 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 . || [nmakehlp
2790: 20 2d 4c 20 67 65 6e 65 72 69 63 5c 74 63 6c 2e -L generic\tcl.
27a0: 68 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 h >> nmakehlp.ou
27b0: 74 5d 0d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 t]..!error *** C
27c0: 6f 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 ould not locate
27d0: 54 63 6c 20 73 6f 75 72 63 65 20 64 69 72 65 63 Tcl source direc
27e0: 74 6f 72 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 tory...!endif..!
27f0: 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 include nmakehlp
2800: 2e 6f 75 74 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c .out..TCLINSTALL
2810: 20 20 20 20 20 20 3d 20 30 0d 0a 54 43 4c 44 49 = 0..TCLDI
2820: 52 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 R = $(_T
2830: 43 4c 44 49 52 29 0d 0a 5f 54 43 4c 5f 48 20 20 CLDIR).._TCL_H
2840: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c = $(_TCL
2850: 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c DIR)\generic\tcl
2860: 2e 68 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 65 .h....!endif # e
2870: 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28 xist(...) && !$(
2880: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 NEED_TCL_SOURCE)
2890: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c ....!endif # TCL
28a0: 44 49 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f DIR....!ifndef _
28b0: 54 43 4c 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 TCL_H..MSG =^..F
28c0: 61 69 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 63 ailed to find tc
28d0: 6c 2e 68 2e 20 54 68 65 20 54 43 4c 44 49 52 20 l.h. The TCLDIR
28e0: 6d 61 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63 macro is set inc
28f0: 6f 72 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e orrectly or is n
2900: 6f 74 20 73 65 74 20 61 6e 64 20 64 65 66 61 75 ot set and defau
2910: 6c 74 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 lt path does not
2920: 20 63 6f 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0d contain tcl.h..
2930: 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a .!error $(MSG)..
2940: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 4e 6f 77 20 !endif....# Now
2950: 64 6f 20 74 68 65 20 73 61 6d 65 20 74 6f 20 6c do the same to l
2960: 6f 63 61 74 65 20 54 6b 20 68 65 61 64 65 72 73 ocate Tk headers
2970: 20 61 6e 64 20 6c 69 62 73 20 69 66 20 70 72 6f and libs if pro
2980: 6a 65 63 74 20 72 65 71 75 69 72 65 73 20 54 6b ject requires Tk
2990: 0d 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29 ..!if $(NEED_TK)
29a0: 0d 0a 0d 0a 21 69 66 20 22 24 28 54 4b 44 49 52 ....!if "$(TKDIR
29b0: 29 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 4b 44 )" != ""...._TKD
29c0: 49 52 20 3d 20 24 28 54 4b 44 49 52 3a 2f 3d 5c IR = $(TKDIR:/=\
29d0: 29 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 )..!if exist("$(
29e0: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c _TKDIR)\include\
29f0: 74 6b 2e 68 22 29 0d 0a 54 4b 49 4e 53 54 41 4c tk.h")..TKINSTAL
2a00: 4c 20 20 20 20 20 20 3d 20 31 0d 0a 5f 54 4b 5f L = 1.._TK_
2a10: 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f H = $(_
2a20: 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 TKDIR)\include\t
2a30: 6b 2e 68 0d 0a 21 65 6c 73 65 69 66 20 65 78 69 k.h..!elseif exi
2a40: 73 74 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 st("$(_TKDIR)\ge
2a50: 6e 65 72 69 63 5c 74 6b 2e 68 22 29 0d 0a 54 4b neric\tk.h")..TK
2a60: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 INSTALL = 0
2a70: 0d 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 .._TK_H
2a80: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e = $(_TKDIR)\gen
2a90: 65 72 69 63 5c 74 6b 2e 68 0d 0a 21 65 6e 64 69 eric\tk.h..!endi
2aa0: 66 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 54 4b 44 f....!else # TKD
2ab0: 49 52 20 6e 6f 74 20 64 65 66 69 6e 65 64 0d 0a IR not defined..
2ac0: 0d 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 61 ..# Need to loca
2ad0: 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e 67 te Tcl depending
2ae0: 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 6e on whether it n
2af0: 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 20 eeds Tcl source
2b00: 6f 72 20 6e 6f 74 2e 0d 0a 23 20 49 66 20 77 65 or not...# If we
2b10: 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 don't, check th
2b20: 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 e INSTALLDIR for
2b30: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
2b40: 6c 20 66 69 72 73 74 0d 0a 0d 0a 21 69 66 20 65 l first....!if e
2b50: 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c xist("$(_INSTALL
2b60: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e DIR)\include\tk.
2b70: 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 h") && !$(NEED_T
2b80: 4b 5f 53 4f 55 52 43 45 29 0d 0a 0d 0a 54 4b 49 K_SOURCE)....TKI
2b90: 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0d NSTALL = 1.
2ba0: 0a 23 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c .# NOTE: we will
2bb0: 20 62 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49 be resetting _I
2bc0: 4e 53 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e NSTALLDIR to _IN
2bd0: 53 54 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 STALLDIR/lib for
2be0: 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 6c extensions..# l
2bf0: 61 74 65 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20 ater so the \..
2c00: 61 63 63 6f 75 6e 74 73 20 66 6f 72 20 74 68 65 accounts for the
2c10: 20 2f 6c 69 62 0d 0a 5f 54 4b 44 49 52 20 20 20 /lib.._TKDIR
2c20: 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 = $(_INSTA
2c30: 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54 4b 5f 48 LLDIR)\...._TK_H
2c40: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2c50: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b KDIR)\include\tk
2c60: 2e 68 0d 0a 54 4b 44 49 52 20 20 20 20 20 20 20 .h..TKDIR
2c70: 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0d 0a = $(_TKDIR)..
2c80: 0d 0a 21 65 6c 73 65 20 23 20 65 78 69 73 74 28 ..!else # exist(
2c90: 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c "$(_INSTALLDIR)\
2ca0: 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 include\tk.h") &
2cb0: 26 20 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 & !$(NEED_TK_SOU
2cc0: 52 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 68 RCE)....!if [ech
2cd0: 6f 20 5f 54 4b 44 49 52 20 3d 20 5c 3e 20 6e 6d o _TKDIR = \> nm
2ce0: 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 akehlp.out] \..
2cf0: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d || [nmakehlp -
2d00: 4c 20 67 65 6e 65 72 69 63 5c 74 6b 2e 68 20 3e L generic\tk.h >
2d10: 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d > nmakehlp.out].
2d20: 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c .!error *** Coul
2d30: 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 54 6b 20 d not locate Tk
2d40: 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 source directory
2d50: 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c ...!endif..!incl
2d60: 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 ude nmakehlp.out
2d70: 0d 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 ..TKINSTALL
2d80: 20 3d 20 30 0d 0a 54 4b 44 49 52 20 20 20 20 20 = 0..TKDIR
2d90: 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 = $(_TKDIR)
2da0: 0d 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 .._TK_H
2db0: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e = $(_TKDIR)\gen
2dc0: 65 72 69 63 5c 74 6b 2e 68 0d 0a 0d 0a 21 65 6e eric\tk.h....!en
2dd0: 64 69 66 20 23 20 65 78 69 73 74 28 22 24 28 5f dif # exist("$(_
2de0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c INSTALLDIR)\incl
2df0: 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 ude\tk.h") && !$
2e00: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 (NEED_TK_SOURCE)
2e10: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 4b 44 ....!endif # TKD
2e20: 49 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f 54 IR....!ifndef _T
2e30: 4b 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 61 69 K_H..MSG =^..Fai
2e40: 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68 led to find tk.h
2e50: 2e 20 54 68 65 20 54 4b 44 49 52 20 6d 61 63 72 . The TKDIR macr
2e60: 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 72 65 o is set incorre
2e70: 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 ctly or is not s
2e80: 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 20 70 et and default p
2e90: 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e ath does not con
2ea0: 74 61 69 6e 20 74 6b 2e 68 2e 0d 0a 21 65 72 72 tain tk.h...!err
2eb0: 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 or $(MSG)..!endi
2ec0: 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 4e 45 f....!endif # NE
2ed0: 45 44 5f 54 4b 0d 0a 0d 0a 21 69 66 20 24 28 4e ED_TK....!if $(N
2ee0: 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 20 EED_TCL_SOURCE)
2ef0: 26 26 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 && $(TCLINSTALL)
2f00: 0d 0a 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57 ..MSG = ^..*** W
2f10: 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 arning: This ext
2f20: 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 ension requires
2f30: 74 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 the source distr
2f40: 69 62 75 74 69 6f 6e 20 6f 66 20 54 63 6c 2e 5e ibution of Tcl.^
2f50: 0d 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 ..*** Please set
2f60: 20 74 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 the TCLDIR macr
2f70: 6f 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 o to point to th
2f80: 65 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 0d 0a e Tcl sources...
2f90: 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 !error $(MSG)..!
2fa0: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 4e endif....!if $(N
2fb0: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a EED_TK_SOURCE)..
2fc0: 21 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 !if $(TKINSTALL)
2fd0: 0d 0a 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57 ..MSG = ^..*** W
2fe0: 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 arning: This ext
2ff0: 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 ension requires
3000: 74 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 the source distr
3010: 69 62 75 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0d ibution of Tk.^.
3020: 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 20 .*** Please set
3030: 74 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 the TKDIR macro
3040: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 to point to the
3050: 54 6b 20 73 6f 75 72 63 65 73 2e 0d 0a 21 65 72 Tk sources...!er
3060: 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 ror $(MSG)..!end
3070: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a if..!endif......
3080: 23 20 49 66 20 49 4e 53 54 41 4c 4c 44 49 52 20 # If INSTALLDIR
3090: 73 65 74 20 74 6f 20 54 63 6c 20 69 6e 73 74 61 set to Tcl insta
30a0: 6c 6c 61 74 69 6f 6e 20 72 6f 6f 74 20 64 69 72 llation root dir
30b0: 20 74 68 65 6e 20 72 65 73 65 74 20 74 6f 20 74 then reset to t
30c0: 68 65 0d 0a 23 20 6c 69 62 20 64 69 72 20 66 6f he..# lib dir fo
30d0: 72 20 69 6e 73 74 61 6c 6c 69 6e 67 20 65 78 74 r installing ext
30e0: 65 6e 73 69 6f 6e 73 0d 0a 21 69 66 20 65 78 69 ensions..!if exi
30f0: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 st("$(_INSTALLDI
3100: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 R)\include\tcl.h
3110: 22 29 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 3d ").._INSTALLDIR=
3120: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c $(_INSTALLDIR)\l
3130: 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 ib..!endif....#
3140: 45 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f 72 END Case 2(c) or
3150: 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 (d) - Building
3160: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 21 65 an extension..!e
3170: 6e 64 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e ndif # if $(DOIN
3180: 47 5f 54 43 4c 29 0d 0a 0d 0a 23 23 23 23 23 23 G_TCL)....######
3190: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
31a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
31b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
31c0: 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 33 2e ##########..# 3.
31d0: 20 44 65 74 65 72 6d 69 6e 65 20 63 6f 6d 70 69 Determine compi
31e0: 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 ler version and
31f0: 61 72 63 68 69 74 65 63 74 75 72 65 0d 0a 23 20 architecture..#
3200: 49 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e 2c In this section,
3210: 20 77 65 20 66 69 67 75 72 65 20 6f 75 74 20 74 we figure out t
3220: 68 65 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 73 he compiler vers
3230: 69 6f 6e 20 61 6e 64 20 74 68 65 0d 0a 23 20 61 ion and the..# a
3240: 72 63 68 69 74 65 63 74 75 72 65 20 66 6f 72 20 rchitecture for
3250: 77 68 69 63 68 20 77 65 20 61 72 65 20 62 75 69 which we are bui
3260: 6c 64 69 6e 67 2e 20 54 68 69 73 20 73 65 74 73 lding. This sets
3270: 20 74 68 65 0d 0a 23 20 66 6f 6c 6c 6f 77 69 6e the..# followin
3280: 67 20 6d 61 63 72 6f 73 3a 0d 0a 23 20 56 43 56 g macros:..# VCV
3290: 45 52 53 49 4f 4e 20 2d 20 74 68 65 20 69 6e 74 ERSION - the int
32a0: 65 72 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 76 ernal compiler v
32b0: 65 72 73 69 6f 6e 20 61 73 20 31 32 30 30 2c 20 ersion as 1200,
32c0: 31 34 30 30 2c 20 31 39 31 30 20 65 74 63 2e 0d 1400, 1910 etc..
32d0: 0a 23 20 20 20 20 20 54 68 69 73 20 69 73 20 61 .# This is a
32e0: 6c 73 6f 20 70 72 69 6e 74 65 64 20 62 79 20 74 lso printed by t
32f0: 68 65 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 64 he compiler in d
3300: 6f 74 74 65 64 20 66 6f 72 6d 20 31 39 2e 31 30 otted form 19.10
3310: 20 65 74 63 2e 0d 0a 23 20 56 43 56 45 52 20 2d etc...# VCVER -
3320: 20 74 68 65 20 22 6d 61 72 6b 65 74 69 6e 67 20 the "marketing
3330: 76 65 72 73 69 6f 6e 22 2c 20 66 6f 72 20 65 78 version", for ex
3340: 61 6d 70 6c 65 20 56 69 73 75 61 6c 20 43 2b 2b ample Visual C++
3350: 20 36 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 0d 6 for internal.
3360: 0a 23 20 20 20 20 20 63 6f 6d 70 69 6c 65 72 20 .# compiler
3370: 76 65 72 73 69 6f 6e 20 31 32 30 30 2e 20 54 68 version 1200. Th
3380: 69 73 20 69 73 20 6b 65 70 74 20 6f 6e 6c 79 20 is is kept only
3390: 66 6f 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f for legacy reaso
33a0: 6e 73 20 61 73 20 69 74 0d 0a 23 20 20 20 20 20 ns as it..#
33b0: 64 6f 65 73 20 6e 6f 74 20 6d 61 6b 65 20 73 65 does not make se
33c0: 6e 73 65 20 66 6f 72 20 72 65 63 65 6e 74 20 4d nse for recent M
33d0: 69 63 72 6f 73 6f 66 74 20 63 6f 6d 70 69 6c 65 icrosoft compile
33e0: 72 73 2e 20 4f 6e 6c 79 20 75 73 65 64 20 66 6f rs. Only used fo
33f0: 72 0d 0a 23 20 20 20 20 20 6f 75 74 70 75 74 20 r..# output
3400: 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 73 2e directory names.
3410: 0d 0a 23 20 41 52 43 48 20 2d 20 73 65 74 20 74 ..# ARCH - set t
3420: 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 o IX86, ARM64 or
3430: 20 41 4d 44 36 34 20 64 65 70 65 6e 64 69 6e 67 AMD64 depending
3440: 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 2d 62 69 on 32- or 64-bi
3450: 74 20 74 61 72 67 65 74 0d 0a 23 20 4e 41 54 49 t target..# NATI
3460: 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 74 6f VE_ARCH - set to
3470: 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 20 IX86, ARM64 or
3480: 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 68 6f AMD64 for the ho
3490: 73 74 20 6d 61 63 68 69 6e 65 0d 0a 23 20 4d 41 st machine..# MA
34a0: 43 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20 CHINE - same as
34b0: 24 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79 $(ARCH) - legacy
34c0: 0d 0a 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 ..# _VC_MANIFEST
34d0: 5f 45 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d _EMBED_{DLL,EXE}
34e0: 20 2d 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 - commands for
34f0: 65 6d 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 embedding a mani
3500: 66 65 73 74 20 69 66 20 6e 65 65 64 65 64 0d 0a fest if needed..
3510: 0d 0a 63 63 33 32 09 09 3d 20 24 28 43 43 29 20 ..cc32..= $(CC)
3520: 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 # built-in def
3530: 61 75 6c 74 2e 0d 0a 6c 69 6e 6b 33 32 09 09 3d ault...link32..=
3540: 20 6c 69 6e 6b 0d 0a 6c 69 62 33 32 09 09 3d 20 link..lib32..=
3550: 6c 69 62 0d 0a 72 63 33 32 09 09 3d 20 24 28 52 lib..rc32..= $(R
3560: 43 29 20 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 C) # built-in
3570: 64 65 66 61 75 6c 74 2e 0d 0a 0d 0a 23 2d 2d 2d default.....#---
3580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
35a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
35b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 -------------..#
35c0: 20 46 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 Figure out the
35d0: 63 6f 6d 70 69 6c 65 72 20 61 72 63 68 69 74 65 compiler archite
35e0: 63 74 75 72 65 20 61 6e 64 20 76 65 72 73 69 6f cture and versio
35f0: 6e 20 62 79 20 77 72 69 74 69 6e 67 0d 0a 23 20 n by writing..#
3600: 74 68 65 20 43 20 6d 61 63 72 6f 73 20 74 6f 20 the C macros to
3610: 61 20 66 69 6c 65 2c 20 70 72 65 70 72 6f 63 65 a file, preproce
3620: 73 73 69 6e 67 20 74 68 65 6d 20 77 69 74 68 20 ssing them with
3630: 74 68 65 20 43 0d 0a 23 20 70 72 65 70 72 6f 63 the C..# preproc
3640: 65 73 73 6f 72 20 61 6e 64 20 72 65 61 64 69 6e essor and readin
3650: 67 20 62 61 63 6b 20 74 68 65 20 63 72 65 61 74 g back the creat
3660: 65 64 20 66 69 6c 65 0d 0a 0d 0a 5f 48 41 53 48 ed file...._HASH
3670: 3d 5e 23 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 =^#.._VC_MANIFES
3680: 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0d 0a 5f 56 T_EMBED_EXE=.._V
3690: 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 C_MANIFEST_EMBED
36a0: 5f 44 4c 4c 3d 0d 0a 56 43 56 45 52 3d 30 0d 0a _DLL=..VCVER=0..
36b0: 21 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 !if ![echo VCVER
36c0: 53 49 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 SION=_MSC_VER >
36d0: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 vercl.x] \..
36e0: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 && ![echo $(_HAS
36f0: 48 29 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f H)if defined(_M_
3700: 49 58 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 IX86) >> vercl.x
3710: 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 ] \.. && ![ec
3720: 68 6f 20 41 52 43 48 3d 49 58 38 36 20 3e 3e 20 ho ARCH=IX86 >>
3730: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 vercl.x] \..
3740: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 && ![echo $(_HAS
3750: 48 29 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f H)elif defined(_
3760: 4d 5f 41 4d 44 36 34 29 20 3e 3e 20 76 65 72 63 M_AMD64) >> verc
3770: 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21 l.x] \.. && !
3780: 5b 65 63 68 6f 20 41 52 43 48 3d 41 4d 44 36 34 [echo ARCH=AMD64
3790: 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a >> vercl.x] \..
37a0: 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28 && ![echo $(
37b0: 5f 48 41 53 48 29 65 6c 69 66 20 64 65 66 69 6e _HASH)elif defin
37c0: 65 64 28 5f 4d 5f 41 52 4d 36 34 29 20 3e 3e 20 ed(_M_ARM64) >>
37d0: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 vercl.x] \..
37e0: 26 26 20 21 5b 65 63 68 6f 20 41 52 43 48 3d 41 && ![echo ARCH=A
37f0: 52 4d 36 34 20 3e 3e 20 76 65 72 63 6c 2e 78 5d RM64 >> vercl.x]
3800: 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 68 \.. && ![ech
3810: 6f 20 24 28 5f 48 41 53 48 29 65 6e 64 69 66 20 o $(_HASH)endif
3820: 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 >> vercl.x] \..
3830: 20 20 20 26 26 20 21 5b 24 28 63 63 33 32 29 20 && ![$(cc32)
3840: 2d 6e 6f 6c 6f 67 6f 20 2d 54 43 20 2d 50 20 76 -nologo -TC -P v
3850: 65 72 63 6c 2e 78 20 32 3e 4e 55 4c 5d 0d 0a 21 ercl.x 2>NUL]..!
3860: 69 6e 63 6c 75 64 65 20 76 65 72 63 6c 2e 69 0d include vercl.i.
3870: 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e .!if $(VCVERSION
3880: 29 20 3c 20 31 39 30 30 0d 0a 21 69 66 20 21 5b ) < 1900..!if ![
3890: 65 63 68 6f 20 56 43 56 45 52 3d 20 5e 5c 3e 20 echo VCVER= ^\>
38a0: 76 65 72 63 6c 2e 76 63 5d 20 5c 0d 0a 20 20 20 vercl.vc] \..
38b0: 20 26 26 20 21 5b 73 65 74 20 2f 61 20 24 28 56 && ![set /a $(V
38c0: 43 56 45 52 53 49 4f 4e 29 20 2f 20 31 30 30 20 CVERSION) / 100
38d0: 2d 20 36 20 3e 3e 20 76 65 72 63 6c 2e 76 63 5d - 6 >> vercl.vc]
38e0: 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 63 6c ..!include vercl
38f0: 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c .vc..!endif..!el
3900: 73 65 0d 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 se..# The simple
3910: 20 63 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f calculation abo
3920: 76 65 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c ve does not appl
3930: 79 20 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 y to new Visual
3940: 53 74 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0d Studio releases.
3950: 0a 23 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 .# Keep the comp
3960: 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 iler version in
3970: 69 74 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e its native form.
3980: 0d 0a 56 43 56 45 52 20 3d 20 24 28 56 43 56 45 ..VCVER = $(VCVE
3990: 52 53 49 4f 4e 29 0d 0a 21 65 6e 64 69 66 0d 0a RSION)..!endif..
39a0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 21 5b !endif....!if ![
39b0: 64 65 6c 20 32 3e 4e 55 4c 20 2f 71 2f 66 20 76 del 2>NUL /q/f v
39c0: 65 72 63 6c 2e 78 20 76 65 72 63 6c 2e 69 20 76 ercl.x vercl.i v
39d0: 65 72 63 6c 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 ercl.vc]..!endif
39e0: 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ....#-----------
39f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a20: 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20 4d 41 43 -----..# The MAC
3a30: 48 49 4e 45 20 6d 61 63 72 6f 20 69 73 20 75 73 HINE macro is us
3a40: 65 64 20 62 79 20 6c 65 67 61 63 79 20 6d 61 6b ed by legacy mak
3a50: 65 66 69 6c 65 73 20 73 6f 20 73 65 74 20 69 74 efiles so set it
3a60: 20 61 73 20 77 65 6c 6c 0d 0a 21 69 66 64 65 66 as well..!ifdef
3a70: 20 4d 41 43 48 49 4e 45 0d 0a 21 69 66 20 22 24 MACHINE..!if "$
3a80: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 (MACHINE)" == "x
3a90: 38 36 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 48 86"..!undef MACH
3aa0: 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 49 INE..MACHINE = I
3ab0: 58 38 36 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 X86..!elseif "$(
3ac0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72 MACHINE)" == "ar
3ad0: 6d 36 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 m64"..!undef MAC
3ae0: 48 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 HINE..MACHINE =
3af0: 41 52 4d 36 34 0d 0a 21 65 6c 73 65 69 66 20 22 ARM64..!elseif "
3b00: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
3b10: 78 36 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 x64"..!undef MAC
3b20: 48 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 HINE..MACHINE =
3b30: 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66 0d 0a 21 AMD64..!endif..!
3b40: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
3b50: 21 3d 20 22 24 28 41 52 43 48 29 22 0d 0a 21 65 != "$(ARCH)"..!e
3b60: 72 72 6f 72 20 53 70 65 63 69 66 69 65 64 20 4d rror Specified M
3b70: 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 24 28 4d ACHINE macro $(M
3b80: 41 43 48 49 4e 45 29 20 64 6f 65 73 20 6e 6f 74 ACHINE) does not
3b90: 20 6d 61 74 63 68 20 64 65 74 65 63 74 65 64 20 match detected
3ba0: 74 61 72 67 65 74 20 61 72 63 68 69 74 65 63 74 target architect
3bb0: 75 72 65 20 24 28 41 52 43 48 29 2e 0d 0a 21 65 ure $(ARCH)...!e
3bc0: 6e 64 69 66 0d 0a 21 65 6c 73 65 0d 0a 4d 41 43 ndif..!else..MAC
3bd0: 48 49 4e 45 3d 24 28 41 52 43 48 29 0d 0a 21 65 HINE=$(ARCH)..!e
3be0: 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d ndif....#-------
3bf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c20: 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20 --------..# The
3c30: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 PLATFORM_IDENTIF
3c40: 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 20 Y macro matches
3c50: 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 75 72 the values retur
3c60: 6e 65 64 20 62 79 0d 0a 23 20 74 68 65 20 54 63 ned by..# the Tc
3c70: 6c 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e l platform::iden
3c80: 74 69 66 79 20 63 6f 6d 6d 61 6e 64 0d 0a 21 69 tify command..!i
3c90: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3ca0: 3d 20 22 41 4d 44 36 34 22 0d 0a 50 4c 41 54 46 = "AMD64"..PLATF
3cb0: 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 ORM_IDENTIFY = w
3cc0: 69 6e 33 32 2d 78 38 36 5f 36 34 0d 0a 21 65 6c in32-x86_64..!el
3cd0: 73 65 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 seif "$(MACHINE)
3ce0: 22 20 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 50 4c " == "ARM64"..PL
3cf0: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 ATFORM_IDENTIFY
3d00: 3d 20 77 69 6e 33 32 2d 61 72 6d 0d 0a 21 65 6c = win32-arm..!el
3d10: 73 65 0d 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45 se..PLATFORM_IDE
3d20: 4e 54 49 46 59 20 3d 20 77 69 6e 33 32 2d 69 78 NTIFY = win32-ix
3d30: 38 36 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 86..!endif....#
3d40: 54 68 65 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 The MULTIPLATFOR
3d50: 4d 20 6d 61 63 72 6f 20 63 6f 6e 74 72 6f 6c 73 M macro controls
3d60: 20 77 68 65 74 68 65 72 20 62 69 6e 61 72 79 20 whether binary
3d70: 65 78 74 65 6e 73 69 6f 6e 73 20 61 72 65 20 69 extensions are i
3d80: 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 69 6e 20 70 nstalled..# in p
3d90: 6c 61 74 66 6f 72 6d 2d 73 70 65 63 69 66 69 63 latform-specific
3da0: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 20 49 6e directories. In
3db0: 74 65 6e 64 65 64 20 74 6f 20 62 65 20 73 65 74 tended to be set
3dc0: 2f 75 73 65 64 20 62 79 20 65 78 74 65 6e 73 69 /used by extensi
3dd0: 6f 6e 73 2e 0d 0a 21 69 66 6e 64 65 66 20 4d 55 ons...!ifndef MU
3de0: 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 LTIPLATFORM_INST
3df0: 41 4c 4c 0d 0a 4d 55 4c 54 49 50 4c 41 54 46 4f ALL..MULTIPLATFO
3e00: 52 4d 5f 49 4e 53 54 41 4c 4c 20 3d 20 30 0d 0a RM_INSTALL = 0..
3e10: 21 65 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d !endif....#-----
3e20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e50: 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 46 69 67 75 72 -------..# Figur
3e60: 65 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a e out the *host*
3e70: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 62 79 architecture by
3e80: 20 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 67 reading the reg
3e90: 69 73 74 72 79 0d 0a 0d 0a 21 69 66 20 21 5b 72 istry....!if ![r
3ea0: 65 67 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 eg query HKLM\Ha
3eb0: 72 64 77 61 72 65 5c 44 65 73 63 72 69 70 74 69 rdware\Descripti
3ec0: 6f 6e 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 on\System\Centra
3ed0: 6c 50 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 lProcessor\0 /v
3ee0: 49 64 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e Identifier | fin
3ef0: 64 73 74 72 20 2f 69 20 78 38 36 5d 0d 0a 4e 41 dstr /i x86]..NA
3f00: 54 49 56 45 5f 41 52 43 48 3d 49 58 38 36 0d 0a TIVE_ARCH=IX86..
3f10: 21 65 6c 73 65 69 66 20 21 5b 72 65 67 20 71 75 !elseif ![reg qu
3f20: 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 77 61 72 ery HKLM\Hardwar
3f30: 65 5c 44 65 73 63 72 69 70 74 69 6f 6e 5c 53 79 e\Description\Sy
3f40: 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 72 6f 63 stem\CentralProc
3f50: 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 65 6e 74 essor\0 /v Ident
3f60: 69 66 69 65 72 20 7c 20 66 69 6e 64 73 74 72 20 ifier | findstr
3f70: 2f 69 20 41 52 4d 20 7c 20 66 69 6e 64 73 74 72 /i ARM | findstr
3f80: 20 2f 69 20 36 34 2d 62 69 74 5d 0d 0a 4e 41 54 /i 64-bit]..NAT
3f90: 49 56 45 5f 41 52 43 48 3d 41 52 4d 36 34 0d 0a IVE_ARCH=ARM64..
3fa0: 21 65 6c 73 65 0d 0a 4e 41 54 49 56 45 5f 41 52 !else..NATIVE_AR
3fb0: 43 48 3d 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66 CH=AMD64..!endif
3fc0: 0d 0a 0d 0a 23 20 53 69 6e 63 65 20 4d 53 56 43 ....# Since MSVC
3fd0: 38 20 77 65 20 6d 75 73 74 20 64 65 61 6c 20 77 8 we must deal w
3fe0: 69 74 68 20 6d 61 6e 69 66 65 73 74 20 72 65 73 ith manifest res
3ff0: 6f 75 72 63 65 73 2e 0d 0a 21 69 66 20 24 28 56 ources...!if $(V
4000: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 34 30 CVERSION) >= 140
4010: 30 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 0.._VC_MANIFEST_
4020: 45 4d 42 45 44 5f 45 58 45 3d 69 66 20 65 78 69 EMBED_EXE=if exi
4030: 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 6d st $@.manifest m
4040: 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66 t -nologo -manif
4050: 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 est $@.manifest
4060: 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 63 65 3a -outputresource:
4070: 24 40 3b 31 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 $@;1.._VC_MANIFE
4080: 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d 69 66 20 ST_EMBED_DLL=if
4090: 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 exist $@.manifes
40a0: 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 t mt -nologo -ma
40b0: 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 nifest $@.manife
40c0: 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 st -outputresour
40d0: 63 65 3a 24 40 3b 32 0d 0a 21 65 6e 64 69 66 0d ce:$@;2..!endif.
40e0: 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
40f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4100: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4110: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4120: 23 23 23 0d 0a 23 20 34 2e 20 42 75 69 6c 64 20 ###..# 4. Build
4130: 74 68 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f the nmakehlp pro
4140: 67 72 61 6d 0d 0a 23 20 54 68 69 73 20 69 73 20 gram..# This is
4150: 61 20 68 65 6c 70 65 72 20 61 70 70 20 77 65 20 a helper app we
4160: 6e 65 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 need to overcome
4170: 20 6e 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e nmake's limitin
4180: 67 0d 0a 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 g..# environment
4190: 2e 20 57 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f . We will call o
41a0: 75 74 20 74 6f 20 69 74 20 74 6f 20 67 65 74 20 ut to it to get
41b0: 76 61 72 69 6f 75 73 20 62 69 74 73 20 6f 66 0d various bits of.
41c0: 0a 23 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 .# information a
41d0: 62 6f 75 74 20 73 75 70 70 6f 72 74 65 64 20 63 bout supported c
41e0: 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 ompiler options
41f0: 65 74 63 2e 0d 0a 23 0d 0a 23 20 54 63 6c 20 69 etc...#..# Tcl i
4200: 74 73 65 6c 66 20 77 69 6c 6c 20 61 6c 77 61 79 tself will alway
4210: 73 20 75 73 65 20 74 68 65 20 6e 6d 61 6b 65 68 s use the nmakeh
4220: 6c 70 2e 63 20 70 72 6f 67 72 61 6d 20 77 68 69 lp.c program whi
4230: 63 68 20 69 73 0d 0a 23 20 69 6e 20 69 74 73 20 ch is..# in its
4240: 6f 77 6e 20 73 6f 75 72 63 65 2e 20 49 74 20 77 own source. It w
4250: 69 6c 6c 20 62 65 20 6b 65 70 74 20 75 70 64 61 ill be kept upda
4260: 74 65 64 20 74 68 65 72 65 2e 0d 0a 23 0d 0a 23 ted there...#..#
4270: 20 45 78 74 65 6e 73 69 6f 6e 73 20 62 75 69 6c Extensions buil
4280: 74 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 t against an ins
4290: 74 61 6c 6c 65 64 20 54 63 6c 20 77 69 6c 6c 20 talled Tcl will
42a0: 75 73 65 20 74 68 65 20 69 6e 73 74 61 6c 6c 65 use the installe
42b0: 64 0d 0a 23 20 63 6f 70 79 20 6f 66 20 54 63 6c d..# copy of Tcl
42c0: 27 73 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 69 66 's nmakehlp.c if
42d0: 20 74 68 65 72 65 20 69 73 20 6f 6e 65 20 61 6e there is one an
42e0: 64 20 74 68 65 69 72 20 6f 77 6e 20 76 65 72 73 d their own vers
42f0: 69 6f 6e 0d 0a 23 20 6f 74 68 65 72 77 69 73 65 ion..# otherwise
4300: 2e 20 49 6e 20 74 68 65 20 6c 61 74 74 65 72 20 . In the latter
4310: 63 61 73 65 2c 20 74 68 65 79 20 77 6f 75 6c 64 case, they would
4320: 20 61 6c 73 6f 20 62 65 20 75 73 69 6e 67 20 74 also be using t
4330: 68 65 69 72 20 6f 77 6e 0d 0a 23 20 72 75 6c 65 heir own..# rule
4340: 73 2e 76 63 2e 20 4e 6f 74 65 20 74 68 61 74 20 s.vc. Note that
4350: 6f 6c 64 65 72 20 76 65 72 73 69 6f 6e 73 20 6f older versions o
4360: 66 20 54 63 6c 20 64 6f 20 6e 6f 74 20 69 6e 73 f Tcl do not ins
4370: 74 61 6c 6c 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d tall nmakehlp.c.
4380: 0a 23 20 6f 72 20 72 75 6c 65 73 2e 76 63 2e 0d .# or rules.vc..
4390: 0a 23 0d 0a 23 20 45 78 74 65 6e 73 69 6f 6e 73 .#..# Extensions
43a0: 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 54 built against T
43b0: 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c 6c 20 cl sources will
43c0: 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 6f 6d use the one from
43d0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 2e the Tcl source.
43e0: 0d 0a 23 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c ..#..# When buil
43f0: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
4400: 6e 20 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 n using a suffic
4410: 69 65 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 iently new versi
4420: 6f 6e 20 6f 66 20 54 63 6c 2c 0d 0a 23 20 72 75 on of Tcl,..# ru
4430: 6c 65 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 les-ext.vc will
4440: 64 65 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 define NMAKEHLPC
4450: 20 61 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74 appropriately t
4460: 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 0d 0a o point to the..
4470: 23 20 63 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 # copy of nmakeh
4480: 6c 70 2e 63 20 74 6f 20 62 65 20 75 73 65 64 2e lp.c to be used.
4490: 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 4e 4d 41 4b ....!ifndef NMAK
44a0: 45 48 4c 50 43 0d 0a 23 20 44 65 66 61 75 6c 74 EHLPC..# Default
44b0: 20 74 6f 20 74 68 65 20 6f 6e 65 20 69 6e 20 74 to the one in t
44c0: 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 he current direc
44d0: 74 6f 72 79 20 28 74 68 65 20 65 78 74 65 6e 73 tory (the extens
44e0: 69 6f 6e 27 73 20 6f 77 6e 20 6e 6d 61 6b 65 68 ion's own nmakeh
44f0: 6c 70 2e 63 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 lp.c)..NMAKEHLPC
4500: 20 3d 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a 0d = nmakehlp.c...
4510: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 .!if !$(DOING_TC
4520: 4c 29 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 L)..!if $(TCLINS
4530: 54 41 4c 4c 29 0d 0a 21 69 66 20 65 78 69 73 74 TALL)..!if exist
4540: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 ("$(_TCLDIR)\lib
4550: 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e \nmake\nmakehlp.
4560: 63 22 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d c")..NMAKEHLPC =
4570: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
4580: 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 nmake\nmakehlp.c
4590: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 20 ..!endif..!else
45a0: 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 # !$(TCLINSTALL)
45b0: 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f ..!if exist("$(_
45c0: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 6b TCLDIR)\win\nmak
45d0: 65 68 6c 70 2e 63 22 29 0d 0a 4e 4d 41 4b 45 48 ehlp.c")..NMAKEH
45e0: 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 LPC = $(_TCLDIR)
45f0: 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0d \win\nmakehlp.c.
4600: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 .!endif..!endif
4610: 23 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0d # $(TCLINSTALL).
4620: 0a 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49 .!endif # !$(DOI
4630: 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 21 65 6e 64 69 NG_TCL)....!endi
4640: 66 20 23 20 4e 4d 41 4b 45 48 4c 50 43 0d 0a 0d f # NMAKEHLPC...
4650: 0a 23 20 57 65 20 61 6c 77 61 79 73 20 62 75 69 .# We always bui
4660: 6c 64 20 6e 6d 61 6b 65 68 6c 70 20 65 76 65 6e ld nmakehlp even
4670: 20 69 66 20 69 74 20 65 78 69 73 74 73 20 73 69 if it exists si
4680: 6e 63 65 20 77 65 20 64 6f 20 6e 6f 74 20 6b 6e nce we do not kn
4690: 6f 77 0d 0a 23 20 77 68 61 74 20 73 6f 75 72 63 ow..# what sourc
46a0: 65 20 69 74 20 77 61 73 20 62 75 69 6c 74 20 66 e it was built f
46b0: 72 6f 6d 2e 0d 0a 21 69 66 20 22 24 28 4d 41 43 rom...!if "$(MAC
46c0: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 HINE)" == "IX86"
46d0: 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 || "$(MACHINE)"
46e0: 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 == "$(NATIVE_AR
46f0: 43 48 29 22 0d 0a 21 69 66 20 5b 24 28 63 63 33 CH)"..!if [$(cc3
4700: 32 29 20 2d 6e 6f 6c 6f 67 6f 20 22 24 28 4e 4d 2) -nologo "$(NM
4710: 41 4b 45 48 4c 50 43 29 22 20 2d 6c 69 6e 6b 20 AKEHLPC)" -link
4720: 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f -subsystem:conso
4730: 6c 65 20 3e 20 6e 75 6c 5d 0d 0a 21 65 6e 64 69 le > nul]..!endi
4740: 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 5b 63 f..!else..!if [c
4750: 6f 70 79 20 24 28 4e 4d 41 4b 45 48 4c 50 43 3a opy $(NMAKEHLPC:
4760: 6e 6d 61 6b 65 68 6c 70 2e 63 3d 78 38 36 5f 36 nmakehlp.c=x86_6
4770: 34 2d 77 36 34 2d 6d 69 6e 67 77 33 32 2d 6e 6d 4-w64-mingw32-nm
4780: 61 6b 65 68 6c 70 2e 65 78 65 29 20 6e 6d 61 6b akehlp.exe) nmak
4790: 65 68 6c 70 2e 65 78 65 20 3e 4e 55 4c 5d 0d 0a ehlp.exe >NUL]..
47a0: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
47b0: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
47c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
47d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
47e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
47f0: 23 23 0d 0a 23 20 35 2e 20 54 65 73 74 20 66 6f ##..# 5. Test fo
4800: 72 20 63 6f 6d 70 69 6c 65 72 20 66 65 61 74 75 r compiler featu
4810: 72 65 73 0d 0a 23 20 56 69 73 75 61 6c 20 43 2b res..# Visual C+
4820: 2b 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f + compiler optio
4830: 6e 73 20 68 61 76 65 20 63 68 61 6e 67 65 64 20 ns have changed
4840: 6f 76 65 72 20 74 68 65 20 79 65 61 72 73 2e 20 over the years.
4850: 43 68 65 63 6b 0d 0a 23 20 77 68 69 63 68 20 6f Check..# which o
4860: 70 74 69 6f 6e 73 20 61 72 65 20 73 75 70 70 6f ptions are suppo
4870: 72 74 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 rted by the comp
4880: 69 6c 65 72 20 69 6e 20 75 73 65 2e 0d 0a 23 0d iler in use...#.
4890: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 .# The following
48a0: 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 3a macros are set:
48b0: 0d 0a 23 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e ..# OPTIMIZATION
48c0: 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 S - the compiler
48d0: 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 73 65 flags to be use
48e0: 64 20 66 6f 72 20 6f 70 74 69 6d 69 7a 65 64 20 d for optimized
48f0: 62 75 69 6c 64 73 0d 0a 23 20 44 45 42 55 47 46 builds..# DEBUGF
4900: 4c 41 47 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 LAGS - the compi
4910: 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20 ler flags to be
4920: 75 73 65 64 20 66 6f 72 20 64 65 62 75 67 20 62 used for debug b
4930: 75 69 6c 64 73 0d 0a 23 20 4c 49 4e 4b 45 52 46 uilds..# LINKERF
4940: 4c 41 47 53 20 2d 20 46 6c 61 67 73 20 70 61 73 LAGS - Flags pas
4950: 73 65 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b 65 sed to the linke
4960: 72 0d 0a 23 0d 0a 23 20 4e 6f 74 65 20 74 68 61 r..#..# Note tha
4970: 74 20 74 68 65 73 65 20 61 72 65 20 74 68 65 20 t these are the
4980: 63 6f 6d 70 69 6c 65 72 20 73 65 74 74 69 6e 67 compiler setting
4990: 73 20 2a 61 76 61 69 6c 61 62 6c 65 2a 2c 20 6e s *available*, n
49a0: 6f 74 20 74 68 6f 73 65 0d 0a 23 20 74 68 61 74 ot those..# that
49b0: 20 77 69 6c 6c 20 62 65 20 2a 75 73 65 64 2a 2e will be *used*.
49c0: 20 54 68 65 20 6c 61 74 74 65 72 20 64 65 70 65 The latter depe
49d0: 6e 64 73 20 6f 6e 20 74 68 65 20 4f 50 54 53 20 nds on the OPTS
49e0: 6d 61 63 72 6f 20 73 65 74 74 69 6e 67 73 0d 0a macro settings..
49f0: 23 20 77 68 69 63 68 20 77 65 20 68 61 76 65 20 # which we have
4a00: 6e 6f 74 20 79 65 74 20 70 61 72 73 65 64 2e 0d not yet parsed..
4a10: 0a 23 0d 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 20 .#..# Also note
4a20: 74 68 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 65 that some of the
4a30: 20 66 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d 49 flags in OPTIMI
4a40: 5a 41 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 20 ZATIONS are not
4a50: 72 65 61 6c 6c 79 0d 0a 23 20 72 65 6c 61 74 65 really..# relate
4a60: 64 20 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f d to optimizatio
4a70: 6e 2e 20 54 68 65 79 20 61 72 65 20 70 6c 61 63 n. They are plac
4a80: 65 64 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f ed there only fo
4a90: 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 r legacy reasons
4aa0: 0d 0a 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65 ..# as some exte
4ab0: 6e 73 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68 nsions expect th
4ac0: 65 6d 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65 em to be include
4ad0: 64 20 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e d in that macro.
4ae0: 0d 0a 0d 0a 23 20 2d 4f 70 20 69 6d 70 72 6f 76 ....# -Op improv
4af0: 65 73 20 66 6c 6f 61 74 20 63 6f 6e 73 69 73 74 es float consist
4b00: 65 6e 63 79 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20 ency. Note only
4b10: 6e 65 65 64 65 64 20 66 6f 72 20 6f 6c 64 65 72 needed for older
4b20: 20 63 6f 6d 70 69 6c 65 72 73 0d 0a 23 20 4e 65 compilers..# Ne
4b30: 77 65 72 20 63 6f 6d 70 69 6c 65 72 73 20 64 6f wer compilers do
4b40: 20 6e 6f 74 20 6e 65 65 64 20 6f 72 20 73 75 70 not need or sup
4b50: 70 6f 72 74 20 74 68 69 73 20 6f 70 74 69 6f 6e port this option
4b60: 2e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ...!if [nmakehlp
4b70: 20 2d 63 20 2d 4f 70 5d 0d 0a 46 50 4f 50 54 53 -c -Op]..FPOPTS
4b80: 20 20 3d 20 2d 4f 70 0d 0a 21 65 6e 64 69 66 0d = -Op..!endif.
4b90: 0a 0d 0a 23 20 53 74 72 69 63 74 20 66 6c 6f 61 ...# Strict floa
4ba0: 74 69 6e 67 20 70 6f 69 6e 74 20 73 65 6d 61 6e ting point seman
4bb0: 74 69 63 73 20 2d 20 70 72 65 73 65 6e 74 20 69 tics - present i
4bc0: 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c 65 72 n newer compiler
4bd0: 73 20 69 6e 20 6c 69 65 75 20 6f 66 20 2d 4f 70 s in lieu of -Op
4be0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
4bf0: 2d 63 20 2d 66 70 3a 73 74 72 69 63 74 5d 0d 0a -c -fp:strict]..
4c00: 46 50 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50 FPOPTS = $(FPOP
4c10: 54 53 29 20 2d 66 70 3a 73 74 72 69 63 74 0d 0a TS) -fp:strict..
4c20: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 22 24 !endif....!if "$
4c30: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 (MACHINE)" == "I
4c40: 58 38 36 22 0d 0a 23 23 23 20 74 65 73 74 20 66 X86"..### test f
4c50: 6f 72 20 70 65 6e 74 69 75 6d 20 65 72 72 61 74 or pentium errat
4c60: 61 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 a..!if [nmakehlp
4c70: 20 2d 63 20 2d 51 49 30 66 5d 0d 0a 21 6d 65 73 -c -QI0f]..!mes
4c80: 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 sage *** Compile
4c90: 72 20 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30 r has 'Pentium 0
4ca0: 78 30 66 20 66 69 78 27 0d 0a 46 50 4f 50 54 53 x0f fix'..FPOPTS
4cb0: 20 20 3d 20 24 28 46 50 4f 50 54 53 29 20 2d 51 = $(FPOPTS) -Q
4cc0: 49 30 66 0d 0a 21 65 6c 73 65 0d 0a 21 6d 65 73 I0f..!else..!mes
4cd0: 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 sage *** Compile
4ce0: 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 r does not have
4cf0: 27 50 65 6e 74 69 75 6d 20 30 78 30 66 20 66 69 'Pentium 0x0f fi
4d00: 78 27 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 x'..!endif..!end
4d10: 69 66 0d 0a 0d 0a 23 23 23 20 74 65 73 74 20 66 if....### test f
4d20: 6f 72 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 or optimizations
4d30: 0d 0a 23 20 2f 4f 32 20 6f 70 74 69 6d 69 7a 61 ..# /O2 optimiza
4d40: 74 69 6f 6e 20 69 6e 63 6c 75 64 65 73 20 2f 4f tion includes /O
4d50: 67 20 2f 4f 69 20 2f 4f 74 20 2f 4f 79 20 2f 4f g /Oi /Ot /Oy /O
4d60: 62 32 20 2f 47 73 20 2f 47 46 20 2f 47 79 20 61 b2 /Gs /GF /Gy a
4d70: 73 20 70 65 72 0d 0a 23 20 64 6f 63 75 6d 65 6e s per..# documen
4d80: 74 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 77 65 20 tation. Note we
4d90: 64 6f 20 4e 4f 54 20 77 61 6e 74 20 2f 47 73 20 do NOT want /Gs
4da0: 61 73 20 74 68 61 74 20 69 6e 73 65 72 74 73 20 as that inserts
4db0: 61 20 5f 63 68 6b 73 74 6b 0d 0a 23 20 73 74 61 a _chkstk..# sta
4dc0: 63 6b 20 70 72 6f 62 65 20 61 74 20 2a 65 76 65 ck probe at *eve
4dd0: 72 79 2a 20 66 75 6e 63 74 69 6f 6e 20 65 6e 74 ry* function ent
4de0: 72 79 2c 20 6e 6f 74 20 6a 75 73 74 20 74 68 6f ry, not just tho
4df0: 73 65 20 77 69 74 68 20 6d 6f 72 65 20 74 68 61 se with more tha
4e00: 6e 0d 0a 23 20 61 20 70 61 67 65 20 6f 66 20 73 n..# a page of s
4e10: 74 61 63 6b 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 tack allocation
4e20: 72 65 73 75 6c 74 69 6e 67 20 69 6e 20 61 20 70 resulting in a p
4e30: 65 72 66 6f 72 6d 61 6e 63 65 20 68 69 74 2e 20 erformance hit.
4e40: 20 48 6f 77 65 76 65 72 2c 0d 0a 23 20 2f 4f 32 However,..# /O2
4e50: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69 documentation i
4e60: 73 20 6d 69 73 6c 65 61 64 69 6e 67 20 61 73 20 s misleading as
4e70: 69 74 73 20 73 74 61 63 6b 20 70 72 6f 62 65 73 its stack probes
4e80: 20 61 72 65 20 73 69 6d 70 6c 79 20 74 68 65 0d are simply the.
4e90: 0a 23 20 64 65 66 61 75 6c 74 20 70 61 67 65 20 .# default page
4ea0: 73 69 7a 65 20 6c 6f 63 61 6c 73 20 61 6c 6c 6f size locals allo
4eb0: 63 61 74 69 6f 6e 20 70 72 6f 62 65 73 20 61 6e cation probes an
4ec0: 64 20 6e 6f 74 20 77 68 61 74 20 69 73 20 69 6d d not what is im
4ed0: 70 6c 69 65 64 0d 0a 23 20 62 79 20 61 6e 20 65 plied..# by an e
4ee0: 78 70 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 69 xplicit /Gs opti
4ef0: 6f 6e 2e 0d 0a 0d 0a 4f 50 54 49 4d 49 5a 41 54 on.....OPTIMIZAT
4f00: 49 4f 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29 IONS = $(FPOPTS)
4f10: 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c ....!if [nmakehl
4f20: 70 20 2d 63 20 2d 4f 32 5d 0d 0a 4f 50 54 49 4d p -c -O2]..OPTIM
4f30: 49 5a 49 4e 47 20 3d 20 31 0d 0a 4f 50 54 49 4d IZING = 1..OPTIM
4f40: 49 5a 41 54 49 4f 4e 53 20 20 20 3d 20 24 28 4f IZATIONS = $(O
4f50: 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d 4f PTIMIZATIONS) -O
4f60: 32 0d 0a 21 65 6c 73 65 0d 0a 23 20 4c 65 67 61 2..!else..# Lega
4f70: 63 79 2c 20 72 65 61 6c 6c 79 2e 20 41 6c 6c 20 cy, really. All
4f80: 6d 6f 64 65 72 6e 20 63 6f 6d 70 69 6c 65 72 73 modern compilers
4f90: 20 73 75 70 70 6f 72 74 20 74 68 69 73 0d 0a 21 support this..!
4fa0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 message *** Comp
4fb0: 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 iler does not ha
4fc0: 76 65 20 27 4f 70 74 69 6d 69 7a 61 74 69 6f 6e ve 'Optimization
4fd0: 73 27 0d 0a 4f 50 54 49 4d 49 5a 49 4e 47 20 3d s'..OPTIMIZING =
4fe0: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 0..!endif....#
4ff0: 43 68 65 63 6b 73 20 66 6f 72 20 62 75 66 66 65 Checks for buffe
5000: 72 20 6f 76 65 72 66 6c 6f 77 73 20 69 6e 20 6c r overflows in l
5010: 6f 63 61 6c 20 61 72 72 61 79 73 0d 0a 21 69 66 ocal arrays..!if
5020: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 [nmakehlp -c -G
5030: 53 5d 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e S]..OPTIMIZATION
5040: 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 S = $(OPTIMIZAT
5050: 49 4f 4e 53 29 20 2d 47 53 0d 0a 21 65 6e 64 69 IONS) -GS..!endi
5060: 66 0d 0a 0d 0a 23 20 4c 69 6e 6b 20 74 69 6d 65 f....# Link time
5070: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e optimization. N
5080: 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 6f 70 ote that this op
5090: 74 69 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c tion (potentiall
50a0: 79 29 20 6d 61 6b 65 73 0d 0a 23 20 67 65 6e 65 y) makes..# gene
50b0: 72 61 74 65 64 20 6c 69 62 72 61 72 69 65 73 20 rated libraries
50c0: 6f 6e 6c 79 20 75 73 61 62 6c 65 20 62 79 20 74 only usable by t
50d0: 68 65 20 73 70 65 63 69 66 69 63 20 56 43 2b 2b he specific VC++
50e0: 20 76 65 72 73 69 6f 6e 20 74 68 61 74 0d 0a 23 version that..#
50f0: 20 63 72 65 61 74 65 64 20 69 74 2e 20 52 65 71 created it. Req
5100: 75 69 72 65 73 20 2f 4c 54 43 47 20 6c 69 6e 6b uires /LTCG link
5110: 65 72 20 6f 70 74 69 6f 6e 0d 0a 21 69 66 20 5b er option..!if [
5120: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d nmakehlp -c -GL]
5130: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ..OPTIMIZATIONS
5140: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
5150: 4e 53 29 20 2d 47 4c 0d 0a 43 43 5f 47 4c 5f 4f NS) -GL..CC_GL_O
5160: 50 54 5f 45 4e 41 42 4c 45 44 20 3d 20 31 0d 0a PT_ENABLED = 1..
5170: 21 65 6c 73 65 0d 0a 23 20 49 6e 20 6e 65 77 65 !else..# In newe
5180: 72 20 63 6f 6d 70 69 6c 65 72 73 20 2d 47 4c 20 r compilers -GL
5190: 61 6e 64 20 2d 59 58 20 61 72 65 20 69 6e 63 6f and -YX are inco
51a0: 6d 70 61 74 69 62 6c 65 2e 0d 0a 21 69 66 20 5b mpatible...!if [
51b0: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 59 58 5d nmakehlp -c -YX]
51c0: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ..OPTIMIZATIONS
51d0: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
51e0: 4e 53 29 20 2d 59 58 0d 0a 21 65 6e 64 69 66 0d NS) -YX..!endif.
51f0: 0a 21 65 6e 64 69 66 20 23 20 5b 6e 6d 61 6b 65 .!endif # [nmake
5200: 68 6c 70 20 2d 63 20 2d 47 4c 5d 0d 0a 0d 0a 44 hlp -c -GL]....D
5210: 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 EBUGFLAGS =
5220: 24 28 46 50 4f 50 54 53 29 0d 0a 0d 0a 23 20 52 $(FPOPTS)....# R
5230: 75 6e 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68 un time error ch
5240: 65 63 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61 ecks. Not availa
5250: 62 6c 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20 ble or valid in
5260: 61 20 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64 a release, non-d
5270: 65 62 75 67 20 62 75 69 6c 64 0d 0a 23 20 52 54 ebug build..# RT
5280: 43 20 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20 C is for modern
5290: 63 6f 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69 compilers, -GZ i
52a0: 73 20 6c 65 67 61 63 79 0d 0a 21 69 66 20 5b 6e s legacy..!if [n
52b0: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 52 54 43 31 makehlp -c -RTC1
52c0: 5d 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 ]..DEBUGFLAGS
52d0: 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53 = $(DEBUGFLAGS
52e0: 29 20 2d 52 54 43 31 0d 0a 21 65 6c 73 65 69 66 ) -RTC1..!elseif
52f0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 [nmakehlp -c -G
5300: 5a 5d 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 Z]..DEBUGFLAGS
5310: 20 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 = $(DEBUGFLAG
5320: 53 29 20 2d 47 5a 0d 0a 21 65 6e 64 69 66 0d 0a S) -GZ..!endif..
5330: 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ..#-------------
5340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5360: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5370: 2d 2d 2d 0d 0a 23 20 4c 69 6e 6b 65 72 20 66 6c ---..# Linker fl
5380: 61 67 73 0d 0a 0d 0a 23 20 4c 49 4e 4b 45 52 5f ags....# LINKER_
5390: 54 45 53 54 46 4c 41 47 53 20 61 72 65 20 66 6f TESTFLAGS are fo
53a0: 72 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 77 r internal use w
53b0: 68 65 6e 20 77 65 20 63 61 6c 6c 20 6e 6d 61 6b hen we call nmak
53c0: 65 68 6c 70 20 74 6f 20 74 65 73 74 0d 0a 23 20 ehlp to test..#
53d0: 69 66 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 75 if the linker su
53e0: 70 70 6f 72 74 73 20 61 20 73 70 65 63 69 66 69 pports a specifi
53f0: 63 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f 75 c option. Withou
5400: 74 20 74 68 65 73 65 20 66 6c 61 67 73 20 6c 69 t these flags li
5410: 6e 6b 20 77 69 6c 6c 0d 0a 23 20 72 65 74 75 72 nk will..# retur
5420: 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72 n "LNK1561: entr
5430: 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 62 65 20 y point must be
5440: 64 65 66 69 6e 65 64 22 20 65 72 72 6f 72 20 63 defined" error c
5450: 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53 ompiling from VS
5460: 2d 49 44 45 3a 0d 0a 23 20 54 68 65 79 20 61 72 -IDE:..# They ar
5470: 65 20 6e 6f 74 20 70 61 73 73 65 64 20 74 68 72 e not passed thr
5480: 6f 75 67 68 20 74 6f 20 74 68 65 20 61 63 74 75 ough to the actu
5490: 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 2f al application /
54a0: 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 23 20 6c 69 extension..# li
54b0: 6e 6b 20 72 75 6c 65 73 2e 0d 0a 21 69 66 6e 64 nk rules...!ifnd
54c0: 65 66 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c ef LINKER_TESTFL
54d0: 41 47 53 0d 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 AGS..LINKER_TEST
54e0: 46 4c 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f FLAGS = /DLL /NO
54f0: 45 4e 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 ENTRY /OUT:nmake
5500: 68 6c 70 2e 6f 75 74 0d 0a 21 65 6e 64 69 66 0d hlp.out..!endif.
5510: 0a 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 20 ...LINKERFLAGS
5520: 20 20 20 3d 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d =....# If com
5530: 70 69 6c 65 72 20 68 61 73 20 65 6e 61 62 6c 65 piler has enable
5540: 64 20 6c 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69 d link time opti
5550: 6d 69 7a 61 74 69 6f 6e 2c 20 6c 69 6e 6b 65 72 mization, linker
5560: 20 6d 75 73 74 20 74 6f 6f 20 77 69 74 68 20 2d must too with -
5570: 6c 74 63 67 0d 0a 21 69 66 64 65 66 20 43 43 5f ltcg..!ifdef CC_
5580: 47 4c 5f 4f 50 54 5f 45 4e 41 42 4c 45 44 0d 0a GL_OPT_ENABLED..
5590: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c !if [nmakehlp -l
55a0: 20 2d 6c 74 63 67 20 24 28 4c 49 4e 4b 45 52 5f -ltcg $(LINKER_
55b0: 54 45 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e TESTFLAGS)]..LIN
55c0: 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d 20 24 KERFLAGS = $
55d0: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6c (LINKERFLAGS) -l
55e0: 74 63 67 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e tcg..!endif..!en
55f0: 64 69 66 0d 0a 0d 0a 0d 0a 23 23 23 23 23 23 23 dif......#######
5600: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5630: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 36 2e 20 #########..# 6.
5640: 45 78 74 72 61 63 74 20 76 61 72 69 6f 75 73 20 Extract various
5650: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
5660: 66 72 6f 6d 20 68 65 61 64 65 72 73 0d 0a 23 20 from headers..#
5670: 46 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20 For Tcl and Tk,
5680: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
5690: 61 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72 are extracted fr
56a0: 6f 6d 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e om tcl.h and tk.
56b0: 68 0d 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c h..# respectivel
56c0: 79 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e y. For extension
56d0: 73 2c 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20 s, versions are
56e0: 65 78 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 extracted from t
56f0: 68 65 0d 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e he..# configure.
5700: 69 6e 20 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e in or configure.
5710: 61 63 20 66 72 6f 6d 20 74 68 65 20 54 45 41 20 ac from the TEA
5720: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 66 configuration if
5730: 20 69 74 0d 0a 23 20 65 78 69 73 74 73 2c 20 61 it..# exists, a
5740: 6e 64 20 75 6e 73 65 74 20 6f 74 68 65 72 77 69 nd unset otherwi
5750: 73 65 2e 0d 0a 23 20 53 65 74 73 20 74 68 65 20 se...# Sets the
5760: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
5770: 3a 0d 0a 23 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 :..# TCL_MAJOR_V
5780: 45 52 53 49 4f 4e 0d 0a 23 20 54 43 4c 5f 4d 49 ERSION..# TCL_MI
5790: 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54 NOR_VERSION..# T
57a0: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
57b0: 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c L..# TCL_PATCH_L
57c0: 45 56 45 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43 EVEL..# TCL_PATC
57d0: 48 5f 4c 45 54 54 45 52 0d 0a 23 20 54 43 4c 5f H_LETTER..# TCL_
57e0: 56 45 52 53 49 4f 4e 0d 0a 23 20 54 4b 5f 4d 41 VERSION..# TK_MA
57f0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54 JOR_VERSION..# T
5800: 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d K_MINOR_VERSION.
5810: 0a 23 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 .# TK_RELEASE_SE
5820: 52 49 41 4c 0d 0a 23 20 54 4b 5f 50 41 54 43 48 RIAL..# TK_PATCH
5830: 5f 4c 45 56 45 4c 0d 0a 23 20 54 4b 5f 50 41 54 _LEVEL..# TK_PAT
5840: 43 48 5f 4c 45 54 54 45 52 0d 0a 23 20 54 4b 5f CH_LETTER..# TK_
5850: 56 45 52 53 49 4f 4e 0d 0a 23 20 44 4f 54 56 45 VERSION..# DOTVE
5860: 52 53 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 RSION - set as (
5870: 66 6f 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35 for example) 2.5
5880: 0d 0a 23 20 56 45 52 53 49 4f 4e 20 2d 20 73 65 ..# VERSION - se
5890: 74 20 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c t as (for exampl
58a0: 65 20 32 35 29 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d e 25)..#--------
58b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58e0: 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 21 69 66 20 5b 65 ------....!if [e
58f0: 63 68 6f 20 52 45 4d 20 3d 20 54 68 69 73 20 66 cho REM = This f
5900: 69 6c 65 20 69 73 20 67 65 6e 65 72 61 74 65 64 ile is generated
5910: 20 66 72 6f 6d 20 72 75 6c 65 73 2e 76 63 20 3e from rules.vc >
5920: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 versions.vc]..!
5930: 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f endif..!if [echo
5940: 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 TCL_MAJOR_VERSI
5950: 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e ON = \>> version
5960: 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b s.vc] \.. && [
5970: 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f nmakehlp -V "$(_
5980: 54 43 4c 5f 48 29 22 20 22 64 65 66 69 6e 65 20 TCL_H)" "define
5990: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
59a0: 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 N" >> versions.v
59b0: 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 c]..!endif..!if
59c0: 5b 65 63 68 6f 20 54 43 4c 5f 4d 49 4e 4f 52 5f [echo TCL_MINOR_
59d0: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 VERSION = \>> ve
59e0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 rsions.vc] \..
59f0: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 && [nmakehlp -V
5a00: 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c "$(_TCL_H)" TCL
5a10: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3e _MINOR_VERSION >
5a20: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a > versions.vc]..
5a30: 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 !endif..!if [ech
5a40: 6f 20 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 o TCL_RELEASE_SE
5a50: 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 69 RIAL = \>> versi
5a60: 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 26 ons.vc] \.. &&
5a70: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24 [nmakehlp -V "$
5a80: 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f 52 45 (_TCL_H)" TCL_RE
5a90: 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e 20 LEASE_SERIAL >>
5aa0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 versions.vc]..!e
5ab0: 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 ndif..!if [echo
5ac0: 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 TCL_PATCH_LEVEL
5ad0: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \>> versions.v
5ae0: 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 c] \.. && [nma
5af0: 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c kehlp -V "$(_TCL
5b00: 5f 48 29 22 20 54 43 4c 5f 50 41 54 43 48 5f 4c _H)" TCL_PATCH_L
5b10: 45 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 EVEL >> versions
5b20: 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a .vc]..!endif....
5b30: 21 69 66 20 64 65 66 69 6e 65 64 28 5f 54 4b 5f !if defined(_TK_
5b40: 48 29 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b H)..!if [echo TK
5b50: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 3d _MAJOR_VERSION =
5b60: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 \>> versions.vc
5b70: 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b ] \.. && [nmak
5b80: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29 ehlp -V $(_TK_H)
5b90: 20 22 64 65 66 69 6e 65 20 54 4b 5f 4d 41 4a 4f "define TK_MAJO
5ba0: 52 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 R_VERSION" >> ve
5bb0: 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 rsions.vc]..!end
5bc0: 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b if..!if [echo TK
5bd0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d _MINOR_VERSION =
5be0: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 \>> versions.vc
5bf0: 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b ] \.. && [nmak
5c00: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29 ehlp -V $(_TK_H)
5c10: 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f TK_MINOR_VERSIO
5c20: 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 N >> versions.vc
5c30: 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b ]..!endif..!if [
5c40: 65 63 68 6f 20 54 4b 5f 52 45 4c 45 41 53 45 5f echo TK_RELEASE_
5c50: 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 72 SERIAL = \>> ver
5c60: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 sions.vc] \..
5c70: 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 && [nmakehlp -V
5c80: 22 24 28 5f 54 4b 5f 48 29 22 20 54 4b 5f 52 45 "$(_TK_H)" TK_RE
5c90: 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e 20 LEASE_SERIAL >>
5ca0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 versions.vc]..!e
5cb0: 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 ndif..!if [echo
5cc0: 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 3d TK_PATCH_LEVEL =
5cd0: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 \>> versions.vc
5ce0: 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b ] \.. && [nmak
5cf0: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29 ehlp -V $(_TK_H)
5d00: 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 TK_PATCH_LEVEL
5d10: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d >> versions.vc].
5d20: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 .!endif..!endif
5d30: 23 20 5f 54 4b 5f 48 0d 0a 0d 0a 21 69 6e 63 6c # _TK_H....!incl
5d40: 75 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0d ude versions.vc.
5d50: 0a 0d 0a 54 43 4c 5f 56 45 52 53 49 4f 4e 09 3d ...TCL_VERSION.=
5d60: 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 $(TCL_MAJOR_VER
5d70: 53 49 4f 4e 29 24 28 54 43 4c 5f 4d 49 4e 4f 52 SION)$(TCL_MINOR
5d80: 5f 56 45 52 53 49 4f 4e 29 0d 0a 54 43 4c 5f 44 _VERSION)..TCL_D
5d90: 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 OTVERSION.= $(TC
5da0: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
5db0: 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 .$(TCL_MINOR_VER
5dc0: 53 49 4f 4e 29 0d 0a 21 69 66 20 5b 6e 6d 61 6b SION)..!if [nmak
5dd0: 65 68 6c 70 20 2d 66 20 24 28 54 43 4c 5f 50 41 ehlp -f $(TCL_PA
5de0: 54 43 48 5f 4c 45 56 45 4c 29 20 22 61 22 5d 0d TCH_LEVEL) "a"].
5df0: 0a 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 .TCL_PATCH_LETTE
5e00: 52 20 3d 20 61 0d 0a 21 65 6c 73 65 69 66 20 5b R = a..!elseif [
5e10: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 54 43 nmakehlp -f $(TC
5e20: 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 29 20 22 L_PATCH_LEVEL) "
5e30: 62 22 5d 0d 0a 54 43 4c 5f 50 41 54 43 48 5f 4c b"]..TCL_PATCH_L
5e40: 45 54 54 45 52 20 3d 20 62 0d 0a 21 65 6c 73 65 ETTER = b..!else
5e50: 0d 0a 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 ..TCL_PATCH_LETT
5e60: 45 52 20 3d 20 2e 0d 0a 21 65 6e 64 69 66 0d 0a ER = ...!endif..
5e70: 0d 0a 21 69 66 20 64 65 66 69 6e 65 64 28 5f 54 ..!if defined(_T
5e80: 4b 5f 48 29 0d 0a 0d 0a 54 4b 5f 56 45 52 53 49 K_H)....TK_VERSI
5e90: 4f 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f ON.= $(TK_MAJOR_
5ea0: 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 4d 49 4e VERSION)$(TK_MIN
5eb0: 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 54 4b 5f OR_VERSION)..TK_
5ec0: 44 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 DOTVERSION.= $(T
5ed0: 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 K_MAJOR_VERSION)
5ee0: 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 .$(TK_MINOR_VERS
5ef0: 49 4f 4e 29 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 ION)..!if [nmake
5f00: 68 6c 70 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 hlp -f $(TK_PATC
5f10: 48 5f 4c 45 56 45 4c 29 20 22 61 22 5d 0d 0a 54 H_LEVEL) "a"]..T
5f20: 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d K_PATCH_LETTER =
5f30: 20 61 0d 0a 21 65 6c 73 65 69 66 20 5b 6e 6d 61 a..!elseif [nma
5f40: 6b 65 68 6c 70 20 2d 66 20 24 28 54 4b 5f 50 41 kehlp -f $(TK_PA
5f50: 54 43 48 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0d TCH_LEVEL) "b"].
5f60: 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 .TK_PATCH_LETTER
5f70: 20 3d 20 62 0d 0a 21 65 6c 73 65 0d 0a 54 4b 5f = b..!else..TK_
5f80: 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e PATCH_LETTER = .
5f90: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 ..!endif....!end
5fa0: 69 66 0d 0a 0d 0a 23 20 53 65 74 20 44 4f 54 56 if....# Set DOTV
5fb0: 45 52 53 49 4f 4e 20 61 6e 64 20 56 45 52 53 49 ERSION and VERSI
5fc0: 4f 4e 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f ON..!if $(DOING_
5fd0: 54 43 4c 29 0d 0a 0d 0a 44 4f 54 56 45 52 53 49 TCL)....DOTVERSI
5fe0: 4f 4e 20 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 ON = $(TCL_MAJOR
5ff0: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f _VERSION).$(TCL_
6000: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a MINOR_VERSION)..
6010: 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c 5f VERSION = $(TCL_
6020: 56 45 52 53 49 4f 4e 29 0d 0a 0d 0a 21 65 6c 73 VERSION)....!els
6030: 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0d eif $(DOING_TK).
6040: 0a 0d 0a 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 ...DOTVERSION =
6050: 24 28 54 4b 5f 44 4f 54 56 45 52 53 49 4f 4e 29 $(TK_DOTVERSION)
6060: 0d 0a 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b ..VERSION = $(TK
6070: 5f 56 45 52 53 49 4f 4e 29 0d 0a 0d 0a 21 65 6c _VERSION)....!el
6080: 73 65 20 23 20 44 6f 69 6e 67 20 61 20 6e 6f 6e se # Doing a non
6090: 2d 54 6b 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 0d -Tk extension...
60a0: 0a 23 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b .# If parent mak
60b0: 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 efile has not de
60c0: 66 69 6e 65 64 20 44 4f 54 56 45 52 53 49 4f 4e fined DOTVERSION
60d0: 2c 20 74 72 79 20 74 6f 20 67 65 74 20 69 74 20 , try to get it
60e0: 66 72 6f 6d 20 54 45 41 0d 0a 23 20 66 69 72 73 from TEA..# firs
60f0: 74 20 66 72 6f 6d 20 61 20 63 6f 6e 66 69 67 75 t from a configu
6100: 72 65 2e 69 6e 20 66 69 6c 65 2c 20 61 6e 64 20 re.in file, and
6110: 74 68 65 6e 20 66 72 6f 6d 20 63 6f 6e 66 69 67 then from config
6120: 75 72 65 2e 61 63 0d 0a 21 69 66 6e 64 65 66 20 ure.ac..!ifndef
6130: 44 4f 54 56 45 52 53 49 4f 4e 0d 0a 21 69 66 20 DOTVERSION..!if
6140: 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 49 4f 4e [echo DOTVERSION
6150: 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \> versions.v
6160: 63 5d 20 5c 0d 0a 20 20 20 7c 7c 20 5b 6e 6d 61 c] \.. || [nma
6170: 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f 54 29 kehlp -V $(ROOT)
6180: 5c 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 5e 5b \configure.in ^[
6190: 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e 3e 20 $(PROJECT)^] >>
61a0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 69 versions.vc]..!i
61b0: 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 49 f [echo DOTVERSI
61c0: 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 ON = \> versions
61d0: 2e 76 63 5d 20 5c 0d 0a 20 20 20 7c 7c 20 5b 6e .vc] \.. || [n
61e0: 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f makehlp -V $(ROO
61f0: 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 61 63 20 T)\configure.ac
6200: 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e ^[$(PROJECT)^] >
6210: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a > versions.vc]..
6220: 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 !error *** Could
6230: 20 6e 6f 74 20 66 69 67 75 72 65 20 6f 75 74 20 not figure out
6240: 65 78 74 65 6e 73 69 6f 6e 20 76 65 72 73 69 6f extension versio
6250: 6e 2e 20 50 6c 65 61 73 65 20 64 65 66 69 6e 65 n. Please define
6260: 20 44 4f 54 56 45 52 53 49 4f 4e 20 69 6e 20 70 DOTVERSION in p
6270: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 62 arent makefile b
6280: 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 efore including
6290: 72 75 6c 65 73 2e 76 63 2e 0d 0a 21 65 6e 64 69 rules.vc...!endi
62a0: 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c f..!endif..!incl
62b0: 75 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0d ude versions.vc.
62c0: 0a 21 65 6e 64 69 66 20 23 20 44 4f 54 56 45 52 .!endif # DOTVER
62d0: 53 49 4f 4e 0d 0a 56 45 52 53 49 4f 4e 20 20 20 SION..VERSION
62e0: 20 20 20 20 20 20 3d 20 24 28 44 4f 54 56 45 52 = $(DOTVER
62f0: 53 49 4f 4e 3a 2e 3d 29 0d 0a 0d 0a 21 65 6e 64 SION:.=)....!end
6300: 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 43 4c if # $(DOING_TCL
6310: 29 20 2e 2e 2e 20 65 74 63 2e 0d 0a 0d 0a 23 20 ) ... etc.....#
6320: 57 69 6e 64 6f 77 73 20 52 43 20 66 69 6c 65 73 Windows RC files
6330: 20 68 61 76 65 20 33 20 76 65 72 73 69 6f 6e 20 have 3 version
6340: 63 6f 6d 70 6f 6e 65 6e 74 73 2e 20 45 6e 73 75 components. Ensu
6350: 72 65 20 74 68 69 73 20 69 72 72 65 73 70 65 63 re this irrespec
6360: 74 69 76 65 0d 0a 23 20 6f 66 20 68 6f 77 20 6d tive..# of how m
6370: 61 6e 79 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 74 any components t
6380: 68 65 20 70 61 63 6b 61 67 65 20 68 61 73 20 73 he package has s
6390: 70 65 63 69 66 69 65 64 2e 20 42 61 73 69 63 61 pecified. Basica
63a0: 6c 6c 79 2c 20 65 6e 73 75 72 65 0d 0a 23 20 6d lly, ensure..# m
63b0: 69 6e 69 6d 75 6d 20 34 20 63 6f 6d 70 6f 6e 65 inimum 4 compone
63c0: 6e 74 73 20 62 79 20 61 70 70 65 6e 64 69 6e 67 nts by appending
63d0: 20 34 20 30 27 73 20 61 6e 64 20 74 68 65 6e 20 4 0's and then
63e0: 70 69 63 6b 20 6f 75 74 20 74 68 65 20 66 69 72 pick out the fir
63f0: 73 74 20 34 2e 0d 0a 23 20 41 6c 73 6f 20 74 61 st 4...# Also ta
6400: 6b 65 20 63 61 72 65 20 6f 66 20 74 68 65 20 66 ke care of the f
6410: 61 63 74 20 74 68 61 74 20 44 4f 54 56 45 52 53 act that DOTVERS
6420: 49 4f 4e 20 6d 61 79 20 68 61 76 65 20 22 61 22 ION may have "a"
6430: 20 6f 72 20 22 62 22 20 69 6e 73 74 65 61 64 0d or "b" instead.
6440: 0a 23 20 6f 66 20 22 2e 22 20 73 65 70 61 72 61 .# of "." separa
6450: 74 69 6e 67 20 74 68 65 20 76 65 72 73 69 6f 6e ting the version
6460: 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e 0d 0a 44 4f components...DO
6470: 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54 TSEPARATED=$(DOT
6480: 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 0d 0a 44 4f VERSION:a=.)..DO
6490: 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54 TSEPARATED=$(DOT
64a0: 53 45 50 41 52 41 54 45 44 3a 62 3d 2e 29 0d 0a SEPARATED:b=.)..
64b0: 21 69 66 20 5b 65 63 68 6f 20 52 43 43 4f 4d 4d !if [echo RCCOMM
64c0: 41 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 AVERSION = \> ve
64d0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 rsions.vc] \..
64e0: 7c 7c 20 5b 66 6f 72 20 2f 66 20 22 74 6f 6b 65 || [for /f "toke
64f0: 6e 73 3d 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 65 ns=1,2,3,4,5* de
6500: 6c 69 6d 73 3d 2e 22 20 25 61 20 69 6e 20 28 22 lims=." %a in ("
6510: 24 28 44 4f 54 53 45 50 41 52 41 54 45 44 29 2e $(DOTSEPARATED).
6520: 30 2e 30 2e 30 2e 30 22 29 20 64 6f 20 65 63 68 0.0.0.0") do ech
6530: 6f 20 25 61 2c 25 62 2c 25 63 2c 25 64 20 3e 3e o %a,%b,%c,%d >>
6540: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 versions.vc]..!
6550: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
6560: 6e 6f 74 20 67 65 6e 65 72 61 74 65 20 52 43 43 not generate RCC
6570: 4f 4d 4d 41 56 45 52 53 49 4f 4e 20 2a 2a 2a 0d OMMAVERSION ***.
6580: 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75 64 .!endif..!includ
6590: 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0d 0a 0d e versions.vc...
65a0: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
65b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65e0: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 37 2e 20 #########..# 7.
65f0: 50 61 72 73 65 20 74 68 65 20 4f 50 54 53 20 6d Parse the OPTS m
6600: 61 63 72 6f 20 74 6f 20 77 6f 72 6b 20 6f 75 74 acro to work out
6610: 20 74 68 65 20 72 65 71 75 65 73 74 65 64 20 62 the requested b
6620: 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 uild configurati
6630: 6f 6e 2e 0d 0a 23 20 42 61 73 65 64 20 6f 6e 20 on...# Based on
6640: 74 68 69 73 2c 20 77 65 20 77 69 6c 6c 20 63 6f this, we will co
6650: 6e 73 74 72 75 63 74 20 74 68 65 20 61 63 74 75 nstruct the actu
6660: 61 6c 20 73 77 69 74 63 68 65 73 20 74 6f 20 62 al switches to b
6670: 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0d e passed to the.
6680: 0a 23 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 .# compiler and
6690: 6c 69 6e 6b 65 72 20 75 73 69 6e 67 20 74 68 65 linker using the
66a0: 20 6d 61 63 72 6f 73 20 64 65 66 69 6e 65 64 20 macros defined
66b0: 69 6e 20 74 68 65 20 70 72 65 76 69 6f 75 73 20 in the previous
66c0: 73 65 63 74 69 6f 6e 2e 0d 0a 23 20 54 68 65 20 section...# The
66d0: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
66e0: 20 61 72 65 20 64 65 66 69 6e 65 64 20 62 79 20 are defined by
66f0: 74 68 69 73 20 73 65 63 74 69 6f 6e 20 62 61 73 this section bas
6700: 65 64 20 6f 6e 20 4f 50 54 53 0d 0a 23 20 53 54 ed on OPTS..# ST
6710: 41 54 49 43 5f 42 55 49 4c 44 20 2d 20 30 20 2d ATIC_BUILD - 0 -
6720: 3e 20 54 63 6c 20 69 73 20 74 6f 20 62 65 20 62 > Tcl is to be b
6730: 75 69 6c 74 20 61 73 20 61 20 73 68 61 72 65 64 uilt as a shared
6740: 20 6c 69 62 72 61 72 79 0d 0a 23 20 20 20 20 20 library..#
6750: 20 20 20 20 20 20 20 20 20 20 20 31 20 2d 3e 20 1 ->
6760: 62 75 69 6c 64 20 61 73 20 61 20 73 74 61 74 69 build as a stati
6770: 63 20 6c 69 62 72 61 72 79 20 61 6e 64 20 73 68 c library and sh
6780: 65 6c 6c 0d 0a 23 20 54 43 4c 5f 54 48 52 45 41 ell..# TCL_THREA
6790: 44 53 20 2d 20 6c 65 67 61 63 79 20 62 75 74 20 DS - legacy but
67a0: 61 6c 77 61 79 73 20 31 20 6f 6e 20 57 69 6e 64 always 1 on Wind
67b0: 6f 77 73 20 73 69 6e 63 65 20 77 69 6e 73 6f 63 ows since winsoc
67c0: 6b 20 72 65 71 75 69 72 65 73 20 69 74 2e 0d 0a k requires it...
67d0: 23 20 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 64 # DEBUG - 1 -> d
67e0: 65 62 75 67 20 62 75 69 6c 64 2c 20 30 20 2d 3e ebug build, 0 ->
67f0: 20 72 65 6c 65 61 73 65 20 62 75 69 6c 64 73 0d release builds.
6800: 0a 23 20 53 59 4d 42 4f 4c 53 20 2d 20 31 20 2d .# SYMBOLS - 1 -
6810: 3e 20 67 65 6e 65 72 61 74 65 20 50 44 42 27 73 > generate PDB's
6820: 2c 20 30 20 2d 3e 20 6e 6f 20 50 44 42 27 73 0d , 0 -> no PDB's.
6830: 0a 23 20 50 52 4f 46 49 4c 45 20 2d 20 31 20 2d .# PROFILE - 1 -
6840: 3e 20 67 65 6e 65 72 61 74 65 20 70 72 6f 66 69 > generate profi
6850: 6c 69 6e 67 20 69 6e 66 6f 2c 20 30 20 2d 3e 20 ling info, 0 ->
6860: 6e 6f 20 70 72 6f 66 69 6c 69 6e 67 0d 0a 23 20 no profiling..#
6870: 50 47 4f 20 20 20 20 20 2d 20 31 20 2d 3e 20 70 PGO - 1 -> p
6880: 72 6f 66 69 6c 65 20 62 61 73 65 64 20 6f 70 74 rofile based opt
6890: 69 6d 69 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e 20 imization, 0 ->
68a0: 6e 6f 0d 0a 23 20 4d 53 56 43 52 54 20 20 2d 20 no..# MSVCRT -
68b0: 31 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 64 79 6e 1 -> link to dyn
68c0: 61 6d 69 63 20 43 20 72 75 6e 74 69 6d 65 20 65 amic C runtime e
68d0: 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e ven when buildin
68e0: 67 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 g static Tcl bui
68f0: 6c 64 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 ld..#
6900: 30 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 73 74 61 0 -> link to sta
6910: 74 69 63 20 43 20 72 75 6e 74 69 6d 65 20 66 6f tic C runtime fo
6920: 72 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 r static Tcl bui
6930: 6c 64 2e 0d 0a 23 20 20 20 20 20 20 20 20 20 20 ld...#
6940: 20 44 6f 65 73 20 6e 6f 74 20 69 6d 70 61 63 74 Does not impact
6950: 20 73 68 61 72 65 64 20 54 63 6c 20 62 75 69 6c shared Tcl buil
6960: 64 73 20 28 53 54 41 54 49 43 5f 42 55 49 4c 44 ds (STATIC_BUILD
6970: 20 3d 3d 20 30 29 0d 0a 23 20 20 20 20 20 20 20 == 0)..#
6980: 20 20 20 20 44 65 66 61 75 6c 74 3a 20 31 20 66 Default: 1 f
6990: 6f 72 20 54 63 6c 20 38 2e 37 20 61 6e 64 20 75 or Tcl 8.7 and u
69a0: 70 2c 20 30 20 6f 74 68 65 72 77 69 73 65 2e 0d p, 0 otherwise..
69b0: 0a 23 20 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 .# TCL_USE_STATI
69c0: 43 5f 50 41 43 4b 41 47 45 53 20 2d 20 31 20 2d C_PACKAGES - 1 -
69d0: 3e 20 73 74 61 74 69 63 61 6c 6c 79 20 6c 69 6e > statically lin
69e0: 6b 20 74 68 65 20 72 65 67 69 73 74 72 79 20 61 k the registry a
69f0: 6e 64 20 64 64 65 20 65 78 74 65 6e 73 69 6f 6e nd dde extension
6a00: 73 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 69 s..# i
6a10: 6e 20 74 68 65 20 54 63 6c 20 61 6e 64 20 57 69 n the Tcl and Wi
6a20: 73 68 20 73 68 65 6c 6c 2e 20 30 20 2d 3e 20 6b sh shell. 0 -> k
6a30: 65 65 70 20 74 68 65 6d 20 61 73 20 73 68 61 72 eep them as shar
6a40: 65 64 20 6c 69 62 72 61 72 69 65 73 2e 20 44 6f ed libraries. Do
6a50: 65 73 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 es..#
6a60: 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 61 72 65 not impact share
6a70: 64 20 54 63 6c 20 62 75 69 6c 64 73 2e 20 49 6d d Tcl builds. Im
6a80: 70 6c 69 65 64 20 62 79 20 53 54 41 54 49 43 5f plied by STATIC_
6a90: 42 55 49 4c 44 20 73 69 6e 63 65 20 54 63 6c 20 BUILD since Tcl
6aa0: 38 2e 37 2e 0d 0a 23 20 55 53 45 5f 54 48 52 45 8.7...# USE_THRE
6ab0: 41 44 5f 41 4c 4c 4f 43 20 2d 20 31 20 2d 3e 20 AD_ALLOC - 1 ->
6ac0: 55 73 65 20 61 20 73 68 61 72 65 64 20 67 6c 6f Use a shared glo
6ad0: 62 61 6c 20 66 72 65 65 20 70 6f 6f 6c 20 66 6f bal free pool fo
6ae0: 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 2e 0d 0a 23 r allocation...#
6af0: 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 0 ->
6b00: 55 73 65 20 74 68 65 20 6e 6f 6e 2d 74 68 72 65 Use the non-thre
6b10: 61 64 20 61 6c 6c 6f 63 61 74 6f 72 2e 0d 0a 23 ad allocator...#
6b20: 20 55 4e 43 48 45 43 4b 45 44 20 2d 20 31 20 2d UNCHECKED - 1 -
6b30: 3e 20 77 68 65 6e 20 64 6f 69 6e 67 20 61 20 64 > when doing a d
6b40: 65 62 75 67 20 62 75 69 6c 64 20 77 69 74 68 20 ebug build with
6b50: 73 79 6d 62 6f 6c 73 2c 20 75 73 65 20 74 68 65 symbols, use the
6b60: 20 72 65 6c 65 61 73 65 0d 0a 23 20 20 20 20 20 release..#
6b70: 20 20 20 20 20 20 43 20 72 75 6e 74 69 6d 65 2c C runtime,
6b80: 20 30 20 2d 3e 20 75 73 65 20 74 68 65 20 64 65 0 -> use the de
6b90: 62 75 67 20 43 20 72 75 6e 74 69 6d 65 2e 0d 0a bug C runtime...
6ba0: 23 20 55 53 45 5f 53 54 55 42 53 20 2d 20 31 20 # USE_STUBS - 1
6bb0: 2d 3e 20 63 6f 6d 70 69 6c 65 20 74 6f 20 75 73 -> compile to us
6bc0: 65 20 73 74 75 62 73 20 69 6e 74 65 72 66 61 63 e stubs interfac
6bd0: 65 73 2c 20 30 20 2d 3e 20 64 69 72 65 63 74 20 es, 0 -> direct
6be0: 6c 69 6e 6b 69 6e 67 0d 0a 23 20 43 4f 4e 46 49 linking..# CONFI
6bf0: 47 5f 43 48 45 43 4b 20 2d 20 31 20 2d 3e 20 63 G_CHECK - 1 -> c
6c00: 68 65 63 6b 20 63 75 72 72 65 6e 74 20 62 75 69 heck current bui
6c10: 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e ld configuration
6c20: 20 61 67 61 69 6e 73 74 20 54 63 6c 0d 0a 23 20 against Tcl..#
6c30: 20 20 20 20 20 20 20 20 20 20 63 6f 6e 66 69 67 config
6c40: 75 72 61 74 69 6f 6e 20 28 69 67 6e 6f 72 65 64 uration (ignored
6c50: 20 66 6f 72 20 54 63 6c 20 69 74 73 65 6c 66 29 for Tcl itself)
6c60: 0d 0a 23 20 5f 55 53 45 5f 36 34 42 49 54 5f 54 ..# _USE_64BIT_T
6c70: 49 4d 45 5f 54 20 2d 20 66 6f 72 63 65 73 20 61 IME_T - forces a
6c80: 20 62 75 69 6c 64 20 75 73 69 6e 67 20 36 34 2d build using 64-
6c90: 62 69 74 20 74 69 6d 65 5f 74 20 66 6f 72 20 33 bit time_t for 3
6ca0: 32 2d 62 69 74 20 62 75 69 6c 64 0d 0a 23 20 20 2-bit build..#
6cb0: 20 20 20 20 20 20 20 20 20 28 43 52 54 20 6c 69 (CRT li
6cc0: 62 72 61 72 79 20 73 68 6f 75 6c 64 20 73 75 70 brary should sup
6cd0: 70 6f 72 74 20 74 68 69 73 2c 20 6e 6f 74 20 6e port this, not n
6ce0: 65 65 64 65 64 20 66 6f 72 20 54 63 6c 20 39 2e eeded for Tcl 9.
6cf0: 78 29 0d 0a 23 20 46 75 72 74 68 65 72 2c 20 4c x)..# Further, L
6d00: 49 4e 4b 45 52 46 4c 41 47 53 20 61 72 65 20 6d INKERFLAGS are m
6d10: 6f 64 69 66 69 65 64 20 62 61 73 65 64 20 6f 6e odified based on
6d20: 20 61 62 6f 76 65 2e 0d 0a 0d 0a 23 20 44 65 66 above.....# Def
6d30: 61 75 6c 74 20 76 61 6c 75 65 73 20 66 6f 72 20 ault values for
6d40: 61 6c 6c 20 74 68 65 20 61 62 6f 76 65 0d 0a 53 all the above..S
6d50: 54 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 30 0d TATIC_BUILD.= 0.
6d60: 0a 54 43 4c 5f 54 48 52 45 41 44 53 09 3d 20 31 .TCL_THREADS.= 1
6d70: 0d 0a 44 45 42 55 47 09 09 3d 20 30 0d 0a 53 59 ..DEBUG..= 0..SY
6d80: 4d 42 4f 4c 53 09 09 3d 20 30 0d 0a 50 52 4f 46 MBOLS..= 0..PROF
6d90: 49 4c 45 09 09 3d 20 30 0d 0a 50 47 4f 09 09 3d ILE..= 0..PGO..=
6da0: 20 30 0d 0a 4d 53 56 43 52 54 09 09 3d 20 31 0d 0..MSVCRT..= 1.
6db0: 0a 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f .TCL_USE_STATIC_
6dc0: 50 41 43 4b 41 47 45 53 09 3d 20 30 0d 0a 55 53 PACKAGES.= 0..US
6dd0: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d E_THREAD_ALLOC =
6de0: 20 31 0d 0a 55 4e 43 48 45 43 4b 45 44 09 3d 20 1..UNCHECKED.=
6df0: 30 0d 0a 43 4f 4e 46 49 47 5f 43 48 45 43 4b 20 0..CONFIG_CHECK
6e00: 20 20 20 3d 20 31 0d 0a 21 69 66 20 24 28 44 4f = 1..!if $(DO
6e10: 49 4e 47 5f 54 43 4c 29 0d 0a 55 53 45 5f 53 54 ING_TCL)..USE_ST
6e20: 55 42 53 20 20 20 20 20 20 20 3d 20 30 0d 0a 21 UBS = 0..!
6e30: 65 6c 73 65 0d 0a 55 53 45 5f 53 54 55 42 53 20 else..USE_STUBS
6e40: 20 20 20 20 20 20 3d 20 31 0d 0a 21 65 6e 64 69 = 1..!endi
6e50: 66 0d 0a 0d 0a 23 20 49 66 20 4f 50 54 53 20 69 f....# If OPTS i
6e60: 73 20 6e 6f 74 20 65 6d 70 74 79 20 41 4e 44 20 s not empty AND
6e70: 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e does not contain
6e80: 20 22 6e 6f 6e 65 22 20 77 68 69 63 68 20 74 75 "none" which tu
6e90: 72 6e 73 20 6f 66 66 20 61 6c 6c 20 4f 50 54 53 rns off all OPTS
6ea0: 0d 0a 23 20 73 65 74 20 74 68 65 20 61 62 6f 76 ..# set the abov
6eb0: 65 20 6d 61 63 72 6f 73 20 62 61 73 65 64 20 6f e macros based o
6ec0: 6e 20 4f 50 54 53 20 63 6f 6e 74 65 6e 74 0d 0a n OPTS content..
6ed0: 21 69 66 20 22 24 28 4f 50 54 53 29 22 20 21 3d !if "$(OPTS)" !=
6ee0: 20 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c "" && ![nmakehl
6ef0: 70 20 2d 66 20 22 24 28 4f 50 54 53 29 22 20 22 p -f "$(OPTS)" "
6f00: 6e 6f 6e 65 22 5d 0d 0a 0d 0a 23 20 4f 50 54 53 none"]....# OPTS
6f10: 20 61 72 65 20 73 70 65 63 69 66 69 65 64 2c 20 are specified,
6f20: 70 61 72 73 65 20 74 68 65 6d 0d 0a 0d 0a 21 69 parse them....!i
6f30: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
6f40: 28 4f 50 54 53 29 20 22 73 74 61 74 69 63 22 5d (OPTS) "static"]
6f50: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ..!message *** D
6f60: 6f 69 6e 67 20 73 74 61 74 69 63 0d 0a 53 54 41 oing static..STA
6f70: 54 49 43 5f 42 55 49 4c 44 09 3d 20 31 0d 0a 21 TIC_BUILD.= 1..!
6f80: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d endif....!if [nm
6f90: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
6fa0: 29 20 22 6e 6f 73 74 75 62 73 22 5d 0d 0a 21 6d ) "nostubs"]..!m
6fb0: 65 73 73 61 67 65 20 2a 2a 2a 20 4e 6f 74 20 75 essage *** Not u
6fc0: 73 69 6e 67 20 73 74 75 62 73 0d 0a 55 53 45 5f sing stubs..USE_
6fd0: 53 54 55 42 53 09 3d 20 30 0d 0a 21 65 6e 64 69 STUBS.= 0..!endi
6fe0: 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 f....!if [nmakeh
6ff0: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e lp -f $(OPTS) "n
7000: 6f 6d 73 76 63 72 74 22 5d 0d 0a 21 6d 65 73 73 omsvcrt"]..!mess
7010: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6e 6f age *** Doing no
7020: 6d 73 76 63 72 74 0d 0a 4d 53 56 43 52 54 09 09 msvcrt..MSVCRT..
7030: 3d 20 30 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 = 0..!else..!if
7040: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
7050: 50 54 53 29 20 22 6d 73 76 63 72 74 22 5d 0d 0a PTS) "msvcrt"]..
7060: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 !message *** Doi
7070: 6e 67 20 6d 73 76 63 72 74 0d 0a 21 65 6c 73 65 ng msvcrt..!else
7080: 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f ..!if $(TCL_MAJO
7090: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 R_VERSION) == 8
70a0: 26 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 && $(TCL_MINOR_V
70b0: 45 52 53 49 4f 4e 29 20 3c 20 37 20 26 26 20 24 ERSION) < 7 && $
70c0: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0d 0a (STATIC_BUILD)..
70d0: 4d 53 56 43 52 54 09 09 3d 20 30 0d 0a 21 65 6e MSVCRT..= 0..!en
70e0: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e dif..!endif..!en
70f0: 64 69 66 20 23 20 5b 6e 6d 61 6b 65 68 6c 70 20 dif # [nmakehlp
7100: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73 -f $(OPTS) "noms
7110: 76 63 72 74 22 5d 0d 0a 0d 0a 21 69 66 20 5b 6e vcrt"]....!if [n
7120: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
7130: 53 29 20 22 73 74 61 74 69 63 70 6b 67 22 5d 20 S) "staticpkg"]
7140: 26 26 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c && $(STATIC_BUIL
7150: 44 29 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a D)..!message ***
7160: 20 44 6f 69 6e 67 20 73 74 61 74 69 63 70 6b 67 Doing staticpkg
7170: 0d 0a 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 ..TCL_USE_STATIC
7180: 5f 50 41 43 4b 41 47 45 53 09 3d 20 31 0d 0a 21 _PACKAGES.= 1..!
7190: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d endif....!if [nm
71a0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
71b0: 29 20 22 6e 6f 74 68 72 65 61 64 73 22 5d 0d 0a ) "nothreads"]..
71c0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d !message *** Com
71d0: 70 69 6c 65 20 65 78 70 6c 69 63 69 74 6c 79 20 pile explicitly
71e0: 66 6f 72 20 6e 6f 6e 2d 74 68 72 65 61 64 65 64 for non-threaded
71f0: 20 74 63 6c 0d 0a 54 43 4c 5f 54 48 52 45 41 44 tcl..TCL_THREAD
7200: 53 20 3d 20 30 0d 0a 55 53 45 5f 54 48 52 45 41 S = 0..USE_THREA
7210: 44 5f 41 4c 4c 4f 43 3d 20 30 0d 0a 21 65 6e 64 D_ALLOC= 0..!end
7220: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 if....!if [nmake
7230: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
7240: 74 63 6c 38 22 5d 0d 0a 21 6d 65 73 73 61 67 65 tcl8"]..!message
7250: 20 2a 2a 2a 20 42 75 69 6c 64 20 66 6f 72 20 54 *** Build for T
7260: 63 6c 38 0d 0a 54 43 4c 5f 42 55 49 4c 44 5f 46 cl8..TCL_BUILD_F
7270: 4f 52 20 3d 20 38 0d 0a 21 65 6e 64 69 66 0d 0a OR = 8..!endif..
7280: 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f ..!if $(TCL_MAJO
7290: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0d R_VERSION) == 8.
72a0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
72b0: 66 20 24 28 4f 50 54 53 29 20 22 74 69 6d 65 36 f $(OPTS) "time6
72c0: 34 62 69 74 22 5d 0d 0a 21 6d 65 73 73 61 67 65 4bit"]..!message
72d0: 20 2a 2a 2a 20 46 6f 72 63 65 20 36 34 2d 62 69 *** Force 64-bi
72e0: 74 20 74 69 6d 65 5f 74 0d 0a 5f 55 53 45 5f 36 t time_t.._USE_6
72f0: 34 42 49 54 5f 54 49 4d 45 5f 54 20 3d 20 31 0d 4BIT_TIME_T = 1.
7300: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d .!endif..!endif.
7310: 0a 0d 0a 23 20 59 65 73 2c 20 69 74 27 73 20 77 ...# Yes, it's w
7320: 65 69 72 64 20 74 68 61 74 20 74 68 65 20 22 73 eird that the "s
7330: 79 6d 62 6f 6c 73 22 20 6f 70 74 69 6f 6e 20 63 ymbols" option c
7340: 6f 6e 74 72 6f 6c 73 20 44 45 42 55 47 20 61 6e ontrols DEBUG an
7350: 64 0d 0a 23 20 74 68 65 20 22 70 64 62 73 22 20 d..# the "pdbs"
7360: 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 option controls
7370: 53 59 4d 42 4f 4c 53 2e 20 54 68 61 74 27 73 20 SYMBOLS. That's
7380: 68 69 73 74 6f 72 69 63 61 6c 2e 0d 0a 21 69 66 historical...!if
7390: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
73a0: 4f 50 54 53 29 20 22 73 79 6d 62 6f 6c 73 22 5d OPTS) "symbols"]
73b0: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ..!message *** D
73c0: 6f 69 6e 67 20 73 79 6d 62 6f 6c 73 0d 0a 44 45 oing symbols..DE
73d0: 42 55 47 09 09 3d 20 31 0d 0a 21 65 6c 73 65 0d BUG..= 1..!else.
73e0: 0a 44 45 42 55 47 09 09 3d 20 30 0d 0a 21 65 6e .DEBUG..= 0..!en
73f0: 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b dif....!if [nmak
7400: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
7410: 22 70 64 62 73 22 5d 0d 0a 21 6d 65 73 73 61 67 "pdbs"]..!messag
7420: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 64 62 73 e *** Doing pdbs
7430: 0d 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 31 0d 0a ..SYMBOLS..= 1..
7440: 21 65 6c 73 65 0d 0a 53 59 4d 42 4f 4c 53 09 09 !else..SYMBOLS..
7450: 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 = 0..!endif....!
7460: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7470: 24 28 4f 50 54 53 29 20 22 70 72 6f 66 69 6c 65 $(OPTS) "profile
7480: 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a "]..!message ***
7490: 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 0d 0a Doing profile..
74a0: 50 52 4f 46 49 4c 45 09 09 3d 20 31 0d 0a 21 65 PROFILE..= 1..!e
74b0: 6c 73 65 0d 0a 50 52 4f 46 49 4c 45 09 09 3d 20 lse..PROFILE..=
74c0: 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 0..!endif....!if
74d0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
74e0: 4f 50 54 53 29 20 22 70 67 69 22 5d 0d 0a 21 6d OPTS) "pgi"]..!m
74f0: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7500: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
7510: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 73 optimization ins
7520: 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0d 0a 50 47 trumentation..PG
7530: 4f 09 09 3d 20 31 0d 0a 21 65 6c 73 65 69 66 20 O..= 1..!elseif
7540: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
7550: 50 54 53 29 20 22 70 67 6f 22 5d 0d 0a 21 6d 65 PTS) "pgo"]..!me
7560: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7570: 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 6f profile guided o
7580: 70 74 69 6d 69 7a 61 74 69 6f 6e 0d 0a 50 47 4f ptimization..PGO
7590: 09 09 3d 20 32 0d 0a 21 65 6c 73 65 0d 0a 50 47 ..= 2..!else..PG
75a0: 4f 09 09 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a O..= 0..!endif..
75b0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
75c0: 2d 66 20 24 28 4f 50 54 53 29 20 22 6c 6f 69 6d -f $(OPTS) "loim
75d0: 70 61 63 74 22 5d 0d 0a 21 6d 65 73 73 61 67 65 pact"]..!message
75e0: 20 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 69 67 *** Warning: ig
75f0: 6e 6f 72 69 6e 67 20 6f 70 74 69 6f 6e 20 22 6c noring option "l
7600: 6f 69 6d 70 61 63 74 22 20 2d 20 64 65 70 72 65 oimpact" - depre
7610: 63 61 74 65 64 20 6f 6e 20 6d 6f 64 65 72 6e 20 cated on modern
7620: 57 69 6e 64 6f 77 73 2e 0d 0a 21 65 6e 64 69 66 Windows...!endif
7630: 0d 0a 0d 0a 23 20 54 42 44 20 2d 20 73 68 6f 75 ....# TBD - shou
7640: 6c 64 20 67 65 74 20 72 69 64 20 6f 66 20 74 68 ld get rid of th
7650: 69 73 20 6f 70 74 69 6f 6e 0d 0a 21 69 66 20 5b is option..!if [
7660: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
7670: 54 53 29 20 22 74 68 72 64 61 6c 6c 6f 63 22 5d TS) "thrdalloc"]
7680: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ..!message *** D
7690: 6f 69 6e 67 20 74 68 72 64 61 6c 6c 6f 63 0d 0a oing thrdalloc..
76a0: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
76b0: 20 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a = 1..!endif....
76c0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
76d0: 20 24 28 4f 50 54 53 29 20 22 74 63 6c 61 6c 6c $(OPTS) "tclall
76e0: 6f 63 22 5d 0d 0a 55 53 45 5f 54 48 52 45 41 44 oc"]..USE_THREAD
76f0: 5f 41 4c 4c 4f 43 20 3d 20 30 0d 0a 21 65 6e 64 _ALLOC = 0..!end
7700: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 if....!if [nmake
7710: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
7720: 75 6e 63 68 65 63 6b 65 64 22 5d 0d 0a 21 6d 65 unchecked"]..!me
7730: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7740: 75 6e 63 68 65 63 6b 65 64 0d 0a 55 4e 43 48 45 unchecked..UNCHE
7750: 43 4b 45 44 20 3d 20 31 0d 0a 21 65 6c 73 65 0d CKED = 1..!else.
7760: 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 30 0d 0a .UNCHECKED = 0..
7770: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e !endif....!if [n
7780: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
7790: 53 29 20 22 6e 6f 63 6f 6e 66 69 67 63 68 65 63 S) "noconfigchec
77a0: 6b 22 5d 0d 0a 43 4f 4e 46 49 47 5f 43 48 45 43 k"]..CONFIG_CHEC
77b0: 4b 20 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 43 4f K = 1..!else..CO
77c0: 4e 46 49 47 5f 43 48 45 43 4b 20 3d 20 30 0d 0a NFIG_CHECK = 0..
77d0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 69 66 !endif....!endif
77e0: 20 23 20 22 24 28 4f 50 54 53 29 22 20 21 3d 20 # "$(OPTS)" !=
77f0: 22 22 20 20 26 26 20 2e 2e 2e 20 70 61 72 73 69 "" && ... parsi
7800: 6e 67 20 6f 66 20 4f 50 54 53 0d 0a 0d 0a 23 20 ng of OPTS....#
7810: 53 65 74 20 6c 69 6e 6b 65 72 20 66 6c 61 67 73 Set linker flags
7820: 20 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 0d based on above.
7830: 0a 0d 0a 21 69 66 20 24 28 50 47 4f 29 20 3e 20 ...!if $(PGO) >
7840: 31 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 1..!if [nmakehlp
7850: 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 6f 70 74 69 -l -ltcg:pgopti
7860: 6d 69 7a 65 20 24 28 4c 49 4e 4b 45 52 5f 54 45 mize $(LINKER_TE
7870: 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b 45 STFLAGS)]..LINKE
7880: 52 46 4c 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 RFLAGS.= $(LINKE
7890: 52 46 4c 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d RFLAGS:-ltcg=) -
78a0: 6c 74 63 67 3a 70 67 6f 70 74 69 6d 69 7a 65 0d ltcg:pgoptimize.
78b0: 0a 21 65 6c 73 65 0d 0a 4d 53 47 3d 5e 0d 0a 54 .!else..MSG=^..T
78c0: 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 6f 65 his compiler doe
78d0: 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 70 72 s not support pr
78e0: 6f 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 ofile guided opt
78f0: 69 6d 69 7a 61 74 69 6f 6e 2e 0d 0a 21 65 72 72 imization...!err
7900: 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 or $(MSG)..!endi
7910: 66 0d 0a 21 65 6c 73 65 69 66 20 24 28 50 47 4f f..!elseif $(PGO
7920: 29 20 3e 20 30 0d 0a 21 69 66 20 5b 6e 6d 61 6b ) > 0..!if [nmak
7930: 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 ehlp -l -ltcg:pg
7940: 69 6e 73 74 72 75 6d 65 6e 74 20 24 28 4c 49 4e instrument $(LIN
7950: 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0d KER_TESTFLAGS)].
7960: 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 .LINKERFLAGS.= $
7970: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 (LINKERFLAGS:-lt
7980: 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 69 6e 73 cg=) -ltcg:pgins
7990: 74 72 75 6d 65 6e 74 0d 0a 21 65 6c 73 65 0d 0a trument..!else..
79a0: 4d 53 47 3d 5e 0d 0a 54 68 69 73 20 63 6f 6d 70 MSG=^..This comp
79b0: 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 73 75 iler does not su
79c0: 70 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 67 75 pport profile gu
79d0: 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f ided optimizatio
79e0: 6e 2e 0d 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 n...!error $(MSG
79f0: 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 )..!endif..!endi
7a00: 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 f....###########
7a10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a40: 23 23 23 23 23 0d 0a 23 20 38 2e 20 50 61 72 73 #####..# 8. Pars
7a50: 65 20 74 68 65 20 53 54 41 54 53 20 6d 61 63 72 e the STATS macr
7a60: 6f 20 74 6f 20 63 6f 6e 66 69 67 75 72 65 20 63 o to configure c
7a70: 6f 64 65 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 ode instrumentat
7a80: 69 6f 6e 0d 0a 23 20 54 68 65 20 66 6f 6c 6c 6f ion..# The follo
7a90: 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 wing macros are
7aa0: 73 65 74 20 62 79 20 74 68 69 73 20 73 65 63 74 set by this sect
7ab0: 69 6f 6e 3a 0d 0a 23 20 54 43 4c 5f 4d 45 4d 5f ion:..# TCL_MEM_
7ac0: 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 DEBUG - 1 -> ena
7ad0: 62 6c 65 73 20 6d 65 6d 6f 72 79 20 61 6c 6c 6f bles memory allo
7ae0: 63 61 74 69 6f 6e 20 69 6e 73 74 72 75 6d 65 6e cation instrumen
7af0: 74 61 74 69 6f 6e 0d 0a 23 20 20 20 20 20 20 20 tation..#
7b00: 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 64 0 -> d
7b10: 69 73 61 62 6c 65 73 0d 0a 23 20 54 43 4c 5f 43 isables..# TCL_C
7b20: 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 2d 20 31 OMPILE_DEBUG - 1
7b30: 20 2d 3e 20 65 6e 61 62 6c 65 73 20 62 79 74 65 -> enables byte
7b40: 20 63 6f 6d 70 69 6c 65 72 20 6c 6f 67 67 69 6e compiler loggin
7b50: 67 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 g..#
7b60: 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 64 69 0 -> di
7b70: 73 61 62 6c 65 73 0d 0a 0d 0a 23 20 44 65 66 61 sables....# Defa
7b80: 75 6c 74 20 62 6f 74 68 20 61 72 65 20 6f 66 66 ult both are off
7b90: 0d 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 ..TCL_MEM_DEBUG.
7ba0: 20 20 20 20 3d 20 30 0d 0a 54 43 4c 5f 43 4f 4d = 0..TCL_COM
7bb0: 50 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 30 PILE_DEBUG = 0
7bc0: 0d 0a 0d 0a 21 69 66 20 22 24 28 53 54 41 54 53 ....!if "$(STATS
7bd0: 29 22 20 21 3d 20 22 22 20 26 26 20 21 5b 6e 6d )" != "" && ![nm
7be0: 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 53 54 41 akehlp -f "$(STA
7bf0: 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0d 0a 0d 0a TS)" "none"]....
7c00: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7c10: 20 24 28 53 54 41 54 53 29 20 22 6d 65 6d 64 62 $(STATS) "memdb
7c20: 67 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a g"]..!message **
7c30: 2a 20 44 6f 69 6e 67 20 6d 65 6d 64 62 67 0d 0a * Doing memdbg..
7c40: 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 TCL_MEM_DEBUG.
7c50: 20 20 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 54 43 = 1..!else..TC
7c60: 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 20 L_MEM_DEBUG.
7c70: 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 = 0..!endif....!
7c80: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7c90: 24 28 53 54 41 54 53 29 20 22 63 6f 6d 70 64 62 $(STATS) "compdb
7ca0: 67 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a g"]..!message **
7cb0: 2a 20 44 6f 69 6e 67 20 63 6f 6d 70 64 62 67 0d * Doing compdbg.
7cc0: 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 .TCL_COMPILE_DEB
7cd0: 55 47 20 20 20 3d 20 31 0d 0a 21 65 6c 73 65 0d UG = 1..!else.
7ce0: 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 .TCL_COMPILE_DEB
7cf0: 55 47 20 20 20 3d 20 30 0d 0a 21 65 6e 64 69 66 UG = 0..!endif
7d00: 0d 0a 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 ....!endif....##
7d10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d50: 23 23 0d 0a 23 20 39 2e 20 50 61 72 73 65 20 74 ##..# 9. Parse t
7d60: 68 65 20 43 48 45 43 4b 53 20 6d 61 63 72 6f 20 he CHECKS macro
7d70: 74 6f 20 63 6f 6e 66 69 67 75 72 65 20 61 64 64 to configure add
7d80: 69 74 69 6f 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 itional compiler
7d90: 20 63 68 65 63 6b 73 0d 0a 23 20 54 68 65 20 66 checks..# The f
7da0: 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 ollowing macros
7db0: 61 72 65 20 73 65 74 20 62 79 20 74 68 69 73 20 are set by this
7dc0: 73 65 63 74 69 6f 6e 3a 0d 0a 23 20 57 41 52 4e section:..# WARN
7dd0: 49 4e 47 53 20 2d 20 63 6f 6d 70 69 6c 65 72 20 INGS - compiler
7de0: 73 77 69 74 63 68 65 73 20 74 68 61 74 20 63 6f switches that co
7df0: 6e 74 72 6f 6c 20 74 68 65 20 77 61 72 6e 69 6e ntrol the warnin
7e00: 67 73 20 6c 65 76 65 6c 0d 0a 23 20 54 43 4c 5f gs level..# TCL_
7e10: 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 20 2d 20 NO_DEPRECATED -
7e20: 31 20 2d 3e 20 64 69 73 61 62 6c 65 20 73 75 70 1 -> disable sup
7e30: 70 6f 72 74 20 66 6f 72 20 64 65 70 72 65 63 61 port for depreca
7e40: 74 65 64 20 66 75 6e 63 74 69 6f 6e 73 0d 0a 23 ted functions..#
7e50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7e60: 20 20 20 20 20 30 20 2d 3e 20 65 6e 61 62 6c 65 0 -> enable
7e70: 20 64 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 deprecated func
7e80: 74 69 6f 6e 73 0d 0a 0d 0a 23 20 44 65 66 61 75 tions....# Defau
7e90: 6c 74 73 20 2d 20 50 65 72 6d 69 74 20 64 65 70 lts - Permit dep
7ea0: 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e recated function
7eb0: 73 20 61 6e 64 20 77 61 72 6e 69 6e 67 20 6c 65 s and warning le
7ec0: 76 65 6c 20 33 0d 0a 54 43 4c 5f 4e 4f 5f 44 45 vel 3..TCL_NO_DE
7ed0: 50 52 45 43 41 54 45 44 09 20 20 20 20 3d 20 30 PRECATED. = 0
7ee0: 0d 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 ..WARNINGS..
7ef0: 3d 20 2d 57 33 0d 0a 0d 0a 21 69 66 20 22 24 28 = -W3....!if "$(
7f00: 43 48 45 43 4b 53 29 22 20 21 3d 20 22 22 20 26 CHECKS)" != "" &
7f10: 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 & ![nmakehlp -f
7f20: 22 24 28 43 48 45 43 4b 53 29 22 20 22 6e 6f 6e "$(CHECKS)" "non
7f30: 65 22 5d 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b e"]....!if [nmak
7f40: 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b 53 ehlp -f $(CHECKS
7f50: 29 20 22 6e 6f 64 65 70 22 5d 0d 0a 21 6d 65 73 ) "nodep"]..!mes
7f60: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6e sage *** Doing n
7f70: 6f 64 65 70 20 63 68 65 63 6b 0d 0a 54 43 4c 5f odep check..TCL_
7f80: 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 20 20 NO_DEPRECATED.
7f90: 20 20 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d = 1..!endif...
7fa0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
7fb0: 66 20 24 28 43 48 45 43 4b 53 29 20 22 66 75 6c f $(CHECKS) "ful
7fc0: 6c 77 61 72 6e 22 5d 0d 0a 21 6d 65 73 73 61 67 lwarn"]..!messag
7fd0: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 66 75 6c 6c e *** Doing full
7fe0: 20 77 61 72 6e 69 6e 67 73 20 63 68 65 63 6b 0d warnings check.
7ff0: 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 3d .WARNINGS.. =
8000: 20 2d 57 34 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 -W4..!if [nmake
8010: 68 6c 70 20 2d 6c 20 2d 77 61 72 6e 3a 33 20 24 hlp -l -warn:3 $
8020: 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 (LINKER_TESTFLAG
8030: 53 29 5d 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 S)]..LINKERFLAGS
8040: 09 09 20 20 20 20 3d 20 24 28 4c 49 4e 4b 45 52 .. = $(LINKER
8050: 46 4c 41 47 53 29 20 2d 77 61 72 6e 3a 33 0d 0a FLAGS) -warn:3..
8060: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
8070: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
8080: 2d 66 20 24 28 43 48 45 43 4b 53 29 20 22 36 34 -f $(CHECKS) "64
8090: 62 69 74 22 5d 20 26 26 20 5b 6e 6d 61 6b 65 68 bit"] && [nmakeh
80a0: 6c 70 20 2d 63 20 2d 57 70 36 34 5d 0d 0a 21 6d lp -c -Wp64]..!m
80b0: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
80c0: 20 36 34 62 69 74 20 70 6f 72 74 61 62 69 6c 69 64bit portabili
80d0: 74 79 20 77 61 72 6e 69 6e 67 73 0d 0a 57 41 52 ty warnings..WAR
80e0: 4e 49 4e 47 53 09 09 20 20 20 20 3d 20 24 28 57 NINGS.. = $(W
80f0: 41 52 4e 49 4e 47 53 29 20 2d 57 70 36 34 0d 0a ARNINGS) -Wp64..
8100: 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 69 66 !endif....!endif
8110: 0d 0a 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 ......##########
8120: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8130: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8140: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8150: 23 23 23 23 23 23 0d 0a 23 20 31 30 2e 20 43 6f ######..# 10. Co
8160: 6e 73 74 72 75 63 74 20 6f 75 74 70 75 74 20 64 nstruct output d
8170: 69 72 65 63 74 6f 72 79 20 61 6e 64 20 66 69 6c irectory and fil
8180: 65 20 70 61 74 68 73 0d 0a 23 20 46 69 67 75 72 e paths..# Figur
8190: 65 2d 6f 75 74 20 68 6f 77 20 74 6f 20 6e 61 6d e-out how to nam
81a0: 65 20 6f 75 72 20 69 6e 74 65 72 6d 65 64 69 61 e our intermedia
81b0: 74 65 20 61 6e 64 20 6f 75 74 70 75 74 20 64 69 te and output di
81c0: 72 65 63 74 6f 72 69 65 73 2e 0d 0a 23 20 49 6e rectories...# In
81d0: 20 6f 72 64 65 72 20 74 6f 20 61 76 6f 69 64 20 order to avoid
81e0: 69 6e 61 64 76 65 72 74 65 6e 74 20 6d 69 78 69 inadvertent mixi
81f0: 6e 67 20 6f 66 20 6f 62 6a 65 63 74 20 66 69 6c ng of object fil
8200: 65 73 20 62 75 69 6c 74 20 75 73 69 6e 67 0d 0a es built using..
8210: 23 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6d 70 # different comp
8220: 69 6c 65 72 73 2c 20 62 75 69 6c 64 20 63 6f 6e ilers, build con
8230: 66 69 67 75 72 61 74 69 6f 6e 73 20 65 74 63 2e figurations etc.
8240: 2c 0d 0a 23 0d 0a 23 20 4e 61 6d 69 6e 67 20 63 ,..#..# Naming c
8250: 6f 6e 76 65 6e 74 69 6f 6e 20 28 73 75 66 66 69 onvention (suffi
8260: 78 65 73 29 3a 0d 0a 23 20 20 20 74 20 3d 20 66 xes):..# t = f
8270: 75 6c 6c 20 74 68 72 65 61 64 20 73 75 70 70 6f ull thread suppo
8280: 72 74 2e 20 28 4e 6f 74 20 75 73 65 64 20 66 6f rt. (Not used fo
8290: 72 20 54 63 6c 20 3e 3d 20 38 2e 37 29 0d 0a 23 r Tcl >= 8.7)..#
82a0: 20 20 20 73 20 3d 20 73 74 61 74 69 63 20 6c 69 s = static li
82b0: 62 72 61 72 79 20 28 61 73 20 6f 70 70 6f 73 65 brary (as oppose
82c0: 64 20 74 6f 20 61 6e 20 69 6d 70 6f 72 74 20 6c d to an import l
82d0: 69 62 72 61 72 79 29 0d 0a 23 20 20 20 67 20 3d ibrary)..# g =
82e0: 20 6c 69 6e 6b 65 64 20 74 6f 20 74 68 65 20 64 linked to the d
82f0: 65 62 75 67 20 65 6e 61 62 6c 65 64 20 43 20 72 ebug enabled C r
8300: 75 6e 2d 74 69 6d 65 2e 0d 0a 23 20 20 20 78 20 un-time...# x
8310: 3d 20 73 70 65 63 69 61 6c 20 73 74 61 74 69 63 = special static
8320: 20 62 75 69 6c 64 20 77 68 65 6e 20 69 74 20 6c build when it l
8330: 69 6e 6b 73 20 74 6f 20 74 68 65 20 64 79 6e 61 inks to the dyna
8340: 6d 69 63 20 43 20 72 75 6e 2d 74 69 6d 65 2e 0d mic C run-time..
8350: 0a 23 0d 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 .#..# The follow
8360: 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 73 ing macros are s
8370: 65 74 20 69 6e 20 74 68 69 73 20 73 65 63 74 69 et in this secti
8380: 6f 6e 3a 0d 0a 23 20 53 55 46 58 20 2d 20 74 68 on:..# SUFX - th
8390: 65 20 73 75 66 66 69 78 20 74 6f 20 75 73 65 20 e suffix to use
83a0: 66 6f 72 20 62 69 6e 61 72 69 65 73 20 62 61 73 for binaries bas
83b0: 65 64 20 6f 6e 20 61 62 6f 76 65 20 6e 61 6d 69 ed on above nami
83c0: 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 0d 0a 23 ng convention..#
83d0: 20 42 55 49 4c 44 44 49 52 54 4f 50 20 2d 20 74 BUILDDIRTOP - t
83e0: 68 65 20 74 6f 70 6c 65 76 65 6c 20 64 65 66 61 he toplevel defa
83f0: 75 6c 74 20 6f 75 74 70 75 74 20 64 69 72 65 63 ult output direc
8400: 74 6f 72 79 0d 0a 23 20 20 20 20 20 20 69 73 20 tory..# is
8410: 6f 66 20 74 68 65 20 66 6f 72 6d 20 7b 52 65 6c of the form {Rel
8420: 65 61 73 65 2c 44 65 62 75 67 7d 5b 5f 41 4d 44 ease,Debug}[_AMD
8430: 36 34 5d 5b 5f 43 4f 4d 50 49 4c 45 52 56 45 52 64][_COMPILERVER
8440: 53 49 4f 4e 5d 0d 0a 23 20 54 4d 50 5f 44 49 52 SION]..# TMP_DIR
8450: 20 2d 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 - directory whe
8460: 72 65 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 re object files
8470: 61 72 65 20 63 72 65 61 74 65 64 0d 0a 23 20 4f are created..# O
8480: 55 54 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f UT_DIR - directo
8490: 72 79 20 77 68 65 72 65 20 6f 75 74 70 75 74 20 ry where output
84a0: 65 78 65 63 75 74 61 62 6c 65 73 20 61 72 65 20 executables are
84b0: 63 72 65 61 74 65 64 0d 0a 23 20 42 6f 74 68 20 created..# Both
84c0: 54 4d 50 5f 44 49 52 20 61 6e 64 20 4f 55 54 5f TMP_DIR and OUT_
84d0: 44 49 52 20 61 72 65 20 64 65 66 61 75 6c 74 65 DIR are defaulte
84e0: 64 20 6f 6e 6c 79 20 69 66 20 6e 6f 74 20 64 65 d only if not de
84f0: 66 69 6e 65 64 20 62 79 20 74 68 65 0d 0a 23 20 fined by the..#
8500: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 parent makefile
8510: 28 6f 72 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 (or command line
8520: 29 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 76 ). The default v
8530: 61 6c 75 65 73 20 61 72 65 0d 0a 23 20 62 61 73 alues are..# bas
8540: 65 64 20 6f 6e 20 42 55 49 4c 44 44 49 52 54 4f ed on BUILDDIRTO
8550: 50 2e 0d 0a 23 20 53 54 55 42 50 52 45 46 49 58 P...# STUBPREFIX
8560: 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 - name of the s
8570: 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 tubs library for
8580: 20 74 68 69 73 20 70 72 6f 6a 65 63 74 0d 0a 23 this project..#
8590: 20 50 52 4a 49 4d 50 4c 49 42 20 2d 20 6f 75 74 PRJIMPLIB - out
85a0: 70 75 74 20 70 61 74 68 20 6f 66 20 74 68 65 20 put path of the
85b0: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
85c0: 74 20 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 t import library
85d0: 0d 0a 23 20 50 52 4a 4c 49 42 4e 41 4d 45 20 2d ..# PRJLIBNAME -
85e0: 20 6e 61 6d 65 20 6f 66 20 67 65 6e 65 72 61 74 name of generat
85f0: 65 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 ed project libra
8600: 72 79 0d 0a 23 20 50 52 4a 4c 49 42 20 20 20 20 ry..# PRJLIB
8610: 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f - output path o
8620: 66 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a f generated proj
8630: 65 63 74 20 6c 69 62 72 61 72 79 0d 0a 23 20 50 ect library..# P
8640: 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 20 2d 20 RJSTUBLIBNAME -
8650: 6e 61 6d 65 20 6f 66 20 74 68 65 20 67 65 6e 65 name of the gene
8660: 72 61 74 65 64 20 70 72 6f 6a 65 63 74 20 73 74 rated project st
8670: 75 62 73 20 6c 69 62 72 61 72 79 0d 0a 23 20 50 ubs library..# P
8680: 52 4a 53 54 55 42 4c 49 42 20 2d 20 6f 75 74 70 RJSTUBLIB - outp
8690: 75 74 20 70 61 74 68 20 6f 66 20 74 68 65 20 67 ut path of the g
86a0: 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 74 enerated project
86b0: 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 0d 0a stubs library..
86c0: 23 20 52 45 53 46 49 4c 45 20 2d 20 6f 75 74 70 # RESFILE - outp
86d0: 75 74 20 72 65 73 6f 75 72 63 65 20 66 69 6c 65 ut resource file
86e0: 20 28 6f 6e 6c 79 20 69 66 20 6e 6f 74 20 73 74 (only if not st
86f0: 61 74 69 63 20 62 75 69 6c 64 29 0d 0a 0d 0a 53 atic build)....S
8700: 55 46 58 09 20 20 20 20 3d 20 74 73 67 78 0d 0a UFX. = tsgx..
8710: 0d 0a 21 69 66 20 24 28 44 45 42 55 47 29 0d 0a ..!if $(DEBUG)..
8720: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 44 65 BUILDDIRTOP = De
8730: 62 75 67 0d 0a 21 65 6c 73 65 0d 0a 42 55 49 4c bug..!else..BUIL
8740: 44 44 49 52 54 4f 50 20 3d 20 52 65 6c 65 61 73 DDIRTOP = Releas
8750: 65 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 e..!endif....!if
8760: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 3d "$(MACHINE)" !=
8770: 20 22 49 58 38 36 22 0d 0a 42 55 49 4c 44 44 49 "IX86"..BUILDDI
8780: 52 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 RTOP =$(BUILDDIR
8790: 54 4f 50 29 5f 24 28 4d 41 43 48 49 4e 45 29 0d TOP)_$(MACHINE).
87a0: 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28 56 .!endif..!if $(V
87b0: 43 56 45 52 29 20 3e 20 36 0d 0a 42 55 49 4c 44 CVER) > 6..BUILD
87c0: 44 49 52 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 DIRTOP =$(BUILDD
87d0: 49 52 54 4f 50 29 5f 56 43 24 28 56 43 56 45 52 IRTOP)_VC$(VCVER
87e0: 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 )..!endif....!if
87f0: 20 21 24 28 44 45 42 55 47 29 20 7c 7c 20 24 28 !$(DEBUG) || $(
8800: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 TCL_VERSION) > 8
8810: 36 20 7c 7c 20 24 28 44 45 42 55 47 29 20 26 26 6 || $(DEBUG) &&
8820: 20 24 28 55 4e 43 48 45 43 4b 45 44 29 0d 0a 53 $(UNCHECKED)..S
8830: 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 UFX. = $(SUFX
8840: 3a 67 3d 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a :g=)..!endif....
8850: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 2e 5c TMP_DIRFULL = .\
8860: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 $(BUILDDIRTOP)\$
8870: 28 50 52 4f 4a 45 43 54 29 5f 54 68 72 65 61 64 (PROJECT)_Thread
8880: 65 64 44 79 6e 61 6d 69 63 53 74 61 74 69 63 58 edDynamicStaticX
8890: 0d 0a 0d 0a 21 69 66 20 21 24 28 53 54 41 54 49 ....!if !$(STATI
88a0: 43 5f 42 55 49 4c 44 29 0d 0a 54 4d 50 5f 44 49 C_BUILD)..TMP_DI
88b0: 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f 44 49 RFULL = $(TMP_DI
88c0: 52 46 55 4c 4c 3a 53 74 61 74 69 63 3d 29 0d 0a RFULL:Static=)..
88d0: 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 SUFX. = $(SUF
88e0: 58 3a 73 3d 29 0d 0a 45 58 54 09 20 20 20 20 3d X:s=)..EXT. =
88f0: 20 64 6c 6c 0d 0a 54 4d 50 5f 44 49 52 46 55 4c dll..TMP_DIRFUL
8900: 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c L = $(TMP_DIRFUL
8910: 4c 3a 58 3d 29 0d 0a 53 55 46 58 09 20 20 20 20 L:X=)..SUFX.
8920: 3d 20 24 28 53 55 46 58 3a 78 3d 29 0d 0a 21 65 = $(SUFX:x=)..!e
8930: 6c 73 65 0d 0a 54 4d 50 5f 44 49 52 46 55 4c 4c lse..TMP_DIRFULL
8940: 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c = $(TMP_DIRFULL
8950: 3a 44 79 6e 61 6d 69 63 3d 29 0d 0a 45 58 54 09 :Dynamic=)..EXT.
8960: 20 20 20 20 3d 20 6c 69 62 0d 0a 21 69 66 20 24 = lib..!if $
8970: 28 4d 53 56 43 52 54 29 20 26 26 20 24 28 54 43 (MSVCRT) && $(TC
8980: 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 20 L_VERSION) > 86
8990: 7c 7c 20 21 24 28 4d 53 56 43 52 54 29 20 26 26 || !$(MSVCRT) &&
89a0: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 $(TCL_VERSION)
89b0: 3c 20 38 37 0d 0a 54 4d 50 5f 44 49 52 46 55 4c < 87..TMP_DIRFUL
89c0: 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c L = $(TMP_DIRFUL
89d0: 4c 3a 58 3d 29 0d 0a 53 55 46 58 09 20 20 20 20 L:X=)..SUFX.
89e0: 3d 20 24 28 53 55 46 58 3a 78 3d 29 0d 0a 21 65 = $(SUFX:x=)..!e
89f0: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ndif..!endif....
8a00: 21 69 66 20 21 24 28 54 43 4c 5f 54 48 52 45 41 !if !$(TCL_THREA
8a10: 44 53 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 DS) || $(TCL_VER
8a20: 53 49 4f 4e 29 20 3e 20 38 36 0d 0a 54 4d 50 5f SION) > 86..TMP_
8a30: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
8a40: 44 49 52 46 55 4c 4c 3a 54 68 72 65 61 64 65 64 DIRFULL:Threaded
8a50: 3d 29 0d 0a 53 55 46 58 09 20 20 20 20 3d 20 24 =)..SUFX. = $
8a60: 28 53 55 46 58 3a 74 3d 29 0d 0a 21 65 6e 64 69 (SUFX:t=)..!endi
8a70: 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 54 4d 50 f....!ifndef TMP
8a80: 5f 44 49 52 0d 0a 54 4d 50 5f 44 49 52 09 20 20 _DIR..TMP_DIR.
8a90: 20 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c = $(TMP_DIRFUL
8aa0: 4c 29 0d 0a 21 69 66 6e 64 65 66 20 4f 55 54 5f L)..!ifndef OUT_
8ab0: 44 49 52 0d 0a 4f 55 54 5f 44 49 52 09 20 20 20 DIR..OUT_DIR.
8ac0: 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49 52 54 = .\$(BUILDDIRT
8ad0: 4f 50 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c OP)..!endif..!el
8ae0: 73 65 0d 0a 21 69 66 6e 64 65 66 20 4f 55 54 5f se..!ifndef OUT_
8af0: 44 49 52 0d 0a 4f 55 54 5f 44 49 52 09 20 20 20 DIR..OUT_DIR.
8b00: 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 0d 0a 21 = $(TMP_DIR)..!
8b10: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d endif..!endif...
8b20: 0a 23 20 52 65 6c 61 74 69 76 65 20 70 61 74 68 .# Relative path
8b30: 73 20 2d 3e 20 61 62 73 6f 6c 75 74 65 0d 0a 21 s -> absolute..!
8b40: 69 66 20 5b 65 63 68 6f 20 4f 55 54 5f 44 49 52 if [echo OUT_DIR
8b50: 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f = \> nmakehlp.o
8b60: 75 74 5d 20 5c 0d 0a 20 20 20 7c 7c 20 5b 6e 6d ut] \.. || [nm
8b70: 61 6b 65 68 6c 70 20 2d 51 20 22 24 28 4f 55 54 akehlp -Q "$(OUT
8b80: 5f 44 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 _DIR)" >> nmakeh
8b90: 6c 70 2e 6f 75 74 5d 0d 0a 21 65 72 72 6f 72 20 lp.out]..!error
8ba0: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 *** Could not fu
8bb0: 6c 6c 79 20 71 75 61 6c 69 66 79 20 70 61 74 68 lly qualify path
8bc0: 20 4f 55 54 5f 44 49 52 3d 24 28 4f 55 54 5f 44 OUT_DIR=$(OUT_D
8bd0: 49 52 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 IR)..!endif..!if
8be0: 20 5b 65 63 68 6f 20 54 4d 50 5f 44 49 52 20 3d [echo TMP_DIR =
8bf0: 20 5c 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 \>> nmakehlp.ou
8c00: 74 5d 20 5c 0d 0a 20 20 20 7c 7c 20 5b 6e 6d 61 t] \.. || [nma
8c10: 6b 65 68 6c 70 20 2d 51 20 22 24 28 54 4d 50 5f kehlp -Q "$(TMP_
8c20: 44 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c DIR)" >> nmakehl
8c30: 70 2e 6f 75 74 5d 0d 0a 21 65 72 72 6f 72 20 2a p.out]..!error *
8c40: 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 6c ** Could not ful
8c50: 6c 79 20 71 75 61 6c 69 66 79 20 70 61 74 68 20 ly qualify path
8c60: 54 4d 50 5f 44 49 52 3d 24 28 54 4d 50 5f 44 49 TMP_DIR=$(TMP_DI
8c70: 52 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 R)..!endif..!inc
8c80: 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 lude nmakehlp.ou
8c90: 74 0d 0a 0d 0a 23 20 54 68 65 20 6e 61 6d 65 20 t....# The name
8ca0: 6f 66 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 of the stubs lib
8cb0: 72 61 72 79 20 66 6f 72 20 74 68 65 20 70 72 6f rary for the pro
8cc0: 6a 65 63 74 20 62 65 69 6e 67 20 62 75 69 6c 74 ject being built
8cd0: 0d 0a 53 54 55 42 50 52 45 46 49 58 20 20 20 20 ..STUBPREFIX
8ce0: 20 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 73 74 = $(PROJECT)st
8cf0: 75 62 0d 0a 0d 0a 23 0d 0a 23 20 53 65 74 20 75 ub....#..# Set u
8d00: 70 20 70 61 74 68 73 20 74 6f 20 76 61 72 69 6f p paths to vario
8d10: 75 73 20 54 63 6c 20 65 78 65 63 75 74 61 62 6c us Tcl executabl
8d20: 65 73 20 61 6e 64 20 6c 69 62 72 61 72 69 65 73 es and libraries
8d30: 20 6e 65 65 64 65 64 20 62 79 20 65 78 74 65 6e needed by exten
8d40: 73 69 6f 6e 73 0d 0a 23 0d 0a 0d 0a 23 20 54 49 sions..#....# TI
8d50: 50 20 34 33 30 2e 20 55 6e 75 73 65 64 20 66 6f P 430. Unused fo
8d60: 72 20 38 2e 36 20 62 75 74 20 6e 6f 20 68 61 72 r 8.6 but no har
8d70: 6d 20 64 65 66 69 6e 69 6e 67 20 69 74 20 74 6f m defining it to
8d80: 20 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d 6f 6e 20 allow a common
8d90: 72 75 6c 65 73 2e 76 63 0d 0a 54 43 4c 53 43 52 rules.vc..TCLSCR
8da0: 49 50 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 62 IPTZIPNAME = lib
8db0: 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 tcl$(TCL_MAJOR_V
8dc0: 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 ERSION).$(TCL_MI
8dd0: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 43 NOR_VERSION)$(TC
8de0: 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 29 24 L_PATCH_LETTER)$
8df0: 28 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 (TCL_RELEASE_SER
8e00: 49 41 4c 29 2e 7a 69 70 0d 0a 54 4b 53 43 52 49 IAL).zip..TKSCRI
8e10: 50 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 62 74 PTZIPNAME = libt
8e20: 6b 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 k$(TK_MAJOR_VERS
8e30: 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f ION).$(TK_MINOR_
8e40: 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 50 41 54 VERSION)$(TK_PAT
8e50: 43 48 5f 4c 45 54 54 45 52 29 24 28 54 4b 5f 52 CH_LETTER)$(TK_R
8e60: 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 2e 7a ELEASE_SERIAL).z
8e70: 69 70 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e ip....!if $(DOIN
8e80: 47 5f 54 43 4c 29 0d 0a 54 43 4c 53 48 4e 41 4d G_TCL)..TCLSHNAM
8e90: 45 20 20 20 20 20 20 20 3d 20 24 28 50 52 4f 4a E = $(PROJ
8ea0: 45 43 54 29 73 68 24 28 56 45 52 53 49 4f 4e 29 ECT)sh$(VERSION)
8eb0: 24 28 53 55 46 58 29 2e 65 78 65 0d 0a 54 43 4c $(SUFX).exe..TCL
8ec0: 53 48 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 SH..= $(OUT_DIR)
8ed0: 5c 24 28 54 43 4c 53 48 4e 41 4d 45 29 0d 0a 54 \$(TCLSHNAME)..T
8ee0: 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 54 CLIMPLIB.= $(OUT
8ef0: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
8f00: 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 $(VERSION)$(SUFX
8f10: 29 2e 6c 69 62 0d 0a 54 43 4c 4c 49 42 4e 41 4d ).lib..TCLLIBNAM
8f20: 45 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 28 E.= $(PROJECT)$(
8f30: 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e VERSION)$(SUFX).
8f40: 24 28 45 58 54 29 0d 0a 54 43 4c 4c 49 42 09 09 $(EXT)..TCLLIB..
8f50: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
8f60: 43 4c 4c 49 42 4e 41 4d 45 29 0d 0a 54 43 4c 53 CLLIBNAME)..TCLS
8f70: 43 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 28 CRIPTZIP = $(
8f80: 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 53 43 OUT_DIR)\$(TCLSC
8f90: 52 49 50 54 5a 49 50 4e 41 4d 45 29 0d 0a 0d 0a RIPTZIPNAME)....
8fa0: 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f !if $(TCL_MAJOR_
8fb0: 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 VERSION) == 8..T
8fc0: 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 CLSTUBLIBNAME.=
8fd0: 24 28 53 54 55 42 50 52 45 46 49 58 29 24 28 56 $(STUBPREFIX)$(V
8fe0: 45 52 53 49 4f 4e 29 2e 6c 69 62 0d 0a 21 65 6c ERSION).lib..!el
8ff0: 73 65 0d 0a 54 43 4c 53 54 55 42 4c 49 42 4e 41 se..TCLSTUBLIBNA
9000: 4d 45 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 ME.= $(STUBPREFI
9010: 58 29 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a X).lib..!endif..
9020: 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 4f TCLSTUBLIB.= $(O
9030: 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 53 54 55 UT_DIR)\$(TCLSTU
9040: 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 43 4c 5f 49 BLIBNAME)..TCL_I
9050: 4e 43 4c 55 44 45 53 20 20 20 20 3d 20 2d 49 22 NCLUDES = -I"
9060: 24 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 $(WIN_DIR)" -I"$
9070: 28 47 45 4e 45 52 49 43 44 49 52 29 22 0d 0a 0d (GENERICDIR)"...
9080: 0a 21 65 6c 73 65 20 23 20 21 24 28 44 4f 49 4e .!else # !$(DOIN
9090: 47 5f 54 43 4c 29 0d 0a 0d 0a 21 69 66 20 24 28 G_TCL)....!if $(
90a0: 54 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 TCLINSTALL) # Bu
90b0: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 61 ilding against a
90c0: 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0d n installed Tcl.
90d0: 0a 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 ...# When buildi
90e0: 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 77 ng extensions, w
90f0: 65 20 6e 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 e need to locate
9100: 20 74 63 6c 73 68 2e 20 44 65 70 65 6e 64 69 6e tclsh. Dependin
9110: 67 20 6f 6e 20 76 65 72 73 69 6f 6e 0d 0a 23 20 g on version..#
9120: 6f 66 20 54 63 6c 20 77 65 20 61 72 65 20 62 75 of Tcl we are bu
9130: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 2c 20 ilding against,
9140: 74 68 69 73 20 6d 61 79 20 6f 72 20 6d 61 79 20 this may or may
9150: 6e 6f 74 20 68 61 76 65 20 61 20 22 74 22 20 73 not have a "t" s
9160: 75 66 66 69 78 2e 0d 0a 23 20 54 72 79 20 76 61 uffix...# Try va
9170: 72 69 6f 75 73 20 70 6f 73 73 69 62 69 6c 69 74 rious possibilit
9180: 69 65 73 20 69 6e 20 74 75 72 6e 2e 0d 0a 54 43 ies in turn...TC
9190: 4c 53 48 09 09 3d 20 24 28 5f 54 43 4c 44 49 52 LSH..= $(_TCLDIR
91a0: 29 5c 62 69 6e 5c 74 63 6c 73 68 24 28 54 43 4c )\bin\tclsh$(TCL
91b0: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a _VERSION)$(SUFX:
91c0: 74 3d 29 2e 65 78 65 0d 0a 21 69 66 20 21 65 78 t=).exe..!if !ex
91d0: 69 73 74 28 22 24 28 54 43 4c 53 48 29 22 29 0d ist("$(TCLSH)").
91e0: 0a 54 43 4c 53 48 20 20 20 20 20 20 20 20 20 20 .TCLSH
91f0: 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 = $(_TCLDIR)\bi
9200: 6e 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 n\tclsh$(TCL_VER
9210: 53 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 SION)t$(SUFX:t=)
9220: 2e 65 78 65 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a .exe..!endif....
9230: 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f !if $(TCL_MAJOR_
9240: 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 VERSION) == 8..T
9250: 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 CLSTUBLIB.= $(_T
9260: 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 CLDIR)\lib\tclst
9270: 75 62 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 ub$(TCL_VERSION)
9280: 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54 43 4c .lib..!else..TCL
9290: 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c STUBLIB.= $(_TCL
92a0: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 DIR)\lib\tclstub
92b0: 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 .lib..!endif..TC
92c0: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c LIMPLIB.= $(_TCL
92d0: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 DIR)\lib\tcl$(TC
92e0: 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 L_VERSION)$(SUFX
92f0: 3a 74 3d 29 2e 6c 69 62 0d 0a 23 20 57 68 65 6e :t=).lib..# When
9300: 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 building extens
9310: 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e ions, may be lin
9320: 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c king against Tcl
9330: 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 that does not a
9340: 64 64 0d 0a 23 20 22 74 22 20 73 75 66 66 69 78 dd..# "t" suffix
9350: 20 28 65 2e 67 2e 20 38 2e 35 20 6f 72 20 38 2e (e.g. 8.5 or 8.
9360: 37 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 7). If lib not f
9370: 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74 ound check for t
9380: 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e hat possibility.
9390: 0d 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 28 ..!if !exist("$(
93a0: 54 43 4c 49 4d 50 4c 49 42 29 22 29 0d 0a 54 43 TCLIMPLIB)")..TC
93b0: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c LIMPLIB.= $(_TCL
93c0: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 DIR)\lib\tcl$(TC
93d0: 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 L_VERSION)t$(SUF
93e0: 58 3a 74 3d 29 2e 6c 69 62 0d 0a 21 65 6e 64 69 X:t=).lib..!endi
93f0: 66 0d 0a 54 43 4c 5f 4c 49 42 52 41 52 59 09 3d f..TCL_LIBRARY.=
9400: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 0d $(_TCLDIR)\lib.
9410: 0a 54 43 4c 52 45 47 4c 49 42 09 3d 20 24 28 5f .TCLREGLIB.= $(_
9420: 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 72 TCLDIR)\lib\tclr
9430: 65 67 31 33 24 28 53 55 46 58 3a 74 3d 29 2e 6c eg13$(SUFX:t=).l
9440: 69 62 0d 0a 54 43 4c 44 44 45 4c 49 42 09 3d 20 ib..TCLDDELIB.=
9450: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 $(_TCLDIR)\lib\t
9460: 63 6c 64 64 65 31 34 24 28 53 55 46 58 3a 74 3d cldde14$(SUFX:t=
9470: 29 2e 6c 69 62 0d 0a 54 43 4c 53 43 52 49 50 54 ).lib..TCLSCRIPT
9480: 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 ZIP.= $(_TCLDIR)
9490: 5c 6c 69 62 5c 24 28 54 43 4c 53 43 52 49 50 54 \lib\$(TCLSCRIPT
94a0: 5a 49 50 4e 41 4d 45 29 0d 0a 54 43 4c 54 4f 4f ZIPNAME)..TCLTOO
94b0: 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 5c 68 61 LSDIR.= \must\ha
94c0: 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 73 5c 74 ve\tcl\sources\t
94d0: 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c 74 61 72 o\build\this\tar
94e0: 67 65 74 0d 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 get..TCL_INCLUDE
94f0: 53 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 43 4c S = -I"$(_TCL
9500: 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0d 0a 0d DIR)\include"...
9510: 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e .!else # Buildin
9520: 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f g against Tcl so
9530: 75 72 63 65 73 0d 0a 0d 0a 54 43 4c 53 48 09 09 urces....TCLSH..
9540: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
9550: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
9560: 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 tclsh$(TCL_VERSI
9570: 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 ON)$(SUFX:t=).ex
9580: 65 0d 0a 21 69 66 20 21 65 78 69 73 74 28 24 28 e..!if !exist($(
9590: 54 43 4c 53 48 29 29 0d 0a 54 43 4c 53 48 09 09 TCLSH))..TCLSH..
95a0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
95b0: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
95c0: 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 tclsh$(TCL_VERSI
95d0: 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 ON)t$(SUFX:t=).e
95e0: 78 65 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 xe..!endif..!if
95f0: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
9600: 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 54 ION) == 8..TCLST
9610: 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 UBLIB.= $(_TCLDI
9620: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
9630: 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 24 28 54 RTOP)\tclstub$(T
9640: 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0d CL_VERSION).lib.
9650: 0a 21 65 6c 73 65 0d 0a 54 43 4c 53 54 55 42 4c .!else..TCLSTUBL
9660: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9670: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
9680: 50 29 5c 74 63 6c 73 74 75 62 2e 6c 69 62 0d 0a P)\tclstub.lib..
9690: 21 65 6e 64 69 66 0d 0a 54 43 4c 49 4d 50 4c 49 !endif..TCLIMPLI
96a0: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
96b0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
96c0: 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 )\tcl$(TCL_VERSI
96d0: 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 ON)$(SUFX:t=).li
96e0: 62 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 b..# When buildi
96f0: 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d ng extensions, m
9700: 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 ay be linking ag
9710: 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 20 64 ainst Tcl that d
9720: 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23 20 22 oes not add..# "
9730: 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 t" suffix (e.g.
9740: 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 8.5 or 8.7). If
9750: 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 lib not found ch
9760: 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 eck for that pos
9770: 73 69 62 69 6c 69 74 79 2e 0d 0a 21 69 66 20 21 sibility...!if !
9780: 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d 50 4c exist("$(TCLIMPL
9790: 49 42 29 22 29 0d 0a 54 43 4c 49 4d 50 4c 49 42 IB)")..TCLIMPLIB
97a0: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 .= $(_TCLDIR)\wi
97b0: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
97c0: 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f \tcl$(TCL_VERSIO
97d0: 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 N)t$(SUFX:t=).li
97e0: 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 5f 4c b..!endif..TCL_L
97f0: 49 42 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 IBRARY.= $(_TCLD
9800: 49 52 29 5c 6c 69 62 72 61 72 79 0d 0a 54 43 4c IR)\library..TCL
9810: 52 45 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 REGLIB.= $(_TCLD
9820: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9830: 49 52 54 4f 50 29 5c 74 63 6c 72 65 67 31 33 24 IRTOP)\tclreg13$
9840: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 54 (SUFX:t=).lib..T
9850: 43 4c 44 44 45 4c 49 42 09 3d 20 24 28 5f 54 43 CLDDELIB.= $(_TC
9860: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
9870: 44 44 49 52 54 4f 50 29 5c 74 63 6c 64 64 65 31 DDIRTOP)\tcldde1
9880: 34 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 4$(SUFX:t=).lib.
9890: 0a 54 43 4c 53 43 52 49 50 54 5a 49 50 09 3d 20 .TCLSCRIPTZIP.=
98a0: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 $(_TCLDIR)\win\$
98b0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 (BUILDDIRTOP)\$(
98c0: 54 43 4c 53 43 52 49 50 54 5a 49 50 4e 41 4d 45 TCLSCRIPTZIPNAME
98d0: 29 0d 0a 54 43 4c 54 4f 4f 4c 53 44 49 52 09 3d )..TCLTOOLSDIR.=
98e0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 74 6f 6f 6c $(_TCLDIR)\tool
98f0: 73 0d 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 53 09 s..TCL_INCLUDES.
9900: 3d 20 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c = -I"$(_TCLDIR)\
9910: 67 65 6e 65 72 69 63 22 20 2d 49 22 24 28 5f 54 generic" -I"$(_T
9920: 43 4c 44 49 52 29 5c 77 69 6e 22 0d 0a 0d 0a 21 CLDIR)\win"....!
9930: 65 6e 64 69 66 20 23 20 54 43 4c 49 4e 53 54 41 endif # TCLINSTA
9940: 4c 4c 0d 0a 0d 0a 21 69 66 20 21 24 28 53 54 41 LL....!if !$(STA
9950: 54 49 43 5f 42 55 49 4c 44 29 20 26 26 20 22 24 TIC_BUILD) && "$
9960: 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 (TCL_BUILD_FOR)"
9970: 20 3d 3d 20 22 38 22 0d 0a 74 63 6c 6c 69 62 73 == "8"..tcllibs
9980: 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c 49 42 = "$(TCLSTUBLIB
9990: 29 22 0d 0a 21 65 6c 73 65 0d 0a 74 63 6c 6c 69 )"..!else..tclli
99a0: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
99b0: 49 42 29 22 20 22 24 28 54 43 4c 49 4d 50 4c 49 IB)" "$(TCLIMPLI
99c0: 42 29 22 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 B)"..!endif....!
99d0: 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f endif # $(DOING_
99e0: 54 43 4c 29 0d 0a 0d 0a 23 20 57 65 20 6e 65 65 TCL)....# We nee
99f0: 64 20 61 20 74 63 6c 73 68 20 74 68 61 74 20 77 d a tclsh that w
9a00: 69 6c 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 68 ill run on the h
9a10: 6f 73 74 20 6d 61 63 68 69 6e 65 20 61 73 20 70 ost machine as p
9a20: 61 72 74 20 6f 66 20 74 68 65 20 62 75 69 6c 64 art of the build
9a30: 2e 0d 0a 23 20 49 58 38 36 20 72 75 6e 73 20 6f ...# IX86 runs o
9a40: 6e 20 61 6c 6c 20 61 72 63 68 69 74 65 63 74 75 n all architectu
9a50: 72 65 73 2e 0d 0a 21 69 66 6e 64 65 66 20 54 43 res...!ifndef TC
9a60: 4c 53 48 5f 4e 41 54 49 56 45 0d 0a 21 69 66 20 LSH_NATIVE..!if
9a70: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
9a80: 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 "IX86" || "$(MAC
9a90: 48 49 4e 45 29 22 20 3d 3d 20 22 24 28 4e 41 54 HINE)" == "$(NAT
9aa0: 49 56 45 5f 41 52 43 48 29 22 0d 0a 54 43 4c 53 IVE_ARCH)"..TCLS
9ab0: 48 5f 4e 41 54 49 56 45 09 3d 20 24 28 54 43 4c H_NATIVE.= $(TCL
9ac0: 53 48 29 0d 0a 21 65 6c 73 65 0d 0a 21 65 72 72 SH)..!else..!err
9ad0: 6f 72 20 59 6f 75 20 6d 75 73 74 20 65 78 70 6c or You must expl
9ae0: 69 63 69 74 6c 79 20 73 65 74 20 54 43 4c 53 48 icitly set TCLSH
9af0: 5f 4e 41 54 49 56 45 20 66 6f 72 20 63 72 6f 73 _NATIVE for cros
9b00: 73 2d 63 6f 6d 70 69 6c 61 74 69 6f 6e 0d 0a 21 s-compilation..!
9b10: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d endif..!endif...
9b20: 0a 23 20 44 6f 20 74 68 65 20 73 61 6d 65 20 66 .# Do the same f
9b30: 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20 65 78 74 or Tk and Tk ext
9b40: 65 6e 73 69 6f 6e 73 20 74 68 61 74 20 72 65 71 ensions that req
9b50: 75 69 72 65 20 74 68 65 20 54 6b 20 6c 69 62 72 uire the Tk libr
9b60: 61 72 69 65 73 0d 0a 21 69 66 20 24 28 44 4f 49 aries..!if $(DOI
9b70: 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45 45 44 NG_TK) || $(NEED
9b80: 5f 54 4b 29 0d 0a 57 49 53 48 4e 41 4d 45 50 52 _TK)..WISHNAMEPR
9b90: 45 46 49 58 20 3d 20 77 69 73 68 0d 0a 57 49 53 EFIX = wish..WIS
9ba0: 48 4e 41 4d 45 20 3d 20 24 28 57 49 53 48 4e 41 HNAME = $(WISHNA
9bb0: 4d 45 50 52 45 46 49 58 29 24 28 54 4b 5f 56 45 MEPREFIX)$(TK_VE
9bc0: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 RSION)$(SUFX).ex
9bd0: 65 0d 0a 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 e..TKLIBNAME8.=
9be0: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9bf0: 28 53 55 46 58 29 2e 24 28 45 58 54 29 0d 0a 54 (SUFX).$(EXT)..T
9c00: 4b 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c 39 KLIBNAME9.= tcl9
9c10: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9c20: 28 53 55 46 58 29 2e 24 28 45 58 54 29 0d 0a 21 (SUFX).$(EXT)..!
9c30: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
9c40: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 ERSION) == 8 ||
9c50: 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 "$(TCL_BUILD_FOR
9c60: 29 22 20 3d 3d 20 22 38 22 0d 0a 54 4b 4c 49 42 )" == "8"..TKLIB
9c70: 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 NAME.= tk$(TK_VE
9c80: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 RSION)$(SUFX).$(
9c90: 45 58 54 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e 41 EXT)..TKIMPLIBNA
9ca0: 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 ME.= tk$(TK_VERS
9cb0: 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0d ION)$(SUFX).lib.
9cc0: 0a 21 65 6c 73 65 0d 0a 54 4b 4c 49 42 4e 41 4d .!else..TKLIBNAM
9cd0: 45 09 3d 20 74 63 6c 39 74 6b 24 28 54 4b 5f 56 E.= tcl9tk$(TK_V
9ce0: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 ERSION)$(SUFX).$
9cf0: 28 45 58 54 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e (EXT)..TKIMPLIBN
9d00: 41 4d 45 09 3d 20 74 63 6c 39 74 6b 24 28 54 4b AME.= tcl9tk$(TK
9d10: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 _VERSION)$(SUFX)
9d20: 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 .lib..!endif..!i
9d30: 66 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 f $(TK_MAJOR_VER
9d40: 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 4b 53 54 SION) == 8..TKST
9d50: 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 73 74 UBLIBNAME.= tkst
9d60: 75 62 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 2e ub$(TK_VERSION).
9d70: 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54 4b 53 54 lib..!else..TKST
9d80: 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 73 74 UBLIBNAME.= tkst
9d90: 75 62 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a ub.lib..!endif..
9da0: 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b ..!if $(DOING_TK
9db0: 29 0d 0a 57 49 53 48 20 09 09 3d 20 24 28 4f 55 )..WISH ..= $(OU
9dc0: 54 5f 44 49 52 29 5c 24 28 57 49 53 48 4e 41 4d T_DIR)\$(WISHNAM
9dd0: 45 29 0d 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 E)..TKSTUBLIB.=
9de0: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 53 $(OUT_DIR)\$(TKS
9df0: 54 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 49 TUBLIBNAME)..TKI
9e00: 4d 50 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 MPLIB.= $(OUT_DI
9e10: 52 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d R)\$(TKIMPLIBNAM
9e20: 45 29 0d 0a 54 4b 4c 49 42 09 09 3d 20 24 28 4f E)..TKLIB..= $(O
9e30: 55 54 5f 44 49 52 29 5c 24 28 54 4b 4c 49 42 4e UT_DIR)\$(TKLIBN
9e40: 41 4d 45 29 0d 0a 54 4b 5f 49 4e 43 4c 55 44 45 AME)..TK_INCLUDE
9e50: 53 20 20 20 20 20 3d 20 2d 49 22 24 28 57 49 4e S = -I"$(WIN
9e60: 5f 44 49 52 29 22 20 2d 49 22 24 28 47 45 4e 45 _DIR)" -I"$(GENE
9e70: 52 49 43 44 49 52 29 22 0d 0a 54 4b 53 43 52 49 RICDIR)"..TKSCRI
9e80: 50 54 5a 49 50 20 20 20 20 20 3d 20 24 28 4f 55 PTZIP = $(OU
9e90: 54 5f 44 49 52 29 5c 24 28 54 4b 53 43 52 49 50 T_DIR)\$(TKSCRIP
9ea0: 54 5a 49 50 4e 41 4d 45 29 0d 0a 0d 0a 21 65 6c TZIPNAME)....!el
9eb0: 73 65 20 23 20 65 66 66 65 63 74 69 76 65 6c 79 se # effectively
9ec0: 20 4e 45 45 44 5f 54 4b 0d 0a 0d 0a 21 69 66 20 NEED_TK....!if
9ed0: 24 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 42 $(TKINSTALL) # B
9ee0: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
9ef0: 69 6e 73 74 61 6c 6c 65 64 20 54 6b 0d 0a 57 49 installed Tk..WI
9f00: 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c SH..= $(_TKDIR)\
9f10: 62 69 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0d bin\$(WISHNAME).
9f20: 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f .TKSTUBLIB.= $(_
9f30: 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 TKDIR)\lib\$(TKS
9f40: 54 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 49 TUBLIBNAME)..TKI
9f50: 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 MPLIB.= $(_TKDIR
9f60: 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 42 )\lib\$(TKIMPLIB
9f70: 4e 41 4d 45 29 0d 0a 23 20 57 68 65 6e 20 62 75 NAME)..# When bu
9f80: 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e ilding extension
9f90: 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e s, may be linkin
9fa0: 67 20 61 67 61 69 6e 73 74 20 54 6b 20 74 68 61 g against Tk tha
9fb0: 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a t does not add..
9fc0: 23 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e # "t" suffix (e.
9fd0: 67 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 g. 8.5 or 8.7).
9fe0: 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 If lib not found
9ff0: 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 check for that
a000: 70 6f 73 73 69 62 69 6c 69 74 79 2e 0d 0a 21 69 possibility...!i
a010: 66 20 21 65 78 69 73 74 28 22 24 28 54 4b 49 4d f !exist("$(TKIM
a020: 50 4c 49 42 29 22 29 0d 0a 54 4b 49 4d 50 4c 49 PLIB)")..TKIMPLI
a030: 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 BNAME.= tk$(TK_V
a040: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d ERSION)$(SUFX:t=
a050: 29 2e 6c 69 62 0d 0a 54 4b 49 4d 50 4c 49 42 09 ).lib..TKIMPLIB.
a060: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c = $(_TKDIR)\lib\
a070: 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0d $(TKIMPLIBNAME).
a080: 0a 21 65 6e 64 69 66 0d 0a 54 4b 5f 49 4e 43 4c .!endif..TK_INCL
a090: 55 44 45 53 20 20 20 20 20 3d 20 2d 49 22 24 28 UDES = -I"$(
a0a0: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 _TKDIR)\include"
a0b0: 0d 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 ..TKSCRIPTZIP
a0c0: 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 = $(_TKDIR)\li
a0d0: 62 5c 24 28 54 4b 53 43 52 49 50 54 5a 49 50 4e b\$(TKSCRIPTZIPN
a0e0: 41 4d 45 29 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 AME)....!else #
a0f0: 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 Building against
a100: 20 54 6b 20 73 6f 75 72 63 65 73 0d 0a 0d 0a 57 Tk sources....W
a110: 49 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 ISH..= $(_TKDIR)
a120: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
a130: 4f 50 29 5c 24 28 57 49 53 48 4e 41 4d 45 29 0d OP)\$(WISHNAME).
a140: 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f .TKSTUBLIB.= $(_
a150: 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 TKDIR)\win\$(BUI
a160: 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 53 54 LDDIRTOP)\$(TKST
a170: 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 49 4d UBLIBNAME)..TKIM
a180: 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 PLIB.= $(_TKDIR)
a190: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
a1a0: 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 OP)\$(TKIMPLIBNA
a1b0: 4d 45 29 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c ME)..# When buil
a1c0: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c ding extensions,
a1d0: 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 may be linking
a1e0: 61 67 61 69 6e 73 74 20 54 6b 20 74 68 61 74 20 against Tk that
a1f0: 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23 20 does not add..#
a200: 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e "t" suffix (e.g.
a210: 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 8.5 or 8.7). If
a220: 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 lib not found c
a230: 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f heck for that po
a240: 73 73 69 62 69 6c 69 74 79 2e 0d 0a 21 69 66 20 ssibility...!if
a250: 21 65 78 69 73 74 28 22 24 28 54 4b 49 4d 50 4c !exist("$(TKIMPL
a260: 49 42 29 22 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e IB)")..TKIMPLIBN
a270: 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 AME.= tk$(TK_VER
a280: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
a290: 6c 69 62 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 lib..TKIMPLIB.=
a2a0: 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 $(_TKDIR)\win\$(
a2b0: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 BUILDDIRTOP)\$(T
a2c0: 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 21 65 KIMPLIBNAME)..!e
a2d0: 6e 64 69 66 0d 0a 54 4b 5f 49 4e 43 4c 55 44 45 ndif..TK_INCLUDE
a2e0: 53 20 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 4b S = -I"$(_TK
a2f0: 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 2d 49 DIR)\generic" -I
a300: 22 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 22 20 "$(_TKDIR)\win"
a310: 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 78 6c 69 -I"$(_TKDIR)\xli
a320: 62 22 0d 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 b"..TKSCRIPTZIP
a330: 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c = $(_TKDIR)\
a340: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
a350: 50 29 5c 24 28 54 4b 53 43 52 49 50 54 5a 49 50 P)\$(TKSCRIPTZIP
a360: 4e 41 4d 45 29 0d 0a 0d 0a 21 65 6e 64 69 66 20 NAME)....!endif
a370: 23 20 54 4b 49 4e 53 54 41 4c 4c 0d 0a 0d 0a 74 # TKINSTALL....t
a380: 6b 6c 69 62 73 20 3d 20 22 24 28 54 4b 53 54 55 klibs = "$(TKSTU
a390: 42 4c 49 42 29 22 20 22 24 28 54 4b 49 4d 50 4c BLIB)" "$(TKIMPL
a3a0: 49 42 29 22 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 IB)"....!endif #
a3b0: 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 21 65 $(DOING_TK)..!e
a3c0: 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 ndif # $(DOING_T
a3d0: 4b 29 20 7c 7c 20 24 28 4e 45 45 44 5f 54 4b 29 K) || $(NEED_TK)
a3e0: 0d 0a 0d 0a 23 20 56 61 72 69 6f 75 73 20 6f 75 ....# Various ou
a3f0: 74 70 75 74 20 70 61 74 68 73 0d 0a 50 52 4a 49 tput paths..PRJI
a400: 4d 50 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 MPLIB.= $(OUT_DI
a410: 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 56 R)\$(PROJECT)$(V
a420: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c ERSION)$(SUFX).l
a430: 69 62 0d 0a 50 52 4a 4c 49 42 4e 41 4d 45 38 09 ib..PRJLIBNAME8.
a440: 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 = $(PROJECT)$(VE
a450: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 RSION)$(SUFX).$(
a460: 45 58 54 29 0d 0a 50 52 4a 4c 49 42 4e 41 4d 45 EXT)..PRJLIBNAME
a470: 39 09 3d 20 74 63 6c 39 24 28 50 52 4f 4a 45 43 9.= tcl9$(PROJEC
a480: 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 T)$(VERSION)$(SU
a490: 46 58 29 2e 24 28 45 58 54 29 0d 0a 21 69 66 20 FX).$(EXT)..!if
a4a0: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
a4b0: 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 ION) == 8 || "$(
a4c0: 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 TCL_BUILD_FOR)"
a4d0: 3d 3d 20 22 38 22 0d 0a 50 52 4a 4c 49 42 4e 41 == "8"..PRJLIBNA
a4e0: 4d 45 09 3d 20 24 28 50 52 4a 4c 49 42 4e 41 4d ME.= $(PRJLIBNAM
a4f0: 45 38 29 0d 0a 21 65 6c 73 65 0d 0a 50 52 4a 4c E8)..!else..PRJL
a500: 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 4a 4c 49 IBNAME.= $(PRJLI
a510: 42 4e 41 4d 45 39 29 0d 0a 21 65 6e 64 69 66 0d BNAME9)..!endif.
a520: 0a 50 52 4a 4c 49 42 09 09 3d 20 24 28 4f 55 54 .PRJLIB..= $(OUT
a530: 5f 44 49 52 29 5c 24 28 50 52 4a 4c 49 42 4e 41 _DIR)\$(PRJLIBNA
a540: 4d 45 29 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c ME)....!if $(TCL
a550: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
a560: 3d 3d 20 38 0d 0a 50 52 4a 53 54 55 42 4c 49 42 == 8..PRJSTUBLIB
a570: 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52 45 NAME.= $(STUBPRE
a580: 46 49 58 29 24 28 56 45 52 53 49 4f 4e 29 2e 6c FIX)$(VERSION).l
a590: 69 62 0d 0a 21 65 6c 73 65 0d 0a 50 52 4a 53 54 ib..!else..PRJST
a5a0: 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 UBLIBNAME.= $(ST
a5b0: 55 42 50 52 45 46 49 58 29 2e 6c 69 62 0d 0a 21 UBPREFIX).lib..!
a5c0: 65 6e 64 69 66 0d 0a 50 52 4a 53 54 55 42 4c 49 endif..PRJSTUBLI
a5d0: 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 B.= $(OUT_DIR)\$
a5e0: 28 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 29 (PRJSTUBLIBNAME)
a5f0: 0d 0a 0d 0a 23 20 49 66 20 65 78 74 65 6e 73 69 ....# If extensi
a600: 6f 6e 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 on parent makefi
a610: 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 6e le has not defin
a620: 65 64 20 61 20 72 65 73 6f 75 72 63 65 20 64 65 ed a resource de
a630: 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0d 0a finition file,..
a640: 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 72 61 # we will genera
a650: 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e te one from stan
a660: 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e 0d 0a dard template...
a670: 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c !if !$(DOING_TCL
a680: 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 4b ) && !$(DOING_TK
a690: 29 20 26 26 20 21 24 28 53 54 41 54 49 43 5f 42 ) && !$(STATIC_B
a6a0: 55 49 4c 44 29 0d 0a 21 69 66 64 65 66 20 52 43 UILD)..!ifdef RC
a6b0: 46 49 4c 45 0d 0a 52 45 53 46 49 4c 45 20 3d 20 FILE..RESFILE =
a6c0: 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 52 43 46 $(TMP_DIR)\$(RCF
a6d0: 49 4c 45 3a 2e 72 63 3d 2e 72 65 73 29 0d 0a 21 ILE:.rc=.res)..!
a6e0: 65 6c 73 65 0d 0a 52 45 53 46 49 4c 45 20 3d 20 else..RESFILE =
a6f0: 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f $(TMP_DIR)\$(PRO
a700: 4a 45 43 54 29 2e 72 65 73 0d 0a 21 65 6e 64 69 JECT).res..!endi
a710: 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 f..!endif....###
a720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a730: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a740: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a750: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a760: 0d 0a 23 20 31 31 2e 20 43 6f 6e 73 74 72 75 63 ..# 11. Construc
a770: 74 20 74 68 65 20 70 61 74 68 73 20 66 6f 72 20 t the paths for
a780: 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e the installation
a790: 20 64 69 72 65 63 74 6f 72 69 65 73 0d 0a 23 20 directories..#
a7a0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
a7b0: 63 72 6f 73 20 67 65 74 20 64 65 66 69 6e 65 64 cros get defined
a7c0: 20 69 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e in this section
a7d0: 3a 0d 0a 23 20 4c 49 42 5f 49 4e 53 54 41 4c 4c :..# LIB_INSTALL
a7e0: 5f 44 49 52 20 2d 20 77 68 65 72 65 20 6c 69 62 _DIR - where lib
a7f0: 72 61 72 69 65 73 20 73 68 6f 75 6c 64 20 62 65 raries should be
a800: 20 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 42 49 installed..# BI
a810: 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 N_INSTALL_DIR -
a820: 77 68 65 72 65 20 74 68 65 20 65 78 65 63 75 74 where the execut
a830: 61 62 6c 65 73 20 73 68 6f 75 6c 64 20 62 65 20 ables should be
a840: 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 44 4f 43 installed..# DOC
a850: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a860: 68 65 72 65 20 64 6f 63 75 6d 65 6e 74 61 74 69 here documentati
a870: 6f 6e 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 on should be ins
a880: 74 61 6c 6c 65 64 0d 0a 23 20 53 43 52 49 50 54 talled..# SCRIPT
a890: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a8a0: 68 65 72 65 20 73 63 72 69 70 74 73 20 73 68 6f here scripts sho
a8b0: 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 uld be installed
a8c0: 0d 0a 23 20 49 4e 43 4c 55 44 45 5f 49 4e 53 54 ..# INCLUDE_INST
a8d0: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a8e0: 43 20 69 6e 63 6c 75 64 65 20 66 69 6c 65 73 20 C include files
a8f0: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a900: 6c 65 64 0d 0a 23 20 44 45 4d 4f 5f 49 4e 53 54 led..# DEMO_INST
a910: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a920: 64 65 6d 6f 73 20 73 68 6f 75 6c 64 20 62 65 20 demos should be
a930: 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 50 52 4a installed..# PRJ
a940: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a950: 68 65 72 65 20 70 61 63 6b 61 67 65 20 77 69 6c here package wil
a960: 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 28 l be installed (
a970: 6e 6f 74 20 73 65 74 20 66 6f 72 20 54 63 6c 20 not set for Tcl
a980: 61 6e 64 20 54 6b 29 0d 0a 0d 0a 21 69 66 20 24 and Tk)....!if $
a990: 28 44 4f 49 4e 47 5f 54 43 4c 29 20 7c 7c 20 24 (DOING_TCL) || $
a9a0: 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 4c 49 42 5f (DOING_TK)..LIB_
a9b0: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 INSTALL_DIR..= $
a9c0: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 (_INSTALLDIR)\li
a9d0: 62 0d 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 b..BIN_INSTALL_D
a9e0: 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c IR..= $(_INSTALL
a9f0: 44 49 52 29 5c 62 69 6e 0d 0a 44 4f 43 5f 49 4e DIR)\bin..DOC_IN
aa00: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f STALL_DIR..= $(_
aa10: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 64 6f 63 0d INSTALLDIR)\doc.
aa20: 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c .!if $(DOING_TCL
aa30: 29 0d 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c )..SCRIPT_INSTAL
aa40: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 L_DIR.= $(_INSTA
aa50: 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 4f LLDIR)\lib\$(PRO
aa60: 4a 45 43 54 29 24 28 54 43 4c 5f 4d 41 4a 4f 52 JECT)$(TCL_MAJOR
aa70: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f _VERSION).$(TCL_
aa80: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a MINOR_VERSION)..
aa90: 4d 4f 44 55 4c 45 5f 49 4e 53 54 41 4c 4c 5f 44 MODULE_INSTALL_D
aaa0: 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 IR.= $(_INSTALLD
aab0: 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c IR)\lib\tcl$(TCL
aac0: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 0d _MAJOR_VERSION).
aad0: 0a 21 65 6c 73 65 20 23 20 44 4f 49 4e 47 5f 54 .!else # DOING_T
aae0: 4b 0d 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c K..SCRIPT_INSTAL
aaf0: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 L_DIR.= $(_INSTA
ab00: 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 4f LLDIR)\lib\$(PRO
ab10: 4a 45 43 54 29 24 28 54 4b 5f 4d 41 4a 4f 52 5f JECT)$(TK_MAJOR_
ab20: 56 45 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 VERSION).$(TK_MI
ab30: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 21 65 NOR_VERSION)..!e
ab40: 6e 64 69 66 0d 0a 44 45 4d 4f 5f 49 4e 53 54 41 ndif..DEMO_INSTA
ab50: 4c 4c 5f 44 49 52 09 3d 20 24 28 53 43 52 49 50 LL_DIR.= $(SCRIP
ab60: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 64 T_INSTALL_DIR)\d
ab70: 65 6d 6f 73 0d 0a 49 4e 43 4c 55 44 45 5f 49 4e emos..INCLUDE_IN
ab80: 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 STALL_DIR.= $(_I
ab90: 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 NSTALLDIR)\inclu
aba0: 64 65 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 65 78 de....!else # ex
abb0: 74 65 6e 73 69 6f 6e 20 6f 74 68 65 72 20 74 68 tension other th
abc0: 61 6e 20 54 6b 0d 0a 0d 0a 50 52 4a 5f 49 4e 53 an Tk....PRJ_INS
abd0: 54 41 4c 4c 5f 44 49 52 20 20 20 20 20 20 20 20 TALL_DIR
abe0: 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 = $(_INSTALLDIR
abf0: 29 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 44 4f )\$(PROJECT)$(DO
ac00: 54 56 45 52 53 49 4f 4e 29 0d 0a 21 69 66 20 24 TVERSION)..!if $
ac10: 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 (MULTIPLATFORM_I
ac20: 4e 53 54 41 4c 4c 29 0d 0a 4c 49 42 5f 49 4e 53 NSTALL)..LIB_INS
ac30: 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 TALL_DIR..= $(PR
ac40: 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 24 J_INSTALL_DIR)\$
ac50: 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 (PLATFORM_IDENTI
ac60: 46 59 29 0d 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c FY)..BIN_INSTALL
ac70: 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e _DIR..= $(PRJ_IN
ac80: 53 54 41 4c 4c 5f 44 49 52 29 5c 24 28 50 4c 41 STALL_DIR)\$(PLA
ac90: 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 0d TFORM_IDENTIFY).
aca0: 0a 21 65 6c 73 65 0d 0a 4c 49 42 5f 49 4e 53 54 .!else..LIB_INST
acb0: 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a ALL_DIR..= $(PRJ
acc0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0d 0a 42 _INSTALL_DIR)..B
acd0: 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 IN_INSTALL_DIR..
ace0: 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f = $(PRJ_INSTALL_
acf0: 44 49 52 29 0d 0a 21 65 6e 64 69 66 0d 0a 44 4f DIR)..!endif..DO
ad00: 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d C_INSTALL_DIR..=
ad10: 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 $(PRJ_INSTALL_D
ad20: 49 52 29 0d 0a 53 43 52 49 50 54 5f 49 4e 53 54 IR)..SCRIPT_INST
ad30: 41 4c 4c 5f 44 49 52 09 3d 20 24 28 50 52 4a 5f ALL_DIR.= $(PRJ_
ad40: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0d 0a 44 45 INSTALL_DIR)..DE
ad50: 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d MO_INSTALL_DIR.=
ad60: 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 $(PRJ_INSTALL_D
ad70: 49 52 29 5c 64 65 6d 6f 73 0d 0a 49 4e 43 4c 55 IR)\demos..INCLU
ad80: 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d DE_INSTALL_DIR.=
ad90: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c $(_INSTALLDIR)\
ada0: 2e 2e 5c 69 6e 63 6c 75 64 65 0d 0a 0d 0a 21 65 ..\include....!e
adb0: 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 ndif....########
adc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
add0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ade0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
adf0: 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 31 ###########..# 1
ae00: 32 2e 20 53 65 74 20 75 70 20 61 63 74 75 61 6c 2. Set up actual
ae10: 20 6f 70 74 69 6f 6e 73 20 74 6f 20 62 65 20 70 options to be p
ae20: 61 73 73 65 64 20 74 6f 20 74 68 65 20 63 6f 6d assed to the com
ae30: 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 piler and linker
ae40: 0d 0a 23 20 4e 6f 77 20 77 65 20 68 61 76 65 20 ..# Now we have
ae50: 61 6c 6c 20 74 68 65 20 69 6e 66 6f 72 6d 61 74 all the informat
ae60: 69 6f 6e 20 77 65 20 6e 65 65 64 2c 20 73 65 74 ion we need, set
ae70: 20 75 70 20 74 68 65 20 61 63 74 75 61 6c 20 66 up the actual f
ae80: 6c 61 67 73 20 61 6e 64 0d 0a 23 20 6f 70 74 69 lags and..# opti
ae90: 6f 6e 73 20 74 68 61 74 20 77 65 20 77 69 6c 6c ons that we will
aea0: 20 70 61 73 73 20 74 6f 20 74 68 65 20 63 6f 6d pass to the com
aeb0: 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 piler and linker
aec0: 2e 20 54 68 65 20 6d 61 69 6e 0d 0a 23 20 6d 61 . The main..# ma
aed0: 6b 65 66 69 6c 65 20 73 68 6f 75 6c 64 20 75 73 kefile should us
aee0: 65 20 74 68 65 73 65 20 69 6e 20 63 6f 6d 62 69 e these in combi
aef0: 6e 61 74 69 6f 6e 20 77 69 74 68 20 77 68 61 74 nation with what
af00: 65 76 65 72 20 6f 74 68 65 72 20 66 6c 61 67 73 ever other flags
af10: 0d 0a 23 20 61 6e 64 20 73 77 69 74 63 68 65 73 ..# and switches
af20: 20 61 72 65 20 73 70 65 63 69 66 69 63 20 74 6f are specific to
af30: 20 69 74 2e 0d 0a 23 20 54 68 65 20 66 6f 6c 6c it...# The foll
af40: 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 owing macros are
af50: 20 64 65 66 69 6e 65 64 2c 20 6e 61 6d 65 73 20 defined, names
af60: 61 72 65 20 66 6f 72 20 68 69 73 74 6f 72 69 63 are for historic
af70: 61 6c 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 al compatibility
af80: 3a 0d 0a 23 20 4f 50 54 44 45 46 49 4e 45 53 20 :..# OPTDEFINES
af90: 2d 20 2f 44 78 78 78 20 43 20 6d 61 63 72 6f 20 - /Dxxx C macro
afa0: 66 6c 61 67 73 20 62 61 73 65 64 20 6f 6e 20 75 flags based on u
afb0: 73 65 72 2d 73 70 65 63 69 66 69 65 64 20 4f 50 ser-specified OP
afc0: 54 53 0d 0a 23 20 43 4f 4d 50 49 4c 45 52 46 4c TS..# COMPILERFL
afd0: 41 47 53 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 AGS - /Dxxx C ma
afe0: 63 72 6f 20 66 6c 61 67 73 20 69 6e 64 65 70 65 cro flags indepe
aff0: 6e 64 65 6e 74 20 6f 66 20 61 6e 79 20 63 6f 6e ndent of any con
b000: 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f figuration optio
b010: 6e 73 0d 0a 23 20 63 72 74 20 2d 20 43 6f 6d 70 ns..# crt - Comp
b020: 69 6c 65 72 20 73 77 69 74 63 68 20 74 68 61 74 iler switch that
b030: 20 73 65 6c 65 63 74 73 20 74 68 65 20 61 70 70 selects the app
b040: 72 6f 70 72 69 61 74 65 20 43 20 72 75 6e 74 69 ropriate C runti
b050: 6d 65 0d 0a 23 20 63 64 65 62 75 67 20 2d 20 43 me..# cdebug - C
b060: 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 ompiler switches
b070: 20 72 65 6c 61 74 65 64 20 74 6f 20 64 65 62 75 related to debu
b080: 67 20 41 4e 44 20 6f 70 74 69 6d 69 7a 61 74 69 g AND optimizati
b090: 6f 6e 73 0d 0a 23 20 63 77 61 72 6e 20 2d 20 43 ons..# cwarn - C
b0a0: 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 ompiler switches
b0b0: 20 74 68 61 74 20 73 65 74 20 77 61 72 6e 69 6e that set warnin
b0c0: 67 20 6c 65 76 65 6c 73 0d 0a 23 20 63 66 6c 61 g levels..# cfla
b0d0: 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 63 6f gs - complete co
b0e0: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 mpiler switches
b0f0: 28 73 75 62 73 75 6d 65 73 20 63 64 65 62 75 67 (subsumes cdebug
b100: 20 61 6e 64 20 63 77 61 72 6e 29 0d 0a 23 20 6c and cwarn)..# l
b110: 64 65 62 75 67 20 2d 20 4c 69 6e 6b 65 72 20 73 debug - Linker s
b120: 77 69 74 63 68 65 73 20 63 6f 6e 74 72 6f 6c 6c witches controll
b130: 69 6e 67 20 64 65 62 75 67 20 69 6e 66 6f 72 6d ing debug inform
b140: 61 74 69 6f 6e 20 61 6e 64 20 6f 70 74 69 6d 69 ation and optimi
b150: 7a 61 74 69 6f 6e 0d 0a 23 20 6c 66 6c 61 67 73 zation..# lflags
b160: 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b - complete link
b170: 65 72 20 73 77 69 74 63 68 65 73 20 28 73 75 62 er switches (sub
b180: 73 75 6d 65 73 20 6c 64 65 62 75 67 29 20 65 78 sumes ldebug) ex
b190: 63 65 70 74 20 73 75 62 73 79 73 74 65 6d 20 74 cept subsystem t
b1a0: 79 70 65 0d 0a 23 20 64 6c 6c 6c 66 6c 61 67 73 ype..# dlllflags
b1b0: 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b - complete link
b1c0: 65 72 20 73 77 69 74 63 68 65 73 20 74 6f 20 62 er switches to b
b1d0: 75 69 6c 64 20 44 4c 4c 73 20 28 73 75 62 73 75 uild DLLs (subsu
b1e0: 6d 65 73 20 6c 66 6c 61 67 73 29 0d 0a 23 20 63 mes lflags)..# c
b1f0: 6f 6e 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c onlflags - compl
b200: 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 ete linker switc
b210: 68 65 73 20 66 6f 72 20 63 6f 6e 73 6f 6c 65 20 hes for console
b220: 70 72 6f 67 72 61 6d 20 28 73 75 62 73 75 6d 65 program (subsume
b230: 73 20 6c 66 6c 61 67 73 29 0d 0a 23 20 67 75 69 s lflags)..# gui
b240: 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 lflags - complet
b250: 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 e linker switche
b260: 73 20 66 6f 72 20 47 55 49 20 70 72 6f 67 72 61 s for GUI progra
b270: 6d 20 28 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 m (subsumes lfla
b280: 67 73 29 0d 0a 23 20 62 61 73 65 6c 69 62 73 20 gs)..# baselibs
b290: 2d 20 6d 69 6e 69 6d 75 6d 20 57 69 6e 64 6f 77 - minimum Window
b2a0: 73 20 6c 69 62 72 61 72 69 65 73 20 72 65 71 75 s libraries requ
b2b0: 69 72 65 64 2e 20 50 61 72 65 6e 74 20 6d 61 6b ired. Parent mak
b2c0: 65 66 69 6c 65 20 63 61 6e 0d 0a 23 20 20 20 20 efile can..#
b2d0: 64 65 66 69 6e 65 20 50 52 4a 5f 4c 49 42 53 20 define PRJ_LIBS
b2e0: 62 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 before including
b2f0: 20 72 75 6c 65 73 2e 72 63 20 69 66 20 61 64 64 rules.rc if add
b300: 69 74 69 6f 6e 61 6c 20 6c 69 62 73 20 61 72 65 itional libs are
b310: 20 6e 65 65 64 65 64 0d 0a 0d 0a 4f 50 54 44 45 needed....OPTDE
b320: 46 49 4e 45 53 09 3d 20 2f 44 53 54 44 43 5f 48 FINES.= /DSTDC_H
b330: 45 41 44 45 52 53 20 2f 44 55 53 45 5f 4e 4d 41 EADERS /DUSE_NMA
b340: 4b 45 3d 31 0d 0a 21 69 66 20 24 28 56 43 56 45 KE=1..!if $(VCVE
b350: 52 53 49 4f 4e 29 20 3e 20 31 36 30 30 0d 0a 4f RSION) > 1600..O
b360: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b370: 54 44 45 46 49 4e 45 53 29 20 2f 44 48 41 56 45 TDEFINES) /DHAVE
b380: 5f 53 54 44 49 4e 54 5f 48 3d 31 0d 0a 21 65 6c _STDINT_H=1..!el
b390: 73 65 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d se..OPTDEFINES.=
b3a0: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b3b0: 44 4d 50 5f 4e 4f 5f 53 54 44 49 4e 54 3d 31 0d DMP_NO_STDINT=1.
b3c0: 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28 56 .!endif..!if $(V
b3d0: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 38 30 CVERSION) >= 180
b3e0: 30 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 0..OPTDEFINES.=
b3f0: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
b400: 48 41 56 45 5f 49 4e 54 54 59 50 45 53 5f 48 3d HAVE_INTTYPES_H=
b410: 31 20 2f 44 48 41 56 45 5f 53 54 44 42 4f 4f 4c 1 /DHAVE_STDBOOL
b420: 5f 48 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a _H=1..!endif....
b430: 21 69 66 20 24 28 54 43 4c 5f 4d 45 4d 5f 44 45 !if $(TCL_MEM_DE
b440: 42 55 47 29 0d 0a 4f 50 54 44 45 46 49 4e 45 53 BUG)..OPTDEFINES
b450: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b460: 20 2f 44 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 /DTCL_MEM_DEBUG
b470: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28 ..!endif..!if $(
b480: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 TCL_COMPILE_DEBU
b490: 47 29 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d G)..OPTDEFINES.=
b4a0: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b4b0: 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 DTCL_COMPILE_DEB
b4c0: 55 47 20 2f 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 UG /DTCL_COMPILE
b4d0: 5f 53 54 41 54 53 0d 0a 21 65 6e 64 69 66 0d 0a _STATS..!endif..
b4e0: 21 69 66 20 24 28 54 43 4c 5f 54 48 52 45 41 44 !if $(TCL_THREAD
b4f0: 53 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 S) && $(TCL_VERS
b500: 49 4f 4e 29 20 3c 20 38 37 0d 0a 4f 50 54 44 45 ION) < 87..OPTDE
b510: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b520: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 54 48 52 45 INES) /DTCL_THRE
b530: 41 44 53 3d 31 0d 0a 21 69 66 20 24 28 55 53 45 ADS=1..!if $(USE
b540: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 20 26 _THREAD_ALLOC) &
b550: 26 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 & $(TCL_VERSION)
b560: 20 3c 20 38 37 0d 0a 4f 50 54 44 45 46 49 4e 45 < 87..OPTDEFINE
b570: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b580: 29 20 2f 44 55 53 45 5f 54 48 52 45 41 44 5f 41 ) /DUSE_THREAD_A
b590: 4c 4c 4f 43 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a LLOC=1..!endif..
b5a0: 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28 53 54 !endif..!if $(ST
b5b0: 41 54 49 43 5f 42 55 49 4c 44 29 0d 0a 4f 50 54 ATIC_BUILD)..OPT
b5c0: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b5d0: 45 46 49 4e 45 53 29 20 2f 44 53 54 41 54 49 43 EFINES) /DSTATIC
b5e0: 5f 42 55 49 4c 44 0d 0a 21 65 6c 73 65 69 66 20 _BUILD..!elseif
b5f0: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e $(TCL_VERSION) >
b600: 20 38 36 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 86..OPTDEFINES.
b610: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b620: 2f 44 54 43 4c 5f 57 49 54 48 5f 45 58 54 45 52 /DTCL_WITH_EXTER
b630: 4e 41 4c 5f 54 4f 4d 4d 41 54 48 0d 0a 21 69 66 NAL_TOMMATH..!if
b640: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
b650: 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 4d "AMD64" || "$(M
b660: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d ACHINE)" == "ARM
b670: 36 34 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 64"..OPTDEFINES.
b680: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b690: 2f 44 4d 50 5f 36 34 42 49 54 0d 0a 21 65 6e 64 /DMP_64BIT..!end
b6a0: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 if..!endif..!if
b6b0: 24 28 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 $(TCL_NO_DEPRECA
b6c0: 54 45 44 29 0d 0a 4f 50 54 44 45 46 49 4e 45 53 TED)..OPTDEFINES
b6d0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b6e0: 20 2f 44 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 /DTCL_NO_DEPREC
b6f0: 41 54 45 44 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ATED..!endif....
b700: 21 69 66 20 24 28 55 53 45 5f 53 54 55 42 53 29 !if $(USE_STUBS)
b710: 0d 0a 23 20 4e 6f 74 65 20 77 65 20 64 6f 20 6e ..# Note we do n
b720: 6f 74 20 64 65 66 69 6e 65 20 55 53 45 5f 54 43 ot define USE_TC
b730: 4c 5f 53 54 55 42 53 20 65 76 65 6e 20 77 68 65 L_STUBS even whe
b740: 6e 20 62 75 69 6c 64 69 6e 67 20 74 6b 20 73 69 n building tk si
b750: 6e 63 65 20 73 6f 6d 65 0d 0a 23 20 74 65 73 74 nce some..# test
b760: 20 74 61 72 67 65 74 73 20 69 6e 20 74 6b 20 64 targets in tk d
b770: 6f 20 6e 6f 74 20 75 73 65 20 73 74 75 62 73 0d o not use stubs.
b780: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 .!if !$(DOING_TC
b790: 4c 29 0d 0a 55 53 45 5f 53 54 55 42 53 5f 44 45 L)..USE_STUBS_DE
b7a0: 46 53 20 20 3d 20 2f 44 55 53 45 5f 54 43 4c 5f FS = /DUSE_TCL_
b7b0: 53 54 55 42 53 20 2f 44 55 53 45 5f 54 43 4c 4f STUBS /DUSE_TCLO
b7c0: 4f 5f 53 54 55 42 53 0d 0a 21 69 66 20 24 28 4e O_STUBS..!if $(N
b7d0: 45 45 44 5f 54 4b 29 0d 0a 55 53 45 5f 53 54 55 EED_TK)..USE_STU
b7e0: 42 53 5f 44 45 46 53 20 20 3d 20 24 28 55 53 45 BS_DEFS = $(USE
b7f0: 5f 53 54 55 42 53 5f 44 45 46 53 29 20 2f 44 55 _STUBS_DEFS) /DU
b800: 53 45 5f 54 4b 5f 53 54 55 42 53 0d 0a 21 65 6e SE_TK_STUBS..!en
b810: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e dif..!endif..!en
b820: 64 69 66 20 23 20 55 53 45 5f 53 54 55 42 53 0d dif # USE_STUBS.
b830: 0a 0d 0a 21 69 66 20 21 24 28 44 45 42 55 47 29 ...!if !$(DEBUG)
b840: 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ..OPTDEFINES.= $
b850: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4e (OPTDEFINES) /DN
b860: 44 45 42 55 47 0d 0a 21 69 66 20 24 28 4f 50 54 DEBUG..!if $(OPT
b870: 49 4d 49 5a 49 4e 47 29 0d 0a 4f 50 54 44 45 46 IMIZING)..OPTDEF
b880: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b890: 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 4f NES) /DTCL_CFG_O
b8a0: 50 54 49 4d 49 5a 45 44 0d 0a 21 65 6e 64 69 66 PTIMIZED..!endif
b8b0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28 ..!endif..!if $(
b8c0: 50 52 4f 46 49 4c 45 29 0d 0a 4f 50 54 44 45 46 PROFILE)..OPTDEF
b8d0: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b8e0: 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 50 NES) /DTCL_CFG_P
b8f0: 52 4f 46 49 4c 45 44 0d 0a 21 65 6e 64 69 66 0d ROFILED..!endif.
b900: 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 .!if "$(MACHINE)
b910: 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 " == "AMD64" ||
b920: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
b930: 22 41 52 4d 36 34 22 0d 0a 4f 50 54 44 45 46 49 "ARM64"..OPTDEFI
b940: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b950: 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 44 4f ES) /DTCL_CFG_DO
b960: 36 34 42 49 54 0d 0a 21 65 6e 64 69 66 0d 0a 21 64BIT..!endif..!
b970: 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 if $(VCVERSION)
b980: 3c 20 31 33 30 30 0d 0a 4f 50 54 44 45 46 49 4e < 1300..OPTDEFIN
b990: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b9a0: 53 29 20 2f 44 4e 4f 5f 53 54 52 54 4f 49 36 34 S) /DNO_STRTOI64
b9b0: 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 =1..!endif....!i
b9c0: 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 f $(TCL_MAJOR_VE
b9d0: 52 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 21 69 66 RSION) == 8..!if
b9e0: 20 22 24 28 5f 55 53 45 5f 36 34 42 49 54 5f 54 "$(_USE_64BIT_T
b9f0: 49 4d 45 5f 54 29 22 20 3d 3d 20 22 31 22 0d 0a IME_T)" == "1"..
ba00: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
ba10: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 5f 55 53 PTDEFINES) /D_US
ba20: 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 3d 31 E_64BIT_TIME_T=1
ba30: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 5f 41 ..!endif....# _A
ba40: 54 4c 5f 58 50 5f 54 41 52 47 45 54 49 4e 47 20 TL_XP_TARGETING
ba50: 2d 20 4e 65 77 65 72 20 53 44 4b 27 73 20 6e 65 - Newer SDK's ne
ba60: 65 64 20 74 68 69 73 20 74 6f 20 62 75 69 6c 64 ed this to build
ba70: 20 66 6f 72 20 58 50 0d 0a 43 4f 4d 50 49 4c 45 for XP..COMPILE
ba80: 52 46 4c 41 47 53 20 20 3d 20 2f 44 5f 41 54 4c RFLAGS = /D_ATL
ba90: 5f 58 50 5f 54 41 52 47 45 54 49 4e 47 0d 0a 21 _XP_TARGETING..!
baa0: 65 6e 64 69 66 0d 0a 21 69 66 20 22 24 28 54 43 endif..!if "$(TC
bab0: 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d L_BUILD_FOR)" ==
bac0: 20 22 38 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 "8"..OPTDEFINES
bad0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
bae0: 20 2f 44 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 /DTCL_MAJOR_VER
baf0: 53 49 4f 4e 3d 38 0d 0a 21 65 6e 64 69 66 0d 0a SION=8..!endif..
bb00: 0d 0a 23 20 4c 69 6b 65 20 74 68 65 20 54 45 41 ..# Like the TEA
bb10: 20 73 79 73 74 65 6d 20 6f 6e 6c 79 20 73 65 74 system only set
bb20: 20 74 68 69 73 20 6e 6f 6e 20 65 6d 70 74 79 20 this non empty
bb30: 66 6f 72 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 6e for non-Tk exten
bb40: 73 69 6f 6e 73 0d 0a 23 20 4e 6f 74 65 3a 20 73 sions..# Note: s
bb50: 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 75 ome extensions u
bb60: 73 65 20 50 41 43 4b 41 47 45 5f 4e 41 4d 45 20 se PACKAGE_NAME
bb70: 61 6e 64 20 6f 74 68 65 72 73 20 75 73 65 20 50 and others use P
bb80: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 0d 0a ACKAGE_TCLNAME..
bb90: 23 20 73 6f 20 77 65 20 70 61 73 73 20 62 6f 74 # so we pass bot
bba0: 68 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f h..!if !$(DOING_
bbb0: 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 TCL) && !$(DOING
bbc0: 5f 54 4b 29 0d 0a 50 4b 47 4e 41 4d 45 46 4c 41 _TK)..PKGNAMEFLA
bbd0: 47 53 20 3d 20 2f 44 50 41 43 4b 41 47 45 5f 4e GS = /DPACKAGE_N
bbe0: 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 43 AME="\"$(PRJ_PAC
bbf0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 KAGE_TCLNAME)\""
bc00: 20 5c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 \..
bc10: 20 20 20 2f 44 50 41 43 4b 41 47 45 5f 54 43 4c /DPACKAGE_TCL
bc20: 4e 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 NAME="\"$(PRJ_PA
bc30: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 CKAGE_TCLNAME)\"
bc40: 22 20 5c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 " \..
bc50: 20 20 20 20 2f 44 50 41 43 4b 41 47 45 5f 56 45 /DPACKAGE_VE
bc60: 52 53 49 4f 4e 3d 22 5c 22 24 28 44 4f 54 56 45 RSION="\"$(DOTVE
bc70: 52 53 49 4f 4e 29 5c 22 22 20 5c 0d 0a 20 20 20 RSION)\"" \..
bc80: 20 20 20 20 20 20 20 20 20 20 20 20 2f 44 4d 4f /DMO
bc90: 44 55 4c 45 5f 53 43 4f 50 45 3d 65 78 74 65 72 DULE_SCOPE=exter
bca0: 6e 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 63 n..!endif....# c
bcb0: 72 74 20 70 69 63 6b 73 20 74 68 65 20 43 20 72 rt picks the C r
bcc0: 75 6e 20 74 69 6d 65 20 62 61 73 65 64 20 6f 6e un time based on
bcd0: 20 73 65 6c 65 63 74 65 64 20 4f 50 54 53 0d 0a selected OPTS..
bce0: 21 69 66 20 24 28 4d 53 56 43 52 54 29 0d 0a 21 !if $(MSVCRT)..!
bcf0: 69 66 20 24 28 44 45 42 55 47 29 20 26 26 20 21 if $(DEBUG) && !
bd00: 24 28 55 4e 43 48 45 43 4b 45 44 29 0d 0a 63 72 $(UNCHECKED)..cr
bd10: 74 20 3d 20 2d 4d 44 64 0d 0a 21 65 6c 73 65 0d t = -MDd..!else.
bd20: 0a 63 72 74 20 3d 20 2d 4d 44 0d 0a 21 65 6e 64 .crt = -MD..!end
bd30: 69 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 24 if..!else..!if $
bd40: 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 4e (DEBUG) && !$(UN
bd50: 43 48 45 43 4b 45 44 29 0d 0a 63 72 74 20 3d 20 CHECKED)..crt =
bd60: 2d 4d 54 64 0d 0a 21 65 6c 73 65 0d 0a 63 72 74 -MTd..!else..crt
bd70: 20 3d 20 2d 4d 54 0d 0a 21 65 6e 64 69 66 0d 0a = -MT..!endif..
bd80: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 63 64 65 62 !endif....# cdeb
bd90: 75 67 20 69 6e 63 6c 75 64 65 73 20 63 6f 6d 70 ug includes comp
bda0: 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 66 6f 72 iler options for
bdb0: 20 64 65 62 75 67 67 69 6e 67 20 61 73 20 77 65 debugging as we
bdc0: 6c 6c 20 61 73 20 6f 70 74 69 6d 69 7a 61 74 69 ll as optimizati
bdd0: 6f 6e 2e 0d 0a 21 69 66 20 24 28 44 45 42 55 47 on...!if $(DEBUG
bde0: 29 0d 0a 0d 0a 23 20 49 6e 20 64 65 62 75 67 67 )....# In debugg
bdf0: 69 6e 67 20 6d 6f 64 65 2c 20 6f 70 74 69 6d 69 ing mode, optimi
be00: 7a 61 74 69 6f 6e 73 20 6e 65 65 64 20 74 6f 20 zations need to
be10: 62 65 20 64 69 73 61 62 6c 65 64 0d 0a 63 64 65 be disabled..cde
be20: 62 75 67 20 3d 20 2d 5a 69 20 2d 4f 64 20 24 28 bug = -Zi -Od $(
be30: 44 45 42 55 47 46 4c 41 47 53 29 0d 0a 0d 0a 21 DEBUGFLAGS)....!
be40: 65 6c 73 65 0d 0a 0d 0a 63 64 65 62 75 67 20 3d else....cdebug =
be50: 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 $(OPTIMIZATIONS
be60: 29 0d 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 )..!if $(SYMBOLS
be70: 29 0d 0a 63 64 65 62 75 67 20 3d 20 24 28 63 64 )..cdebug = $(cd
be80: 65 62 75 67 29 20 2d 5a 69 0d 0a 21 65 6e 64 69 ebug) -Zi..!endi
be90: 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 f....!endif # $(
bea0: 44 45 42 55 47 29 0d 0a 0d 0a 23 20 63 77 61 72 DEBUG)....# cwar
beb0: 6e 20 69 6e 63 6c 75 64 65 73 20 64 65 66 61 75 n includes defau
bec0: 6c 74 20 77 61 72 6e 69 6e 67 20 6c 65 76 65 6c lt warning level
bed0: 73 2c 20 61 6c 73 6f 20 43 34 30 39 30 20 28 62 s, also C4090 (b
bee0: 75 67 67 79 29 20 61 6e 64 20 43 34 31 34 36 20 uggy) and C4146
bef0: 69 73 20 75 73 65 6c 65 73 73 2e 0d 0a 63 77 61 is useless...cwa
bf00: 72 6e 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 rn = $(WARNINGS)
bf10: 20 2d 77 64 34 30 39 30 20 2d 77 64 34 31 34 36 -wd4090 -wd4146
bf20: 0d 0a 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 ....!if "$(MACHI
bf30: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 NE)" == "AMD64"
bf40: 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 || "$(MACHINE)"
bf50: 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 23 20 44 69 == "ARM64"..# Di
bf60: 73 61 62 6c 65 20 70 6f 69 6e 74 65 72 3c 2d 3e sable pointer<->
bf70: 69 6e 74 20 77 61 72 6e 69 6e 67 73 20 72 65 6c int warnings rel
bf80: 61 74 65 64 20 74 6f 20 63 61 73 74 20 62 65 74 ated to cast bet
bf90: 77 65 65 6e 20 64 69 66 66 65 72 65 6e 74 20 73 ween different s
bfa0: 69 7a 65 73 0d 0a 23 20 54 68 65 72 65 20 61 72 izes..# There ar
bfb0: 65 20 61 20 67 61 64 7a 69 6c 6c 69 6f 6e 20 6f e a gadzillion o
bfc0: 66 20 74 68 65 73 65 20 64 75 65 20 74 6f 20 75 f these due to u
bfd0: 73 65 20 6f 66 20 43 6c 69 65 6e 74 44 61 74 61 se of ClientData
bfe0: 20 61 6e 64 0d 0a 23 20 63 6c 75 74 74 65 72 20 and..# clutter
bff0: 75 70 20 63 6f 6d 70 69 6c 65 72 0d 0a 23 20 6f up compiler..# o
c000: 75 74 70 75 74 20 69 6e 63 72 65 61 73 69 6e 67 utput increasing
c010: 20 63 68 61 6e 63 65 20 6f 66 20 61 20 72 65 61 chance of a rea
c020: 6c 20 77 61 72 6e 69 6e 67 20 67 65 74 74 69 6e l warning gettin
c030: 67 20 6c 6f 73 74 2e 20 53 6f 20 64 69 73 61 62 g lost. So disab
c040: 6c 65 20 74 68 65 6d 2e 0d 0a 23 20 45 76 65 6e le them...# Even
c050: 74 75 61 6c 6c 79 20 73 6f 6d 65 20 64 61 79 2c tually some day,
c060: 20 54 63 6c 20 77 69 6c 6c 20 62 65 20 36 34 2d Tcl will be 64-
c070: 62 69 74 20 63 6c 65 61 6e 2e 0d 0a 63 77 61 72 bit clean...cwar
c080: 6e 20 3d 20 24 28 63 77 61 72 6e 29 20 2d 77 64 n = $(cwarn) -wd
c090: 34 33 31 31 20 2d 77 64 34 33 31 32 0d 0a 21 65 4311 -wd4312..!e
c0a0: 6e 64 69 66 0d 0a 0d 0a 23 23 23 20 43 6f 6d 6d ndif....### Comm
c0b0: 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 on compiler opti
c0c0: 6f 6e 73 20 74 68 61 74 20 61 72 65 20 61 72 63 ons that are arc
c0d0: 68 69 74 65 63 74 75 72 65 20 73 70 65 63 69 66 hitecture specif
c0e0: 69 63 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 ic..!if "$(MACHI
c0f0: 4e 45 29 22 20 3d 3d 20 22 41 52 4d 22 0d 0a 63 NE)" == "ARM"..c
c100: 61 72 63 68 20 3d 20 2f 44 5f 41 52 4d 5f 57 49 arch = /D_ARM_WI
c110: 4e 41 50 49 5f 50 41 52 54 49 54 49 4f 4e 5f 44 NAPI_PARTITION_D
c120: 45 53 4b 54 4f 50 5f 53 44 4b 5f 41 56 41 49 4c ESKTOP_SDK_AVAIL
c130: 41 42 4c 45 0d 0a 21 65 6c 73 65 0d 0a 63 61 72 ABLE..!else..car
c140: 63 68 20 3d 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ch =..!endif....
c150: 23 20 63 70 75 69 64 20 69 73 20 6f 6e 6c 79 20 # cpuid is only
c160: 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 69 6e 74 available on int
c170: 65 6c 20 6d 61 63 68 69 6e 65 73 0d 0a 21 69 66 el machines..!if
c180: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
c190: 20 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 "IX86" || "$(MA
c1a0: 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 CHINE)" == "AMD6
c1b0: 34 22 0d 0a 63 61 72 63 68 20 3d 20 24 28 63 61 4"..carch = $(ca
c1c0: 72 63 68 29 20 2f 44 48 41 56 45 5f 43 50 55 49 rch) /DHAVE_CPUI
c1d0: 44 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 D=1..!endif....!
c1e0: 69 66 20 24 28 44 45 42 55 47 29 0d 0a 23 20 54 if $(DEBUG)..# T
c1f0: 75 72 6e 20 77 61 72 6e 69 6e 67 73 20 69 6e 74 urn warnings int
c200: 6f 20 65 72 72 6f 72 73 0d 0a 63 77 61 72 6e 20 o errors..cwarn
c210: 3d 20 24 28 63 77 61 72 6e 29 20 2d 57 58 0d 0a = $(cwarn) -WX..
c220: 21 65 6e 64 69 66 0d 0a 0d 0a 49 4e 43 4c 55 44 !endif....INCLUD
c230: 45 53 20 3d 20 24 28 54 43 4c 5f 49 4e 43 4c 55 ES = $(TCL_INCLU
c240: 44 45 53 29 20 24 28 54 4b 5f 49 4e 43 4c 55 44 DES) $(TK_INCLUD
c250: 45 53 29 20 24 28 50 52 4a 5f 49 4e 43 4c 55 44 ES) $(PRJ_INCLUD
c260: 45 53 29 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e ES)..!if !$(DOIN
c270: 47 5f 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 G_TCL) && !$(DOI
c280: 4e 47 5f 54 4b 29 0d 0a 49 4e 43 4c 55 44 45 53 NG_TK)..INCLUDES
c290: 20 3d 20 24 28 49 4e 43 4c 55 44 45 53 29 20 2d = $(INCLUDES) -
c2a0: 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 I"$(GENERICDIR)"
c2b0: 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 20 -I"$(WIN_DIR)"
c2c0: 2d 49 22 24 28 43 4f 4d 50 41 54 44 49 52 29 22 -I"$(COMPATDIR)"
c2d0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 54 68 ..!endif....# Th
c2e0: 65 73 65 20 66 6c 61 67 73 20 61 72 65 20 64 65 ese flags are de
c2f0: 66 69 6e 65 64 20 72 6f 75 67 68 6c 79 20 69 6e fined roughly in
c300: 20 74 68 65 20 6f 72 64 65 72 20 6f 66 20 74 68 the order of th
c310: 65 20 70 72 65 2d 72 65 66 6f 72 6d 0d 0a 23 20 e pre-reform..#
c320: 72 75 6c 65 73 2e 76 63 2f 6d 61 6b 65 66 69 6c rules.vc/makefil
c330: 65 2e 76 63 20 74 6f 20 68 65 6c 70 20 76 69 73 e.vc to help vis
c340: 75 61 6c 6c 79 20 63 6f 6d 70 61 72 65 20 74 68 ually compare th
c350: 61 74 20 74 68 65 20 70 72 65 2d 20 61 6e 64 0d at the pre- and.
c360: 0a 23 20 70 6f 73 74 2d 72 65 66 6f 72 6d 20 62 .# post-reform b
c370: 75 69 6c 64 20 6c 6f 67 73 0d 0a 0d 0a 23 20 63 uild logs....# c
c380: 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 67 flags contains g
c390: 65 6e 65 72 69 63 20 66 6c 61 67 73 20 75 73 65 eneric flags use
c3a0: 64 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 70 d for building p
c3b0: 72 61 63 74 69 63 61 6c 6c 79 20 61 6c 6c 20 6f ractically all o
c3c0: 62 6a 65 63 74 20 66 69 6c 65 73 0d 0a 63 66 6c bject files..cfl
c3d0: 61 67 73 20 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d 63 ags = -nologo -c
c3e0: 20 24 28 43 4f 4d 50 49 4c 45 52 46 4c 41 47 53 $(COMPILERFLAGS
c3f0: 29 20 24 28 63 61 72 63 68 29 20 24 28 63 77 61 ) $(carch) $(cwa
c400: 72 6e 29 20 2d 46 70 24 28 54 4d 50 5f 44 49 52 rn) -Fp$(TMP_DIR
c410: 29 5e 5c 20 24 28 63 64 65 62 75 67 29 0d 0a 0d )^\ $(cdebug)...
c420: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
c430: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 26 _VERSION) == 8 &
c440: 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 & $(TCL_MINOR_VE
c450: 52 53 49 4f 4e 29 20 3c 20 37 0d 0a 63 66 6c 61 RSION) < 7..cfla
c460: 67 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 2d gs = $(cflags) -
c470: 44 54 63 6c 5f 53 69 7a 65 3d 69 6e 74 0d 0a 21 DTcl_Size=int..!
c480: 65 6e 64 69 66 0d 0a 0d 0a 23 20 61 70 70 63 66 endif....# appcf
c490: 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 lags contains $(
c4a0: 63 66 6c 61 67 73 29 20 61 6e 64 20 66 6c 61 67 cflags) and flag
c4b0: 73 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 74 s for building t
c4c0: 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 0d 0a he application..
c4d0: 23 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 28 # object files (
c4e0: 65 2e 67 2e 20 74 63 6c 73 68 2c 20 6f 72 20 77 e.g. tclsh, or w
c4f0: 69 73 68 29 20 70 6b 67 63 66 6c 61 67 73 20 63 ish) pkgcflags c
c500: 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 ontains $(cflags
c510: 29 20 70 6c 75 73 0d 0a 23 20 66 6c 61 67 73 20 ) plus..# flags
c520: 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e used for buildin
c530: 67 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74 20 g shared object
c540: 66 69 6c 65 73 20 54 68 65 20 74 77 6f 20 64 69 files The two di
c550: 66 66 65 72 20 69 6e 20 74 68 65 0d 0a 23 20 42 ffer in the..# B
c560: 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 20 UILD_$(PROJECT)
c570: 6d 61 63 72 6f 20 77 68 69 63 68 20 73 68 6f 75 macro which shou
c580: 6c 64 20 62 65 20 64 65 66 69 6e 65 64 20 6f 6e ld be defined on
c590: 6c 79 20 66 6f 72 20 74 68 65 20 73 68 61 72 65 ly for the share
c5a0: 64 0d 0a 23 20 6c 69 62 72 61 72 79 20 2a 69 6d d..# library *im
c5b0: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2a 20 61 6e plementation* an
c5c0: 64 20 6e 6f 74 20 66 6f 72 20 69 74 73 20 63 61 d not for its ca
c5d0: 6c 6c 65 72 20 69 6e 74 65 72 66 61 63 65 0d 0a ller interface..
c5e0: 0d 0a 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 ..appcflags_nost
c5f0: 75 62 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 ubs = $(cflags)
c600: 24 28 63 72 74 29 20 24 28 49 4e 43 4c 55 44 45 $(crt) $(INCLUDE
c610: 53 29 20 24 28 54 43 4c 5f 44 45 46 49 4e 45 53 S) $(TCL_DEFINES
c620: 29 20 24 28 50 52 4a 5f 44 45 46 49 4e 45 53 29 ) $(PRJ_DEFINES)
c630: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 0d 0a $(OPTDEFINES)..
c640: 61 70 70 63 66 6c 61 67 73 20 3d 20 24 28 61 70 appcflags = $(ap
c650: 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 29 pcflags_nostubs)
c660: 20 24 28 55 53 45 5f 53 54 55 42 53 5f 44 45 46 $(USE_STUBS_DEF
c670: 53 29 0d 0a 70 6b 67 63 66 6c 61 67 73 20 3d 20 S)..pkgcflags =
c680: 24 28 61 70 70 63 66 6c 61 67 73 29 20 24 28 50 $(appcflags) $(P
c690: 4b 47 4e 41 4d 45 46 4c 41 47 53 29 20 2f 44 42 KGNAMEFLAGS) /DB
c6a0: 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 0d UILD_$(PROJECT).
c6b0: 0a 70 6b 67 63 66 6c 61 67 73 5f 6e 6f 73 74 75 .pkgcflags_nostu
c6c0: 62 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 73 bs = $(appcflags
c6d0: 5f 6e 6f 73 74 75 62 73 29 20 24 28 50 4b 47 4e _nostubs) $(PKGN
c6e0: 41 4d 45 46 4c 41 47 53 29 20 2f 44 42 55 49 4c AMEFLAGS) /DBUIL
c6f0: 44 5f 24 28 50 52 4f 4a 45 43 54 29 0d 0a 0d 0a D_$(PROJECT)....
c700: 23 20 73 74 75 62 73 63 66 6c 61 67 73 20 63 6f # stubscflags co
c710: 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 29 ntains $(cflags)
c720: 20 70 6c 75 73 20 66 6c 61 67 73 20 75 73 65 64 plus flags used
c730: 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 61 20 for building a
c740: 73 74 75 62 73 0d 0a 23 20 6c 69 62 72 61 72 79 stubs..# library
c750: 20 66 6f 72 20 74 68 65 20 70 61 63 6b 61 67 65 for the package
c760: 2e 20 20 4e 6f 74 65 3a 20 2f 44 53 54 41 54 49 . Note: /DSTATI
c770: 43 5f 42 55 49 4c 44 20 69 73 20 64 65 66 69 6e C_BUILD is defin
c780: 65 64 20 69 6e 0d 0a 23 20 24 28 4f 50 54 44 45 ed in..# $(OPTDE
c790: 46 49 4e 45 53 29 20 6f 6e 6c 79 20 69 66 20 74 FINES) only if t
c7a0: 68 65 20 4f 50 54 53 20 63 6f 6e 66 69 67 75 72 he OPTS configur
c7b0: 61 74 69 6f 6e 20 69 6e 64 69 63 61 74 65 73 20 ation indicates
c7c0: 61 20 73 74 61 74 69 63 0d 0a 23 20 6c 69 62 72 a static..# libr
c7d0: 61 72 79 2e 20 48 6f 77 65 76 65 72 20 74 68 65 ary. However the
c7e0: 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 69 stubs library i
c7f0: 73 20 41 4c 57 41 59 53 20 73 74 61 74 69 63 20 s ALWAYS static
c800: 68 65 6e 63 65 20 69 6e 63 6c 75 64 65 64 0d 0a hence included..
c810: 23 20 68 65 72 65 20 69 72 72 65 73 70 65 63 74 # here irrespect
c820: 69 76 65 20 6f 66 20 74 68 65 20 4f 50 54 53 20 ive of the OPTS
c830: 73 65 74 74 69 6e 67 2e 0d 0a 23 0d 0a 23 20 54 setting...#..# T
c840: 42 44 20 2d 20 74 63 6c 76 66 73 20 68 61 73 20 BD - tclvfs has
c850: 61 20 63 6f 6d 6d 65 6e 74 20 74 68 61 74 20 73 a comment that s
c860: 74 75 62 73 20 6c 69 62 73 20 73 68 6f 75 6c 64 tubs libs should
c870: 20 6e 6f 74 20 62 65 20 63 6f 6d 70 69 6c 65 64 not be compiled
c880: 20 77 69 74 68 20 2d 47 4c 0d 0a 23 20 77 69 74 with -GL..# wit
c890: 68 6f 75 74 20 73 74 61 74 69 6e 67 20 77 68 79 hout stating why
c8a0: 2e 20 54 63 6c 20 69 74 73 65 6c 66 20 63 6f 6d . Tcl itself com
c8b0: 70 69 6c 65 64 20 73 74 75 62 73 20 6c 69 62 73 piled stubs libs
c8c0: 20 77 69 74 68 20 74 68 69 73 20 66 6c 61 67 2e with this flag.
c8d0: 0d 0a 23 20 73 6f 20 77 65 20 64 6f 20 6e 6f 74 ..# so we do not
c8e0: 20 72 65 6d 6f 76 65 20 69 74 20 66 72 6f 6d 20 remove it from
c8f0: 63 66 6c 61 67 73 2e 20 2d 47 4c 20 6d 61 79 20 cflags. -GL may
c900: 70 72 65 76 65 6e 74 20 65 78 74 65 6e 73 69 6f prevent extensio
c910: 6e 73 0d 0a 23 20 63 6f 6d 70 69 6c 65 64 20 77 ns..# compiled w
c920: 69 74 68 20 6f 6e 65 20 56 43 20 76 65 72 73 69 ith one VC versi
c930: 6f 6e 20 74 6f 20 66 61 69 6c 20 74 6f 20 6c 69 on to fail to li
c940: 6e 6b 20 61 67 61 69 6e 73 74 20 73 74 75 62 73 nk against stubs
c950: 20 6c 69 62 72 61 72 79 0d 0a 23 20 63 6f 6d 70 library..# comp
c960: 69 6c 65 64 20 77 69 74 68 20 61 6e 6f 74 68 65 iled with anothe
c970: 72 20 56 43 20 76 65 72 73 69 6f 6e 2e 20 43 68 r VC version. Ch
c980: 65 63 6b 20 66 6f 72 20 74 68 69 73 20 61 6e 64 eck for this and
c990: 20 66 69 78 20 61 63 63 6f 72 64 69 6e 67 6c 79 fix accordingly
c9a0: 2e 0d 0a 73 74 75 62 73 63 66 6c 61 67 73 20 3d ...stubscflags =
c9b0: 20 24 28 63 66 6c 61 67 73 29 20 24 28 50 4b 47 $(cflags) $(PKG
c9c0: 4e 41 4d 45 46 4c 41 47 53 29 20 24 28 50 52 4a NAMEFLAGS) $(PRJ
c9d0: 5f 44 45 46 49 4e 45 53 29 20 24 28 4f 50 54 44 _DEFINES) $(OPTD
c9e0: 45 46 49 4e 45 53 29 20 2f 5a 6c 20 2f 47 4c 2d EFINES) /Zl /GL-
c9f0: 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c 44 20 /DSTATIC_BUILD
ca00: 24 28 49 4e 43 4c 55 44 45 53 29 20 24 28 55 53 $(INCLUDES) $(US
ca10: 45 5f 53 54 55 42 53 5f 44 45 46 53 29 0d 0a 0d E_STUBS_DEFS)...
ca20: 0a 23 20 4c 69 6e 6b 20 66 6c 61 67 73 0d 0a 0d .# Link flags...
ca30: 0a 21 69 66 20 24 28 44 45 42 55 47 29 0d 0a 6c .!if $(DEBUG)..l
ca40: 64 65 62 75 67 09 3d 20 2d 64 65 62 75 67 20 2d debug.= -debug -
ca50: 64 65 62 75 67 74 79 70 65 3a 63 76 0d 0a 21 65 debugtype:cv..!e
ca60: 6c 73 65 0d 0a 6c 64 65 62 75 67 09 3d 20 2d 72 lse..ldebug.= -r
ca70: 65 6c 65 61 73 65 20 2d 6f 70 74 3a 72 65 66 20 elease -opt:ref
ca80: 2d 6f 70 74 3a 69 63 66 2c 33 0d 0a 21 69 66 20 -opt:icf,3..!if
ca90: 24 28 53 59 4d 42 4f 4c 53 29 0d 0a 6c 64 65 62 $(SYMBOLS)..ldeb
caa0: 75 67 09 3d 20 24 28 6c 64 65 62 75 67 29 20 2d ug.= $(ldebug) -
cab0: 64 65 62 75 67 20 2d 64 65 62 75 67 74 79 70 65 debug -debugtype
cac0: 3a 63 76 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e :cv..!endif..!en
cad0: 64 69 66 0d 0a 0d 0a 23 20 4e 6f 74 65 3a 20 50 dif....# Note: P
cae0: 72 6f 66 69 6c 69 6e 67 20 69 73 20 63 75 72 72 rofiling is curr
caf0: 65 6e 74 6c 79 20 6f 6e 6c 79 20 70 6f 73 73 69 ently only possi
cb00: 62 6c 65 20 77 69 74 68 20 74 68 65 20 56 69 73 ble with the Vis
cb10: 75 61 6c 20 53 74 75 64 69 6f 20 45 6e 74 65 72 ual Studio Enter
cb20: 70 72 69 73 65 0d 0a 21 69 66 20 24 28 50 52 4f prise..!if $(PRO
cb30: 46 49 4c 45 29 0d 0a 6c 64 65 62 75 67 3d 20 24 FILE)..ldebug= $
cb40: 28 6c 64 65 62 75 67 29 20 2d 70 72 6f 66 69 6c (ldebug) -profil
cb50: 65 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 e..!endif....###
cb60: 20 44 65 63 6c 61 72 61 74 69 6f 6e 73 20 63 6f Declarations co
cb70: 6d 6d 6f 6e 20 74 6f 20 61 6c 6c 20 6c 69 6e 6b mmon to all link
cb80: 65 72 20 76 65 72 73 69 6f 6e 73 0d 0a 6c 66 6c er versions..lfl
cb90: 61 67 73 09 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d ags.= -nologo -m
cba0: 61 63 68 69 6e 65 3a 24 28 4d 41 43 48 49 4e 45 achine:$(MACHINE
cbb0: 29 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 ) $(LINKERFLAGS)
cbc0: 20 24 28 6c 64 65 62 75 67 29 0d 0a 0d 0a 21 69 $(ldebug)....!i
cbd0: 66 20 24 28 4d 53 56 43 52 54 29 20 26 26 20 21 f $(MSVCRT) && !
cbe0: 28 24 28 44 45 42 55 47 29 20 26 26 20 21 24 28 ($(DEBUG) && !$(
cbf0: 55 4e 43 48 45 43 4b 45 44 29 29 20 26 26 20 24 UNCHECKED)) && $
cc00: 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 (VCVERSION) >= 1
cc10: 39 30 30 0d 0a 6c 66 6c 61 67 73 09 3d 20 24 28 900..lflags.= $(
cc20: 6c 66 6c 61 67 73 29 20 2d 6e 6f 64 65 66 61 75 lflags) -nodefau
cc30: 6c 74 6c 69 62 3a 6c 69 62 75 63 72 74 2e 6c 69 ltlib:libucrt.li
cc40: 62 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 64 6c 6c b..!endif....dll
cc50: 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 lflags = $(lflag
cc60: 73 29 20 2d 64 6c 6c 0d 0a 63 6f 6e 6c 66 6c 61 s) -dll..conlfla
cc70: 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d gs = $(lflags) -
cc80: 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f 6c subsystem:consol
cc90: 65 0d 0a 67 75 69 6c 66 6c 61 67 73 20 3d 20 24 e..guilflags = $
cca0: 28 6c 66 6c 61 67 73 29 20 2d 73 75 62 73 79 73 (lflags) -subsys
ccb0: 74 65 6d 3a 77 69 6e 64 6f 77 73 0d 0a 0d 0a 23 tem:windows....#
ccc0: 20 4c 69 62 72 61 72 69 65 73 20 74 68 61 74 20 Libraries that
ccd0: 61 72 65 20 72 65 71 75 69 72 65 64 20 66 6f 72 are required for
cce0: 20 65 76 65 72 79 20 69 6d 61 67 65 2e 0d 0a 23 every image...#
ccf0: 20 45 78 74 65 6e 73 69 6f 6e 73 20 73 68 6f 75 Extensions shou
cd00: 6c 64 20 64 65 66 69 6e 65 20 61 6e 79 20 61 64 ld define any ad
cd10: 64 69 74 69 6f 6e 61 6c 20 6c 69 62 72 61 72 69 ditional librari
cd20: 65 73 20 77 69 74 68 20 24 28 50 52 4a 5f 4c 49 es with $(PRJ_LI
cd30: 42 53 29 0d 0a 77 69 6e 6c 69 62 73 20 20 20 3d BS)..winlibs =
cd40: 20 6b 65 72 6e 65 6c 33 32 2e 6c 69 62 20 61 64 kernel32.lib ad
cd50: 76 61 70 69 33 32 2e 6c 69 62 0d 0a 0d 0a 21 69 vapi32.lib....!i
cd60: 66 20 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 77 69 f $(NEED_TK)..wi
cd70: 6e 6c 69 62 73 20 3d 20 24 28 77 69 6e 6c 69 62 nlibs = $(winlib
cd80: 73 29 20 67 64 69 33 32 2e 6c 69 62 20 75 73 65 s) gdi32.lib use
cd90: 72 33 32 2e 6c 69 62 20 75 78 74 68 65 6d 65 2e r32.lib uxtheme.
cda0: 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 lib..!endif....#
cdb0: 20 41 76 6f 69 64 20 27 75 6e 72 65 73 6f 6c 76 Avoid 'unresolv
cdc0: 65 64 20 65 78 74 65 72 6e 61 6c 20 73 79 6d 62 ed external symb
cdd0: 6f 6c 20 5f 5f 73 65 63 75 72 69 74 79 5f 63 6f ol __security_co
cde0: 6f 6b 69 65 27 20 65 72 72 6f 72 73 2e 0d 0a 23 okie' errors...#
cdf0: 20 63 2e 66 2e 20 68 74 74 70 3a 2f 2f 73 75 70 c.f. http://sup
ce00: 70 6f 72 74 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 port.microsoft.c
ce10: 6f 6d 2f 3f 69 64 3d 38 39 34 35 37 33 0d 0a 21 om/?id=894573..!
ce20: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
ce30: 3d 3d 20 22 41 4d 44 36 34 22 0d 0a 21 69 66 20 == "AMD64"..!if
ce40: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 $(VCVERSION) > 1
ce50: 33 39 39 20 26 26 20 24 28 56 43 56 45 52 53 49 399 && $(VCVERSI
ce60: 4f 4e 29 20 3c 20 31 35 30 30 0d 0a 77 69 6e 6c ON) < 1500..winl
ce70: 69 62 73 20 20 20 3d 20 24 28 77 69 6e 6c 69 62 ibs = $(winlib
ce80: 73 29 20 62 75 66 66 65 72 6f 76 65 72 66 6c 6f s) bufferoverflo
ce90: 77 55 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a wU.lib..!endif..
cea0: 21 65 6e 64 69 66 0d 0a 0d 0a 62 61 73 65 6c 69 !endif....baseli
ceb0: 62 73 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 bs = $(winlibs)
cec0: 24 28 50 52 4a 5f 4c 49 42 53 29 0d 0a 0d 0a 21 $(PRJ_LIBS)....!
ced0: 69 66 20 24 28 4d 53 56 43 52 54 29 20 26 26 20 if $(MSVCRT) &&
cee0: 21 28 24 28 44 45 42 55 47 29 20 26 26 20 21 24 !($(DEBUG) && !$
cef0: 28 55 4e 43 48 45 43 4b 45 44 29 29 20 26 26 20 (UNCHECKED)) &&
cf00: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 $(VCVERSION) >=
cf10: 31 39 30 30 0d 0a 62 61 73 65 6c 69 62 73 20 20 1900..baselibs
cf20: 20 3d 20 24 28 62 61 73 65 6c 69 62 73 29 20 75 = $(baselibs) u
cf30: 63 72 74 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d crt.lib..!endif.
cf40: 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
cf50: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cf60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cf70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cf80: 23 23 23 0d 0a 23 20 31 33 2e 20 44 65 66 69 6e ###..# 13. Defin
cf90: 65 20 73 74 61 6e 64 61 72 64 20 63 6f 6d 6d 61 e standard comma
cfa0: 6e 64 73 2c 20 63 6f 6d 6d 6f 6e 20 6d 61 6b 65 nds, common make
cfb0: 20 74 61 72 67 65 74 73 20 61 6e 64 20 69 6d 70 targets and imp
cfc0: 6c 69 63 69 74 20 72 75 6c 65 73 0d 0a 0d 0a 43 licit rules....C
cfd0: 43 50 4b 47 43 4d 44 20 3d 20 24 28 63 63 33 32 CPKGCMD = $(cc32
cfe0: 29 20 24 28 70 6b 67 63 66 6c 61 67 73 29 20 2d ) $(pkgcflags) -
cff0: 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0d 0a Fo$(TMP_DIR)^\..
d000: 43 43 41 50 50 43 4d 44 20 3d 20 24 28 63 63 33 CCAPPCMD = $(cc3
d010: 32 29 20 24 28 61 70 70 63 66 6c 61 67 73 29 20 2) $(appcflags)
d020: 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0d -Fo$(TMP_DIR)^\.
d030: 0a 43 43 53 54 55 42 53 43 4d 44 20 3d 20 24 28 .CCSTUBSCMD = $(
d040: 63 63 33 32 29 20 24 28 73 74 75 62 73 63 66 6c cc32) $(stubscfl
d050: 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 ags) -Fo$(TMP_DI
d060: 52 29 5e 5c 0d 0a 0d 0a 4c 49 42 43 4d 44 20 3d R)^\....LIBCMD =
d070: 20 24 28 6c 69 62 33 32 29 20 2d 6e 6f 6c 6f 67 $(lib32) -nolog
d080: 6f 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 o $(LINKERFLAGS)
d090: 20 2d 6f 75 74 3a 24 40 0d 0a 44 4c 4c 43 4d 44 -out:$@..DLLCMD
d0a0: 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 64 = $(link32) $(d
d0b0: 6c 6c 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 lllflags) -out:$
d0c0: 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 28 @ $(baselibs) $(
d0d0: 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 tcllibs) $(tklib
d0e0: 73 29 0d 0a 0d 0a 43 4f 4e 45 58 45 43 4d 44 20 s)....CONEXECMD
d0f0: 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 63 6f = $(link32) $(co
d100: 6e 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 nlflags) -out:$@
d110: 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 28 74 $(baselibs) $(t
d120: 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 73 cllibs) $(tklibs
d130: 29 0d 0a 47 55 49 45 58 45 43 4d 44 20 3d 20 24 )..GUIEXECMD = $
d140: 28 6c 69 6e 6b 33 32 29 20 24 28 67 75 69 6c 66 (link32) $(guilf
d150: 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 lags) -out:$@ $(
d160: 62 61 73 65 6c 69 62 73 29 20 24 28 74 63 6c 6c baselibs) $(tcll
d170: 69 62 73 29 20 24 28 74 6b 6c 69 62 73 29 0d 0a ibs) $(tklibs)..
d180: 52 45 53 43 4d 44 20 20 3d 20 24 28 72 63 33 32 RESCMD = $(rc32
d190: 29 20 2d 66 6f 20 24 40 20 2d 72 20 2d 69 20 22 ) -fo $@ -r -i "
d1a0: 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 20 2d $(GENERICDIR)" -
d1b0: 69 20 22 24 28 54 4d 50 5f 44 49 52 29 22 20 5c i "$(TMP_DIR)" \
d1c0: 0d 0a 09 20 20 20 20 24 28 54 43 4c 5f 49 4e 43 ... $(TCL_INC
d1d0: 4c 55 44 45 53 29 20 2f 44 53 54 41 54 49 43 5f LUDES) /DSTATIC_
d1e0: 42 55 49 4c 44 3d 24 28 53 54 41 54 49 43 5f 42 BUILD=$(STATIC_B
d1f0: 55 49 4c 44 29 20 5c 0d 0a 09 20 20 20 20 2f 44 UILD) \... /D
d200: 44 45 42 55 47 3d 24 28 44 45 42 55 47 29 20 2d DEBUG=$(DEBUG) -
d210: 64 20 55 4e 43 48 45 43 4b 45 44 3d 24 28 55 4e d UNCHECKED=$(UN
d220: 43 48 45 43 4b 45 44 29 20 5c 0d 0a 09 20 20 20 CHECKED) \...
d230: 20 2f 44 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 3d /DCOMMAVERSION=
d240: 24 28 52 43 43 4f 4d 4d 41 56 45 52 53 49 4f 4e $(RCCOMMAVERSION
d250: 29 20 5c 0d 0a 09 20 20 20 20 2f 44 44 4f 54 56 ) \... /DDOTV
d260: 45 52 53 49 4f 4e 3d 5c 22 24 28 44 4f 54 56 45 ERSION=\"$(DOTVE
d270: 52 53 49 4f 4e 29 5c 22 20 5c 0d 0a 09 20 20 20 RSION)\" \...
d280: 20 2f 44 56 45 52 53 49 4f 4e 3d 5c 22 24 28 56 /DVERSION=\"$(V
d290: 45 52 53 49 4f 4e 29 5c 22 20 5c 0d 0a 09 20 20 ERSION)\" \...
d2a0: 20 20 2f 44 53 55 46 58 3d 5c 22 24 28 53 55 46 /DSUFX=\"$(SUF
d2b0: 58 29 5c 22 20 5c 0d 0a 09 20 20 20 20 2f 44 50 X)\" \... /DP
d2c0: 52 4f 4a 45 43 54 3d 5c 22 24 28 50 52 4f 4a 45 ROJECT=\"$(PROJE
d2d0: 43 54 29 5c 22 20 5c 0d 0a 09 20 20 20 20 2f 44 CT)\" \... /D
d2e0: 50 52 4a 4c 49 42 4e 41 4d 45 3d 5c 22 24 28 50 PRJLIBNAME=\"$(P
d2f0: 52 4a 4c 49 42 4e 41 4d 45 29 5c 22 0d 0a 0d 0a RJLIBNAME)\"....
d300: 21 69 66 6e 64 65 66 20 44 45 46 41 55 4c 54 5f !ifndef DEFAULT_
d310: 42 55 49 4c 44 5f 54 41 52 47 45 54 0d 0a 44 45 BUILD_TARGET..DE
d320: 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 FAULT_BUILD_TARG
d330: 45 54 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 0d ET = $(PROJECT).
d340: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 64 65 66 61 75 .!endif....defau
d350: 6c 74 2d 74 61 72 67 65 74 3a 20 24 28 44 45 46 lt-target: $(DEF
d360: 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 AULT_BUILD_TARGE
d370: 54 29 0d 0a 0d 0a 21 69 66 20 24 28 4d 55 4c 54 T)....!if $(MULT
d380: 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c IPLATFORM_INSTAL
d390: 4c 29 0d 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 L)..default-pkgi
d3a0: 6e 64 65 78 3a 0d 0a 09 40 65 63 68 6f 20 69 66 ndex:...@echo if
d3b0: 20 7b 5b 70 61 63 6b 61 67 65 20 76 73 61 74 69 {[package vsati
d3c0: 73 66 69 65 73 20 5b 70 61 63 6b 61 67 65 20 70 sfies [package p
d3d0: 72 6f 76 69 64 65 20 54 63 6c 5d 20 39 2e 30 2d rovide Tcl] 9.0-
d3e0: 5d 7d 20 7b 20 3e 20 24 28 4f 55 54 5f 44 49 52 ]} { > $(OUT_DIR
d3f0: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a )\pkgIndex.tcl..
d400: 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 .@echo package i
d410: 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 fneeded $(PRJ_PA
d420: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 CKAGE_TCLNAME) $
d430: 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0d 0a (DOTVERSION) \..
d440: 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 . [list load
d450: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 [file join $$dir
d460: 20 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e $(PLATFORM_IDEN
d470: 54 49 46 59 29 20 24 28 50 52 4a 4c 49 42 4e 41 TIFY) $(PRJLIBNA
d480: 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f ME9)]] >> $(OUT_
d490: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 DIR)\pkgIndex.tc
d4a0: 6c 0d 0a 09 40 65 63 68 6f 20 7d 20 65 6c 73 65 l...@echo } else
d4b0: 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 { >> $(OUT_DIR)
d4c0: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 \pkgIndex.tcl...
d4d0: 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 66 @echo package if
d4e0: 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 43 needed $(PRJ_PAC
d4f0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 KAGE_TCLNAME) $(
d500: 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0d 0a 09 DOTVERSION) \...
d510: 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 5b [list load [
d520: 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 20 file join $$dir
d530: 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 $(PLATFORM_IDENT
d540: 49 46 59 29 20 24 28 50 52 4a 4c 49 42 4e 41 4d IFY) $(PRJLIBNAM
d550: 45 38 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 E8)]] >> $(OUT_D
d560: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d570: 0d 0a 09 40 65 63 68 6f 20 7d 20 3e 3e 20 24 28 ...@echo } >> $(
d580: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d590: 78 2e 74 63 6c 0d 0a 21 65 6c 73 65 0d 0a 64 65 x.tcl..!else..de
d5a0: 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a 0d fault-pkgindex:.
d5b0: 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 ..@echo if {[pac
d5c0: 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 73 20 kage vsatisfies
d5d0: 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65 [package provide
d5e0: 20 54 63 6c 5d 20 39 2e 30 2d 5d 7d 20 7b 20 3e Tcl] 9.0-]} { >
d5f0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
d600: 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f ndex.tcl...@echo
d610: 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 package ifneede
d620: 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f d $(PRJ_PACKAGE_
d630: 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 TCLNAME) $(DOTVE
d640: 52 53 49 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 5b RSION) \... [
d650: 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 list load [file
d660: 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a join $$dir $(PRJ
d670: 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 LIBNAME9)]] >> $
d680: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
d690: 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d ex.tcl...@echo }
d6a0: 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 else { >> $(OUT
d6b0: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
d6c0: 63 6c 0d 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 cl...@echo packa
d6d0: 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 ge ifneeded $(PR
d6e0: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
d6f0: 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 E) $(DOTVERSION)
d700: 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c \... [list l
d710: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 oad [file join $
d720: 24 64 69 72 20 24 28 50 52 4a 4c 49 42 4e 41 4d $dir $(PRJLIBNAM
d730: 45 38 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 E8)]] >> $(OUT_D
d740: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d750: 0d 0a 09 40 65 63 68 6f 20 7d 20 3e 3e 20 24 28 ...@echo } >> $(
d760: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d770: 78 2e 74 63 6c 0d 0a 21 65 6e 64 69 66 0d 0a 0d x.tcl..!endif...
d780: 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 .default-pkginde
d790: 78 2d 74 65 61 3a 0d 0a 09 40 69 66 20 65 78 69 x-tea:...@if exi
d7a0: 73 74 20 24 28 52 4f 4f 54 29 5c 70 6b 67 49 6e st $(ROOT)\pkgIn
d7b0: 64 65 78 2e 74 63 6c 2e 69 6e 20 6e 6d 61 6b 65 dex.tcl.in nmake
d7c0: 68 6c 70 20 2d 73 20 3c 3c 20 24 28 52 4f 4f 54 hlp -s << $(ROOT
d7d0: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 )\pkgIndex.tcl.i
d7e0: 6e 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 n > $(OUT_DIR)\p
d7f0: 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 40 50 41 kgIndex.tcl..@PA
d800: 43 4b 41 47 45 5f 56 45 52 53 49 4f 4e 40 20 20 CKAGE_VERSION@
d810: 20 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 0d $(DOTVERSION).
d820: 0a 40 50 41 43 4b 41 47 45 5f 4e 41 4d 45 40 20 .@PACKAGE_NAME@
d830: 20 20 20 20 20 20 24 28 50 52 4a 5f 50 41 43 4b $(PRJ_PACK
d840: 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0d 0a 40 50 AGE_TCLNAME)..@P
d850: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 40 20 ACKAGE_TCLNAME@
d860: 20 20 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 $(PRJ_PACKAGE
d870: 5f 54 43 4c 4e 41 4d 45 29 0d 0a 40 50 4b 47 5f _TCLNAME)..@PKG_
d880: 4c 49 42 5f 46 49 4c 45 40 20 20 20 20 20 20 20 LIB_FILE@
d890: 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 0d 0a 40 $(PRJLIBNAME)..@
d8a0: 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 38 40 20 20 PKG_LIB_FILE8@
d8b0: 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 $(PRJLIBNAME
d8c0: 38 29 0d 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 8)..@PKG_LIB_FIL
d8d0: 45 39 40 20 20 20 20 20 20 24 28 50 52 4a 4c 49 E9@ $(PRJLI
d8e0: 42 4e 41 4d 45 39 29 0d 0a 3c 3c 0d 0a 0d 0a 64 BNAME9)..<<....d
d8f0: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 3a 20 efault-install:
d900: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d910: 62 69 6e 61 72 69 65 73 20 64 65 66 61 75 6c 74 binaries default
d920: 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 -install-librari
d930: 65 73 0d 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c es..!if $(SYMBOL
d940: 53 29 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 S)..default-inst
d950: 61 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 all: default-ins
d960: 74 61 6c 6c 2d 70 64 62 73 0d 0a 21 65 6e 64 69 tall-pdbs..!endi
d970: 66 0d 0a 0d 0a 23 20 41 67 61 69 6e 20 74 6f 20 f....# Again to
d980: 64 65 61 6c 20 77 69 74 68 20 68 69 73 74 6f 72 deal with histor
d990: 69 63 61 6c 20 62 72 6f 6b 65 6e 6e 65 73 73 2c ical brokenness,
d9a0: 20 74 68 65 72 65 20 69 73 20 73 6f 6d 65 20 63 there is some c
d9b0: 6f 6e 66 75 73 69 6f 6e 0d 0a 23 20 69 6e 20 74 onfusion..# in t
d9c0: 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 6f 72 20 65 erminlogy. For e
d9d0: 78 74 65 6e 73 69 6f 6e 73 2c 20 74 68 65 20 22 xtensions, the "
d9e0: 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 install-binaries
d9f0: 22 20 77 61 73 20 75 73 65 64 20 74 6f 0d 0a 23 " was used to..#
da00: 20 6c 6f 63 61 74 65 20 74 61 72 67 65 74 20 64 locate target d
da10: 69 72 65 63 74 6f 72 79 20 66 6f 72 20 2a 62 69 irectory for *bi
da20: 6e 61 72 79 20 73 68 61 72 65 64 20 6c 69 62 72 nary shared libr
da30: 61 72 69 65 73 2a 20 61 6e 64 20 74 68 75 73 0d aries* and thus.
da40: 0a 23 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 .# the appropria
da50: 74 65 20 6d 61 63 72 6f 20 69 73 20 4c 49 42 5f te macro is LIB_
da60: 49 4e 53 54 41 4c 4c 5f 44 49 52 20 73 69 6e 63 INSTALL_DIR sinc
da70: 65 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 e BIN_INSTALL_DI
da80: 52 20 69 73 0d 0a 23 20 66 6f 72 20 65 78 65 63 R is..# for exec
da90: 75 74 61 62 6c 65 73 20 28 65 78 65 73 29 2e 20 utables (exes).
daa0: 4f 6e 20 74 68 65 20 6f 74 68 65 72 20 68 61 6e On the other han
dab0: 64 20 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d 6c d the "install-l
dac0: 69 62 72 61 72 69 65 73 22 0d 0a 23 20 74 61 72 ibraries"..# tar
dad0: 67 65 74 20 69 73 20 66 6f 72 20 2a 73 63 72 69 get is for *scri
dae0: 70 74 73 2a 20 61 6e 64 20 73 68 6f 75 6c 64 20 pts* and should
daf0: 68 61 76 65 20 62 65 65 6e 20 63 61 6c 6c 65 64 have been called
db00: 20 22 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 "install-script
db10: 73 22 2e 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 s"...default-ins
db20: 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 3a 20 24 tall-binaries: $
db30: 28 50 52 4a 4c 49 42 29 0d 0a 09 40 65 63 68 6f (PRJLIB)...@echo
db40: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 62 69 6e 61 Installing bina
db50: 72 69 65 73 20 74 6f 20 27 24 28 4c 49 42 5f 49 ries to '$(LIB_I
db60: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 NSTALL_DIR)'...@
db70: 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 if not exist "$(
db80: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 LIB_INSTALL_DIR)
db90: 22 20 6d 6b 64 69 72 20 22 24 28 4c 49 42 5f 49 " mkdir "$(LIB_I
dba0: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 NSTALL_DIR)"...@
dbb0: 24 28 43 50 59 29 20 24 28 50 52 4a 4c 49 42 29 $(CPY) $(PRJLIB)
dbc0: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f "$(LIB_INSTALL_
dbd0: 44 49 52 29 22 20 3e 4e 55 4c 0d 0a 0d 0a 23 20 DIR)" >NUL....#
dbe0: 41 6c 69 61 73 20 66 6f 72 20 64 65 66 61 75 6c Alias for defaul
dbf0: 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 t-install-script
dc00: 73 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 s..default-insta
dc10: 6c 6c 2d 6c 69 62 72 61 72 69 65 73 3a 20 64 65 ll-libraries: de
dc20: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 fault-install-sc
dc30: 72 69 70 74 73 0d 0a 0d 0a 64 65 66 61 75 6c 74 ripts....default
dc40: 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 -install-scripts
dc50: 3a 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 : $(OUT_DIR)\pkg
dc60: 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 Index.tcl...@ech
dc70: 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 6c 69 62 o Installing lib
dc80: 72 61 72 69 65 73 20 74 6f 20 27 24 28 53 43 52 raries to '$(SCR
dc90: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 IPT_INSTALL_DIR)
dca0: 27 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 '...@if exist $(
dcb0: 4c 49 42 44 49 52 29 20 24 28 43 50 59 29 20 24 LIBDIR) $(CPY) $
dcc0: 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 6c 20 22 (LIBDIR)\*.tcl "
dcd0: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
dce0: 5f 44 49 52 29 22 0d 0a 09 40 65 63 68 6f 20 49 _DIR)"...@echo I
dcf0: 6e 73 74 61 6c 6c 69 6e 67 20 70 61 63 6b 61 67 nstalling packag
dd00: 65 20 69 6e 64 65 78 20 69 6e 20 27 24 28 53 43 e index in '$(SC
dd10: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
dd20: 29 27 0d 0a 09 40 24 28 43 50 59 29 20 24 28 4f )'...@$(CPY) $(O
dd30: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
dd40: 2e 74 63 6c 20 24 28 53 43 52 49 50 54 5f 49 4e .tcl $(SCRIPT_IN
dd50: 53 54 41 4c 4c 5f 44 49 52 29 0d 0a 0d 0a 64 65 STALL_DIR)....de
dd60: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 74 fault-install-st
dd70: 75 62 73 3a 0d 0a 09 40 65 63 68 6f 20 49 6e 73 ubs:...@echo Ins
dd80: 74 61 6c 6c 69 6e 67 20 73 74 75 62 73 20 6c 69 talling stubs li
dd90: 62 72 61 72 79 20 74 6f 20 27 24 28 53 43 52 49 brary to '$(SCRI
dda0: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 PT_INSTALL_DIR)'
ddb0: 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 ...@if not exist
ddc0: 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 "$(SCRIPT_INSTA
ddd0: 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 LL_DIR)" mkdir "
dde0: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
ddf0: 5f 44 49 52 29 22 0d 0a 09 40 24 28 43 50 59 29 _DIR)"...@$(CPY)
de00: 20 24 28 50 52 4a 53 54 55 42 4c 49 42 29 20 22 $(PRJSTUBLIB) "
de10: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
de20: 5f 44 49 52 29 22 20 3e 4e 55 4c 0d 0a 0d 0a 64 _DIR)" >NUL....d
de30: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 efault-install-p
de40: 64 62 73 3a 0d 0a 09 40 65 63 68 6f 20 49 6e 73 dbs:...@echo Ins
de50: 74 61 6c 6c 69 6e 67 20 50 44 42 73 20 74 6f 20 talling PDBs to
de60: 27 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 '$(LIB_INSTALL_D
de70: 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 65 IR)'...@if not e
de80: 78 69 73 74 20 22 24 28 4c 49 42 5f 49 4e 53 54 xist "$(LIB_INST
de90: 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 ALL_DIR)" mkdir
dea0: 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 "$(LIB_INSTALL_D
deb0: 49 52 29 22 0d 0a 09 40 24 28 43 50 59 29 20 22 IR)"...@$(CPY) "
dec0: 24 28 4f 55 54 5f 44 49 52 29 5c 2a 2e 70 64 62 $(OUT_DIR)\*.pdb
ded0: 22 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c " "$(LIB_INSTALL
dee0: 5f 44 49 52 29 5c 22 0d 0a 0d 0a 23 20 22 65 6d _DIR)\"....# "em
def0: 61 63 73 20 66 6f 6e 74 2d 6c 6f 63 6b 20 68 69 acs font-lock hi
df00: 67 68 6c 69 67 68 74 69 6e 67 20 66 69 78 0d 0a ghlighting fix..
df10: 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c ..default-instal
df20: 6c 2d 64 6f 63 73 2d 68 74 6d 6c 3a 0d 0a 09 40 l-docs-html:...@
df30: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
df40: 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 69 documentation fi
df50: 6c 65 73 20 74 6f 20 27 24 28 44 4f 43 5f 49 4e les to '$(DOC_IN
df60: 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 69 STALL_DIR)'...@i
df70: 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 44 f not exist "$(D
df80: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 OC_INSTALL_DIR)"
df90: 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 5f 49 4e mkdir "$(DOC_IN
dfa0: 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 69 STALL_DIR)"...@i
dfb0: 66 20 65 78 69 73 74 20 24 28 44 4f 43 44 49 52 f exist $(DOCDIR
dfc0: 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22 24 28 ) for %f in ("$(
dfd0: 44 4f 43 44 49 52 29 5c 2a 2e 68 74 6d 6c 22 20 DOCDIR)\*.html"
dfe0: 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 63 73 73 "$(DOCDIR)\*.css
dff0: 22 20 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 70 " "$(DOCDIR)\*.p
e000: 6e 67 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 ng") do @$(COPY)
e010: 20 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 %f "$(DOC_INSTA
e020: 4c 4c 5f 44 49 52 29 22 0d 0a 0d 0a 64 65 66 61 LL_DIR)"....defa
e030: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 ult-install-docs
e040: 2d 6e 3a 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 -n:...@echo Inst
e050: 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 alling documenta
e060: 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 tion files to '$
e070: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
e080: 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 )'...@if not exi
e090: 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c st "$(DOC_INSTAL
e0a0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
e0b0: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
e0c0: 29 22 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 )"...@if exist $
e0d0: 28 44 4f 43 44 49 52 29 20 66 6f 72 20 25 66 20 (DOCDIR) for %f
e0e0: 69 6e 20 28 22 24 28 44 4f 43 44 49 52 29 5c 2a in ("$(DOCDIR)\*
e0f0: 2e 6e 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 .n") do @$(COPY)
e100: 20 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 %f "$(DOC_INSTA
e110: 4c 4c 5f 44 49 52 29 22 0d 0a 0d 0a 64 65 66 61 LL_DIR)"....defa
e120: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 65 6d 6f ult-install-demo
e130: 73 3a 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 s:...@echo Insta
e140: 6c 6c 69 6e 67 20 64 65 6d 6f 73 20 74 6f 20 27 lling demos to '
e150: 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 $(DEMO_INSTALL_D
e160: 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 65 IR)'...@if not e
e170: 78 69 73 74 20 22 24 28 44 45 4d 4f 5f 49 4e 53 xist "$(DEMO_INS
e180: 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 TALL_DIR)" mkdir
e190: 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c "$(DEMO_INSTALL
e1a0: 5f 44 49 52 29 22 0d 0a 09 40 69 66 20 65 78 69 _DIR)"...@if exi
e1b0: 73 74 20 24 28 44 45 4d 4f 44 49 52 29 20 24 28 st $(DEMODIR) $(
e1c0: 43 50 59 44 49 52 29 20 22 24 28 44 45 4d 4f 44 CPYDIR) "$(DEMOD
e1d0: 49 52 29 22 20 22 24 28 44 45 4d 4f 5f 49 4e 53 IR)" "$(DEMO_INS
e1e0: 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 0d 0a 64 65 TALL_DIR)"....de
e1f0: 66 61 75 6c 74 2d 63 6c 65 61 6e 3a 0d 0a 09 40 fault-clean:...@
e200: 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 echo Cleaning $(
e210: 54 4d 50 5f 44 49 52 29 5c 2a 20 2e 2e 2e 0d 0a TMP_DIR)\* .....
e220: 09 40 69 66 20 65 78 69 73 74 20 24 28 54 4d 50 .@if exist $(TMP
e230: 5f 44 49 52 29 5c 6e 75 6c 20 24 28 52 4d 44 49 _DIR)\nul $(RMDI
e240: 52 29 20 24 28 54 4d 50 5f 44 49 52 29 0d 0a 09 R) $(TMP_DIR)...
e250: 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 @echo Cleaning $
e260: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
e270: 6c 70 2e 6f 62 6a 2c 20 6e 6d 61 6b 65 68 6c 70 lp.obj, nmakehlp
e280: 2e 65 78 65 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 .exe ......@if e
e290: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
e2a0: 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 20 64 65 6c nmakehlp.obj del
e2b0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
e2c0: 65 68 6c 70 2e 6f 62 6a 0d 0a 09 40 69 66 20 65 ehlp.obj...@if e
e2d0: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
e2e0: 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 20 64 65 6c nmakehlp.exe del
e2f0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
e300: 65 68 6c 70 2e 65 78 65 0d 0a 09 40 69 66 20 65 ehlp.exe...@if e
e310: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
e320: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 20 64 65 6c nmakehlp.out del
e330: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
e340: 65 68 6c 70 2e 6f 75 74 0d 0a 09 40 65 63 68 6f ehlp.out...@echo
e350: 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f Cleaning $(WIN_
e360: 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 DIR)\nmhlp-out.t
e370: 78 74 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 69 xt ......@if exi
e380: 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d st $(WIN_DIR)\nm
e390: 68 6c 70 2d 6f 75 74 2e 74 78 74 20 64 65 6c 20 hlp-out.txt del
e3a0: 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 $(WIN_DIR)\nmhlp
e3b0: 2d 6f 75 74 2e 74 78 74 0d 0a 09 40 65 63 68 6f -out.txt...@echo
e3c0: 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f Cleaning $(WIN_
e3d0: 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 2e DIR)\_junk.pch .
e3e0: 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
e3f0: 28 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e (WIN_DIR)\_junk.
e400: 70 63 68 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 pch del $(WIN_DI
e410: 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 0d 0a 09 40 R)\_junk.pch...@
e420: 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 echo Cleaning $(
e430: 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 WIN_DIR)\vercl.x
e440: 2c 20 76 65 72 63 6c 2e 69 20 2e 2e 2e 0d 0a 09 , vercl.i ......
e450: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
e460: 44 49 52 29 5c 76 65 72 63 6c 2e 78 20 64 65 6c DIR)\vercl.x del
e470: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 $(WIN_DIR)\verc
e480: 6c 2e 78 0d 0a 09 40 69 66 20 65 78 69 73 74 20 l.x...@if exist
e490: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c $(WIN_DIR)\vercl
e4a0: 2e 69 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 .i del $(WIN_DIR
e4b0: 29 5c 76 65 72 63 6c 2e 69 0d 0a 09 40 65 63 68 )\vercl.i...@ech
e4c0: 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e o Cleaning $(WIN
e4d0: 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 _DIR)\versions.v
e4e0: 63 2c 20 76 65 72 73 69 6f 6e 2e 76 63 20 2e 2e c, version.vc ..
e4f0: 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 ....@if exist $(
e500: 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e WIN_DIR)\version
e510: 73 2e 76 63 20 64 65 6c 20 24 28 57 49 4e 5f 44 s.vc del $(WIN_D
e520: 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 0d IR)\versions.vc.
e530: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 ..@if exist $(WI
e540: 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 2e 76 N_DIR)\version.v
e550: 63 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 c del $(WIN_DIR)
e560: 5c 76 65 72 73 69 6f 6e 2e 76 63 0d 0a 0d 0a 64 \version.vc....d
e570: 65 66 61 75 6c 74 2d 68 6f 73 65 3a 20 64 65 66 efault-hose: def
e580: 61 75 6c 74 2d 63 6c 65 61 6e 0d 0a 09 40 65 63 ault-clean...@ec
e590: 68 6f 20 48 6f 73 69 6e 67 20 24 28 4f 55 54 5f ho Hosing $(OUT_
e5a0: 44 49 52 29 5c 2a 20 2e 2e 2e 0d 0a 09 40 69 66 DIR)\* ......@if
e5b0: 20 65 78 69 73 74 20 24 28 4f 55 54 5f 44 49 52 exist $(OUT_DIR
e5c0: 29 5c 6e 75 6c 20 24 28 52 4d 44 49 52 29 20 24 )\nul $(RMDIR) $
e5d0: 28 4f 55 54 5f 44 49 52 29 0d 0a 0d 0a 23 20 4f (OUT_DIR)....# O
e5e0: 6e 6c 79 20 66 6f 72 20 62 61 63 6b 77 61 72 64 nly for backward
e5f0: 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 0d 0a compatibility..
e600: 64 65 66 61 75 6c 74 2d 64 69 73 74 63 6c 65 61 default-distclea
e610: 6e 3a 20 64 65 66 61 75 6c 74 2d 68 6f 73 65 0d n: default-hose.
e620: 0a 0d 0a 64 65 66 61 75 6c 74 2d 73 65 74 75 70 ...default-setup
e630: 3a 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 :...@if not exis
e640: 74 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e 75 6c t $(OUT_DIR)\nul
e650: 20 6d 6b 64 69 72 20 24 28 4f 55 54 5f 44 49 52 mkdir $(OUT_DIR
e660: 29 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 )...@if not exis
e670: 74 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c t $(TMP_DIR)\nul
e680: 20 6d 6b 64 69 72 20 24 28 54 4d 50 5f 44 49 52 mkdir $(TMP_DIR
e690: 29 0d 0a 0d 0a 21 69 66 20 22 24 28 54 45 53 54 )....!if "$(TEST
e6a0: 50 41 54 29 22 20 21 3d 20 22 22 0d 0a 54 45 53 PAT)" != ""..TES
e6b0: 54 46 4c 41 47 53 20 3d 20 24 28 54 45 53 54 46 TFLAGS = $(TESTF
e6c0: 4c 41 47 53 29 20 2d 66 69 6c 65 20 24 28 54 45 LAGS) -file $(TE
e6d0: 53 54 50 41 54 29 0d 0a 21 65 6e 64 69 66 0d 0a STPAT)..!endif..
e6e0: 0d 0a 64 65 66 61 75 6c 74 2d 74 65 73 74 3a 20 ..default-test:
e6f0: 64 65 66 61 75 6c 74 2d 73 65 74 75 70 20 24 28 default-setup $(
e700: 50 52 4f 4a 45 43 54 29 0d 0a 09 40 73 65 74 20 PROJECT)...@set
e710: 54 43 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 54 TCLLIBPATH=$(OUT
e720: 5f 44 49 52 3a 5c 3d 2f 29 0d 0a 09 40 69 66 20 _DIR:\=/)...@if
e730: 65 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 exist $(LIBDIR)
e740: 66 6f 72 20 25 66 20 69 6e 20 28 22 24 28 4c 49 for %f in ("$(LI
e750: 42 44 49 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f BDIR)\*.tcl") do
e760: 20 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 28 @$(COPY) %f "$(
e770: 4f 55 54 5f 44 49 52 29 22 0d 0a 09 63 64 20 22 OUT_DIR)"...cd "
e780: 24 28 54 45 53 54 44 49 52 29 22 20 26 26 20 24 $(TESTDIR)" && $
e790: 28 44 45 42 55 47 47 45 52 29 20 24 28 54 43 4c (DEBUGGER) $(TCL
e7a0: 53 48 29 20 61 6c 6c 2e 74 63 6c 20 24 28 54 45 SH) all.tcl $(TE
e7b0: 53 54 46 4c 41 47 53 29 0d 0a 0d 0a 64 65 66 61 STFLAGS)....defa
e7c0: 75 6c 74 2d 73 68 65 6c 6c 3a 20 64 65 66 61 75 ult-shell: defau
e7d0: 6c 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 lt-setup $(PROJE
e7e0: 43 54 29 0d 0a 09 40 73 65 74 20 54 43 4c 4c 49 CT)...@set TCLLI
e7f0: 42 50 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a BPATH=$(OUT_DIR:
e800: 5c 3d 2f 29 0d 0a 09 40 69 66 20 65 78 69 73 74 \=/)...@if exist
e810: 20 24 28 4c 49 42 44 49 52 29 20 66 6f 72 20 25 $(LIBDIR) for %
e820: 66 20 69 6e 20 28 22 24 28 4c 49 42 44 49 52 29 f in ("$(LIBDIR)
e830: 5c 2a 2e 74 63 6c 22 29 20 64 6f 20 40 24 28 43 \*.tcl") do @$(C
e840: 4f 50 59 29 20 25 66 20 22 24 28 4f 55 54 5f 44 OPY) %f "$(OUT_D
e850: 49 52 29 22 0d 0a 09 24 28 44 45 42 55 47 47 45 IR)"...$(DEBUGGE
e860: 52 29 20 24 28 54 43 4c 53 48 29 0d 0a 0d 0a 23 R) $(TCLSH)....#
e870: 20 47 65 6e 65 72 61 74 69 6f 6e 20 6f 66 20 57 Generation of W
e880: 69 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 20 72 indows version r
e890: 65 73 6f 75 72 63 65 0d 0a 21 69 66 64 65 66 20 esource..!ifdef
e8a0: 52 43 46 49 4c 45 0d 0a 0d 0a 23 20 4e 6f 74 65 RCFILE....# Note
e8b0: 3a 20 64 6f 6e 27 74 20 75 73 65 20 24 2a 2a 20 : don't use $**
e8c0: 69 6e 20 62 65 6c 6f 77 20 72 75 6c 65 20 62 65 in below rule be
e8d0: 63 61 75 73 65 20 74 68 65 72 65 20 6d 61 79 20 cause there may
e8e0: 62 65 20 6f 74 68 65 72 20 64 65 70 65 6e 64 65 be other depende
e8f0: 6e 63 69 65 73 0d 0a 23 20 61 6e 64 20 6f 6e 6c ncies..# and onl
e900: 79 20 74 68 65 20 22 6d 61 69 6e 22 20 72 63 20 y the "main" rc
e910: 6d 75 73 74 20 62 65 20 70 61 73 73 65 64 20 74 must be passed t
e920: 6f 20 74 68 65 20 72 65 73 6f 75 72 63 65 20 63 o the resource c
e930: 6f 6d 70 69 6c 65 72 0d 0a 24 28 54 4d 50 5f 44 ompiler..$(TMP_D
e940: 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 IR)\$(PROJECT).r
e950: 65 73 3a 20 24 28 52 43 44 49 52 29 5c 24 28 50 es: $(RCDIR)\$(P
e960: 52 4f 4a 45 43 54 29 2e 72 63 0d 0a 09 24 28 52 ROJECT).rc...$(R
e970: 45 53 43 4d 44 29 20 24 28 52 43 44 49 52 29 5c ESCMD) $(RCDIR)\
e980: 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0d 0a 0d $(PROJECT).rc...
e990: 0a 21 65 6c 73 65 0d 0a 0d 0a 23 20 49 66 20 70 .!else....# If p
e9a0: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 arent makefile h
e9b0: 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 61 as not defined a
e9c0: 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 6e 69 resource defini
e9d0: 74 69 6f 6e 20 66 69 6c 65 2c 0d 0a 23 20 77 65 tion file,..# we
e9e0: 20 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f will generate o
e9f0: 6e 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 64 ne from standard
ea00: 20 74 65 6d 70 6c 61 74 65 2e 0d 0a 24 28 54 4d template...$(TM
ea10: 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 P_DIR)\$(PROJECT
ea20: 29 2e 72 65 73 3a 20 24 28 54 4d 50 5f 44 49 52 ).res: $(TMP_DIR
ea30: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0d )\$(PROJECT).rc.
ea40: 0a 0d 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 ...$(TMP_DIR)\$(
ea50: 50 52 4f 4a 45 43 54 29 2e 72 63 3a 0d 0a 09 40 PROJECT).rc:...@
ea60: 24 28 43 4f 50 59 29 20 3c 3c 20 24 28 54 4d 50 $(COPY) << $(TMP
ea70: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
ea80: 2e 72 63 0d 0a 23 69 6e 63 6c 75 64 65 20 3c 77 .rc..#include <w
ea90: 69 6e 76 65 72 2e 68 3e 0d 0a 0d 0a 56 53 5f 56 inver.h>....VS_V
eaa0: 45 52 53 49 4f 4e 5f 49 4e 46 4f 20 56 45 52 53 ERSION_INFO VERS
eab0: 49 4f 4e 49 4e 46 4f 0d 0a 20 46 49 4c 45 56 45 IONINFO.. FILEVE
eac0: 52 53 49 4f 4e 09 43 4f 4d 4d 41 56 45 52 53 49 RSION.COMMAVERSI
ead0: 4f 4e 0d 0a 20 50 52 4f 44 55 43 54 56 45 52 53 ON.. PRODUCTVERS
eae0: 49 4f 4e 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e ION.COMMAVERSION
eaf0: 0d 0a 20 46 49 4c 45 46 4c 41 47 53 4d 41 53 4b .. FILEFLAGSMASK
eb00: 09 30 78 33 66 4c 0d 0a 23 69 66 64 65 66 20 44 .0x3fL..#ifdef D
eb10: 45 42 55 47 0d 0a 20 46 49 4c 45 46 4c 41 47 53 EBUG.. FILEFLAGS
eb20: 09 56 53 5f 46 46 5f 44 45 42 55 47 0d 0a 23 65 .VS_FF_DEBUG..#e
eb30: 6c 73 65 0d 0a 20 46 49 4c 45 46 4c 41 47 53 09 lse.. FILEFLAGS.
eb40: 30 78 30 4c 0d 0a 23 65 6e 64 69 66 0d 0a 20 46 0x0L..#endif.. F
eb50: 49 4c 45 4f 53 09 09 56 4f 53 5f 4e 54 5f 57 49 ILEOS..VOS_NT_WI
eb60: 4e 44 4f 57 53 33 32 0d 0a 20 46 49 4c 45 54 59 NDOWS32.. FILETY
eb70: 50 45 09 56 46 54 5f 44 4c 4c 0d 0a 20 46 49 4c PE.VFT_DLL.. FIL
eb80: 45 53 55 42 54 59 50 45 09 30 78 30 4c 0d 0a 42 ESUBTYPE.0x0L..B
eb90: 45 47 49 4e 0d 0a 20 20 20 20 42 4c 4f 43 4b 20 EGIN.. BLOCK
eba0: 22 53 74 72 69 6e 67 46 69 6c 65 49 6e 66 6f 22 "StringFileInfo"
ebb0: 0d 0a 20 20 20 20 42 45 47 49 4e 0d 0a 20 20 20 .. BEGIN..
ebc0: 20 20 20 20 20 42 4c 4f 43 4b 20 22 30 34 30 39 BLOCK "0409
ebd0: 30 34 62 30 22 0d 0a 20 20 20 20 20 20 20 20 42 04b0".. B
ebe0: 45 47 49 4e 0d 0a 20 20 20 20 20 20 20 20 20 20 EGIN..
ebf0: 20 20 56 41 4c 55 45 20 22 46 69 6c 65 44 65 73 VALUE "FileDes
ec00: 63 72 69 70 74 69 6f 6e 22 2c 20 20 22 54 63 6c cription", "Tcl
ec10: 20 65 78 74 65 6e 73 69 6f 6e 20 22 20 50 52 4f extension " PRO
ec20: 4a 45 43 54 0d 0a 20 20 20 20 20 20 20 20 20 20 JECT..
ec30: 20 20 56 41 4c 55 45 20 22 4f 72 69 67 69 6e 61 VALUE "Origina
ec40: 6c 46 69 6c 65 6e 61 6d 65 22 2c 20 50 52 4a 4c lFilename", PRJL
ec50: 49 42 4e 41 4d 45 0d 0a 20 20 20 20 20 20 20 20 IBNAME..
ec60: 20 20 20 20 56 41 4c 55 45 20 22 46 69 6c 65 56 VALUE "FileV
ec70: 65 72 73 69 6f 6e 22 2c 20 20 20 20 20 20 44 4f ersion", DO
ec80: 54 56 45 52 53 49 4f 4e 0d 0a 20 20 20 20 20 20 TVERSION..
ec90: 20 20 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f VALUE "Pro
eca0: 64 75 63 74 4e 61 6d 65 22 2c 20 20 20 20 20 20 ductName",
ecb0: 22 50 61 63 6b 61 67 65 20 22 20 50 52 4f 4a 45 "Package " PROJE
ecc0: 43 54 20 22 20 66 6f 72 20 54 63 6c 22 0d 0a 20 CT " for Tcl"..
ecd0: 20 20 20 20 20 20 20 20 20 20 20 56 41 4c 55 45 VALUE
ece0: 20 22 50 72 6f 64 75 63 74 56 65 72 73 69 6f 6e "ProductVersion
ecf0: 22 2c 20 20 20 44 4f 54 56 45 52 53 49 4f 4e 0d ", DOTVERSION.
ed00: 0a 20 20 20 20 20 20 20 20 45 4e 44 0d 0a 20 20 . END..
ed10: 20 20 45 4e 44 0d 0a 20 20 20 20 42 4c 4f 43 4b END.. BLOCK
ed20: 20 22 56 61 72 46 69 6c 65 49 6e 66 6f 22 0d 0a "VarFileInfo"..
ed30: 20 20 20 20 42 45 47 49 4e 0d 0a 20 20 20 20 20 BEGIN..
ed40: 20 20 20 56 41 4c 55 45 20 22 54 72 61 6e 73 6c VALUE "Transl
ed50: 61 74 69 6f 6e 22 2c 20 30 78 34 30 39 2c 20 31 ation", 0x409, 1
ed60: 32 30 30 0d 0a 20 20 20 20 45 4e 44 0d 0a 45 4e 200.. END..EN
ed70: 44 0d 0a 0d 0a 3c 3c 0d 0a 0d 0a 21 65 6e 64 69 D....<<....!endi
ed80: 66 20 23 20 69 66 64 65 66 20 52 43 46 49 4c 45 f # ifdef RCFILE
ed90: 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 44 49 53 41 ....!ifndef DISA
eda0: 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c BLE_IMPLICIT_RUL
edb0: 45 53 0d 0a 44 49 53 41 42 4c 45 5f 49 4d 50 4c ES..DISABLE_IMPL
edc0: 49 43 49 54 5f 52 55 4c 45 53 20 3d 20 30 0d 0a ICIT_RULES = 0..
edd0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 21 24 !endif....!if !$
ede0: 28 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 (DISABLE_IMPLICI
edf0: 54 5f 52 55 4c 45 53 29 0d 0a 23 20 49 6d 70 6c T_RULES)..# Impl
ee00: 69 63 69 74 20 72 75 6c 65 20 64 65 66 69 6e 69 icit rule defini
ee10: 74 69 6f 6e 73 20 2d 20 6f 6e 6c 79 20 66 6f 72 tions - only for
ee20: 20 62 75 69 6c 64 69 6e 67 20 6c 69 62 72 61 72 building librar
ee30: 79 20 6f 62 6a 65 63 74 73 2e 20 46 6f 72 20 73 y objects. For s
ee40: 74 75 62 73 20 61 6e 64 0d 0a 23 20 6d 61 69 6e tubs and..# main
ee50: 20 61 70 70 6c 69 63 61 74 69 6f 6e 2c 20 74 68 application, th
ee60: 65 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f 75 6c e makefile shoul
ee70: 64 20 64 65 66 69 6e 65 20 65 78 70 6c 69 63 69 d define explici
ee80: 74 20 72 75 6c 65 73 2e 0d 0a 0d 0a 7b 24 28 52 t rules.....{$(R
ee90: 4f 4f 54 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 OOT)}.c{$(TMP_DI
eea0: 52 29 7d 2e 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 R)}.obj::...$(CC
eeb0: 50 4b 47 43 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d PKGCMD) @<<..$<.
eec0: 0a 3c 3c 0d 0a 0d 0a 7b 24 28 57 49 4e 5f 44 49 .<<....{$(WIN_DI
eed0: 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 R)}.c{$(TMP_DIR)
eee0: 7d 2e 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b }.obj::...$(CCPK
eef0: 47 43 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c GCMD) @<<..$<..<
ef00: 3c 0d 0a 0d 0a 7b 24 28 47 45 4e 45 52 49 43 44 <....{$(GENERICD
ef10: 49 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 IR)}.c{$(TMP_DIR
ef20: 29 7d 2e 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 )}.obj::...$(CCP
ef30: 4b 47 43 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a KGCMD) @<<..$<..
ef40: 3c 3c 0d 0a 0d 0a 7b 24 28 43 4f 4d 50 41 54 44 <<....{$(COMPATD
ef50: 49 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 IR)}.c{$(TMP_DIR
ef60: 29 7d 2e 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 )}.obj::...$(CCP
ef70: 4b 47 43 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a KGCMD) @<<..$<..
ef80: 3c 3c 0d 0a 0d 0a 7b 24 28 52 43 44 49 52 29 7d <<....{$(RCDIR)}
ef90: 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e .rc{$(TMP_DIR)}.
efa0: 72 65 73 3a 0d 0a 09 24 28 52 45 53 43 4d 44 29 res:...$(RESCMD)
efb0: 20 24 3c 0d 0a 0d 0a 7b 24 28 57 49 4e 5f 44 49 $<....{$(WIN_DI
efc0: 52 29 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 R)}.rc{$(TMP_DIR
efd0: 29 7d 2e 72 65 73 3a 0d 0a 09 24 28 52 45 53 43 )}.res:...$(RESC
efe0: 4d 44 29 20 24 3c 0d 0a 0d 0a 7b 24 28 54 4d 50 MD) $<....{$(TMP
eff0: 5f 44 49 52 29 7d 2e 72 63 7b 24 28 54 4d 50 5f _DIR)}.rc{$(TMP_
f000: 44 49 52 29 7d 2e 72 65 73 3a 0d 0a 09 24 28 52 DIR)}.res:...$(R
f010: 45 53 43 4d 44 29 20 24 3c 0d 0a 0d 0a 2e 53 55 ESCMD) $<.....SU
f020: 46 46 49 58 45 53 3a 0d 0a 2e 53 55 46 46 49 58 FFIXES:...SUFFIX
f030: 45 53 3a 2e 63 20 2e 72 63 0d 0a 0d 0a 21 65 6e ES:.c .rc....!en
f040: 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 dif....#########
f050: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f060: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f070: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f080: 23 23 23 23 23 23 23 0d 0a 23 20 31 34 2e 20 53 #######..# 14. S
f090: 61 6e 69 74 79 20 63 68 65 63 6b 20 73 65 6c 65 anity check sele
f0a0: 63 74 65 64 20 6f 70 74 69 6f 6e 73 20 61 67 61 cted options aga
f0b0: 69 6e 73 74 20 54 63 6c 20 62 75 69 6c 64 20 6f inst Tcl build o
f0c0: 70 74 69 6f 6e 73 0d 0a 23 20 57 68 65 6e 20 62 ptions..# When b
f0d0: 75 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e uilding an exten
f0e0: 73 69 6f 6e 2c 20 63 65 72 74 61 69 6e 20 63 6f sion, certain co
f0f0: 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 nfiguration opti
f100: 6f 6e 73 20 73 68 6f 75 6c 64 0d 0a 23 20 6d 61 ons should..# ma
f110: 74 63 68 20 74 68 65 20 6f 6e 65 73 20 75 73 65 tch the ones use
f120: 64 20 77 68 65 6e 20 54 63 6c 20 77 61 73 20 62 d when Tcl was b
f130: 75 69 6c 74 2e 20 48 65 72 65 20 77 65 20 63 68 uilt. Here we ch
f140: 65 63 6b 20 61 6e 64 0d 0a 23 20 77 61 72 6e 20 eck and..# warn
f150: 6f 6e 20 61 20 6d 69 73 6d 61 74 63 68 2e 0d 0a on a mismatch...
f160: 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c !if !$(DOING_TCL
f170: 29 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e )....!if $(TCLIN
f180: 53 54 41 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e STALL) # Buildin
f190: 67 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 g against an ins
f1a0: 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 21 69 66 20 talled Tcl..!if
f1b0: 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 exist("$(_TCLDIR
f1c0: 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e )\lib\nmake\tcl.
f1d0: 6e 6d 61 6b 65 22 29 0d 0a 54 43 4c 4e 4d 41 4b nmake")..TCLNMAK
f1e0: 45 43 4f 4e 46 49 47 20 3d 20 22 24 28 5f 54 43 ECONFIG = "$(_TC
f1f0: 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c LDIR)\lib\nmake\
f200: 74 63 6c 2e 6e 6d 61 6b 65 22 0d 0a 21 65 6e 64 tcl.nmake"..!end
f210: 69 66 0d 0a 21 65 6c 73 65 20 23 20 21 24 28 54 if..!else # !$(T
f220: 43 4c 49 4e 53 54 41 4c 4c 29 20 2d 20 62 75 69 CLINSTALL) - bui
f230: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 lding against Tc
f240: 6c 20 73 6f 75 72 63 65 0d 0a 21 69 66 20 65 78 l source..!if ex
f250: 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c ist("$(_TCLDIR)\
f260: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
f270: 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 0d 0a P)\tcl.nmake")..
f280: 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 09 3d TCLNMAKECONFIG.=
f290: 20 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e "$(_TCLDIR)\win
f2a0: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
f2b0: 74 63 6c 2e 6e 6d 61 6b 65 22 0d 0a 21 65 6e 64 tcl.nmake"..!end
f2c0: 69 66 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c if..!endif # TCL
f2d0: 49 4e 53 54 41 4c 4c 0d 0a 0d 0a 21 69 66 20 24 INSTALL....!if $
f2e0: 28 43 4f 4e 46 49 47 5f 43 48 45 43 4b 29 0d 0a (CONFIG_CHECK)..
f2f0: 21 69 66 64 65 66 20 54 43 4c 4e 4d 41 4b 45 43 !ifdef TCLNMAKEC
f300: 4f 4e 46 49 47 0d 0a 21 69 6e 63 6c 75 64 65 20 ONFIG..!include
f310: 24 28 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 $(TCLNMAKECONFIG
f320: 29 0d 0a 0d 0a 21 69 66 20 64 65 66 69 6e 65 64 )....!if defined
f330: 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 20 26 (CORE_MACHINE) &
f340: 26 20 22 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e & "$(CORE_MACHIN
f350: 45 29 22 20 21 3d 20 22 24 28 4d 41 43 48 49 4e E)" != "$(MACHIN
f360: 45 29 22 0d 0a 21 65 72 72 6f 72 20 45 52 52 4f E)"..!error ERRO
f370: 52 3a 20 42 75 69 6c 64 20 74 61 72 67 65 74 20 R: Build target
f380: 28 24 28 4d 41 43 48 49 4e 45 29 29 20 64 6f 65 ($(MACHINE)) doe
f390: 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 68 65 20 s not match the
f3a0: 54 63 6c 20 6c 69 62 72 61 72 79 20 61 72 63 68 Tcl library arch
f3b0: 69 74 65 63 74 75 72 65 20 28 24 28 43 4f 52 45 itecture ($(CORE
f3c0: 5f 4d 41 43 48 49 4e 45 29 29 2e 0d 0a 21 65 6e _MACHINE))...!en
f3d0: 64 69 66 0d 0a 21 69 66 20 24 28 54 43 4c 5f 56 dif..!if $(TCL_V
f3e0: 45 52 53 49 4f 4e 29 20 3c 20 38 37 20 26 26 20 ERSION) < 87 &&
f3f0: 64 65 66 69 6e 65 64 28 43 4f 52 45 5f 55 53 45 defined(CORE_USE
f400: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 20 26 _THREAD_ALLOC) &
f410: 26 20 24 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 & $(CORE_USE_THR
f420: 45 41 44 5f 41 4c 4c 4f 43 29 20 21 3d 20 24 28 EAD_ALLOC) != $(
f430: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
f440: 29 0d 0a 21 6d 65 73 73 61 67 65 20 57 41 52 4e )..!message WARN
f450: 49 4e 47 3a 20 56 61 6c 75 65 20 6f 66 20 55 53 ING: Value of US
f460: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 28 E_THREAD_ALLOC (
f470: 24 28 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c $(USE_THREAD_ALL
f480: 4f 43 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 OC)) does not ma
f490: 74 63 68 20 69 74 73 20 54 63 6c 20 63 6f 72 65 tch its Tcl core
f4a0: 20 76 61 6c 75 65 20 28 24 28 43 4f 52 45 5f 55 value ($(CORE_U
f4b0: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 SE_THREAD_ALLOC)
f4c0: 29 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 )...!endif..!if
f4d0: 64 65 66 69 6e 65 64 28 43 4f 52 45 5f 44 45 42 defined(CORE_DEB
f4e0: 55 47 29 20 26 26 20 24 28 43 4f 52 45 5f 44 45 UG) && $(CORE_DE
f4f0: 42 55 47 29 20 21 3d 20 24 28 44 45 42 55 47 29 BUG) != $(DEBUG)
f500: 0d 0a 21 6d 65 73 73 61 67 65 20 57 41 52 4e 49 ..!message WARNI
f510: 4e 47 3a 20 56 61 6c 75 65 20 6f 66 20 44 45 42 NG: Value of DEB
f520: 55 47 20 28 24 28 44 45 42 55 47 29 29 20 64 6f UG ($(DEBUG)) do
f530: 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 73 es not match its
f540: 20 54 63 6c 20 6c 69 62 72 61 72 79 20 63 6f 6e Tcl library con
f550: 66 69 67 75 72 61 74 69 6f 6e 20 28 24 28 44 45 figuration ($(DE
f560: 42 55 47 29 29 2e 0d 0a 21 65 6e 64 69 66 0d 0a BUG))...!endif..
f570: 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 69 66 !endif....!endif
f580: 20 23 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 # TCLNMAKECONFI
f590: 47 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 21 24 G....!endif # !$
f5a0: 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 0d (DOING_TCL).....
f5b0: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d .#--------------
f5c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f5d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f5e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 ------------..#
f5f0: 44 69 73 70 6c 61 79 20 73 74 61 74 73 20 62 65 Display stats be
f600: 69 6e 67 20 75 73 65 64 2e 0d 0a 23 2d 2d 2d 2d ing used...#----
f610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f630: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f640: 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 21 69 66 20 21 24 ------....!if !$
f650: 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 21 6d 65 (DOING_TCL)..!me
f660: 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69 ssage *** Buildi
f670: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 61 ng against Tcl a
f680: 74 20 27 24 28 5f 54 43 4c 44 49 52 29 27 0d 0a t '$(_TCLDIR)'..
f690: 21 65 6e 64 69 66 0d 0a 21 69 66 20 21 24 28 44 !endif..!if !$(D
f6a0: 4f 49 4e 47 5f 54 4b 29 20 26 26 20 24 28 4e 45 OING_TK) && $(NE
f6b0: 45 44 5f 54 4b 29 0d 0a 21 6d 65 73 73 61 67 65 ED_TK)..!message
f6c0: 20 2a 2a 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 *** Building ag
f6d0: 61 69 6e 73 74 20 54 6b 20 61 74 20 27 24 28 5f ainst Tk at '$(_
f6e0: 54 4b 44 49 52 29 27 0d 0a 21 65 6e 64 69 66 0d TKDIR)'..!endif.
f6f0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e .!message *** In
f700: 74 65 72 6d 65 64 69 61 74 65 20 64 69 72 65 63 termediate direc
f710: 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 24 28 tory will be '$(
f720: 54 4d 50 5f 44 49 52 29 27 0d 0a 21 6d 65 73 73 TMP_DIR)'..!mess
f730: 61 67 65 20 2a 2a 2a 20 4f 75 74 70 75 74 20 64 age *** Output d
f740: 69 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 irectory will be
f750: 20 27 24 28 4f 55 54 5f 44 49 52 29 27 0d 0a 21 '$(OUT_DIR)'..!
f760: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e 73 74 message *** Inst
f770: 61 6c 6c 61 74 69 6f 6e 2c 20 69 66 20 73 65 6c allation, if sel
f780: 65 63 74 65 64 2c 20 77 69 6c 6c 20 62 65 20 69 ected, will be i
f790: 6e 20 27 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 n '$(_INSTALLDIR
f7a0: 29 27 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a )'..!message ***
f7b0: 20 53 75 66 66 69 78 20 66 6f 72 20 62 69 6e 61 Suffix for bina
f7c0: 72 69 65 73 20 77 69 6c 6c 20 62 65 20 27 24 28 ries will be '$(
f7d0: 53 55 46 58 29 27 0d 0a 21 6d 65 73 73 61 67 65 SUFX)'..!message
f7e0: 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 76 65 *** Compiler ve
f7f0: 72 73 69 6f 6e 20 24 28 56 43 56 45 52 29 2e 20 rsion $(VCVER).
f800: 54 61 72 67 65 74 20 24 28 4d 41 43 48 49 4e 45 Target $(MACHINE
f810: 29 2c 20 68 6f 73 74 20 24 28 4e 41 54 49 56 45 ), host $(NATIVE
f820: 5f 41 52 43 48 29 2e 0d 0a 0d 0a 21 65 6e 64 69 _ARCH).....!endi
f830: 66 20 23 20 69 66 64 65 66 20 5f 52 55 4c 45 53 f # ifdef _RULES
f840: 5f 56 43 0d 0a _VC..