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 36 0d 0a 0d 0a 23 20 54 68 NOR = 16....# 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 23 20 54 63 6c 20 42 75 67 20 62 ---..# Tcl Bug b
1400: 65 34 30 62 37 33 36 3a 20 75 73 65 20 72 64 2f e40b736: use rd/
1410: 6d 64 20 69 6e 73 74 65 61 64 20 72 6d 64 69 72 md instead rmdir
1420: 2f 6d 6b 64 69 72 2e 0d 0a 23 20 4f 74 68 65 72 /mkdir...# Other
1430: 77 69 73 65 2c 20 61 6e 20 65 76 65 6e 74 75 61 wise, an eventua
1440: 6c 20 63 79 67 77 69 6e 20 76 65 72 73 69 6f 6e l cygwin version
1450: 20 77 69 74 68 20 64 69 66 66 65 72 65 6e 74 0d with different.
1460: 0a 23 20 70 61 72 61 6d 65 74 65 72 73 20 6d 61 .# parameters ma
1470: 79 20 62 65 20 75 73 65 64 2e 0d 0a 23 2d 2d 2d y be used...#---
1480: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1490: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
14a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
14b0: 2d 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 52 4d 44 49 52 -------....RMDIR
14c0: 09 3d 20 72 64 20 2f 53 20 2f 51 0d 0a 43 50 59 .= rd /S /Q..CPY
14d0: 09 3d 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e .= xcopy /i /y >
14e0: 4e 55 4c 0d 0a 43 50 59 44 49 52 20 20 3d 20 78 NUL..CPYDIR = x
14f0: 63 6f 70 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e copy /e /i /y >N
1500: 55 4c 0d 0a 43 4f 50 59 09 3d 20 63 6f 70 79 20 UL..COPY.= copy
1510: 2f 79 20 3e 4e 55 4c 0d 0a 4d 4b 44 49 52 20 20 /y >NUL..MKDIR
1520: 20 3d 20 6d 64 0d 0a 0d 0a 23 23 23 23 23 23 23 = md....#######
1530: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1540: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1550: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1560: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d ###############.
1570: 0a 23 20 32 2e 20 46 69 67 75 72 65 20 6f 75 74 .# 2. Figure out
1580: 20 6f 75 72 20 62 75 69 6c 64 20 65 6e 76 69 72 our build envir
1590: 6f 6e 6d 65 6e 74 20 69 6e 20 74 65 72 6d 73 20 onment in terms
15a0: 6f 66 20 77 68 61 74 20 77 65 27 72 65 20 62 75 of what we're bu
15b0: 69 6c 64 69 6e 67 2e 0d 0a 23 0d 0a 23 20 28 61 ilding...#..# (a
15c0: 29 20 54 63 6c 20 69 74 73 65 6c 66 0d 0a 23 20 ) Tcl itself..#
15d0: 28 62 29 20 54 6b 0d 0a 23 20 28 63 29 20 61 20 (b) Tk..# (c) a
15e0: 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 Tcl extension us
15f0: 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f 69 6e ing libraries/in
1600: 63 6c 75 64 65 73 20 66 72 6f 6d 20 61 6e 20 2a cludes from an *
1610: 69 6e 73 74 61 6c 6c 65 64 2a 20 54 63 6c 0d 0a installed* Tcl..
1620: 23 20 28 64 29 20 61 20 54 63 6c 20 65 78 74 65 # (d) a Tcl exte
1630: 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 62 72 nsion using libr
1640: 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 20 66 aries/includes f
1650: 72 6f 6d 20 54 63 6c 20 73 6f 75 72 63 65 20 64 rom Tcl source d
1660: 69 72 65 63 74 6f 72 79 0d 0a 23 0d 0a 23 20 54 irectory..#..# T
1670: 68 69 73 20 6c 61 73 74 20 69 73 20 6e 65 65 64 his last is need
1680: 65 64 20 62 65 63 61 75 73 65 20 73 6f 6d 65 20 ed because some
1690: 65 78 74 65 6e 73 69 6f 6e 73 20 73 74 69 6c 6c extensions still
16a0: 20 6e 65 65 64 0d 0a 23 20 73 6f 6d 65 20 54 63 need..# some Tc
16b0: 6c 20 69 6e 74 65 72 66 61 63 65 73 20 74 68 61 l interfaces tha
16c0: 74 20 61 72 65 20 6e 6f 74 20 70 75 62 6c 69 63 t are not public
16d0: 6c 79 20 65 78 70 6f 73 65 64 2e 0d 0a 23 0d 0a ly exposed...#..
16e0: 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74 20 77 # The fragment w
16f0: 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f 6c 6c ill set the foll
1700: 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0d 0a 23 owing macros:..#
1710: 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f 66 20 ROOT - root of
1720: 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f 75 72 this module sour
1730: 63 65 73 0d 0a 23 20 43 4f 4d 50 41 54 44 49 52 ces..# COMPATDIR
1740: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 - source direct
1750: 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 73 20 63 ory that holds c
1760: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 73 6f 75 ompatibility sou
1770: 72 63 65 73 0d 0a 23 20 44 4f 43 44 49 52 20 2d rces..# DOCDIR -
1780: 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 source director
1790: 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64 6f 63 y containing doc
17a0: 75 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 umentation files
17b0: 0d 0a 23 20 47 45 4e 45 52 49 43 44 49 52 20 2d ..# GENERICDIR -
17c0: 20 70 6c 61 74 66 6f 72 6d 2d 69 6e 64 65 70 65 platform-indepe
17d0: 6e 64 65 6e 74 20 73 6f 75 72 63 65 20 64 69 72 ndent source dir
17e0: 65 63 74 6f 72 79 0d 0a 23 20 57 49 4e 5f 44 49 ectory..# WIN_DI
17f0: 52 20 2d 20 57 69 6e 64 6f 77 73 2d 73 70 65 63 R - Windows-spec
1800: 69 66 69 63 20 73 6f 75 72 63 65 20 64 69 72 65 ific source dire
1810: 63 74 6f 72 79 0d 0a 23 20 54 45 53 54 44 49 52 ctory..# TESTDIR
1820: 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e - directory con
1830: 74 61 69 6e 69 6e 67 20 74 65 73 74 20 66 69 6c taining test fil
1840: 65 73 0d 0a 23 20 54 4f 4f 4c 53 44 49 52 20 2d es..# TOOLSDIR -
1850: 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 directory conta
1860: 69 6e 69 6e 67 20 62 75 69 6c 64 20 74 6f 6f 6c ining build tool
1870: 73 0d 0a 23 20 5f 54 43 4c 44 49 52 20 2d 20 72 s..# _TCLDIR - r
1880: 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c 20 69 oot of the Tcl i
1890: 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f 52 20 74 nstallation OR t
18a0: 68 65 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 he Tcl sources.
18b0: 4e 6f 74 20 73 65 74 0d 0a 23 20 20 20 20 77 68 Not set..# wh
18c0: 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 63 6c 20 en building Tcl
18d0: 69 74 73 65 6c 66 2e 0d 0a 23 20 5f 49 4e 53 54 itself...# _INST
18e0: 41 4c 4c 44 49 52 20 2d 20 6e 61 74 69 76 65 20 ALLDIR - native
18f0: 66 6f 72 6d 20 6f 66 20 74 68 65 20 69 6e 73 74 form of the inst
1900: 61 6c 6c 61 74 69 6f 6e 20 70 61 74 68 2e 20 46 allation path. F
1910: 6f 72 20 54 63 6c 0d 0a 23 20 20 20 20 74 68 69 or Tcl..# thi
1920: 73 20 77 69 6c 6c 20 62 65 20 74 68 65 20 72 6f s will be the ro
1930: 6f 74 20 6f 66 20 74 68 65 20 54 63 6c 20 69 6e ot of the Tcl in
1940: 73 74 61 6c 6c 61 74 69 6f 6e 2e 20 46 6f 72 20 stallation. For
1950: 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 20 20 extensions..#
1960: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 74 68 this will be th
1970: 65 20 6c 69 62 20 64 69 72 65 63 74 6f 72 79 20 e lib directory
1980: 75 6e 64 65 72 20 74 68 65 20 72 6f 6f 74 2e 0d under the root..
1990: 0a 23 20 54 43 4c 49 4e 53 54 41 4c 4c 20 20 2d .# TCLINSTALL -
19a0: 20 73 65 74 20 74 6f 20 31 20 69 66 20 5f 54 43 set to 1 if _TC
19b0: 4c 44 49 52 20 72 65 66 65 72 73 20 74 6f 0d 0a LDIR refers to..
19c0: 23 20 20 20 20 68 65 61 64 65 72 73 20 61 6e 64 # headers and
19d0: 20 6c 69 62 72 61 72 69 65 73 20 66 72 6f 6d 20 libraries from
19e0: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
19f0: 2c 20 61 6e 64 20 30 20 69 66 20 62 75 69 6c 74 , and 0 if built
1a00: 20 61 67 61 69 6e 73 74 0d 0a 23 20 20 20 20 54 against..# T
1a10: 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e 6f 74 20 cl sources. Not
1a20: 73 65 74 20 77 68 65 6e 20 62 75 69 6c 64 69 6e set when buildin
1a30: 67 20 54 63 6c 20 69 74 73 65 6c 66 2e 20 59 65 g Tcl itself. Ye
1a40: 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 65 6c 6c s, not very well
1a50: 0d 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0d 0a 23 ..# named...#
1a60: 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69 76 65 _TCL_H - native
1a70: 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 63 6c path to the tcl
1a80: 2e 68 20 66 69 6c 65 0d 0a 23 0d 0a 23 20 49 66 .h file..#..# If
1a90: 20 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65 64 2c Tk is involved,
1aa0: 20 61 6c 73 6f 20 73 65 74 73 20 74 68 65 20 66 also sets the f
1ab0: 6f 6c 6c 6f 77 69 6e 67 0d 0a 23 20 5f 54 4b 44 ollowing..# _TKD
1ac0: 49 52 20 2d 20 6e 61 74 69 76 65 20 66 6f 72 6d IR - native form
1ad0: 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e Tk installation
1ae0: 20 4f 52 20 54 6b 20 73 6f 75 72 63 65 2e 20 4e OR Tk source. N
1af0: 6f 74 20 73 65 74 20 69 66 20 62 75 69 6c 64 69 ot set if buildi
1b00: 6e 67 0d 0a 23 20 20 20 20 54 6b 20 69 74 73 65 ng..# Tk itse
1b10: 6c 66 2e 0d 0a 23 20 54 4b 49 4e 53 54 41 4c 4c lf...# TKINSTALL
1b20: 20 2d 20 73 65 74 20 31 20 69 66 20 5f 54 4b 44 - set 1 if _TKD
1b30: 49 52 20 72 65 66 65 72 73 20 74 6f 20 69 6e 73 IR refers to ins
1b40: 74 61 6c 6c 65 64 20 54 6b 20 61 6e 64 20 30 20 talled Tk and 0
1b50: 69 66 20 54 6b 20 73 6f 75 72 63 65 73 0d 0a 23 if Tk sources..#
1b60: 20 5f 54 4b 5f 48 20 2d 20 6e 61 74 69 76 65 20 _TK_H - native
1b70: 70 61 74 68 20 74 6f 20 74 68 65 20 74 6b 2e 68 path to the tk.h
1b80: 20 66 69 6c 65 0d 0a 0d 0a 23 20 52 6f 6f 74 20 file....# Root
1b90: 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 73 6f directory for so
1ba0: 75 72 63 65 73 20 61 6e 64 20 61 73 73 75 6d 65 urces and assume
1bb0: 64 20 73 75 62 64 69 72 65 63 74 6f 72 69 65 73 d subdirectories
1bc0: 0d 0a 52 4f 4f 54 20 3d 20 24 28 4d 41 4b 45 44 ..ROOT = $(MAKED
1bd0: 49 52 29 5c 2e 2e 0d 0a 23 20 54 68 65 20 66 6f IR)\....# The fo
1be0: 6c 6c 6f 77 69 6e 67 20 70 61 74 68 73 20 43 41 llowing paths CA
1bf0: 4e 4e 4f 54 20 68 61 76 65 20 73 70 61 63 65 73 NNOT have spaces
1c00: 20 69 6e 20 74 68 65 6d 20 61 73 20 74 68 65 79 in them as they
1c10: 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65 0d 0a appear on the..
1c20: 23 20 6c 65 66 74 20 73 69 64 65 20 6f 66 20 69 # left side of i
1c30: 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0d 0a mplicit rules...
1c40: 21 69 66 6e 64 65 66 20 43 4f 4d 50 41 54 44 49 !ifndef COMPATDI
1c50: 52 0d 0a 43 4f 4d 50 41 54 44 49 52 09 3d 20 24 R..COMPATDIR.= $
1c60: 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 74 0d 0a 21 (ROOT)\compat..!
1c70: 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 44 endif..!ifndef D
1c80: 4f 43 44 49 52 0d 0a 44 4f 43 44 49 52 09 09 3d OCDIR..DOCDIR..=
1c90: 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0d 0a 21 65 $(ROOT)\doc..!e
1ca0: 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 47 45 ndif..!ifndef GE
1cb0: 4e 45 52 49 43 44 49 52 0d 0a 47 45 4e 45 52 49 NERICDIR..GENERI
1cc0: 43 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 67 CDIR.= $(ROOT)\g
1cd0: 65 6e 65 72 69 63 0d 0a 21 65 6e 64 69 66 0d 0a eneric..!endif..
1ce0: 21 69 66 6e 64 65 66 20 54 4f 4f 4c 53 44 49 52 !ifndef TOOLSDIR
1cf0: 0d 0a 54 4f 4f 4c 53 44 49 52 09 3d 20 24 28 52 ..TOOLSDIR.= $(R
1d00: 4f 4f 54 29 5c 74 6f 6f 6c 73 0d 0a 21 65 6e 64 OOT)\tools..!end
1d10: 69 66 0d 0a 21 69 66 6e 64 65 66 20 54 45 53 54 if..!ifndef TEST
1d20: 44 49 52 0d 0a 54 45 53 54 44 49 52 09 3d 20 24 DIR..TESTDIR.= $
1d30: 28 52 4f 4f 54 29 5c 74 65 73 74 73 0d 0a 21 65 (ROOT)\tests..!e
1d40: 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 4c 49 ndif..!ifndef LI
1d50: 42 44 49 52 0d 0a 21 69 66 20 65 78 69 73 74 28 BDIR..!if exist(
1d60: 22 24 28 52 4f 4f 54 29 5c 6c 69 62 72 61 72 79 "$(ROOT)\library
1d70: 22 29 0d 0a 4c 49 42 44 49 52 20 20 20 20 20 20 ")..LIBDIR
1d80: 20 20 20 20 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 = $(ROOT)\li
1d90: 62 72 61 72 79 0d 0a 21 65 6c 73 65 0d 0a 4c 49 brary..!else..LI
1da0: 42 44 49 52 20 20 20 20 20 20 20 20 20 20 3d 20 BDIR =
1db0: 24 28 52 4f 4f 54 29 5c 6c 69 62 0d 0a 21 65 6e $(ROOT)\lib..!en
1dc0: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 dif..!endif..!if
1dd0: 6e 64 65 66 20 44 45 4d 4f 44 49 52 0d 0a 21 69 ndef DEMODIR..!i
1de0: 66 20 65 78 69 73 74 28 22 24 28 4c 49 42 44 49 f exist("$(LIBDI
1df0: 52 29 5c 64 65 6d 6f 73 22 29 0d 0a 44 45 4d 4f R)\demos")..DEMO
1e00: 44 49 52 09 09 3d 20 24 28 4c 49 42 44 49 52 29 DIR..= $(LIBDIR)
1e10: 5c 64 65 6d 6f 73 0d 0a 21 65 6c 73 65 0d 0a 44 \demos..!else..D
1e20: 45 4d 4f 44 49 52 09 09 3d 20 24 28 52 4f 4f 54 EMODIR..= $(ROOT
1e30: 29 5c 64 65 6d 6f 73 0d 0a 21 65 6e 64 69 66 0d )\demos..!endif.
1e40: 0a 21 65 6e 64 69 66 20 23 20 69 66 6e 64 65 66 .!endif # ifndef
1e50: 20 44 45 4d 4f 44 49 52 0d 0a 23 20 44 6f 20 4e DEMODIR..# Do N
1e60: 4f 54 20 75 73 65 20 57 49 4e 44 49 52 20 62 65 OT use WINDIR be
1e70: 63 61 75 73 65 20 69 74 20 69 73 20 57 69 6e 64 cause it is Wind
1e80: 6f 77 73 20 69 6e 74 65 72 6e 61 6c 20 65 6e 76 ows internal env
1e90: 69 72 6f 6e 6d 65 6e 74 0d 0a 23 20 76 61 72 69 ironment..# vari
1ea0: 61 62 6c 65 20 74 6f 20 70 6f 69 6e 74 20 74 6f able to point to
1eb0: 20 63 3a 5c 77 69 6e 64 6f 77 73 21 0d 0a 57 49 c:\windows!..WI
1ec0: 4e 5f 44 49 52 09 09 3d 20 24 28 52 4f 4f 54 29 N_DIR..= $(ROOT)
1ed0: 5c 77 69 6e 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 \win....!ifndef
1ee0: 52 43 44 49 52 0d 0a 21 69 66 20 65 78 69 73 74 RCDIR..!if exist
1ef0: 28 22 24 28 57 49 4e 5f 44 49 52 29 5c 72 63 22 ("$(WIN_DIR)\rc"
1f00: 29 0d 0a 52 43 44 49 52 20 20 20 20 20 20 20 20 )..RCDIR
1f10: 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 29 5c = $(WIN_DIR)\
1f20: 72 63 0d 0a 21 65 6c 73 65 0d 0a 52 43 44 49 52 rc..!else..RCDIR
1f30: 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 57 = $(W
1f40: 49 4e 5f 44 49 52 29 0d 0a 21 65 6e 64 69 66 0d IN_DIR)..!endif.
1f50: 0a 21 65 6e 64 69 66 0d 0a 52 43 44 49 52 20 3d .!endif..RCDIR =
1f60: 20 24 28 52 43 44 49 52 3a 2f 3d 5c 29 0d 0a 0d $(RCDIR:/=\)...
1f70: 0a 23 20 54 68 65 20 74 61 72 67 65 74 20 64 69 .# The target di
1f80: 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74 68 rectory where th
1f90: 65 20 62 75 69 6c 74 20 70 61 63 6b 61 67 65 73 e built packages
1fa0: 20 61 6e 64 20 62 69 6e 61 72 69 65 73 20 77 69 and binaries wi
1fb0: 6c 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 2e ll be installed.
1fc0: 0d 0a 23 20 49 4e 53 54 41 4c 4c 44 49 52 20 69 ..# INSTALLDIR i
1fd0: 73 20 74 68 65 20 28 6f 70 74 69 6f 6e 61 6c 29 s the (optional)
1fe0: 20 70 61 74 68 20 73 70 65 63 69 66 69 65 64 20 path specified
1ff0: 62 79 20 74 68 65 20 75 73 65 72 2e 0d 0a 23 20 by the user...#
2000: 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 73 20 49 _INSTALLDIR is I
2010: 4e 53 54 41 4c 4c 44 49 52 20 75 73 69 6e 67 20 NSTALLDIR using
2020: 74 68 65 20 62 61 63 6b 73 6c 61 73 68 20 73 65 the backslash se
2030: 70 61 72 61 74 6f 72 20 73 79 6e 74 61 78 0d 0a parator syntax..
2040: 21 69 66 64 65 66 20 49 4e 53 54 41 4c 4c 44 49 !ifdef INSTALLDI
2050: 52 0d 0a 23 23 23 20 46 69 78 20 74 68 65 20 70 R..### Fix the p
2060: 61 74 68 20 73 65 70 61 72 61 74 6f 72 73 2e 0d ath separators..
2070: 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 09 3d 20 24 ._INSTALLDIR.= $
2080: 28 49 4e 53 54 41 4c 4c 44 49 52 3a 2f 3d 5c 29 (INSTALLDIR:/=\)
2090: 0d 0a 21 65 6c 73 65 0d 0a 23 23 23 20 41 73 73 ..!else..### Ass
20a0: 75 6d 65 20 74 68 65 20 6e 6f 72 6d 61 6c 20 64 ume the normal d
20b0: 65 66 61 75 6c 74 2e 0d 0a 5f 49 4e 53 54 41 4c efault..._INSTAL
20c0: 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 44 52 49 LDIR.= $(HOMEDRI
20d0: 56 45 29 5c 54 63 6c 0d 0a 21 65 6e 64 69 66 0d VE)\Tcl..!endif.
20e0: 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 ...!if $(DOING_T
20f0: 43 4c 29 0d 0a 0d 0a 23 20 42 45 47 49 4e 20 43 CL)....# BEGIN C
2100: 61 73 65 20 32 28 61 29 20 2d 20 42 75 69 6c 64 ase 2(a) - Build
2110: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 0d 0a ing Tcl itself..
2120: 0d 0a 23 20 4f 6e 6c 79 20 6e 65 65 64 20 74 6f ..# Only need to
2130: 20 64 65 66 69 6e 65 20 5f 54 43 4c 5f 48 0d 0a define _TCL_H..
2140: 5f 54 43 4c 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 _TCL_H = ..\gene
2150: 72 69 63 5c 74 63 6c 2e 68 0d 0a 0d 0a 23 20 45 ric\tcl.h....# E
2160: 4e 44 20 43 61 73 65 20 32 28 61 29 20 2d 20 42 ND Case 2(a) - B
2170: 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 65 uilding Tcl itse
2180: 6c 66 0d 0a 0d 0a 21 65 6c 73 65 69 66 20 24 28 lf....!elseif $(
2190: 44 4f 49 4e 47 5f 54 4b 29 0d 0a 0d 0a 23 20 42 DOING_TK)....# B
21a0: 45 47 49 4e 20 43 61 73 65 20 32 28 62 29 20 2d EGIN Case 2(b) -
21b0: 20 42 75 69 6c 64 69 6e 67 20 54 6b 0d 0a 0d 0a Building Tk....
21c0: 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 30 20 23 TCLINSTALL = 0 #
21d0: 20 54 6b 20 61 6c 77 61 79 73 20 62 75 69 6c 64 Tk always build
21e0: 73 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f s against Tcl so
21f0: 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 69 6e 73 urce, not an ins
2200: 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 21 69 66 20 talled Tcl..!if
2210: 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d 20 22 "$(TCLDIR)" == "
2220: 22 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c "..!if [echo TCL
2230: 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c DIR = \> nmakehl
2240: 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20 7c 7c 20 p.out] \.. ||
2250: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e [nmakehlp -L gen
2260: 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d eric\tcl.h >> nm
2270: 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21 65 72 akehlp.out]..!er
2280: 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f ror *** Could no
2290: 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f 75 t locate Tcl sou
22a0: 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e 0d 0a rce directory...
22b0: 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75 64 65 !endif..!include
22c0: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d 0a 21 nmakehlp.out..!
22d0: 65 6e 64 69 66 20 23 20 54 43 4c 44 49 52 20 3d endif # TCLDIR =
22e0: 3d 20 22 22 0d 0a 0d 0a 5f 54 43 4c 44 49 52 09 = ""...._TCLDIR.
22f0: 3d 20 24 28 54 43 4c 44 49 52 3a 2f 3d 5c 29 0d = $(TCLDIR:/=\).
2300: 0a 5f 54 43 4c 5f 48 20 20 3d 20 24 28 5f 54 43 ._TCL_H = $(_TC
2310: 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 LDIR)\generic\tc
2320: 6c 2e 68 0d 0a 21 69 66 20 21 65 78 69 73 74 28 l.h..!if !exist(
2330: 22 24 28 5f 54 43 4c 5f 48 29 22 29 0d 0a 21 65 "$(_TCL_H)")..!e
2340: 72 72 6f 72 20 43 6f 75 6c 64 20 6e 6f 74 20 6c rror Could not l
2350: 6f 63 61 74 65 20 74 63 6c 2e 68 2e 20 50 6c 65 ocate tcl.h. Ple
2360: 61 73 65 20 73 65 74 20 74 68 65 20 54 43 4c 44 ase set the TCLD
2370: 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 6f 69 6e IR macro to poin
2380: 74 20 74 6f 20 74 68 65 20 54 63 6c 20 2a 73 6f t to the Tcl *so
2390: 75 72 63 65 2a 20 64 69 72 65 63 74 6f 72 79 2e urce* directory.
23a0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 5f 54 4b 5f ..!endif...._TK_
23b0: 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 5c 74 H = ..\generic\t
23c0: 6b 2e 68 0d 0a 0d 0a 23 20 45 4e 44 20 43 61 73 k.h....# END Cas
23d0: 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 69 6e e 2(b) - Buildin
23e0: 67 20 54 6b 0d 0a 0d 0a 21 65 6c 73 65 0d 0a 0d g Tk....!else...
23f0: 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 .# BEGIN Case 2(
2400: 63 29 20 6f 72 20 28 64 29 20 2d 20 42 75 69 6c c) or (d) - Buil
2410: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
2420: 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 6b 0d n other than Tk.
2430: 0a 0d 0a 23 20 49 66 20 63 6f 6d 6d 61 6e 64 20 ...# If command
2440: 6c 69 6e 65 20 68 61 73 20 73 70 65 63 69 66 69 line has specifi
2450: 65 64 20 54 63 6c 20 6c 6f 63 61 74 69 6f 6e 20 ed Tcl location
2460: 74 68 72 6f 75 67 68 20 54 43 4c 44 49 52 2c 20 through TCLDIR,
2470: 75 73 65 20 69 74 0d 0a 23 20 65 6c 73 65 20 64 use it..# else d
2480: 65 66 61 75 6c 74 20 74 6f 20 74 68 65 20 49 4e efault to the IN
2490: 53 54 41 4c 4c 44 49 52 20 73 65 74 74 69 6e 67 STALLDIR setting
24a0: 0d 0a 21 69 66 20 22 24 28 54 43 4c 44 49 52 29 ..!if "$(TCLDIR)
24b0: 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 43 4c 44 " != ""...._TCLD
24c0: 49 52 09 3d 20 24 28 54 43 4c 44 49 52 3a 2f 3d IR.= $(TCLDIR:/=
24d0: 5c 29 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 \)..!if exist("$
24e0: 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 (_TCLDIR)\includ
24f0: 65 5c 74 63 6c 2e 68 22 29 20 23 20 43 61 73 65 e\tcl.h") # Case
2500: 20 32 28 63 29 20 77 69 74 68 20 54 43 4c 44 49 2(c) with TCLDI
2510: 52 20 64 65 66 69 6e 65 64 0d 0a 54 43 4c 49 4e R defined..TCLIN
2520: 53 54 41 4c 4c 09 3d 20 31 0d 0a 5f 54 43 4c 5f STALL.= 1.._TCL_
2530: 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f H = $(_
2540: 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c TCLDIR)\include\
2550: 74 63 6c 2e 68 0d 0a 21 65 6c 73 65 69 66 20 65 tcl.h..!elseif e
2560: 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 xist("$(_TCLDIR)
2570: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 22 29 \generic\tcl.h")
2580: 20 23 20 43 61 73 65 20 32 28 64 29 20 77 69 74 # Case 2(d) wit
2590: 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e 65 64 h TCLDIR defined
25a0: 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 30 ..TCLINSTALL.= 0
25b0: 0d 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 20 .._TCL_H
25c0: 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 67 = $(_TCLDIR)\g
25d0: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a 21 65 eneric\tcl.h..!e
25e0: 6e 64 69 66 0d 0a 0d 0a 21 65 6c 73 65 20 20 23 ndif....!else #
25f0: 20 20 23 20 43 61 73 65 20 32 28 63 29 20 66 6f # Case 2(c) fo
2600: 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 77 69 74 r extensions wit
2610: 68 20 54 43 4c 44 49 52 20 75 6e 64 65 66 69 6e h TCLDIR undefin
2620: 65 64 0d 0a 0d 0a 23 20 4e 65 65 64 20 74 6f 20 ed....# Need to
2630: 6c 6f 63 61 74 65 20 54 63 6c 20 64 65 70 65 6e locate Tcl depen
2640: 64 69 6e 67 20 6f 6e 20 77 68 65 74 68 65 72 20 ding on whether
2650: 69 74 20 6e 65 65 64 73 20 54 63 6c 20 73 6f 75 it needs Tcl sou
2660: 72 63 65 20 6f 72 20 6e 6f 74 2e 0d 0a 23 20 49 rce or not...# I
2670: 66 20 77 65 20 64 6f 6e 27 74 2c 20 63 68 65 63 f we don't, chec
2680: 6b 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 49 52 k the INSTALLDIR
2690: 20 66 6f 72 20 61 6e 20 69 6e 73 74 61 6c 6c 65 for an installe
26a0: 64 20 54 63 6c 20 66 69 72 73 74 0d 0a 0d 0a 21 d Tcl first....!
26b0: 69 66 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 if exist("$(_INS
26c0: 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 TALLDIR)\include
26d0: 5c 74 63 6c 2e 68 22 29 20 26 26 20 21 24 28 4e \tcl.h") && !$(N
26e0: 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 0d EED_TCL_SOURCE).
26f0: 0a 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 ...TCLINSTALL.=
2700: 31 0d 0a 54 43 4c 44 49 52 20 20 20 20 20 20 20 1..TCLDIR
2710: 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 = $(_INSTALLD
2720: 49 52 29 5c 2e 2e 0d 0a 23 20 4e 4f 54 45 3a 20 IR)\....# NOTE:
2730: 77 65 20 77 69 6c 6c 20 62 65 20 72 65 73 65 74 we will be reset
2740: 74 69 6e 67 20 5f 49 4e 53 54 41 4c 4c 44 49 52 ting _INSTALLDIR
2750: 20 74 6f 20 5f 49 4e 53 54 41 4c 4c 44 49 52 2f to _INSTALLDIR/
2760: 6c 69 62 20 66 6f 72 20 65 78 74 65 6e 73 69 6f lib for extensio
2770: 6e 73 0d 0a 23 20 6c 61 74 65 72 20 73 6f 20 74 ns..# later so t
2780: 68 65 20 5c 2e 2e 20 61 63 63 6f 75 6e 74 73 20 he \.. accounts
2790: 66 6f 72 20 74 68 65 20 2f 6c 69 62 0d 0a 5f 54 for the /lib.._T
27a0: 43 4c 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 CLDIR..= $(_INST
27b0: 41 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54 43 4c ALLDIR)\...._TCL
27c0: 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 _H = $(
27d0: 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 _TCLDIR)\include
27e0: 5c 74 63 6c 2e 68 0d 0a 0d 0a 21 65 6c 73 65 20 \tcl.h....!else
27f0: 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 # exist(...) &&
2800: 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 !$(NEED_TCL_SOUR
2810: 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 68 6f CE)....!if [echo
2820: 20 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d _TCLDIR = \> nm
2830: 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 akehlp.out] \..
2840: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d || [nmakehlp -
2850: 4c 20 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 L generic\tcl.h
2860: 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d >> nmakehlp.out]
2870: 0d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 ..!error *** Cou
2880: 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 54 63 ld not locate Tc
2890: 6c 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f l source directo
28a0: 72 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e ry...!endif..!in
28b0: 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f clude nmakehlp.o
28c0: 75 74 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 20 ut..TCLINSTALL
28d0: 20 20 20 20 3d 20 30 0d 0a 54 43 4c 44 49 52 20 = 0..TCLDIR
28e0: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c = $(_TCL
28f0: 44 49 52 29 0d 0a 5f 54 43 4c 5f 48 20 20 20 20 DIR).._TCL_H
2900: 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 = $(_TCLDI
2910: 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 R)\generic\tcl.h
2920: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 65 78 69 ....!endif # exi
2930: 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28 4e 45 st(...) && !$(NE
2940: 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 0d 0a ED_TCL_SOURCE)..
2950: 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 44 49 ..!endif # TCLDI
2960: 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f 54 43 R....!ifndef _TC
2970: 4c 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 61 69 L_H..MSG =^..Fai
2980: 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 63 6c 2e led to find tcl.
2990: 68 2e 20 54 68 65 20 54 43 4c 44 49 52 20 6d 61 h. The TCLDIR ma
29a0: 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 cro is set incor
29b0: 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 rectly or is not
29c0: 20 73 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 set and default
29d0: 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 path does not c
29e0: 6f 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0d 0a 21 ontain tcl.h...!
29f0: 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 error $(MSG)..!e
2a00: 6e 64 69 66 0d 0a 0d 0a 23 20 4e 6f 77 20 64 6f ndif....# Now do
2a10: 20 74 68 65 20 73 61 6d 65 20 74 6f 20 6c 6f 63 the same to loc
2a20: 61 74 65 20 54 6b 20 68 65 61 64 65 72 73 20 61 ate Tk headers a
2a30: 6e 64 20 6c 69 62 73 20 69 66 20 70 72 6f 6a 65 nd libs if proje
2a40: 63 74 20 72 65 71 75 69 72 65 73 20 54 6b 0d 0a ct requires Tk..
2a50: 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29 0d 0a !if $(NEED_TK)..
2a60: 0d 0a 21 69 66 20 22 24 28 54 4b 44 49 52 29 22 ..!if "$(TKDIR)"
2a70: 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 4b 44 49 52 != ""...._TKDIR
2a80: 20 3d 20 24 28 54 4b 44 49 52 3a 2f 3d 5c 29 0d = $(TKDIR:/=\).
2a90: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 .!if exist("$(_T
2aa0: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b KDIR)\include\tk
2ab0: 2e 68 22 29 0d 0a 54 4b 49 4e 53 54 41 4c 4c 20 .h")..TKINSTALL
2ac0: 20 20 20 20 20 3d 20 31 0d 0a 5f 54 4b 5f 48 20 = 1.._TK_H
2ad0: 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b = $(_TK
2ae0: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e DIR)\include\tk.
2af0: 68 0d 0a 21 65 6c 73 65 69 66 20 65 78 69 73 74 h..!elseif exist
2b00: 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 ("$(_TKDIR)\gene
2b10: 72 69 63 5c 74 6b 2e 68 22 29 0d 0a 54 4b 49 4e ric\tk.h")..TKIN
2b20: 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 0d 0a STALL = 0..
2b30: 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 20 3d _TK_H =
2b40: 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 $(_TKDIR)\gener
2b50: 69 63 5c 74 6b 2e 68 0d 0a 21 65 6e 64 69 66 0d ic\tk.h..!endif.
2b60: 0a 0d 0a 21 65 6c 73 65 20 23 20 54 4b 44 49 52 ...!else # TKDIR
2b70: 20 6e 6f 74 20 64 65 66 69 6e 65 64 0d 0a 0d 0a not defined....
2b80: 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 # Need to locate
2b90: 20 54 63 6c 20 64 65 70 65 6e 64 69 6e 67 20 6f Tcl depending o
2ba0: 6e 20 77 68 65 74 68 65 72 20 69 74 20 6e 65 65 n whether it nee
2bb0: 64 73 20 54 63 6c 20 73 6f 75 72 63 65 20 6f 72 ds Tcl source or
2bc0: 20 6e 6f 74 2e 0d 0a 23 20 49 66 20 77 65 20 64 not...# If we d
2bd0: 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 65 20 on't, check the
2be0: 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 20 61 INSTALLDIR for a
2bf0: 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 20 n installed Tcl
2c00: 66 69 72 73 74 0d 0a 0d 0a 21 69 66 20 65 78 69 first....!if exi
2c10: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 st("$(_INSTALLDI
2c20: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 R)\include\tk.h"
2c30: 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 4b 5f ) && !$(NEED_TK_
2c40: 53 4f 55 52 43 45 29 0d 0a 0d 0a 54 4b 49 4e 53 SOURCE)....TKINS
2c50: 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0d 0a 23 TALL = 1..#
2c60: 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c 20 62 NOTE: we will b
2c70: 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49 4e 53 e resetting _INS
2c80: 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e 53 54 TALLDIR to _INST
2c90: 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 20 65 ALLDIR/lib for e
2ca0: 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 6c 61 74 xtensions..# lat
2cb0: 65 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20 61 63 er so the \.. ac
2cc0: 63 6f 75 6e 74 73 20 66 6f 72 20 74 68 65 20 2f counts for the /
2cd0: 6c 69 62 0d 0a 5f 54 4b 44 49 52 20 20 20 20 20 lib.._TKDIR
2ce0: 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c = $(_INSTALL
2cf0: 44 49 52 29 5c 2e 2e 0d 0a 5f 54 4b 5f 48 20 20 DIR)\...._TK_H
2d00: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 = $(_TKD
2d10: 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 IR)\include\tk.h
2d20: 0d 0a 54 4b 44 49 52 20 20 20 20 20 20 20 20 20 ..TKDIR
2d30: 20 3d 20 24 28 5f 54 4b 44 49 52 29 0d 0a 0d 0a = $(_TKDIR)....
2d40: 21 65 6c 73 65 20 23 20 65 78 69 73 74 28 22 24 !else # exist("$
2d50: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e (_INSTALLDIR)\in
2d60: 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 clude\tk.h") &&
2d70: 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 !$(NEED_TK_SOURC
2d80: 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 68 6f 20 E)....!if [echo
2d90: 5f 54 4b 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b _TKDIR = \> nmak
2da0: 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20 ehlp.out] \..
2db0: 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 || [nmakehlp -L
2dc0: 67 65 6e 65 72 69 63 5c 74 6b 2e 68 20 3e 3e 20 generic\tk.h >>
2dd0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21 nmakehlp.out]..!
2de0: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
2df0: 6e 6f 74 20 6c 6f 63 61 74 65 20 54 6b 20 73 6f not locate Tk so
2e00: 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e 0d urce directory..
2e10: 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75 64 .!endif..!includ
2e20: 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d 0a e nmakehlp.out..
2e30: 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d TKINSTALL =
2e40: 20 30 0d 0a 54 4b 44 49 52 20 20 20 20 20 20 20 0..TKDIR
2e50: 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0d 0a = $(_TKDIR)..
2e60: 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 20 3d _TK_H =
2e70: 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 $(_TKDIR)\gener
2e80: 69 63 5c 74 6b 2e 68 0d 0a 0d 0a 21 65 6e 64 69 ic\tk.h....!endi
2e90: 66 20 23 20 65 78 69 73 74 28 22 24 28 5f 49 4e f # exist("$(_IN
2ea0: 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 STALLDIR)\includ
2eb0: 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 28 4e e\tk.h") && !$(N
2ec0: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a EED_TK_SOURCE)..
2ed0: 0d 0a 21 65 6e 64 69 66 20 23 20 54 4b 44 49 52 ..!endif # TKDIR
2ee0: 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f 54 4b 5f ....!ifndef _TK_
2ef0: 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 61 69 6c 65 H..MSG =^..Faile
2f00: 64 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68 2e 20 d to find tk.h.
2f10: 54 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 The TKDIR macro
2f20: 69 73 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 is set incorrect
2f30: 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 ly or is not set
2f40: 20 61 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 and default pat
2f50: 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 h does not conta
2f60: 69 6e 20 74 6b 2e 68 2e 0d 0a 21 65 72 72 6f 72 in tk.h...!error
2f70: 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66 0d $(MSG)..!endif.
2f80: 0a 0d 0a 21 65 6e 64 69 66 20 23 20 4e 45 45 44 ...!endif # NEED
2f90: 5f 54 4b 0d 0a 0d 0a 21 69 66 20 24 28 4e 45 45 _TK....!if $(NEE
2fa0: 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 20 26 26 D_TCL_SOURCE) &&
2fb0: 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0d 0a $(TCLINSTALL)..
2fc0: 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57 61 72 MSG = ^..*** War
2fd0: 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 65 6e ning: This exten
2fe0: 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 68 sion requires th
2ff0: 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 69 62 e source distrib
3000: 75 74 69 6f 6e 20 6f 66 20 54 63 6c 2e 5e 0d 0a ution of Tcl.^..
3010: 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 20 74 *** Please set t
3020: 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 he TCLDIR macro
3030: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 to point to the
3040: 54 63 6c 20 73 6f 75 72 63 65 73 2e 0d 0a 21 65 Tcl sources...!e
3050: 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e rror $(MSG)..!en
3060: 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 4e 45 45 dif....!if $(NEE
3070: 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a 21 69 D_TK_SOURCE)..!i
3080: 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 0d 0a f $(TKINSTALL)..
3090: 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57 61 72 MSG = ^..*** War
30a0: 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 65 6e ning: This exten
30b0: 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 68 sion requires th
30c0: 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 69 62 e source distrib
30d0: 75 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0d 0a 2a ution of Tk.^..*
30e0: 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 20 74 68 ** Please set th
30f0: 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 74 6f e TKDIR macro to
3100: 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 6b point to the Tk
3110: 20 73 6f 75 72 63 65 73 2e 0d 0a 21 65 72 72 6f sources...!erro
3120: 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66 r $(MSG)..!endif
3130: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a 23 20 ..!endif......#
3140: 49 66 20 49 4e 53 54 41 4c 4c 44 49 52 20 73 65 If INSTALLDIR se
3150: 74 20 74 6f 20 54 63 6c 20 69 6e 73 74 61 6c 6c t to Tcl install
3160: 61 74 69 6f 6e 20 72 6f 6f 74 20 64 69 72 20 74 ation root dir t
3170: 68 65 6e 20 72 65 73 65 74 20 74 6f 20 74 68 65 hen reset to the
3180: 0d 0a 23 20 6c 69 62 20 64 69 72 20 66 6f 72 20 ..# lib dir for
3190: 69 6e 73 74 61 6c 6c 69 6e 67 20 65 78 74 65 6e installing exten
31a0: 73 69 6f 6e 73 0d 0a 21 69 66 20 65 78 69 73 74 sions..!if exist
31b0: 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 ("$(_INSTALLDIR)
31c0: 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 \include\tcl.h")
31d0: 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 3d 24 28 .._INSTALLDIR=$(
31e0: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 _INSTALLDIR)\lib
31f0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 45 4e ..!endif....# EN
3200: 44 20 43 61 73 65 20 32 28 63 29 20 6f 72 20 28 D Case 2(c) or (
3210: 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 61 6e d) - Building an
3220: 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 21 65 6e 64 extension..!end
3230: 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e 47 5f if # if $(DOING_
3240: 54 43 4c 29 0d 0a 0d 0a 23 23 23 23 23 23 23 23 TCL)....########
3250: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3260: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3270: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3280: 23 23 23 23 23 23 23 23 0d 0a 23 20 33 2e 20 44 ########..# 3. D
3290: 65 74 65 72 6d 69 6e 65 20 63 6f 6d 70 69 6c 65 etermine compile
32a0: 72 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 61 72 r version and ar
32b0: 63 68 69 74 65 63 74 75 72 65 0d 0a 23 20 49 6e chitecture..# In
32c0: 20 74 68 69 73 20 73 65 63 74 69 6f 6e 2c 20 77 this section, w
32d0: 65 20 66 69 67 75 72 65 20 6f 75 74 20 74 68 65 e figure out the
32e0: 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f compiler versio
32f0: 6e 20 61 6e 64 20 74 68 65 0d 0a 23 20 61 72 63 n and the..# arc
3300: 68 69 74 65 63 74 75 72 65 20 66 6f 72 20 77 68 hitecture for wh
3310: 69 63 68 20 77 65 20 61 72 65 20 62 75 69 6c 64 ich we are build
3320: 69 6e 67 2e 20 54 68 69 73 20 73 65 74 73 20 74 ing. This sets t
3330: 68 65 0d 0a 23 20 66 6f 6c 6c 6f 77 69 6e 67 20 he..# following
3340: 6d 61 63 72 6f 73 3a 0d 0a 23 20 56 43 56 45 52 macros:..# VCVER
3350: 53 49 4f 4e 20 2d 20 74 68 65 20 69 6e 74 65 72 SION - the inter
3360: 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 nal compiler ver
3370: 73 69 6f 6e 20 61 73 20 31 32 30 30 2c 20 31 34 sion as 1200, 14
3380: 30 30 2c 20 31 39 31 30 20 65 74 63 2e 0d 0a 23 00, 1910 etc...#
3390: 20 20 20 20 20 54 68 69 73 20 69 73 20 61 6c 73 This is als
33a0: 6f 20 70 72 69 6e 74 65 64 20 62 79 20 74 68 65 o printed by the
33b0: 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 64 6f 74 compiler in dot
33c0: 74 65 64 20 66 6f 72 6d 20 31 39 2e 31 30 20 65 ted form 19.10 e
33d0: 74 63 2e 0d 0a 23 20 56 43 56 45 52 20 2d 20 74 tc...# VCVER - t
33e0: 68 65 20 22 6d 61 72 6b 65 74 69 6e 67 20 76 65 he "marketing ve
33f0: 72 73 69 6f 6e 22 2c 20 66 6f 72 20 65 78 61 6d rsion", for exam
3400: 70 6c 65 20 56 69 73 75 61 6c 20 43 2b 2b 20 36 ple Visual C++ 6
3410: 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 0d 0a 23 for internal..#
3420: 20 20 20 20 20 63 6f 6d 70 69 6c 65 72 20 76 65 compiler ve
3430: 72 73 69 6f 6e 20 31 32 30 30 2e 20 54 68 69 73 rsion 1200. This
3440: 20 69 73 20 6b 65 70 74 20 6f 6e 6c 79 20 66 6f is kept only fo
3450: 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 r legacy reasons
3460: 20 61 73 20 69 74 0d 0a 23 20 20 20 20 20 64 6f as it..# do
3470: 65 73 20 6e 6f 74 20 6d 61 6b 65 20 73 65 6e 73 es not make sens
3480: 65 20 66 6f 72 20 72 65 63 65 6e 74 20 4d 69 63 e for recent Mic
3490: 72 6f 73 6f 66 74 20 63 6f 6d 70 69 6c 65 72 73 rosoft compilers
34a0: 2e 20 4f 6e 6c 79 20 75 73 65 64 20 66 6f 72 0d . Only used for.
34b0: 0a 23 20 20 20 20 20 6f 75 74 70 75 74 20 64 69 .# output di
34c0: 72 65 63 74 6f 72 79 20 6e 61 6d 65 73 2e 0d 0a rectory names...
34d0: 23 20 41 52 43 48 20 2d 20 73 65 74 20 74 6f 20 # ARCH - set to
34e0: 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 20 41 IX86, ARM64 or A
34f0: 4d 44 36 34 20 64 65 70 65 6e 64 69 6e 67 20 6f MD64 depending o
3500: 6e 20 33 32 2d 20 6f 72 20 36 34 2d 62 69 74 20 n 32- or 64-bit
3510: 74 61 72 67 65 74 0d 0a 23 20 4e 41 54 49 56 45 target..# NATIVE
3520: 5f 41 52 43 48 20 2d 20 73 65 74 20 74 6f 20 49 _ARCH - set to I
3530: 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 20 41 4d X86, ARM64 or AM
3540: 44 36 34 20 66 6f 72 20 74 68 65 20 68 6f 73 74 D64 for the host
3550: 20 6d 61 63 68 69 6e 65 0d 0a 23 20 4d 41 43 48 machine..# MACH
3560: 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20 24 28 INE - same as $(
3570: 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79 0d 0a ARCH) - legacy..
3580: 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 # _VC_MANIFEST_E
3590: 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d 20 2d MBED_{DLL,EXE} -
35a0: 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 65 6d commands for em
35b0: 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 66 65 bedding a manife
35c0: 73 74 20 69 66 20 6e 65 65 64 65 64 0d 0a 0d 0a st if needed....
35d0: 63 63 33 32 09 09 3d 20 24 28 43 43 29 20 20 20 cc32..= $(CC)
35e0: 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 # built-in defau
35f0: 6c 74 2e 0d 0a 6c 69 6e 6b 33 32 09 09 3d 20 6c lt...link32..= l
3600: 69 6e 6b 0d 0a 6c 69 62 33 32 09 09 3d 20 6c 69 ink..lib32..= li
3610: 62 0d 0a 72 63 33 32 09 09 3d 20 24 28 52 43 29 b..rc32..= $(RC)
3620: 20 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 # built-in de
3630: 66 61 75 6c 74 2e 0d 0a 0d 0a 23 2d 2d 2d 2d 2d fault.....#-----
3640: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3650: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3660: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3670: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 46 -----------..# F
3680: 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 63 6f igure out the co
3690: 6d 70 69 6c 65 72 20 61 72 63 68 69 74 65 63 74 mpiler architect
36a0: 75 72 65 20 61 6e 64 20 76 65 72 73 69 6f 6e 20 ure and version
36b0: 62 79 20 77 72 69 74 69 6e 67 0d 0a 23 20 74 68 by writing..# th
36c0: 65 20 43 20 6d 61 63 72 6f 73 20 74 6f 20 61 20 e C macros to a
36d0: 66 69 6c 65 2c 20 70 72 65 70 72 6f 63 65 73 73 file, preprocess
36e0: 69 6e 67 20 74 68 65 6d 20 77 69 74 68 20 74 68 ing them with th
36f0: 65 20 43 0d 0a 23 20 70 72 65 70 72 6f 63 65 73 e C..# preproces
3700: 73 6f 72 20 61 6e 64 20 72 65 61 64 69 6e 67 20 sor and reading
3710: 62 61 63 6b 20 74 68 65 20 63 72 65 61 74 65 64 back the created
3720: 20 66 69 6c 65 0d 0a 0d 0a 5f 48 41 53 48 3d 5e file...._HASH=^
3730: 23 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f #.._VC_MANIFEST_
3740: 45 4d 42 45 44 5f 45 58 45 3d 0d 0a 5f 56 43 5f EMBED_EXE=.._VC_
3750: 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 5f 44 MANIFEST_EMBED_D
3760: 4c 4c 3d 0d 0a 56 43 56 45 52 3d 30 0d 0a 21 69 LL=..VCVER=0..!i
3770: 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 53 49 f ![echo VCVERSI
3780: 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 76 65 ON=_MSC_VER > ve
3790: 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 26 26 rcl.x] \.. &&
37a0: 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 ![echo $(_HASH)
37b0: 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 49 58 if defined(_M_IX
37c0: 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 86) >> vercl.x]
37d0: 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f \.. && ![echo
37e0: 20 41 52 43 48 3d 49 58 38 36 20 3e 3e 20 76 65 ARCH=IX86 >> ve
37f0: 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 26 26 rcl.x] \.. &&
3800: 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 ![echo $(_HASH)
3810: 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f elif defined(_M_
3820: 41 4d 44 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e AMD64) >> vercl.
3830: 78 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 x] \.. && ![e
3840: 63 68 6f 20 41 52 43 48 3d 41 4d 44 36 34 20 3e cho ARCH=AMD64 >
3850: 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 > vercl.x] \..
3860: 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 && ![echo $(_H
3870: 41 53 48 29 65 6c 69 66 20 64 65 66 69 6e 65 64 ASH)elif defined
3880: 28 5f 4d 5f 41 52 4d 36 34 29 20 3e 3e 20 76 65 (_M_ARM64) >> ve
3890: 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 26 26 rcl.x] \.. &&
38a0: 20 21 5b 65 63 68 6f 20 41 52 43 48 3d 41 52 4d ![echo ARCH=ARM
38b0: 36 34 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 64 >> vercl.x] \
38c0: 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 .. && ![echo
38d0: 24 28 5f 48 41 53 48 29 65 6e 64 69 66 20 3e 3e $(_HASH)endif >>
38e0: 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 vercl.x] \..
38f0: 20 26 26 20 21 5b 24 28 63 63 33 32 29 20 2d 6e && ![$(cc32) -n
3900: 6f 6c 6f 67 6f 20 2d 54 43 20 2d 50 20 76 65 72 ologo -TC -P ver
3910: 63 6c 2e 78 20 32 3e 4e 55 4c 5d 0d 0a 21 69 6e cl.x 2>NUL]..!in
3920: 63 6c 75 64 65 20 76 65 72 63 6c 2e 69 0d 0a 21 clude vercl.i..!
3930: 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 if $(VCVERSION)
3940: 3c 20 31 39 30 30 0d 0a 21 69 66 20 21 5b 65 63 < 1900..!if ![ec
3950: 68 6f 20 56 43 56 45 52 3d 20 5e 5c 3e 20 76 65 ho VCVER= ^\> ve
3960: 72 63 6c 2e 76 63 5d 20 5c 0d 0a 20 20 20 20 26 rcl.vc] \.. &
3970: 26 20 21 5b 73 65 74 20 2f 61 20 24 28 56 43 56 & ![set /a $(VCV
3980: 45 52 53 49 4f 4e 29 20 2f 20 31 30 30 20 2d 20 ERSION) / 100 -
3990: 36 20 3e 3e 20 76 65 72 63 6c 2e 76 63 5d 0d 0a 6 >> vercl.vc]..
39a0: 21 69 6e 63 6c 75 64 65 20 76 65 72 63 6c 2e 76 !include vercl.v
39b0: 63 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 c..!endif..!else
39c0: 0d 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 20 63 ..# The simple c
39d0: 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f 76 65 alculation above
39e0: 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c 79 20 does not apply
39f0: 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 53 74 to new Visual St
3a00: 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0d 0a 23 udio releases..#
3a10: 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 69 6c Keep the compil
3a20: 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 69 74 er version in it
3a30: 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e 0d 0a s native form...
3a40: 56 43 56 45 52 20 3d 20 24 28 56 43 56 45 52 53 VCVER = $(VCVERS
3a50: 49 4f 4e 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 ION)..!endif..!e
3a60: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 21 5b 64 65 ndif....!if ![de
3a70: 6c 20 32 3e 4e 55 4c 20 2f 71 2f 66 20 76 65 72 l 2>NUL /q/f ver
3a80: 63 6c 2e 78 20 76 65 72 63 6c 2e 69 20 76 65 72 cl.x vercl.i ver
3a90: 63 6c 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a cl.vc]..!endif..
3aa0: 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ..#-------------
3ab0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3ac0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3ad0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3ae0: 2d 2d 2d 0d 0a 23 20 54 68 65 20 4d 41 43 48 49 ---..# The MACHI
3af0: 4e 45 20 6d 61 63 72 6f 20 69 73 20 75 73 65 64 NE macro is used
3b00: 20 62 79 20 6c 65 67 61 63 79 20 6d 61 6b 65 66 by legacy makef
3b10: 69 6c 65 73 20 73 6f 20 73 65 74 20 69 74 20 61 iles so set it a
3b20: 73 20 77 65 6c 6c 0d 0a 21 69 66 64 65 66 20 4d s well..!ifdef M
3b30: 41 43 48 49 4e 45 0d 0a 21 69 66 20 22 24 28 4d ACHINE..!if "$(M
3b40: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 38 36 ACHINE)" == "x86
3b50: 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4e "..!undef MACHIN
3b60: 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 49 58 38 E..MACHINE = IX8
3b70: 36 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 4d 41 6..!elseif "$(MA
3b80: 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72 6d 36 CHINE)" == "arm6
3b90: 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4"..!undef MACHI
3ba0: 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 41 52 NE..MACHINE = AR
3bb0: 4d 36 34 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 M64..!elseif "$(
3bc0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 36 MACHINE)" == "x6
3bd0: 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4"..!undef MACHI
3be0: 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 41 4d NE..MACHINE = AM
3bf0: 44 36 34 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 D64..!endif..!if
3c00: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 3d "$(MACHINE)" !=
3c10: 20 22 24 28 41 52 43 48 29 22 0d 0a 21 65 72 72 "$(ARCH)"..!err
3c20: 6f 72 20 53 70 65 63 69 66 69 65 64 20 4d 41 43 or Specified MAC
3c30: 48 49 4e 45 20 6d 61 63 72 6f 20 24 28 4d 41 43 HINE macro $(MAC
3c40: 48 49 4e 45 29 20 64 6f 65 73 20 6e 6f 74 20 6d HINE) does not m
3c50: 61 74 63 68 20 64 65 74 65 63 74 65 64 20 74 61 atch detected ta
3c60: 72 67 65 74 20 61 72 63 68 69 74 65 63 74 75 72 rget architectur
3c70: 65 20 24 28 41 52 43 48 29 2e 0d 0a 21 65 6e 64 e $(ARCH)...!end
3c80: 69 66 0d 0a 21 65 6c 73 65 0d 0a 4d 41 43 48 49 if..!else..MACHI
3c90: 4e 45 3d 24 28 41 52 43 48 29 0d 0a 21 65 6e 64 NE=$(ARCH)..!end
3ca0: 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d if....#---------
3cb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3cc0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3cd0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3ce0: 2d 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20 50 4c ------..# The PL
3cf0: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 ATFORM_IDENTIFY
3d00: 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 20 74 68 macro matches th
3d10: 65 20 76 61 6c 75 65 73 20 72 65 74 75 72 6e 65 e values returne
3d20: 64 20 62 79 0d 0a 23 20 74 68 65 20 54 63 6c 20 d by..# the Tcl
3d30: 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e 74 69 platform::identi
3d40: 66 79 20 63 6f 6d 6d 61 6e 64 0d 0a 21 69 66 20 fy command..!if
3d50: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
3d60: 22 41 4d 44 36 34 22 0d 0a 50 4c 41 54 46 4f 52 "AMD64"..PLATFOR
3d70: 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 6e M_IDENTIFY = win
3d80: 33 32 2d 78 38 36 5f 36 34 0d 0a 21 65 6c 73 65 32-x86_64..!else
3d90: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
3da0: 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 50 4c 41 54 == "ARM64"..PLAT
3db0: 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 FORM_IDENTIFY =
3dc0: 77 69 6e 33 32 2d 61 72 6d 0d 0a 21 65 6c 73 65 win32-arm..!else
3dd0: 0d 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 ..PLATFORM_IDENT
3de0: 49 46 59 20 3d 20 77 69 6e 33 32 2d 69 78 38 36 IFY = win32-ix86
3df0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 54 68 ..!endif....# Th
3e00: 65 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 20 e MULTIPLATFORM
3e10: 6d 61 63 72 6f 20 63 6f 6e 74 72 6f 6c 73 20 77 macro controls w
3e20: 68 65 74 68 65 72 20 62 69 6e 61 72 79 20 65 78 hether binary ex
3e30: 74 65 6e 73 69 6f 6e 73 20 61 72 65 20 69 6e 73 tensions are ins
3e40: 74 61 6c 6c 65 64 0d 0a 23 20 69 6e 20 70 6c 61 talled..# in pla
3e50: 74 66 6f 72 6d 2d 73 70 65 63 69 66 69 63 20 64 tform-specific d
3e60: 69 72 65 63 74 6f 72 69 65 73 2e 20 49 6e 74 65 irectories. Inte
3e70: 6e 64 65 64 20 74 6f 20 62 65 20 73 65 74 2f 75 nded to be set/u
3e80: 73 65 64 20 62 79 20 65 78 74 65 6e 73 69 6f 6e sed by extension
3e90: 73 2e 0d 0a 21 69 66 6e 64 65 66 20 4d 55 4c 54 s...!ifndef MULT
3ea0: 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c IPLATFORM_INSTAL
3eb0: 4c 0d 0a 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d L..MULTIPLATFORM
3ec0: 5f 49 4e 53 54 41 4c 4c 20 3d 20 30 0d 0a 21 65 _INSTALL = 0..!e
3ed0: 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d ndif....#-------
3ee0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3ef0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f10: 2d 2d 2d 2d 2d 0d 0a 23 20 46 69 67 75 72 65 20 -----..# Figure
3f20: 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a 20 61 out the *host* a
3f30: 72 63 68 69 74 65 63 74 75 72 65 20 62 79 20 72 rchitecture by r
3f40: 65 61 64 69 6e 67 20 74 68 65 20 72 65 67 69 73 eading the regis
3f50: 74 72 79 0d 0a 0d 0a 21 69 66 20 21 5b 72 65 67 try....!if ![reg
3f60: 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 query HKLM\Hard
3f70: 77 61 72 65 5c 44 65 73 63 72 69 70 74 69 6f 6e ware\Description
3f80: 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 \System\CentralP
3f90: 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 rocessor\0 /v Id
3fa0: 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e 64 73 entifier | finds
3fb0: 74 72 20 2f 69 20 78 38 36 5d 0d 0a 4e 41 54 49 tr /i x86]..NATI
3fc0: 56 45 5f 41 52 43 48 3d 49 58 38 36 0d 0a 21 65 VE_ARCH=IX86..!e
3fd0: 6c 73 65 69 66 20 21 5b 72 65 67 20 71 75 65 72 lseif ![reg quer
3fe0: 79 20 48 4b 4c 4d 5c 48 61 72 64 77 61 72 65 5c y HKLM\Hardware\
3ff0: 44 65 73 63 72 69 70 74 69 6f 6e 5c 53 79 73 74 Description\Syst
4000: 65 6d 5c 43 65 6e 74 72 61 6c 50 72 6f 63 65 73 em\CentralProces
4010: 73 6f 72 5c 30 20 2f 76 20 49 64 65 6e 74 69 66 sor\0 /v Identif
4020: 69 65 72 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 ier | findstr /i
4030: 20 41 52 4d 20 7c 20 66 69 6e 64 73 74 72 20 2f ARM | findstr /
4040: 69 20 36 34 2d 62 69 74 5d 0d 0a 4e 41 54 49 56 i 64-bit]..NATIV
4050: 45 5f 41 52 43 48 3d 41 52 4d 36 34 0d 0a 21 65 E_ARCH=ARM64..!e
4060: 6c 73 65 0d 0a 4e 41 54 49 56 45 5f 41 52 43 48 lse..NATIVE_ARCH
4070: 3d 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66 0d 0a =AMD64..!endif..
4080: 0d 0a 23 20 53 69 6e 63 65 20 4d 53 56 43 38 20 ..# Since MSVC8
4090: 77 65 20 6d 75 73 74 20 64 65 61 6c 20 77 69 74 we must deal wit
40a0: 68 20 6d 61 6e 69 66 65 73 74 20 72 65 73 6f 75 h manifest resou
40b0: 72 63 65 73 2e 0d 0a 21 69 66 20 24 28 56 43 56 rces...!if $(VCV
40c0: 45 52 53 49 4f 4e 29 20 3e 3d 20 31 34 30 30 0d ERSION) >= 1400.
40d0: 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d ._VC_MANIFEST_EM
40e0: 42 45 44 5f 45 58 45 3d 69 66 20 65 78 69 73 74 BED_EXE=if exist
40f0: 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 6d 74 20 $@.manifest mt
4100: 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66 65 73 -nologo -manifes
4110: 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 2d 6f t $@.manifest -o
4120: 75 74 70 75 74 72 65 73 6f 75 72 63 65 3a 24 40 utputresource:$@
4130: 3b 31 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 ;1.._VC_MANIFEST
4140: 5f 45 4d 42 45 44 5f 44 4c 4c 3d 69 66 20 65 78 _EMBED_DLL=if ex
4150: 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 ist $@.manifest
4160: 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 mt -nologo -mani
4170: 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 fest $@.manifest
4180: 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 63 65 -outputresource
4190: 3a 24 40 3b 32 0d 0a 21 65 6e 64 69 66 0d 0a 0d :$@;2..!endif...
41a0: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
41b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
41c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
41d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
41e0: 23 0d 0a 23 20 34 2e 20 42 75 69 6c 64 20 74 68 #..# 4. Build th
41f0: 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f 67 72 e nmakehlp progr
4200: 61 6d 0d 0a 23 20 54 68 69 73 20 69 73 20 61 20 am..# This is a
4210: 68 65 6c 70 65 72 20 61 70 70 20 77 65 20 6e 65 helper app we ne
4220: 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 6e ed to overcome n
4230: 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e 67 0d make's limiting.
4240: 0a 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 20 .# environment.
4250: 57 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f 75 74 We will call out
4260: 20 74 6f 20 69 74 20 74 6f 20 67 65 74 20 76 61 to it to get va
4270: 72 69 6f 75 73 20 62 69 74 73 20 6f 66 0d 0a 23 rious bits of..#
4280: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f information abo
4290: 75 74 20 73 75 70 70 6f 72 74 65 64 20 63 6f 6d ut supported com
42a0: 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 65 74 piler options et
42b0: 63 2e 0d 0a 23 0d 0a 23 20 54 63 6c 20 69 74 73 c...#..# Tcl its
42c0: 65 6c 66 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 elf will always
42d0: 75 73 65 20 74 68 65 20 6e 6d 61 6b 65 68 6c 70 use the nmakehlp
42e0: 2e 63 20 70 72 6f 67 72 61 6d 20 77 68 69 63 68 .c program which
42f0: 20 69 73 0d 0a 23 20 69 6e 20 69 74 73 20 6f 77 is..# in its ow
4300: 6e 20 73 6f 75 72 63 65 2e 20 49 74 20 77 69 6c n source. It wil
4310: 6c 20 62 65 20 6b 65 70 74 20 75 70 64 61 74 65 l be kept update
4320: 64 20 74 68 65 72 65 2e 0d 0a 23 0d 0a 23 20 45 d there...#..# E
4330: 78 74 65 6e 73 69 6f 6e 73 20 62 75 69 6c 74 20 xtensions built
4340: 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 against an insta
4350: 6c 6c 65 64 20 54 63 6c 20 77 69 6c 6c 20 75 73 lled Tcl will us
4360: 65 20 74 68 65 20 69 6e 73 74 61 6c 6c 65 64 0d e the installed.
4370: 0a 23 20 63 6f 70 79 20 6f 66 20 54 63 6c 27 73 .# copy of Tcl's
4380: 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 69 66 20 74 nmakehlp.c if t
4390: 68 65 72 65 20 69 73 20 6f 6e 65 20 61 6e 64 20 here is one and
43a0: 74 68 65 69 72 20 6f 77 6e 20 76 65 72 73 69 6f their own versio
43b0: 6e 0d 0a 23 20 6f 74 68 65 72 77 69 73 65 2e 20 n..# otherwise.
43c0: 49 6e 20 74 68 65 20 6c 61 74 74 65 72 20 63 61 In the latter ca
43d0: 73 65 2c 20 74 68 65 79 20 77 6f 75 6c 64 20 61 se, they would a
43e0: 6c 73 6f 20 62 65 20 75 73 69 6e 67 20 74 68 65 lso be using the
43f0: 69 72 20 6f 77 6e 0d 0a 23 20 72 75 6c 65 73 2e ir own..# rules.
4400: 76 63 2e 20 4e 6f 74 65 20 74 68 61 74 20 6f 6c vc. Note that ol
4410: 64 65 72 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 der versions of
4420: 54 63 6c 20 64 6f 20 6e 6f 74 20 69 6e 73 74 61 Tcl do not insta
4430: 6c 6c 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a 23 ll nmakehlp.c..#
4440: 20 6f 72 20 72 75 6c 65 73 2e 76 63 2e 0d 0a 23 or rules.vc...#
4450: 0d 0a 23 20 45 78 74 65 6e 73 69 6f 6e 73 20 62 ..# Extensions b
4460: 75 69 6c 74 20 61 67 61 69 6e 73 74 20 54 63 6c uilt against Tcl
4470: 20 73 6f 75 72 63 65 73 20 77 69 6c 6c 20 75 73 sources will us
4480: 65 20 74 68 65 20 6f 6e 65 20 66 72 6f 6d 20 74 e the one from t
4490: 68 65 20 54 63 6c 20 73 6f 75 72 63 65 2e 0d 0a he Tcl source...
44a0: 23 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 #..# When buildi
44b0: 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 ng an extension
44c0: 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 69 65 using a sufficie
44d0: 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 6f 6e ntly new version
44e0: 20 6f 66 20 54 63 6c 2c 0d 0a 23 20 72 75 6c 65 of Tcl,..# rule
44f0: 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 64 65 s-ext.vc will de
4500: 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 20 61 fine NMAKEHLPC a
4510: 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74 6f 20 ppropriately to
4520: 70 6f 69 6e 74 20 74 6f 20 74 68 65 0d 0a 23 20 point to the..#
4530: 63 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 6c 70 copy of nmakehlp
4540: 2e 63 20 74 6f 20 62 65 20 75 73 65 64 2e 0d 0a .c to be used...
4550: 0d 0a 21 69 66 6e 64 65 66 20 4e 4d 41 4b 45 48 ..!ifndef NMAKEH
4560: 4c 50 43 0d 0a 23 20 44 65 66 61 75 6c 74 20 74 LPC..# Default t
4570: 6f 20 74 68 65 20 6f 6e 65 20 69 6e 20 74 68 65 o the one in the
4580: 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f current directo
4590: 72 79 20 28 74 68 65 20 65 78 74 65 6e 73 69 6f ry (the extensio
45a0: 6e 27 73 20 6f 77 6e 20 6e 6d 61 6b 65 68 6c 70 n's own nmakehlp
45b0: 2e 63 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d .c)..NMAKEHLPC =
45c0: 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a 0d 0a 21 nmakehlp.c....!
45d0: 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 if !$(DOING_TCL)
45e0: 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 ..!if $(TCLINSTA
45f0: 4c 4c 29 0d 0a 21 69 66 20 65 78 69 73 74 28 22 LL)..!if exist("
4600: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e $(_TCLDIR)\lib\n
4610: 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 22 make\nmakehlp.c"
4620: 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 24 )..NMAKEHLPC = $
4630: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d (_TCLDIR)\lib\nm
4640: 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a ake\nmakehlp.c..
4650: 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 20 23 20 !endif..!else #
4660: 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0d 0a !$(TCLINSTALL)..
4670: 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 !if exist("$(_TC
4680: 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 6b 65 68 LDIR)\win\nmakeh
4690: 6c 70 2e 63 22 29 0d 0a 4e 4d 41 4b 45 48 4c 50 lp.c")..NMAKEHLP
46a0: 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 C = $(_TCLDIR)\w
46b0: 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a 21 in\nmakehlp.c..!
46c0: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 23 20 endif..!endif #
46d0: 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0d 0a 21 $(TCLINSTALL)..!
46e0: 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e 47 endif # !$(DOING
46f0: 5f 54 43 4c 29 0d 0a 0d 0a 21 65 6e 64 69 66 20 _TCL)....!endif
4700: 23 20 4e 4d 41 4b 45 48 4c 50 43 0d 0a 0d 0a 23 # NMAKEHLPC....#
4710: 20 57 65 20 61 6c 77 61 79 73 20 62 75 69 6c 64 We always build
4720: 20 6e 6d 61 6b 65 68 6c 70 20 65 76 65 6e 20 69 nmakehlp even i
4730: 66 20 69 74 20 65 78 69 73 74 73 20 73 69 6e 63 f it exists sinc
4740: 65 20 77 65 20 64 6f 20 6e 6f 74 20 6b 6e 6f 77 e we do not know
4750: 0d 0a 23 20 77 68 61 74 20 73 6f 75 72 63 65 20 ..# what source
4760: 69 74 20 77 61 73 20 62 75 69 6c 74 20 66 72 6f it was built fro
4770: 6d 2e 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 m...!if "$(MACHI
4780: 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 20 7c NE)" == "IX86" |
4790: 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d | "$(MACHINE)" =
47a0: 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 43 48 = "$(NATIVE_ARCH
47b0: 29 22 0d 0a 21 69 66 20 5b 24 28 63 63 33 32 29 )"..!if [$(cc32)
47c0: 20 2d 6e 6f 6c 6f 67 6f 20 22 24 28 4e 4d 41 4b -nologo "$(NMAK
47d0: 45 48 4c 50 43 29 22 20 2d 6c 69 6e 6b 20 2d 73 EHLPC)" -link -s
47e0: 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f 6c 65 ubsystem:console
47f0: 20 3e 20 6e 75 6c 5d 0d 0a 21 65 6e 64 69 66 0d > nul]..!endif.
4800: 0a 21 65 6c 73 65 0d 0a 21 69 66 20 5b 63 6f 70 .!else..!if [cop
4810: 79 20 24 28 4e 4d 41 4b 45 48 4c 50 43 3a 6e 6d y $(NMAKEHLPC:nm
4820: 61 6b 65 68 6c 70 2e 63 3d 78 38 36 5f 36 34 2d akehlp.c=x86_64-
4830: 77 36 34 2d 6d 69 6e 67 77 33 32 2d 6e 6d 61 6b w64-mingw32-nmak
4840: 65 68 6c 70 2e 65 78 65 29 20 6e 6d 61 6b 65 68 ehlp.exe) nmakeh
4850: 6c 70 2e 65 78 65 20 3e 4e 55 4c 5d 0d 0a 21 65 lp.exe >NUL]..!e
4860: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ndif..!endif....
4870: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4880: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4890: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
48a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
48b0: 0d 0a 23 20 35 2e 20 54 65 73 74 20 66 6f 72 20 ..# 5. Test for
48c0: 63 6f 6d 70 69 6c 65 72 20 66 65 61 74 75 72 65 compiler feature
48d0: 73 0d 0a 23 20 56 69 73 75 61 6c 20 43 2b 2b 20 s..# Visual C++
48e0: 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 compiler options
48f0: 20 68 61 76 65 20 63 68 61 6e 67 65 64 20 6f 76 have changed ov
4900: 65 72 20 74 68 65 20 79 65 61 72 73 2e 20 43 68 er the years. Ch
4910: 65 63 6b 0d 0a 23 20 77 68 69 63 68 20 6f 70 74 eck..# which opt
4920: 69 6f 6e 73 20 61 72 65 20 73 75 70 70 6f 72 74 ions are support
4930: 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 69 6c ed by the compil
4940: 65 72 20 69 6e 20 75 73 65 2e 0d 0a 23 0d 0a 23 er in use...#..#
4950: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d The following m
4960: 61 63 72 6f 73 20 61 72 65 20 73 65 74 3a 0d 0a acros are set:..
4970: 23 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 # OPTIMIZATIONS
4980: 2d 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 66 - the compiler f
4990: 6c 61 67 73 20 74 6f 20 62 65 20 75 73 65 64 20 lags to be used
49a0: 66 6f 72 20 6f 70 74 69 6d 69 7a 65 64 20 62 75 for optimized bu
49b0: 69 6c 64 73 0d 0a 23 20 44 45 42 55 47 46 4c 41 ilds..# DEBUGFLA
49c0: 47 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c 65 GS - the compile
49d0: 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 73 r flags to be us
49e0: 65 64 20 66 6f 72 20 64 65 62 75 67 20 62 75 69 ed for debug bui
49f0: 6c 64 73 0d 0a 23 20 4c 49 4e 4b 45 52 46 4c 41 lds..# LINKERFLA
4a00: 47 53 20 2d 20 46 6c 61 67 73 20 70 61 73 73 65 GS - Flags passe
4a10: 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b 65 72 0d d to the linker.
4a20: 0a 23 0d 0a 23 20 4e 6f 74 65 20 74 68 61 74 20 .#..# Note that
4a30: 74 68 65 73 65 20 61 72 65 20 74 68 65 20 63 6f these are the co
4a40: 6d 70 69 6c 65 72 20 73 65 74 74 69 6e 67 73 20 mpiler settings
4a50: 2a 61 76 61 69 6c 61 62 6c 65 2a 2c 20 6e 6f 74 *available*, not
4a60: 20 74 68 6f 73 65 0d 0a 23 20 74 68 61 74 20 77 those..# that w
4a70: 69 6c 6c 20 62 65 20 2a 75 73 65 64 2a 2e 20 54 ill be *used*. T
4a80: 68 65 20 6c 61 74 74 65 72 20 64 65 70 65 6e 64 he latter depend
4a90: 73 20 6f 6e 20 74 68 65 20 4f 50 54 53 20 6d 61 s on the OPTS ma
4aa0: 63 72 6f 20 73 65 74 74 69 6e 67 73 0d 0a 23 20 cro settings..#
4ab0: 77 68 69 63 68 20 77 65 20 68 61 76 65 20 6e 6f which we have no
4ac0: 74 20 79 65 74 20 70 61 72 73 65 64 2e 0d 0a 23 t yet parsed...#
4ad0: 0d 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 20 74 68 ..# Also note th
4ae0: 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 65 20 66 at some of the f
4af0: 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d 49 5a 41 lags in OPTIMIZA
4b00: 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 20 72 65 TIONS are not re
4b10: 61 6c 6c 79 0d 0a 23 20 72 65 6c 61 74 65 64 20 ally..# related
4b20: 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e to optimization.
4b30: 20 54 68 65 79 20 61 72 65 20 70 6c 61 63 65 64 They are placed
4b40: 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f 72 20 there only for
4b50: 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 0d 0a legacy reasons..
4b60: 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65 6e 73 # as some extens
4b70: 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68 65 6d ions expect them
4b80: 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65 64 20 to be included
4b90: 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e 0d 0a in that macro...
4ba0: 0d 0a 23 20 2d 4f 70 20 69 6d 70 72 6f 76 65 73 ..# -Op improves
4bb0: 20 66 6c 6f 61 74 20 63 6f 6e 73 69 73 74 65 6e float consisten
4bc0: 63 79 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20 6e 65 cy. Note only ne
4bd0: 65 64 65 64 20 66 6f 72 20 6f 6c 64 65 72 20 63 eded for older c
4be0: 6f 6d 70 69 6c 65 72 73 0d 0a 23 20 4e 65 77 65 ompilers..# Newe
4bf0: 72 20 63 6f 6d 70 69 6c 65 72 73 20 64 6f 20 6e r compilers do n
4c00: 6f 74 20 6e 65 65 64 20 6f 72 20 73 75 70 70 6f ot need or suppo
4c10: 72 74 20 74 68 69 73 20 6f 70 74 69 6f 6e 2e 0d rt this option..
4c20: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
4c30: 63 20 2d 4f 70 5d 0d 0a 46 50 4f 50 54 53 20 20 c -Op]..FPOPTS
4c40: 3d 20 2d 4f 70 0d 0a 21 65 6e 64 69 66 0d 0a 0d = -Op..!endif...
4c50: 0a 23 20 53 74 72 69 63 74 20 66 6c 6f 61 74 69 .# Strict floati
4c60: 6e 67 20 70 6f 69 6e 74 20 73 65 6d 61 6e 74 69 ng point semanti
4c70: 63 73 20 2d 20 70 72 65 73 65 6e 74 20 69 6e 20 cs - present in
4c80: 6e 65 77 65 72 20 63 6f 6d 70 69 6c 65 72 73 20 newer compilers
4c90: 69 6e 20 6c 69 65 75 20 6f 66 20 2d 4f 70 0d 0a in lieu of -Op..
4ca0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 !if [nmakehlp -c
4cb0: 20 2d 66 70 3a 73 74 72 69 63 74 5d 0d 0a 46 50 -fp:strict]..FP
4cc0: 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50 54 53 OPTS = $(FPOPTS
4cd0: 29 20 2d 66 70 3a 73 74 72 69 63 74 0d 0a 21 65 ) -fp:strict..!e
4ce0: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 22 24 28 4d ndif....!if "$(M
4cf0: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 ACHINE)" == "IX8
4d00: 36 22 0d 0a 23 23 23 20 74 65 73 74 20 66 6f 72 6"..### test for
4d10: 20 70 65 6e 74 69 75 6d 20 65 72 72 61 74 61 0d pentium errata.
4d20: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
4d30: 63 20 2d 51 49 30 66 5d 0d 0a 21 6d 65 73 73 61 c -QI0f]..!messa
4d40: 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 ge *** Compiler
4d50: 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30 78 30 has 'Pentium 0x0
4d60: 66 20 66 69 78 27 0d 0a 46 50 4f 50 54 53 20 20 f fix'..FPOPTS
4d70: 3d 20 24 28 46 50 4f 50 54 53 29 20 2d 51 49 30 = $(FPOPTS) -QI0
4d80: 66 0d 0a 21 65 6c 73 65 0d 0a 21 6d 65 73 73 61 f..!else..!messa
4d90: 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 ge *** Compiler
4da0: 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 27 50 does not have 'P
4db0: 65 6e 74 69 75 6d 20 30 78 30 66 20 66 69 78 27 entium 0x0f fix'
4dc0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 ..!endif..!endif
4dd0: 0d 0a 0d 0a 23 23 23 20 74 65 73 74 20 66 6f 72 ....### test for
4de0: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 0d 0a optimizations..
4df0: 23 20 2f 4f 32 20 6f 70 74 69 6d 69 7a 61 74 69 # /O2 optimizati
4e00: 6f 6e 20 69 6e 63 6c 75 64 65 73 20 2f 4f 67 20 on includes /Og
4e10: 2f 4f 69 20 2f 4f 74 20 2f 4f 79 20 2f 4f 62 32 /Oi /Ot /Oy /Ob2
4e20: 20 2f 47 73 20 2f 47 46 20 2f 47 79 20 61 73 20 /Gs /GF /Gy as
4e30: 70 65 72 0d 0a 23 20 64 6f 63 75 6d 65 6e 74 61 per..# documenta
4e40: 74 69 6f 6e 2e 20 4e 6f 74 65 20 77 65 20 64 6f tion. Note we do
4e50: 20 4e 4f 54 20 77 61 6e 74 20 2f 47 73 20 61 73 NOT want /Gs as
4e60: 20 74 68 61 74 20 69 6e 73 65 72 74 73 20 61 20 that inserts a
4e70: 5f 63 68 6b 73 74 6b 0d 0a 23 20 73 74 61 63 6b _chkstk..# stack
4e80: 20 70 72 6f 62 65 20 61 74 20 2a 65 76 65 72 79 probe at *every
4e90: 2a 20 66 75 6e 63 74 69 6f 6e 20 65 6e 74 72 79 * function entry
4ea0: 2c 20 6e 6f 74 20 6a 75 73 74 20 74 68 6f 73 65 , not just those
4eb0: 20 77 69 74 68 20 6d 6f 72 65 20 74 68 61 6e 0d with more than.
4ec0: 0a 23 20 61 20 70 61 67 65 20 6f 66 20 73 74 61 .# a page of sta
4ed0: 63 6b 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 72 65 ck allocation re
4ee0: 73 75 6c 74 69 6e 67 20 69 6e 20 61 20 70 65 72 sulting in a per
4ef0: 66 6f 72 6d 61 6e 63 65 20 68 69 74 2e 20 20 48 formance hit. H
4f00: 6f 77 65 76 65 72 2c 0d 0a 23 20 2f 4f 32 20 64 owever,..# /O2 d
4f10: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69 73 20 ocumentation is
4f20: 6d 69 73 6c 65 61 64 69 6e 67 20 61 73 20 69 74 misleading as it
4f30: 73 20 73 74 61 63 6b 20 70 72 6f 62 65 73 20 61 s stack probes a
4f40: 72 65 20 73 69 6d 70 6c 79 20 74 68 65 0d 0a 23 re simply the..#
4f50: 20 64 65 66 61 75 6c 74 20 70 61 67 65 20 73 69 default page si
4f60: 7a 65 20 6c 6f 63 61 6c 73 20 61 6c 6c 6f 63 61 ze locals alloca
4f70: 74 69 6f 6e 20 70 72 6f 62 65 73 20 61 6e 64 20 tion probes and
4f80: 6e 6f 74 20 77 68 61 74 20 69 73 20 69 6d 70 6c not what is impl
4f90: 69 65 64 0d 0a 23 20 62 79 20 61 6e 20 65 78 70 ied..# by an exp
4fa0: 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 69 6f 6e licit /Gs option
4fb0: 2e 0d 0a 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f .....OPTIMIZATIO
4fc0: 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29 0d 0a NS = $(FPOPTS)..
4fd0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
4fe0: 2d 63 20 2d 4f 32 5d 0d 0a 4f 50 54 49 4d 49 5a -c -O2]..OPTIMIZ
4ff0: 49 4e 47 20 3d 20 31 0d 0a 4f 50 54 49 4d 49 5a ING = 1..OPTIMIZ
5000: 41 54 49 4f 4e 53 20 20 20 3d 20 24 28 4f 50 54 ATIONS = $(OPT
5010: 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d 4f 32 0d IMIZATIONS) -O2.
5020: 0a 21 65 6c 73 65 0d 0a 23 20 4c 65 67 61 63 79 .!else..# Legacy
5030: 2c 20 72 65 61 6c 6c 79 2e 20 41 6c 6c 20 6d 6f , really. All mo
5040: 64 65 72 6e 20 63 6f 6d 70 69 6c 65 72 73 20 73 dern compilers s
5050: 75 70 70 6f 72 74 20 74 68 69 73 0d 0a 21 6d 65 upport this..!me
5060: 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c ssage *** Compil
5070: 65 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 er does not have
5080: 20 27 4f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 27 'Optimizations'
5090: 0d 0a 4f 50 54 49 4d 49 5a 49 4e 47 20 3d 20 30 ..OPTIMIZING = 0
50a0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 43 68 ..!endif....# Ch
50b0: 65 63 6b 73 20 66 6f 72 20 62 75 66 66 65 72 20 ecks for buffer
50c0: 6f 76 65 72 66 6c 6f 77 73 20 69 6e 20 6c 6f 63 overflows in loc
50d0: 61 6c 20 61 72 72 61 79 73 0d 0a 21 69 66 20 5b al arrays..!if [
50e0: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 53 5d nmakehlp -c -GS]
50f0: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ..OPTIMIZATIONS
5100: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
5110: 4e 53 29 20 2d 47 53 0d 0a 21 65 6e 64 69 66 0d NS) -GS..!endif.
5120: 0a 0d 0a 23 20 4c 69 6e 6b 20 74 69 6d 65 20 6f ...# Link time o
5130: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e 6f 74 ptimization. Not
5140: 65 20 74 68 61 74 20 74 68 69 73 20 6f 70 74 69 e that this opti
5150: 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c 79 29 on (potentially)
5160: 20 6d 61 6b 65 73 0d 0a 23 20 67 65 6e 65 72 61 makes..# genera
5170: 74 65 64 20 6c 69 62 72 61 72 69 65 73 20 6f 6e ted libraries on
5180: 6c 79 20 75 73 61 62 6c 65 20 62 79 20 74 68 65 ly usable by the
5190: 20 73 70 65 63 69 66 69 63 20 56 43 2b 2b 20 76 specific VC++ v
51a0: 65 72 73 69 6f 6e 20 74 68 61 74 0d 0a 23 20 63 ersion that..# c
51b0: 72 65 61 74 65 64 20 69 74 2e 20 52 65 71 75 69 reated it. Requi
51c0: 72 65 73 20 2f 4c 54 43 47 20 6c 69 6e 6b 65 72 res /LTCG linker
51d0: 20 6f 70 74 69 6f 6e 0d 0a 21 69 66 20 5b 6e 6d option..!if [nm
51e0: 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d 0d 0a akehlp -c -GL]..
51f0: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d OPTIMIZATIONS =
5200: 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 $(OPTIMIZATIONS
5210: 29 20 2d 47 4c 0d 0a 43 43 5f 47 4c 5f 4f 50 54 ) -GL..CC_GL_OPT
5220: 5f 45 4e 41 42 4c 45 44 20 3d 20 31 0d 0a 21 65 _ENABLED = 1..!e
5230: 6c 73 65 0d 0a 23 20 49 6e 20 6e 65 77 65 72 20 lse..# In newer
5240: 63 6f 6d 70 69 6c 65 72 73 20 2d 47 4c 20 61 6e compilers -GL an
5250: 64 20 2d 59 58 20 61 72 65 20 69 6e 63 6f 6d 70 d -YX are incomp
5260: 61 74 69 62 6c 65 2e 0d 0a 21 69 66 20 5b 6e 6d atible...!if [nm
5270: 61 6b 65 68 6c 70 20 2d 63 20 2d 59 58 5d 0d 0a akehlp -c -YX]..
5280: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d OPTIMIZATIONS =
5290: 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 $(OPTIMIZATIONS
52a0: 29 20 2d 59 58 0d 0a 21 65 6e 64 69 66 0d 0a 21 ) -YX..!endif..!
52b0: 65 6e 64 69 66 20 23 20 5b 6e 6d 61 6b 65 68 6c endif # [nmakehl
52c0: 70 20 2d 63 20 2d 47 4c 5d 0d 0a 0d 0a 44 45 42 p -c -GL]....DEB
52d0: 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 24 28 UGFLAGS = $(
52e0: 46 50 4f 50 54 53 29 0d 0a 0d 0a 23 20 52 75 6e FPOPTS)....# Run
52f0: 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68 65 63 time error chec
5300: 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61 62 6c ks. Not availabl
5310: 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20 61 20 e or valid in a
5320: 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64 65 62 release, non-deb
5330: 75 67 20 62 75 69 6c 64 0d 0a 23 20 52 54 43 20 ug build..# RTC
5340: 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20 63 6f is for modern co
5350: 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69 73 20 mpilers, -GZ is
5360: 6c 65 67 61 63 79 0d 0a 21 69 66 20 5b 6e 6d 61 legacy..!if [nma
5370: 6b 65 68 6c 70 20 2d 63 20 2d 52 54 43 31 5d 0d kehlp -c -RTC1].
5380: 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 .DEBUGFLAGS
5390: 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 = $(DEBUGFLAGS)
53a0: 2d 52 54 43 31 0d 0a 21 65 6c 73 65 69 66 20 5b -RTC1..!elseif [
53b0: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 5a 5d nmakehlp -c -GZ]
53c0: 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 ..DEBUGFLAGS
53d0: 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 = $(DEBUGFLAGS)
53e0: 20 2d 47 5a 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a -GZ..!endif....
53f0: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d #---------------
5400: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5410: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5420: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5430: 2d 0d 0a 23 20 4c 69 6e 6b 65 72 20 66 6c 61 67 -..# Linker flag
5440: 73 0d 0a 0d 0a 23 20 4c 49 4e 4b 45 52 5f 54 45 s....# LINKER_TE
5450: 53 54 46 4c 41 47 53 20 61 72 65 20 66 6f 72 20 STFLAGS are for
5460: 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 77 68 65 internal use whe
5470: 6e 20 77 65 20 63 61 6c 6c 20 6e 6d 61 6b 65 68 n we call nmakeh
5480: 6c 70 20 74 6f 20 74 65 73 74 0d 0a 23 20 69 66 lp to test..# if
5490: 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 75 70 70 the linker supp
54a0: 6f 72 74 73 20 61 20 73 70 65 63 69 66 69 63 20 orts a specific
54b0: 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f 75 74 20 option. Without
54c0: 74 68 65 73 65 20 66 6c 61 67 73 20 6c 69 6e 6b these flags link
54d0: 20 77 69 6c 6c 0d 0a 23 20 72 65 74 75 72 6e 20 will..# return
54e0: 22 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72 79 20 "LNK1561: entry
54f0: 70 6f 69 6e 74 20 6d 75 73 74 20 62 65 20 64 65 point must be de
5500: 66 69 6e 65 64 22 20 65 72 72 6f 72 20 63 6f 6d fined" error com
5510: 70 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53 2d 49 piling from VS-I
5520: 44 45 3a 0d 0a 23 20 54 68 65 79 20 61 72 65 20 DE:..# They are
5530: 6e 6f 74 20 70 61 73 73 65 64 20 74 68 72 6f 75 not passed throu
5540: 67 68 20 74 6f 20 74 68 65 20 61 63 74 75 61 6c gh to the actual
5550: 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 2f 20 65 application / e
5560: 78 74 65 6e 73 69 6f 6e 0d 0a 23 20 6c 69 6e 6b xtension..# link
5570: 20 72 75 6c 65 73 2e 0d 0a 21 69 66 6e 64 65 66 rules...!ifndef
5580: 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 LINKER_TESTFLAG
5590: 53 0d 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c S..LINKER_TESTFL
55a0: 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f 45 4e AGS = /DLL /NOEN
55b0: 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 68 6c TRY /OUT:nmakehl
55c0: 70 2e 6f 75 74 0d 0a 21 65 6e 64 69 66 0d 0a 0d p.out..!endif...
55d0: 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 20 20 20 .LINKERFLAGS
55e0: 20 3d 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d 70 69 =....# If compi
55f0: 6c 65 72 20 68 61 73 20 65 6e 61 62 6c 65 64 20 ler has enabled
5600: 6c 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69 6d 69 link time optimi
5610: 7a 61 74 69 6f 6e 2c 20 6c 69 6e 6b 65 72 20 6d zation, linker m
5620: 75 73 74 20 74 6f 6f 20 77 69 74 68 20 2d 6c 74 ust too with -lt
5630: 63 67 0d 0a 21 69 66 64 65 66 20 43 43 5f 47 4c cg..!ifdef CC_GL
5640: 5f 4f 50 54 5f 45 4e 41 42 4c 45 44 0d 0a 21 69 _OPT_ENABLED..!i
5650: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d f [nmakehlp -l -
5660: 6c 74 63 67 20 24 28 4c 49 4e 4b 45 52 5f 54 45 ltcg $(LINKER_TE
5670: 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b 45 STFLAGS)]..LINKE
5680: 52 46 4c 41 47 53 20 20 20 20 20 3d 20 24 28 4c RFLAGS = $(L
5690: 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6c 74 63 INKERFLAGS) -ltc
56a0: 67 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 g..!endif..!endi
56b0: 66 0d 0a 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 f......#########
56c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
56d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
56e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
56f0: 23 23 23 23 23 23 23 0d 0a 23 20 36 2e 20 45 78 #######..# 6. Ex
5700: 74 72 61 63 74 20 76 61 72 69 6f 75 73 20 76 65 tract various ve
5710: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 66 72 rsion numbers fr
5720: 6f 6d 20 68 65 61 64 65 72 73 0d 0a 23 20 46 6f om headers..# Fo
5730: 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20 76 65 r Tcl and Tk, ve
5740: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 61 72 rsion numbers ar
5750: 65 20 65 78 74 72 61 63 74 65 64 20 66 72 6f 6d e extracted from
5760: 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e 68 0d tcl.h and tk.h.
5770: 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e .# respectively.
5780: 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c For extensions,
5790: 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20 65 78 versions are ex
57a0: 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 68 65 tracted from the
57b0: 0d 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e ..# configure.in
57c0: 20 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 or configure.ac
57d0: 20 66 72 6f 6d 20 74 68 65 20 54 45 41 20 63 6f from the TEA co
57e0: 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 66 20 69 nfiguration if i
57f0: 74 0d 0a 23 20 65 78 69 73 74 73 2c 20 61 6e 64 t..# exists, and
5800: 20 75 6e 73 65 74 20 6f 74 68 65 72 77 69 73 65 unset otherwise
5810: 2e 0d 0a 23 20 53 65 74 73 20 74 68 65 20 66 6f ...# Sets the fo
5820: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0d llowing macros:.
5830: 0a 23 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 .# TCL_MAJOR_VER
5840: 53 49 4f 4e 0d 0a 23 20 54 43 4c 5f 4d 49 4e 4f SION..# TCL_MINO
5850: 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54 43 4c R_VERSION..# TCL
5860: 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 0d _RELEASE_SERIAL.
5870: 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 .# TCL_PATCH_LEV
5880: 45 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f EL..# TCL_PATCH_
5890: 4c 45 54 54 45 52 0d 0a 23 20 54 43 4c 5f 56 45 LETTER..# TCL_VE
58a0: 52 53 49 4f 4e 0d 0a 23 20 54 4b 5f 4d 41 4a 4f RSION..# TK_MAJO
58b0: 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54 4b 5f R_VERSION..# TK_
58c0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 MINOR_VERSION..#
58d0: 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 TK_RELEASE_SERI
58e0: 41 4c 0d 0a 23 20 54 4b 5f 50 41 54 43 48 5f 4c AL..# TK_PATCH_L
58f0: 45 56 45 4c 0d 0a 23 20 54 4b 5f 50 41 54 43 48 EVEL..# TK_PATCH
5900: 5f 4c 45 54 54 45 52 0d 0a 23 20 54 4b 5f 56 45 _LETTER..# TK_VE
5910: 52 53 49 4f 4e 0d 0a 23 20 44 4f 54 56 45 52 53 RSION..# DOTVERS
5920: 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 66 6f ION - set as (fo
5930: 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35 0d 0a r example) 2.5..
5940: 23 20 56 45 52 53 49 4f 4e 20 2d 20 73 65 74 20 # VERSION - set
5950: 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c 65 20 as (for example
5960: 32 35 29 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 25)..#----------
5970: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5980: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5990: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
59a0: 2d 2d 2d 2d 0d 0a 0d 0a 21 69 66 20 5b 65 63 68 ----....!if [ech
59b0: 6f 20 52 45 4d 20 3d 20 54 68 69 73 20 66 69 6c o REM = This fil
59c0: 65 20 69 73 20 67 65 6e 65 72 61 74 65 64 20 66 e is generated f
59d0: 72 6f 6d 20 72 75 6c 65 73 2e 76 63 20 3e 20 76 rom rules.vc > v
59e0: 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e ersions.vc]..!en
59f0: 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 dif..!if [echo T
5a00: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
5a10: 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e = \>> versions.
5a20: 76 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d vc] \.. && [nm
5a30: 61 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 akehlp -V "$(_TC
5a40: 4c 5f 48 29 22 20 22 64 65 66 69 6e 65 20 54 43 L_H)" "define TC
5a50: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 22 L_MAJOR_VERSION"
5a60: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
5a70: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 ..!endif..!if [e
5a80: 63 68 6f 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 cho TCL_MINOR_VE
5a90: 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 RSION = \>> vers
5aa0: 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 ions.vc] \.. &
5ab0: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 & [nmakehlp -V "
5ac0: 24 28 5f 54 43 4c 5f 48 29 22 20 22 64 65 66 69 $(_TCL_H)" "defi
5ad0: 6e 65 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 ne TCL_MINOR_VER
5ae0: 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e SION" >> version
5af0: 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 s.vc]..!endif..!
5b00: 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 52 45 4c if [echo TCL_REL
5b10: 45 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e EASE_SERIAL = \>
5b20: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
5b30: 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c .. && [nmakehl
5b40: 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 p -V "$(_TCL_H)"
5b50: 20 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 TCL_RELEASE_SER
5b60: 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e IAL >> versions.
5b70: 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 vc]..!endif..!if
5b80: 20 5b 65 63 68 6f 20 54 43 4c 5f 50 41 54 43 48 [echo TCL_PATCH
5b90: 5f 4c 45 56 45 4c 20 3d 20 5c 3e 3e 20 76 65 72 _LEVEL = \>> ver
5ba0: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 sions.vc] \..
5bb0: 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 && [nmakehlp -V
5bc0: 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f "$(_TCL_H)" TCL_
5bd0: 50 41 54 43 48 5f 4c 45 56 45 4c 20 3e 3e 20 76 PATCH_LEVEL >> v
5be0: 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e ersions.vc]..!en
5bf0: 64 69 66 0d 0a 0d 0a 21 69 66 20 64 65 66 69 6e dif....!if defin
5c00: 65 64 28 5f 54 4b 5f 48 29 0d 0a 21 69 66 20 5b ed(_TK_H)..!if [
5c10: 65 63 68 6f 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 echo TK_MAJOR_VE
5c20: 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 RSION = \>> vers
5c30: 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 ions.vc] \.. &
5c40: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 & [nmakehlp -V $
5c50: 28 5f 54 4b 5f 48 29 20 22 64 65 66 69 6e 65 20 (_TK_H) "define
5c60: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
5c70: 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 " >> versions.vc
5c80: 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b ]..!endif..!if [
5c90: 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 echo TK_MINOR_VE
5ca0: 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 RSION = \>> vers
5cb0: 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 ions.vc] \.. &
5cc0: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 & [nmakehlp -V $
5cd0: 28 5f 54 4b 5f 48 29 20 54 4b 5f 4d 49 4e 4f 52 (_TK_H) TK_MINOR
5ce0: 5f 56 45 52 53 49 4f 4e 20 3e 3e 20 76 65 72 73 _VERSION >> vers
5cf0: 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 ions.vc]..!endif
5d00: 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b 5f 52 ..!if [echo TK_R
5d10: 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 ELEASE_SERIAL =
5d20: 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d \>> versions.vc]
5d30: 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 \.. && [nmake
5d40: 68 6c 70 20 2d 56 20 22 24 28 5f 54 4b 5f 48 29 hlp -V "$(_TK_H)
5d50: 22 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 52 " TK_RELEASE_SER
5d60: 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e IAL >> versions.
5d70: 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 vc]..!endif..!if
5d80: 20 5b 65 63 68 6f 20 54 4b 5f 50 41 54 43 48 5f [echo TK_PATCH_
5d90: 4c 45 56 45 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 LEVEL = \>> vers
5da0: 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 ions.vc] \.. &
5db0: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 & [nmakehlp -V $
5dc0: 28 5f 54 4b 5f 48 29 20 54 4b 5f 50 41 54 43 48 (_TK_H) TK_PATCH
5dd0: 5f 4c 45 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f _LEVEL >> versio
5de0: 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a ns.vc]..!endif..
5df0: 21 65 6e 64 69 66 20 23 20 5f 54 4b 5f 48 0d 0a !endif # _TK_H..
5e00: 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 73 69 ..!include versi
5e10: 6f 6e 73 2e 76 63 0d 0a 0d 0a 54 43 4c 5f 56 45 ons.vc....TCL_VE
5e20: 52 53 49 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 RSION.= $(TCL_MA
5e30: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 43 JOR_VERSION)$(TC
5e40: 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MINOR_VERSION)
5e50: 0d 0a 54 43 4c 5f 44 4f 54 56 45 52 53 49 4f 4e ..TCL_DOTVERSION
5e60: 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 .= $(TCL_MAJOR_V
5e70: 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 ERSION).$(TCL_MI
5e80: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 21 69 NOR_VERSION)..!i
5e90: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
5ea0: 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c (TCL_PATCH_LEVEL
5eb0: 29 20 22 61 22 5d 0d 0a 54 43 4c 5f 50 41 54 43 ) "a"]..TCL_PATC
5ec0: 48 5f 4c 45 54 54 45 52 20 3d 20 61 0d 0a 21 65 H_LETTER = a..!e
5ed0: 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 lseif [nmakehlp
5ee0: 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c -f $(TCL_PATCH_L
5ef0: 45 56 45 4c 29 20 22 62 22 5d 0d 0a 54 43 4c 5f EVEL) "b"]..TCL_
5f00: 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 PATCH_LETTER = b
5f10: 0d 0a 21 65 6c 73 65 0d 0a 54 43 4c 5f 50 41 54 ..!else..TCL_PAT
5f20: 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e 0d 0a 21 CH_LETTER = ...!
5f30: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 64 65 66 endif....!if def
5f40: 69 6e 65 64 28 5f 54 4b 5f 48 29 0d 0a 0d 0a 54 ined(_TK_H)....T
5f50: 4b 5f 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 4b K_VERSION.= $(TK
5f60: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 24 _MAJOR_VERSION)$
5f70: 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f (TK_MINOR_VERSIO
5f80: 4e 29 0d 0a 54 4b 5f 44 4f 54 56 45 52 53 49 4f N)..TK_DOTVERSIO
5f90: 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 N.= $(TK_MAJOR_V
5fa0: 45 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e ERSION).$(TK_MIN
5fb0: 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 21 69 66 OR_VERSION)..!if
5fc0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
5fd0: 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 29 20 TK_PATCH_LEVEL)
5fe0: 22 61 22 5d 0d 0a 54 4b 5f 50 41 54 43 48 5f 4c "a"]..TK_PATCH_L
5ff0: 45 54 54 45 52 20 3d 20 61 0d 0a 21 65 6c 73 65 ETTER = a..!else
6000: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
6010: 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c $(TK_PATCH_LEVEL
6020: 29 20 22 62 22 5d 0d 0a 54 4b 5f 50 41 54 43 48 ) "b"]..TK_PATCH
6030: 5f 4c 45 54 54 45 52 20 3d 20 62 0d 0a 21 65 6c _LETTER = b..!el
6040: 73 65 0d 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 54 se..TK_PATCH_LET
6050: 54 45 52 20 3d 20 2e 0d 0a 21 65 6e 64 69 66 0d TER = ...!endif.
6060: 0a 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 53 ...!endif....# S
6070: 65 74 20 44 4f 54 56 45 52 53 49 4f 4e 20 61 6e et DOTVERSION an
6080: 64 20 56 45 52 53 49 4f 4e 0d 0a 21 69 66 20 24 d VERSION..!if $
6090: 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 44 (DOING_TCL)....D
60a0: 4f 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 OTVERSION = $(TC
60b0: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
60c0: 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 .$(TCL_MINOR_VER
60d0: 53 49 4f 4e 29 0d 0a 56 45 52 53 49 4f 4e 20 3d SION)..VERSION =
60e0: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 0d $(TCL_VERSION).
60f0: 0a 0d 0a 21 65 6c 73 65 69 66 20 24 28 44 4f 49 ...!elseif $(DOI
6100: 4e 47 5f 54 4b 29 0d 0a 0d 0a 44 4f 54 56 45 52 NG_TK)....DOTVER
6110: 53 49 4f 4e 20 3d 20 24 28 54 4b 5f 44 4f 54 56 SION = $(TK_DOTV
6120: 45 52 53 49 4f 4e 29 0d 0a 56 45 52 53 49 4f 4e ERSION)..VERSION
6130: 20 3d 20 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 = $(TK_VERSION)
6140: 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 44 6f 69 6e ....!else # Doin
6150: 67 20 61 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 6e g a non-Tk exten
6160: 73 69 6f 6e 0d 0a 0d 0a 23 20 49 66 20 70 61 72 sion....# If par
6170: 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 ent makefile has
6180: 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 44 4f 54 not defined DOT
6190: 56 45 52 53 49 4f 4e 2c 20 74 72 79 20 74 6f 20 VERSION, try to
61a0: 67 65 74 20 69 74 20 66 72 6f 6d 20 54 45 41 0d get it from TEA.
61b0: 0a 23 20 66 69 72 73 74 20 66 72 6f 6d 20 61 20 .# first from a
61c0: 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 66 69 6c configure.in fil
61d0: 65 2c 20 61 6e 64 20 74 68 65 6e 20 66 72 6f 6d e, and then from
61e0: 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 0d 0a 21 configure.ac..!
61f0: 69 66 6e 64 65 66 20 44 4f 54 56 45 52 53 49 4f ifndef DOTVERSIO
6200: 4e 0d 0a 21 69 66 20 5b 65 63 68 6f 20 44 4f 54 N..!if [echo DOT
6210: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 VERSION = \> ver
6220: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 sions.vc] \..
6230: 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 || [nmakehlp -V
6240: 24 28 52 4f 4f 54 29 5c 63 6f 6e 66 69 67 75 72 $(ROOT)\configur
6250: 65 2e 69 6e 20 5e 5b 24 28 50 52 4f 4a 45 43 54 e.in ^[$(PROJECT
6260: 29 5e 5d 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e )^] >> versions.
6270: 76 63 5d 0d 0a 21 69 66 20 5b 65 63 68 6f 20 44 vc]..!if [echo D
6280: 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 OTVERSION = \> v
6290: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 ersions.vc] \..
62a0: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d || [nmakehlp -
62b0: 56 20 24 28 52 4f 4f 54 29 5c 63 6f 6e 66 69 67 V $(ROOT)\config
62c0: 75 72 65 2e 61 63 20 5e 5b 24 28 50 52 4f 4a 45 ure.ac ^[$(PROJE
62d0: 43 54 29 5e 5d 20 3e 3e 20 76 65 72 73 69 6f 6e CT)^] >> version
62e0: 73 2e 76 63 5d 0d 0a 21 65 72 72 6f 72 20 2a 2a s.vc]..!error **
62f0: 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 69 67 75 * Could not figu
6300: 72 65 20 6f 75 74 20 65 78 74 65 6e 73 69 6f 6e re out extension
6310: 20 76 65 72 73 69 6f 6e 2e 20 50 6c 65 61 73 65 version. Please
6320: 20 64 65 66 69 6e 65 20 44 4f 54 56 45 52 53 49 define DOTVERSI
6330: 4f 4e 20 69 6e 20 70 61 72 65 6e 74 20 6d 61 6b ON in parent mak
6340: 65 66 69 6c 65 20 62 65 66 6f 72 65 20 69 6e 63 efile before inc
6350: 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 76 63 2e luding rules.vc.
6360: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 ..!endif..!endif
6370: 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 73 69 ..!include versi
6380: 6f 6e 73 2e 76 63 0d 0a 21 65 6e 64 69 66 20 23 ons.vc..!endif #
6390: 20 44 4f 54 56 45 52 53 49 4f 4e 0d 0a 56 45 52 DOTVERSION..VER
63a0: 53 49 4f 4e 20 20 20 20 20 20 20 20 20 3d 20 24 SION = $
63b0: 28 44 4f 54 56 45 52 53 49 4f 4e 3a 2e 3d 29 0d (DOTVERSION:.=).
63c0: 0a 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 44 4f ...!endif # $(DO
63d0: 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e 20 65 74 63 ING_TCL) ... etc
63e0: 2e 0d 0a 0d 0a 23 20 57 69 6e 64 6f 77 73 20 52 .....# Windows R
63f0: 43 20 66 69 6c 65 73 20 68 61 76 65 20 33 20 76 C files have 3 v
6400: 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 ersion component
6410: 73 2e 20 45 6e 73 75 72 65 20 74 68 69 73 20 69 s. Ensure this i
6420: 72 72 65 73 70 65 63 74 69 76 65 0d 0a 23 20 6f rrespective..# o
6430: 66 20 68 6f 77 20 6d 61 6e 79 20 63 6f 6d 70 6f f how many compo
6440: 6e 65 6e 74 73 20 74 68 65 20 70 61 63 6b 61 67 nents the packag
6450: 65 20 68 61 73 20 73 70 65 63 69 66 69 65 64 2e e has specified.
6460: 20 42 61 73 69 63 61 6c 6c 79 2c 20 65 6e 73 75 Basically, ensu
6470: 72 65 0d 0a 23 20 6d 69 6e 69 6d 75 6d 20 34 20 re..# minimum 4
6480: 63 6f 6d 70 6f 6e 65 6e 74 73 20 62 79 20 61 70 components by ap
6490: 70 65 6e 64 69 6e 67 20 34 20 30 27 73 20 61 6e pending 4 0's an
64a0: 64 20 74 68 65 6e 20 70 69 63 6b 20 6f 75 74 20 d then pick out
64b0: 74 68 65 20 66 69 72 73 74 20 34 2e 0d 0a 23 20 the first 4...#
64c0: 41 6c 73 6f 20 74 61 6b 65 20 63 61 72 65 20 6f Also take care o
64d0: 66 20 74 68 65 20 66 61 63 74 20 74 68 61 74 20 f the fact that
64e0: 44 4f 54 56 45 52 53 49 4f 4e 20 6d 61 79 20 68 DOTVERSION may h
64f0: 61 76 65 20 22 61 22 20 6f 72 20 22 62 22 20 69 ave "a" or "b" i
6500: 6e 73 74 65 61 64 0d 0a 23 20 6f 66 20 22 2e 22 nstead..# of "."
6510: 20 73 65 70 61 72 61 74 69 6e 67 20 74 68 65 20 separating the
6520: 76 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e version componen
6530: 74 73 2e 0d 0a 44 4f 54 53 45 50 41 52 41 54 45 ts...DOTSEPARATE
6540: 44 3d 24 28 44 4f 54 56 45 52 53 49 4f 4e 3a 61 D=$(DOTVERSION:a
6550: 3d 2e 29 0d 0a 44 4f 54 53 45 50 41 52 41 54 45 =.)..DOTSEPARATE
6560: 44 3d 24 28 44 4f 54 53 45 50 41 52 41 54 45 44 D=$(DOTSEPARATED
6570: 3a 62 3d 2e 29 0d 0a 21 69 66 20 5b 65 63 68 6f :b=.)..!if [echo
6580: 20 52 43 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 20 RCCOMMAVERSION
6590: 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 = \> versions.vc
65a0: 5d 20 5c 0d 0a 20 20 7c 7c 20 5b 66 6f 72 20 2f ] \.. || [for /
65b0: 66 20 22 74 6f 6b 65 6e 73 3d 31 2c 32 2c 33 2c f "tokens=1,2,3,
65c0: 34 2c 35 2a 20 64 65 6c 69 6d 73 3d 2e 22 20 25 4,5* delims=." %
65d0: 61 20 69 6e 20 28 22 24 28 44 4f 54 53 45 50 41 a in ("$(DOTSEPA
65e0: 52 41 54 45 44 29 2e 30 2e 30 2e 30 2e 30 22 29 RATED).0.0.0.0")
65f0: 20 64 6f 20 65 63 68 6f 20 25 61 2c 25 62 2c 25 do echo %a,%b,%
6600: 63 2c 25 64 20 3e 3e 20 76 65 72 73 69 6f 6e 73 c,%d >> versions
6610: 2e 76 63 5d 0d 0a 21 65 72 72 6f 72 20 2a 2a 2a .vc]..!error ***
6620: 20 43 6f 75 6c 64 20 6e 6f 74 20 67 65 6e 65 72 Could not gener
6630: 61 74 65 20 52 43 43 4f 4d 4d 41 56 45 52 53 49 ate RCCOMMAVERSI
6640: 4f 4e 20 2a 2a 2a 0d 0a 21 65 6e 64 69 66 0d 0a ON ***..!endif..
6650: 21 69 6e 63 6c 75 64 65 20 76 65 72 73 69 6f 6e !include version
6660: 73 2e 76 63 0d 0a 0d 0a 23 23 23 23 23 23 23 23 s.vc....########
6670: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6680: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6690: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
66a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
66b0: 0d 0a 23 20 37 2e 20 50 61 72 73 65 20 74 68 65 ..# 7. Parse the
66c0: 20 4f 50 54 53 20 6d 61 63 72 6f 20 74 6f 20 77 OPTS macro to w
66d0: 6f 72 6b 20 6f 75 74 20 74 68 65 20 72 65 71 75 ork out the requ
66e0: 65 73 74 65 64 20 62 75 69 6c 64 20 63 6f 6e 66 ested build conf
66f0: 69 67 75 72 61 74 69 6f 6e 2e 0d 0a 23 20 42 61 iguration...# Ba
6700: 73 65 64 20 6f 6e 20 74 68 69 73 2c 20 77 65 20 sed on this, we
6710: 77 69 6c 6c 20 63 6f 6e 73 74 72 75 63 74 20 74 will construct t
6720: 68 65 20 61 63 74 75 61 6c 20 73 77 69 74 63 68 he actual switch
6730: 65 73 20 74 6f 20 62 65 20 70 61 73 73 65 64 20 es to be passed
6740: 74 6f 20 74 68 65 0d 0a 23 20 63 6f 6d 70 69 6c to the..# compil
6750: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 75 73 er and linker us
6760: 69 6e 67 20 74 68 65 20 6d 61 63 72 6f 73 20 64 ing the macros d
6770: 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 70 72 efined in the pr
6780: 65 76 69 6f 75 73 20 73 65 63 74 69 6f 6e 2e 0d evious section..
6790: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 .# The following
67a0: 20 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66 69 macros are defi
67b0: 6e 65 64 20 62 79 20 74 68 69 73 20 73 65 63 74 ned by this sect
67c0: 69 6f 6e 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 ion based on OPT
67d0: 53 0d 0a 23 20 53 54 41 54 49 43 5f 42 55 49 4c S..# STATIC_BUIL
67e0: 44 20 2d 20 30 20 2d 3e 20 54 63 6c 20 69 73 20 D - 0 -> Tcl is
67f0: 74 6f 20 62 65 20 62 75 69 6c 74 20 61 73 20 61 to be built as a
6800: 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 79 0d shared library.
6810: 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .#
6820: 20 20 31 20 2d 3e 20 62 75 69 6c 64 20 61 73 20 1 -> build as
6830: 61 20 73 74 61 74 69 63 20 6c 69 62 72 61 72 79 a static library
6840: 20 61 6e 64 20 73 68 65 6c 6c 0d 0a 23 20 54 43 and shell..# TC
6850: 4c 5f 54 48 52 45 41 44 53 20 2d 20 6c 65 67 61 L_THREADS - lega
6860: 63 79 20 62 75 74 20 61 6c 77 61 79 73 20 31 20 cy but always 1
6870: 6f 6e 20 57 69 6e 64 6f 77 73 20 73 69 6e 63 65 on Windows since
6880: 20 77 69 6e 73 6f 63 6b 20 72 65 71 75 69 72 65 winsock require
6890: 73 20 69 74 2e 0d 0a 23 20 44 45 42 55 47 20 2d s it...# DEBUG -
68a0: 20 31 20 2d 3e 20 64 65 62 75 67 20 62 75 69 6c 1 -> debug buil
68b0: 64 2c 20 30 20 2d 3e 20 72 65 6c 65 61 73 65 20 d, 0 -> release
68c0: 62 75 69 6c 64 73 0d 0a 23 20 53 59 4d 42 4f 4c builds..# SYMBOL
68d0: 53 20 2d 20 31 20 2d 3e 20 67 65 6e 65 72 61 74 S - 1 -> generat
68e0: 65 20 50 44 42 27 73 2c 20 30 20 2d 3e 20 6e 6f e PDB's, 0 -> no
68f0: 20 50 44 42 27 73 0d 0a 23 20 50 52 4f 46 49 4c PDB's..# PROFIL
6900: 45 20 2d 20 31 20 2d 3e 20 67 65 6e 65 72 61 74 E - 1 -> generat
6910: 65 20 70 72 6f 66 69 6c 69 6e 67 20 69 6e 66 6f e profiling info
6920: 2c 20 30 20 2d 3e 20 6e 6f 20 70 72 6f 66 69 6c , 0 -> no profil
6930: 69 6e 67 0d 0a 23 20 50 47 4f 20 20 20 20 20 2d ing..# PGO -
6940: 20 31 20 2d 3e 20 70 72 6f 66 69 6c 65 20 62 61 1 -> profile ba
6950: 73 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e sed optimization
6960: 2c 20 30 20 2d 3e 20 6e 6f 0d 0a 23 20 4d 53 56 , 0 -> no..# MSV
6970: 43 52 54 20 20 2d 20 31 20 2d 3e 20 6c 69 6e 6b CRT - 1 -> link
6980: 20 74 6f 20 64 79 6e 61 6d 69 63 20 43 20 72 75 to dynamic C ru
6990: 6e 74 69 6d 65 20 65 76 65 6e 20 77 68 65 6e 20 ntime even when
69a0: 62 75 69 6c 64 69 6e 67 20 73 74 61 74 69 63 20 building static
69b0: 54 63 6c 20 62 75 69 6c 64 0d 0a 23 20 20 20 20 Tcl build..#
69c0: 20 20 20 20 20 20 20 30 20 2d 3e 20 6c 69 6e 6b 0 -> link
69d0: 20 74 6f 20 73 74 61 74 69 63 20 43 20 72 75 6e to static C run
69e0: 74 69 6d 65 20 66 6f 72 20 73 74 61 74 69 63 20 time for static
69f0: 54 63 6c 20 62 75 69 6c 64 2e 0d 0a 23 20 20 20 Tcl build...#
6a00: 20 20 20 20 20 20 20 20 44 6f 65 73 20 6e 6f 74 Does not
6a10: 20 69 6d 70 61 63 74 20 73 68 61 72 65 64 20 54 impact shared T
6a20: 63 6c 20 62 75 69 6c 64 73 20 28 53 54 41 54 49 cl builds (STATI
6a30: 43 5f 42 55 49 4c 44 20 3d 3d 20 30 29 0d 0a 23 C_BUILD == 0)..#
6a40: 20 20 20 20 20 20 20 20 20 20 20 44 65 66 61 75 Defau
6a50: 6c 74 3a 20 31 20 66 6f 72 20 54 63 6c 20 39 2e lt: 1 for Tcl 9.
6a60: 30 20 61 6e 64 20 75 70 2c 20 30 20 6f 74 68 65 0 and up, 0 othe
6a70: 72 77 69 73 65 2e 0d 0a 23 20 54 43 4c 5f 55 53 rwise...# TCL_US
6a80: 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 47 45 E_STATIC_PACKAGE
6a90: 53 20 2d 20 31 20 2d 3e 20 73 74 61 74 69 63 61 S - 1 -> statica
6aa0: 6c 6c 79 20 6c 69 6e 6b 20 74 68 65 20 72 65 67 lly link the reg
6ab0: 69 73 74 72 79 20 61 6e 64 20 64 64 65 20 65 78 istry and dde ex
6ac0: 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 20 20 20 20 tensions..#
6ad0: 20 20 20 20 20 20 69 6e 20 74 68 65 20 54 63 6c in the Tcl
6ae0: 20 61 6e 64 20 57 69 73 68 20 73 68 65 6c 6c 2e and Wish shell.
6af0: 20 30 20 2d 3e 20 6b 65 65 70 20 74 68 65 6d 20 0 -> keep them
6b00: 61 73 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 as shared librar
6b10: 69 65 73 2e 20 44 6f 65 73 0d 0a 23 20 20 20 20 ies. Does..#
6b20: 20 20 20 20 20 20 20 6e 6f 74 20 69 6d 70 61 63 not impac
6b30: 74 20 73 68 61 72 65 64 20 54 63 6c 20 62 75 69 t shared Tcl bui
6b40: 6c 64 73 2e 20 49 6d 70 6c 69 65 64 20 62 79 20 lds. Implied by
6b50: 53 54 41 54 49 43 5f 42 55 49 4c 44 20 73 69 6e STATIC_BUILD sin
6b60: 63 65 20 54 63 6c 20 39 2e 30 2e 0d 0a 23 20 55 ce Tcl 9.0...# U
6b70: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 SE_THREAD_ALLOC
6b80: 2d 20 31 20 2d 3e 20 55 73 65 20 61 20 73 68 61 - 1 -> Use a sha
6b90: 72 65 64 20 67 6c 6f 62 61 6c 20 66 72 65 65 20 red global free
6ba0: 70 6f 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 61 74 pool for allocat
6bb0: 69 6f 6e 2e 0d 0a 23 20 20 20 20 20 20 20 20 20 ion...#
6bc0: 20 20 30 20 2d 3e 20 55 73 65 20 74 68 65 20 6e 0 -> Use the n
6bd0: 6f 6e 2d 74 68 72 65 61 64 20 61 6c 6c 6f 63 61 on-thread alloca
6be0: 74 6f 72 2e 0d 0a 23 20 55 4e 43 48 45 43 4b 45 tor...# UNCHECKE
6bf0: 44 20 2d 20 31 20 2d 3e 20 77 68 65 6e 20 64 6f D - 1 -> when do
6c00: 69 6e 67 20 61 20 64 65 62 75 67 20 62 75 69 6c ing a debug buil
6c10: 64 20 77 69 74 68 20 73 79 6d 62 6f 6c 73 2c 20 d with symbols,
6c20: 75 73 65 20 74 68 65 20 72 65 6c 65 61 73 65 0d use the release.
6c30: 0a 23 20 20 20 20 20 20 20 20 20 20 20 43 20 72 .# C r
6c40: 75 6e 74 69 6d 65 2c 20 30 20 2d 3e 20 75 73 65 untime, 0 -> use
6c50: 20 74 68 65 20 64 65 62 75 67 20 43 20 72 75 6e the debug C run
6c60: 74 69 6d 65 2e 0d 0a 23 20 55 53 45 5f 53 54 55 time...# USE_STU
6c70: 42 53 20 2d 20 31 20 2d 3e 20 63 6f 6d 70 69 6c BS - 1 -> compil
6c80: 65 20 74 6f 20 75 73 65 20 73 74 75 62 73 20 69 e to use stubs i
6c90: 6e 74 65 72 66 61 63 65 73 2c 20 30 20 2d 3e 20 nterfaces, 0 ->
6ca0: 64 69 72 65 63 74 20 6c 69 6e 6b 69 6e 67 0d 0a direct linking..
6cb0: 23 20 43 4f 4e 46 49 47 5f 43 48 45 43 4b 20 2d # CONFIG_CHECK -
6cc0: 20 31 20 2d 3e 20 63 68 65 63 6b 20 63 75 72 72 1 -> check curr
6cd0: 65 6e 74 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 ent build config
6ce0: 75 72 61 74 69 6f 6e 20 61 67 61 69 6e 73 74 20 uration against
6cf0: 54 63 6c 0d 0a 23 20 20 20 20 20 20 20 20 20 20 Tcl..#
6d00: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 28 configuration (
6d10: 69 67 6e 6f 72 65 64 20 66 6f 72 20 54 63 6c 20 ignored for Tcl
6d20: 69 74 73 65 6c 66 29 0d 0a 23 20 5f 55 53 45 5f itself)..# _USE_
6d30: 36 34 42 49 54 5f 54 49 4d 45 5f 54 20 2d 20 66 64BIT_TIME_T - f
6d40: 6f 72 63 65 73 20 61 20 62 75 69 6c 64 20 75 73 orces a build us
6d50: 69 6e 67 20 36 34 2d 62 69 74 20 74 69 6d 65 5f ing 64-bit time_
6d60: 74 20 66 6f 72 20 33 32 2d 62 69 74 20 62 75 69 t for 32-bit bui
6d70: 6c 64 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 ld..#
6d80: 28 43 52 54 20 6c 69 62 72 61 72 79 20 73 68 6f (CRT library sho
6d90: 75 6c 64 20 73 75 70 70 6f 72 74 20 74 68 69 73 uld support this
6da0: 2c 20 6e 6f 74 20 6e 65 65 64 65 64 20 66 6f 72 , not needed for
6db0: 20 54 63 6c 20 39 2e 78 29 0d 0a 23 20 46 75 72 Tcl 9.x)..# Fur
6dc0: 74 68 65 72 2c 20 4c 49 4e 4b 45 52 46 4c 41 47 ther, LINKERFLAG
6dd0: 53 20 61 72 65 20 6d 6f 64 69 66 69 65 64 20 62 S are modified b
6de0: 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 2e 0d 0a ased on above...
6df0: 0d 0a 23 20 44 65 66 61 75 6c 74 20 76 61 6c 75 ..# Default valu
6e00: 65 73 20 66 6f 72 20 61 6c 6c 20 74 68 65 20 61 es for all the a
6e10: 62 6f 76 65 0d 0a 53 54 41 54 49 43 5f 42 55 49 bove..STATIC_BUI
6e20: 4c 44 09 3d 20 30 0d 0a 54 43 4c 5f 54 48 52 45 LD.= 0..TCL_THRE
6e30: 41 44 53 09 3d 20 31 0d 0a 44 45 42 55 47 09 09 ADS.= 1..DEBUG..
6e40: 3d 20 30 0d 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 = 0..SYMBOLS..=
6e50: 30 0d 0a 50 52 4f 46 49 4c 45 09 09 3d 20 30 0d 0..PROFILE..= 0.
6e60: 0a 50 47 4f 09 09 3d 20 30 0d 0a 4d 53 56 43 52 .PGO..= 0..MSVCR
6e70: 54 09 09 3d 20 31 0d 0a 54 43 4c 5f 55 53 45 5f T..= 1..TCL_USE_
6e80: 53 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 09 STATIC_PACKAGES.
6e90: 3d 20 30 0d 0a 55 53 45 5f 54 48 52 45 41 44 5f = 0..USE_THREAD_
6ea0: 41 4c 4c 4f 43 20 3d 20 31 0d 0a 55 4e 43 48 45 ALLOC = 1..UNCHE
6eb0: 43 4b 45 44 09 3d 20 30 0d 0a 43 4f 4e 46 49 47 CKED.= 0..CONFIG
6ec0: 5f 43 48 45 43 4b 20 20 20 20 3d 20 31 0d 0a 21 _CHECK = 1..!
6ed0: 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0d if $(DOING_TCL).
6ee0: 0a 55 53 45 5f 53 54 55 42 53 20 20 20 20 20 20 .USE_STUBS
6ef0: 20 3d 20 30 0d 0a 21 65 6c 73 65 0d 0a 55 53 45 = 0..!else..USE
6f00: 5f 53 54 55 42 53 20 20 20 20 20 20 20 3d 20 31 _STUBS = 1
6f10: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 49 66 ..!endif....# If
6f20: 20 4f 50 54 53 20 69 73 20 6e 6f 74 20 65 6d 70 OPTS is not emp
6f30: 74 79 20 41 4e 44 20 64 6f 65 73 20 6e 6f 74 20 ty AND does not
6f40: 63 6f 6e 74 61 69 6e 20 22 6e 6f 6e 65 22 20 77 contain "none" w
6f50: 68 69 63 68 20 74 75 72 6e 73 20 6f 66 66 20 61 hich turns off a
6f60: 6c 6c 20 4f 50 54 53 0d 0a 23 20 73 65 74 20 74 ll OPTS..# set t
6f70: 68 65 20 61 62 6f 76 65 20 6d 61 63 72 6f 73 20 he above macros
6f80: 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 20 63 6f based on OPTS co
6f90: 6e 74 65 6e 74 0d 0a 21 69 66 20 22 24 28 4f 50 ntent..!if "$(OP
6fa0: 54 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 5b TS)" != "" && ![
6fb0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 4f nmakehlp -f "$(O
6fc0: 50 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0d 0a 0d PTS)" "none"]...
6fd0: 0a 23 20 4f 50 54 53 20 61 72 65 20 73 70 65 63 .# OPTS are spec
6fe0: 69 66 69 65 64 2c 20 70 61 72 73 65 20 74 68 65 ified, parse the
6ff0: 6d 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 m....!if [nmakeh
7000: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 lp -f $(OPTS) "s
7010: 74 61 74 69 63 22 5d 0d 0a 21 6d 65 73 73 61 67 tatic"]..!messag
7020: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 74 61 74 e *** Doing stat
7030: 69 63 0d 0a 53 54 41 54 49 43 5f 42 55 49 4c 44 ic..STATIC_BUILD
7040: 09 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a .= 1..!endif....
7050: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7060: 20 24 28 4f 50 54 53 29 20 22 6e 6f 73 74 75 62 $(OPTS) "nostub
7070: 73 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a s"]..!message **
7080: 2a 20 4e 6f 74 20 75 73 69 6e 67 20 73 74 75 62 * Not using stub
7090: 73 0d 0a 55 53 45 5f 53 54 55 42 53 09 3d 20 30 s..USE_STUBS.= 0
70a0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 ..!endif....!if
70b0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
70c0: 50 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 22 5d PTS) "nomsvcrt"]
70d0: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ..!message *** D
70e0: 6f 69 6e 67 20 6e 6f 6d 73 76 63 72 74 0d 0a 4d oing nomsvcrt..M
70f0: 53 56 43 52 54 09 09 3d 20 30 0d 0a 21 65 6c 73 SVCRT..= 0..!els
7100: 65 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 e..!if [nmakehlp
7110: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6d 73 76 -f $(OPTS) "msv
7120: 63 72 74 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 crt"]..!message
7130: 2a 2a 2a 20 44 6f 69 6e 67 20 6d 73 76 63 72 74 *** Doing msvcrt
7140: 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 24 28 54 ..!else..!if $(T
7150: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
7160: 29 20 3d 3d 20 38 20 26 26 20 24 28 54 43 4c 5f ) == 8 && $(TCL_
7170: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3c MINOR_VERSION) <
7180: 20 37 20 26 26 20 24 28 53 54 41 54 49 43 5f 42 7 && $(STATIC_B
7190: 55 49 4c 44 29 0d 0a 4d 53 56 43 52 54 09 09 3d UILD)..MSVCRT..=
71a0: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 0..!endif..!end
71b0: 69 66 0d 0a 21 65 6e 64 69 66 20 23 20 5b 6e 6d if..!endif # [nm
71c0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
71d0: 29 20 22 6e 6f 6d 73 76 63 72 74 22 5d 0d 0a 0d ) "nomsvcrt"]...
71e0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
71f0: 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 74 69 f $(OPTS) "stati
7200: 63 70 6b 67 22 5d 20 26 26 20 24 28 53 54 41 54 cpkg"] && $(STAT
7210: 49 43 5f 42 55 49 4c 44 29 0d 0a 21 6d 65 73 73 IC_BUILD)..!mess
7220: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 74 age *** Doing st
7230: 61 74 69 63 70 6b 67 0d 0a 54 43 4c 5f 55 53 45 aticpkg..TCL_USE
7240: 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 _STATIC_PACKAGES
7250: 09 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a .= 1..!endif....
7260: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7270: 20 24 28 4f 50 54 53 29 20 22 6e 6f 74 68 72 65 $(OPTS) "nothre
7280: 61 64 73 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 ads"]..!message
7290: 2a 2a 2a 20 43 6f 6d 70 69 6c 65 20 65 78 70 6c *** Compile expl
72a0: 69 63 69 74 6c 79 20 66 6f 72 20 6e 6f 6e 2d 74 icitly for non-t
72b0: 68 72 65 61 64 65 64 20 74 63 6c 0d 0a 54 43 4c hreaded tcl..TCL
72c0: 5f 54 48 52 45 41 44 53 20 3d 20 30 0d 0a 55 53 _THREADS = 0..US
72d0: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 3d 20 E_THREAD_ALLOC=
72e0: 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 0..!endif....!if
72f0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
7300: 4f 50 54 53 29 20 22 74 63 6c 38 22 5d 0d 0a 21 OPTS) "tcl8"]..!
7310: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c message *** Buil
7320: 64 20 66 6f 72 20 54 63 6c 38 0d 0a 54 43 4c 5f d for Tcl8..TCL_
7330: 42 55 49 4c 44 5f 46 4f 52 20 3d 20 38 0d 0a 21 BUILD_FOR = 8..!
7340: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 54 endif....!if $(T
7350: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
7360: 29 20 3d 3d 20 38 0d 0a 21 69 66 20 5b 6e 6d 61 ) == 8..!if [nma
7370: 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 kehlp -f $(OPTS)
7380: 20 22 74 69 6d 65 36 34 62 69 74 22 5d 0d 0a 21 "time64bit"]..!
7390: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 46 6f 72 63 message *** Forc
73a0: 65 20 36 34 2d 62 69 74 20 74 69 6d 65 5f 74 0d e 64-bit time_t.
73b0: 0a 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 ._USE_64BIT_TIME
73c0: 5f 54 20 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a _T = 1..!endif..
73d0: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 59 65 73 2c !endif....# Yes,
73e0: 20 69 74 27 73 20 77 65 69 72 64 20 74 68 61 74 it's weird that
73f0: 20 74 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 6f the "symbols" o
7400: 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 44 ption controls D
7410: 45 42 55 47 20 61 6e 64 0d 0a 23 20 74 68 65 20 EBUG and..# the
7420: 22 70 64 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f "pdbs" option co
7430: 6e 74 72 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20 ntrols SYMBOLS.
7440: 54 68 61 74 27 73 20 68 69 73 74 6f 72 69 63 61 That's historica
7450: 6c 2e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c l...!if [nmakehl
7460: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 79 p -f $(OPTS) "sy
7470: 6d 62 6f 6c 73 22 5d 0d 0a 21 6d 65 73 73 61 67 mbols"]..!messag
7480: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 79 6d 62 e *** Doing symb
7490: 6f 6c 73 0d 0a 44 45 42 55 47 09 09 3d 20 31 0d ols..DEBUG..= 1.
74a0: 0a 21 65 6c 73 65 0d 0a 44 45 42 55 47 09 09 3d .!else..DEBUG..=
74b0: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 0..!endif....!i
74c0: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
74d0: 28 4f 50 54 53 29 20 22 70 64 62 73 22 5d 0d 0a (OPTS) "pdbs"]..
74e0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 !message *** Doi
74f0: 6e 67 20 70 64 62 73 0d 0a 53 59 4d 42 4f 4c 53 ng pdbs..SYMBOLS
7500: 09 09 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 53 59 ..= 1..!else..SY
7510: 4d 42 4f 4c 53 09 09 3d 20 30 0d 0a 21 65 6e 64 MBOLS..= 0..!end
7520: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 if....!if [nmake
7530: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
7540: 70 72 6f 66 69 6c 65 22 5d 0d 0a 21 6d 65 73 73 profile"]..!mess
7550: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 age *** Doing pr
7560: 6f 66 69 6c 65 0d 0a 50 52 4f 46 49 4c 45 09 09 ofile..PROFILE..
7570: 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 50 52 4f 46 = 1..!else..PROF
7580: 49 4c 45 09 09 3d 20 30 0d 0a 21 65 6e 64 69 66 ILE..= 0..!endif
7590: 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c ....!if [nmakehl
75a0: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 67 p -f $(OPTS) "pg
75b0: 69 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a i"]..!message **
75c0: 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20 * Doing profile
75d0: 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 guided optimizat
75e0: 69 6f 6e 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 ion instrumentat
75f0: 69 6f 6e 0d 0a 50 47 4f 09 09 3d 20 31 0d 0a 21 ion..PGO..= 1..!
7600: 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 elseif [nmakehlp
7610: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 67 6f -f $(OPTS) "pgo
7620: 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a "]..!message ***
7630: 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20 67 Doing profile g
7640: 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 uided optimizati
7650: 6f 6e 0d 0a 50 47 4f 09 09 3d 20 32 0d 0a 21 65 on..PGO..= 2..!e
7660: 6c 73 65 0d 0a 50 47 4f 09 09 3d 20 30 0d 0a 21 lse..PGO..= 0..!
7670: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d endif....!if [nm
7680: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
7690: 29 20 22 6c 6f 69 6d 70 61 63 74 22 5d 0d 0a 21 ) "loimpact"]..!
76a0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 57 61 72 6e message *** Warn
76b0: 69 6e 67 3a 20 69 67 6e 6f 72 69 6e 67 20 6f 70 ing: ignoring op
76c0: 74 69 6f 6e 20 22 6c 6f 69 6d 70 61 63 74 22 20 tion "loimpact"
76d0: 2d 20 64 65 70 72 65 63 61 74 65 64 20 6f 6e 20 - deprecated on
76e0: 6d 6f 64 65 72 6e 20 57 69 6e 64 6f 77 73 2e 0d modern Windows..
76f0: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 54 42 44 .!endif....# TBD
7700: 20 2d 20 73 68 6f 75 6c 64 20 67 65 74 20 72 69 - should get ri
7710: 64 20 6f 66 20 74 68 69 73 20 6f 70 74 69 6f 6e d of this option
7720: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
7730: 2d 66 20 24 28 4f 50 54 53 29 20 22 74 68 72 64 -f $(OPTS) "thrd
7740: 61 6c 6c 6f 63 22 5d 0d 0a 21 6d 65 73 73 61 67 alloc"]..!messag
7750: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 74 68 72 64 e *** Doing thrd
7760: 61 6c 6c 6f 63 0d 0a 55 53 45 5f 54 48 52 45 41 alloc..USE_THREA
7770: 44 5f 41 4c 4c 4f 43 20 3d 20 31 0d 0a 21 65 6e D_ALLOC = 1..!en
7780: 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b dif....!if [nmak
7790: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
77a0: 22 74 63 6c 61 6c 6c 6f 63 22 5d 0d 0a 55 53 45 "tclalloc"]..USE
77b0: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 _THREAD_ALLOC =
77c0: 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 0..!endif....!if
77d0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
77e0: 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b 65 64 OPTS) "unchecked
77f0: 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a "]..!message ***
7800: 20 44 6f 69 6e 67 20 75 6e 63 68 65 63 6b 65 64 Doing unchecked
7810: 0d 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 31 0d ..UNCHECKED = 1.
7820: 0a 21 65 6c 73 65 0d 0a 55 4e 43 48 45 43 4b 45 .!else..UNCHECKE
7830: 44 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d D = 0..!endif...
7840: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
7850: 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 63 6f 6e f $(OPTS) "nocon
7860: 66 69 67 63 68 65 63 6b 22 5d 0d 0a 43 4f 4e 46 figcheck"]..CONF
7870: 49 47 5f 43 48 45 43 4b 20 3d 20 31 0d 0a 21 65 IG_CHECK = 1..!e
7880: 6c 73 65 0d 0a 43 4f 4e 46 49 47 5f 43 48 45 43 lse..CONFIG_CHEC
7890: 4b 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d K = 0..!endif...
78a0: 0a 21 65 6e 64 69 66 20 23 20 22 24 28 4f 50 54 .!endif # "$(OPT
78b0: 53 29 22 20 21 3d 20 22 22 20 20 26 26 20 2e 2e S)" != "" && ..
78c0: 2e 20 70 61 72 73 69 6e 67 20 6f 66 20 4f 50 54 . parsing of OPT
78d0: 53 0d 0a 0d 0a 23 20 53 65 74 20 6c 69 6e 6b 65 S....# Set linke
78e0: 72 20 66 6c 61 67 73 20 62 61 73 65 64 20 6f 6e r flags based on
78f0: 20 61 62 6f 76 65 0d 0a 0d 0a 21 69 66 20 24 28 above....!if $(
7900: 50 47 4f 29 20 3e 20 31 0d 0a 21 69 66 20 5b 6e PGO) > 1..!if [n
7910: 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 makehlp -l -ltcg
7920: 3a 70 67 6f 70 74 69 6d 69 7a 65 20 24 28 4c 49 :pgoptimize $(LI
7930: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d NKER_TESTFLAGS)]
7940: 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 ..LINKERFLAGS.=
7950: 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c $(LINKERFLAGS:-l
7960: 74 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 6f 70 tcg=) -ltcg:pgop
7970: 74 69 6d 69 7a 65 0d 0a 21 65 6c 73 65 0d 0a 4d timize..!else..M
7980: 53 47 3d 5e 0d 0a 54 68 69 73 20 63 6f 6d 70 69 SG=^..This compi
7990: 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 73 75 70 ler does not sup
79a0: 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 67 75 69 port profile gui
79b0: 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e ded optimization
79c0: 2e 0d 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 ...!error $(MSG)
79d0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 69 ..!endif..!elsei
79e0: 66 20 24 28 50 47 4f 29 20 3e 20 30 0d 0a 21 69 f $(PGO) > 0..!i
79f0: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d f [nmakehlp -l -
7a00: 6c 74 63 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e ltcg:pginstrumen
7a10: 74 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 t $(LINKER_TESTF
7a20: 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b 45 52 46 4c LAGS)]..LINKERFL
7a30: 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 52 46 4c AGS.= $(LINKERFL
7a40: 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 AGS:-ltcg=) -ltc
7a50: 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 0d 0a g:pginstrument..
7a60: 21 65 6c 73 65 0d 0a 4d 53 47 3d 5e 0d 0a 54 68 !else..MSG=^..Th
7a70: 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 6f 65 73 is compiler does
7a80: 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 70 72 6f not support pro
7a90: 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 file guided opti
7aa0: 6d 69 7a 61 74 69 6f 6e 2e 0d 0a 21 65 72 72 6f mization...!erro
7ab0: 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66 r $(MSG)..!endif
7ac0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 ..!endif....####
7ad0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7ae0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7af0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7b00: 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 ############..#
7b10: 38 2e 20 50 61 72 73 65 20 74 68 65 20 53 54 41 8. Parse the STA
7b20: 54 53 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 TS macro to conf
7b30: 69 67 75 72 65 20 63 6f 64 65 20 69 6e 73 74 72 igure code instr
7b40: 75 6d 65 6e 74 61 74 69 6f 6e 0d 0a 23 20 54 68 umentation..# Th
7b50: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 e following macr
7b60: 6f 73 20 61 72 65 20 73 65 74 20 62 79 20 74 68 os are set by th
7b70: 69 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23 20 54 is section:..# T
7b80: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 20 2d 20 31 CL_MEM_DEBUG - 1
7b90: 20 2d 3e 20 65 6e 61 62 6c 65 73 20 6d 65 6d 6f -> enables memo
7ba0: 72 79 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 69 6e ry allocation in
7bb0: 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0d 0a 23 strumentation..#
7bc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7bd0: 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0d 0a 0 -> disables..
7be0: 23 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 # TCL_COMPILE_DE
7bf0: 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 62 6c BUG - 1 -> enabl
7c00: 65 73 20 62 79 74 65 20 63 6f 6d 70 69 6c 65 72 es byte compiler
7c10: 20 6c 6f 67 67 69 6e 67 0d 0a 23 20 20 20 20 20 logging..#
7c20: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7c30: 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0d 0a 0d 0 -> disables...
7c40: 0a 23 20 44 65 66 61 75 6c 74 20 62 6f 74 68 20 .# Default both
7c50: 61 72 65 20 6f 66 66 0d 0a 54 43 4c 5f 4d 45 4d are off..TCL_MEM
7c60: 5f 44 45 42 55 47 09 20 20 20 20 3d 20 30 0d 0a _DEBUG. = 0..
7c70: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 TCL_COMPILE_DEBU
7c80: 47 20 20 20 3d 20 30 0d 0a 0d 0a 21 69 66 20 22 G = 0....!if "
7c90: 24 28 53 54 41 54 53 29 22 20 21 3d 20 22 22 20 $(STATS)" != ""
7ca0: 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 && ![nmakehlp -f
7cb0: 20 22 24 28 53 54 41 54 53 29 22 20 22 6e 6f 6e "$(STATS)" "non
7cc0: 65 22 5d 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b e"]....!if [nmak
7cd0: 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 29 ehlp -f $(STATS)
7ce0: 20 22 6d 65 6d 64 62 67 22 5d 0d 0a 21 6d 65 73 "memdbg"]..!mes
7cf0: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6d sage *** Doing m
7d00: 65 6d 64 62 67 0d 0a 54 43 4c 5f 4d 45 4d 5f 44 emdbg..TCL_MEM_D
7d10: 45 42 55 47 09 20 20 20 20 3d 20 31 0d 0a 21 65 EBUG. = 1..!e
7d20: 6c 73 65 0d 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 lse..TCL_MEM_DEB
7d30: 55 47 09 20 20 20 20 3d 20 30 0d 0a 21 65 6e 64 UG. = 0..!end
7d40: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 if....!if [nmake
7d50: 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 29 20 hlp -f $(STATS)
7d60: 22 63 6f 6d 70 64 62 67 22 5d 0d 0a 21 6d 65 73 "compdbg"]..!mes
7d70: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 63 sage *** Doing c
7d80: 6f 6d 70 64 62 67 0d 0a 54 43 4c 5f 43 4f 4d 50 ompdbg..TCL_COMP
7d90: 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 31 0d ILE_DEBUG = 1.
7da0: 0a 21 65 6c 73 65 0d 0a 54 43 4c 5f 43 4f 4d 50 .!else..TCL_COMP
7db0: 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 30 0d ILE_DEBUG = 0.
7dc0: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 69 .!endif....!endi
7dd0: 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 f....###########
7de0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7df0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7e00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7e10: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 39 2e 20 #########..# 9.
7e20: 50 61 72 73 65 20 74 68 65 20 43 48 45 43 4b 53 Parse the CHECKS
7e30: 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 macro to config
7e40: 75 72 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 ure additional c
7e50: 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 0d 0a ompiler checks..
7e60: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
7e70: 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 macros are set b
7e80: 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0d y this section:.
7e90: 0a 23 20 57 41 52 4e 49 4e 47 53 20 2d 20 63 6f .# WARNINGS - co
7ea0: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 mpiler switches
7eb0: 74 68 61 74 20 63 6f 6e 74 72 6f 6c 20 74 68 65 that control the
7ec0: 20 77 61 72 6e 69 6e 67 73 20 6c 65 76 65 6c 0d warnings level.
7ed0: 0a 23 20 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 .# TCL_NO_DEPREC
7ee0: 41 54 45 44 20 2d 20 31 20 2d 3e 20 64 69 73 61 ATED - 1 -> disa
7ef0: 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 ble support for
7f00: 64 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 74 deprecated funct
7f10: 69 6f 6e 73 0d 0a 23 20 20 20 20 20 20 20 20 20 ions..#
7f20: 20 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 0 ->
7f30: 20 65 6e 61 62 6c 65 20 64 65 70 72 65 63 61 74 enable deprecat
7f40: 65 64 20 66 75 6e 63 74 69 6f 6e 73 0d 0a 0d 0a ed functions....
7f50: 23 20 44 65 66 61 75 6c 74 73 20 2d 20 50 65 72 # Defaults - Per
7f60: 6d 69 74 20 64 65 70 72 65 63 61 74 65 64 20 66 mit deprecated f
7f70: 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 77 61 72 unctions and war
7f80: 6e 69 6e 67 20 6c 65 76 65 6c 20 33 0d 0a 54 43 ning level 3..TC
7f90: 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 L_NO_DEPRECATED.
7fa0: 20 20 20 20 3d 20 30 0d 0a 57 41 52 4e 49 4e 47 = 0..WARNING
7fb0: 53 09 09 20 20 20 20 3d 20 2d 57 33 0d 0a 0d 0a S.. = -W3....
7fc0: 21 69 66 20 22 24 28 43 48 45 43 4b 53 29 22 20 !if "$(CHECKS)"
7fd0: 21 3d 20 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 != "" && ![nmake
7fe0: 68 6c 70 20 2d 66 20 22 24 28 43 48 45 43 4b 53 hlp -f "$(CHECKS
7ff0: 29 22 20 22 6e 6f 6e 65 22 5d 0d 0a 0d 0a 21 69 )" "none"]....!i
8000: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
8010: 28 43 48 45 43 4b 53 29 20 22 6e 6f 64 65 70 22 (CHECKS) "nodep"
8020: 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 ]..!message ***
8030: 44 6f 69 6e 67 20 6e 6f 64 65 70 20 63 68 65 63 Doing nodep chec
8040: 6b 0d 0a 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 k..TCL_NO_DEPREC
8050: 41 54 45 44 09 20 20 20 20 3d 20 31 0d 0a 21 65 ATED. = 1..!e
8060: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 ndif....!if [nma
8070: 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b kehlp -f $(CHECK
8080: 53 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0d 0a S) "fullwarn"]..
8090: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 !message *** Doi
80a0: 6e 67 20 66 75 6c 6c 20 77 61 72 6e 69 6e 67 73 ng full warnings
80b0: 20 63 68 65 63 6b 0d 0a 57 41 52 4e 49 4e 47 53 check..WARNINGS
80c0: 09 09 20 20 20 20 3d 20 2d 57 34 0d 0a 21 69 66 .. = -W4..!if
80d0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 77 [nmakehlp -l -w
80e0: 61 72 6e 3a 33 20 24 28 4c 49 4e 4b 45 52 5f 54 arn:3 $(LINKER_T
80f0: 45 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b ESTFLAGS)]..LINK
8100: 45 52 46 4c 41 47 53 09 09 20 20 20 20 3d 20 24 ERFLAGS.. = $
8110: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 77 (LINKERFLAGS) -w
8120: 61 72 6e 3a 33 0d 0a 21 65 6e 64 69 66 0d 0a 21 arn:3..!endif..!
8130: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d endif....!if [nm
8140: 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 akehlp -f $(CHEC
8150: 4b 53 29 20 22 36 34 62 69 74 22 5d 20 26 26 20 KS) "64bit"] &&
8160: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 57 70 [nmakehlp -c -Wp
8170: 36 34 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 64]..!message **
8180: 2a 20 44 6f 69 6e 67 20 36 34 62 69 74 20 70 6f * Doing 64bit po
8190: 72 74 61 62 69 6c 69 74 79 20 77 61 72 6e 69 6e rtability warnin
81a0: 67 73 0d 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 gs..WARNINGS..
81b0: 20 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 20 = $(WARNINGS)
81c0: 2d 57 70 36 34 0d 0a 21 65 6e 64 69 66 0d 0a 0d -Wp64..!endif...
81d0: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a 23 23 23 .!endif......###
81e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
81f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8210: 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 #############..#
8220: 20 31 30 2e 20 43 6f 6e 73 74 72 75 63 74 20 6f 10. Construct o
8230: 75 74 70 75 74 20 64 69 72 65 63 74 6f 72 79 20 utput directory
8240: 61 6e 64 20 66 69 6c 65 20 70 61 74 68 73 0d 0a and file paths..
8250: 23 20 46 69 67 75 72 65 2d 6f 75 74 20 68 6f 77 # Figure-out how
8260: 20 74 6f 20 6e 61 6d 65 20 6f 75 72 20 69 6e 74 to name our int
8270: 65 72 6d 65 64 69 61 74 65 20 61 6e 64 20 6f 75 ermediate and ou
8280: 74 70 75 74 20 64 69 72 65 63 74 6f 72 69 65 73 tput directories
8290: 2e 0d 0a 23 20 49 6e 20 6f 72 64 65 72 20 74 6f ...# In order to
82a0: 20 61 76 6f 69 64 20 69 6e 61 64 76 65 72 74 65 avoid inadverte
82b0: 6e 74 20 6d 69 78 69 6e 67 20 6f 66 20 6f 62 6a nt mixing of obj
82c0: 65 63 74 20 66 69 6c 65 73 20 62 75 69 6c 74 20 ect files built
82d0: 75 73 69 6e 67 0d 0a 23 20 64 69 66 66 65 72 65 using..# differe
82e0: 6e 74 20 63 6f 6d 70 69 6c 65 72 73 2c 20 62 75 nt compilers, bu
82f0: 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ild configuratio
8300: 6e 73 20 65 74 63 2e 2c 0d 0a 23 0d 0a 23 20 4e ns etc.,..#..# N
8310: 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e aming convention
8320: 20 28 73 75 66 66 69 78 65 73 29 3a 0d 0a 23 20 (suffixes):..#
8330: 20 20 74 20 3d 20 66 75 6c 6c 20 74 68 72 65 61 t = full threa
8340: 64 20 73 75 70 70 6f 72 74 2e 20 28 4e 6f 74 20 d support. (Not
8350: 75 73 65 64 20 66 6f 72 20 54 63 6c 20 3e 3d 20 used for Tcl >=
8360: 39 2e 30 29 0d 0a 23 20 20 20 73 20 3d 20 73 74 9.0)..# s = st
8370: 61 74 69 63 20 6c 69 62 72 61 72 79 20 28 61 73 atic library (as
8380: 20 6f 70 70 6f 73 65 64 20 74 6f 20 61 6e 20 69 opposed to an i
8390: 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 29 0d 0a mport library)..
83a0: 23 20 20 20 67 20 3d 20 6c 69 6e 6b 65 64 20 74 # g = linked t
83b0: 6f 20 74 68 65 20 64 65 62 75 67 20 65 6e 61 62 o the debug enab
83c0: 6c 65 64 20 43 20 72 75 6e 2d 74 69 6d 65 2e 0d led C run-time..
83d0: 0a 23 20 20 20 78 20 3d 20 73 70 65 63 69 61 6c .# x = special
83e0: 20 73 74 61 74 69 63 20 62 75 69 6c 64 20 77 68 static build wh
83f0: 65 6e 20 69 74 20 6c 69 6e 6b 73 20 74 6f 20 74 en it links to t
8400: 68 65 20 64 79 6e 61 6d 69 63 20 43 20 72 75 6e he dynamic C run
8410: 2d 74 69 6d 65 2e 0d 0a 23 0d 0a 23 20 54 68 65 -time...#..# The
8420: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
8430: 73 20 61 72 65 20 73 65 74 20 69 6e 20 74 68 69 s are set in thi
8440: 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23 20 53 55 s section:..# SU
8450: 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 78 20 FX - the suffix
8460: 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e 61 72 to use for binar
8470: 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 62 6f ies based on abo
8480: 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 65 6e ve naming conven
8490: 74 69 6f 6e 0d 0a 23 20 42 55 49 4c 44 44 49 52 tion..# BUILDDIR
84a0: 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c 65 76 TOP - the toplev
84b0: 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 70 75 el default outpu
84c0: 74 20 64 69 72 65 63 74 6f 72 79 0d 0a 23 20 20 t directory..#
84d0: 20 20 20 20 69 73 20 6f 66 20 74 68 65 20 66 6f is of the fo
84e0: 72 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 62 75 rm {Release,Debu
84f0: 67 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f 4d 50 g}[_AMD64][_COMP
8500: 49 4c 45 52 56 45 52 53 49 4f 4e 5d 0d 0a 23 20 ILERVERSION]..#
8510: 54 4d 50 5f 44 49 52 20 2d 20 64 69 72 65 63 74 TMP_DIR - direct
8520: 6f 72 79 20 77 68 65 72 65 20 6f 62 6a 65 63 74 ory where object
8530: 20 66 69 6c 65 73 20 61 72 65 20 63 72 65 61 74 files are creat
8540: 65 64 0d 0a 23 20 4f 55 54 5f 44 49 52 20 2d 20 ed..# OUT_DIR -
8550: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 directory where
8560: 6f 75 74 70 75 74 20 65 78 65 63 75 74 61 62 6c output executabl
8570: 65 73 20 61 72 65 20 63 72 65 61 74 65 64 0d 0a es are created..
8580: 23 20 42 6f 74 68 20 54 4d 50 5f 44 49 52 20 61 # Both TMP_DIR a
8590: 6e 64 20 4f 55 54 5f 44 49 52 20 61 72 65 20 64 nd OUT_DIR are d
85a0: 65 66 61 75 6c 74 65 64 20 6f 6e 6c 79 20 69 66 efaulted only if
85b0: 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 62 79 20 not defined by
85c0: 74 68 65 0d 0a 23 20 70 61 72 65 6e 74 20 6d 61 the..# parent ma
85d0: 6b 65 66 69 6c 65 20 28 6f 72 20 63 6f 6d 6d 61 kefile (or comma
85e0: 6e 64 20 6c 69 6e 65 29 2e 20 54 68 65 20 64 65 nd line). The de
85f0: 66 61 75 6c 74 20 76 61 6c 75 65 73 20 61 72 65 fault values are
8600: 0d 0a 23 20 62 61 73 65 64 20 6f 6e 20 42 55 49 ..# based on BUI
8610: 4c 44 44 49 52 54 4f 50 2e 0d 0a 23 20 53 54 55 LDDIRTOP...# STU
8620: 42 50 52 45 46 49 58 20 2d 20 6e 61 6d 65 20 6f BPREFIX - name o
8630: 66 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 72 f the stubs libr
8640: 61 72 79 20 66 6f 72 20 74 68 69 73 20 70 72 6f ary for this pro
8650: 6a 65 63 74 0d 0a 23 20 50 52 4a 49 4d 50 4c 49 ject..# PRJIMPLI
8660: 42 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20 B - output path
8670: 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 of the generated
8680: 20 70 72 6f 6a 65 63 74 20 69 6d 70 6f 72 74 20 project import
8690: 6c 69 62 72 61 72 79 0d 0a 23 20 50 52 4a 4c 49 library..# PRJLI
86a0: 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20 BNAME - name of
86b0: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
86c0: 74 20 6c 69 62 72 61 72 79 0d 0a 23 20 50 52 4a t library..# PRJ
86d0: 4c 49 42 20 20 20 20 20 2d 20 6f 75 74 70 75 74 LIB - output
86e0: 20 70 61 74 68 20 6f 66 20 67 65 6e 65 72 61 74 path of generat
86f0: 65 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 ed project libra
8700: 72 79 0d 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 ry..# PRJSTUBLIB
8710: 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20 74 NAME - name of t
8720: 68 65 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f he generated pro
8730: 6a 65 63 74 20 73 74 75 62 73 20 6c 69 62 72 61 ject stubs libra
8740: 72 79 0d 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 ry..# PRJSTUBLIB
8750: 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f - output path o
8760: 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 f the generated
8770: 70 72 6f 6a 65 63 74 20 73 74 75 62 73 20 6c 69 project stubs li
8780: 62 72 61 72 79 0d 0a 23 20 52 45 53 46 49 4c 45 brary..# RESFILE
8790: 20 2d 20 6f 75 74 70 75 74 20 72 65 73 6f 75 72 - output resour
87a0: 63 65 20 66 69 6c 65 20 28 6f 6e 6c 79 20 69 66 ce file (only if
87b0: 20 6e 6f 74 20 73 74 61 74 69 63 20 62 75 69 6c not static buil
87c0: 64 29 0d 0a 0d 0a 53 55 46 58 09 20 20 20 20 3d d)....SUFX. =
87d0: 20 74 73 67 78 0d 0a 0d 0a 21 69 66 20 24 28 44 tsgx....!if $(D
87e0: 45 42 55 47 29 0d 0a 42 55 49 4c 44 44 49 52 54 EBUG)..BUILDDIRT
87f0: 4f 50 20 3d 20 44 65 62 75 67 0d 0a 21 65 6c 73 OP = Debug..!els
8800: 65 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d e..BUILDDIRTOP =
8810: 20 52 65 6c 65 61 73 65 0d 0a 21 65 6e 64 69 66 Release..!endif
8820: 0d 0a 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 ....!if "$(MACHI
8830: 4e 45 29 22 20 21 3d 20 22 49 58 38 36 22 0d 0a NE)" != "IX86"..
8840: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 28 42 BUILDDIRTOP =$(B
8850: 55 49 4c 44 44 49 52 54 4f 50 29 5f 24 28 4d 41 UILDDIRTOP)_$(MA
8860: 43 48 49 4e 45 29 0d 0a 21 65 6e 64 69 66 0d 0a CHINE)..!endif..
8870: 21 69 66 20 24 28 56 43 56 45 52 29 20 3e 20 36 !if $(VCVER) > 6
8880: 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 ..BUILDDIRTOP =$
8890: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 56 43 (BUILDDIRTOP)_VC
88a0: 24 28 56 43 56 45 52 29 0d 0a 21 65 6e 64 69 66 $(VCVER)..!endif
88b0: 0d 0a 0d 0a 21 69 66 20 21 24 28 44 45 42 55 47 ....!if !$(DEBUG
88c0: 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 53 49 ) || $(TCL_VERSI
88d0: 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 28 44 45 ON) > 86 || $(DE
88e0: 42 55 47 29 20 26 26 20 24 28 55 4e 43 48 45 43 BUG) && $(UNCHEC
88f0: 4b 45 44 29 0d 0a 53 55 46 58 09 20 20 20 20 3d KED)..SUFX. =
8900: 20 24 28 53 55 46 58 3a 67 3d 29 0d 0a 21 65 6e $(SUFX:g=)..!en
8910: 64 69 66 0d 0a 0d 0a 54 4d 50 5f 44 49 52 46 55 dif....TMP_DIRFU
8920: 4c 4c 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49 LL = .\$(BUILDDI
8930: 52 54 4f 50 29 5c 24 28 50 52 4f 4a 45 43 54 29 RTOP)\$(PROJECT)
8940: 5f 54 68 72 65 61 64 65 64 44 79 6e 61 6d 69 63 _ThreadedDynamic
8950: 53 74 61 74 69 63 58 0d 0a 0d 0a 21 69 66 20 21 StaticX....!if !
8960: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0d $(STATIC_BUILD).
8970: 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 .TMP_DIRFULL = $
8980: 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 53 74 61 (TMP_DIRFULL:Sta
8990: 74 69 63 3d 29 0d 0a 53 55 46 58 09 20 20 20 20 tic=)..SUFX.
89a0: 3d 20 24 28 53 55 46 58 3a 73 3d 29 0d 0a 45 58 = $(SUFX:s=)..EX
89b0: 54 09 20 20 20 20 3d 20 64 6c 6c 0d 0a 54 4d 50 T. = dll..TMP
89c0: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 _DIRFULL = $(TMP
89d0: 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0d 0a 53 55 _DIRFULL:X=)..SU
89e0: 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a FX. = $(SUFX:
89f0: 78 3d 29 0d 0a 21 65 6c 73 65 0d 0a 54 4d 50 5f x=)..!else..TMP_
8a00: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
8a10: 44 49 52 46 55 4c 4c 3a 44 79 6e 61 6d 69 63 3d DIRFULL:Dynamic=
8a20: 29 0d 0a 45 58 54 09 20 20 20 20 3d 20 6c 69 62 )..EXT. = lib
8a30: 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 54 29 20 ..!if $(MSVCRT)
8a40: 26 26 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e && $(TCL_VERSION
8a50: 29 20 3e 20 38 36 20 7c 7c 20 21 24 28 4d 53 56 ) > 86 || !$(MSV
8a60: 43 52 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45 CRT) && $(TCL_VE
8a70: 52 53 49 4f 4e 29 20 3c 20 38 37 0d 0a 54 4d 50 RSION) < 87..TMP
8a80: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 _DIRFULL = $(TMP
8a90: 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0d 0a 53 55 _DIRFULL:X=)..SU
8aa0: 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a FX. = $(SUFX:
8ab0: 78 3d 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e x=)..!endif..!en
8ac0: 64 69 66 0d 0a 0d 0a 21 69 66 20 21 24 28 54 43 dif....!if !$(TC
8ad0: 4c 5f 54 48 52 45 41 44 53 29 20 7c 7c 20 24 28 L_THREADS) || $(
8ae0: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 TCL_VERSION) > 8
8af0: 36 0d 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 6..TMP_DIRFULL =
8b00: 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 54 $(TMP_DIRFULL:T
8b10: 68 72 65 61 64 65 64 3d 29 0d 0a 53 55 46 58 09 hreaded=)..SUFX.
8b20: 20 20 20 20 3d 20 24 28 53 55 46 58 3a 74 3d 29 = $(SUFX:t=)
8b30: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e ..!endif....!ifn
8b40: 64 65 66 20 54 4d 50 5f 44 49 52 0d 0a 54 4d 50 def TMP_DIR..TMP
8b50: 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50 _DIR. = $(TMP
8b60: 5f 44 49 52 46 55 4c 4c 29 0d 0a 21 69 66 6e 64 _DIRFULL)..!ifnd
8b70: 65 66 20 4f 55 54 5f 44 49 52 0d 0a 4f 55 54 5f ef OUT_DIR..OUT_
8b80: 44 49 52 09 20 20 20 20 3d 20 2e 5c 24 28 42 55 DIR. = .\$(BU
8b90: 49 4c 44 44 49 52 54 4f 50 29 0d 0a 21 65 6e 64 ILDDIRTOP)..!end
8ba0: 69 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 6e 64 if..!else..!ifnd
8bb0: 65 66 20 4f 55 54 5f 44 49 52 0d 0a 4f 55 54 5f ef OUT_DIR..OUT_
8bc0: 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50 5f DIR. = $(TMP_
8bd0: 44 49 52 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 DIR)..!endif..!e
8be0: 6e 64 69 66 0d 0a 0d 0a 23 20 52 65 6c 61 74 69 ndif....# Relati
8bf0: 76 65 20 70 61 74 68 73 20 2d 3e 20 61 62 73 6f ve paths -> abso
8c00: 6c 75 74 65 0d 0a 21 69 66 20 5b 65 63 68 6f 20 lute..!if [echo
8c10: 4f 55 54 5f 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 OUT_DIR = \> nma
8c20: 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 kehlp.out] \..
8c30: 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 51 || [nmakehlp -Q
8c40: 20 22 24 28 4f 55 54 5f 44 49 52 29 22 20 3e 3e "$(OUT_DIR)" >>
8c50: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a nmakehlp.out]..
8c60: 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 !error *** Could
8c70: 20 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 6c 69 not fully quali
8c80: 66 79 20 70 61 74 68 20 4f 55 54 5f 44 49 52 3d fy path OUT_DIR=
8c90: 24 28 4f 55 54 5f 44 49 52 29 0d 0a 21 65 6e 64 $(OUT_DIR)..!end
8ca0: 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4d if..!if [echo TM
8cb0: 50 5f 44 49 52 20 3d 20 5c 3e 3e 20 6e 6d 61 6b P_DIR = \>> nmak
8cc0: 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20 ehlp.out] \..
8cd0: 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 51 20 || [nmakehlp -Q
8ce0: 22 24 28 54 4d 50 5f 44 49 52 29 22 20 3e 3e 20 "$(TMP_DIR)" >>
8cf0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21 nmakehlp.out]..!
8d00: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
8d10: 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 not fully qualif
8d20: 79 20 70 61 74 68 20 54 4d 50 5f 44 49 52 3d 24 y path TMP_DIR=$
8d30: 28 54 4d 50 5f 44 49 52 29 0d 0a 21 65 6e 64 69 (TMP_DIR)..!endi
8d40: 66 0d 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b f..!include nmak
8d50: 65 68 6c 70 2e 6f 75 74 0d 0a 0d 0a 23 20 54 68 ehlp.out....# Th
8d60: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 74 e name of the st
8d70: 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 20 ubs library for
8d80: 74 68 65 20 70 72 6f 6a 65 63 74 20 62 65 69 6e the project bein
8d90: 67 20 62 75 69 6c 74 0d 0a 53 54 55 42 50 52 45 g built..STUBPRE
8da0: 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 52 4f FIX = $(PRO
8db0: 4a 45 43 54 29 73 74 75 62 0d 0a 0d 0a 23 0d 0a JECT)stub....#..
8dc0: 23 20 53 65 74 20 75 70 20 70 61 74 68 73 20 74 # Set up paths t
8dd0: 6f 20 76 61 72 69 6f 75 73 20 54 63 6c 20 65 78 o various Tcl ex
8de0: 65 63 75 74 61 62 6c 65 73 20 61 6e 64 20 6c 69 ecutables and li
8df0: 62 72 61 72 69 65 73 20 6e 65 65 64 65 64 20 62 braries needed b
8e00: 79 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 0d y extensions..#.
8e10: 0a 0d 0a 23 20 54 49 50 20 34 33 30 2e 20 55 6e ...# TIP 430. Un
8e20: 75 73 65 64 20 66 6f 72 20 38 2e 36 20 62 75 74 used for 8.6 but
8e30: 20 6e 6f 20 68 61 72 6d 20 64 65 66 69 6e 69 6e no harm definin
8e40: 67 20 69 74 20 74 6f 20 61 6c 6c 6f 77 20 61 20 g it to allow a
8e50: 63 6f 6d 6d 6f 6e 20 72 75 6c 65 73 2e 76 63 0d common rules.vc.
8e60: 0a 54 43 4c 5f 5a 49 50 5f 46 49 4c 45 20 3d 20 .TCL_ZIP_FILE =
8e70: 6c 69 62 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f libtcl$(TCL_MAJO
8e80: 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c R_VERSION).$(TCL
8e90: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24 _MINOR_VERSION)$
8ea0: 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 (TCL_PATCH_LETTE
8eb0: 52 29 24 28 54 43 4c 5f 52 45 4c 45 41 53 45 5f R)$(TCL_RELEASE_
8ec0: 53 45 52 49 41 4c 29 2e 7a 69 70 0d 0a 54 4b 5f SERIAL).zip..TK_
8ed0: 5a 49 50 5f 46 49 4c 45 20 3d 20 6c 69 62 74 6b ZIP_FILE = libtk
8ee0: 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 $(TK_MAJOR_VERSI
8ef0: 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 ON).$(TK_MINOR_V
8f00: 45 52 53 49 4f 4e 29 24 28 54 4b 5f 50 41 54 43 ERSION)$(TK_PATC
8f10: 48 5f 4c 45 54 54 45 52 29 24 28 54 4b 5f 52 45 H_LETTER)$(TK_RE
8f20: 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 2e 7a 69 LEASE_SERIAL).zi
8f30: 70 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 p....!if $(DOING
8f40: 5f 54 43 4c 29 0d 0a 54 43 4c 53 48 4e 41 4d 45 _TCL)..TCLSHNAME
8f50: 20 20 20 20 20 20 20 3d 20 24 28 50 52 4f 4a 45 = $(PROJE
8f60: 43 54 29 73 68 24 28 56 45 52 53 49 4f 4e 29 24 CT)sh$(VERSION)$
8f70: 28 53 55 46 58 29 2e 65 78 65 0d 0a 54 43 4c 53 (SUFX).exe..TCLS
8f80: 48 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c H..= $(OUT_DIR)\
8f90: 24 28 54 43 4c 53 48 4e 41 4d 45 29 0d 0a 54 43 $(TCLSHNAME)..TC
8fa0: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 54 5f LIMPLIB.= $(OUT_
8fb0: 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 24 DIR)\$(PROJECT)$
8fc0: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 (VERSION)$(SUFX)
8fd0: 2e 6c 69 62 0d 0a 54 43 4c 4c 49 42 4e 41 4d 45 .lib..TCLLIBNAME
8fe0: 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 28 56 .= $(PROJECT)$(V
8ff0: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 ERSION)$(SUFX).$
9000: 28 45 58 54 29 0d 0a 54 43 4c 4c 49 42 09 09 3d (EXT)..TCLLIB..=
9010: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 $(OUT_DIR)\$(TC
9020: 4c 4c 49 42 4e 41 4d 45 29 0d 0a 54 43 4c 53 43 LLIBNAME)..TCLSC
9030: 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 28 4f RIPTZIP = $(O
9040: 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 5f 5a 49 UT_DIR)\$(TCL_ZI
9050: 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 69 66 20 24 P_FILE)....!if $
9060: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
9070: 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 54 55 ON) == 8..TCLSTU
9080: 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 BLIBNAME.= $(STU
9090: 42 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f BPREFIX)$(VERSIO
90a0: 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54 N).lib..!else..T
90b0: 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 CLSTUBLIBNAME.=
90c0: 24 28 53 54 55 42 50 52 45 46 49 58 29 2e 6c 69 $(STUBPREFIX).li
90d0: 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 53 54 b..!endif..TCLST
90e0: 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 UBLIB.= $(OUT_DI
90f0: 52 29 5c 24 28 54 43 4c 53 54 55 42 4c 49 42 4e R)\$(TCLSTUBLIBN
9100: 41 4d 45 29 0d 0a 54 43 4c 5f 49 4e 43 4c 55 44 AME)..TCL_INCLUD
9110: 45 53 20 20 20 20 3d 20 2d 49 22 24 28 57 49 4e ES = -I"$(WIN
9120: 5f 44 49 52 29 22 20 2d 49 22 24 28 47 45 4e 45 _DIR)" -I"$(GENE
9130: 52 49 43 44 49 52 29 22 0d 0a 0d 0a 21 65 6c 73 RICDIR)"....!els
9140: 65 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c e # !$(DOING_TCL
9150: 29 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e )....!if $(TCLIN
9160: 53 54 41 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e STALL) # Buildin
9170: 67 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 g against an ins
9180: 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 0d 0a 23 20 talled Tcl....#
9190: 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 When building ex
91a0: 74 65 6e 73 69 6f 6e 73 2c 20 77 65 20 6e 65 65 tensions, we nee
91b0: 64 20 74 6f 20 6c 6f 63 61 74 65 20 74 63 6c 73 d to locate tcls
91c0: 68 2e 20 44 65 70 65 6e 64 69 6e 67 20 6f 6e 20 h. Depending on
91d0: 76 65 72 73 69 6f 6e 0d 0a 23 20 6f 66 20 54 63 version..# of Tc
91e0: 6c 20 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e l we are buildin
91f0: 67 20 61 67 61 69 6e 73 74 2c 20 74 68 69 73 20 g against, this
9200: 6d 61 79 20 6f 72 20 6d 61 79 20 6e 6f 74 20 68 may or may not h
9210: 61 76 65 20 61 20 22 74 22 20 73 75 66 66 69 78 ave a "t" suffix
9220: 2e 0d 0a 23 20 54 72 79 20 76 61 72 69 6f 75 73 ...# Try various
9230: 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 20 69 possibilities i
9240: 6e 20 74 75 72 6e 2e 0d 0a 54 43 4c 53 48 09 09 n turn...TCLSH..
9250: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 6e = $(_TCLDIR)\bin
9260: 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 \tclsh$(TCL_VERS
9270: 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 65 ION)$(SUFX:t=).e
9280: 78 65 0d 0a 21 69 66 20 21 65 78 69 73 74 28 22 xe..!if !exist("
9290: 24 28 54 43 4c 53 48 29 22 29 0d 0a 54 43 4c 53 $(TCLSH)")..TCLS
92a0: 48 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 H = $(
92b0: 5f 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c _TCLDIR)\bin\tcl
92c0: 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 sh$(TCL_VERSION)
92d0: 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0d t$(SUFX:t=).exe.
92e0: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 .!endif....!if $
92f0: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
9300: 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 54 55 ON) == 8..TCLSTU
9310: 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 BLIB.= $(_TCLDIR
9320: 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 24 28 54 )\lib\tclstub$(T
9330: 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0d CL_VERSION).lib.
9340: 0a 21 65 6c 73 65 0d 0a 54 43 4c 53 54 55 42 4c .!else..TCLSTUBL
9350: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9360: 6c 69 62 5c 74 63 6c 73 74 75 62 2e 6c 69 62 0d lib\tclstub.lib.
9370: 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 49 4d 50 4c .!endif..TCLIMPL
9380: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9390: 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 lib\tcl$(TCL_VER
93a0: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
93b0: 6c 69 62 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c lib..# When buil
93c0: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c ding extensions,
93d0: 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 may be linking
93e0: 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 against Tcl that
93f0: 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23 does not add..#
9400: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 "t" suffix (e.g
9410: 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e . 8.6). If lib n
9420: 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 ot found check f
9430: 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c or that possibil
9440: 69 74 79 2e 0d 0a 21 69 66 20 21 65 78 69 73 74 ity...!if !exist
9450: 28 22 24 28 54 43 4c 49 4d 50 4c 49 42 29 22 29 ("$(TCLIMPLIB)")
9460: 0d 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 ..TCLIMPLIB.= $(
9470: 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c _TCLDIR)\lib\tcl
9480: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 $(TCL_VERSION)t$
9490: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 21 (SUFX:t=).lib..!
94a0: 65 6e 64 69 66 0d 0a 54 43 4c 5f 4c 49 42 52 41 endif..TCL_LIBRA
94b0: 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c RY.= $(_TCLDIR)\
94c0: 6c 69 62 0d 0a 54 43 4c 52 45 47 4c 49 42 09 3d lib..TCLREGLIB.=
94d0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
94e0: 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 3a 74 tclreg13$(SUFX:t
94f0: 3d 29 2e 6c 69 62 0d 0a 54 43 4c 44 44 45 4c 49 =).lib..TCLDDELI
9500: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c B.= $(_TCLDIR)\l
9510: 69 62 5c 74 63 6c 64 64 65 31 34 24 28 53 55 46 ib\tcldde14$(SUF
9520: 58 3a 74 3d 29 2e 6c 69 62 0d 0a 54 43 4c 53 43 X:t=).lib..TCLSC
9530: 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c RIPTZIP.= $(_TCL
9540: 44 49 52 29 5c 6c 69 62 5c 24 28 54 43 4c 5f 5a DIR)\lib\$(TCL_Z
9550: 49 50 5f 46 49 4c 45 29 0d 0a 54 43 4c 54 4f 4f IP_FILE)..TCLTOO
9560: 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 5c 68 61 LSDIR.= \must\ha
9570: 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 73 5c 74 ve\tcl\sources\t
9580: 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c 74 61 72 o\build\this\tar
9590: 67 65 74 0d 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 get..TCL_INCLUDE
95a0: 53 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 43 4c S = -I"$(_TCL
95b0: 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0d 0a 0d DIR)\include"...
95c0: 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e .!else # Buildin
95d0: 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f g against Tcl so
95e0: 75 72 63 65 73 0d 0a 0d 0a 54 43 4c 53 48 09 09 urces....TCLSH..
95f0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
9600: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
9610: 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 tclsh$(TCL_VERSI
9620: 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 ON)$(SUFX:t=).ex
9630: 65 0d 0a 21 69 66 20 21 65 78 69 73 74 28 24 28 e..!if !exist($(
9640: 54 43 4c 53 48 29 29 0d 0a 54 43 4c 53 48 09 09 TCLSH))..TCLSH..
9650: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
9660: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
9670: 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 tclsh$(TCL_VERSI
9680: 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 ON)t$(SUFX:t=).e
9690: 78 65 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 xe..!endif..!if
96a0: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
96b0: 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 54 ION) == 8..TCLST
96c0: 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 UBLIB.= $(_TCLDI
96d0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
96e0: 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 24 28 54 RTOP)\tclstub$(T
96f0: 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0d CL_VERSION).lib.
9700: 0a 21 65 6c 73 65 0d 0a 54 43 4c 53 54 55 42 4c .!else..TCLSTUBL
9710: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9720: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
9730: 50 29 5c 74 63 6c 73 74 75 62 2e 6c 69 62 0d 0a P)\tclstub.lib..
9740: 21 65 6e 64 69 66 0d 0a 54 43 4c 49 4d 50 4c 49 !endif..TCLIMPLI
9750: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
9760: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9770: 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 )\tcl$(TCL_VERSI
9780: 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 ON)$(SUFX:t=).li
9790: 62 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 b..# When buildi
97a0: 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d ng extensions, m
97b0: 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 ay be linking ag
97c0: 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 20 64 ainst Tcl that d
97d0: 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23 20 22 oes not add..# "
97e0: 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 t" suffix (e.g.
97f0: 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 8.6). If lib not
9800: 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 found check for
9810: 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 that possibilit
9820: 79 2e 0d 0a 21 69 66 20 21 65 78 69 73 74 28 22 y...!if !exist("
9830: 24 28 54 43 4c 49 4d 50 4c 49 42 29 22 29 0d 0a $(TCLIMPLIB)")..
9840: 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 TCLIMPLIB.= $(_T
9850: 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 CLDIR)\win\$(BUI
9860: 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 24 28 54 LDDIRTOP)\tcl$(T
9870: 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 CL_VERSION)t$(SU
9880: 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 21 65 6e 64 FX:t=).lib..!end
9890: 69 66 0d 0a 54 43 4c 5f 4c 49 42 52 41 52 59 09 if..TCL_LIBRARY.
98a0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 = $(_TCLDIR)\lib
98b0: 72 61 72 79 0d 0a 54 43 4c 52 45 47 4c 49 42 09 rary..TCLREGLIB.
98c0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
98d0: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
98e0: 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 3a 74 tclreg13$(SUFX:t
98f0: 3d 29 2e 6c 69 62 0d 0a 54 43 4c 44 44 45 4c 49 =).lib..TCLDDELI
9900: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
9910: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9920: 29 5c 74 63 6c 64 64 65 31 34 24 28 53 55 46 58 )\tcldde14$(SUFX
9930: 3a 74 3d 29 2e 6c 69 62 0d 0a 54 43 4c 53 43 52 :t=).lib..TCLSCR
9940: 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 IPTZIP.= $(_TCLD
9950: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9960: 49 52 54 4f 50 29 5c 24 28 54 43 4c 5f 5a 49 50 IRTOP)\$(TCL_ZIP
9970: 5f 46 49 4c 45 29 0d 0a 54 43 4c 54 4f 4f 4c 53 _FILE)..TCLTOOLS
9980: 44 49 52 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 DIR.= $(_TCLDIR)
9990: 5c 74 6f 6f 6c 73 0d 0a 54 43 4c 5f 49 4e 43 4c \tools..TCL_INCL
99a0: 55 44 45 53 09 3d 20 2d 49 22 24 28 5f 54 43 4c UDES.= -I"$(_TCL
99b0: 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 2d 49 DIR)\generic" -I
99c0: 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 22 "$(_TCLDIR)\win"
99d0: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c ....!endif # TCL
99e0: 49 4e 53 54 41 4c 4c 0d 0a 0d 0a 21 69 66 20 21 INSTALL....!if !
99f0: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 $(STATIC_BUILD)
9a00: 26 26 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f && "$(TCL_BUILD_
9a10: 46 4f 52 29 22 20 3d 3d 20 22 38 22 0d 0a 74 63 FOR)" == "8"..tc
9a20: 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 llibs = "$(TCLST
9a30: 55 42 4c 49 42 29 22 0d 0a 21 65 6c 73 65 0d 0a UBLIB)"..!else..
9a40: 74 63 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c tcllibs = "$(TCL
9a50: 53 54 55 42 4c 49 42 29 22 20 22 24 28 54 43 4c STUBLIB)" "$(TCL
9a60: 49 4d 50 4c 49 42 29 22 0d 0a 21 65 6e 64 69 66 IMPLIB)"..!endif
9a70: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 44 ....!endif # $(D
9a80: 4f 49 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 23 20 57 OING_TCL)....# W
9a90: 65 20 6e 65 65 64 20 61 20 74 63 6c 73 68 20 74 e need a tclsh t
9aa0: 68 61 74 20 77 69 6c 6c 20 72 75 6e 20 6f 6e 20 hat will run on
9ab0: 74 68 65 20 68 6f 73 74 20 6d 61 63 68 69 6e 65 the host machine
9ac0: 20 61 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 as part of the
9ad0: 62 75 69 6c 64 2e 0d 0a 23 20 49 58 38 36 20 72 build...# IX86 r
9ae0: 75 6e 73 20 6f 6e 20 61 6c 6c 20 61 72 63 68 69 uns on all archi
9af0: 74 65 63 74 75 72 65 73 2e 0d 0a 21 69 66 6e 64 tectures...!ifnd
9b00: 65 66 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 0d ef TCLSH_NATIVE.
9b10: 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 .!if "$(MACHINE)
9b20: 22 20 3d 3d 20 22 49 58 38 36 22 20 7c 7c 20 22 " == "IX86" || "
9b30: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
9b40: 24 28 4e 41 54 49 56 45 5f 41 52 43 48 29 22 0d $(NATIVE_ARCH)".
9b50: 0a 54 43 4c 53 48 5f 4e 41 54 49 56 45 09 3d 20 .TCLSH_NATIVE.=
9b60: 24 28 54 43 4c 53 48 29 0d 0a 21 65 6c 73 65 0d $(TCLSH)..!else.
9b70: 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 73 74 .!error You must
9b80: 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 explicitly set
9b90: 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 6f 72 TCLSH_NATIVE for
9ba0: 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 cross-compilati
9bb0: 6f 6e 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 on..!endif..!end
9bc0: 69 66 0d 0a 0d 0a 23 20 44 6f 20 74 68 65 20 73 if....# Do the s
9bd0: 61 6d 65 20 66 6f 72 20 54 6b 20 61 6e 64 20 54 ame for Tk and T
9be0: 6b 20 65 78 74 65 6e 73 69 6f 6e 73 20 74 68 61 k extensions tha
9bf0: 74 20 72 65 71 75 69 72 65 20 74 68 65 20 54 6b t require the Tk
9c00: 20 6c 69 62 72 61 72 69 65 73 0d 0a 21 69 66 20 libraries..!if
9c10: 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 $(DOING_TK) || $
9c20: 28 4e 45 45 44 5f 54 4b 29 0d 0a 57 49 53 48 4e (NEED_TK)..WISHN
9c30: 41 4d 45 50 52 45 46 49 58 20 3d 20 77 69 73 68 AMEPREFIX = wish
9c40: 0d 0a 57 49 53 48 4e 41 4d 45 20 3d 20 24 28 57 ..WISHNAME = $(W
9c50: 49 53 48 4e 41 4d 45 50 52 45 46 49 58 29 24 28 ISHNAMEPREFIX)$(
9c60: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
9c70: 58 29 2e 65 78 65 0d 0a 54 4b 4c 49 42 4e 41 4d X).exe..TKLIBNAM
9c80: 45 38 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 E8.= tk$(TK_VERS
9c90: 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 ION)$(SUFX).$(EX
9ca0: 54 29 0d 0a 54 4b 4c 49 42 4e 41 4d 45 39 09 3d T)..TKLIBNAME9.=
9cb0: 20 74 63 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 tcl9tk$(TK_VERS
9cc0: 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 ION)$(SUFX).$(EX
9cd0: 54 29 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 T)..!if $(TCL_MA
9ce0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 JOR_VERSION) ==
9cf0: 38 20 7c 7c 20 22 24 28 54 43 4c 5f 42 55 49 4c 8 || "$(TCL_BUIL
9d00: 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 0d 0a D_FOR)" == "8"..
9d10: 54 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 TKLIBNAME.= tk$(
9d20: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
9d30: 58 29 2e 24 28 45 58 54 29 0d 0a 54 4b 49 4d 50 X).$(EXT)..TKIMP
9d40: 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b LIBNAME.= tk$(TK
9d50: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 _VERSION)$(SUFX)
9d60: 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54 4b 4c .lib..!else..TKL
9d70: 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 6b 24 IBNAME.= tcl9tk$
9d80: 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 (TK_VERSION)$(SU
9d90: 46 58 29 2e 24 28 45 58 54 29 0d 0a 54 4b 49 4d FX).$(EXT)..TKIM
9da0: 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 PLIBNAME.= tcl9t
9db0: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9dc0: 53 55 46 58 29 2e 6c 69 62 0d 0a 21 65 6e 64 69 SUFX).lib..!endi
9dd0: 66 0d 0a 21 69 66 20 24 28 54 4b 5f 4d 41 4a 4f f..!if $(TK_MAJO
9de0: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0d R_VERSION) == 8.
9df0: 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d .TKSTUBLIBNAME.=
9e00: 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 53 tkstub$(TK_VERS
9e10: 49 4f 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d ION).lib..!else.
9e20: 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d .TKSTUBLIBNAME.=
9e30: 20 74 6b 73 74 75 62 2e 6c 69 62 0d 0a 21 65 6e tkstub.lib..!en
9e40: 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 dif....!if $(DOI
9e50: 4e 47 5f 54 4b 29 0d 0a 57 49 53 48 09 09 3d 20 NG_TK)..WISH..=
9e60: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 57 49 53 $(OUT_DIR)\$(WIS
9e70: 48 4e 41 4d 45 29 0d 0a 54 4b 53 54 55 42 4c 49 HNAME)..TKSTUBLI
9e80: 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 B.= $(OUT_DIR)\$
9e90: 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 0d (TKSTUBLIBNAME).
9ea0: 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 .TKIMPLIB.= $(OU
9eb0: 54 5f 44 49 52 29 5c 24 28 54 4b 49 4d 50 4c 49 T_DIR)\$(TKIMPLI
9ec0: 42 4e 41 4d 45 29 0d 0a 54 4b 4c 49 42 09 09 3d BNAME)..TKLIB..=
9ed0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b $(OUT_DIR)\$(TK
9ee0: 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 5f 49 4e 43 LIBNAME)..TK_INC
9ef0: 4c 55 44 45 53 20 20 20 20 20 3d 20 2d 49 22 24 LUDES = -I"$
9f00: 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 (WIN_DIR)" -I"$(
9f10: 47 45 4e 45 52 49 43 44 49 52 29 22 0d 0a 54 4b GENERICDIR)"..TK
9f20: 53 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 SCRIPTZIP =
9f30: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 5f $(OUT_DIR)\$(TK_
9f40: 5a 49 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 65 6c ZIP_FILE)....!el
9f50: 73 65 20 23 20 65 66 66 65 63 74 69 76 65 6c 79 se # effectively
9f60: 20 4e 45 45 44 5f 54 4b 0d 0a 0d 0a 21 69 66 20 NEED_TK....!if
9f70: 24 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 42 $(TKINSTALL) # B
9f80: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
9f90: 69 6e 73 74 61 6c 6c 65 64 20 54 6b 0d 0a 57 49 installed Tk..WI
9fa0: 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c SH..= $(_TKDIR)\
9fb0: 62 69 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0d bin\$(WISHNAME).
9fc0: 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f .TKSTUBLIB.= $(_
9fd0: 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 TKDIR)\lib\$(TKS
9fe0: 54 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 49 TUBLIBNAME)..TKI
9ff0: 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 MPLIB.= $(_TKDIR
a000: 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 42 )\lib\$(TKIMPLIB
a010: 4e 41 4d 45 29 0d 0a 23 20 57 68 65 6e 20 62 75 NAME)..# When bu
a020: 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e ilding extension
a030: 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e s, may be linkin
a040: 67 20 61 67 61 69 6e 73 74 20 54 6b 20 74 68 61 g against Tk tha
a050: 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a t does not add..
a060: 23 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e # "t" suffix (e.
a070: 67 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 g. 8.6). If lib
a080: 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 not found check
a090: 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 69 for that possibi
a0a0: 6c 69 74 79 2e 0d 0a 21 69 66 20 21 65 78 69 73 lity...!if !exis
a0b0: 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 t("$(TKIMPLIB)")
a0c0: 0d 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d ..TKIMPLIBNAME.=
a0d0: 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 tk$(TK_VERSION)
a0e0: 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a $(SUFX:t=).lib..
a0f0: 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b TKIMPLIB.= $(_TK
a100: 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 DIR)\lib\$(TKIMP
a110: 4c 49 42 4e 41 4d 45 29 0d 0a 21 65 6e 64 69 66 LIBNAME)..!endif
a120: 0d 0a 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 ..TK_INCLUDES
a130: 20 20 3d 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 = -I"$(_TKDIR)
a140: 5c 69 6e 63 6c 75 64 65 22 0d 0a 54 4b 53 43 52 \include"..TKSCR
a150: 49 50 54 5a 49 50 20 20 20 20 20 3d 20 24 28 5f IPTZIP = $(_
a160: 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 5f TKDIR)\lib\$(TK_
a170: 5a 49 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 65 6c ZIP_FILE)....!el
a180: 73 65 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 se # Building ag
a190: 61 69 6e 73 74 20 54 6b 20 73 6f 75 72 63 65 73 ainst Tk sources
a1a0: 0d 0a 0d 0a 57 49 53 48 09 09 3d 20 24 28 5f 54 ....WISH..= $(_T
a1b0: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
a1c0: 44 44 49 52 54 4f 50 29 5c 24 28 57 49 53 48 4e DDIRTOP)\$(WISHN
a1d0: 41 4d 45 29 0d 0a 54 4b 53 54 55 42 4c 49 42 09 AME)..TKSTUBLIB.
a1e0: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c = $(_TKDIR)\win\
a1f0: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 $(BUILDDIRTOP)\$
a200: 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 0d (TKSTUBLIBNAME).
a210: 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 .TKIMPLIB.= $(_T
a220: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
a230: 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 DDIRTOP)\$(TKIMP
a240: 4c 49 42 4e 41 4d 45 29 0d 0a 23 20 57 68 65 6e LIBNAME)..# When
a250: 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 building extens
a260: 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e ions, may be lin
a270: 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 king against Tk
a280: 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 that does not ad
a290: 64 0d 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 d..# "t" suffix
a2a0: 28 65 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 6c (e.g. 8.6). If l
a2b0: 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 ib not found che
a2c0: 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 ck for that poss
a2d0: 69 62 69 6c 69 74 79 2e 0d 0a 21 69 66 20 21 65 ibility...!if !e
a2e0: 78 69 73 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 xist("$(TKIMPLIB
a2f0: 29 22 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d )")..TKIMPLIBNAM
a300: 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 E.= tk$(TK_VERSI
a310: 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 ON)$(SUFX:t=).li
a320: 62 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 b..TKIMPLIB.= $(
a330: 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 _TKDIR)\win\$(BU
a340: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 ILDDIRTOP)\$(TKI
a350: 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 21 65 6e 64 MPLIBNAME)..!end
a360: 69 66 0d 0a 54 4b 5f 49 4e 43 4c 55 44 45 53 20 if..TK_INCLUDES
a370: 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 4b 44 49 = -I"$(_TKDI
a380: 52 29 5c 67 65 6e 65 72 69 63 22 20 2d 49 22 24 R)\generic" -I"$
a390: 28 5f 54 4b 44 49 52 29 5c 77 69 6e 22 20 2d 49 (_TKDIR)\win" -I
a3a0: 22 24 28 5f 54 4b 44 49 52 29 5c 78 6c 69 62 22 "$(_TKDIR)\xlib"
a3b0: 0d 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 ..TKSCRIPTZIP
a3c0: 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 = $(_TKDIR)\wi
a3d0: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
a3e0: 5c 24 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0d \$(TK_ZIP_FILE).
a3f0: 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 4b 49 4e ...!endif # TKIN
a400: 53 54 41 4c 4c 0d 0a 0d 0a 74 6b 6c 69 62 73 20 STALL....tklibs
a410: 3d 20 22 24 28 54 4b 53 54 55 42 4c 49 42 29 22 = "$(TKSTUBLIB)"
a420: 20 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 0d 0a "$(TKIMPLIB)"..
a430: 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49 ..!endif # $(DOI
a440: 4e 47 5f 54 4b 29 0d 0a 21 65 6e 64 69 66 20 23 NG_TK)..!endif #
a450: 20 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 $(DOING_TK) ||
a460: 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 0d 0a 23 20 $(NEED_TK)....#
a470: 56 61 72 69 6f 75 73 20 6f 75 74 70 75 74 20 70 Various output p
a480: 61 74 68 73 0d 0a 50 52 4a 49 4d 50 4c 49 42 09 aths..PRJIMPLIB.
a490: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 = $(OUT_DIR)\$(P
a4a0: 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e ROJECT)$(VERSION
a4b0: 29 24 28 53 55 46 58 29 2e 6c 69 62 0d 0a 23 20 )$(SUFX).lib..#
a4c0: 45 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 Even when buildi
a4d0: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 39 ng against Tcl 9
a4e0: 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 38 20 6d 75 , PRJLIBNAME8 mu
a4f0: 73 74 20 68 61 76 65 20 22 74 22 0d 0a 50 52 4a st have "t"..PRJ
a500: 4c 49 42 4e 41 4d 45 38 09 3d 20 24 28 50 52 4f LIBNAME8.= $(PRO
a510: 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 74 JECT)$(VERSION)t
a520: 24 28 53 55 46 58 3a 74 3d 29 2e 24 28 45 58 54 $(SUFX:t=).$(EXT
a530: 29 0d 0a 23 20 45 76 65 6e 20 77 68 65 6e 20 62 )..# Even when b
a540: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
a550: 54 63 6c 20 38 2c 20 50 52 4a 4c 49 42 4e 41 4d Tcl 8, PRJLIBNAM
a560: 45 39 20 6d 75 73 74 20 6e 6f 74 20 68 61 76 65 E9 must not have
a570: 20 22 74 22 0d 0a 50 52 4a 4c 49 42 4e 41 4d 45 "t"..PRJLIBNAME
a580: 39 09 3d 20 74 63 6c 39 24 28 50 52 4f 4a 45 43 9.= tcl9$(PROJEC
a590: 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 T)$(VERSION)$(SU
a5a0: 46 58 3a 74 3d 29 2e 24 28 45 58 54 29 0d 0a 21 FX:t=).$(EXT)..!
a5b0: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
a5c0: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 ERSION) == 8 ||
a5d0: 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 "$(TCL_BUILD_FOR
a5e0: 29 22 20 3d 3d 20 22 38 22 0d 0a 50 52 4a 4c 49 )" == "8"..PRJLI
a5f0: 42 4e 41 4d 45 09 3d 20 24 28 50 52 4a 4c 49 42 BNAME.= $(PRJLIB
a600: 4e 41 4d 45 38 29 0d 0a 21 65 6c 73 65 0d 0a 50 NAME8)..!else..P
a610: 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 RJLIBNAME.= $(PR
a620: 4a 4c 49 42 4e 41 4d 45 39 29 0d 0a 21 65 6e 64 JLIBNAME9)..!end
a630: 69 66 0d 0a 50 52 4a 4c 49 42 09 09 3d 20 24 28 if..PRJLIB..= $(
a640: 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4a 4c 49 OUT_DIR)\$(PRJLI
a650: 42 4e 41 4d 45 29 0d 0a 0d 0a 21 69 66 20 24 28 BNAME)....!if $(
a660: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
a670: 4e 29 20 3d 3d 20 38 0d 0a 50 52 4a 53 54 55 42 N) == 8..PRJSTUB
a680: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 LIBNAME.= $(STUB
a690: 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e PREFIX)$(VERSION
a6a0: 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 50 52 ).lib..!else..PR
a6b0: 4a 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 JSTUBLIBNAME.= $
a6c0: 28 53 54 55 42 50 52 45 46 49 58 29 2e 6c 69 62 (STUBPREFIX).lib
a6d0: 0d 0a 21 65 6e 64 69 66 0d 0a 50 52 4a 53 54 55 ..!endif..PRJSTU
a6e0: 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 BLIB.= $(OUT_DIR
a6f0: 29 5c 24 28 50 52 4a 53 54 55 42 4c 49 42 4e 41 )\$(PRJSTUBLIBNA
a700: 4d 45 29 0d 0a 0d 0a 23 20 49 66 20 65 78 74 65 ME)....# If exte
a710: 6e 73 69 6f 6e 20 70 61 72 65 6e 74 20 6d 61 6b nsion parent mak
a720: 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 efile has not de
a730: 66 69 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 fined a resource
a740: 20 64 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 definition file
a750: 2c 0d 0a 23 20 77 65 20 77 69 6c 6c 20 67 65 6e ,..# we will gen
a760: 65 72 61 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 erate one from s
a770: 74 61 6e 64 61 72 64 20 74 65 6d 70 6c 61 74 65 tandard template
a780: 2e 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f ...!if !$(DOING_
a790: 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 TCL) && !$(DOING
a7a0: 5f 54 4b 29 20 26 26 20 21 24 28 53 54 41 54 49 _TK) && !$(STATI
a7b0: 43 5f 42 55 49 4c 44 29 0d 0a 21 69 66 64 65 66 C_BUILD)..!ifdef
a7c0: 20 52 43 46 49 4c 45 0d 0a 52 45 53 46 49 4c 45 RCFILE..RESFILE
a7d0: 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 = $(TMP_DIR)\$(
a7e0: 52 43 46 49 4c 45 3a 2e 72 63 3d 2e 72 65 73 29 RCFILE:.rc=.res)
a7f0: 0d 0a 21 65 6c 73 65 0d 0a 52 45 53 46 49 4c 45 ..!else..RESFILE
a800: 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 = $(TMP_DIR)\$(
a810: 50 52 4f 4a 45 43 54 29 2e 72 65 73 0d 0a 21 65 PROJECT).res..!e
a820: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ndif..!endif....
a830: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a840: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a850: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a860: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a870: 23 23 23 0d 0a 23 20 31 31 2e 20 43 6f 6e 73 74 ###..# 11. Const
a880: 72 75 63 74 20 74 68 65 20 70 61 74 68 73 20 66 ruct the paths f
a890: 6f 72 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 or the installat
a8a0: 69 6f 6e 20 64 69 72 65 63 74 6f 72 69 65 73 0d ion directories.
a8b0: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 .# The following
a8c0: 20 6d 61 63 72 6f 73 20 67 65 74 20 64 65 66 69 macros get defi
a8d0: 6e 65 64 20 69 6e 20 74 68 69 73 20 73 65 63 74 ned in this sect
a8e0: 69 6f 6e 3a 0d 0a 23 20 4c 49 42 5f 49 4e 53 54 ion:..# LIB_INST
a8f0: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a900: 6c 69 62 72 61 72 69 65 73 20 73 68 6f 75 6c 64 libraries should
a910: 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 be installed..#
a920: 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 BIN_INSTALL_DIR
a930: 20 2d 20 77 68 65 72 65 20 74 68 65 20 65 78 65 - where the exe
a940: 63 75 74 61 62 6c 65 73 20 73 68 6f 75 6c 64 20 cutables should
a950: 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 be installed..#
a960: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 DOC_INSTALL_DIR
a970: 2d 20 77 68 65 72 65 20 64 6f 63 75 6d 65 6e 74 - where document
a980: 61 74 69 6f 6e 20 73 68 6f 75 6c 64 20 62 65 20 ation should be
a990: 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 53 43 52 installed..# SCR
a9a0: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 IPT_INSTALL_DIR
a9b0: 2d 20 77 68 65 72 65 20 73 63 72 69 70 74 73 20 - where scripts
a9c0: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a9d0: 6c 65 64 0d 0a 23 20 49 4e 43 4c 55 44 45 5f 49 led..# INCLUDE_I
a9e0: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
a9f0: 72 65 20 43 20 69 6e 63 6c 75 64 65 20 66 69 6c re C include fil
aa00: 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 es should be ins
aa10: 74 61 6c 6c 65 64 0d 0a 23 20 44 45 4d 4f 5f 49 talled..# DEMO_I
aa20: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
aa30: 72 65 20 64 65 6d 6f 73 20 73 68 6f 75 6c 64 20 re demos should
aa40: 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 be installed..#
aa50: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 PRJ_INSTALL_DIR
aa60: 2d 20 77 68 65 72 65 20 70 61 63 6b 61 67 65 20 - where package
aa70: 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65 will be installe
aa80: 64 20 28 6e 6f 74 20 73 65 74 20 66 6f 72 20 54 d (not set for T
aa90: 63 6c 20 61 6e 64 20 54 6b 29 0d 0a 0d 0a 21 69 cl and Tk)....!i
aaa0: 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 7c f $(DOING_TCL) |
aab0: 7c 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 4c | $(DOING_TK)..L
aac0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 IB_INSTALL_DIR..
aad0: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 = $(_INSTALLDIR)
aae0: 5c 6c 69 62 0d 0a 42 49 4e 5f 49 4e 53 54 41 4c \lib..BIN_INSTAL
aaf0: 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 L_DIR..= $(_INST
ab00: 41 4c 4c 44 49 52 29 5c 62 69 6e 0d 0a 44 4f 43 ALLDIR)\bin..DOC
ab10: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _INSTALL_DIR..=
ab20: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 64 $(_INSTALLDIR)\d
ab30: 6f 63 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f oc..!if $(DOING_
ab40: 54 43 4c 29 0d 0a 53 43 52 49 50 54 5f 49 4e 53 TCL)..SCRIPT_INS
ab50: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e TALL_DIR.= $(_IN
ab60: 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 STALLDIR)\lib\$(
ab70: 50 52 4f 4a 45 43 54 29 24 28 54 43 4c 5f 4d 41 PROJECT)$(TCL_MA
ab80: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 JOR_VERSION).$(T
ab90: 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e CL_MINOR_VERSION
aba0: 29 0d 0a 4d 4f 44 55 4c 45 5f 49 4e 53 54 41 4c )..MODULE_INSTAL
abb0: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 L_DIR.= $(_INSTA
abc0: 4c 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 LLDIR)\lib\tcl$(
abd0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
abe0: 4e 29 0d 0a 21 65 6c 73 65 20 23 20 44 4f 49 4e N)..!else # DOIN
abf0: 47 5f 54 4b 0d 0a 53 43 52 49 50 54 5f 49 4e 53 G_TK..SCRIPT_INS
ac00: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e TALL_DIR.= $(_IN
ac10: 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 STALLDIR)\lib\$(
ac20: 50 52 4f 4a 45 43 54 29 24 28 54 4b 5f 4d 41 4a PROJECT)$(TK_MAJ
ac30: 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 4b OR_VERSION).$(TK
ac40: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d _MINOR_VERSION).
ac50: 0a 21 65 6e 64 69 66 0d 0a 44 45 4d 4f 5f 49 4e .!endif..DEMO_IN
ac60: 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 53 43 STALL_DIR.= $(SC
ac70: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
ac80: 29 5c 64 65 6d 6f 73 0d 0a 49 4e 43 4c 55 44 45 )\demos..INCLUDE
ac90: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 _INSTALL_DIR.= $
aca0: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e (_INSTALLDIR)\in
acb0: 63 6c 75 64 65 0d 0a 0d 0a 21 65 6c 73 65 20 23 clude....!else #
acc0: 20 65 78 74 65 6e 73 69 6f 6e 20 6f 74 68 65 72 extension other
acd0: 20 74 68 61 6e 20 54 6b 0d 0a 0d 0a 50 52 4a 5f than Tk....PRJ_
ace0: 49 4e 53 54 41 4c 4c 5f 44 49 52 20 20 20 20 20 INSTALL_DIR
acf0: 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c = $(_INSTALL
ad00: 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 24 DIR)\$(PROJECT)$
ad10: 28 44 4f 54 56 45 52 53 49 4f 4e 29 0d 0a 21 69 (DOTVERSION)..!i
ad20: 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 f $(MULTIPLATFOR
ad30: 4d 5f 49 4e 53 54 41 4c 4c 29 0d 0a 4c 49 42 5f M_INSTALL)..LIB_
ad40: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 INSTALL_DIR..= $
ad50: 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (PRJ_INSTALL_DIR
ad60: 29 5c 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 )\$(PLATFORM_IDE
ad70: 4e 54 49 46 59 29 0d 0a 42 49 4e 5f 49 4e 53 54 NTIFY)..BIN_INST
ad80: 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a ALL_DIR..= $(PRJ
ad90: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 24 28 _INSTALL_DIR)\$(
ada0: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 PLATFORM_IDENTIF
adb0: 59 29 0d 0a 21 65 6c 73 65 0d 0a 4c 49 42 5f 49 Y)..!else..LIB_I
adc0: 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 NSTALL_DIR..= $(
add0: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 PRJ_INSTALL_DIR)
ade0: 0d 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 ..BIN_INSTALL_DI
adf0: 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 R..= $(PRJ_INSTA
ae00: 4c 4c 5f 44 49 52 29 0d 0a 21 65 6e 64 69 66 0d LL_DIR)..!endif.
ae10: 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 .DOC_INSTALL_DIR
ae20: 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c ..= $(PRJ_INSTAL
ae30: 4c 5f 44 49 52 29 0d 0a 53 43 52 49 50 54 5f 49 L_DIR)..SCRIPT_I
ae40: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 50 NSTALL_DIR.= $(P
ae50: 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0d RJ_INSTALL_DIR).
ae60: 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 .DEMO_INSTALL_DI
ae70: 52 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c R.= $(PRJ_INSTAL
ae80: 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 0d 0a 49 4e L_DIR)\demos..IN
ae90: 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 CLUDE_INSTALL_DI
aea0: 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 R.= $(_INSTALLDI
aeb0: 52 29 5c 2e 2e 5c 69 6e 63 6c 75 64 65 0d 0a 0d R)\..\include...
aec0: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 .!endif....#####
aed0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
aee0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
aef0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
af00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a ##############..
af10: 23 20 31 32 2e 20 53 65 74 20 75 70 20 61 63 74 # 12. Set up act
af20: 75 61 6c 20 6f 70 74 69 6f 6e 73 20 74 6f 20 62 ual options to b
af30: 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 e passed to the
af40: 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e compiler and lin
af50: 6b 65 72 0d 0a 23 20 4e 6f 77 20 77 65 20 68 61 ker..# Now we ha
af60: 76 65 20 61 6c 6c 20 74 68 65 20 69 6e 66 6f 72 ve all the infor
af70: 6d 61 74 69 6f 6e 20 77 65 20 6e 65 65 64 2c 20 mation we need,
af80: 73 65 74 20 75 70 20 74 68 65 20 61 63 74 75 61 set up the actua
af90: 6c 20 66 6c 61 67 73 20 61 6e 64 0d 0a 23 20 6f l flags and..# o
afa0: 70 74 69 6f 6e 73 20 74 68 61 74 20 77 65 20 77 ptions that we w
afb0: 69 6c 6c 20 70 61 73 73 20 74 6f 20 74 68 65 20 ill pass to the
afc0: 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e compiler and lin
afd0: 6b 65 72 2e 20 54 68 65 20 6d 61 69 6e 0d 0a 23 ker. The main..#
afe0: 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f 75 6c 64 makefile should
aff0: 20 75 73 65 20 74 68 65 73 65 20 69 6e 20 63 6f use these in co
b000: 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 68 20 77 mbination with w
b010: 68 61 74 65 76 65 72 20 6f 74 68 65 72 20 66 6c hatever other fl
b020: 61 67 73 0d 0a 23 20 61 6e 64 20 73 77 69 74 63 ags..# and switc
b030: 68 65 73 20 61 72 65 20 73 70 65 63 69 66 69 63 hes are specific
b040: 20 74 6f 20 69 74 2e 0d 0a 23 20 54 68 65 20 66 to it...# The f
b050: 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 ollowing macros
b060: 61 72 65 20 64 65 66 69 6e 65 64 2c 20 6e 61 6d are defined, nam
b070: 65 73 20 61 72 65 20 66 6f 72 20 68 69 73 74 6f es are for histo
b080: 72 69 63 61 6c 20 63 6f 6d 70 61 74 69 62 69 6c rical compatibil
b090: 69 74 79 3a 0d 0a 23 20 4f 50 54 44 45 46 49 4e ity:..# OPTDEFIN
b0a0: 45 53 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 63 ES - /Dxxx C mac
b0b0: 72 6f 20 66 6c 61 67 73 20 62 61 73 65 64 20 6f ro flags based o
b0c0: 6e 20 75 73 65 72 2d 73 70 65 63 69 66 69 65 64 n user-specified
b0d0: 20 4f 50 54 53 0d 0a 23 20 43 4f 4d 50 49 4c 45 OPTS..# COMPILE
b0e0: 52 46 4c 41 47 53 20 2d 20 2f 44 78 78 78 20 43 RFLAGS - /Dxxx C
b0f0: 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 69 6e 64 macro flags ind
b100: 65 70 65 6e 64 65 6e 74 20 6f 66 20 61 6e 79 20 ependent of any
b110: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 configuration op
b120: 74 69 6f 6e 73 0d 0a 23 20 63 72 74 20 2d 20 43 tions..# crt - C
b130: 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 20 74 ompiler switch t
b140: 68 61 74 20 73 65 6c 65 63 74 73 20 74 68 65 20 hat selects the
b150: 61 70 70 72 6f 70 72 69 61 74 65 20 43 20 72 75 appropriate C ru
b160: 6e 74 69 6d 65 0d 0a 23 20 63 64 65 62 75 67 20 ntime..# cdebug
b170: 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 - Compiler switc
b180: 68 65 73 20 72 65 6c 61 74 65 64 20 74 6f 20 64 hes related to d
b190: 65 62 75 67 20 41 4e 44 20 6f 70 74 69 6d 69 7a ebug AND optimiz
b1a0: 61 74 69 6f 6e 73 0d 0a 23 20 63 77 61 72 6e 20 ations..# cwarn
b1b0: 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 - Compiler switc
b1c0: 68 65 73 20 74 68 61 74 20 73 65 74 20 77 61 72 hes that set war
b1d0: 6e 69 6e 67 20 6c 65 76 65 6c 73 0d 0a 23 20 63 ning levels..# c
b1e0: 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 flags - complete
b1f0: 20 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 compiler switch
b200: 65 73 20 28 73 75 62 73 75 6d 65 73 20 63 64 65 es (subsumes cde
b210: 62 75 67 20 61 6e 64 20 63 77 61 72 6e 29 0d 0a bug and cwarn)..
b220: 23 20 6c 64 65 62 75 67 20 2d 20 4c 69 6e 6b 65 # ldebug - Linke
b230: 72 20 73 77 69 74 63 68 65 73 20 63 6f 6e 74 72 r switches contr
b240: 6f 6c 6c 69 6e 67 20 64 65 62 75 67 20 69 6e 66 olling debug inf
b250: 6f 72 6d 61 74 69 6f 6e 20 61 6e 64 20 6f 70 74 ormation and opt
b260: 69 6d 69 7a 61 74 69 6f 6e 0d 0a 23 20 6c 66 6c imization..# lfl
b270: 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c ags - complete l
b280: 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 28 inker switches (
b290: 73 75 62 73 75 6d 65 73 20 6c 64 65 62 75 67 29 subsumes ldebug)
b2a0: 20 65 78 63 65 70 74 20 73 75 62 73 79 73 74 65 except subsyste
b2b0: 6d 20 74 79 70 65 0d 0a 23 20 64 6c 6c 6c 66 6c m type..# dlllfl
b2c0: 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c ags - complete l
b2d0: 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 74 inker switches t
b2e0: 6f 20 62 75 69 6c 64 20 44 4c 4c 73 20 28 73 75 o build DLLs (su
b2f0: 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 0d 0a bsumes lflags)..
b300: 23 20 63 6f 6e 6c 66 6c 61 67 73 20 2d 20 63 6f # conlflags - co
b310: 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 mplete linker sw
b320: 69 74 63 68 65 73 20 66 6f 72 20 63 6f 6e 73 6f itches for conso
b330: 6c 65 20 70 72 6f 67 72 61 6d 20 28 73 75 62 73 le program (subs
b340: 75 6d 65 73 20 6c 66 6c 61 67 73 29 0d 0a 23 20 umes lflags)..#
b350: 67 75 69 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 guilflags - comp
b360: 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 lete linker swit
b370: 63 68 65 73 20 66 6f 72 20 47 55 49 20 70 72 6f ches for GUI pro
b380: 67 72 61 6d 20 28 73 75 62 73 75 6d 65 73 20 6c gram (subsumes l
b390: 66 6c 61 67 73 29 0d 0a 23 20 62 61 73 65 6c 69 flags)..# baseli
b3a0: 62 73 20 2d 20 6d 69 6e 69 6d 75 6d 20 57 69 6e bs - minimum Win
b3b0: 64 6f 77 73 20 6c 69 62 72 61 72 69 65 73 20 72 dows libraries r
b3c0: 65 71 75 69 72 65 64 2e 20 50 61 72 65 6e 74 20 equired. Parent
b3d0: 6d 61 6b 65 66 69 6c 65 20 63 61 6e 0d 0a 23 20 makefile can..#
b3e0: 20 20 20 64 65 66 69 6e 65 20 50 52 4a 5f 4c 49 define PRJ_LI
b3f0: 42 53 20 62 65 66 6f 72 65 20 69 6e 63 6c 75 64 BS before includ
b400: 69 6e 67 20 72 75 6c 65 73 2e 72 63 20 69 66 20 ing rules.rc if
b410: 61 64 64 69 74 69 6f 6e 61 6c 20 6c 69 62 73 20 additional libs
b420: 61 72 65 20 6e 65 65 64 65 64 0d 0a 0d 0a 4f 50 are needed....OP
b430: 54 44 45 46 49 4e 45 53 09 3d 20 2f 44 53 54 44 TDEFINES.= /DSTD
b440: 43 5f 48 45 41 44 45 52 53 20 2f 44 55 53 45 5f C_HEADERS /DUSE_
b450: 4e 4d 41 4b 45 3d 31 0d 0a 21 69 66 20 24 28 56 NMAKE=1..!if $(V
b460: 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 36 30 30 CVERSION) > 1600
b470: 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ..OPTDEFINES.= $
b480: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 48 (OPTDEFINES) /DH
b490: 41 56 45 5f 53 54 44 49 4e 54 5f 48 3d 31 0d 0a AVE_STDINT_H=1..
b4a0: 21 65 6c 73 65 0d 0a 4f 50 54 44 45 46 49 4e 45 !else..OPTDEFINE
b4b0: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b4c0: 29 20 2f 44 4d 50 5f 4e 4f 5f 53 54 44 49 4e 54 ) /DMP_NO_STDINT
b4d0: 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 =1..!endif..!if
b4e0: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 $(VCVERSION) >=
b4f0: 31 38 30 30 0d 0a 4f 50 54 44 45 46 49 4e 45 53 1800..OPTDEFINES
b500: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b510: 20 2f 44 48 41 56 45 5f 49 4e 54 54 59 50 45 53 /DHAVE_INTTYPES
b520: 5f 48 3d 31 20 2f 44 48 41 56 45 5f 53 54 44 42 _H=1 /DHAVE_STDB
b530: 4f 4f 4c 5f 48 3d 31 0d 0a 21 65 6e 64 69 66 0d OOL_H=1..!endif.
b540: 0a 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 45 4d ...!if $(TCL_MEM
b550: 5f 44 45 42 55 47 29 0d 0a 4f 50 54 44 45 46 49 _DEBUG)..OPTDEFI
b560: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b570: 45 53 29 20 2f 44 54 43 4c 5f 4d 45 4d 5f 44 45 ES) /DTCL_MEM_DE
b580: 42 55 47 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 BUG..!endif..!if
b590: 20 24 28 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 $(TCL_COMPILE_D
b5a0: 45 42 55 47 29 0d 0a 4f 50 54 44 45 46 49 4e 45 EBUG)..OPTDEFINE
b5b0: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b5c0: 29 20 2f 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f ) /DTCL_COMPILE_
b5d0: 44 45 42 55 47 20 2f 44 54 43 4c 5f 43 4f 4d 50 DEBUG /DTCL_COMP
b5e0: 49 4c 45 5f 53 54 41 54 53 0d 0a 21 65 6e 64 69 ILE_STATS..!endi
b5f0: 66 0d 0a 21 69 66 20 24 28 54 43 4c 5f 54 48 52 f..!if $(TCL_THR
b600: 45 41 44 53 29 20 26 26 20 24 28 54 43 4c 5f 56 EADS) && $(TCL_V
b610: 45 52 53 49 4f 4e 29 20 3c 20 38 37 0d 0a 4f 50 ERSION) < 87..OP
b620: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
b630: 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 54 DEFINES) /DTCL_T
b640: 48 52 45 41 44 53 3d 31 0d 0a 21 69 66 20 24 28 HREADS=1..!if $(
b650: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
b660: 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 49 ) && $(TCL_VERSI
b670: 4f 4e 29 20 3c 20 38 37 0d 0a 4f 50 54 44 45 46 ON) < 87..OPTDEF
b680: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b690: 4e 45 53 29 20 2f 44 55 53 45 5f 54 48 52 45 41 NES) /DUSE_THREA
b6a0: 44 5f 41 4c 4c 4f 43 3d 31 0d 0a 21 65 6e 64 69 D_ALLOC=1..!endi
b6b0: 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 f..!endif..!if $
b6c0: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0d 0a (STATIC_BUILD)..
b6d0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b6e0: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 53 54 41 PTDEFINES) /DSTA
b6f0: 54 49 43 5f 42 55 49 4c 44 0d 0a 21 65 6c 73 65 TIC_BUILD..!else
b700: 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e if $(TCL_VERSION
b710: 29 20 3e 20 38 36 0d 0a 4f 50 54 44 45 46 49 4e ) > 86..OPTDEFIN
b720: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b730: 53 29 20 2f 44 54 43 4c 5f 57 49 54 48 5f 45 58 S) /DTCL_WITH_EX
b740: 54 45 52 4e 41 4c 5f 54 4f 4d 4d 41 54 48 0d 0a TERNAL_TOMMATH..
b750: 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 !if "$(MACHINE)"
b760: 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 == "AMD64" || "
b770: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
b780: 41 52 4d 36 34 22 0d 0a 4f 50 54 44 45 46 49 4e ARM64"..OPTDEFIN
b790: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b7a0: 53 29 20 2f 44 4d 50 5f 36 34 42 49 54 0d 0a 21 S) /DMP_64BIT..!
b7b0: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 endif..!endif..!
b7c0: 69 66 20 24 28 54 43 4c 5f 4e 4f 5f 44 45 50 52 if $(TCL_NO_DEPR
b7d0: 45 43 41 54 45 44 29 0d 0a 4f 50 54 44 45 46 49 ECATED)..OPTDEFI
b7e0: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b7f0: 45 53 29 20 2f 44 54 43 4c 5f 4e 4f 5f 44 45 50 ES) /DTCL_NO_DEP
b800: 52 45 43 41 54 45 44 0d 0a 21 65 6e 64 69 66 0d RECATED..!endif.
b810: 0a 0d 0a 21 69 66 20 24 28 55 53 45 5f 53 54 55 ...!if $(USE_STU
b820: 42 53 29 0d 0a 23 20 4e 6f 74 65 20 77 65 20 64 BS)..# Note we d
b830: 6f 20 6e 6f 74 20 64 65 66 69 6e 65 20 55 53 45 o not define USE
b840: 5f 54 43 4c 5f 53 54 55 42 53 20 65 76 65 6e 20 _TCL_STUBS even
b850: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 74 6b when building tk
b860: 20 73 69 6e 63 65 20 73 6f 6d 65 0d 0a 23 20 74 since some..# t
b870: 65 73 74 20 74 61 72 67 65 74 73 20 69 6e 20 74 est targets in t
b880: 6b 20 64 6f 20 6e 6f 74 20 75 73 65 20 73 74 75 k do not use stu
b890: 62 73 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 bs..!if !$(DOING
b8a0: 5f 54 43 4c 29 0d 0a 55 53 45 5f 53 54 55 42 53 _TCL)..USE_STUBS
b8b0: 5f 44 45 46 53 20 20 3d 20 2f 44 55 53 45 5f 54 _DEFS = /DUSE_T
b8c0: 43 4c 5f 53 54 55 42 53 20 2f 44 55 53 45 5f 54 CL_STUBS /DUSE_T
b8d0: 43 4c 4f 4f 5f 53 54 55 42 53 0d 0a 21 69 66 20 CLOO_STUBS..!if
b8e0: 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 55 53 45 5f $(NEED_TK)..USE_
b8f0: 53 54 55 42 53 5f 44 45 46 53 20 20 3d 20 24 28 STUBS_DEFS = $(
b900: 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 29 20 USE_STUBS_DEFS)
b910: 2f 44 55 53 45 5f 54 4b 5f 53 54 55 42 53 0d 0a /DUSE_TK_STUBS..
b920: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
b930: 21 65 6e 64 69 66 20 23 20 55 53 45 5f 53 54 55 !endif # USE_STU
b940: 42 53 0d 0a 0d 0a 21 69 66 20 21 24 28 44 45 42 BS....!if !$(DEB
b950: 55 47 29 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 UG)..OPTDEFINES.
b960: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b970: 2f 44 4e 44 45 42 55 47 0d 0a 21 69 66 20 24 28 /DNDEBUG..!if $(
b980: 4f 50 54 49 4d 49 5a 49 4e 47 29 0d 0a 4f 50 54 OPTIMIZING)..OPT
b990: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b9a0: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 EFINES) /DTCL_CF
b9b0: 47 5f 4f 50 54 49 4d 49 5a 45 44 0d 0a 21 65 6e G_OPTIMIZED..!en
b9c0: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 dif..!endif..!if
b9d0: 20 24 28 50 52 4f 46 49 4c 45 29 0d 0a 4f 50 54 $(PROFILE)..OPT
b9e0: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b9f0: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 EFINES) /DTCL_CF
ba00: 47 5f 50 52 4f 46 49 4c 45 44 0d 0a 21 65 6e 64 G_PROFILED..!end
ba10: 69 66 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 if..!if "$(MACHI
ba20: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 NE)" == "AMD64"
ba30: 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 || "$(MACHINE)"
ba40: 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 4f 50 54 44 == "ARM64"..OPTD
ba50: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
ba60: 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 FINES) /DTCL_CFG
ba70: 5f 44 4f 36 34 42 49 54 0d 0a 21 65 6e 64 69 66 _DO64BIT..!endif
ba80: 0d 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f ..!if $(VCVERSIO
ba90: 4e 29 20 3c 20 31 33 30 30 0d 0a 4f 50 54 44 45 N) < 1300..OPTDE
baa0: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
bab0: 49 4e 45 53 29 20 2f 44 4e 4f 5f 53 54 52 54 4f INES) /DNO_STRTO
bac0: 49 36 34 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d I64=1..!endif...
bad0: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
bae0: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a _VERSION) == 8..
baf0: 21 69 66 20 22 24 28 5f 55 53 45 5f 36 34 42 49 !if "$(_USE_64BI
bb00: 54 5f 54 49 4d 45 5f 54 29 22 20 3d 3d 20 22 31 T_TIME_T)" == "1
bb10: 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 "..OPTDEFINES.=
bb20: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
bb30: 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f _USE_64BIT_TIME_
bb40: 54 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e T=1..!endif..!en
bb50: 64 69 66 0d 0a 21 69 66 20 22 24 28 54 43 4c 5f dif..!if "$(TCL_
bb60: 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 BUILD_FOR)" == "
bb70: 38 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 8"..OPTDEFINES.=
bb80: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
bb90: 44 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 DTCL_MAJOR_VERSI
bba0: 4f 4e 3d 38 20 2f 44 54 4b 5f 4d 41 4a 4f 52 5f ON=8 /DTK_MAJOR_
bbb0: 56 45 52 53 49 4f 4e 3d 38 0d 0a 21 65 6e 64 69 VERSION=8..!endi
bbc0: 66 0d 0a 0d 0a 23 20 4c 69 6b 65 20 74 68 65 20 f....# Like the
bbd0: 54 45 41 20 73 79 73 74 65 6d 20 6f 6e 6c 79 20 TEA system only
bbe0: 73 65 74 20 74 68 69 73 20 6e 6f 6e 20 65 6d 70 set this non emp
bbf0: 74 79 20 66 6f 72 20 6e 6f 6e 2d 54 6b 20 65 78 ty for non-Tk ex
bc00: 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 4e 6f 74 65 tensions..# Note
bc10: 3a 20 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e : some extension
bc20: 73 20 75 73 65 20 50 41 43 4b 41 47 45 5f 4e 41 s use PACKAGE_NA
bc30: 4d 45 20 61 6e 64 20 6f 74 68 65 72 73 20 75 73 ME and others us
bc40: 65 20 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d e PACKAGE_TCLNAM
bc50: 45 0d 0a 23 20 73 6f 20 77 65 20 70 61 73 73 20 E..# so we pass
bc60: 62 6f 74 68 0d 0a 21 69 66 20 21 24 28 44 4f 49 both..!if !$(DOI
bc70: 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 28 44 4f NG_TCL) && !$(DO
bc80: 49 4e 47 5f 54 4b 29 0d 0a 50 4b 47 4e 41 4d 45 ING_TK)..PKGNAME
bc90: 46 4c 41 47 53 20 3d 20 2f 44 50 41 43 4b 41 47 FLAGS = /DPACKAG
bca0: 45 5f 4e 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f E_NAME="\"$(PRJ_
bcb0: 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 PACKAGE_TCLNAME)
bcc0: 5c 22 22 20 5c 0d 0a 09 2f 44 50 41 43 4b 41 47 \"" \.../DPACKAG
bcd0: 45 5f 54 43 4c 4e 41 4d 45 3d 22 5c 22 24 28 50 E_TCLNAME="\"$(P
bce0: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
bcf0: 4d 45 29 5c 22 22 20 5c 0d 0a 09 2f 44 50 41 43 ME)\"" \.../DPAC
bd00: 4b 41 47 45 5f 56 45 52 53 49 4f 4e 3d 22 5c 22 KAGE_VERSION="\"
bd10: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 22 $(DOTVERSION)\""
bd20: 20 5c 0d 0a 09 2f 44 4d 4f 44 55 4c 45 5f 53 43 \.../DMODULE_SC
bd30: 4f 50 45 3d 65 78 74 65 72 6e 0d 0a 21 65 6e 64 OPE=extern..!end
bd40: 69 66 0d 0a 0d 0a 23 20 63 72 74 20 70 69 63 6b if....# crt pick
bd50: 73 20 74 68 65 20 43 20 72 75 6e 20 74 69 6d 65 s the C run time
bd60: 20 62 61 73 65 64 20 6f 6e 20 73 65 6c 65 63 74 based on select
bd70: 65 64 20 4f 50 54 53 0d 0a 21 69 66 20 24 28 4d ed OPTS..!if $(M
bd80: 53 56 43 52 54 29 0d 0a 21 69 66 20 24 28 44 45 SVCRT)..!if $(DE
bd90: 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 BUG) && !$(UNCHE
bda0: 43 4b 45 44 29 0d 0a 63 72 74 20 3d 20 2d 4d 44 CKED)..crt = -MD
bdb0: 64 0d 0a 21 65 6c 73 65 0d 0a 63 72 74 20 3d 20 d..!else..crt =
bdc0: 2d 4d 44 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c -MD..!endif..!el
bdd0: 73 65 0d 0a 21 69 66 20 24 28 44 45 42 55 47 29 se..!if $(DEBUG)
bde0: 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 && !$(UNCHECKED
bdf0: 29 0d 0a 63 72 74 20 3d 20 2d 4d 54 64 0d 0a 21 )..crt = -MTd..!
be00: 65 6c 73 65 0d 0a 63 72 74 20 3d 20 2d 4d 54 0d else..crt = -MT.
be10: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d .!endif..!endif.
be20: 0a 0d 0a 23 20 63 64 65 62 75 67 20 69 6e 63 6c ...# cdebug incl
be30: 75 64 65 73 20 63 6f 6d 70 69 6c 65 72 20 6f 70 udes compiler op
be40: 74 69 6f 6e 73 20 66 6f 72 20 64 65 62 75 67 67 tions for debugg
be50: 69 6e 67 20 61 73 20 77 65 6c 6c 20 61 73 20 6f ing as well as o
be60: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0d 0a 21 69 ptimization...!i
be70: 66 20 24 28 44 45 42 55 47 29 0d 0a 0d 0a 23 20 f $(DEBUG)....#
be80: 49 6e 20 64 65 62 75 67 67 69 6e 67 20 6d 6f 64 In debugging mod
be90: 65 2c 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 e, optimizations
bea0: 20 6e 65 65 64 20 74 6f 20 62 65 20 64 69 73 61 need to be disa
beb0: 62 6c 65 64 0d 0a 63 64 65 62 75 67 20 3d 20 2d bled..cdebug = -
bec0: 5a 69 20 2d 4f 64 20 24 28 44 45 42 55 47 46 4c Zi -Od $(DEBUGFL
bed0: 41 47 53 29 0d 0a 0d 0a 21 65 6c 73 65 0d 0a 0d AGS)....!else...
bee0: 0a 63 64 65 62 75 67 20 3d 20 24 28 4f 50 54 49 .cdebug = $(OPTI
bef0: 4d 49 5a 41 54 49 4f 4e 53 29 0d 0a 21 69 66 20 MIZATIONS)..!if
bf00: 24 28 53 59 4d 42 4f 4c 53 29 0d 0a 63 64 65 62 $(SYMBOLS)..cdeb
bf10: 75 67 20 3d 20 24 28 63 64 65 62 75 67 29 20 2d ug = $(cdebug) -
bf20: 5a 69 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 Zi..!endif....!e
bf30: 6e 64 69 66 20 23 20 24 28 44 45 42 55 47 29 0d ndif # $(DEBUG).
bf40: 0a 0d 0a 23 20 63 77 61 72 6e 20 69 6e 63 6c 75 ...# cwarn inclu
bf50: 64 65 73 20 64 65 66 61 75 6c 74 20 77 61 72 6e des default warn
bf60: 69 6e 67 20 6c 65 76 65 6c 73 2c 20 61 6c 73 6f ing levels, also
bf70: 20 43 34 30 39 30 20 28 62 75 67 67 79 29 20 61 C4090 (buggy) a
bf80: 6e 64 20 43 34 31 34 36 20 69 73 20 75 73 65 6c nd C4146 is usel
bf90: 65 73 73 2e 0d 0a 63 77 61 72 6e 20 3d 20 24 28 ess...cwarn = $(
bfa0: 57 41 52 4e 49 4e 47 53 29 20 2d 77 64 34 30 39 WARNINGS) -wd409
bfb0: 30 20 2d 77 64 34 31 34 36 0d 0a 0d 0a 21 69 66 0 -wd4146....!if
bfc0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
bfd0: 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 4d "AMD64" || "$(M
bfe0: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d ACHINE)" == "ARM
bff0: 36 34 22 0d 0a 23 20 44 69 73 61 62 6c 65 20 70 64"..# Disable p
c000: 6f 69 6e 74 65 72 3c 2d 3e 69 6e 74 20 77 61 72 ointer<->int war
c010: 6e 69 6e 67 73 20 72 65 6c 61 74 65 64 20 74 6f nings related to
c020: 20 63 61 73 74 20 62 65 74 77 65 65 6e 20 64 69 cast between di
c030: 66 66 65 72 65 6e 74 20 73 69 7a 65 73 0d 0a 23 fferent sizes..#
c040: 20 54 68 65 72 65 20 61 72 65 20 61 20 67 61 64 There are a gad
c050: 7a 69 6c 6c 69 6f 6e 20 6f 66 20 74 68 65 73 65 zillion of these
c060: 20 64 75 65 20 74 6f 20 75 73 65 20 6f 66 20 43 due to use of C
c070: 6c 69 65 6e 74 44 61 74 61 20 61 6e 64 0d 0a 23 lientData and..#
c080: 20 63 6c 75 74 74 65 72 20 75 70 20 63 6f 6d 70 clutter up comp
c090: 69 6c 65 72 0d 0a 23 20 6f 75 74 70 75 74 20 69 iler..# output i
c0a0: 6e 63 72 65 61 73 69 6e 67 20 63 68 61 6e 63 65 ncreasing chance
c0b0: 20 6f 66 20 61 20 72 65 61 6c 20 77 61 72 6e 69 of a real warni
c0c0: 6e 67 20 67 65 74 74 69 6e 67 20 6c 6f 73 74 2e ng getting lost.
c0d0: 20 53 6f 20 64 69 73 61 62 6c 65 20 74 68 65 6d So disable them
c0e0: 2e 0d 0a 23 20 45 76 65 6e 74 75 61 6c 6c 79 20 ...# Eventually
c0f0: 73 6f 6d 65 20 64 61 79 2c 20 54 63 6c 20 77 69 some day, Tcl wi
c100: 6c 6c 20 62 65 20 36 34 2d 62 69 74 20 63 6c 65 ll be 64-bit cle
c110: 61 6e 2e 0d 0a 63 77 61 72 6e 20 3d 20 24 28 63 an...cwarn = $(c
c120: 77 61 72 6e 29 20 2d 77 64 34 33 31 31 20 2d 77 warn) -wd4311 -w
c130: 64 34 33 31 32 0d 0a 21 65 6e 64 69 66 0d 0a 0d d4312..!endif...
c140: 0a 23 23 23 20 43 6f 6d 6d 6f 6e 20 63 6f 6d 70 .### Common comp
c150: 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 74 68 61 iler options tha
c160: 74 20 61 72 65 20 61 72 63 68 69 74 65 63 74 75 t are architectu
c170: 72 65 20 73 70 65 63 69 66 69 63 0d 0a 21 69 66 re specific..!if
c180: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
c190: 20 22 41 52 4d 22 0d 0a 63 61 72 63 68 20 3d 20 "ARM"..carch =
c1a0: 2f 44 5f 41 52 4d 5f 57 49 4e 41 50 49 5f 50 41 /D_ARM_WINAPI_PA
c1b0: 52 54 49 54 49 4f 4e 5f 44 45 53 4b 54 4f 50 5f RTITION_DESKTOP_
c1c0: 53 44 4b 5f 41 56 41 49 4c 41 42 4c 45 0d 0a 21 SDK_AVAILABLE..!
c1d0: 65 6c 73 65 0d 0a 63 61 72 63 68 20 3d 0d 0a 21 else..carch =..!
c1e0: 65 6e 64 69 66 0d 0a 0d 0a 23 20 63 70 75 69 64 endif....# cpuid
c1f0: 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 is only availab
c200: 6c 65 20 6f 6e 20 69 6e 74 65 6c 20 6d 61 63 68 le on intel mach
c210: 69 6e 65 73 0d 0a 21 69 66 20 22 24 28 4d 41 43 ines..!if "$(MAC
c220: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 HINE)" == "IX86"
c230: 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 || "$(MACHINE)"
c240: 20 3d 3d 20 22 41 4d 44 36 34 22 0d 0a 63 61 72 == "AMD64"..car
c250: 63 68 20 3d 20 24 28 63 61 72 63 68 29 20 2f 44 ch = $(carch) /D
c260: 48 41 56 45 5f 43 50 55 49 44 3d 31 0d 0a 21 65 HAVE_CPUID=1..!e
c270: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 44 45 ndif....!if $(DE
c280: 42 55 47 29 0d 0a 23 20 54 75 72 6e 20 77 61 72 BUG)..# Turn war
c290: 6e 69 6e 67 73 20 69 6e 74 6f 20 65 72 72 6f 72 nings into error
c2a0: 73 0d 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 61 s..cwarn = $(cwa
c2b0: 72 6e 29 20 2d 57 58 0d 0a 21 65 6e 64 69 66 0d rn) -WX..!endif.
c2c0: 0a 0d 0a 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 ...INCLUDES = $(
c2d0: 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 24 28 TCL_INCLUDES) $(
c2e0: 54 4b 5f 49 4e 43 4c 55 44 45 53 29 20 24 28 50 TK_INCLUDES) $(P
c2f0: 52 4a 5f 49 4e 43 4c 55 44 45 53 29 0d 0a 21 69 RJ_INCLUDES)..!i
c300: 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 f !$(DOING_TCL)
c310: 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 0d && !$(DOING_TK).
c320: 0a 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 49 4e .INCLUDES = $(IN
c330: 43 4c 55 44 45 53 29 20 2d 49 22 24 28 47 45 4e CLUDES) -I"$(GEN
c340: 45 52 49 43 44 49 52 29 22 20 2d 49 22 24 28 57 ERICDIR)" -I"$(W
c350: 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 43 4f IN_DIR)" -I"$(CO
c360: 4d 50 41 54 44 49 52 29 22 0d 0a 21 65 6e 64 69 MPATDIR)"..!endi
c370: 66 0d 0a 0d 0a 23 20 54 68 65 73 65 20 66 6c 61 f....# These fla
c380: 67 73 20 61 72 65 20 64 65 66 69 6e 65 64 20 72 gs are defined r
c390: 6f 75 67 68 6c 79 20 69 6e 20 74 68 65 20 6f 72 oughly in the or
c3a0: 64 65 72 20 6f 66 20 74 68 65 20 70 72 65 2d 72 der of the pre-r
c3b0: 65 66 6f 72 6d 0d 0a 23 20 72 75 6c 65 73 2e 76 eform..# rules.v
c3c0: 63 2f 6d 61 6b 65 66 69 6c 65 2e 76 63 20 74 6f c/makefile.vc to
c3d0: 20 68 65 6c 70 20 76 69 73 75 61 6c 6c 79 20 63 help visually c
c3e0: 6f 6d 70 61 72 65 20 74 68 61 74 20 74 68 65 20 ompare that the
c3f0: 70 72 65 2d 20 61 6e 64 0d 0a 23 20 70 6f 73 74 pre- and..# post
c400: 2d 72 65 66 6f 72 6d 20 62 75 69 6c 64 20 6c 6f -reform build lo
c410: 67 73 0d 0a 0d 0a 23 20 63 66 6c 61 67 73 20 63 gs....# cflags c
c420: 6f 6e 74 61 69 6e 73 20 67 65 6e 65 72 69 63 20 ontains generic
c430: 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 20 62 flags used for b
c440: 75 69 6c 64 69 6e 67 20 70 72 61 63 74 69 63 61 uilding practica
c450: 6c 6c 79 20 61 6c 6c 20 6f 62 6a 65 63 74 20 66 lly all object f
c460: 69 6c 65 73 0d 0a 63 66 6c 61 67 73 20 3d 20 2d iles..cflags = -
c470: 6e 6f 6c 6f 67 6f 20 2d 63 20 24 28 43 4f 4d 50 nologo -c $(COMP
c480: 49 4c 45 52 46 4c 41 47 53 29 20 24 28 63 61 72 ILERFLAGS) $(car
c490: 63 68 29 20 24 28 63 77 61 72 6e 29 20 2d 46 70 ch) $(cwarn) -Fp
c4a0: 24 28 54 4d 50 5f 44 49 52 29 5e 5c 20 24 28 63 $(TMP_DIR)^\ $(c
c4b0: 64 65 62 75 67 29 0d 0a 0d 0a 21 69 66 20 24 28 debug)....!if $(
c4c0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
c4d0: 4e 29 20 3d 3d 20 38 20 26 26 20 24 28 54 43 4c N) == 8 && $(TCL
c4e0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MINOR_VERSION)
c4f0: 3c 20 37 0d 0a 63 66 6c 61 67 73 20 3d 20 24 28 < 7..cflags = $(
c500: 63 66 6c 61 67 73 29 20 2d 44 54 63 6c 5f 53 69 cflags) -DTcl_Si
c510: 7a 65 3d 69 6e 74 0d 0a 21 65 6e 64 69 66 0d 0a ze=int..!endif..
c520: 0d 0a 23 20 61 70 70 63 66 6c 61 67 73 20 63 6f ..# appcflags co
c530: 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 29 ntains $(cflags)
c540: 20 61 6e 64 20 66 6c 61 67 73 20 66 6f 72 20 62 and flags for b
c550: 75 69 6c 64 69 6e 67 20 74 68 65 20 61 70 70 6c uilding the appl
c560: 69 63 61 74 69 6f 6e 0d 0a 23 20 6f 62 6a 65 63 ication..# objec
c570: 74 20 66 69 6c 65 73 20 28 65 2e 67 2e 20 74 63 t files (e.g. tc
c580: 6c 73 68 2c 20 6f 72 20 77 69 73 68 29 20 70 6b lsh, or wish) pk
c590: 67 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 gcflags contains
c5a0: 20 24 28 63 66 6c 61 67 73 29 20 70 6c 75 73 0d $(cflags) plus.
c5b0: 0a 23 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f .# flags used fo
c5c0: 72 20 62 75 69 6c 64 69 6e 67 20 73 68 61 72 65 r building share
c5d0: 64 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 54 d object files T
c5e0: 68 65 20 74 77 6f 20 64 69 66 66 65 72 20 69 6e he two differ in
c5f0: 20 74 68 65 0d 0a 23 20 42 55 49 4c 44 5f 24 28 the..# BUILD_$(
c600: 50 52 4f 4a 45 43 54 29 20 6d 61 63 72 6f 20 77 PROJECT) macro w
c610: 68 69 63 68 20 73 68 6f 75 6c 64 20 62 65 20 64 hich should be d
c620: 65 66 69 6e 65 64 20 6f 6e 6c 79 20 66 6f 72 20 efined only for
c630: 74 68 65 20 73 68 61 72 65 64 0d 0a 23 20 6c 69 the shared..# li
c640: 62 72 61 72 79 20 2a 69 6d 70 6c 65 6d 65 6e 74 brary *implement
c650: 61 74 69 6f 6e 2a 20 61 6e 64 20 6e 6f 74 20 66 ation* and not f
c660: 6f 72 20 69 74 73 20 63 61 6c 6c 65 72 20 69 6e or its caller in
c670: 74 65 72 66 61 63 65 0d 0a 0d 0a 61 70 70 63 66 terface....appcf
c680: 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 24 lags_nostubs = $
c690: 28 63 66 6c 61 67 73 29 20 24 28 63 72 74 29 20 (cflags) $(crt)
c6a0: 24 28 49 4e 43 4c 55 44 45 53 29 20 24 28 54 43 $(INCLUDES) $(TC
c6b0: 4c 5f 44 45 46 49 4e 45 53 29 20 24 28 50 52 4a L_DEFINES) $(PRJ
c6c0: 5f 44 45 46 49 4e 45 53 29 20 24 28 4f 50 54 44 _DEFINES) $(OPTD
c6d0: 45 46 49 4e 45 53 29 0d 0a 61 70 70 63 66 6c 61 EFINES)..appcfla
c6e0: 67 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 73 gs = $(appcflags
c6f0: 5f 6e 6f 73 74 75 62 73 29 20 24 28 55 53 45 5f _nostubs) $(USE_
c700: 53 54 55 42 53 5f 44 45 46 53 29 0d 0a 70 6b 67 STUBS_DEFS)..pkg
c710: 63 66 6c 61 67 73 20 3d 20 24 28 61 70 70 63 66 cflags = $(appcf
c720: 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 lags) $(PKGNAMEF
c730: 4c 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 LAGS) /DBUILD_$(
c740: 50 52 4f 4a 45 43 54 29 0d 0a 70 6b 67 63 66 6c PROJECT)..pkgcfl
c750: 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 24 28 ags_nostubs = $(
c760: 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 appcflags_nostub
c770: 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 s) $(PKGNAMEFLAG
c780: 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 52 4f S) /DBUILD_$(PRO
c790: 4a 45 43 54 29 0d 0a 0d 0a 23 20 73 74 75 62 73 JECT)....# stubs
c7a0: 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 cflags contains
c7b0: 24 28 63 66 6c 61 67 73 29 20 70 6c 75 73 20 66 $(cflags) plus f
c7c0: 6c 61 67 73 20 75 73 65 64 20 66 6f 72 20 62 75 lags used for bu
c7d0: 69 6c 64 69 6e 67 20 61 20 73 74 75 62 73 0d 0a ilding a stubs..
c7e0: 23 20 6c 69 62 72 61 72 79 20 66 6f 72 20 74 68 # library for th
c7f0: 65 20 70 61 63 6b 61 67 65 2e 20 20 4e 6f 74 65 e package. Note
c800: 3a 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c 44 : /DSTATIC_BUILD
c810: 20 69 73 20 64 65 66 69 6e 65 64 20 69 6e 0d 0a is defined in..
c820: 23 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 # $(OPTDEFINES)
c830: 6f 6e 6c 79 20 69 66 20 74 68 65 20 4f 50 54 53 only if the OPTS
c840: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 configuration i
c850: 6e 64 69 63 61 74 65 73 20 61 20 73 74 61 74 69 ndicates a stati
c860: 63 0d 0a 23 20 6c 69 62 72 61 72 79 2e 20 48 6f c..# library. Ho
c870: 77 65 76 65 72 20 74 68 65 20 73 74 75 62 73 20 wever the stubs
c880: 6c 69 62 72 61 72 79 20 69 73 20 41 4c 57 41 59 library is ALWAY
c890: 53 20 73 74 61 74 69 63 20 68 65 6e 63 65 20 69 S static hence i
c8a0: 6e 63 6c 75 64 65 64 0d 0a 23 20 68 65 72 65 20 ncluded..# here
c8b0: 69 72 72 65 73 70 65 63 74 69 76 65 20 6f 66 20 irrespective of
c8c0: 74 68 65 20 4f 50 54 53 20 73 65 74 74 69 6e 67 the OPTS setting
c8d0: 2e 0d 0a 23 0d 0a 23 20 54 42 44 20 2d 20 74 63 ...#..# TBD - tc
c8e0: 6c 76 66 73 20 68 61 73 20 61 20 63 6f 6d 6d 65 lvfs has a comme
c8f0: 6e 74 20 74 68 61 74 20 73 74 75 62 73 20 6c 69 nt that stubs li
c900: 62 73 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 bs should not be
c910: 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 2d compiled with -
c920: 47 4c 0d 0a 23 20 77 69 74 68 6f 75 74 20 73 74 GL..# without st
c930: 61 74 69 6e 67 20 77 68 79 2e 20 54 63 6c 20 69 ating why. Tcl i
c940: 74 73 65 6c 66 20 63 6f 6d 70 69 6c 65 64 20 73 tself compiled s
c950: 74 75 62 73 20 6c 69 62 73 20 77 69 74 68 20 74 tubs libs with t
c960: 68 69 73 20 66 6c 61 67 2e 0d 0a 23 20 73 6f 20 his flag...# so
c970: 77 65 20 64 6f 20 6e 6f 74 20 72 65 6d 6f 76 65 we do not remove
c980: 20 69 74 20 66 72 6f 6d 20 63 66 6c 61 67 73 2e it from cflags.
c990: 20 2d 47 4c 20 6d 61 79 20 70 72 65 76 65 6e 74 -GL may prevent
c9a0: 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 63 extensions..# c
c9b0: 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 6f 6e 65 ompiled with one
c9c0: 20 56 43 20 76 65 72 73 69 6f 6e 20 74 6f 20 66 VC version to f
c9d0: 61 69 6c 20 74 6f 20 6c 69 6e 6b 20 61 67 61 69 ail to link agai
c9e0: 6e 73 74 20 73 74 75 62 73 20 6c 69 62 72 61 72 nst stubs librar
c9f0: 79 0d 0a 23 20 63 6f 6d 70 69 6c 65 64 20 77 69 y..# compiled wi
ca00: 74 68 20 61 6e 6f 74 68 65 72 20 56 43 20 76 65 th another VC ve
ca10: 72 73 69 6f 6e 2e 20 43 68 65 63 6b 20 66 6f 72 rsion. Check for
ca20: 20 74 68 69 73 20 61 6e 64 20 66 69 78 20 61 63 this and fix ac
ca30: 63 6f 72 64 69 6e 67 6c 79 2e 0d 0a 73 74 75 62 cordingly...stub
ca40: 73 63 66 6c 61 67 73 20 3d 20 24 28 63 66 6c 61 scflags = $(cfla
ca50: 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 gs) $(PKGNAMEFLA
ca60: 47 53 29 20 24 28 50 52 4a 5f 44 45 46 49 4e 45 GS) $(PRJ_DEFINE
ca70: 53 29 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 S) $(OPTDEFINES)
ca80: 20 2f 5a 6c 20 2f 47 4c 2d 20 2f 44 53 54 41 54 /Zl /GL- /DSTAT
ca90: 49 43 5f 42 55 49 4c 44 20 24 28 49 4e 43 4c 55 IC_BUILD $(INCLU
caa0: 44 45 53 29 20 24 28 55 53 45 5f 53 54 55 42 53 DES) $(USE_STUBS
cab0: 5f 44 45 46 53 29 0d 0a 0d 0a 23 20 4c 69 6e 6b _DEFS)....# Link
cac0: 20 66 6c 61 67 73 0d 0a 0d 0a 21 69 66 20 24 28 flags....!if $(
cad0: 44 45 42 55 47 29 0d 0a 6c 64 65 62 75 67 09 3d DEBUG)..ldebug.=
cae0: 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67 74 79 -debug -debugty
caf0: 70 65 3a 63 76 0d 0a 21 65 6c 73 65 0d 0a 6c 64 pe:cv..!else..ld
cb00: 65 62 75 67 09 3d 20 2d 72 65 6c 65 61 73 65 20 ebug.= -release
cb10: 2d 6f 70 74 3a 72 65 66 20 2d 6f 70 74 3a 69 63 -opt:ref -opt:ic
cb20: 66 2c 33 0d 0a 21 69 66 20 24 28 53 59 4d 42 4f f,3..!if $(SYMBO
cb30: 4c 53 29 0d 0a 6c 64 65 62 75 67 09 3d 20 24 28 LS)..ldebug.= $(
cb40: 6c 64 65 62 75 67 29 20 2d 64 65 62 75 67 20 2d ldebug) -debug -
cb50: 64 65 62 75 67 74 79 70 65 3a 63 76 0d 0a 21 65 debugtype:cv..!e
cb60: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ndif..!endif....
cb70: 23 20 4e 6f 74 65 3a 20 50 72 6f 66 69 6c 69 6e # Note: Profilin
cb80: 67 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 6f g is currently o
cb90: 6e 6c 79 20 70 6f 73 73 69 62 6c 65 20 77 69 74 nly possible wit
cba0: 68 20 74 68 65 20 56 69 73 75 61 6c 20 53 74 75 h the Visual Stu
cbb0: 64 69 6f 20 45 6e 74 65 72 70 72 69 73 65 0d 0a dio Enterprise..
cbc0: 21 69 66 20 24 28 50 52 4f 46 49 4c 45 29 0d 0a !if $(PROFILE)..
cbd0: 6c 64 65 62 75 67 3d 20 24 28 6c 64 65 62 75 67 ldebug= $(ldebug
cbe0: 29 20 2d 70 72 6f 66 69 6c 65 0d 0a 21 65 6e 64 ) -profile..!end
cbf0: 69 66 0d 0a 0d 0a 23 23 23 20 44 65 63 6c 61 72 if....### Declar
cc00: 61 74 69 6f 6e 73 20 63 6f 6d 6d 6f 6e 20 74 6f ations common to
cc10: 20 61 6c 6c 20 6c 69 6e 6b 65 72 20 76 65 72 73 all linker vers
cc20: 69 6f 6e 73 0d 0a 6c 66 6c 61 67 73 09 3d 20 2d ions..lflags.= -
cc30: 6e 6f 6c 6f 67 6f 20 2d 6d 61 63 68 69 6e 65 3a nologo -machine:
cc40: 24 28 4d 41 43 48 49 4e 45 29 20 24 28 4c 49 4e $(MACHINE) $(LIN
cc50: 4b 45 52 46 4c 41 47 53 29 20 24 28 6c 64 65 62 KERFLAGS) $(ldeb
cc60: 75 67 29 0d 0a 0d 0a 21 69 66 20 24 28 4d 53 56 ug)....!if $(MSV
cc70: 43 52 54 29 20 26 26 20 21 28 24 28 44 45 42 55 CRT) && !($(DEBU
cc80: 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b G) && !$(UNCHECK
cc90: 45 44 29 29 20 26 26 20 24 28 56 43 56 45 52 53 ED)) && $(VCVERS
cca0: 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0d 0a 6c 66 ION) >= 1900..lf
ccb0: 6c 61 67 73 09 3d 20 24 28 6c 66 6c 61 67 73 29 lags.= $(lflags)
ccc0: 20 2d 6e 6f 64 65 66 61 75 6c 74 6c 69 62 3a 75 -nodefaultlib:u
ccd0: 63 72 74 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d crt.lib..!endif.
cce0: 0a 0d 0a 64 6c 6c 6c 66 6c 61 67 73 20 3d 20 24 ...dlllflags = $
ccf0: 28 6c 66 6c 61 67 73 29 20 2d 64 6c 6c 0d 0a 63 (lflags) -dll..c
cd00: 6f 6e 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c onlflags = $(lfl
cd10: 61 67 73 29 20 2d 73 75 62 73 79 73 74 65 6d 3a ags) -subsystem:
cd20: 63 6f 6e 73 6f 6c 65 0d 0a 67 75 69 6c 66 6c 61 console..guilfla
cd30: 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d gs = $(lflags) -
cd40: 73 75 62 73 79 73 74 65 6d 3a 77 69 6e 64 6f 77 subsystem:window
cd50: 73 0d 0a 0d 0a 23 20 4c 69 62 72 61 72 69 65 73 s....# Libraries
cd60: 20 74 68 61 74 20 61 72 65 20 72 65 71 75 69 72 that are requir
cd70: 65 64 20 66 6f 72 20 65 76 65 72 79 20 69 6d 61 ed for every ima
cd80: 67 65 2e 0d 0a 23 20 45 78 74 65 6e 73 69 6f 6e ge...# Extension
cd90: 73 20 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 s should define
cda0: 61 6e 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 6c any additional l
cdb0: 69 62 72 61 72 69 65 73 20 77 69 74 68 20 24 28 ibraries with $(
cdc0: 50 52 4a 5f 4c 49 42 53 29 0d 0a 77 69 6e 6c 69 PRJ_LIBS)..winli
cdd0: 62 73 20 20 20 3d 20 6b 65 72 6e 65 6c 33 32 2e bs = kernel32.
cde0: 6c 69 62 20 61 64 76 61 70 69 33 32 2e 6c 69 62 lib advapi32.lib
cdf0: 0d 0a 0d 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 ....!if $(NEED_T
ce00: 4b 29 0d 0a 77 69 6e 6c 69 62 73 20 3d 20 24 28 K)..winlibs = $(
ce10: 77 69 6e 6c 69 62 73 29 20 67 64 69 33 32 2e 6c winlibs) gdi32.l
ce20: 69 62 20 75 73 65 72 33 32 2e 6c 69 62 20 75 78 ib user32.lib ux
ce30: 74 68 65 6d 65 2e 6c 69 62 0d 0a 21 65 6e 64 69 theme.lib..!endi
ce40: 66 0d 0a 0d 0a 23 20 41 76 6f 69 64 20 27 75 6e f....# Avoid 'un
ce50: 72 65 73 6f 6c 76 65 64 20 65 78 74 65 72 6e 61 resolved externa
ce60: 6c 20 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 75 72 l symbol __secur
ce70: 69 74 79 5f 63 6f 6f 6b 69 65 27 20 65 72 72 6f ity_cookie' erro
ce80: 72 73 2e 0d 0a 23 20 63 2e 66 2e 20 68 74 74 70 rs...# c.f. http
ce90: 3a 2f 2f 73 75 70 70 6f 72 74 2e 6d 69 63 72 6f ://support.micro
cea0: 73 6f 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 39 34 soft.com/?id=894
ceb0: 35 37 33 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 573..!if "$(MACH
cec0: 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 INE)" == "AMD64"
ced0: 0d 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f ..!if $(VCVERSIO
cee0: 4e 29 20 3e 20 31 33 39 39 20 26 26 20 24 28 56 N) > 1399 && $(V
cef0: 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 35 30 30 CVERSION) < 1500
cf00: 0d 0a 77 69 6e 6c 69 62 73 20 20 20 3d 20 24 28 ..winlibs = $(
cf10: 77 69 6e 6c 69 62 73 29 20 62 75 66 66 65 72 6f winlibs) buffero
cf20: 76 65 72 66 6c 6f 77 55 2e 6c 69 62 0d 0a 21 65 verflowU.lib..!e
cf30: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ndif..!endif....
cf40: 62 61 73 65 6c 69 62 73 20 3d 20 24 28 77 69 6e baselibs = $(win
cf50: 6c 69 62 73 29 20 24 28 50 52 4a 5f 4c 49 42 53 libs) $(PRJ_LIBS
cf60: 29 0d 0a 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 )....!if $(MSVCR
cf70: 54 29 20 26 26 20 21 28 24 28 44 45 42 55 47 29 T) && !($(DEBUG)
cf80: 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 && !$(UNCHECKED
cf90: 29 29 20 26 26 20 24 28 56 43 56 45 52 53 49 4f )) && $(VCVERSIO
cfa0: 4e 29 20 3e 3d 20 31 39 30 30 0d 0a 62 61 73 65 N) >= 1900..base
cfb0: 6c 69 62 73 20 20 20 3d 20 24 28 62 61 73 65 6c libs = $(basel
cfc0: 69 62 73 29 20 75 63 72 74 2e 6c 69 62 0d 0a 21 ibs) ucrt.lib..!
cfd0: 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 endif....#######
cfe0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cff0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
d000: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
d010: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 31 33 2e #########..# 13.
d020: 20 44 65 66 69 6e 65 20 73 74 61 6e 64 61 72 64 Define standard
d030: 20 63 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d 6d 6f commands, commo
d040: 6e 20 6d 61 6b 65 20 74 61 72 67 65 74 73 20 61 n make targets a
d050: 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 nd implicit rule
d060: 73 0d 0a 0d 0a 43 43 50 4b 47 43 4d 44 20 3d 20 s....CCPKGCMD =
d070: 24 28 63 63 33 32 29 20 24 28 70 6b 67 63 66 6c $(cc32) $(pkgcfl
d080: 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 ags) -Fo$(TMP_DI
d090: 52 29 5e 5c 0d 0a 43 43 41 50 50 43 4d 44 20 3d R)^\..CCAPPCMD =
d0a0: 20 24 28 63 63 33 32 29 20 24 28 61 70 70 63 66 $(cc32) $(appcf
d0b0: 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 lags) -Fo$(TMP_D
d0c0: 49 52 29 5e 5c 0d 0a 43 43 53 54 55 42 53 43 4d IR)^\..CCSTUBSCM
d0d0: 44 20 3d 20 24 28 63 63 33 32 29 20 24 28 73 74 D = $(cc32) $(st
d0e0: 75 62 73 63 66 6c 61 67 73 29 20 2d 46 6f 24 28 ubscflags) -Fo$(
d0f0: 54 4d 50 5f 44 49 52 29 5e 5c 0d 0a 0d 0a 4c 49 TMP_DIR)^\....LI
d100: 42 43 4d 44 20 3d 20 24 28 6c 69 62 33 32 29 20 BCMD = $(lib32)
d110: 2d 6e 6f 6c 6f 67 6f 20 24 28 4c 49 4e 4b 45 52 -nologo $(LINKER
d120: 46 4c 41 47 53 29 20 2d 6f 75 74 3a 24 40 0d 0a FLAGS) -out:$@..
d130: 44 4c 4c 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 DLLCMD = $(link3
d140: 32 29 20 24 28 64 6c 6c 6c 66 6c 61 67 73 29 20 2) $(dlllflags)
d150: 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 -out:$@ $(baseli
d160: 62 73 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 bs) $(tcllibs) $
d170: 28 74 6b 6c 69 62 73 29 0d 0a 0d 0a 43 4f 4e 45 (tklibs)....CONE
d180: 58 45 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 XECMD = $(link32
d190: 29 20 24 28 63 6f 6e 6c 66 6c 61 67 73 29 20 2d ) $(conlflags) -
d1a0: 6f 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 62 out:$@ $(baselib
d1b0: 73 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 28 s) $(tcllibs) $(
d1c0: 74 6b 6c 69 62 73 29 0d 0a 47 55 49 45 58 45 43 tklibs)..GUIEXEC
d1d0: 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 MD = $(link32) $
d1e0: 28 67 75 69 6c 66 6c 61 67 73 29 20 2d 6f 75 74 (guilflags) -out
d1f0: 3a 24 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 :$@ $(baselibs)
d200: 24 28 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c $(tcllibs) $(tkl
d210: 69 62 73 29 0d 0a 52 45 53 43 4d 44 20 20 3d 20 ibs)..RESCMD =
d220: 24 28 72 63 33 32 29 20 2d 66 6f 20 24 40 20 2d $(rc32) -fo $@ -
d230: 72 20 2d 69 20 22 24 28 47 45 4e 45 52 49 43 44 r -i "$(GENERICD
d240: 49 52 29 22 20 2d 69 20 22 24 28 54 4d 50 5f 44 IR)" -i "$(TMP_D
d250: 49 52 29 22 20 5c 0d 0a 09 20 20 20 20 24 28 54 IR)" \... $(T
d260: 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 2f 44 53 CL_INCLUDES) /DS
d270: 54 41 54 49 43 5f 42 55 49 4c 44 3d 24 28 53 54 TATIC_BUILD=$(ST
d280: 41 54 49 43 5f 42 55 49 4c 44 29 20 5c 0d 0a 09 ATIC_BUILD) \...
d290: 20 20 20 20 2f 44 44 45 42 55 47 3d 24 28 44 45 /DDEBUG=$(DE
d2a0: 42 55 47 29 20 2d 64 20 55 4e 43 48 45 43 4b 45 BUG) -d UNCHECKE
d2b0: 44 3d 24 28 55 4e 43 48 45 43 4b 45 44 29 20 5c D=$(UNCHECKED) \
d2c0: 0d 0a 09 20 20 20 20 2f 44 43 4f 4d 4d 41 56 45 ... /DCOMMAVE
d2d0: 52 53 49 4f 4e 3d 24 28 52 43 43 4f 4d 4d 41 56 RSION=$(RCCOMMAV
d2e0: 45 52 53 49 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 ERSION) \...
d2f0: 2f 44 44 4f 54 56 45 52 53 49 4f 4e 3d 5c 22 24 /DDOTVERSION=\"$
d300: 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 20 5c (DOTVERSION)\" \
d310: 0d 0a 09 20 20 20 20 2f 44 56 45 52 53 49 4f 4e ... /DVERSION
d320: 3d 5c 22 24 28 56 45 52 53 49 4f 4e 29 5c 22 20 =\"$(VERSION)\"
d330: 5c 0d 0a 09 20 20 20 20 2f 44 53 55 46 58 3d 5c \... /DSUFX=\
d340: 22 24 28 53 55 46 58 29 5c 22 20 5c 0d 0a 09 20 "$(SUFX)\" \...
d350: 20 20 20 2f 44 50 52 4f 4a 45 43 54 3d 5c 22 24 /DPROJECT=\"$
d360: 28 50 52 4f 4a 45 43 54 29 5c 22 20 5c 0d 0a 09 (PROJECT)\" \...
d370: 20 20 20 20 2f 44 50 52 4a 4c 49 42 4e 41 4d 45 /DPRJLIBNAME
d380: 3d 5c 22 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 =\"$(PRJLIBNAME)
d390: 5c 22 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 44 45 \"....!ifndef DE
d3a0: 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 FAULT_BUILD_TARG
d3b0: 45 54 0d 0a 44 45 46 41 55 4c 54 5f 42 55 49 4c ET..DEFAULT_BUIL
d3c0: 44 5f 54 41 52 47 45 54 20 3d 20 24 28 50 52 4f D_TARGET = $(PRO
d3d0: 4a 45 43 54 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d JECT)..!endif...
d3e0: 0a 64 65 66 61 75 6c 74 2d 74 61 72 67 65 74 3a .default-target:
d3f0: 20 24 28 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 $(DEFAULT_BUILD
d400: 5f 54 41 52 47 45 54 29 0d 0a 0d 0a 21 69 66 20 _TARGET)....!if
d410: 24 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f $(MULTIPLATFORM_
d420: 49 4e 53 54 41 4c 4c 29 0d 0a 64 65 66 61 75 6c INSTALL)..defaul
d430: 74 2d 70 6b 67 69 6e 64 65 78 3a 0d 0a 09 40 65 t-pkgindex:...@e
d440: 63 68 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 65 cho if {[package
d450: 20 76 73 61 74 69 73 66 69 65 73 20 5b 70 61 63 vsatisfies [pac
d460: 6b 61 67 65 20 70 72 6f 76 69 64 65 20 54 63 6c kage provide Tcl
d470: 5d 20 39 2e 30 5d 7d 20 7b 20 3e 20 24 28 4f 55 ] 9.0]} { > $(OU
d480: 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e T_DIR)\pkgIndex.
d490: 74 63 6c 0d 0a 09 40 65 63 68 6f 20 70 61 63 6b tcl...@echo pack
d4a0: 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 age ifneeded $(P
d4b0: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
d4c0: 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e ME) $(DOTVERSION
d4d0: 29 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 74 20 ) \... [list
d4e0: 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 load [file join
d4f0: 24 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d $$dir $(PLATFORM
d500: 5f 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a _IDENTIFY) $(PRJ
d510: 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 LIBNAME9)]] >> $
d520: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
d530: 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d ex.tcl...@echo }
d540: 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 else { >> $(OUT
d550: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
d560: 63 6c 0d 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 cl...@echo packa
d570: 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 ge ifneeded $(PR
d580: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
d590: 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 E) $(DOTVERSION)
d5a0: 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c \... [list l
d5b0: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 oad [file join $
d5c0: 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f $dir $(PLATFORM_
d5d0: 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c IDENTIFY) $(PRJL
d5e0: 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 IBNAME8)]] >> $(
d5f0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d600: 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d 20 x.tcl...@echo }
d610: 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b >> $(OUT_DIR)\pk
d620: 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 21 65 6c 73 gIndex.tcl..!els
d630: 65 0d 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e e..default-pkgin
d640: 64 65 78 3a 0d 0a 09 40 65 63 68 6f 20 69 66 20 dex:...@echo if
d650: 7b 5b 70 61 63 6b 61 67 65 20 76 73 61 74 69 73 {[package vsatis
d660: 66 69 65 73 20 5b 70 61 63 6b 61 67 65 20 70 72 fies [package pr
d670: 6f 76 69 64 65 20 54 63 6c 5d 20 39 2e 30 5d 7d ovide Tcl] 9.0]}
d680: 20 7b 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c { > $(OUT_DIR)\
d690: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 pkgIndex.tcl...@
d6a0: 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 66 6e echo package ifn
d6b0: 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 43 4b eeded $(PRJ_PACK
d6c0: 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44 AGE_TCLNAME) $(D
d6d0: 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0d 0a 09 20 OTVERSION) \...
d6e0: 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66 [list load [f
d6f0: 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 20 24 ile join $$dir $
d700: 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 (PRJLIBNAME9)]]
d710: 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b >> $(OUT_DIR)\pk
d720: 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63 gIndex.tcl...@ec
d730: 68 6f 20 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24 ho } else { >> $
d740: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
d750: 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 70 ex.tcl...@echo p
d760: 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 ackage ifneeded
d770: 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 $(PRJ_PACKAGE_TC
d780: 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 LNAME) $(DOTVERS
d790: 49 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 ION) \... [li
d7a0: 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f st load [file jo
d7b0: 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a 4c 49 in $$dir $(PRJLI
d7c0: 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 4f BNAME8)]] >> $(O
d7d0: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d7e0: 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d 20 3e .tcl...@echo } >
d7f0: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
d800: 49 6e 64 65 78 2e 74 63 6c 0d 0a 21 65 6e 64 69 Index.tcl..!endi
d810: 66 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 70 6b 67 f....default-pkg
d820: 69 6e 64 65 78 2d 74 65 61 3a 0d 0a 09 40 69 66 index-tea:...@if
d830: 20 65 78 69 73 74 20 24 28 52 4f 4f 54 29 5c 70 exist $(ROOT)\p
d840: 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e 20 6e kgIndex.tcl.in n
d850: 6d 61 6b 65 68 6c 70 20 2d 73 20 3c 3c 20 24 28 makehlp -s << $(
d860: 52 4f 4f 54 29 5c 70 6b 67 49 6e 64 65 78 2e 74 ROOT)\pkgIndex.t
d870: 63 6c 2e 69 6e 20 3e 20 24 28 4f 55 54 5f 44 49 cl.in > $(OUT_DI
d880: 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d R)\pkgIndex.tcl.
d890: 0a 40 50 41 43 4b 41 47 45 5f 56 45 52 53 49 4f .@PACKAGE_VERSIO
d8a0: 4e 40 20 20 20 20 24 28 44 4f 54 56 45 52 53 49 N@ $(DOTVERSI
d8b0: 4f 4e 29 0d 0a 40 50 41 43 4b 41 47 45 5f 4e 41 ON)..@PACKAGE_NA
d8c0: 4d 45 40 20 20 20 20 20 20 20 24 28 50 52 4a 5f ME@ $(PRJ_
d8d0: 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 PACKAGE_TCLNAME)
d8e0: 0d 0a 40 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 ..@PACKAGE_TCLNA
d8f0: 4d 45 40 20 20 20 20 24 28 50 52 4a 5f 50 41 43 ME@ $(PRJ_PAC
d900: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0d 0a 40 KAGE_TCLNAME)..@
d910: 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 40 20 20 20 PKG_LIB_FILE@
d920: 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 $(PRJLIBNAME
d930: 29 0d 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 )..@PKG_LIB_FILE
d940: 38 40 20 20 20 20 20 20 24 28 50 52 4a 4c 49 42 8@ $(PRJLIB
d950: 4e 41 4d 45 38 29 0d 0a 40 50 4b 47 5f 4c 49 42 NAME8)..@PKG_LIB
d960: 5f 46 49 4c 45 39 40 20 20 20 20 20 20 24 28 50 _FILE9@ $(P
d970: 52 4a 4c 49 42 4e 41 4d 45 39 29 0d 0a 3c 3c 0d RJLIBNAME9)..<<.
d980: 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 ...default-insta
d990: 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 ll: default-inst
d9a0: 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 64 65 66 all-binaries def
d9b0: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 ault-install-lib
d9c0: 72 61 72 69 65 73 0d 0a 21 69 66 20 24 28 53 59 raries..!if $(SY
d9d0: 4d 42 4f 4c 53 29 0d 0a 64 65 66 61 75 6c 74 2d MBOLS)..default-
d9e0: 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 install: default
d9f0: 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 0d 0a 21 -install-pdbs..!
da00: 65 6e 64 69 66 0d 0a 0d 0a 23 20 41 67 61 69 6e endif....# Again
da10: 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 68 69 to deal with hi
da20: 73 74 6f 72 69 63 61 6c 20 62 72 6f 6b 65 6e 6e storical brokenn
da30: 65 73 73 2c 20 74 68 65 72 65 20 69 73 20 73 6f ess, there is so
da40: 6d 65 20 63 6f 6e 66 75 73 69 6f 6e 0d 0a 23 20 me confusion..#
da50: 69 6e 20 74 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 in terminlogy. F
da60: 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 74 or extensions, t
da70: 68 65 20 22 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 he "install-bina
da80: 72 69 65 73 22 20 77 61 73 20 75 73 65 64 20 74 ries" was used t
da90: 6f 0d 0a 23 20 6c 6f 63 61 74 65 20 74 61 72 67 o..# locate targ
daa0: 65 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 et directory for
dab0: 20 2a 62 69 6e 61 72 79 20 73 68 61 72 65 64 20 *binary shared
dac0: 6c 69 62 72 61 72 69 65 73 2a 20 61 6e 64 20 74 libraries* and t
dad0: 68 75 73 0d 0a 23 20 74 68 65 20 61 70 70 72 6f hus..# the appro
dae0: 70 72 69 61 74 65 20 6d 61 63 72 6f 20 69 73 20 priate macro is
daf0: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 LIB_INSTALL_DIR
db00: 73 69 6e 63 65 20 42 49 4e 5f 49 4e 53 54 41 4c since BIN_INSTAL
db10: 4c 5f 44 49 52 20 69 73 0d 0a 23 20 66 6f 72 20 L_DIR is..# for
db20: 65 78 65 63 75 74 61 62 6c 65 73 20 28 65 78 65 executables (exe
db30: 73 29 2e 20 4f 6e 20 74 68 65 20 6f 74 68 65 72 s). On the other
db40: 20 68 61 6e 64 20 74 68 65 20 22 69 6e 73 74 61 hand the "insta
db50: 6c 6c 2d 6c 69 62 72 61 72 69 65 73 22 0d 0a 23 ll-libraries"..#
db60: 20 74 61 72 67 65 74 20 69 73 20 66 6f 72 20 2a target is for *
db70: 73 63 72 69 70 74 73 2a 20 61 6e 64 20 73 68 6f scripts* and sho
db80: 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 63 61 uld have been ca
db90: 6c 6c 65 64 20 22 69 6e 73 74 61 6c 6c 2d 73 63 lled "install-sc
dba0: 72 69 70 74 73 22 2e 0d 0a 64 65 66 61 75 6c 74 ripts"...default
dbb0: 2d 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 -install-binarie
dbc0: 73 3a 20 24 28 50 52 4a 4c 49 42 29 0d 0a 09 40 s: $(PRJLIB)...@
dbd0: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
dbe0: 62 69 6e 61 72 69 65 73 20 74 6f 20 27 24 28 4c binaries to '$(L
dbf0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 IB_INSTALL_DIR)'
dc00: 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 ...@if not exist
dc10: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f "$(LIB_INSTALL_
dc20: 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c DIR)" mkdir "$(L
dc30: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 IB_INSTALL_DIR)"
dc40: 0d 0a 09 40 24 28 43 50 59 29 20 24 28 50 52 4a ...@$(CPY) $(PRJ
dc50: 4c 49 42 29 20 22 24 28 4c 49 42 5f 49 4e 53 54 LIB) "$(LIB_INST
dc60: 41 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0d 0a ALL_DIR)" >NUL..
dc70: 0d 0a 23 20 41 6c 69 61 73 20 66 6f 72 20 64 65 ..# Alias for de
dc80: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 fault-install-sc
dc90: 72 69 70 74 73 0d 0a 64 65 66 61 75 6c 74 2d 69 ripts..default-i
dca0: 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 65 73 nstall-libraries
dcb0: 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c : default-instal
dcc0: 6c 2d 73 63 72 69 70 74 73 0d 0a 0d 0a 64 65 66 l-scripts....def
dcd0: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 ault-install-scr
dce0: 69 70 74 73 3a 20 24 28 4f 55 54 5f 44 49 52 29 ipts: $(OUT_DIR)
dcf0: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 \pkgIndex.tcl...
dd00: 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 @echo Installing
dd10: 20 6c 69 62 72 61 72 69 65 73 20 74 6f 20 27 24 libraries to '$
dd20: 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f (SCRIPT_INSTALL_
dd30: 44 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 DIR)'...@if not
dd40: 65 78 69 73 74 20 22 24 28 53 43 52 49 50 54 5f exist "$(SCRIPT_
dd50: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b INSTALL_DIR)" mk
dd60: 64 69 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e dir "$(SCRIPT_IN
dd70: 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 69 STALL_DIR)"...@i
dd80: 66 20 65 78 69 73 74 20 24 28 4c 49 42 44 49 52 f exist $(LIBDIR
dd90: 29 20 24 28 43 50 59 29 20 24 28 4c 49 42 44 49 ) $(CPY) $(LIBDI
dda0: 52 29 5c 2a 2e 74 63 6c 20 22 24 28 53 43 52 49 R)\*.tcl "$(SCRI
ddb0: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 PT_INSTALL_DIR)"
ddc0: 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c ...@echo Install
ddd0: 69 6e 67 20 70 61 63 6b 61 67 65 20 69 6e 64 65 ing package inde
dde0: 78 20 69 6e 20 27 24 28 53 43 52 49 50 54 5f 49 x in '$(SCRIPT_I
ddf0: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 NSTALL_DIR)'...@
de00: 24 28 43 50 59 29 20 24 28 4f 55 54 5f 44 49 52 $(CPY) $(OUT_DIR
de10: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 20 24 )\pkgIndex.tcl $
de20: 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f (SCRIPT_INSTALL_
de30: 44 49 52 29 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d DIR)....default-
de40: 69 6e 73 74 61 6c 6c 2d 73 74 75 62 73 3a 0d 0a install-stubs:..
de50: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
de60: 67 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 g stubs library
de70: 74 6f 20 27 24 28 53 43 52 49 50 54 5f 49 4e 53 to '$(SCRIPT_INS
de80: 54 41 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 69 66 TALL_DIR)'...@if
de90: 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 53 43 not exist "$(SC
dea0: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
deb0: 29 22 20 6d 6b 64 69 72 20 22 24 28 53 43 52 49 )" mkdir "$(SCRI
dec0: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 PT_INSTALL_DIR)"
ded0: 0d 0a 09 40 24 28 43 50 59 29 20 24 28 50 52 4a ...@$(CPY) $(PRJ
dee0: 53 54 55 42 4c 49 42 29 20 22 24 28 53 43 52 49 STUBLIB) "$(SCRI
def0: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 PT_INSTALL_DIR)"
df00: 20 3e 4e 55 4c 0d 0a 0d 0a 64 65 66 61 75 6c 74 >NUL....default
df10: 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 3a 0d 0a -install-pdbs:..
df20: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
df30: 67 20 50 44 42 73 20 74 6f 20 27 24 28 4c 49 42 g PDBs to '$(LIB
df40: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a _INSTALL_DIR)'..
df50: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 .@if not exist "
df60: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
df70: 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c 49 42 R)" mkdir "$(LIB
df80: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a _INSTALL_DIR)"..
df90: 09 40 24 28 43 50 59 29 20 22 24 28 4f 55 54 5f .@$(CPY) "$(OUT_
dfa0: 44 49 52 29 5c 2a 2e 70 64 62 22 20 22 24 28 4c DIR)\*.pdb" "$(L
dfb0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c IB_INSTALL_DIR)\
dfc0: 22 0d 0a 0d 0a 23 20 22 65 6d 61 63 73 20 66 6f "....# "emacs fo
dfd0: 6e 74 2d 6c 6f 63 6b 20 68 69 67 68 6c 69 67 68 nt-lock highligh
dfe0: 74 69 6e 67 20 66 69 78 0d 0a 0d 0a 64 65 66 61 ting fix....defa
dff0: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 ult-install-docs
e000: 2d 68 74 6d 6c 3a 0d 0a 09 40 65 63 68 6f 20 49 -html:...@echo I
e010: 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 nstalling docume
e020: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f ntation files to
e030: 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f '$(DOC_INSTALL_
e040: 44 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 DIR)'...@if not
e050: 65 78 69 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 exist "$(DOC_INS
e060: 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 TALL_DIR)" mkdir
e070: 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f "$(DOC_INSTALL_
e080: 44 49 52 29 22 0d 0a 09 40 69 66 20 65 78 69 73 DIR)"...@if exis
e090: 74 20 24 28 44 4f 43 44 49 52 29 20 66 6f 72 20 t $(DOCDIR) for
e0a0: 25 66 20 69 6e 20 28 22 24 28 44 4f 43 44 49 52 %f in ("$(DOCDIR
e0b0: 29 5c 2a 2e 68 74 6d 6c 22 20 22 24 28 44 4f 43 )\*.html" "$(DOC
e0c0: 44 49 52 29 5c 2a 2e 63 73 73 22 20 22 24 28 44 DIR)\*.css" "$(D
e0d0: 4f 43 44 49 52 29 5c 2a 2e 70 6e 67 22 29 20 64 OCDIR)\*.png") d
e0e0: 6f 20 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 o @$(COPY) %f "$
e0f0: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
e100: 29 22 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e )"....default-in
e110: 73 74 61 6c 6c 2d 64 6f 63 73 2d 6e 3a 0d 0a 09 stall-docs-n:...
e120: 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 @echo Installing
e130: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 documentation f
e140: 69 6c 65 73 20 74 6f 20 27 24 28 44 4f 43 5f 49 iles to '$(DOC_I
e150: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 NSTALL_DIR)'...@
e160: 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 if not exist "$(
e170: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 DOC_INSTALL_DIR)
e180: 22 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 5f 49 " mkdir "$(DOC_I
e190: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 NSTALL_DIR)"...@
e1a0: 69 66 20 65 78 69 73 74 20 24 28 44 4f 43 44 49 if exist $(DOCDI
e1b0: 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22 24 R) for %f in ("$
e1c0: 28 44 4f 43 44 49 52 29 5c 2a 2e 6e 22 29 20 64 (DOCDIR)\*.n") d
e1d0: 6f 20 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 o @$(COPY) %f "$
e1e0: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
e1f0: 29 22 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e )"....default-in
e200: 73 74 61 6c 6c 2d 64 65 6d 6f 73 3a 0d 0a 09 40 stall-demos:...@
e210: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
e220: 64 65 6d 6f 73 20 74 6f 20 27 24 28 44 45 4d 4f demos to '$(DEMO
e230: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a _INSTALL_DIR)'..
e240: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 .@if not exist "
e250: 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 $(DEMO_INSTALL_D
e260: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 45 IR)" mkdir "$(DE
e270: 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 MO_INSTALL_DIR)"
e280: 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 44 ...@if exist $(D
e290: 45 4d 4f 44 49 52 29 20 24 28 43 50 59 44 49 52 EMODIR) $(CPYDIR
e2a0: 29 20 22 24 28 44 45 4d 4f 44 49 52 29 22 20 22 ) "$(DEMODIR)" "
e2b0: 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 $(DEMO_INSTALL_D
e2c0: 49 52 29 22 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d IR)"....default-
e2d0: 63 6c 65 61 6e 3a 0d 0a 09 40 65 63 68 6f 20 43 clean:...@echo C
e2e0: 6c 65 61 6e 69 6e 67 20 24 28 54 4d 50 5f 44 49 leaning $(TMP_DI
e2f0: 52 29 5c 2a 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 R)\* ......@if e
e300: 78 69 73 74 20 24 28 54 4d 50 5f 44 49 52 29 5c xist $(TMP_DIR)\
e310: 6e 75 6c 20 24 28 52 4d 44 49 52 29 20 24 28 54 nul $(RMDIR) $(T
e320: 4d 50 5f 44 49 52 29 0d 0a 09 40 65 63 68 6f 20 MP_DIR)...@echo
e330: 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 Cleaning $(WIN_D
e340: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a IR)\nmakehlp.obj
e350: 2c 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 20 2e , nmakehlp.exe .
e360: 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
e370: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
e380: 6c 70 2e 6f 62 6a 20 64 65 6c 20 24 28 57 49 4e lp.obj del $(WIN
e390: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
e3a0: 62 6a 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 bj...@if exist $
e3b0: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
e3c0: 6c 70 2e 65 78 65 20 64 65 6c 20 24 28 57 49 4e lp.exe del $(WIN
e3d0: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 _DIR)\nmakehlp.e
e3e0: 78 65 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 xe...@if exist $
e3f0: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
e400: 6c 70 2e 6f 75 74 20 64 65 6c 20 24 28 57 49 4e lp.out del $(WIN
e410: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
e420: 75 74 0d 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e ut...@echo Clean
e430: 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e ing $(WIN_DIR)\n
e440: 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 2e 2e 2e mhlp-out.txt ...
e450: 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 ...@if exist $(W
e460: 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 IN_DIR)\nmhlp-ou
e470: 74 2e 74 78 74 20 64 65 6c 20 24 28 57 49 4e 5f t.txt del $(WIN_
e480: 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 DIR)\nmhlp-out.t
e490: 78 74 0d 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e xt...@echo Clean
e4a0: 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f ing $(WIN_DIR)\_
e4b0: 6a 75 6e 6b 2e 70 63 68 20 2e 2e 2e 0d 0a 09 40 junk.pch ......@
e4c0: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 if exist $(WIN_D
e4d0: 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 64 65 IR)\_junk.pch de
e4e0: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 l $(WIN_DIR)\_ju
e4f0: 6e 6b 2e 70 63 68 0d 0a 09 40 65 63 68 6f 20 43 nk.pch...@echo C
e500: 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 leaning $(WIN_DI
e510: 52 29 5c 76 65 72 63 6c 2e 78 2c 20 76 65 72 63 R)\vercl.x, verc
e520: 6c 2e 69 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 l.i ......@if ex
e530: 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 ist $(WIN_DIR)\v
e540: 65 72 63 6c 2e 78 20 64 65 6c 20 24 28 57 49 4e ercl.x del $(WIN
e550: 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 0d 0a 09 _DIR)\vercl.x...
e560: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
e570: 44 49 52 29 5c 76 65 72 63 6c 2e 69 20 64 65 6c DIR)\vercl.i del
e580: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 $(WIN_DIR)\verc
e590: 6c 2e 69 0d 0a 09 40 65 63 68 6f 20 43 6c 65 61 l.i...@echo Clea
e5a0: 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c ning $(WIN_DIR)\
e5b0: 76 65 72 73 69 6f 6e 73 2e 76 63 2c 20 76 65 72 versions.vc, ver
e5c0: 73 69 6f 6e 2e 76 63 20 2e 2e 2e 0d 0a 09 40 69 sion.vc ......@i
e5d0: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
e5e0: 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 20 64 R)\versions.vc d
e5f0: 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 el $(WIN_DIR)\ve
e600: 72 73 69 6f 6e 73 2e 76 63 0d 0a 09 40 69 66 20 rsions.vc...@if
e610: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
e620: 5c 76 65 72 73 69 6f 6e 2e 76 63 20 64 65 6c 20 \version.vc del
e630: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 $(WIN_DIR)\versi
e640: 6f 6e 2e 76 63 0d 0a 0d 0a 64 65 66 61 75 6c 74 on.vc....default
e650: 2d 68 6f 73 65 3a 20 64 65 66 61 75 6c 74 2d 63 -hose: default-c
e660: 6c 65 61 6e 0d 0a 09 40 65 63 68 6f 20 48 6f 73 lean...@echo Hos
e670: 69 6e 67 20 24 28 4f 55 54 5f 44 49 52 29 5c 2a ing $(OUT_DIR)\*
e680: 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 ......@if exist
e690: 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e 75 6c 20 $(OUT_DIR)\nul
e6a0: 24 28 52 4d 44 49 52 29 20 24 28 4f 55 54 5f 44 $(RMDIR) $(OUT_D
e6b0: 49 52 29 0d 0a 0d 0a 23 20 4f 6e 6c 79 20 66 6f IR)....# Only fo
e6c0: 72 20 62 61 63 6b 77 61 72 64 20 63 6f 6d 70 61 r backward compa
e6d0: 74 69 62 69 6c 69 74 79 0d 0a 64 65 66 61 75 6c tibility..defaul
e6e0: 74 2d 64 69 73 74 63 6c 65 61 6e 3a 20 64 65 66 t-distclean: def
e6f0: 61 75 6c 74 2d 68 6f 73 65 0d 0a 0d 0a 64 65 66 ault-hose....def
e700: 61 75 6c 74 2d 73 65 74 75 70 3a 0d 0a 09 40 69 ault-setup:...@i
e710: 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 4f 55 f not exist $(OU
e720: 54 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 69 72 T_DIR)\nul mkdir
e730: 20 24 28 4f 55 54 5f 44 49 52 29 0d 0a 09 40 69 $(OUT_DIR)...@i
e740: 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 54 4d f not exist $(TM
e750: 50 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 69 72 P_DIR)\nul mkdir
e760: 20 24 28 54 4d 50 5f 44 49 52 29 0d 0a 0d 0a 21 $(TMP_DIR)....!
e770: 69 66 20 22 24 28 54 45 53 54 50 41 54 29 22 20 if "$(TESTPAT)"
e780: 21 3d 20 22 22 0d 0a 54 45 53 54 46 4c 41 47 53 != ""..TESTFLAGS
e790: 20 3d 20 24 28 54 45 53 54 46 4c 41 47 53 29 20 = $(TESTFLAGS)
e7a0: 2d 66 69 6c 65 20 24 28 54 45 53 54 50 41 54 29 -file $(TESTPAT)
e7b0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 64 65 66 61 ..!endif....defa
e7c0: 75 6c 74 2d 74 65 73 74 3a 20 64 65 66 61 75 6c ult-test: defaul
e7d0: 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 43 t-setup $(PROJEC
e7e0: 54 29 0d 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 T)...@set TCLLIB
e7f0: 50 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c PATH=$(OUT_DIR:\
e800: 3d 2f 29 0d 0a 09 40 69 66 20 65 78 69 73 74 20 =/)...@if exist
e810: 24 28 4c 49 42 44 49 52 29 20 66 6f 72 20 25 66 $(LIBDIR) for %f
e820: 20 69 6e 20 28 22 24 28 4c 49 42 44 49 52 29 5c in ("$(LIBDIR)\
e830: 2a 2e 74 63 6c 22 29 20 64 6f 20 40 24 28 43 4f *.tcl") do @$(CO
e840: 50 59 29 20 25 66 20 22 24 28 4f 55 54 5f 44 49 PY) %f "$(OUT_DI
e850: 52 29 22 0d 0a 09 63 64 20 22 24 28 54 45 53 54 R)"...cd "$(TEST
e860: 44 49 52 29 22 20 26 26 20 24 28 44 45 42 55 47 DIR)" && $(DEBUG
e870: 47 45 52 29 20 24 28 54 43 4c 53 48 29 20 61 6c GER) $(TCLSH) al
e880: 6c 2e 74 63 6c 20 24 28 54 45 53 54 46 4c 41 47 l.tcl $(TESTFLAG
e890: 53 29 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 73 68 S)....default-sh
e8a0: 65 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 73 65 74 ell: default-set
e8b0: 75 70 20 24 28 50 52 4f 4a 45 43 54 29 0d 0a 09 up $(PROJECT)...
e8c0: 40 73 65 74 20 54 43 4c 4c 49 42 50 41 54 48 3d @set TCLLIBPATH=
e8d0: 24 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f 29 0d 0a $(OUT_DIR:\=/)..
e8e0: 09 40 69 66 20 65 78 69 73 74 20 24 28 4c 49 42 .@if exist $(LIB
e8f0: 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 DIR) for %f in (
e900: 22 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 6c "$(LIBDIR)\*.tcl
e910: 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 ") do @$(COPY) %
e920: 66 20 22 24 28 4f 55 54 5f 44 49 52 29 22 0d 0a f "$(OUT_DIR)"..
e930: 09 24 28 44 45 42 55 47 47 45 52 29 20 24 28 54 .$(DEBUGGER) $(T
e940: 43 4c 53 48 29 0d 0a 0d 0a 23 20 47 65 6e 65 72 CLSH)....# Gener
e950: 61 74 69 6f 6e 20 6f 66 20 57 69 6e 64 6f 77 73 ation of Windows
e960: 20 76 65 72 73 69 6f 6e 20 72 65 73 6f 75 72 63 version resourc
e970: 65 0d 0a 21 69 66 64 65 66 20 52 43 46 49 4c 45 e..!ifdef RCFILE
e980: 0d 0a 0d 0a 23 20 4e 6f 74 65 3a 20 64 6f 6e 27 ....# Note: don'
e990: 74 20 75 73 65 20 24 2a 2a 20 69 6e 20 62 65 6c t use $** in bel
e9a0: 6f 77 20 72 75 6c 65 20 62 65 63 61 75 73 65 20 ow rule because
e9b0: 74 68 65 72 65 20 6d 61 79 20 62 65 20 6f 74 68 there may be oth
e9c0: 65 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 0d er dependencies.
e9d0: 0a 23 20 61 6e 64 20 6f 6e 6c 79 20 74 68 65 20 .# and only the
e9e0: 22 6d 61 69 6e 22 20 72 63 20 6d 75 73 74 20 62 "main" rc must b
e9f0: 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 e passed to the
ea00: 72 65 73 6f 75 72 63 65 20 63 6f 6d 70 69 6c 65 resource compile
ea10: 72 0d 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 r..$(TMP_DIR)\$(
ea20: 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 PROJECT).res: $(
ea30: 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 RCDIR)\$(PROJECT
ea40: 29 2e 72 63 0d 0a 09 24 28 52 45 53 43 4d 44 29 ).rc...$(RESCMD)
ea50: 20 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a $(RCDIR)\$(PROJ
ea60: 45 43 54 29 2e 72 63 0d 0a 0d 0a 21 65 6c 73 65 ECT).rc....!else
ea70: 0d 0a 0d 0a 23 20 49 66 20 70 61 72 65 6e 74 20 ....# If parent
ea80: 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 makefile has not
ea90: 20 64 65 66 69 6e 65 64 20 61 20 72 65 73 6f 75 defined a resou
eaa0: 72 63 65 20 64 65 66 69 6e 69 74 69 6f 6e 20 66 rce definition f
eab0: 69 6c 65 2c 0d 0a 23 20 77 65 20 77 69 6c 6c 20 ile,..# we will
eac0: 67 65 6e 65 72 61 74 65 20 6f 6e 65 20 66 72 6f generate one fro
ead0: 6d 20 73 74 61 6e 64 61 72 64 20 74 65 6d 70 6c m standard templ
eae0: 61 74 65 2e 0d 0a 24 28 54 4d 50 5f 44 49 52 29 ate...$(TMP_DIR)
eaf0: 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a \$(PROJECT).res:
eb00: 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 $(TMP_DIR)\$(PR
eb10: 4f 4a 45 43 54 29 2e 72 63 0d 0a 0d 0a 24 28 54 OJECT).rc....$(T
eb20: 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 MP_DIR)\$(PROJEC
eb30: 54 29 2e 72 63 3a 0d 0a 09 40 24 28 43 4f 50 59 T).rc:...@$(COPY
eb40: 29 20 3c 3c 20 24 28 54 4d 50 5f 44 49 52 29 5c ) << $(TMP_DIR)\
eb50: 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0d 0a 23 $(PROJECT).rc..#
eb60: 69 6e 63 6c 75 64 65 20 3c 77 69 6e 76 65 72 2e include <winver.
eb70: 68 3e 0d 0a 0d 0a 56 53 5f 56 45 52 53 49 4f 4e h>....VS_VERSION
eb80: 5f 49 4e 46 4f 20 56 45 52 53 49 4f 4e 49 4e 46 _INFO VERSIONINF
eb90: 4f 0d 0a 20 46 49 4c 45 56 45 52 53 49 4f 4e 09 O.. FILEVERSION.
eba0: 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0d 0a 20 50 COMMAVERSION.. P
ebb0: 52 4f 44 55 43 54 56 45 52 53 49 4f 4e 09 43 4f RODUCTVERSION.CO
ebc0: 4d 4d 41 56 45 52 53 49 4f 4e 0d 0a 20 46 49 4c MMAVERSION.. FIL
ebd0: 45 46 4c 41 47 53 4d 41 53 4b 09 30 78 33 66 4c EFLAGSMASK.0x3fL
ebe0: 0d 0a 23 69 66 64 65 66 20 44 45 42 55 47 0d 0a ..#ifdef DEBUG..
ebf0: 20 46 49 4c 45 46 4c 41 47 53 09 56 53 5f 46 46 FILEFLAGS.VS_FF
ec00: 5f 44 45 42 55 47 0d 0a 23 65 6c 73 65 0d 0a 20 _DEBUG..#else..
ec10: 46 49 4c 45 46 4c 41 47 53 09 30 78 30 4c 0d 0a FILEFLAGS.0x0L..
ec20: 23 65 6e 64 69 66 0d 0a 20 46 49 4c 45 4f 53 09 #endif.. FILEOS.
ec30: 09 56 4f 53 5f 4e 54 5f 57 49 4e 44 4f 57 53 33 .VOS_NT_WINDOWS3
ec40: 32 0d 0a 20 46 49 4c 45 54 59 50 45 09 56 46 54 2.. FILETYPE.VFT
ec50: 5f 44 4c 4c 0d 0a 20 46 49 4c 45 53 55 42 54 59 _DLL.. FILESUBTY
ec60: 50 45 09 30 78 30 4c 0d 0a 42 45 47 49 4e 0d 0a PE.0x0L..BEGIN..
ec70: 20 20 20 20 42 4c 4f 43 4b 20 22 53 74 72 69 6e BLOCK "Strin
ec80: 67 46 69 6c 65 49 6e 66 6f 22 0d 0a 20 20 20 20 gFileInfo"..
ec90: 42 45 47 49 4e 0d 0a 09 42 4c 4f 43 4b 20 22 30 BEGIN...BLOCK "0
eca0: 34 30 39 30 34 62 30 22 0d 0a 09 42 45 47 49 4e 40904b0"...BEGIN
ecb0: 0d 0a 09 20 20 20 20 56 41 4c 55 45 20 22 46 69 ... VALUE "Fi
ecc0: 6c 65 44 65 73 63 72 69 70 74 69 6f 6e 22 2c 20 leDescription",
ecd0: 20 22 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 "Tcl extension
ece0: 22 20 50 52 4f 4a 45 43 54 0d 0a 09 20 20 20 20 " PROJECT...
ecf0: 56 41 4c 55 45 20 22 4f 72 69 67 69 6e 61 6c 46 VALUE "OriginalF
ed00: 69 6c 65 6e 61 6d 65 22 2c 20 50 52 4a 4c 49 42 ilename", PRJLIB
ed10: 4e 41 4d 45 0d 0a 09 20 20 20 20 56 41 4c 55 45 NAME... VALUE
ed20: 20 22 46 69 6c 65 56 65 72 73 69 6f 6e 22 2c 20 "FileVersion",
ed30: 20 20 20 20 20 44 4f 54 56 45 52 53 49 4f 4e 0d DOTVERSION.
ed40: 0a 09 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f .. VALUE "Pro
ed50: 64 75 63 74 4e 61 6d 65 22 2c 20 20 20 20 20 20 ductName",
ed60: 22 50 61 63 6b 61 67 65 20 22 20 50 52 4f 4a 45 "Package " PROJE
ed70: 43 54 20 22 20 66 6f 72 20 54 63 6c 22 0d 0a 09 CT " for Tcl"...
ed80: 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f 64 75 VALUE "Produ
ed90: 63 74 56 65 72 73 69 6f 6e 22 2c 20 20 20 44 4f ctVersion", DO
eda0: 54 56 45 52 53 49 4f 4e 0d 0a 09 45 4e 44 0d 0a TVERSION...END..
edb0: 20 20 20 20 45 4e 44 0d 0a 20 20 20 20 42 4c 4f END.. BLO
edc0: 43 4b 20 22 56 61 72 46 69 6c 65 49 6e 66 6f 22 CK "VarFileInfo"
edd0: 0d 0a 20 20 20 20 42 45 47 49 4e 0d 0a 09 56 41 .. BEGIN...VA
ede0: 4c 55 45 20 22 54 72 61 6e 73 6c 61 74 69 6f 6e LUE "Translation
edf0: 22 2c 20 30 78 34 30 39 2c 20 31 32 30 30 0d 0a ", 0x409, 1200..
ee00: 20 20 20 20 45 4e 44 0d 0a 45 4e 44 0d 0a 0d 0a END..END....
ee10: 3c 3c 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 69 <<....!endif # i
ee20: 66 64 65 66 20 52 43 46 49 4c 45 0d 0a 0d 0a 21 fdef RCFILE....!
ee30: 69 66 6e 64 65 66 20 44 49 53 41 42 4c 45 5f 49 ifndef DISABLE_I
ee40: 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 0d 0a 44 MPLICIT_RULES..D
ee50: 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f ISABLE_IMPLICIT_
ee60: 52 55 4c 45 53 20 3d 20 30 0d 0a 21 65 6e 64 69 RULES = 0..!endi
ee70: 66 0d 0a 0d 0a 21 69 66 20 21 24 28 44 49 53 41 f....!if !$(DISA
ee80: 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c BLE_IMPLICIT_RUL
ee90: 45 53 29 0d 0a 23 20 49 6d 70 6c 69 63 69 74 20 ES)..# Implicit
eea0: 72 75 6c 65 20 64 65 66 69 6e 69 74 69 6f 6e 73 rule definitions
eeb0: 20 2d 20 6f 6e 6c 79 20 66 6f 72 20 62 75 69 6c - only for buil
eec0: 64 69 6e 67 20 6c 69 62 72 61 72 79 20 6f 62 6a ding library obj
eed0: 65 63 74 73 2e 20 46 6f 72 20 73 74 75 62 73 20 ects. For stubs
eee0: 61 6e 64 0d 0a 23 20 6d 61 69 6e 20 61 70 70 6c and..# main appl
eef0: 69 63 61 74 69 6f 6e 2c 20 74 68 65 20 6d 61 6b ication, the mak
ef00: 65 66 69 6c 65 20 73 68 6f 75 6c 64 20 64 65 66 efile should def
ef10: 69 6e 65 20 65 78 70 6c 69 63 69 74 20 72 75 6c ine explicit rul
ef20: 65 73 2e 0d 0a 0d 0a 7b 24 28 52 4f 4f 54 29 7d es.....{$(ROOT)}
ef30: 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f .c{$(TMP_DIR)}.o
ef40: 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 4d bj::...$(CCPKGCM
ef50: 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d 0a D) @<<..$<..<<..
ef60: 0d 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d 2e 63 ..{$(WIN_DIR)}.c
ef70: 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a {$(TMP_DIR)}.obj
ef80: 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 ::...$(CCPKGCMD)
ef90: 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d 0a 0d 0a @<<..$<..<<....
efa0: 7b 24 28 47 45 4e 45 52 49 43 44 49 52 29 7d 2e {$(GENERICDIR)}.
efb0: 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 c{$(TMP_DIR)}.ob
efc0: 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 4d 44 j::...$(CCPKGCMD
efd0: 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d 0a 0d ) @<<..$<..<<...
efe0: 0a 7b 24 28 43 4f 4d 50 41 54 44 49 52 29 7d 2e .{$(COMPATDIR)}.
eff0: 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 c{$(TMP_DIR)}.ob
f000: 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 4d 44 j::...$(CCPKGCMD
f010: 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d 0a 0d ) @<<..$<..<<...
f020: 0a 7b 24 28 52 43 44 49 52 29 7d 2e 72 63 7b 24 .{$(RCDIR)}.rc{$
f030: 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0d (TMP_DIR)}.res:.
f040: 0a 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0d 0a ..$(RESCMD) $<..
f050: 0d 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d 2e 72 ..{$(WIN_DIR)}.r
f060: 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 c{$(TMP_DIR)}.re
f070: 73 3a 0d 0a 09 24 28 52 45 53 43 4d 44 29 20 24 s:...$(RESCMD) $
f080: 3c 0d 0a 0d 0a 7b 24 28 54 4d 50 5f 44 49 52 29 <....{$(TMP_DIR)
f090: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
f0a0: 2e 72 65 73 3a 0d 0a 09 24 28 52 45 53 43 4d 44 .res:...$(RESCMD
f0b0: 29 20 24 3c 0d 0a 0d 0a 2e 53 55 46 46 49 58 45 ) $<.....SUFFIXE
f0c0: 53 3a 0d 0a 2e 53 55 46 46 49 58 45 53 3a 2e 63 S:...SUFFIXES:.c
f0d0: 20 2e 72 63 0d 0a 0d 0a 21 65 6e 64 69 66 0d 0a .rc....!endif..
f0e0: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
f0f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f100: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f110: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f120: 23 23 0d 0a 23 20 31 34 2e 20 53 61 6e 69 74 79 ##..# 14. Sanity
f130: 20 63 68 65 63 6b 20 73 65 6c 65 63 74 65 64 20 check selected
f140: 6f 70 74 69 6f 6e 73 20 61 67 61 69 6e 73 74 20 options against
f150: 54 63 6c 20 62 75 69 6c 64 20 6f 70 74 69 6f 6e Tcl build option
f160: 73 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 s..# When buildi
f170: 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 2c ng an extension,
f180: 20 63 65 72 74 61 69 6e 20 63 6f 6e 66 69 67 75 certain configu
f190: 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 20 73 ration options s
f1a0: 68 6f 75 6c 64 0d 0a 23 20 6d 61 74 63 68 20 74 hould..# match t
f1b0: 68 65 20 6f 6e 65 73 20 75 73 65 64 20 77 68 65 he ones used whe
f1c0: 6e 20 54 63 6c 20 77 61 73 20 62 75 69 6c 74 2e n Tcl was built.
f1d0: 20 48 65 72 65 20 77 65 20 63 68 65 63 6b 20 61 Here we check a
f1e0: 6e 64 0d 0a 23 20 77 61 72 6e 20 6f 6e 20 61 20 nd..# warn on a
f1f0: 6d 69 73 6d 61 74 63 68 2e 0d 0a 21 69 66 20 21 mismatch...!if !
f200: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 0d 0a $(DOING_TCL)....
f210: 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c !if $(TCLINSTALL
f220: 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 ) # Building aga
f230: 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 inst an installe
f240: 64 20 54 63 6c 0d 0a 21 69 66 20 65 78 69 73 74 d Tcl..!if exist
f250: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 ("$(_TCLDIR)\lib
f260: 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 \nmake\tcl.nmake
f270: 22 29 0d 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 ")..TCLNMAKECONF
f280: 49 47 20 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 IG = "$(_TCLDIR)
f290: 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e \lib\nmake\tcl.n
f2a0: 6d 61 6b 65 22 0d 0a 21 65 6e 64 69 66 0d 0a 21 make"..!endif..!
f2b0: 65 6c 73 65 20 23 20 21 24 28 54 43 4c 49 4e 53 else # !$(TCLINS
f2c0: 54 41 4c 4c 29 20 2d 20 62 75 69 6c 64 69 6e 67 TALL) - building
f2d0: 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 against Tcl sou
f2e0: 72 63 65 0d 0a 21 69 66 20 65 78 69 73 74 28 22 rce..!if exist("
f2f0: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 $(_TCLDIR)\win\$
f300: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 (BUILDDIRTOP)\tc
f310: 6c 2e 6e 6d 61 6b 65 22 29 0d 0a 54 43 4c 4e 4d l.nmake")..TCLNM
f320: 41 4b 45 43 4f 4e 46 49 47 09 3d 20 22 24 28 5f AKECONFIG.= "$(_
f330: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
f340: 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 2e 6e ILDDIRTOP)\tcl.n
f350: 6d 61 6b 65 22 0d 0a 21 65 6e 64 69 66 0d 0a 21 make"..!endif..!
f360: 65 6e 64 69 66 20 23 20 54 43 4c 49 4e 53 54 41 endif # TCLINSTA
f370: 4c 4c 0d 0a 0d 0a 21 69 66 20 24 28 43 4f 4e 46 LL....!if $(CONF
f380: 49 47 5f 43 48 45 43 4b 29 0d 0a 21 69 66 64 65 IG_CHECK)..!ifde
f390: 66 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 f TCLNMAKECONFIG
f3a0: 0d 0a 21 69 6e 63 6c 75 64 65 20 24 28 54 43 4c ..!include $(TCL
f3b0: 4e 4d 41 4b 45 43 4f 4e 46 49 47 29 0d 0a 0d 0a NMAKECONFIG)....
f3c0: 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f 52 45 !if defined(CORE
f3d0: 5f 4d 41 43 48 49 4e 45 29 20 26 26 20 22 24 28 _MACHINE) && "$(
f3e0: 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 22 20 21 CORE_MACHINE)" !
f3f0: 3d 20 22 24 28 4d 41 43 48 49 4e 45 29 22 0d 0a = "$(MACHINE)"..
f400: 21 65 72 72 6f 72 20 45 52 52 4f 52 3a 20 42 75 !error ERROR: Bu
f410: 69 6c 64 20 74 61 72 67 65 74 20 28 24 28 4d 41 ild target ($(MA
f420: 43 48 49 4e 45 29 29 20 64 6f 65 73 20 6e 6f 74 CHINE)) does not
f430: 20 6d 61 74 63 68 20 74 68 65 20 54 63 6c 20 6c match the Tcl l
f440: 69 62 72 61 72 79 20 61 72 63 68 69 74 65 63 74 ibrary architect
f450: 75 72 65 20 28 24 28 43 4f 52 45 5f 4d 41 43 48 ure ($(CORE_MACH
f460: 49 4e 45 29 29 2e 0d 0a 21 65 6e 64 69 66 0d 0a INE))...!endif..
f470: 21 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f !if $(TCL_VERSIO
f480: 4e 29 20 3c 20 38 37 20 26 26 20 64 65 66 69 6e N) < 87 && defin
f490: 65 64 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 ed(CORE_USE_THRE
f4a0: 41 44 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 43 AD_ALLOC) && $(C
f4b0: 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 ORE_USE_THREAD_A
f4c0: 4c 4c 4f 43 29 20 21 3d 20 24 28 55 53 45 5f 54 LLOC) != $(USE_T
f4d0: 48 52 45 41 44 5f 41 4c 4c 4f 43 29 0d 0a 21 6d HREAD_ALLOC)..!m
f4e0: 65 73 73 61 67 65 20 57 41 52 4e 49 4e 47 3a 20 essage WARNING:
f4f0: 56 61 6c 75 65 20 6f 66 20 55 53 45 5f 54 48 52 Value of USE_THR
f500: 45 41 44 5f 41 4c 4c 4f 43 20 28 24 28 55 53 45 EAD_ALLOC ($(USE
f510: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 29 20 _THREAD_ALLOC))
f520: 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 does not match i
f530: 74 73 20 54 63 6c 20 63 6f 72 65 20 76 61 6c 75 ts Tcl core valu
f540: 65 20 28 24 28 43 4f 52 45 5f 55 53 45 5f 54 48 e ($(CORE_USE_TH
f550: 52 45 41 44 5f 41 4c 4c 4f 43 29 29 2e 0d 0a 21 READ_ALLOC))...!
f560: 65 6e 64 69 66 0d 0a 21 69 66 20 64 65 66 69 6e endif..!if defin
f570: 65 64 28 43 4f 52 45 5f 44 45 42 55 47 29 20 26 ed(CORE_DEBUG) &
f580: 26 20 24 28 43 4f 52 45 5f 44 45 42 55 47 29 20 & $(CORE_DEBUG)
f590: 21 3d 20 24 28 44 45 42 55 47 29 0d 0a 21 6d 65 != $(DEBUG)..!me
f5a0: 73 73 61 67 65 20 57 41 52 4e 49 4e 47 3a 20 56 ssage WARNING: V
f5b0: 61 6c 75 65 20 6f 66 20 44 45 42 55 47 20 28 24 alue of DEBUG ($
f5c0: 28 44 45 42 55 47 29 29 20 64 6f 65 73 20 6e 6f (DEBUG)) does no
f5d0: 74 20 6d 61 74 63 68 20 69 74 73 20 54 63 6c 20 t match its Tcl
f5e0: 6c 69 62 72 61 72 79 20 63 6f 6e 66 69 67 75 72 library configur
f5f0: 61 74 69 6f 6e 20 28 24 28 44 45 42 55 47 29 29 ation ($(DEBUG))
f600: 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 ...!endif..!endi
f610: 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 f....!endif # TC
f620: 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 0d 0a 0d 0a LNMAKECONFIG....
f630: 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e !endif # !$(DOIN
f640: 47 5f 54 43 4c 29 0d 0a 0d 0a 0d 0a 23 2d 2d 2d G_TCL)......#---
f650: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f660: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f670: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f680: 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 44 69 73 70 6c -------..# Displ
f690: 61 79 20 73 74 61 74 73 20 62 65 69 6e 67 20 75 ay stats being u
f6a0: 73 65 64 2e 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d sed...#---------
f6b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f6c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f6d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f6e0: 2d 0d 0a 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e -....!if !$(DOIN
f6f0: 47 5f 54 43 4c 29 0d 0a 21 6d 65 73 73 61 67 65 G_TCL)..!message
f700: 20 2a 2a 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 *** Building ag
f710: 61 69 6e 73 74 20 54 63 6c 20 61 74 20 27 24 28 ainst Tcl at '$(
f720: 5f 54 43 4c 44 49 52 29 27 0d 0a 21 65 6e 64 69 _TCLDIR)'..!endi
f730: 66 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f f..!if !$(DOING_
f740: 54 4b 29 20 26 26 20 24 28 4e 45 45 44 5f 54 4b TK) && $(NEED_TK
f750: 29 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 )..!message ***
f760: 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 Building against
f770: 20 54 6b 20 61 74 20 27 24 28 5f 54 4b 44 49 52 Tk at '$(_TKDIR
f780: 29 27 0d 0a 21 65 6e 64 69 66 0d 0a 21 6d 65 73 )'..!endif..!mes
f790: 73 61 67 65 20 2a 2a 2a 20 49 6e 74 65 72 6d 65 sage *** Interme
f7a0: 64 69 61 74 65 20 64 69 72 65 63 74 6f 72 79 20 diate directory
f7b0: 77 69 6c 6c 20 62 65 20 27 24 28 54 4d 50 5f 44 will be '$(TMP_D
f7c0: 49 52 29 27 0d 0a 21 6d 65 73 73 61 67 65 20 2a IR)'..!message *
f7d0: 2a 2a 20 4f 75 74 70 75 74 20 64 69 72 65 63 74 ** Output direct
f7e0: 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 24 28 4f ory will be '$(O
f7f0: 55 54 5f 44 49 52 29 27 0d 0a 21 6d 65 73 73 61 UT_DIR)'..!messa
f800: 67 65 20 2a 2a 2a 20 49 6e 73 74 61 6c 6c 61 74 ge *** Installat
f810: 69 6f 6e 2c 20 69 66 20 73 65 6c 65 63 74 65 64 ion, if selected
f820: 2c 20 77 69 6c 6c 20 62 65 20 69 6e 20 27 24 28 , will be in '$(
f830: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 27 0d 0a 21 _INSTALLDIR)'..!
f840: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 53 75 66 66 message *** Suff
f850: 69 78 20 66 6f 72 20 62 69 6e 61 72 69 65 73 20 ix for binaries
f860: 77 69 6c 6c 20 62 65 20 27 24 28 53 55 46 58 29 will be '$(SUFX)
f870: 27 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 '..!message ***
f880: 43 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e Compiler version
f890: 20 24 28 56 43 56 45 52 29 2e 20 54 61 72 67 65 $(VCVER). Targe
f8a0: 74 20 24 28 4d 41 43 48 49 4e 45 29 2c 20 68 6f t $(MACHINE), ho
f8b0: 73 74 20 24 28 4e 41 54 49 56 45 5f 41 52 43 48 st $(NATIVE_ARCH
f8c0: 29 2e 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 69 ).....!endif # i
f8d0: 66 64 65 66 20 5f 52 55 4c 45 53 5f 56 43 0d 0a fdef _RULES_VC..