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 35 0d 0a 0d 0a 23 20 54 68 NOR = 15....# Th
0450: 65 20 50 52 4f 4a 45 43 54 20 6d 61 63 72 6f 20 e PROJECT macro
0460: 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 20 must be defined
0470: 62 79 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 by parent makefi
0480: 6c 65 2e 0d 0a 21 69 66 20 22 24 28 50 52 4f 4a le...!if "$(PROJ
0490: 45 43 54 29 22 20 3d 3d 20 22 22 0d 0a 21 65 72 ECT)" == ""..!er
04a0: 72 6f 72 20 2a 2a 2a 20 45 72 72 6f 72 3a 20 4d ror *** Error: M
04b0: 61 63 72 6f 20 50 52 4f 4a 45 43 54 20 6e 6f 74 acro PROJECT not
04c0: 20 64 65 66 69 6e 65 64 21 20 50 6c 65 61 73 65 defined! Please
04d0: 20 64 65 66 69 6e 65 20 69 74 20 62 65 66 6f 72 define it befor
04e0: 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 e including rule
04f0: 73 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a s.vc..!endif....
0500: 21 69 66 20 22 24 28 50 52 4a 5f 50 41 43 4b 41 !if "$(PRJ_PACKA
0510: 47 45 5f 54 43 4c 4e 41 4d 45 29 22 20 3d 3d 20 GE_TCLNAME)" ==
0520: 22 22 0d 0a 50 52 4a 5f 50 41 43 4b 41 47 45 5f ""..PRJ_PACKAGE_
0530: 54 43 4c 4e 41 4d 45 20 3d 20 24 28 50 52 4f 4a TCLNAME = $(PROJ
0540: 45 43 54 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a ECT)..!endif....
0550: 23 20 41 6c 73 6f 20 73 70 65 63 69 61 6c 20 63 # Also special c
0560: 61 73 65 20 54 63 6c 20 61 6e 64 20 54 6b 20 74 ase Tcl and Tk t
0570: 6f 20 73 61 76 65 20 73 6f 6d 65 20 74 79 70 69 o save some typi
0580: 6e 67 20 6c 61 74 65 72 0d 0a 44 4f 49 4e 47 5f ng later..DOING_
0590: 54 43 4c 20 3d 20 30 0d 0a 44 4f 49 4e 47 5f 54 TCL = 0..DOING_T
05a0: 4b 20 20 3d 20 30 0d 0a 21 69 66 20 22 24 28 50 K = 0..!if "$(P
05b0: 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 74 63 6c ROJECT)" == "tcl
05c0: 22 0d 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 31 "..DOING_TCL = 1
05d0: 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 50 52 4f ..!elseif "$(PRO
05e0: 4a 45 43 54 29 22 20 3d 3d 20 22 74 6b 22 0d 0a JECT)" == "tk"..
05f0: 44 4f 49 4e 47 5f 54 4b 20 3d 20 31 0d 0a 21 65 DOING_TK = 1..!e
0600: 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 ndif....!ifndef
0610: 4e 45 45 44 5f 54 4b 0d 0a 23 20 42 61 63 6b 77 NEED_TK..# Backw
0620: 61 72 64 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 ards compatibili
0630: 74 79 0d 0a 21 69 66 64 65 66 20 50 52 4f 4a 45 ty..!ifdef PROJE
0640: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 0d 0a CT_REQUIRES_TK..
0650: 4e 45 45 44 5f 54 4b 20 3d 20 24 28 50 52 4f 4a NEED_TK = $(PROJ
0660: 45 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 29 ECT_REQUIRES_TK)
0670: 0d 0a 21 65 6c 73 65 0d 0a 4e 45 45 44 5f 54 4b ..!else..NEED_TK
0680: 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 = 0..!endif..!e
0690: 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 ndif....!ifndef
06a0: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 0d NEED_TCL_SOURCE.
06b0: 0a 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 .NEED_TCL_SOURCE
06c0: 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a = 0..!endif....
06d0: 21 69 66 64 65 66 20 4e 45 45 44 5f 54 4b 5f 53 !ifdef NEED_TK_S
06e0: 4f 55 52 43 45 0d 0a 21 69 66 20 24 28 4e 45 45 OURCE..!if $(NEE
06f0: 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a 4e 45 D_TK_SOURCE)..NE
0700: 45 44 5f 54 4b 20 3d 20 31 0d 0a 21 65 6e 64 69 ED_TK = 1..!endi
0710: 66 0d 0a 21 65 6c 73 65 0d 0a 4e 45 45 44 5f 54 f..!else..NEED_T
0720: 4b 5f 53 4f 55 52 43 45 20 3d 20 30 0d 0a 21 65 K_SOURCE = 0..!e
0730: 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 ndif....########
0740: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0750: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0760: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0770: 23 23 23 23 23 23 23 23 0d 0a 23 20 4e 6d 61 6b ########..# Nmak
0780: 65 20 69 73 20 61 20 70 72 65 74 74 79 20 77 65 e is a pretty we
0790: 61 6b 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 69 ak environment i
07a0: 6e 20 73 79 6e 74 61 78 20 61 6e 64 20 63 61 70 n syntax and cap
07b0: 61 62 69 6c 69 74 69 65 73 0d 0a 23 20 73 6f 20 abilities..# so
07c0: 74 68 69 73 20 66 69 6c 65 20 69 73 20 6e 65 63 this file is nec
07d0: 65 73 73 61 72 69 6c 79 20 76 65 72 62 6f 73 65 essarily verbose
07e0: 2e 20 49 74 27 73 20 62 72 6f 6b 65 6e 20 64 6f . It's broken do
07f0: 77 6e 20 69 6e 74 6f 0d 0a 23 20 74 68 65 20 66 wn into..# the f
0800: 6f 6c 6c 6f 77 69 6e 67 20 70 61 72 74 73 2e 0d ollowing parts..
0810: 0a 23 0d 0a 23 20 30 2e 20 53 61 6e 69 74 79 20 .#..# 0. Sanity
0820: 63 68 65 63 6b 20 74 68 61 74 20 63 6f 6d 70 69 check that compi
0830: 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 ler environment
0840: 69 73 20 73 65 74 20 75 70 20 61 6e 64 20 69 6e is set up and in
0850: 69 74 69 61 6c 69 7a 65 0d 0a 23 20 20 20 20 61 itialize..# a
0860: 6e 79 20 62 75 69 6c 74 2d 69 6e 20 73 65 74 74 ny built-in sett
0870: 69 6e 67 73 20 66 72 6f 6d 20 74 68 65 20 70 61 ings from the pa
0880: 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 0d 0a 23 rent makefile..#
0890: 20 31 2e 20 46 69 72 73 74 20 64 65 66 69 6e 65 1. First define
08a0: 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20 74 6f the external to
08b0: 6f 6c 73 20 75 73 65 64 20 66 6f 72 20 63 6f 6d ols used for com
08c0: 70 69 6c 69 6e 67 2c 20 63 6f 70 79 69 6e 67 20 piling, copying
08d0: 65 74 63 2e 0d 0a 23 20 20 20 20 61 73 20 74 68 etc...# as th
08e0: 69 73 20 69 73 20 69 6e 64 65 70 65 6e 64 65 6e is is independen
08f0: 74 20 6f 66 20 65 76 65 72 79 74 68 69 6e 67 20 t of everything
0900: 65 6c 73 65 2e 0d 0a 23 20 32 2e 20 46 69 67 75 else...# 2. Figu
0910: 72 65 20 6f 75 74 20 6f 75 72 20 62 75 69 6c 64 re out our build
0920: 20 73 74 72 75 63 74 75 72 65 20 69 6e 20 74 65 structure in te
0930: 72 6d 73 20 6f 66 20 74 68 65 20 64 69 72 65 63 rms of the direc
0940: 74 6f 72 79 2c 20 77 68 65 74 68 65 72 0d 0a 23 tory, whether..#
0950: 20 20 20 20 77 65 20 61 72 65 20 62 75 69 6c 64 we are build
0960: 69 6e 67 20 54 63 6c 20 6f 72 20 61 6e 20 65 78 ing Tcl or an ex
0970: 74 65 6e 73 69 6f 6e 2c 20 65 74 63 2e 0d 0a 23 tension, etc...#
0980: 20 33 2e 20 44 65 74 65 72 6d 69 6e 65 20 74 68 3. Determine th
0990: 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c e compiler and l
09a0: 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 0d 0a inker versions..
09b0: 23 20 34 2e 20 42 75 69 6c 64 20 74 68 65 20 6e # 4. Build the n
09c0: 6d 61 6b 65 68 6c 70 20 68 65 6c 70 65 72 20 61 makehlp helper a
09d0: 70 70 6c 69 63 61 74 69 6f 6e 0d 0a 23 20 35 2e pplication..# 5.
09e0: 20 44 65 74 65 72 6d 69 6e 65 20 74 68 65 20 73 Determine the s
09f0: 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 6c 65 upported compile
0a00: 72 20 6f 70 74 69 6f 6e 73 20 61 6e 64 20 66 65 r options and fe
0a10: 61 74 75 72 65 73 0d 0a 23 20 36 2e 20 45 78 74 atures..# 6. Ext
0a20: 72 61 63 74 20 54 63 6c 2c 20 54 6b 2c 20 61 6e ract Tcl, Tk, an
0a30: 64 20 70 6f 73 73 69 62 6c 79 20 65 78 74 65 6e d possibly exten
0a40: 73 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e 20 6e sions, version n
0a50: 75 6d 62 65 72 73 20 66 72 6f 6d 20 74 68 65 0d umbers from the.
0a60: 0a 23 20 20 20 20 68 65 61 64 65 72 73 0d 0a 23 .# headers..#
0a70: 20 37 2e 20 50 61 72 73 65 20 74 68 65 20 4f 50 7. Parse the OP
0a80: 54 53 20 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 TS macro value f
0a90: 6f 72 20 75 73 65 72 2d 73 70 65 63 69 66 69 65 or user-specifie
0aa0: 64 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 d build configur
0ab0: 61 74 69 6f 6e 0d 0a 23 20 38 2e 20 50 61 72 73 ation..# 8. Pars
0ac0: 65 20 74 68 65 20 53 54 41 54 53 20 6d 61 63 72 e the STATS macr
0ad0: 6f 20 76 61 6c 75 65 20 66 6f 72 20 73 74 61 74 o value for stat
0ae0: 69 73 74 69 63 73 20 69 6e 73 74 72 75 6d 65 6e istics instrumen
0af0: 74 61 74 69 6f 6e 0d 0a 23 20 39 2e 20 50 61 72 tation..# 9. Par
0b00: 73 65 20 74 68 65 20 43 48 45 43 4b 53 20 6d 61 se the CHECKS ma
0b10: 63 72 6f 20 66 6f 72 20 61 64 64 69 74 69 6f 6e cro for addition
0b20: 61 6c 20 63 6f 6d 70 69 6c 61 74 69 6f 6e 20 63 al compilation c
0b30: 68 65 63 6b 73 0d 0a 23 20 31 30 2e 20 42 61 73 hecks..# 10. Bas
0b40: 65 64 20 6f 6e 20 74 68 69 73 20 73 65 6c 65 63 ed on this selec
0b50: 74 65 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ted configuratio
0b60: 6e 2c 20 63 6f 6e 73 74 72 75 63 74 20 74 68 65 n, construct the
0b70: 20 6f 75 74 70 75 74 0d 0a 23 20 20 20 20 20 64 output..# d
0b80: 69 72 65 63 74 6f 72 79 20 61 6e 64 20 66 69 6c irectory and fil
0b90: 65 20 70 61 74 68 73 0d 0a 23 20 31 31 2e 20 43 e paths..# 11. C
0ba0: 6f 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 74 onstruct the pat
0bb0: 68 73 20 77 68 65 72 65 20 74 68 65 20 70 61 63 hs where the pac
0bc0: 6b 61 67 65 20 69 73 20 74 6f 20 62 65 20 69 6e kage is to be in
0bd0: 73 74 61 6c 6c 65 64 0d 0a 23 20 31 32 2e 20 53 stalled..# 12. S
0be0: 65 74 20 75 70 20 74 68 65 20 61 63 74 75 61 6c et up the actual
0bf0: 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 options passed
0c00: 74 6f 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 to compiler and
0c10: 6c 69 6e 6b 65 72 20 62 61 73 65 64 0d 0a 23 20 linker based..#
0c20: 20 20 20 20 6f 6e 20 74 68 65 20 69 6e 66 6f 72 on the infor
0c30: 6d 61 74 69 6f 6e 20 67 61 74 68 65 72 65 64 20 mation gathered
0c40: 61 62 6f 76 65 2e 0d 0a 23 20 31 33 2e 20 44 65 above...# 13. De
0c50: 66 69 6e 65 20 73 6f 6d 65 20 73 74 61 6e 64 61 fine some standa
0c60: 72 64 20 62 75 69 6c 64 20 74 61 72 67 65 74 73 rd build targets
0c70: 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 and implicit ru
0c80: 6c 65 73 2e 20 54 68 65 73 65 20 6d 61 79 0d 0a les. These may..
0c90: 23 20 20 20 20 20 62 65 20 6f 70 74 69 6f 6e 61 # be optiona
0ca0: 6c 6c 79 20 64 69 73 61 62 6c 65 64 20 62 79 20 lly disabled by
0cb0: 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 the parent makef
0cc0: 69 6c 65 2e 0d 0a 23 20 31 34 2e 20 28 46 6f 72 ile...# 14. (For
0cd0: 20 65 78 74 65 6e 73 69 6f 6e 73 20 6f 6e 6c 79 extensions only
0ce0: 2e 29 20 43 6f 6d 70 61 72 65 20 74 68 65 20 63 .) Compare the c
0cf0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 66 20 onfiguration of
0d00: 74 68 65 20 74 61 72 67 65 74 0d 0a 23 20 20 20 the target..#
0d10: 20 20 54 63 6c 20 61 6e 64 20 74 68 65 20 65 78 Tcl and the ex
0d20: 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 77 61 72 tensions and war
0d30: 6e 20 61 67 61 69 6e 73 74 20 64 69 73 63 72 65 n against discre
0d40: 70 61 6e 63 69 65 73 2e 0d 0a 23 0d 0a 23 20 4f pancies...#..# O
0d50: 6e 65 20 66 69 6e 61 6c 20 6e 6f 74 65 20 61 62 ne final note ab
0d60: 6f 75 74 20 74 68 65 20 6d 61 63 72 6f 20 6e 61 out the macro na
0d70: 6d 65 73 20 75 73 65 64 2e 20 54 68 65 79 20 61 mes used. They a
0d80: 72 65 20 61 73 20 74 68 65 79 20 61 72 65 0d 0a re as they are..
0d90: 23 20 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c # for historical
0da0: 20 72 65 61 73 6f 6e 73 2e 20 57 65 20 77 6f 75 reasons. We wou
0db0: 6c 64 20 6c 69 6b 65 20 6c 65 67 61 63 79 20 65 ld like legacy e
0dc0: 78 74 65 6e 73 69 6f 6e 73 20 74 6f 0d 0a 23 20 xtensions to..#
0dd0: 63 6f 6e 74 69 6e 75 65 20 74 6f 20 77 6f 72 6b continue to work
0de0: 20 77 69 74 68 20 74 68 69 73 20 6d 61 6b 65 20 with this make
0df0: 69 6e 63 6c 75 64 65 20 66 69 6c 65 20 73 6f 20 include file so
0e00: 62 65 20 77 61 72 79 20 6f 66 0d 0a 23 20 63 68 be wary of..# ch
0e10: 61 6e 67 69 6e 67 20 74 68 65 6d 20 66 6f 72 20 anging them for
0e20: 63 6f 6e 73 69 73 74 65 6e 63 79 20 6f 72 20 63 consistency or c
0e30: 6c 61 72 69 74 79 2e 0d 0a 0d 0a 23 20 30 2e 20 larity.....# 0.
0e40: 53 61 6e 69 74 79 20 63 68 65 63 6b 20 63 6f 6d Sanity check com
0e50: 70 69 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e piler environmen
0e60: 74 0d 0a 0d 0a 23 20 43 68 65 63 6b 20 74 6f 20 t....# Check to
0e70: 73 65 65 20 77 65 20 61 72 65 20 63 6f 6e 66 69 see we are confi
0e80: 67 75 72 65 64 20 74 6f 20 62 75 69 6c 64 20 77 gured to build w
0e90: 69 74 68 20 4d 53 56 43 20 28 4d 53 44 45 56 44 ith MSVC (MSDEVD
0ea0: 49 52 2c 20 4d 53 56 43 44 49 52 20 6f 72 0d 0a IR, MSVCDIR or..
0eb0: 23 20 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 # VCINSTALLDIR)
0ec0: 6f 72 20 77 69 74 68 20 74 68 65 20 4d 53 20 50 or with the MS P
0ed0: 6c 61 74 66 6f 72 6d 20 53 44 4b 20 28 4d 53 53 latform SDK (MSS
0ee0: 44 4b 20 6f 72 20 57 69 6e 64 6f 77 73 53 44 4b DK or WindowsSDK
0ef0: 44 69 72 29 0d 0a 0d 0a 21 69 66 20 21 64 65 66 Dir)....!if !def
0f00: 69 6e 65 64 28 4d 53 44 45 56 44 49 52 29 20 26 ined(MSDEVDIR) &
0f10: 26 20 21 64 65 66 69 6e 65 64 28 4d 53 56 43 44 & !defined(MSVCD
0f20: 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 IR) && !defined(
0f30: 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 26 26 VCINSTALLDIR) &&
0f40: 20 21 64 65 66 69 6e 65 64 28 4d 53 53 44 4b 29 !defined(MSSDK)
0f50: 20 26 26 20 21 64 65 66 69 6e 65 64 28 57 49 4e && !defined(WIN
0f60: 44 4f 57 53 53 44 4b 44 49 52 29 0d 0a 4d 53 47 DOWSSDKDIR)..MSG
0f70: 20 3d 20 5e 0d 0a 56 69 73 75 61 6c 20 43 2b 2b = ^..Visual C++
0f80: 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 72 6f compiler enviro
0f90: 6e 6d 65 6e 74 20 6e 6f 74 20 69 6e 69 74 69 61 nment not initia
0fa0: 6c 69 7a 65 64 2e 0d 0a 21 65 72 72 6f 72 20 24 lized...!error $
0fb0: 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d (MSG)..!endif...
0fc0: 0a 23 20 57 65 20 6e 65 65 64 20 74 6f 20 72 75 .# We need to ru
0fd0: 6e 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 63 n from the direc
0fe0: 74 6f 72 79 20 74 68 65 20 70 61 72 65 6e 74 20 tory the parent
0ff0: 6d 61 6b 65 66 69 6c 65 20 69 73 20 6c 6f 63 61 makefile is loca
1000: 74 65 64 20 69 6e 2e 0d 0a 23 20 6e 6d 61 6b 65 ted in...# nmake
1010: 20 64 6f 65 73 20 6e 6f 74 20 74 65 6c 6c 20 75 does not tell u
1020: 73 20 77 68 61 74 20 6d 61 6b 65 66 69 6c 65 20 s what makefile
1030: 77 61 73 20 75 73 65 64 20 74 6f 20 69 6e 76 6f was used to invo
1040: 6b 65 20 69 74 20 73 6f 20 70 61 72 65 6e 74 0d ke it so parent.
1050: 0a 23 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 .# makefile has
1060: 74 6f 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46 to set the MAKEF
1070: 49 4c 45 56 43 20 6d 61 63 72 6f 20 6f 72 20 77 ILEVC macro or w
1080: 65 20 6a 75 73 74 20 6d 61 6b 65 20 61 20 67 75 e just make a gu
1090: 65 73 73 20 61 6e 64 0d 0a 23 20 77 61 72 6e 20 ess and..# warn
10a0: 69 66 20 77 65 20 74 68 69 6e 6b 20 74 68 61 74 if we think that
10b0: 20 69 73 20 6e 6f 74 20 74 68 65 20 63 61 73 65 is not the case
10c0: 2e 0d 0a 21 69 66 20 22 24 28 4d 41 4b 45 46 49 ...!if "$(MAKEFI
10d0: 4c 45 56 43 29 22 20 3d 3d 20 22 22 0d 0a 0d 0a LEVC)" == ""....
10e0: 21 69 66 20 65 78 69 73 74 28 22 24 28 50 52 4f !if exist("$(PRO
10f0: 4a 45 43 54 29 2e 76 63 22 29 0d 0a 4d 41 4b 45 JECT).vc")..MAKE
1100: 46 49 4c 45 56 43 20 3d 20 24 28 50 52 4f 4a 45 FILEVC = $(PROJE
1110: 43 54 29 2e 76 63 0d 0a 21 65 6c 73 65 69 66 20 CT).vc..!elseif
1120: 65 78 69 73 74 28 22 6d 61 6b 65 66 69 6c 65 2e exist("makefile.
1130: 76 63 22 29 0d 0a 4d 41 4b 45 46 49 4c 45 56 43 vc")..MAKEFILEVC
1140: 20 3d 20 6d 61 6b 65 66 69 6c 65 2e 76 63 0d 0a = makefile.vc..
1150: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 23 !endif..!endif #
1160: 20 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 "$(MAKEFILEVC)"
1170: 20 3d 3d 20 22 22 0d 0a 0d 0a 21 69 66 20 21 65 == ""....!if !e
1180: 78 69 73 74 28 22 24 28 4d 41 4b 45 46 49 4c 45 xist("$(MAKEFILE
1190: 56 43 29 22 29 0d 0a 4d 53 47 20 3d 20 5e 0d 0a VC)")..MSG = ^..
11a0: 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 6e 6d 61 You must run nma
11b0: 6b 65 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 ke from the dire
11c0: 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 ctory containing
11d0: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 6b the project mak
11e0: 65 66 69 6c 65 2e 5e 0d 0a 49 66 20 79 6f 75 20 efile.^..If you
11f0: 61 72 65 20 64 6f 69 6e 67 20 74 68 61 74 20 61 are doing that a
1200: 6e 64 20 67 65 74 74 69 6e 67 20 74 68 69 73 20 nd getting this
1210: 6d 65 73 73 61 67 65 2c 20 73 65 74 20 74 68 65 message, set the
1220: 20 4d 41 4b 45 46 49 4c 45 56 43 5e 0d 0a 6d 61 MAKEFILEVC^..ma
1230: 63 72 6f 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 cro to the name
1240: 6f 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d of the project m
1250: 61 6b 65 66 69 6c 65 2e 0d 0a 21 6d 65 73 73 61 akefile...!messa
1260: 67 65 20 57 41 52 4e 49 4e 47 3a 20 24 28 4d 53 ge WARNING: $(MS
1270: 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a G)..!endif......
1280: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
12c0: 0d 0a 23 20 31 2e 20 44 65 66 69 6e 65 20 65 78 ..# 1. Define ex
12d0: 74 65 72 6e 61 6c 20 70 72 6f 67 72 61 6d 73 20 ternal programs
12e0: 62 65 69 6e 67 20 75 73 65 64 0d 0a 0d 0a 23 2d being used....#-
12f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 53 65 74 ---------..# Set
1330: 20 74 68 65 20 70 72 6f 70 65 72 20 63 6f 70 79 the proper copy
1340: 20 6d 65 74 68 6f 64 20 74 6f 20 61 76 6f 69 64 method to avoid
1350: 20 6f 76 65 72 77 72 69 74 65 20 71 75 65 73 74 overwrite quest
1360: 69 6f 6e 73 0d 0a 23 20 74 6f 20 74 68 65 20 75 ions..# to the u
1370: 73 65 72 20 77 68 65 6e 20 63 6f 70 79 69 6e 67 ser when copying
1380: 20 66 69 6c 65 73 20 61 6e 64 20 73 65 6c 65 63 files and selec
1390: 74 69 6e 67 20 74 68 65 20 72 69 67 68 74 0d 0a ting the right..
13a0: 23 20 22 64 65 6c 65 74 65 20 61 6c 6c 22 20 6d # "delete all" m
13b0: 65 74 68 6f 64 2e 0d 0a 23 2d 2d 2d 2d 2d 2d 2d ethod...#-------
13c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
13d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
13e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
13f0: 2d 2d 2d 0d 0a 0d 0a 52 4d 44 49 52 09 3d 20 72 ---....RMDIR.= r
1400: 6d 64 69 72 20 2f 53 20 2f 51 0d 0a 43 50 59 09 mdir /S /Q..CPY.
1410: 3d 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e = xcopy /i /y >N
1420: 55 4c 0d 0a 43 50 59 44 49 52 20 20 3d 20 78 63 UL..CPYDIR = xc
1430: 6f 70 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e 55 opy /e /i /y >NU
1440: 4c 0d 0a 43 4f 50 59 09 3d 20 63 6f 70 79 20 2f L..COPY.= copy /
1450: 79 20 3e 4e 55 4c 0d 0a 4d 4b 44 49 52 20 20 20 y >NUL..MKDIR
1460: 3d 20 6d 6b 64 69 72 0d 0a 0d 0a 23 23 23 23 23 = mkdir....#####
1470: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1480: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1490: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
14a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
14b0: 23 0d 0a 23 20 32 2e 20 46 69 67 75 72 65 20 6f #..# 2. Figure o
14c0: 75 74 20 6f 75 72 20 62 75 69 6c 64 20 65 6e 76 ut our build env
14d0: 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 74 65 72 6d ironment in term
14e0: 73 20 6f 66 20 77 68 61 74 20 77 65 27 72 65 20 s of what we're
14f0: 62 75 69 6c 64 69 6e 67 2e 0d 0a 23 0d 0a 23 20 building...#..#
1500: 28 61 29 20 54 63 6c 20 69 74 73 65 6c 66 0d 0a (a) Tcl itself..
1510: 23 20 28 62 29 20 54 6b 0d 0a 23 20 28 63 29 20 # (b) Tk..# (c)
1520: 61 20 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 a Tcl extension
1530: 75 73 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f using libraries/
1540: 69 6e 63 6c 75 64 65 73 20 66 72 6f 6d 20 61 6e includes from an
1550: 20 2a 69 6e 73 74 61 6c 6c 65 64 2a 20 54 63 6c *installed* Tcl
1560: 0d 0a 23 20 28 64 29 20 61 20 54 63 6c 20 65 78 ..# (d) a Tcl ex
1570: 74 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 tension using li
1580: 62 72 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 braries/includes
1590: 20 66 72 6f 6d 20 54 63 6c 20 73 6f 75 72 63 65 from Tcl source
15a0: 20 64 69 72 65 63 74 6f 72 79 0d 0a 23 0d 0a 23 directory..#..#
15b0: 20 54 68 69 73 20 6c 61 73 74 20 69 73 20 6e 65 This last is ne
15c0: 65 64 65 64 20 62 65 63 61 75 73 65 20 73 6f 6d eded because som
15d0: 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 73 74 69 e extensions sti
15e0: 6c 6c 20 6e 65 65 64 0d 0a 23 20 73 6f 6d 65 20 ll need..# some
15f0: 54 63 6c 20 69 6e 74 65 72 66 61 63 65 73 20 74 Tcl interfaces t
1600: 68 61 74 20 61 72 65 20 6e 6f 74 20 70 75 62 6c hat are not publ
1610: 69 63 6c 79 20 65 78 70 6f 73 65 64 2e 0d 0a 23 icly exposed...#
1620: 0d 0a 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74 ..# The fragment
1630: 20 77 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f will set the fo
1640: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0d llowing macros:.
1650: 0a 23 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f .# ROOT - root o
1660: 66 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f f this module so
1670: 75 72 63 65 73 0d 0a 23 20 43 4f 4d 50 41 54 44 urces..# COMPATD
1680: 49 52 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 IR - source dire
1690: 63 74 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 73 ctory that holds
16a0: 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 73 compatibility s
16b0: 6f 75 72 63 65 73 0d 0a 23 20 44 4f 43 44 49 52 ources..# DOCDIR
16c0: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 - source direct
16d0: 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64 ory containing d
16e0: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c ocumentation fil
16f0: 65 73 0d 0a 23 20 47 45 4e 45 52 49 43 44 49 52 es..# GENERICDIR
1700: 20 2d 20 70 6c 61 74 66 6f 72 6d 2d 69 6e 64 65 - platform-inde
1710: 70 65 6e 64 65 6e 74 20 73 6f 75 72 63 65 20 64 pendent source d
1720: 69 72 65 63 74 6f 72 79 0d 0a 23 20 57 49 4e 5f irectory..# WIN_
1730: 44 49 52 20 2d 20 57 69 6e 64 6f 77 73 2d 73 70 DIR - Windows-sp
1740: 65 63 69 66 69 63 20 73 6f 75 72 63 65 20 64 69 ecific source di
1750: 72 65 63 74 6f 72 79 0d 0a 23 20 54 45 53 54 44 rectory..# TESTD
1760: 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 IR - directory c
1770: 6f 6e 74 61 69 6e 69 6e 67 20 74 65 73 74 20 66 ontaining test f
1780: 69 6c 65 73 0d 0a 23 20 54 4f 4f 4c 53 44 49 52 iles..# TOOLSDIR
1790: 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e - directory con
17a0: 74 61 69 6e 69 6e 67 20 62 75 69 6c 64 20 74 6f taining build to
17b0: 6f 6c 73 0d 0a 23 20 5f 54 43 4c 44 49 52 20 2d ols..# _TCLDIR -
17c0: 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c root of the Tcl
17d0: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f 52 installation OR
17e0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 73 the Tcl sources
17f0: 2e 20 4e 6f 74 20 73 65 74 0d 0a 23 20 20 20 20 . Not set..#
1800: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 63 when building Tc
1810: 6c 20 69 74 73 65 6c 66 2e 0d 0a 23 20 5f 49 4e l itself...# _IN
1820: 53 54 41 4c 4c 44 49 52 20 2d 20 6e 61 74 69 76 STALLDIR - nativ
1830: 65 20 66 6f 72 6d 20 6f 66 20 74 68 65 20 69 6e e form of the in
1840: 73 74 61 6c 6c 61 74 69 6f 6e 20 70 61 74 68 2e stallation path.
1850: 20 46 6f 72 20 54 63 6c 0d 0a 23 20 20 20 20 74 For Tcl..# t
1860: 68 69 73 20 77 69 6c 6c 20 62 65 20 74 68 65 20 his will be the
1870: 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c 20 root of the Tcl
1880: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2e 20 46 6f installation. Fo
1890: 72 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 r extensions..#
18a0: 20 20 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 this will be
18b0: 74 68 65 20 6c 69 62 20 64 69 72 65 63 74 6f 72 the lib director
18c0: 79 20 75 6e 64 65 72 20 74 68 65 20 72 6f 6f 74 y under the root
18d0: 2e 0d 0a 23 20 54 43 4c 49 4e 53 54 41 4c 4c 20 ...# TCLINSTALL
18e0: 20 2d 20 73 65 74 20 74 6f 20 31 20 69 66 20 5f - set to 1 if _
18f0: 54 43 4c 44 49 52 20 72 65 66 65 72 73 20 74 6f TCLDIR refers to
1900: 0d 0a 23 20 20 20 20 68 65 61 64 65 72 73 20 61 ..# headers a
1910: 6e 64 20 6c 69 62 72 61 72 69 65 73 20 66 72 6f nd libraries fro
1920: 6d 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 m an installed T
1930: 63 6c 2c 20 61 6e 64 20 30 20 69 66 20 62 75 69 cl, and 0 if bui
1940: 6c 74 20 61 67 61 69 6e 73 74 0d 0a 23 20 20 20 lt against..#
1950: 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e 6f Tcl sources. No
1960: 74 20 73 65 74 20 77 68 65 6e 20 62 75 69 6c 64 t set when build
1970: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e 20 ing Tcl itself.
1980: 59 65 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 65 Yes, not very we
1990: 6c 6c 0d 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0d ll..# named..
19a0: 0a 23 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69 .# _TCL_H - nati
19b0: 76 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 ve path to the t
19c0: 63 6c 2e 68 20 66 69 6c 65 0d 0a 23 0d 0a 23 20 cl.h file..#..#
19d0: 49 66 20 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65 If Tk is involve
19e0: 64 2c 20 61 6c 73 6f 20 73 65 74 73 20 74 68 65 d, also sets the
19f0: 20 66 6f 6c 6c 6f 77 69 6e 67 0d 0a 23 20 5f 54 following..# _T
1a00: 4b 44 49 52 20 2d 20 6e 61 74 69 76 65 20 66 6f KDIR - native fo
1a10: 72 6d 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74 69 rm Tk installati
1a20: 6f 6e 20 4f 52 20 54 6b 20 73 6f 75 72 63 65 2e on OR Tk source.
1a30: 20 4e 6f 74 20 73 65 74 20 69 66 20 62 75 69 6c Not set if buil
1a40: 64 69 6e 67 0d 0a 23 20 20 20 20 54 6b 20 69 74 ding..# Tk it
1a50: 73 65 6c 66 2e 0d 0a 23 20 54 4b 49 4e 53 54 41 self...# TKINSTA
1a60: 4c 4c 20 2d 20 73 65 74 20 31 20 69 66 20 5f 54 LL - set 1 if _T
1a70: 4b 44 49 52 20 72 65 66 65 72 73 20 74 6f 20 69 KDIR refers to i
1a80: 6e 73 74 61 6c 6c 65 64 20 54 6b 20 61 6e 64 20 nstalled Tk and
1a90: 30 20 69 66 20 54 6b 20 73 6f 75 72 63 65 73 0d 0 if Tk sources.
1aa0: 0a 23 20 5f 54 4b 5f 48 20 2d 20 6e 61 74 69 76 .# _TK_H - nativ
1ab0: 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 6b e path to the tk
1ac0: 2e 68 20 66 69 6c 65 0d 0a 0d 0a 23 20 52 6f 6f .h file....# Roo
1ad0: 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 t directory for
1ae0: 73 6f 75 72 63 65 73 20 61 6e 64 20 61 73 73 75 sources and assu
1af0: 6d 65 64 20 73 75 62 64 69 72 65 63 74 6f 72 69 med subdirectori
1b00: 65 73 0d 0a 52 4f 4f 54 20 3d 20 24 28 4d 41 4b es..ROOT = $(MAK
1b10: 45 44 49 52 29 5c 2e 2e 0d 0a 23 20 54 68 65 20 EDIR)\....# The
1b20: 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 74 68 73 20 following paths
1b30: 43 41 4e 4e 4f 54 20 68 61 76 65 20 73 70 61 63 CANNOT have spac
1b40: 65 73 20 69 6e 20 74 68 65 6d 20 61 73 20 74 68 es in them as th
1b50: 65 79 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65 ey appear on the
1b60: 0d 0a 23 20 6c 65 66 74 20 73 69 64 65 20 6f 66 ..# left side of
1b70: 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 2e implicit rules.
1b80: 0d 0a 21 69 66 6e 64 65 66 20 43 4f 4d 50 41 54 ..!ifndef COMPAT
1b90: 44 49 52 0d 0a 43 4f 4d 50 41 54 44 49 52 09 3d DIR..COMPATDIR.=
1ba0: 20 24 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 74 0d $(ROOT)\compat.
1bb0: 0a 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 .!endif..!ifndef
1bc0: 20 44 4f 43 44 49 52 0d 0a 44 4f 43 44 49 52 09 DOCDIR..DOCDIR.
1bd0: 09 3d 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0d 0a .= $(ROOT)\doc..
1be0: 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 !endif..!ifndef
1bf0: 47 45 4e 45 52 49 43 44 49 52 0d 0a 47 45 4e 45 GENERICDIR..GENE
1c00: 52 49 43 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 RICDIR.= $(ROOT)
1c10: 5c 67 65 6e 65 72 69 63 0d 0a 21 65 6e 64 69 66 \generic..!endif
1c20: 0d 0a 21 69 66 6e 64 65 66 20 54 4f 4f 4c 53 44 ..!ifndef TOOLSD
1c30: 49 52 0d 0a 54 4f 4f 4c 53 44 49 52 09 3d 20 24 IR..TOOLSDIR.= $
1c40: 28 52 4f 4f 54 29 5c 74 6f 6f 6c 73 0d 0a 21 65 (ROOT)\tools..!e
1c50: 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 54 45 ndif..!ifndef TE
1c60: 53 54 44 49 52 0d 0a 54 45 53 54 44 49 52 09 3d STDIR..TESTDIR.=
1c70: 20 24 28 52 4f 4f 54 29 5c 74 65 73 74 73 0d 0a $(ROOT)\tests..
1c80: 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 !endif..!ifndef
1c90: 4c 49 42 44 49 52 0d 0a 21 69 66 20 65 78 69 73 LIBDIR..!if exis
1ca0: 74 28 22 24 28 52 4f 4f 54 29 5c 6c 69 62 72 61 t("$(ROOT)\libra
1cb0: 72 79 22 29 0d 0a 4c 49 42 44 49 52 20 20 20 20 ry")..LIBDIR
1cc0: 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 29 5c = $(ROOT)\
1cd0: 6c 69 62 72 61 72 79 0d 0a 21 65 6c 73 65 0d 0a library..!else..
1ce0: 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20 LIBDIR
1cf0: 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 0d 0a 21 = $(ROOT)\lib..!
1d00: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 endif..!endif..!
1d10: 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 52 0d 0a ifndef DEMODIR..
1d20: 21 69 66 20 65 78 69 73 74 28 22 24 28 4c 49 42 !if exist("$(LIB
1d30: 44 49 52 29 5c 64 65 6d 6f 73 22 29 0d 0a 44 45 DIR)\demos")..DE
1d40: 4d 4f 44 49 52 09 09 3d 20 24 28 4c 49 42 44 49 MODIR..= $(LIBDI
1d50: 52 29 5c 64 65 6d 6f 73 0d 0a 21 65 6c 73 65 0d R)\demos..!else.
1d60: 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 28 52 4f .DEMODIR..= $(RO
1d70: 4f 54 29 5c 64 65 6d 6f 73 0d 0a 21 65 6e 64 69 OT)\demos..!endi
1d80: 66 0d 0a 21 65 6e 64 69 66 20 23 20 69 66 6e 64 f..!endif # ifnd
1d90: 65 66 20 44 45 4d 4f 44 49 52 0d 0a 23 20 44 6f ef DEMODIR..# Do
1da0: 20 4e 4f 54 20 75 73 65 20 57 49 4e 44 49 52 20 NOT use WINDIR
1db0: 62 65 63 61 75 73 65 20 69 74 20 69 73 20 57 69 because it is Wi
1dc0: 6e 64 6f 77 73 20 69 6e 74 65 72 6e 61 6c 20 65 ndows internal e
1dd0: 6e 76 69 72 6f 6e 6d 65 6e 74 0d 0a 23 20 76 61 nvironment..# va
1de0: 72 69 61 62 6c 65 20 74 6f 20 70 6f 69 6e 74 20 riable to point
1df0: 74 6f 20 63 3a 5c 77 69 6e 64 6f 77 73 21 0d 0a to c:\windows!..
1e00: 57 49 4e 5f 44 49 52 09 09 3d 20 24 28 52 4f 4f WIN_DIR..= $(ROO
1e10: 54 29 5c 77 69 6e 0d 0a 0d 0a 21 69 66 6e 64 65 T)\win....!ifnde
1e20: 66 20 52 43 44 49 52 0d 0a 21 69 66 20 65 78 69 f RCDIR..!if exi
1e30: 73 74 28 22 24 28 57 49 4e 5f 44 49 52 29 5c 72 st("$(WIN_DIR)\r
1e40: 63 22 29 0d 0a 52 43 44 49 52 20 20 20 20 20 20 c")..RCDIR
1e50: 20 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 = $(WIN_DIR
1e60: 29 5c 72 63 0d 0a 21 65 6c 73 65 0d 0a 52 43 44 )\rc..!else..RCD
1e70: 49 52 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 IR = $
1e80: 28 57 49 4e 5f 44 49 52 29 0d 0a 21 65 6e 64 69 (WIN_DIR)..!endi
1e90: 66 0d 0a 21 65 6e 64 69 66 0d 0a 52 43 44 49 52 f..!endif..RCDIR
1ea0: 20 3d 20 24 28 52 43 44 49 52 3a 2f 3d 5c 29 0d = $(RCDIR:/=\).
1eb0: 0a 0d 0a 23 20 54 68 65 20 74 61 72 67 65 74 20 ...# The target
1ec0: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 directory where
1ed0: 74 68 65 20 62 75 69 6c 74 20 70 61 63 6b 61 67 the built packag
1ee0: 65 73 20 61 6e 64 20 62 69 6e 61 72 69 65 73 20 es and binaries
1ef0: 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65 will be installe
1f00: 64 2e 0d 0a 23 20 49 4e 53 54 41 4c 4c 44 49 52 d...# INSTALLDIR
1f10: 20 69 73 20 74 68 65 20 28 6f 70 74 69 6f 6e 61 is the (optiona
1f20: 6c 29 20 70 61 74 68 20 73 70 65 63 69 66 69 65 l) path specifie
1f30: 64 20 62 79 20 74 68 65 20 75 73 65 72 2e 0d 0a d by the user...
1f40: 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 73 # _INSTALLDIR is
1f50: 20 49 4e 53 54 41 4c 4c 44 49 52 20 75 73 69 6e INSTALLDIR usin
1f60: 67 20 74 68 65 20 62 61 63 6b 73 6c 61 73 68 20 g the backslash
1f70: 73 65 70 61 72 61 74 6f 72 20 73 79 6e 74 61 78 separator syntax
1f80: 0d 0a 21 69 66 64 65 66 20 49 4e 53 54 41 4c 4c ..!ifdef INSTALL
1f90: 44 49 52 0d 0a 23 23 23 20 46 69 78 20 74 68 65 DIR..### Fix the
1fa0: 20 70 61 74 68 20 73 65 70 61 72 61 74 6f 72 73 path separators
1fb0: 2e 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 09 3d ..._INSTALLDIR.=
1fc0: 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 3a 2f 3d $(INSTALLDIR:/=
1fd0: 5c 29 0d 0a 21 65 6c 73 65 0d 0a 23 23 23 20 41 \)..!else..### A
1fe0: 73 73 75 6d 65 20 74 68 65 20 6e 6f 72 6d 61 6c ssume the normal
1ff0: 20 64 65 66 61 75 6c 74 2e 0d 0a 5f 49 4e 53 54 default..._INST
2000: 41 4c 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 44 ALLDIR.= $(HOMED
2010: 52 49 56 45 29 5c 54 63 6c 0d 0a 21 65 6e 64 69 RIVE)\Tcl..!endi
2020: 66 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 f....!if $(DOING
2030: 5f 54 43 4c 29 0d 0a 0d 0a 23 20 42 45 47 49 4e _TCL)....# BEGIN
2040: 20 43 61 73 65 20 32 28 61 29 20 2d 20 42 75 69 Case 2(a) - Bui
2050: 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 lding Tcl itself
2060: 0d 0a 0d 0a 23 20 4f 6e 6c 79 20 6e 65 65 64 20 ....# Only need
2070: 74 6f 20 64 65 66 69 6e 65 20 5f 54 43 4c 5f 48 to define _TCL_H
2080: 0d 0a 5f 54 43 4c 5f 48 20 3d 20 2e 2e 5c 67 65 .._TCL_H = ..\ge
2090: 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a 0d 0a 23 neric\tcl.h....#
20a0: 20 45 4e 44 20 43 61 73 65 20 32 28 61 29 20 2d END Case 2(a) -
20b0: 20 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 Building Tcl it
20c0: 73 65 6c 66 0d 0a 0d 0a 21 65 6c 73 65 69 66 20 self....!elseif
20d0: 24 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 0d 0a 23 $(DOING_TK)....#
20e0: 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 62 29 BEGIN Case 2(b)
20f0: 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 6b 0d 0a - Building Tk..
2100: 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 30 ..TCLINSTALL = 0
2110: 20 23 20 54 6b 20 61 6c 77 61 79 73 20 62 75 69 # Tk always bui
2120: 6c 64 73 20 61 67 61 69 6e 73 74 20 54 63 6c 20 lds against Tcl
2130: 73 6f 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 69 source, not an i
2140: 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 21 69 nstalled Tcl..!i
2150: 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d f "$(TCLDIR)" ==
2160: 20 22 22 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 ""..!if [echo T
2170: 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 CLDIR = \> nmake
2180: 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20 7c hlp.out] \.. |
2190: 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 | [nmakehlp -L g
21a0: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 eneric\tcl.h >>
21b0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21 nmakehlp.out]..!
21c0: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
21d0: 6e 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 not locate Tcl s
21e0: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e ource directory.
21f0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75 ..!endif..!inclu
2200: 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d de nmakehlp.out.
2210: 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 44 49 52 .!endif # TCLDIR
2220: 20 3d 3d 20 22 22 0d 0a 0d 0a 5f 54 43 4c 44 49 == ""...._TCLDI
2230: 52 09 3d 20 24 28 54 43 4c 44 49 52 3a 2f 3d 5c R.= $(TCLDIR:/=\
2240: 29 0d 0a 5f 54 43 4c 5f 48 20 20 3d 20 24 28 5f ).._TCL_H = $(_
2250: 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 5c TCLDIR)\generic\
2260: 74 63 6c 2e 68 0d 0a 21 69 66 20 21 65 78 69 73 tcl.h..!if !exis
2270: 74 28 22 24 28 5f 54 43 4c 5f 48 29 22 29 0d 0a t("$(_TCL_H)")..
2280: 21 65 72 72 6f 72 20 43 6f 75 6c 64 20 6e 6f 74 !error Could not
2290: 20 6c 6f 63 61 74 65 20 74 63 6c 2e 68 2e 20 50 locate tcl.h. P
22a0: 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 54 43 lease set the TC
22b0: 4c 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 6f LDIR macro to po
22c0: 69 6e 74 20 74 6f 20 74 68 65 20 54 63 6c 20 2a int to the Tcl *
22d0: 73 6f 75 72 63 65 2a 20 64 69 72 65 63 74 6f 72 source* director
22e0: 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 5f 54 y...!endif...._T
22f0: 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 K_H = ..\generic
2300: 5c 74 6b 2e 68 0d 0a 0d 0a 23 20 45 4e 44 20 43 \tk.h....# END C
2310: 61 73 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 ase 2(b) - Build
2320: 69 6e 67 20 54 6b 0d 0a 0d 0a 21 65 6c 73 65 0d ing Tk....!else.
2330: 0a 0d 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 ...# BEGIN Case
2340: 32 28 63 29 20 6f 72 20 28 64 29 20 2d 20 42 75 2(c) or (d) - Bu
2350: 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 ilding an extens
2360: 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 ion other than T
2370: 6b 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d 6d 61 6e k....# If comman
2380: 64 20 6c 69 6e 65 20 68 61 73 20 73 70 65 63 69 d line has speci
2390: 66 69 65 64 20 54 63 6c 20 6c 6f 63 61 74 69 6f fied Tcl locatio
23a0: 6e 20 74 68 72 6f 75 67 68 20 54 43 4c 44 49 52 n through TCLDIR
23b0: 2c 20 75 73 65 20 69 74 0d 0a 23 20 65 6c 73 65 , use it..# else
23c0: 20 64 65 66 61 75 6c 74 20 74 6f 20 74 68 65 20 default to the
23d0: 49 4e 53 54 41 4c 4c 44 49 52 20 73 65 74 74 69 INSTALLDIR setti
23e0: 6e 67 0d 0a 21 69 66 20 22 24 28 54 43 4c 44 49 ng..!if "$(TCLDI
23f0: 52 29 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 43 R)" != ""...._TC
2400: 4c 44 49 52 09 3d 20 24 28 54 43 4c 44 49 52 3a LDIR.= $(TCLDIR:
2410: 2f 3d 5c 29 0d 0a 21 69 66 20 65 78 69 73 74 28 /=\)..!if exist(
2420: 22 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c "$(_TCLDIR)\incl
2430: 75 64 65 5c 74 63 6c 2e 68 22 29 20 23 20 43 61 ude\tcl.h") # Ca
2440: 73 65 20 32 28 63 29 20 77 69 74 68 20 54 43 4c se 2(c) with TCL
2450: 44 49 52 20 64 65 66 69 6e 65 64 0d 0a 54 43 4c DIR defined..TCL
2460: 49 4e 53 54 41 4c 4c 09 3d 20 31 0d 0a 5f 54 43 INSTALL.= 1.._TC
2470: 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 L_H = $
2480: 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 (_TCLDIR)\includ
2490: 65 5c 74 63 6c 2e 68 0d 0a 21 65 6c 73 65 69 66 e\tcl.h..!elseif
24a0: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 exist("$(_TCLDI
24b0: 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 R)\generic\tcl.h
24c0: 22 29 20 23 20 43 61 73 65 20 32 28 64 29 20 77 ") # Case 2(d) w
24d0: 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e ith TCLDIR defin
24e0: 65 64 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d ed..TCLINSTALL.=
24f0: 20 30 0d 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 0.._TCL_H
2500: 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 = $(_TCLDIR)
2510: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a \generic\tcl.h..
2520: 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6c 73 65 20 !endif....!else
2530: 20 23 20 20 23 20 43 61 73 65 20 32 28 63 29 20 # # Case 2(c)
2540: 66 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 77 for extensions w
2550: 69 74 68 20 54 43 4c 44 49 52 20 75 6e 64 65 66 ith TCLDIR undef
2560: 69 6e 65 64 0d 0a 0d 0a 23 20 4e 65 65 64 20 74 ined....# Need t
2570: 6f 20 6c 6f 63 61 74 65 20 54 63 6c 20 64 65 70 o locate Tcl dep
2580: 65 6e 64 69 6e 67 20 6f 6e 20 77 68 65 74 68 65 ending on whethe
2590: 72 20 69 74 20 6e 65 65 64 73 20 54 63 6c 20 73 r it needs Tcl s
25a0: 6f 75 72 63 65 20 6f 72 20 6e 6f 74 2e 0d 0a 23 ource or not...#
25b0: 20 49 66 20 77 65 20 64 6f 6e 27 74 2c 20 63 68 If we don't, ch
25c0: 65 63 6b 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 eck the INSTALLD
25d0: 49 52 20 66 6f 72 20 61 6e 20 69 6e 73 74 61 6c IR for an instal
25e0: 6c 65 64 20 54 63 6c 20 66 69 72 73 74 0d 0a 0d led Tcl first...
25f0: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 49 .!if exist("$(_I
2600: 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 NSTALLDIR)\inclu
2610: 64 65 5c 74 63 6c 2e 68 22 29 20 26 26 20 21 24 de\tcl.h") && !$
2620: 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 (NEED_TCL_SOURCE
2630: 29 0d 0a 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 )....TCLINSTALL.
2640: 3d 20 31 0d 0a 54 43 4c 44 49 52 20 20 20 20 20 = 1..TCLDIR
2650: 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c = $(_INSTAL
2660: 4c 44 49 52 29 5c 2e 2e 0d 0a 23 20 4e 4f 54 45 LDIR)\....# NOTE
2670: 3a 20 77 65 20 77 69 6c 6c 20 62 65 20 72 65 73 : we will be res
2680: 65 74 74 69 6e 67 20 5f 49 4e 53 54 41 4c 4c 44 etting _INSTALLD
2690: 49 52 20 74 6f 20 5f 49 4e 53 54 41 4c 4c 44 49 IR to _INSTALLDI
26a0: 52 2f 6c 69 62 20 66 6f 72 20 65 78 74 65 6e 73 R/lib for extens
26b0: 69 6f 6e 73 0d 0a 23 20 6c 61 74 65 72 20 73 6f ions..# later so
26c0: 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f 75 6e 74 the \.. account
26d0: 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 62 0d 0a s for the /lib..
26e0: 5f 54 43 4c 44 49 52 09 09 3d 20 24 28 5f 49 4e _TCLDIR..= $(_IN
26f0: 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54 STALLDIR)\...._T
2700: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 CL_H =
2710: 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 $(_TCLDIR)\inclu
2720: 64 65 5c 74 63 6c 2e 68 0d 0a 0d 0a 21 65 6c 73 de\tcl.h....!els
2730: 65 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 e # exist(...) &
2740: 26 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f & !$(NEED_TCL_SO
2750: 55 52 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 URCE)....!if [ec
2760: 68 6f 20 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20 ho _TCLDIR = \>
2770: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d nmakehlp.out] \.
2780: 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 . || [nmakehlp
2790: 20 2d 4c 20 67 65 6e 65 72 69 63 5c 74 63 6c 2e -L generic\tcl.
27a0: 68 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 h >> nmakehlp.ou
27b0: 74 5d 0d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 t]..!error *** C
27c0: 6f 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 ould not locate
27d0: 54 63 6c 20 73 6f 75 72 63 65 20 64 69 72 65 63 Tcl source direc
27e0: 74 6f 72 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 tory...!endif..!
27f0: 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 include nmakehlp
2800: 2e 6f 75 74 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c .out..TCLINSTALL
2810: 20 20 20 20 20 20 3d 20 30 0d 0a 54 43 4c 44 49 = 0..TCLDI
2820: 52 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 R = $(_T
2830: 43 4c 44 49 52 29 0d 0a 5f 54 43 4c 5f 48 20 20 CLDIR).._TCL_H
2840: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c = $(_TCL
2850: 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c DIR)\generic\tcl
2860: 2e 68 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 65 .h....!endif # e
2870: 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28 xist(...) && !$(
2880: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 NEED_TCL_SOURCE)
2890: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c ....!endif # TCL
28a0: 44 49 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f DIR....!ifndef _
28b0: 54 43 4c 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 TCL_H..MSG =^..F
28c0: 61 69 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 63 ailed to find tc
28d0: 6c 2e 68 2e 20 54 68 65 20 54 43 4c 44 49 52 20 l.h. The TCLDIR
28e0: 6d 61 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63 macro is set inc
28f0: 6f 72 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e orrectly or is n
2900: 6f 74 20 73 65 74 20 61 6e 64 20 64 65 66 61 75 ot set and defau
2910: 6c 74 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 lt path does not
2920: 20 63 6f 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0d contain tcl.h..
2930: 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a .!error $(MSG)..
2940: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 4e 6f 77 20 !endif....# Now
2950: 64 6f 20 74 68 65 20 73 61 6d 65 20 74 6f 20 6c do the same to l
2960: 6f 63 61 74 65 20 54 6b 20 68 65 61 64 65 72 73 ocate Tk headers
2970: 20 61 6e 64 20 6c 69 62 73 20 69 66 20 70 72 6f and libs if pro
2980: 6a 65 63 74 20 72 65 71 75 69 72 65 73 20 54 6b ject requires Tk
2990: 0d 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29 ..!if $(NEED_TK)
29a0: 0d 0a 0d 0a 21 69 66 20 22 24 28 54 4b 44 49 52 ....!if "$(TKDIR
29b0: 29 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 4b 44 )" != ""...._TKD
29c0: 49 52 20 3d 20 24 28 54 4b 44 49 52 3a 2f 3d 5c IR = $(TKDIR:/=\
29d0: 29 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 )..!if exist("$(
29e0: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c _TKDIR)\include\
29f0: 74 6b 2e 68 22 29 0d 0a 54 4b 49 4e 53 54 41 4c tk.h")..TKINSTAL
2a00: 4c 20 20 20 20 20 20 3d 20 31 0d 0a 5f 54 4b 5f L = 1.._TK_
2a10: 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f H = $(_
2a20: 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 TKDIR)\include\t
2a30: 6b 2e 68 0d 0a 21 65 6c 73 65 69 66 20 65 78 69 k.h..!elseif exi
2a40: 73 74 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 st("$(_TKDIR)\ge
2a50: 6e 65 72 69 63 5c 74 6b 2e 68 22 29 0d 0a 54 4b neric\tk.h")..TK
2a60: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 INSTALL = 0
2a70: 0d 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 .._TK_H
2a80: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e = $(_TKDIR)\gen
2a90: 65 72 69 63 5c 74 6b 2e 68 0d 0a 21 65 6e 64 69 eric\tk.h..!endi
2aa0: 66 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 54 4b 44 f....!else # TKD
2ab0: 49 52 20 6e 6f 74 20 64 65 66 69 6e 65 64 0d 0a IR not defined..
2ac0: 0d 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 61 ..# Need to loca
2ad0: 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e 67 te Tcl depending
2ae0: 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 6e on whether it n
2af0: 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 20 eeds Tcl source
2b00: 6f 72 20 6e 6f 74 2e 0d 0a 23 20 49 66 20 77 65 or not...# If we
2b10: 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 don't, check th
2b20: 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 e INSTALLDIR for
2b30: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
2b40: 6c 20 66 69 72 73 74 0d 0a 0d 0a 21 69 66 20 65 l first....!if e
2b50: 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c xist("$(_INSTALL
2b60: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e DIR)\include\tk.
2b70: 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 h") && !$(NEED_T
2b80: 4b 5f 53 4f 55 52 43 45 29 0d 0a 0d 0a 54 4b 49 K_SOURCE)....TKI
2b90: 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0d NSTALL = 1.
2ba0: 0a 23 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c .# NOTE: we will
2bb0: 20 62 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49 be resetting _I
2bc0: 4e 53 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e NSTALLDIR to _IN
2bd0: 53 54 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 STALLDIR/lib for
2be0: 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 6c extensions..# l
2bf0: 61 74 65 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20 ater so the \..
2c00: 61 63 63 6f 75 6e 74 73 20 66 6f 72 20 74 68 65 accounts for the
2c10: 20 2f 6c 69 62 0d 0a 5f 54 4b 44 49 52 20 20 20 /lib.._TKDIR
2c20: 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 = $(_INSTA
2c30: 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54 4b 5f 48 LLDIR)\...._TK_H
2c40: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2c50: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b KDIR)\include\tk
2c60: 2e 68 0d 0a 54 4b 44 49 52 20 20 20 20 20 20 20 .h..TKDIR
2c70: 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0d 0a = $(_TKDIR)..
2c80: 0d 0a 21 65 6c 73 65 20 23 20 65 78 69 73 74 28 ..!else # exist(
2c90: 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c "$(_INSTALLDIR)\
2ca0: 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 include\tk.h") &
2cb0: 26 20 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 & !$(NEED_TK_SOU
2cc0: 52 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 68 RCE)....!if [ech
2cd0: 6f 20 5f 54 4b 44 49 52 20 3d 20 5c 3e 20 6e 6d o _TKDIR = \> nm
2ce0: 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 akehlp.out] \..
2cf0: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d || [nmakehlp -
2d00: 4c 20 67 65 6e 65 72 69 63 5c 74 6b 2e 68 20 3e L generic\tk.h >
2d10: 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d > nmakehlp.out].
2d20: 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c .!error *** Coul
2d30: 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 54 6b 20 d not locate Tk
2d40: 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 source directory
2d50: 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c ...!endif..!incl
2d60: 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 ude nmakehlp.out
2d70: 0d 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 ..TKINSTALL
2d80: 20 3d 20 30 0d 0a 54 4b 44 49 52 20 20 20 20 20 = 0..TKDIR
2d90: 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 = $(_TKDIR)
2da0: 0d 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 .._TK_H
2db0: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e = $(_TKDIR)\gen
2dc0: 65 72 69 63 5c 74 6b 2e 68 0d 0a 0d 0a 21 65 6e eric\tk.h....!en
2dd0: 64 69 66 20 23 20 65 78 69 73 74 28 22 24 28 5f dif # exist("$(_
2de0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c INSTALLDIR)\incl
2df0: 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 ude\tk.h") && !$
2e00: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 (NEED_TK_SOURCE)
2e10: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 4b 44 ....!endif # TKD
2e20: 49 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f 54 IR....!ifndef _T
2e30: 4b 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 61 69 K_H..MSG =^..Fai
2e40: 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68 led to find tk.h
2e50: 2e 20 54 68 65 20 54 4b 44 49 52 20 6d 61 63 72 . The TKDIR macr
2e60: 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 72 65 o is set incorre
2e70: 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 ctly or is not s
2e80: 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 20 70 et and default p
2e90: 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e ath does not con
2ea0: 74 61 69 6e 20 74 6b 2e 68 2e 0d 0a 21 65 72 72 tain tk.h...!err
2eb0: 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 or $(MSG)..!endi
2ec0: 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 4e 45 f....!endif # NE
2ed0: 45 44 5f 54 4b 0d 0a 0d 0a 21 69 66 20 24 28 4e ED_TK....!if $(N
2ee0: 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 20 EED_TCL_SOURCE)
2ef0: 26 26 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 && $(TCLINSTALL)
2f00: 0d 0a 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57 ..MSG = ^..*** W
2f10: 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 arning: This ext
2f20: 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 ension requires
2f30: 74 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 the source distr
2f40: 69 62 75 74 69 6f 6e 20 6f 66 20 54 63 6c 2e 5e ibution of Tcl.^
2f50: 0d 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 ..*** Please set
2f60: 20 74 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 the TCLDIR macr
2f70: 6f 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 o to point to th
2f80: 65 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 0d 0a e Tcl sources...
2f90: 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 !error $(MSG)..!
2fa0: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 4e endif....!if $(N
2fb0: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a EED_TK_SOURCE)..
2fc0: 21 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 !if $(TKINSTALL)
2fd0: 0d 0a 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57 ..MSG = ^..*** W
2fe0: 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 arning: This ext
2ff0: 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 ension requires
3000: 74 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 the source distr
3010: 69 62 75 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0d ibution of Tk.^.
3020: 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 20 .*** Please set
3030: 74 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 the TKDIR macro
3040: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 to point to the
3050: 54 6b 20 73 6f 75 72 63 65 73 2e 0d 0a 21 65 72 Tk sources...!er
3060: 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 ror $(MSG)..!end
3070: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a if..!endif......
3080: 23 20 49 66 20 49 4e 53 54 41 4c 4c 44 49 52 20 # If INSTALLDIR
3090: 73 65 74 20 74 6f 20 54 63 6c 20 69 6e 73 74 61 set to Tcl insta
30a0: 6c 6c 61 74 69 6f 6e 20 72 6f 6f 74 20 64 69 72 llation root dir
30b0: 20 74 68 65 6e 20 72 65 73 65 74 20 74 6f 20 74 then reset to t
30c0: 68 65 0d 0a 23 20 6c 69 62 20 64 69 72 20 66 6f he..# lib dir fo
30d0: 72 20 69 6e 73 74 61 6c 6c 69 6e 67 20 65 78 74 r installing ext
30e0: 65 6e 73 69 6f 6e 73 0d 0a 21 69 66 20 65 78 69 ensions..!if exi
30f0: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 st("$(_INSTALLDI
3100: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 R)\include\tcl.h
3110: 22 29 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 3d ").._INSTALLDIR=
3120: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c $(_INSTALLDIR)\l
3130: 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 ib..!endif....#
3140: 45 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f 72 END Case 2(c) or
3150: 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 (d) - Building
3160: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 21 65 an extension..!e
3170: 6e 64 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e ndif # if $(DOIN
3180: 47 5f 54 43 4c 29 0d 0a 0d 0a 23 23 23 23 23 23 G_TCL)....######
3190: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
31a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
31b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
31c0: 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 33 2e ##########..# 3.
31d0: 20 44 65 74 65 72 6d 69 6e 65 20 63 6f 6d 70 69 Determine compi
31e0: 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 ler version and
31f0: 61 72 63 68 69 74 65 63 74 75 72 65 0d 0a 23 20 architecture..#
3200: 49 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e 2c In this section,
3210: 20 77 65 20 66 69 67 75 72 65 20 6f 75 74 20 74 we figure out t
3220: 68 65 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 73 he compiler vers
3230: 69 6f 6e 20 61 6e 64 20 74 68 65 0d 0a 23 20 61 ion and the..# a
3240: 72 63 68 69 74 65 63 74 75 72 65 20 66 6f 72 20 rchitecture for
3250: 77 68 69 63 68 20 77 65 20 61 72 65 20 62 75 69 which we are bui
3260: 6c 64 69 6e 67 2e 20 54 68 69 73 20 73 65 74 73 lding. This sets
3270: 20 74 68 65 0d 0a 23 20 66 6f 6c 6c 6f 77 69 6e the..# followin
3280: 67 20 6d 61 63 72 6f 73 3a 0d 0a 23 20 56 43 56 g macros:..# VCV
3290: 45 52 53 49 4f 4e 20 2d 20 74 68 65 20 69 6e 74 ERSION - the int
32a0: 65 72 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 76 ernal compiler v
32b0: 65 72 73 69 6f 6e 20 61 73 20 31 32 30 30 2c 20 ersion as 1200,
32c0: 31 34 30 30 2c 20 31 39 31 30 20 65 74 63 2e 0d 1400, 1910 etc..
32d0: 0a 23 20 20 20 20 20 54 68 69 73 20 69 73 20 61 .# This is a
32e0: 6c 73 6f 20 70 72 69 6e 74 65 64 20 62 79 20 74 lso printed by t
32f0: 68 65 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 64 he compiler in d
3300: 6f 74 74 65 64 20 66 6f 72 6d 20 31 39 2e 31 30 otted form 19.10
3310: 20 65 74 63 2e 0d 0a 23 20 56 43 56 45 52 20 2d etc...# VCVER -
3320: 20 74 68 65 20 22 6d 61 72 6b 65 74 69 6e 67 20 the "marketing
3330: 76 65 72 73 69 6f 6e 22 2c 20 66 6f 72 20 65 78 version", for ex
3340: 61 6d 70 6c 65 20 56 69 73 75 61 6c 20 43 2b 2b ample Visual C++
3350: 20 36 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 0d 6 for internal.
3360: 0a 23 20 20 20 20 20 63 6f 6d 70 69 6c 65 72 20 .# compiler
3370: 76 65 72 73 69 6f 6e 20 31 32 30 30 2e 20 54 68 version 1200. Th
3380: 69 73 20 69 73 20 6b 65 70 74 20 6f 6e 6c 79 20 is is kept only
3390: 66 6f 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f for legacy reaso
33a0: 6e 73 20 61 73 20 69 74 0d 0a 23 20 20 20 20 20 ns as it..#
33b0: 64 6f 65 73 20 6e 6f 74 20 6d 61 6b 65 20 73 65 does not make se
33c0: 6e 73 65 20 66 6f 72 20 72 65 63 65 6e 74 20 4d nse for recent M
33d0: 69 63 72 6f 73 6f 66 74 20 63 6f 6d 70 69 6c 65 icrosoft compile
33e0: 72 73 2e 20 4f 6e 6c 79 20 75 73 65 64 20 66 6f rs. Only used fo
33f0: 72 0d 0a 23 20 20 20 20 20 6f 75 74 70 75 74 20 r..# output
3400: 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 73 2e directory names.
3410: 0d 0a 23 20 41 52 43 48 20 2d 20 73 65 74 20 74 ..# ARCH - set t
3420: 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 o IX86, ARM64 or
3430: 20 41 4d 44 36 34 20 64 65 70 65 6e 64 69 6e 67 AMD64 depending
3440: 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 2d 62 69 on 32- or 64-bi
3450: 74 20 74 61 72 67 65 74 0d 0a 23 20 4e 41 54 49 t target..# NATI
3460: 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 74 6f VE_ARCH - set to
3470: 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 20 IX86, ARM64 or
3480: 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 68 6f AMD64 for the ho
3490: 73 74 20 6d 61 63 68 69 6e 65 0d 0a 23 20 4d 41 st machine..# MA
34a0: 43 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20 CHINE - same as
34b0: 24 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79 $(ARCH) - legacy
34c0: 0d 0a 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 ..# _VC_MANIFEST
34d0: 5f 45 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d _EMBED_{DLL,EXE}
34e0: 20 2d 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 - commands for
34f0: 65 6d 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 embedding a mani
3500: 66 65 73 74 20 69 66 20 6e 65 65 64 65 64 0d 0a fest if needed..
3510: 0d 0a 63 63 33 32 09 09 3d 20 24 28 43 43 29 20 ..cc32..= $(CC)
3520: 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 # built-in def
3530: 61 75 6c 74 2e 0d 0a 6c 69 6e 6b 33 32 09 09 3d ault...link32..=
3540: 20 6c 69 6e 6b 0d 0a 6c 69 62 33 32 09 09 3d 20 link..lib32..=
3550: 6c 69 62 0d 0a 72 63 33 32 09 09 3d 20 24 28 52 lib..rc32..= $(R
3560: 43 29 20 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 C) # built-in
3570: 64 65 66 61 75 6c 74 2e 0d 0a 0d 0a 23 2d 2d 2d default.....#---
3580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
35a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
35b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 -------------..#
35c0: 20 46 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 Figure out the
35d0: 63 6f 6d 70 69 6c 65 72 20 61 72 63 68 69 74 65 compiler archite
35e0: 63 74 75 72 65 20 61 6e 64 20 76 65 72 73 69 6f cture and versio
35f0: 6e 20 62 79 20 77 72 69 74 69 6e 67 0d 0a 23 20 n by writing..#
3600: 74 68 65 20 43 20 6d 61 63 72 6f 73 20 74 6f 20 the C macros to
3610: 61 20 66 69 6c 65 2c 20 70 72 65 70 72 6f 63 65 a file, preproce
3620: 73 73 69 6e 67 20 74 68 65 6d 20 77 69 74 68 20 ssing them with
3630: 74 68 65 20 43 0d 0a 23 20 70 72 65 70 72 6f 63 the C..# preproc
3640: 65 73 73 6f 72 20 61 6e 64 20 72 65 61 64 69 6e essor and readin
3650: 67 20 62 61 63 6b 20 74 68 65 20 63 72 65 61 74 g back the creat
3660: 65 64 20 66 69 6c 65 0d 0a 0d 0a 5f 48 41 53 48 ed file...._HASH
3670: 3d 5e 23 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 =^#.._VC_MANIFES
3680: 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0d 0a 5f 56 T_EMBED_EXE=.._V
3690: 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 C_MANIFEST_EMBED
36a0: 5f 44 4c 4c 3d 0d 0a 56 43 56 45 52 3d 30 0d 0a _DLL=..VCVER=0..
36b0: 21 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 !if ![echo VCVER
36c0: 53 49 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 SION=_MSC_VER >
36d0: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 vercl.x] \..
36e0: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 && ![echo $(_HAS
36f0: 48 29 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f H)if defined(_M_
3700: 49 58 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 IX86) >> vercl.x
3710: 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 ] \.. && ![ec
3720: 68 6f 20 41 52 43 48 3d 49 58 38 36 20 3e 3e 20 ho ARCH=IX86 >>
3730: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 vercl.x] \..
3740: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 && ![echo $(_HAS
3750: 48 29 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f H)elif defined(_
3760: 4d 5f 41 4d 44 36 34 29 20 3e 3e 20 76 65 72 63 M_AMD64) >> verc
3770: 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21 l.x] \.. && !
3780: 5b 65 63 68 6f 20 41 52 43 48 3d 41 4d 44 36 34 [echo ARCH=AMD64
3790: 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a >> vercl.x] \..
37a0: 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28 && ![echo $(
37b0: 5f 48 41 53 48 29 65 6c 69 66 20 64 65 66 69 6e _HASH)elif defin
37c0: 65 64 28 5f 4d 5f 41 52 4d 36 34 29 20 3e 3e 20 ed(_M_ARM64) >>
37d0: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 vercl.x] \..
37e0: 26 26 20 21 5b 65 63 68 6f 20 41 52 43 48 3d 41 && ![echo ARCH=A
37f0: 52 4d 36 34 20 3e 3e 20 76 65 72 63 6c 2e 78 5d RM64 >> vercl.x]
3800: 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 68 \.. && ![ech
3810: 6f 20 24 28 5f 48 41 53 48 29 65 6e 64 69 66 20 o $(_HASH)endif
3820: 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 >> vercl.x] \..
3830: 20 20 20 26 26 20 21 5b 24 28 63 63 33 32 29 20 && ![$(cc32)
3840: 2d 6e 6f 6c 6f 67 6f 20 2d 54 43 20 2d 50 20 76 -nologo -TC -P v
3850: 65 72 63 6c 2e 78 20 32 3e 4e 55 4c 5d 0d 0a 21 ercl.x 2>NUL]..!
3860: 69 6e 63 6c 75 64 65 20 76 65 72 63 6c 2e 69 0d include vercl.i.
3870: 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e .!if $(VCVERSION
3880: 29 20 3c 20 31 39 30 30 0d 0a 21 69 66 20 21 5b ) < 1900..!if ![
3890: 65 63 68 6f 20 56 43 56 45 52 3d 20 5e 5c 3e 20 echo VCVER= ^\>
38a0: 76 65 72 63 6c 2e 76 63 5d 20 5c 0d 0a 20 20 20 vercl.vc] \..
38b0: 20 26 26 20 21 5b 73 65 74 20 2f 61 20 24 28 56 && ![set /a $(V
38c0: 43 56 45 52 53 49 4f 4e 29 20 2f 20 31 30 30 20 CVERSION) / 100
38d0: 2d 20 36 20 3e 3e 20 76 65 72 63 6c 2e 76 63 5d - 6 >> vercl.vc]
38e0: 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 63 6c ..!include vercl
38f0: 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c .vc..!endif..!el
3900: 73 65 0d 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 se..# The simple
3910: 20 63 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f calculation abo
3920: 76 65 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c ve does not appl
3930: 79 20 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 y to new Visual
3940: 53 74 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0d Studio releases.
3950: 0a 23 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 .# Keep the comp
3960: 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 iler version in
3970: 69 74 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e its native form.
3980: 0d 0a 56 43 56 45 52 20 3d 20 24 28 56 43 56 45 ..VCVER = $(VCVE
3990: 52 53 49 4f 4e 29 0d 0a 21 65 6e 64 69 66 0d 0a RSION)..!endif..
39a0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 21 5b !endif....!if ![
39b0: 64 65 6c 20 32 3e 4e 55 4c 20 2f 71 2f 66 20 76 del 2>NUL /q/f v
39c0: 65 72 63 6c 2e 78 20 76 65 72 63 6c 2e 69 20 76 ercl.x vercl.i v
39d0: 65 72 63 6c 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 ercl.vc]..!endif
39e0: 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ....#-----------
39f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a20: 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20 4d 41 43 -----..# The MAC
3a30: 48 49 4e 45 20 6d 61 63 72 6f 20 69 73 20 75 73 HINE macro is us
3a40: 65 64 20 62 79 20 6c 65 67 61 63 79 20 6d 61 6b ed by legacy mak
3a50: 65 66 69 6c 65 73 20 73 6f 20 73 65 74 20 69 74 efiles so set it
3a60: 20 61 73 20 77 65 6c 6c 0d 0a 21 69 66 64 65 66 as well..!ifdef
3a70: 20 4d 41 43 48 49 4e 45 0d 0a 21 69 66 20 22 24 MACHINE..!if "$
3a80: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 (MACHINE)" == "x
3a90: 38 36 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 48 86"..!undef MACH
3aa0: 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 49 INE..MACHINE = I
3ab0: 58 38 36 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 X86..!elseif "$(
3ac0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72 MACHINE)" == "ar
3ad0: 6d 36 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 m64"..!undef MAC
3ae0: 48 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 HINE..MACHINE =
3af0: 41 52 4d 36 34 0d 0a 21 65 6c 73 65 69 66 20 22 ARM64..!elseif "
3b00: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
3b10: 78 36 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 x64"..!undef MAC
3b20: 48 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 HINE..MACHINE =
3b30: 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66 0d 0a 21 AMD64..!endif..!
3b40: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
3b50: 21 3d 20 22 24 28 41 52 43 48 29 22 0d 0a 21 65 != "$(ARCH)"..!e
3b60: 72 72 6f 72 20 53 70 65 63 69 66 69 65 64 20 4d rror Specified M
3b70: 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 24 28 4d ACHINE macro $(M
3b80: 41 43 48 49 4e 45 29 20 64 6f 65 73 20 6e 6f 74 ACHINE) does not
3b90: 20 6d 61 74 63 68 20 64 65 74 65 63 74 65 64 20 match detected
3ba0: 74 61 72 67 65 74 20 61 72 63 68 69 74 65 63 74 target architect
3bb0: 75 72 65 20 24 28 41 52 43 48 29 2e 0d 0a 21 65 ure $(ARCH)...!e
3bc0: 6e 64 69 66 0d 0a 21 65 6c 73 65 0d 0a 4d 41 43 ndif..!else..MAC
3bd0: 48 49 4e 45 3d 24 28 41 52 43 48 29 0d 0a 21 65 HINE=$(ARCH)..!e
3be0: 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d ndif....#-------
3bf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c20: 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20 --------..# The
3c30: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 PLATFORM_IDENTIF
3c40: 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 20 Y macro matches
3c50: 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 75 72 the values retur
3c60: 6e 65 64 20 62 79 0d 0a 23 20 74 68 65 20 54 63 ned by..# the Tc
3c70: 6c 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e l platform::iden
3c80: 74 69 66 79 20 63 6f 6d 6d 61 6e 64 0d 0a 21 69 tify command..!i
3c90: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3ca0: 3d 20 22 41 4d 44 36 34 22 0d 0a 50 4c 41 54 46 = "AMD64"..PLATF
3cb0: 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 ORM_IDENTIFY = w
3cc0: 69 6e 33 32 2d 78 38 36 5f 36 34 0d 0a 21 65 6c in32-x86_64..!el
3cd0: 73 65 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 seif "$(MACHINE)
3ce0: 22 20 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 50 4c " == "ARM64"..PL
3cf0: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 ATFORM_IDENTIFY
3d00: 3d 20 77 69 6e 33 32 2d 61 72 6d 0d 0a 21 65 6c = win32-arm..!el
3d10: 73 65 0d 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45 se..PLATFORM_IDE
3d20: 4e 54 49 46 59 20 3d 20 77 69 6e 33 32 2d 69 78 NTIFY = win32-ix
3d30: 38 36 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 86..!endif....#
3d40: 54 68 65 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 The MULTIPLATFOR
3d50: 4d 20 6d 61 63 72 6f 20 63 6f 6e 74 72 6f 6c 73 M macro controls
3d60: 20 77 68 65 74 68 65 72 20 62 69 6e 61 72 79 20 whether binary
3d70: 65 78 74 65 6e 73 69 6f 6e 73 20 61 72 65 20 69 extensions are i
3d80: 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 69 6e 20 70 nstalled..# in p
3d90: 6c 61 74 66 6f 72 6d 2d 73 70 65 63 69 66 69 63 latform-specific
3da0: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 20 49 6e directories. In
3db0: 74 65 6e 64 65 64 20 74 6f 20 62 65 20 73 65 74 tended to be set
3dc0: 2f 75 73 65 64 20 62 79 20 65 78 74 65 6e 73 69 /used by extensi
3dd0: 6f 6e 73 2e 0d 0a 21 69 66 6e 64 65 66 20 4d 55 ons...!ifndef MU
3de0: 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 LTIPLATFORM_INST
3df0: 41 4c 4c 0d 0a 4d 55 4c 54 49 50 4c 41 54 46 4f ALL..MULTIPLATFO
3e00: 52 4d 5f 49 4e 53 54 41 4c 4c 20 3d 20 30 0d 0a RM_INSTALL = 0..
3e10: 21 65 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d !endif....#-----
3e20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3e50: 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 46 69 67 75 72 -------..# Figur
3e60: 65 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a e out the *host*
3e70: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 62 79 architecture by
3e80: 20 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 67 reading the reg
3e90: 69 73 74 72 79 0d 0a 0d 0a 21 69 66 20 21 5b 72 istry....!if ![r
3ea0: 65 67 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 eg query HKLM\Ha
3eb0: 72 64 77 61 72 65 5c 44 65 73 63 72 69 70 74 69 rdware\Descripti
3ec0: 6f 6e 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 on\System\Centra
3ed0: 6c 50 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 lProcessor\0 /v
3ee0: 49 64 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e Identifier | fin
3ef0: 64 73 74 72 20 2f 69 20 78 38 36 5d 0d 0a 4e 41 dstr /i x86]..NA
3f00: 54 49 56 45 5f 41 52 43 48 3d 49 58 38 36 0d 0a TIVE_ARCH=IX86..
3f10: 21 65 6c 73 65 69 66 20 21 5b 72 65 67 20 71 75 !elseif ![reg qu
3f20: 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 77 61 72 ery HKLM\Hardwar
3f30: 65 5c 44 65 73 63 72 69 70 74 69 6f 6e 5c 53 79 e\Description\Sy
3f40: 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 72 6f 63 stem\CentralProc
3f50: 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 65 6e 74 essor\0 /v Ident
3f60: 69 66 69 65 72 20 7c 20 66 69 6e 64 73 74 72 20 ifier | findstr
3f70: 2f 69 20 41 52 4d 20 7c 20 66 69 6e 64 73 74 72 /i ARM | findstr
3f80: 20 2f 69 20 36 34 2d 62 69 74 5d 0d 0a 4e 41 54 /i 64-bit]..NAT
3f90: 49 56 45 5f 41 52 43 48 3d 41 52 4d 36 34 0d 0a IVE_ARCH=ARM64..
3fa0: 21 65 6c 73 65 0d 0a 4e 41 54 49 56 45 5f 41 52 !else..NATIVE_AR
3fb0: 43 48 3d 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66 CH=AMD64..!endif
3fc0: 0d 0a 0d 0a 23 20 53 69 6e 63 65 20 4d 53 56 43 ....# Since MSVC
3fd0: 38 20 77 65 20 6d 75 73 74 20 64 65 61 6c 20 77 8 we must deal w
3fe0: 69 74 68 20 6d 61 6e 69 66 65 73 74 20 72 65 73 ith manifest res
3ff0: 6f 75 72 63 65 73 2e 0d 0a 21 69 66 20 24 28 56 ources...!if $(V
4000: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 34 30 CVERSION) >= 140
4010: 30 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 0.._VC_MANIFEST_
4020: 45 4d 42 45 44 5f 45 58 45 3d 69 66 20 65 78 69 EMBED_EXE=if exi
4030: 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 6d st $@.manifest m
4040: 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66 t -nologo -manif
4050: 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 est $@.manifest
4060: 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 63 65 3a -outputresource:
4070: 24 40 3b 31 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 $@;1.._VC_MANIFE
4080: 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d 69 66 20 ST_EMBED_DLL=if
4090: 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 exist $@.manifes
40a0: 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 t mt -nologo -ma
40b0: 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 nifest $@.manife
40c0: 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 st -outputresour
40d0: 63 65 3a 24 40 3b 32 0d 0a 21 65 6e 64 69 66 0d ce:$@;2..!endif.
40e0: 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
40f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4100: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4110: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4120: 23 23 23 0d 0a 23 20 34 2e 20 42 75 69 6c 64 20 ###..# 4. Build
4130: 74 68 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f the nmakehlp pro
4140: 67 72 61 6d 0d 0a 23 20 54 68 69 73 20 69 73 20 gram..# This is
4150: 61 20 68 65 6c 70 65 72 20 61 70 70 20 77 65 20 a helper app we
4160: 6e 65 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 need to overcome
4170: 20 6e 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e nmake's limitin
4180: 67 0d 0a 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 g..# environment
4190: 2e 20 57 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f . We will call o
41a0: 75 74 20 74 6f 20 69 74 20 74 6f 20 67 65 74 20 ut to it to get
41b0: 76 61 72 69 6f 75 73 20 62 69 74 73 20 6f 66 0d various bits of.
41c0: 0a 23 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 .# information a
41d0: 62 6f 75 74 20 73 75 70 70 6f 72 74 65 64 20 63 bout supported c
41e0: 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 ompiler options
41f0: 65 74 63 2e 0d 0a 23 0d 0a 23 20 54 63 6c 20 69 etc...#..# Tcl i
4200: 74 73 65 6c 66 20 77 69 6c 6c 20 61 6c 77 61 79 tself will alway
4210: 73 20 75 73 65 20 74 68 65 20 6e 6d 61 6b 65 68 s use the nmakeh
4220: 6c 70 2e 63 20 70 72 6f 67 72 61 6d 20 77 68 69 lp.c program whi
4230: 63 68 20 69 73 0d 0a 23 20 69 6e 20 69 74 73 20 ch is..# in its
4240: 6f 77 6e 20 73 6f 75 72 63 65 2e 20 49 74 20 77 own source. It w
4250: 69 6c 6c 20 62 65 20 6b 65 70 74 20 75 70 64 61 ill be kept upda
4260: 74 65 64 20 74 68 65 72 65 2e 0d 0a 23 0d 0a 23 ted there...#..#
4270: 20 45 78 74 65 6e 73 69 6f 6e 73 20 62 75 69 6c Extensions buil
4280: 74 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 t against an ins
4290: 74 61 6c 6c 65 64 20 54 63 6c 20 77 69 6c 6c 20 talled Tcl will
42a0: 75 73 65 20 74 68 65 20 69 6e 73 74 61 6c 6c 65 use the installe
42b0: 64 0d 0a 23 20 63 6f 70 79 20 6f 66 20 54 63 6c d..# copy of Tcl
42c0: 27 73 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 69 66 's nmakehlp.c if
42d0: 20 74 68 65 72 65 20 69 73 20 6f 6e 65 20 61 6e there is one an
42e0: 64 20 74 68 65 69 72 20 6f 77 6e 20 76 65 72 73 d their own vers
42f0: 69 6f 6e 0d 0a 23 20 6f 74 68 65 72 77 69 73 65 ion..# otherwise
4300: 2e 20 49 6e 20 74 68 65 20 6c 61 74 74 65 72 20 . In the latter
4310: 63 61 73 65 2c 20 74 68 65 79 20 77 6f 75 6c 64 case, they would
4320: 20 61 6c 73 6f 20 62 65 20 75 73 69 6e 67 20 74 also be using t
4330: 68 65 69 72 20 6f 77 6e 0d 0a 23 20 72 75 6c 65 heir own..# rule
4340: 73 2e 76 63 2e 20 4e 6f 74 65 20 74 68 61 74 20 s.vc. Note that
4350: 6f 6c 64 65 72 20 76 65 72 73 69 6f 6e 73 20 6f older versions o
4360: 66 20 54 63 6c 20 64 6f 20 6e 6f 74 20 69 6e 73 f Tcl do not ins
4370: 74 61 6c 6c 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d tall nmakehlp.c.
4380: 0a 23 20 6f 72 20 72 75 6c 65 73 2e 76 63 2e 0d .# or rules.vc..
4390: 0a 23 0d 0a 23 20 45 78 74 65 6e 73 69 6f 6e 73 .#..# Extensions
43a0: 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 54 built against T
43b0: 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c 6c 20 cl sources will
43c0: 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 6f 6d use the one from
43d0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 2e the Tcl source.
43e0: 0d 0a 23 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c ..#..# When buil
43f0: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
4400: 6e 20 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 n using a suffic
4410: 69 65 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 iently new versi
4420: 6f 6e 20 6f 66 20 54 63 6c 2c 0d 0a 23 20 72 75 on of Tcl,..# ru
4430: 6c 65 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 les-ext.vc will
4440: 64 65 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 define NMAKEHLPC
4450: 20 61 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74 appropriately t
4460: 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 0d 0a o point to the..
4470: 23 20 63 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 # copy of nmakeh
4480: 6c 70 2e 63 20 74 6f 20 62 65 20 75 73 65 64 2e lp.c to be used.
4490: 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 4e 4d 41 4b ....!ifndef NMAK
44a0: 45 48 4c 50 43 0d 0a 23 20 44 65 66 61 75 6c 74 EHLPC..# Default
44b0: 20 74 6f 20 74 68 65 20 6f 6e 65 20 69 6e 20 74 to the one in t
44c0: 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 he current direc
44d0: 74 6f 72 79 20 28 74 68 65 20 65 78 74 65 6e 73 tory (the extens
44e0: 69 6f 6e 27 73 20 6f 77 6e 20 6e 6d 61 6b 65 68 ion's own nmakeh
44f0: 6c 70 2e 63 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 lp.c)..NMAKEHLPC
4500: 20 3d 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a 0d = nmakehlp.c...
4510: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 .!if !$(DOING_TC
4520: 4c 29 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 L)..!if $(TCLINS
4530: 54 41 4c 4c 29 0d 0a 21 69 66 20 65 78 69 73 74 TALL)..!if exist
4540: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 ("$(_TCLDIR)\lib
4550: 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e \nmake\nmakehlp.
4560: 63 22 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d c")..NMAKEHLPC =
4570: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
4580: 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 nmake\nmakehlp.c
4590: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 20 ..!endif..!else
45a0: 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 # !$(TCLINSTALL)
45b0: 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f ..!if exist("$(_
45c0: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 6b TCLDIR)\win\nmak
45d0: 65 68 6c 70 2e 63 22 29 0d 0a 4e 4d 41 4b 45 48 ehlp.c")..NMAKEH
45e0: 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 LPC = $(_TCLDIR)
45f0: 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0d \win\nmakehlp.c.
4600: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 .!endif..!endif
4610: 23 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0d # $(TCLINSTALL).
4620: 0a 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49 .!endif # !$(DOI
4630: 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 21 65 6e 64 69 NG_TCL)....!endi
4640: 66 20 23 20 4e 4d 41 4b 45 48 4c 50 43 0d 0a 0d f # NMAKEHLPC...
4650: 0a 23 20 57 65 20 61 6c 77 61 79 73 20 62 75 69 .# We always bui
4660: 6c 64 20 6e 6d 61 6b 65 68 6c 70 20 65 76 65 6e ld nmakehlp even
4670: 20 69 66 20 69 74 20 65 78 69 73 74 73 20 73 69 if it exists si
4680: 6e 63 65 20 77 65 20 64 6f 20 6e 6f 74 20 6b 6e nce we do not kn
4690: 6f 77 0d 0a 23 20 77 68 61 74 20 73 6f 75 72 63 ow..# what sourc
46a0: 65 20 69 74 20 77 61 73 20 62 75 69 6c 74 20 66 e it was built f
46b0: 72 6f 6d 2e 0d 0a 21 69 66 20 22 24 28 4d 41 43 rom...!if "$(MAC
46c0: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 HINE)" == "IX86"
46d0: 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 || "$(MACHINE)"
46e0: 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 == "$(NATIVE_AR
46f0: 43 48 29 22 0d 0a 21 69 66 20 5b 24 28 63 63 33 CH)"..!if [$(cc3
4700: 32 29 20 2d 6e 6f 6c 6f 67 6f 20 22 24 28 4e 4d 2) -nologo "$(NM
4710: 41 4b 45 48 4c 50 43 29 22 20 2d 6c 69 6e 6b 20 AKEHLPC)" -link
4720: 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f -subsystem:conso
4730: 6c 65 20 3e 20 6e 75 6c 5d 0d 0a 21 65 6e 64 69 le > nul]..!endi
4740: 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 5b 63 f..!else..!if [c
4750: 6f 70 79 20 24 28 4e 4d 41 4b 45 48 4c 50 43 3a opy $(NMAKEHLPC:
4760: 6e 6d 61 6b 65 68 6c 70 2e 63 3d 78 38 36 5f 36 nmakehlp.c=x86_6
4770: 34 2d 77 36 34 2d 6d 69 6e 67 77 33 32 2d 6e 6d 4-w64-mingw32-nm
4780: 61 6b 65 68 6c 70 2e 65 78 65 29 20 6e 6d 61 6b akehlp.exe) nmak
4790: 65 68 6c 70 2e 65 78 65 20 3e 4e 55 4c 5d 0d 0a ehlp.exe >NUL]..
47a0: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
47b0: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
47c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
47d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
47e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
47f0: 23 23 0d 0a 23 20 35 2e 20 54 65 73 74 20 66 6f ##..# 5. Test fo
4800: 72 20 63 6f 6d 70 69 6c 65 72 20 66 65 61 74 75 r compiler featu
4810: 72 65 73 0d 0a 23 20 56 69 73 75 61 6c 20 43 2b res..# Visual C+
4820: 2b 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f + compiler optio
4830: 6e 73 20 68 61 76 65 20 63 68 61 6e 67 65 64 20 ns have changed
4840: 6f 76 65 72 20 74 68 65 20 79 65 61 72 73 2e 20 over the years.
4850: 43 68 65 63 6b 0d 0a 23 20 77 68 69 63 68 20 6f Check..# which o
4860: 70 74 69 6f 6e 73 20 61 72 65 20 73 75 70 70 6f ptions are suppo
4870: 72 74 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 rted by the comp
4880: 69 6c 65 72 20 69 6e 20 75 73 65 2e 0d 0a 23 0d iler in use...#.
4890: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 .# The following
48a0: 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 3a macros are set:
48b0: 0d 0a 23 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e ..# OPTIMIZATION
48c0: 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 S - the compiler
48d0: 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 73 65 flags to be use
48e0: 64 20 66 6f 72 20 6f 70 74 69 6d 69 7a 65 64 20 d for optimized
48f0: 62 75 69 6c 64 73 0d 0a 23 20 44 45 42 55 47 46 builds..# DEBUGF
4900: 4c 41 47 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 LAGS - the compi
4910: 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20 ler flags to be
4920: 75 73 65 64 20 66 6f 72 20 64 65 62 75 67 20 62 used for debug b
4930: 75 69 6c 64 73 0d 0a 23 20 4c 49 4e 4b 45 52 46 uilds..# LINKERF
4940: 4c 41 47 53 20 2d 20 46 6c 61 67 73 20 70 61 73 LAGS - Flags pas
4950: 73 65 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b 65 sed to the linke
4960: 72 0d 0a 23 0d 0a 23 20 4e 6f 74 65 20 74 68 61 r..#..# Note tha
4970: 74 20 74 68 65 73 65 20 61 72 65 20 74 68 65 20 t these are the
4980: 63 6f 6d 70 69 6c 65 72 20 73 65 74 74 69 6e 67 compiler setting
4990: 73 20 2a 61 76 61 69 6c 61 62 6c 65 2a 2c 20 6e s *available*, n
49a0: 6f 74 20 74 68 6f 73 65 0d 0a 23 20 74 68 61 74 ot those..# that
49b0: 20 77 69 6c 6c 20 62 65 20 2a 75 73 65 64 2a 2e will be *used*.
49c0: 20 54 68 65 20 6c 61 74 74 65 72 20 64 65 70 65 The latter depe
49d0: 6e 64 73 20 6f 6e 20 74 68 65 20 4f 50 54 53 20 nds on the OPTS
49e0: 6d 61 63 72 6f 20 73 65 74 74 69 6e 67 73 0d 0a macro settings..
49f0: 23 20 77 68 69 63 68 20 77 65 20 68 61 76 65 20 # which we have
4a00: 6e 6f 74 20 79 65 74 20 70 61 72 73 65 64 2e 0d not yet parsed..
4a10: 0a 23 0d 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 20 .#..# Also note
4a20: 74 68 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 65 that some of the
4a30: 20 66 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d 49 flags in OPTIMI
4a40: 5a 41 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 20 ZATIONS are not
4a50: 72 65 61 6c 6c 79 0d 0a 23 20 72 65 6c 61 74 65 really..# relate
4a60: 64 20 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f d to optimizatio
4a70: 6e 2e 20 54 68 65 79 20 61 72 65 20 70 6c 61 63 n. They are plac
4a80: 65 64 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f ed there only fo
4a90: 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 r legacy reasons
4aa0: 0d 0a 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65 ..# as some exte
4ab0: 6e 73 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68 nsions expect th
4ac0: 65 6d 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65 em to be include
4ad0: 64 20 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e d in that macro.
4ae0: 0d 0a 0d 0a 23 20 2d 4f 70 20 69 6d 70 72 6f 76 ....# -Op improv
4af0: 65 73 20 66 6c 6f 61 74 20 63 6f 6e 73 69 73 74 es float consist
4b00: 65 6e 63 79 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20 ency. Note only
4b10: 6e 65 65 64 65 64 20 66 6f 72 20 6f 6c 64 65 72 needed for older
4b20: 20 63 6f 6d 70 69 6c 65 72 73 0d 0a 23 20 4e 65 compilers..# Ne
4b30: 77 65 72 20 63 6f 6d 70 69 6c 65 72 73 20 64 6f wer compilers do
4b40: 20 6e 6f 74 20 6e 65 65 64 20 6f 72 20 73 75 70 not need or sup
4b50: 70 6f 72 74 20 74 68 69 73 20 6f 70 74 69 6f 6e port this option
4b60: 2e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ...!if [nmakehlp
4b70: 20 2d 63 20 2d 4f 70 5d 0d 0a 46 50 4f 50 54 53 -c -Op]..FPOPTS
4b80: 20 20 3d 20 2d 4f 70 0d 0a 21 65 6e 64 69 66 0d = -Op..!endif.
4b90: 0a 0d 0a 23 20 53 74 72 69 63 74 20 66 6c 6f 61 ...# Strict floa
4ba0: 74 69 6e 67 20 70 6f 69 6e 74 20 73 65 6d 61 6e ting point seman
4bb0: 74 69 63 73 20 2d 20 70 72 65 73 65 6e 74 20 69 tics - present i
4bc0: 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c 65 72 n newer compiler
4bd0: 73 20 69 6e 20 6c 69 65 75 20 6f 66 20 2d 4f 70 s in lieu of -Op
4be0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
4bf0: 2d 63 20 2d 66 70 3a 73 74 72 69 63 74 5d 0d 0a -c -fp:strict]..
4c00: 46 50 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50 FPOPTS = $(FPOP
4c10: 54 53 29 20 2d 66 70 3a 73 74 72 69 63 74 0d 0a TS) -fp:strict..
4c20: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 22 24 !endif....!if "$
4c30: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 (MACHINE)" == "I
4c40: 58 38 36 22 0d 0a 23 23 23 20 74 65 73 74 20 66 X86"..### test f
4c50: 6f 72 20 70 65 6e 74 69 75 6d 20 65 72 72 61 74 or pentium errat
4c60: 61 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 a..!if [nmakehlp
4c70: 20 2d 63 20 2d 51 49 30 66 5d 0d 0a 21 6d 65 73 -c -QI0f]..!mes
4c80: 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 sage *** Compile
4c90: 72 20 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30 r has 'Pentium 0
4ca0: 78 30 66 20 66 69 78 27 0d 0a 46 50 4f 50 54 53 x0f fix'..FPOPTS
4cb0: 20 20 3d 20 24 28 46 50 4f 50 54 53 29 20 2d 51 = $(FPOPTS) -Q
4cc0: 49 30 66 0d 0a 21 65 6c 73 65 0d 0a 21 6d 65 73 I0f..!else..!mes
4cd0: 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 sage *** Compile
4ce0: 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 r does not have
4cf0: 27 50 65 6e 74 69 75 6d 20 30 78 30 66 20 66 69 'Pentium 0x0f fi
4d00: 78 27 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 x'..!endif..!end
4d10: 69 66 0d 0a 0d 0a 23 23 23 20 74 65 73 74 20 66 if....### test f
4d20: 6f 72 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 or optimizations
4d30: 0d 0a 23 20 2f 4f 32 20 6f 70 74 69 6d 69 7a 61 ..# /O2 optimiza
4d40: 74 69 6f 6e 20 69 6e 63 6c 75 64 65 73 20 2f 4f tion includes /O
4d50: 67 20 2f 4f 69 20 2f 4f 74 20 2f 4f 79 20 2f 4f g /Oi /Ot /Oy /O
4d60: 62 32 20 2f 47 73 20 2f 47 46 20 2f 47 79 20 61 b2 /Gs /GF /Gy a
4d70: 73 20 70 65 72 0d 0a 23 20 64 6f 63 75 6d 65 6e s per..# documen
4d80: 74 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 77 65 20 tation. Note we
4d90: 64 6f 20 4e 4f 54 20 77 61 6e 74 20 2f 47 73 20 do NOT want /Gs
4da0: 61 73 20 74 68 61 74 20 69 6e 73 65 72 74 73 20 as that inserts
4db0: 61 20 5f 63 68 6b 73 74 6b 0d 0a 23 20 73 74 61 a _chkstk..# sta
4dc0: 63 6b 20 70 72 6f 62 65 20 61 74 20 2a 65 76 65 ck probe at *eve
4dd0: 72 79 2a 20 66 75 6e 63 74 69 6f 6e 20 65 6e 74 ry* function ent
4de0: 72 79 2c 20 6e 6f 74 20 6a 75 73 74 20 74 68 6f ry, not just tho
4df0: 73 65 20 77 69 74 68 20 6d 6f 72 65 20 74 68 61 se with more tha
4e00: 6e 0d 0a 23 20 61 20 70 61 67 65 20 6f 66 20 73 n..# a page of s
4e10: 74 61 63 6b 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 tack allocation
4e20: 72 65 73 75 6c 74 69 6e 67 20 69 6e 20 61 20 70 resulting in a p
4e30: 65 72 66 6f 72 6d 61 6e 63 65 20 68 69 74 2e 20 erformance hit.
4e40: 20 48 6f 77 65 76 65 72 2c 0d 0a 23 20 2f 4f 32 However,..# /O2
4e50: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69 documentation i
4e60: 73 20 6d 69 73 6c 65 61 64 69 6e 67 20 61 73 20 s misleading as
4e70: 69 74 73 20 73 74 61 63 6b 20 70 72 6f 62 65 73 its stack probes
4e80: 20 61 72 65 20 73 69 6d 70 6c 79 20 74 68 65 0d are simply the.
4e90: 0a 23 20 64 65 66 61 75 6c 74 20 70 61 67 65 20 .# default page
4ea0: 73 69 7a 65 20 6c 6f 63 61 6c 73 20 61 6c 6c 6f size locals allo
4eb0: 63 61 74 69 6f 6e 20 70 72 6f 62 65 73 20 61 6e cation probes an
4ec0: 64 20 6e 6f 74 20 77 68 61 74 20 69 73 20 69 6d d not what is im
4ed0: 70 6c 69 65 64 0d 0a 23 20 62 79 20 61 6e 20 65 plied..# by an e
4ee0: 78 70 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 69 xplicit /Gs opti
4ef0: 6f 6e 2e 0d 0a 0d 0a 4f 50 54 49 4d 49 5a 41 54 on.....OPTIMIZAT
4f00: 49 4f 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29 IONS = $(FPOPTS)
4f10: 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c ....!if [nmakehl
4f20: 70 20 2d 63 20 2d 4f 32 5d 0d 0a 4f 50 54 49 4d p -c -O2]..OPTIM
4f30: 49 5a 49 4e 47 20 3d 20 31 0d 0a 4f 50 54 49 4d IZING = 1..OPTIM
4f40: 49 5a 41 54 49 4f 4e 53 20 20 20 3d 20 24 28 4f IZATIONS = $(O
4f50: 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d 4f PTIMIZATIONS) -O
4f60: 32 0d 0a 21 65 6c 73 65 0d 0a 23 20 4c 65 67 61 2..!else..# Lega
4f70: 63 79 2c 20 72 65 61 6c 6c 79 2e 20 41 6c 6c 20 cy, really. All
4f80: 6d 6f 64 65 72 6e 20 63 6f 6d 70 69 6c 65 72 73 modern compilers
4f90: 20 73 75 70 70 6f 72 74 20 74 68 69 73 0d 0a 21 support this..!
4fa0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 message *** Comp
4fb0: 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 iler does not ha
4fc0: 76 65 20 27 4f 70 74 69 6d 69 7a 61 74 69 6f 6e ve 'Optimization
4fd0: 73 27 0d 0a 4f 50 54 49 4d 49 5a 49 4e 47 20 3d s'..OPTIMIZING =
4fe0: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 0..!endif....#
4ff0: 43 68 65 63 6b 73 20 66 6f 72 20 62 75 66 66 65 Checks for buffe
5000: 72 20 6f 76 65 72 66 6c 6f 77 73 20 69 6e 20 6c r overflows in l
5010: 6f 63 61 6c 20 61 72 72 61 79 73 0d 0a 21 69 66 ocal arrays..!if
5020: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 [nmakehlp -c -G
5030: 53 5d 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e S]..OPTIMIZATION
5040: 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 S = $(OPTIMIZAT
5050: 49 4f 4e 53 29 20 2d 47 53 0d 0a 21 65 6e 64 69 IONS) -GS..!endi
5060: 66 0d 0a 0d 0a 23 20 4c 69 6e 6b 20 74 69 6d 65 f....# Link time
5070: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e optimization. N
5080: 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 6f 70 ote that this op
5090: 74 69 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c tion (potentiall
50a0: 79 29 20 6d 61 6b 65 73 0d 0a 23 20 67 65 6e 65 y) makes..# gene
50b0: 72 61 74 65 64 20 6c 69 62 72 61 72 69 65 73 20 rated libraries
50c0: 6f 6e 6c 79 20 75 73 61 62 6c 65 20 62 79 20 74 only usable by t
50d0: 68 65 20 73 70 65 63 69 66 69 63 20 56 43 2b 2b he specific VC++
50e0: 20 76 65 72 73 69 6f 6e 20 74 68 61 74 0d 0a 23 version that..#
50f0: 20 63 72 65 61 74 65 64 20 69 74 2e 20 52 65 71 created it. Req
5100: 75 69 72 65 73 20 2f 4c 54 43 47 20 6c 69 6e 6b uires /LTCG link
5110: 65 72 20 6f 70 74 69 6f 6e 0d 0a 21 69 66 20 5b er option..!if [
5120: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d nmakehlp -c -GL]
5130: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ..OPTIMIZATIONS
5140: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
5150: 4e 53 29 20 2d 47 4c 0d 0a 43 43 5f 47 4c 5f 4f NS) -GL..CC_GL_O
5160: 50 54 5f 45 4e 41 42 4c 45 44 20 3d 20 31 0d 0a PT_ENABLED = 1..
5170: 21 65 6c 73 65 0d 0a 23 20 49 6e 20 6e 65 77 65 !else..# In newe
5180: 72 20 63 6f 6d 70 69 6c 65 72 73 20 2d 47 4c 20 r compilers -GL
5190: 61 6e 64 20 2d 59 58 20 61 72 65 20 69 6e 63 6f and -YX are inco
51a0: 6d 70 61 74 69 62 6c 65 2e 0d 0a 21 69 66 20 5b mpatible...!if [
51b0: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 59 58 5d nmakehlp -c -YX]
51c0: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ..OPTIMIZATIONS
51d0: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
51e0: 4e 53 29 20 2d 59 58 0d 0a 21 65 6e 64 69 66 0d NS) -YX..!endif.
51f0: 0a 21 65 6e 64 69 66 20 23 20 5b 6e 6d 61 6b 65 .!endif # [nmake
5200: 68 6c 70 20 2d 63 20 2d 47 4c 5d 0d 0a 0d 0a 44 hlp -c -GL]....D
5210: 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 EBUGFLAGS =
5220: 24 28 46 50 4f 50 54 53 29 0d 0a 0d 0a 23 20 52 $(FPOPTS)....# R
5230: 75 6e 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68 un time error ch
5240: 65 63 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61 ecks. Not availa
5250: 62 6c 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20 ble or valid in
5260: 61 20 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64 a release, non-d
5270: 65 62 75 67 20 62 75 69 6c 64 0d 0a 23 20 52 54 ebug build..# RT
5280: 43 20 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20 C is for modern
5290: 63 6f 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69 compilers, -GZ i
52a0: 73 20 6c 65 67 61 63 79 0d 0a 21 69 66 20 5b 6e s legacy..!if [n
52b0: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 52 54 43 31 makehlp -c -RTC1
52c0: 5d 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 ]..DEBUGFLAGS
52d0: 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53 = $(DEBUGFLAGS
52e0: 29 20 2d 52 54 43 31 0d 0a 21 65 6c 73 65 69 66 ) -RTC1..!elseif
52f0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 [nmakehlp -c -G
5300: 5a 5d 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 Z]..DEBUGFLAGS
5310: 20 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 = $(DEBUGFLAG
5320: 53 29 20 2d 47 5a 0d 0a 21 65 6e 64 69 66 0d 0a S) -GZ..!endif..
5330: 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ..#-------------
5340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5360: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5370: 2d 2d 2d 0d 0a 23 20 4c 69 6e 6b 65 72 20 66 6c ---..# Linker fl
5380: 61 67 73 0d 0a 0d 0a 23 20 4c 49 4e 4b 45 52 5f ags....# LINKER_
5390: 54 45 53 54 46 4c 41 47 53 20 61 72 65 20 66 6f TESTFLAGS are fo
53a0: 72 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 77 r internal use w
53b0: 68 65 6e 20 77 65 20 63 61 6c 6c 20 6e 6d 61 6b hen we call nmak
53c0: 65 68 6c 70 20 74 6f 20 74 65 73 74 0d 0a 23 20 ehlp to test..#
53d0: 69 66 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 75 if the linker su
53e0: 70 70 6f 72 74 73 20 61 20 73 70 65 63 69 66 69 pports a specifi
53f0: 63 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f 75 c option. Withou
5400: 74 20 74 68 65 73 65 20 66 6c 61 67 73 20 6c 69 t these flags li
5410: 6e 6b 20 77 69 6c 6c 0d 0a 23 20 72 65 74 75 72 nk will..# retur
5420: 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72 n "LNK1561: entr
5430: 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 62 65 20 y point must be
5440: 64 65 66 69 6e 65 64 22 20 65 72 72 6f 72 20 63 defined" error c
5450: 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53 ompiling from VS
5460: 2d 49 44 45 3a 0d 0a 23 20 54 68 65 79 20 61 72 -IDE:..# They ar
5470: 65 20 6e 6f 74 20 70 61 73 73 65 64 20 74 68 72 e not passed thr
5480: 6f 75 67 68 20 74 6f 20 74 68 65 20 61 63 74 75 ough to the actu
5490: 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 2f al application /
54a0: 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 23 20 6c 69 extension..# li
54b0: 6e 6b 20 72 75 6c 65 73 2e 0d 0a 21 69 66 6e 64 nk rules...!ifnd
54c0: 65 66 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c ef LINKER_TESTFL
54d0: 41 47 53 0d 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 AGS..LINKER_TEST
54e0: 46 4c 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f FLAGS = /DLL /NO
54f0: 45 4e 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 ENTRY /OUT:nmake
5500: 68 6c 70 2e 6f 75 74 0d 0a 21 65 6e 64 69 66 0d hlp.out..!endif.
5510: 0a 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 20 ...LINKERFLAGS
5520: 20 20 20 3d 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d =....# If com
5530: 70 69 6c 65 72 20 68 61 73 20 65 6e 61 62 6c 65 piler has enable
5540: 64 20 6c 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69 d link time opti
5550: 6d 69 7a 61 74 69 6f 6e 2c 20 6c 69 6e 6b 65 72 mization, linker
5560: 20 6d 75 73 74 20 74 6f 6f 20 77 69 74 68 20 2d must too with -
5570: 6c 74 63 67 0d 0a 21 69 66 64 65 66 20 43 43 5f ltcg..!ifdef CC_
5580: 47 4c 5f 4f 50 54 5f 45 4e 41 42 4c 45 44 0d 0a GL_OPT_ENABLED..
5590: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c !if [nmakehlp -l
55a0: 20 2d 6c 74 63 67 20 24 28 4c 49 4e 4b 45 52 5f -ltcg $(LINKER_
55b0: 54 45 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e TESTFLAGS)]..LIN
55c0: 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d 20 24 KERFLAGS = $
55d0: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6c (LINKERFLAGS) -l
55e0: 74 63 67 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e tcg..!endif..!en
55f0: 64 69 66 0d 0a 0d 0a 0d 0a 23 23 23 23 23 23 23 dif......#######
5600: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5630: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 36 2e 20 #########..# 6.
5640: 45 78 74 72 61 63 74 20 76 61 72 69 6f 75 73 20 Extract various
5650: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
5660: 66 72 6f 6d 20 68 65 61 64 65 72 73 0d 0a 23 20 from headers..#
5670: 46 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20 For Tcl and Tk,
5680: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
5690: 61 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72 are extracted fr
56a0: 6f 6d 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e om tcl.h and tk.
56b0: 68 0d 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c h..# respectivel
56c0: 79 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e y. For extension
56d0: 73 2c 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20 s, versions are
56e0: 65 78 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 extracted from t
56f0: 68 65 0d 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e he..# configure.
5700: 69 6e 20 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e in or configure.
5710: 61 63 20 66 72 6f 6d 20 74 68 65 20 54 45 41 20 ac from the TEA
5720: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 66 configuration if
5730: 20 69 74 0d 0a 23 20 65 78 69 73 74 73 2c 20 61 it..# exists, a
5740: 6e 64 20 75 6e 73 65 74 20 6f 74 68 65 72 77 69 nd unset otherwi
5750: 73 65 2e 0d 0a 23 20 53 65 74 73 20 74 68 65 20 se...# Sets the
5760: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
5770: 3a 0d 0a 23 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 :..# TCL_MAJOR_V
5780: 45 52 53 49 4f 4e 0d 0a 23 20 54 43 4c 5f 4d 49 ERSION..# TCL_MI
5790: 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54 NOR_VERSION..# T
57a0: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
57b0: 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c L..# TCL_PATCH_L
57c0: 45 56 45 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43 EVEL..# TCL_PATC
57d0: 48 5f 4c 45 54 54 45 52 0d 0a 23 20 54 43 4c 5f H_LETTER..# TCL_
57e0: 56 45 52 53 49 4f 4e 0d 0a 23 20 54 4b 5f 4d 41 VERSION..# TK_MA
57f0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54 JOR_VERSION..# T
5800: 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d K_MINOR_VERSION.
5810: 0a 23 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 .# TK_RELEASE_SE
5820: 52 49 41 4c 0d 0a 23 20 54 4b 5f 50 41 54 43 48 RIAL..# TK_PATCH
5830: 5f 4c 45 56 45 4c 0d 0a 23 20 54 4b 5f 50 41 54 _LEVEL..# TK_PAT
5840: 43 48 5f 4c 45 54 54 45 52 0d 0a 23 20 54 4b 5f CH_LETTER..# TK_
5850: 56 45 52 53 49 4f 4e 0d 0a 23 20 44 4f 54 56 45 VERSION..# DOTVE
5860: 52 53 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 RSION - set as (
5870: 66 6f 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35 for example) 2.5
5880: 0d 0a 23 20 56 45 52 53 49 4f 4e 20 2d 20 73 65 ..# VERSION - se
5890: 74 20 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c t as (for exampl
58a0: 65 20 32 35 29 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d e 25)..#--------
58b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58e0: 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 21 69 66 20 5b 65 ------....!if [e
58f0: 63 68 6f 20 52 45 4d 20 3d 20 54 68 69 73 20 66 cho REM = This f
5900: 69 6c 65 20 69 73 20 67 65 6e 65 72 61 74 65 64 ile is generated
5910: 20 66 72 6f 6d 20 72 75 6c 65 73 2e 76 63 20 3e from rules.vc >
5920: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 versions.vc]..!
5930: 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f endif..!if [echo
5940: 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 TCL_MAJOR_VERSI
5950: 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e ON = \>> version
5960: 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b s.vc] \.. && [
5970: 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f nmakehlp -V "$(_
5980: 54 43 4c 5f 48 29 22 20 22 64 65 66 69 6e 65 20 TCL_H)" "define
5990: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
59a0: 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 N" >> versions.v
59b0: 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 c]..!endif..!if
59c0: 5b 65 63 68 6f 20 54 43 4c 5f 4d 49 4e 4f 52 5f [echo TCL_MINOR_
59d0: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 VERSION = \>> ve
59e0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 rsions.vc] \..
59f0: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 && [nmakehlp -V
5a00: 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 22 64 65 "$(_TCL_H)" "de
5a10: 66 69 6e 65 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 fine TCL_MINOR_V
5a20: 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 ERSION" >> versi
5a30: 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d ons.vc]..!endif.
5a40: 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 52 .!if [echo TCL_R
5a50: 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 ELEASE_SERIAL =
5a60: 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d \>> versions.vc]
5a70: 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 \.. && [nmake
5a80: 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 hlp -V "$(_TCL_H
5a90: 29 22 20 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 )" TCL_RELEASE_S
5aa0: 45 52 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f 6e ERIAL >> version
5ab0: 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 s.vc]..!endif..!
5ac0: 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 50 41 54 if [echo TCL_PAT
5ad0: 43 48 5f 4c 45 56 45 4c 20 3d 20 5c 3e 3e 20 76 CH_LEVEL = \>> v
5ae0: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 ersions.vc] \..
5af0: 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d && [nmakehlp -
5b00: 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 V "$(_TCL_H)" TC
5b10: 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 3e 3e L_PATCH_LEVEL >>
5b20: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 versions.vc]..!
5b30: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 64 65 66 endif....!if def
5b40: 69 6e 65 64 28 5f 54 4b 5f 48 29 0d 0a 21 69 66 ined(_TK_H)..!if
5b50: 20 5b 65 63 68 6f 20 54 4b 5f 4d 41 4a 4f 52 5f [echo TK_MAJOR_
5b60: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 VERSION = \>> ve
5b70: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 rsions.vc] \..
5b80: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 && [nmakehlp -V
5b90: 20 24 28 5f 54 4b 5f 48 29 20 22 64 65 66 69 6e $(_TK_H) "defin
5ba0: 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 e TK_MAJOR_VERSI
5bb0: 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e ON" >> versions.
5bc0: 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 vc]..!endif..!if
5bd0: 20 5b 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 5f [echo TK_MINOR_
5be0: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 VERSION = \>> ve
5bf0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 rsions.vc] \..
5c00: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 && [nmakehlp -V
5c10: 20 24 28 5f 54 4b 5f 48 29 20 54 4b 5f 4d 49 4e $(_TK_H) TK_MIN
5c20: 4f 52 5f 56 45 52 53 49 4f 4e 20 3e 3e 20 76 65 OR_VERSION >> ve
5c30: 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 rsions.vc]..!end
5c40: 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b if..!if [echo TK
5c50: 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 _RELEASE_SERIAL
5c60: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \>> versions.v
5c70: 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 c] \.. && [nma
5c80: 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 4b 5f kehlp -V "$(_TK_
5c90: 48 29 22 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 H)" TK_RELEASE_S
5ca0: 45 52 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f 6e ERIAL >> version
5cb0: 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 s.vc]..!endif..!
5cc0: 69 66 20 5b 65 63 68 6f 20 54 4b 5f 50 41 54 43 if [echo TK_PATC
5cd0: 48 5f 4c 45 56 45 4c 20 3d 20 5c 3e 3e 20 76 65 H_LEVEL = \>> ve
5ce0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 rsions.vc] \..
5cf0: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 && [nmakehlp -V
5d00: 20 24 28 5f 54 4b 5f 48 29 20 54 4b 5f 50 41 54 $(_TK_H) TK_PAT
5d10: 43 48 5f 4c 45 56 45 4c 20 3e 3e 20 76 65 72 73 CH_LEVEL >> vers
5d20: 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 ions.vc]..!endif
5d30: 0d 0a 21 65 6e 64 69 66 20 23 20 5f 54 4b 5f 48 ..!endif # _TK_H
5d40: 0d 0a 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 ....!include ver
5d50: 73 69 6f 6e 73 2e 76 63 0d 0a 0d 0a 54 43 4c 5f sions.vc....TCL_
5d60: 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 4c 5f VERSION.= $(TCL_
5d70: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 MAJOR_VERSION)$(
5d80: 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f TCL_MINOR_VERSIO
5d90: 4e 29 0d 0a 54 43 4c 5f 44 4f 54 56 45 52 53 49 N)..TCL_DOTVERSI
5da0: 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 ON.= $(TCL_MAJOR
5db0: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f _VERSION).$(TCL_
5dc0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a MINOR_VERSION)..
5dd0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
5de0: 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 $(TCL_PATCH_LEV
5df0: 45 4c 29 20 22 61 22 5d 0d 0a 54 43 4c 5f 50 41 EL) "a"]..TCL_PA
5e00: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 0d 0a TCH_LETTER = a..
5e10: 21 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c !elseif [nmakehl
5e20: 70 20 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 48 p -f $(TCL_PATCH
5e30: 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0d 0a 54 43 _LEVEL) "b"]..TC
5e40: 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d L_PATCH_LETTER =
5e50: 20 62 0d 0a 21 65 6c 73 65 0d 0a 54 43 4c 5f 50 b..!else..TCL_P
5e60: 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e 0d ATCH_LETTER = ..
5e70: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 64 .!endif....!if d
5e80: 65 66 69 6e 65 64 28 5f 54 4b 5f 48 29 0d 0a 0d efined(_TK_H)...
5e90: 0a 54 4b 5f 56 45 52 53 49 4f 4e 09 3d 20 24 28 .TK_VERSION.= $(
5ea0: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
5eb0: 29 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 )$(TK_MINOR_VERS
5ec0: 49 4f 4e 29 0d 0a 54 4b 5f 44 4f 54 56 45 52 53 ION)..TK_DOTVERS
5ed0: 49 4f 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 ION.= $(TK_MAJOR
5ee0: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d _VERSION).$(TK_M
5ef0: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 21 INOR_VERSION)..!
5f00: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
5f10: 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c $(TK_PATCH_LEVEL
5f20: 29 20 22 61 22 5d 0d 0a 54 4b 5f 50 41 54 43 48 ) "a"]..TK_PATCH
5f30: 5f 4c 45 54 54 45 52 20 3d 20 61 0d 0a 21 65 6c _LETTER = a..!el
5f40: 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d seif [nmakehlp -
5f50: 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 56 f $(TK_PATCH_LEV
5f60: 45 4c 29 20 22 62 22 5d 0d 0a 54 4b 5f 50 41 54 EL) "b"]..TK_PAT
5f70: 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0d 0a 21 CH_LETTER = b..!
5f80: 65 6c 73 65 0d 0a 54 4b 5f 50 41 54 43 48 5f 4c else..TK_PATCH_L
5f90: 45 54 54 45 52 20 3d 20 2e 0d 0a 21 65 6e 64 69 ETTER = ...!endi
5fa0: 66 0d 0a 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 f....!endif....#
5fb0: 20 53 65 74 20 44 4f 54 56 45 52 53 49 4f 4e 20 Set DOTVERSION
5fc0: 61 6e 64 20 56 45 52 53 49 4f 4e 0d 0a 21 69 66 and VERSION..!if
5fd0: 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 0d $(DOING_TCL)...
5fe0: 0a 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 .DOTVERSION = $(
5ff0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
6000: 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 N).$(TCL_MINOR_V
6010: 45 52 53 49 4f 4e 29 0d 0a 56 45 52 53 49 4f 4e ERSION)..VERSION
6020: 20 3d 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e = $(TCL_VERSION
6030: 29 0d 0a 0d 0a 21 65 6c 73 65 69 66 20 24 28 44 )....!elseif $(D
6040: 4f 49 4e 47 5f 54 4b 29 0d 0a 0d 0a 44 4f 54 56 OING_TK)....DOTV
6050: 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b 5f 44 4f ERSION = $(TK_DO
6060: 54 56 45 52 53 49 4f 4e 29 0d 0a 56 45 52 53 49 TVERSION)..VERSI
6070: 4f 4e 20 3d 20 24 28 54 4b 5f 56 45 52 53 49 4f ON = $(TK_VERSIO
6080: 4e 29 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 44 6f N)....!else # Do
6090: 69 6e 67 20 61 20 6e 6f 6e 2d 54 6b 20 65 78 74 ing a non-Tk ext
60a0: 65 6e 73 69 6f 6e 0d 0a 0d 0a 23 20 49 66 20 70 ension....# If p
60b0: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 arent makefile h
60c0: 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 44 as not defined D
60d0: 4f 54 56 45 52 53 49 4f 4e 2c 20 74 72 79 20 74 OTVERSION, try t
60e0: 6f 20 67 65 74 20 69 74 20 66 72 6f 6d 20 54 45 o get it from TE
60f0: 41 0d 0a 23 20 66 69 72 73 74 20 66 72 6f 6d 20 A..# first from
6100: 61 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 66 a configure.in f
6110: 69 6c 65 2c 20 61 6e 64 20 74 68 65 6e 20 66 72 ile, and then fr
6120: 6f 6d 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 0d om configure.ac.
6130: 0a 21 69 66 6e 64 65 66 20 44 4f 54 56 45 52 53 .!ifndef DOTVERS
6140: 49 4f 4e 0d 0a 21 69 66 20 5b 65 63 68 6f 20 44 ION..!if [echo D
6150: 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 OTVERSION = \> v
6160: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 ersions.vc] \..
6170: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d || [nmakehlp -
6180: 56 20 24 28 52 4f 4f 54 29 5c 63 6f 6e 66 69 67 V $(ROOT)\config
6190: 75 72 65 2e 69 6e 20 5e 5b 24 28 50 52 4f 4a 45 ure.in ^[$(PROJE
61a0: 43 54 29 5e 5d 20 3e 3e 20 76 65 72 73 69 6f 6e CT)^] >> version
61b0: 73 2e 76 63 5d 0d 0a 21 69 66 20 5b 65 63 68 6f s.vc]..!if [echo
61c0: 20 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c 3e DOTVERSION = \>
61d0: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d versions.vc] \.
61e0: 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 . || [nmakehlp
61f0: 20 2d 56 20 24 28 52 4f 4f 54 29 5c 63 6f 6e 66 -V $(ROOT)\conf
6200: 69 67 75 72 65 2e 61 63 20 5e 5b 24 28 50 52 4f igure.ac ^[$(PRO
6210: 4a 45 43 54 29 5e 5d 20 3e 3e 20 76 65 72 73 69 JECT)^] >> versi
6220: 6f 6e 73 2e 76 63 5d 0d 0a 21 65 72 72 6f 72 20 ons.vc]..!error
6230: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 69 *** Could not fi
6240: 67 75 72 65 20 6f 75 74 20 65 78 74 65 6e 73 69 gure out extensi
6250: 6f 6e 20 76 65 72 73 69 6f 6e 2e 20 50 6c 65 61 on version. Plea
6260: 73 65 20 64 65 66 69 6e 65 20 44 4f 54 56 45 52 se define DOTVER
6270: 53 49 4f 4e 20 69 6e 20 70 61 72 65 6e 74 20 6d SION in parent m
6280: 61 6b 65 66 69 6c 65 20 62 65 66 6f 72 65 20 69 akefile before i
6290: 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 76 ncluding rules.v
62a0: 63 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 c...!endif..!end
62b0: 69 66 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 if..!include ver
62c0: 73 69 6f 6e 73 2e 76 63 0d 0a 21 65 6e 64 69 66 sions.vc..!endif
62d0: 20 23 20 44 4f 54 56 45 52 53 49 4f 4e 0d 0a 56 # DOTVERSION..V
62e0: 45 52 53 49 4f 4e 20 20 20 20 20 20 20 20 20 3d ERSION =
62f0: 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 3a 2e 3d $(DOTVERSION:.=
6300: 29 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 )....!endif # $(
6310: 44 4f 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e 20 65 DOING_TCL) ... e
6320: 74 63 2e 0d 0a 0d 0a 23 20 57 69 6e 64 6f 77 73 tc.....# Windows
6330: 20 52 43 20 66 69 6c 65 73 20 68 61 76 65 20 33 RC files have 3
6340: 20 76 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 version compone
6350: 6e 74 73 2e 20 45 6e 73 75 72 65 20 74 68 69 73 nts. Ensure this
6360: 20 69 72 72 65 73 70 65 63 74 69 76 65 0d 0a 23 irrespective..#
6370: 20 6f 66 20 68 6f 77 20 6d 61 6e 79 20 63 6f 6d of how many com
6380: 70 6f 6e 65 6e 74 73 20 74 68 65 20 70 61 63 6b ponents the pack
6390: 61 67 65 20 68 61 73 20 73 70 65 63 69 66 69 65 age has specifie
63a0: 64 2e 20 42 61 73 69 63 61 6c 6c 79 2c 20 65 6e d. Basically, en
63b0: 73 75 72 65 0d 0a 23 20 6d 69 6e 69 6d 75 6d 20 sure..# minimum
63c0: 34 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 62 79 20 4 components by
63d0: 61 70 70 65 6e 64 69 6e 67 20 34 20 30 27 73 20 appending 4 0's
63e0: 61 6e 64 20 74 68 65 6e 20 70 69 63 6b 20 6f 75 and then pick ou
63f0: 74 20 74 68 65 20 66 69 72 73 74 20 34 2e 0d 0a t the first 4...
6400: 23 20 41 6c 73 6f 20 74 61 6b 65 20 63 61 72 65 # Also take care
6410: 20 6f 66 20 74 68 65 20 66 61 63 74 20 74 68 61 of the fact tha
6420: 74 20 44 4f 54 56 45 52 53 49 4f 4e 20 6d 61 79 t DOTVERSION may
6430: 20 68 61 76 65 20 22 61 22 20 6f 72 20 22 62 22 have "a" or "b"
6440: 20 69 6e 73 74 65 61 64 0d 0a 23 20 6f 66 20 22 instead..# of "
6450: 2e 22 20 73 65 70 61 72 61 74 69 6e 67 20 74 68 ." separating th
6460: 65 20 76 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e e version compon
6470: 65 6e 74 73 2e 0d 0a 44 4f 54 53 45 50 41 52 41 ents...DOTSEPARA
6480: 54 45 44 3d 24 28 44 4f 54 56 45 52 53 49 4f 4e TED=$(DOTVERSION
6490: 3a 61 3d 2e 29 0d 0a 44 4f 54 53 45 50 41 52 41 :a=.)..DOTSEPARA
64a0: 54 45 44 3d 24 28 44 4f 54 53 45 50 41 52 41 54 TED=$(DOTSEPARAT
64b0: 45 44 3a 62 3d 2e 29 0d 0a 21 69 66 20 5b 65 63 ED:b=.)..!if [ec
64c0: 68 6f 20 52 43 43 4f 4d 4d 41 56 45 52 53 49 4f ho RCCOMMAVERSIO
64d0: 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 2e N = \> versions.
64e0: 76 63 5d 20 5c 0d 0a 20 20 7c 7c 20 5b 66 6f 72 vc] \.. || [for
64f0: 20 2f 66 20 22 74 6f 6b 65 6e 73 3d 31 2c 32 2c /f "tokens=1,2,
6500: 33 2c 34 2c 35 2a 20 64 65 6c 69 6d 73 3d 2e 22 3,4,5* delims=."
6510: 20 25 61 20 69 6e 20 28 22 24 28 44 4f 54 53 45 %a in ("$(DOTSE
6520: 50 41 52 41 54 45 44 29 2e 30 2e 30 2e 30 2e 30 PARATED).0.0.0.0
6530: 22 29 20 64 6f 20 65 63 68 6f 20 25 61 2c 25 62 ") do echo %a,%b
6540: 2c 25 63 2c 25 64 20 3e 3e 20 76 65 72 73 69 6f ,%c,%d >> versio
6550: 6e 73 2e 76 63 5d 0d 0a 21 65 72 72 6f 72 20 2a ns.vc]..!error *
6560: 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 67 65 6e ** Could not gen
6570: 65 72 61 74 65 20 52 43 43 4f 4d 4d 41 56 45 52 erate RCCOMMAVER
6580: 53 49 4f 4e 20 2a 2a 2a 0d 0a 21 65 6e 64 69 66 SION ***..!endif
6590: 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 73 69 ..!include versi
65a0: 6f 6e 73 2e 76 63 0d 0a 0d 0a 23 23 23 23 23 23 ons.vc....######
65b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
65f0: 23 23 0d 0a 23 20 37 2e 20 50 61 72 73 65 20 74 ##..# 7. Parse t
6600: 68 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 74 6f he OPTS macro to
6610: 20 77 6f 72 6b 20 6f 75 74 20 74 68 65 20 72 65 work out the re
6620: 71 75 65 73 74 65 64 20 62 75 69 6c 64 20 63 6f quested build co
6630: 6e 66 69 67 75 72 61 74 69 6f 6e 2e 0d 0a 23 20 nfiguration...#
6640: 42 61 73 65 64 20 6f 6e 20 74 68 69 73 2c 20 77 Based on this, w
6650: 65 20 77 69 6c 6c 20 63 6f 6e 73 74 72 75 63 74 e will construct
6660: 20 74 68 65 20 61 63 74 75 61 6c 20 73 77 69 74 the actual swit
6670: 63 68 65 73 20 74 6f 20 62 65 20 70 61 73 73 65 ches to be passe
6680: 64 20 74 6f 20 74 68 65 0d 0a 23 20 63 6f 6d 70 d to the..# comp
6690: 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 iler and linker
66a0: 75 73 69 6e 67 20 74 68 65 20 6d 61 63 72 6f 73 using the macros
66b0: 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 defined in the
66c0: 70 72 65 76 69 6f 75 73 20 73 65 63 74 69 6f 6e previous section
66d0: 2e 0d 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 ...# The followi
66e0: 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 64 65 ng macros are de
66f0: 66 69 6e 65 64 20 62 79 20 74 68 69 73 20 73 65 fined by this se
6700: 63 74 69 6f 6e 20 62 61 73 65 64 20 6f 6e 20 4f ction based on O
6710: 50 54 53 0d 0a 23 20 53 54 41 54 49 43 5f 42 55 PTS..# STATIC_BU
6720: 49 4c 44 20 2d 20 30 20 2d 3e 20 54 63 6c 20 69 ILD - 0 -> Tcl i
6730: 73 20 74 6f 20 62 65 20 62 75 69 6c 74 20 61 73 s to be built as
6740: 20 61 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 a shared librar
6750: 79 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 y..#
6760: 20 20 20 20 31 20 2d 3e 20 62 75 69 6c 64 20 61 1 -> build a
6770: 73 20 61 20 73 74 61 74 69 63 20 6c 69 62 72 61 s a static libra
6780: 72 79 20 61 6e 64 20 73 68 65 6c 6c 0d 0a 23 20 ry and shell..#
6790: 54 43 4c 5f 54 48 52 45 41 44 53 20 2d 20 6c 65 TCL_THREADS - le
67a0: 67 61 63 79 20 62 75 74 20 61 6c 77 61 79 73 20 gacy but always
67b0: 31 20 6f 6e 20 57 69 6e 64 6f 77 73 20 73 69 6e 1 on Windows sin
67c0: 63 65 20 77 69 6e 73 6f 63 6b 20 72 65 71 75 69 ce winsock requi
67d0: 72 65 73 20 69 74 2e 0d 0a 23 20 44 45 42 55 47 res it...# DEBUG
67e0: 20 2d 20 31 20 2d 3e 20 64 65 62 75 67 20 62 75 - 1 -> debug bu
67f0: 69 6c 64 2c 20 30 20 2d 3e 20 72 65 6c 65 61 73 ild, 0 -> releas
6800: 65 20 62 75 69 6c 64 73 0d 0a 23 20 53 59 4d 42 e builds..# SYMB
6810: 4f 4c 53 20 2d 20 31 20 2d 3e 20 67 65 6e 65 72 OLS - 1 -> gener
6820: 61 74 65 20 50 44 42 27 73 2c 20 30 20 2d 3e 20 ate PDB's, 0 ->
6830: 6e 6f 20 50 44 42 27 73 0d 0a 23 20 50 52 4f 46 no PDB's..# PROF
6840: 49 4c 45 20 2d 20 31 20 2d 3e 20 67 65 6e 65 72 ILE - 1 -> gener
6850: 61 74 65 20 70 72 6f 66 69 6c 69 6e 67 20 69 6e ate profiling in
6860: 66 6f 2c 20 30 20 2d 3e 20 6e 6f 20 70 72 6f 66 fo, 0 -> no prof
6870: 69 6c 69 6e 67 0d 0a 23 20 50 47 4f 20 20 20 20 iling..# PGO
6880: 20 2d 20 31 20 2d 3e 20 70 72 6f 66 69 6c 65 20 - 1 -> profile
6890: 62 61 73 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 based optimizati
68a0: 6f 6e 2c 20 30 20 2d 3e 20 6e 6f 0d 0a 23 20 4d on, 0 -> no..# M
68b0: 53 56 43 52 54 20 20 2d 20 31 20 2d 3e 20 6c 69 SVCRT - 1 -> li
68c0: 6e 6b 20 74 6f 20 64 79 6e 61 6d 69 63 20 43 20 nk to dynamic C
68d0: 72 75 6e 74 69 6d 65 20 65 76 65 6e 20 77 68 65 runtime even whe
68e0: 6e 20 62 75 69 6c 64 69 6e 67 20 73 74 61 74 69 n building stati
68f0: 63 20 54 63 6c 20 62 75 69 6c 64 0d 0a 23 20 20 c Tcl build..#
6900: 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 6c 69 0 -> li
6910: 6e 6b 20 74 6f 20 73 74 61 74 69 63 20 43 20 72 nk to static C r
6920: 75 6e 74 69 6d 65 20 66 6f 72 20 73 74 61 74 69 untime for stati
6930: 63 20 54 63 6c 20 62 75 69 6c 64 2e 0d 0a 23 20 c Tcl build...#
6940: 20 20 20 20 20 20 20 20 20 20 44 6f 65 73 20 6e Does n
6950: 6f 74 20 69 6d 70 61 63 74 20 73 68 61 72 65 64 ot impact shared
6960: 20 54 63 6c 20 62 75 69 6c 64 73 20 28 53 54 41 Tcl builds (STA
6970: 54 49 43 5f 42 55 49 4c 44 20 3d 3d 20 30 29 0d TIC_BUILD == 0).
6980: 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 65 66 .# Def
6990: 61 75 6c 74 3a 20 31 20 66 6f 72 20 54 63 6c 20 ault: 1 for Tcl
69a0: 39 2e 30 20 61 6e 64 20 75 70 2c 20 30 20 6f 74 9.0 and up, 0 ot
69b0: 68 65 72 77 69 73 65 2e 0d 0a 23 20 54 43 4c 5f herwise...# TCL_
69c0: 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 USE_STATIC_PACKA
69d0: 47 45 53 20 2d 20 31 20 2d 3e 20 73 74 61 74 69 GES - 1 -> stati
69e0: 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 68 65 20 72 cally link the r
69f0: 65 67 69 73 74 72 79 20 61 6e 64 20 64 64 65 20 egistry and dde
6a00: 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 20 20 extensions..#
6a10: 20 20 20 20 20 20 20 20 69 6e 20 74 68 65 20 54 in the T
6a20: 63 6c 20 61 6e 64 20 57 69 73 68 20 73 68 65 6c cl and Wish shel
6a30: 6c 2e 20 30 20 2d 3e 20 6b 65 65 70 20 74 68 65 l. 0 -> keep the
6a40: 6d 20 61 73 20 73 68 61 72 65 64 20 6c 69 62 72 m as shared libr
6a50: 61 72 69 65 73 2e 20 44 6f 65 73 0d 0a 23 20 20 aries. Does..#
6a60: 20 20 20 20 20 20 20 20 20 6e 6f 74 20 69 6d 70 not imp
6a70: 61 63 74 20 73 68 61 72 65 64 20 54 63 6c 20 62 act shared Tcl b
6a80: 75 69 6c 64 73 2e 20 49 6d 70 6c 69 65 64 20 62 uilds. Implied b
6a90: 79 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 73 y STATIC_BUILD s
6aa0: 69 6e 63 65 20 54 63 6c 20 39 2e 30 2e 0d 0a 23 ince Tcl 9.0...#
6ab0: 20 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f USE_THREAD_ALLO
6ac0: 43 20 2d 20 31 20 2d 3e 20 55 73 65 20 61 20 73 C - 1 -> Use a s
6ad0: 68 61 72 65 64 20 67 6c 6f 62 61 6c 20 66 72 65 hared global fre
6ae0: 65 20 70 6f 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 e pool for alloc
6af0: 61 74 69 6f 6e 2e 0d 0a 23 20 20 20 20 20 20 20 ation...#
6b00: 20 20 20 20 30 20 2d 3e 20 55 73 65 20 74 68 65 0 -> Use the
6b10: 20 6e 6f 6e 2d 74 68 72 65 61 64 20 61 6c 6c 6f non-thread allo
6b20: 63 61 74 6f 72 2e 0d 0a 23 20 55 4e 43 48 45 43 cator...# UNCHEC
6b30: 4b 45 44 20 2d 20 31 20 2d 3e 20 77 68 65 6e 20 KED - 1 -> when
6b40: 64 6f 69 6e 67 20 61 20 64 65 62 75 67 20 62 75 doing a debug bu
6b50: 69 6c 64 20 77 69 74 68 20 73 79 6d 62 6f 6c 73 ild with symbols
6b60: 2c 20 75 73 65 20 74 68 65 20 72 65 6c 65 61 73 , use the releas
6b70: 65 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 43 e..# C
6b80: 20 72 75 6e 74 69 6d 65 2c 20 30 20 2d 3e 20 75 runtime, 0 -> u
6b90: 73 65 20 74 68 65 20 64 65 62 75 67 20 43 20 72 se the debug C r
6ba0: 75 6e 74 69 6d 65 2e 0d 0a 23 20 55 53 45 5f 53 untime...# USE_S
6bb0: 54 55 42 53 20 2d 20 31 20 2d 3e 20 63 6f 6d 70 TUBS - 1 -> comp
6bc0: 69 6c 65 20 74 6f 20 75 73 65 20 73 74 75 62 73 ile to use stubs
6bd0: 20 69 6e 74 65 72 66 61 63 65 73 2c 20 30 20 2d interfaces, 0 -
6be0: 3e 20 64 69 72 65 63 74 20 6c 69 6e 6b 69 6e 67 > direct linking
6bf0: 0d 0a 23 20 43 4f 4e 46 49 47 5f 43 48 45 43 4b ..# CONFIG_CHECK
6c00: 20 2d 20 31 20 2d 3e 20 63 68 65 63 6b 20 63 75 - 1 -> check cu
6c10: 72 72 65 6e 74 20 62 75 69 6c 64 20 63 6f 6e 66 rrent build conf
6c20: 69 67 75 72 61 74 69 6f 6e 20 61 67 61 69 6e 73 iguration agains
6c30: 74 20 54 63 6c 0d 0a 23 20 20 20 20 20 20 20 20 t Tcl..#
6c40: 20 20 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e configuration
6c50: 20 28 69 67 6e 6f 72 65 64 20 66 6f 72 20 54 63 (ignored for Tc
6c60: 6c 20 69 74 73 65 6c 66 29 0d 0a 23 20 5f 55 53 l itself)..# _US
6c70: 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 20 2d E_64BIT_TIME_T -
6c80: 20 66 6f 72 63 65 73 20 61 20 62 75 69 6c 64 20 forces a build
6c90: 75 73 69 6e 67 20 36 34 2d 62 69 74 20 74 69 6d using 64-bit tim
6ca0: 65 5f 74 20 66 6f 72 20 33 32 2d 62 69 74 20 62 e_t for 32-bit b
6cb0: 75 69 6c 64 0d 0a 23 20 20 20 20 20 20 20 20 20 uild..#
6cc0: 20 20 28 43 52 54 20 6c 69 62 72 61 72 79 20 73 (CRT library s
6cd0: 68 6f 75 6c 64 20 73 75 70 70 6f 72 74 20 74 68 hould support th
6ce0: 69 73 2c 20 6e 6f 74 20 6e 65 65 64 65 64 20 66 is, not needed f
6cf0: 6f 72 20 54 63 6c 20 39 2e 78 29 0d 0a 23 20 46 or Tcl 9.x)..# F
6d00: 75 72 74 68 65 72 2c 20 4c 49 4e 4b 45 52 46 4c urther, LINKERFL
6d10: 41 47 53 20 61 72 65 20 6d 6f 64 69 66 69 65 64 AGS are modified
6d20: 20 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 2e based on above.
6d30: 0d 0a 0d 0a 23 20 44 65 66 61 75 6c 74 20 76 61 ....# Default va
6d40: 6c 75 65 73 20 66 6f 72 20 61 6c 6c 20 74 68 65 lues for all the
6d50: 20 61 62 6f 76 65 0d 0a 53 54 41 54 49 43 5f 42 above..STATIC_B
6d60: 55 49 4c 44 09 3d 20 30 0d 0a 54 43 4c 5f 54 48 UILD.= 0..TCL_TH
6d70: 52 45 41 44 53 09 3d 20 31 0d 0a 44 45 42 55 47 READS.= 1..DEBUG
6d80: 09 09 3d 20 30 0d 0a 53 59 4d 42 4f 4c 53 09 09 ..= 0..SYMBOLS..
6d90: 3d 20 30 0d 0a 50 52 4f 46 49 4c 45 09 09 3d 20 = 0..PROFILE..=
6da0: 30 0d 0a 50 47 4f 09 09 3d 20 30 0d 0a 4d 53 56 0..PGO..= 0..MSV
6db0: 43 52 54 09 09 3d 20 31 0d 0a 54 43 4c 5f 55 53 CRT..= 1..TCL_US
6dc0: 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 47 45 E_STATIC_PACKAGE
6dd0: 53 09 3d 20 30 0d 0a 55 53 45 5f 54 48 52 45 41 S.= 0..USE_THREA
6de0: 44 5f 41 4c 4c 4f 43 20 3d 20 31 0d 0a 55 4e 43 D_ALLOC = 1..UNC
6df0: 48 45 43 4b 45 44 09 3d 20 30 0d 0a 43 4f 4e 46 HECKED.= 0..CONF
6e00: 49 47 5f 43 48 45 43 4b 20 20 20 20 3d 20 31 0d IG_CHECK = 1.
6e10: 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c .!if $(DOING_TCL
6e20: 29 0d 0a 55 53 45 5f 53 54 55 42 53 20 20 20 20 )..USE_STUBS
6e30: 20 20 20 3d 20 30 0d 0a 21 65 6c 73 65 0d 0a 55 = 0..!else..U
6e40: 53 45 5f 53 54 55 42 53 20 20 20 20 20 20 20 3d SE_STUBS =
6e50: 20 31 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 1..!endif....#
6e60: 49 66 20 4f 50 54 53 20 69 73 20 6e 6f 74 20 65 If OPTS is not e
6e70: 6d 70 74 79 20 41 4e 44 20 64 6f 65 73 20 6e 6f mpty AND does no
6e80: 74 20 63 6f 6e 74 61 69 6e 20 22 6e 6f 6e 65 22 t contain "none"
6e90: 20 77 68 69 63 68 20 74 75 72 6e 73 20 6f 66 66 which turns off
6ea0: 20 61 6c 6c 20 4f 50 54 53 0d 0a 23 20 73 65 74 all OPTS..# set
6eb0: 20 74 68 65 20 61 62 6f 76 65 20 6d 61 63 72 6f the above macro
6ec0: 73 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 20 s based on OPTS
6ed0: 63 6f 6e 74 65 6e 74 0d 0a 21 69 66 20 22 24 28 content..!if "$(
6ee0: 4f 50 54 53 29 22 20 21 3d 20 22 22 20 26 26 20 OPTS)" != "" &&
6ef0: 21 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 ![nmakehlp -f "$
6f00: 28 4f 50 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0d (OPTS)" "none"].
6f10: 0a 0d 0a 23 20 4f 50 54 53 20 61 72 65 20 73 70 ...# OPTS are sp
6f20: 65 63 69 66 69 65 64 2c 20 70 61 72 73 65 20 74 ecified, parse t
6f30: 68 65 6d 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b hem....!if [nmak
6f40: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
6f50: 22 73 74 61 74 69 63 22 5d 0d 0a 21 6d 65 73 73 "static"]..!mess
6f60: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 74 age *** Doing st
6f70: 61 74 69 63 0d 0a 53 54 41 54 49 43 5f 42 55 49 atic..STATIC_BUI
6f80: 4c 44 09 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a LD.= 1..!endif..
6f90: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
6fa0: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 73 74 -f $(OPTS) "nost
6fb0: 75 62 73 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 ubs"]..!message
6fc0: 2a 2a 2a 20 4e 6f 74 20 75 73 69 6e 67 20 73 74 *** Not using st
6fd0: 75 62 73 0d 0a 55 53 45 5f 53 54 55 42 53 09 3d ubs..USE_STUBS.=
6fe0: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 0..!endif....!i
6ff0: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
7000: 28 4f 50 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 (OPTS) "nomsvcrt
7010: 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a "]..!message ***
7020: 20 44 6f 69 6e 67 20 6e 6f 6d 73 76 63 72 74 0d Doing nomsvcrt.
7030: 0a 4d 53 56 43 52 54 09 09 3d 20 30 0d 0a 21 65 .MSVCRT..= 0..!e
7040: 6c 73 65 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 lse..!if [nmakeh
7050: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6d lp -f $(OPTS) "m
7060: 73 76 63 72 74 22 5d 0d 0a 21 6d 65 73 73 61 67 svcrt"]..!messag
7070: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6d 73 76 63 e *** Doing msvc
7080: 72 74 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 24 rt..!else..!if $
7090: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
70a0: 4f 4e 29 20 3d 3d 20 38 20 26 26 20 24 28 54 43 ON) == 8 && $(TC
70b0: 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MINOR_VERSION)
70c0: 20 3c 20 37 20 26 26 20 24 28 53 54 41 54 49 43 < 7 && $(STATIC
70d0: 5f 42 55 49 4c 44 29 0d 0a 4d 53 56 43 52 54 09 _BUILD)..MSVCRT.
70e0: 09 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 .= 0..!endif..!e
70f0: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 23 20 5b ndif..!endif # [
7100: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
7110: 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 22 5d 0d TS) "nomsvcrt"].
7120: 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ...!if [nmakehlp
7130: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 -f $(OPTS) "sta
7140: 74 69 63 70 6b 67 22 5d 20 26 26 20 24 28 53 54 ticpkg"] && $(ST
7150: 41 54 49 43 5f 42 55 49 4c 44 29 0d 0a 21 6d 65 ATIC_BUILD)..!me
7160: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7170: 73 74 61 74 69 63 70 6b 67 0d 0a 54 43 4c 5f 55 staticpkg..TCL_U
7180: 53 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 47 SE_STATIC_PACKAG
7190: 45 53 09 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a ES.= 1..!endif..
71a0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
71b0: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 74 68 -f $(OPTS) "noth
71c0: 72 65 61 64 73 22 5d 0d 0a 21 6d 65 73 73 61 67 reads"]..!messag
71d0: 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 20 65 78 e *** Compile ex
71e0: 70 6c 69 63 69 74 6c 79 20 66 6f 72 20 6e 6f 6e plicitly for non
71f0: 2d 74 68 72 65 61 64 65 64 20 74 63 6c 0d 0a 54 -threaded tcl..T
7200: 43 4c 5f 54 48 52 45 41 44 53 20 3d 20 30 0d 0a CL_THREADS = 0..
7210: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
7220: 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 = 0..!endif....!
7230: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7240: 24 28 4f 50 54 53 29 20 22 74 63 6c 38 22 5d 0d $(OPTS) "tcl8"].
7250: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 42 75 .!message *** Bu
7260: 69 6c 64 20 66 6f 72 20 54 63 6c 38 0d 0a 54 43 ild for Tcl8..TC
7270: 4c 5f 42 55 49 4c 44 5f 46 4f 52 20 3d 20 38 0d L_BUILD_FOR = 8.
7280: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 .!endif....!if $
7290: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
72a0: 4f 4e 29 20 3d 3d 20 38 0d 0a 21 69 66 20 5b 6e ON) == 8..!if [n
72b0: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
72c0: 53 29 20 22 74 69 6d 65 36 34 62 69 74 22 5d 0d S) "time64bit"].
72d0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 46 6f .!message *** Fo
72e0: 72 63 65 20 36 34 2d 62 69 74 20 74 69 6d 65 5f rce 64-bit time_
72f0: 74 0d 0a 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 t.._USE_64BIT_TI
7300: 4d 45 5f 54 20 3d 20 31 0d 0a 21 65 6e 64 69 66 ME_T = 1..!endif
7310: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 59 65 ..!endif....# Ye
7320: 73 2c 20 69 74 27 73 20 77 65 69 72 64 20 74 68 s, it's weird th
7330: 61 74 20 74 68 65 20 22 73 79 6d 62 6f 6c 73 22 at the "symbols"
7340: 20 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 option controls
7350: 20 44 45 42 55 47 20 61 6e 64 0d 0a 23 20 74 68 DEBUG and..# th
7360: 65 20 22 70 64 62 73 22 20 6f 70 74 69 6f 6e 20 e "pdbs" option
7370: 63 6f 6e 74 72 6f 6c 73 20 53 59 4d 42 4f 4c 53 controls SYMBOLS
7380: 2e 20 54 68 61 74 27 73 20 68 69 73 74 6f 72 69 . That's histori
7390: 63 61 6c 2e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 cal...!if [nmake
73a0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
73b0: 73 79 6d 62 6f 6c 73 22 5d 0d 0a 21 6d 65 73 73 symbols"]..!mess
73c0: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 79 age *** Doing sy
73d0: 6d 62 6f 6c 73 0d 0a 44 45 42 55 47 09 09 3d 20 mbols..DEBUG..=
73e0: 31 0d 0a 21 65 6c 73 65 0d 0a 44 45 42 55 47 09 1..!else..DEBUG.
73f0: 09 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a .= 0..!endif....
7400: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7410: 20 24 28 4f 50 54 53 29 20 22 70 64 62 73 22 5d $(OPTS) "pdbs"]
7420: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ..!message *** D
7430: 6f 69 6e 67 20 70 64 62 73 0d 0a 53 59 4d 42 4f oing pdbs..SYMBO
7440: 4c 53 09 09 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a LS..= 1..!else..
7450: 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0d 0a 21 65 SYMBOLS..= 0..!e
7460: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 ndif....!if [nma
7470: 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 kehlp -f $(OPTS)
7480: 20 22 70 72 6f 66 69 6c 65 22 5d 0d 0a 21 6d 65 "profile"]..!me
7490: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
74a0: 70 72 6f 66 69 6c 65 0d 0a 50 52 4f 46 49 4c 45 profile..PROFILE
74b0: 09 09 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 50 52 ..= 1..!else..PR
74c0: 4f 46 49 4c 45 09 09 3d 20 30 0d 0a 21 65 6e 64 OFILE..= 0..!end
74d0: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 if....!if [nmake
74e0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
74f0: 70 67 69 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 pgi"]..!message
7500: 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c *** Doing profil
7510: 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a e guided optimiz
7520: 61 74 69 6f 6e 20 69 6e 73 74 72 75 6d 65 6e 74 ation instrument
7530: 61 74 69 6f 6e 0d 0a 50 47 4f 09 09 3d 20 31 0d ation..PGO..= 1.
7540: 0a 21 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 .!elseif [nmakeh
7550: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 lp -f $(OPTS) "p
7560: 67 6f 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a go"]..!message *
7570: 2a 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 ** Doing profile
7580: 20 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 guided optimiza
7590: 74 69 6f 6e 0d 0a 50 47 4f 09 09 3d 20 32 0d 0a tion..PGO..= 2..
75a0: 21 65 6c 73 65 0d 0a 50 47 4f 09 09 3d 20 30 0d !else..PGO..= 0.
75b0: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b .!endif....!if [
75c0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
75d0: 54 53 29 20 22 6c 6f 69 6d 70 61 63 74 22 5d 0d TS) "loimpact"].
75e0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 57 61 .!message *** Wa
75f0: 72 6e 69 6e 67 3a 20 69 67 6e 6f 72 69 6e 67 20 rning: ignoring
7600: 6f 70 74 69 6f 6e 20 22 6c 6f 69 6d 70 61 63 74 option "loimpact
7610: 22 20 2d 20 64 65 70 72 65 63 61 74 65 64 20 6f " - deprecated o
7620: 6e 20 6d 6f 64 65 72 6e 20 57 69 6e 64 6f 77 73 n modern Windows
7630: 2e 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 54 ...!endif....# T
7640: 42 44 20 2d 20 73 68 6f 75 6c 64 20 67 65 74 20 BD - should get
7650: 72 69 64 20 6f 66 20 74 68 69 73 20 6f 70 74 69 rid of this opti
7660: 6f 6e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c on..!if [nmakehl
7670: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 74 68 p -f $(OPTS) "th
7680: 72 64 61 6c 6c 6f 63 22 5d 0d 0a 21 6d 65 73 73 rdalloc"]..!mess
7690: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 74 68 age *** Doing th
76a0: 72 64 61 6c 6c 6f 63 0d 0a 55 53 45 5f 54 48 52 rdalloc..USE_THR
76b0: 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 31 0d 0a 21 EAD_ALLOC = 1..!
76c0: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d endif....!if [nm
76d0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
76e0: 29 20 22 74 63 6c 61 6c 6c 6f 63 22 5d 0d 0a 55 ) "tclalloc"]..U
76f0: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 SE_THREAD_ALLOC
7700: 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 = 0..!endif....!
7710: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7720: 24 28 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b $(OPTS) "uncheck
7730: 65 64 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a ed"]..!message *
7740: 2a 2a 20 44 6f 69 6e 67 20 75 6e 63 68 65 63 6b ** Doing uncheck
7750: 65 64 0d 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 ed..UNCHECKED =
7760: 31 0d 0a 21 65 6c 73 65 0d 0a 55 4e 43 48 45 43 1..!else..UNCHEC
7770: 4b 45 44 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d KED = 0..!endif.
7780: 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ...!if [nmakehlp
7790: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 63 -f $(OPTS) "noc
77a0: 6f 6e 66 69 67 63 68 65 63 6b 22 5d 0d 0a 43 4f onfigcheck"]..CO
77b0: 4e 46 49 47 5f 43 48 45 43 4b 20 3d 20 31 0d 0a NFIG_CHECK = 1..
77c0: 21 65 6c 73 65 0d 0a 43 4f 4e 46 49 47 5f 43 48 !else..CONFIG_CH
77d0: 45 43 4b 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d ECK = 0..!endif.
77e0: 0a 0d 0a 21 65 6e 64 69 66 20 23 20 22 24 28 4f ...!endif # "$(O
77f0: 50 54 53 29 22 20 21 3d 20 22 22 20 20 26 26 20 PTS)" != "" &&
7800: 2e 2e 2e 20 70 61 72 73 69 6e 67 20 6f 66 20 4f ... parsing of O
7810: 50 54 53 0d 0a 0d 0a 23 20 53 65 74 20 6c 69 6e PTS....# Set lin
7820: 6b 65 72 20 66 6c 61 67 73 20 62 61 73 65 64 20 ker flags based
7830: 6f 6e 20 61 62 6f 76 65 0d 0a 0d 0a 21 69 66 20 on above....!if
7840: 24 28 50 47 4f 29 20 3e 20 31 0d 0a 21 69 66 20 $(PGO) > 1..!if
7850: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 [nmakehlp -l -lt
7860: 63 67 3a 70 67 6f 70 74 69 6d 69 7a 65 20 24 28 cg:pgoptimize $(
7870: 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 LINKER_TESTFLAGS
7880: 29 5d 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 )]..LINKERFLAGS.
7890: 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a = $(LINKERFLAGS:
78a0: 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 -ltcg=) -ltcg:pg
78b0: 6f 70 74 69 6d 69 7a 65 0d 0a 21 65 6c 73 65 0d optimize..!else.
78c0: 0a 4d 53 47 3d 5e 0d 0a 54 68 69 73 20 63 6f 6d .MSG=^..This com
78d0: 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 73 piler does not s
78e0: 75 70 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 67 upport profile g
78f0: 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 uided optimizati
7900: 6f 6e 2e 0d 0a 21 65 72 72 6f 72 20 24 28 4d 53 on...!error $(MS
7910: 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 G)..!endif..!els
7920: 65 69 66 20 24 28 50 47 4f 29 20 3e 20 30 0d 0a eif $(PGO) > 0..
7930: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c !if [nmakehlp -l
7940: 20 2d 6c 74 63 67 3a 70 67 69 6e 73 74 72 75 6d -ltcg:pginstrum
7950: 65 6e 74 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 ent $(LINKER_TES
7960: 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b 45 52 TFLAGS)]..LINKER
7970: 46 4c 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 52 FLAGS.= $(LINKER
7980: 46 4c 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c FLAGS:-ltcg=) -l
7990: 74 63 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 tcg:pginstrument
79a0: 0d 0a 21 65 6c 73 65 0d 0a 4d 53 47 3d 5e 0d 0a ..!else..MSG=^..
79b0: 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 6f This compiler do
79c0: 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 70 es not support p
79d0: 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 rofile guided op
79e0: 74 69 6d 69 7a 61 74 69 6f 6e 2e 0d 0a 21 65 72 timization...!er
79f0: 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 ror $(MSG)..!end
7a00: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 if..!endif....##
7a10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a ##############..
7a50: 23 20 38 2e 20 50 61 72 73 65 20 74 68 65 20 53 # 8. Parse the S
7a60: 54 41 54 53 20 6d 61 63 72 6f 20 74 6f 20 63 6f TATS macro to co
7a70: 6e 66 69 67 75 72 65 20 63 6f 64 65 20 69 6e 73 nfigure code ins
7a80: 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0d 0a 23 20 trumentation..#
7a90: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
7aa0: 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 79 20 cros are set by
7ab0: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23 this section:..#
7ac0: 20 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 20 2d TCL_MEM_DEBUG -
7ad0: 20 31 20 2d 3e 20 65 6e 61 62 6c 65 73 20 6d 65 1 -> enables me
7ae0: 6d 6f 72 79 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 mory allocation
7af0: 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0d instrumentation.
7b00: 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .#
7b10: 20 20 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0 -> disables
7b20: 0d 0a 23 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f ..# TCL_COMPILE_
7b30: 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 DEBUG - 1 -> ena
7b40: 62 6c 65 73 20 62 79 74 65 20 63 6f 6d 70 69 6c bles byte compil
7b50: 65 72 20 6c 6f 67 67 69 6e 67 0d 0a 23 20 20 20 er logging..#
7b60: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7b70: 20 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0d 0 -> disables.
7b80: 0a 0d 0a 23 20 44 65 66 61 75 6c 74 20 62 6f 74 ...# Default bot
7b90: 68 20 61 72 65 20 6f 66 66 0d 0a 54 43 4c 5f 4d h are off..TCL_M
7ba0: 45 4d 5f 44 45 42 55 47 09 20 20 20 20 3d 20 30 EM_DEBUG. = 0
7bb0: 0d 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 ..TCL_COMPILE_DE
7bc0: 42 55 47 20 20 20 3d 20 30 0d 0a 0d 0a 21 69 66 BUG = 0....!if
7bd0: 20 22 24 28 53 54 41 54 53 29 22 20 21 3d 20 22 "$(STATS)" != "
7be0: 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 20 " && ![nmakehlp
7bf0: 2d 66 20 22 24 28 53 54 41 54 53 29 22 20 22 6e -f "$(STATS)" "n
7c00: 6f 6e 65 22 5d 0d 0a 0d 0a 21 69 66 20 5b 6e 6d one"]....!if [nm
7c10: 61 6b 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 akehlp -f $(STAT
7c20: 53 29 20 22 6d 65 6d 64 62 67 22 5d 0d 0a 21 6d S) "memdbg"]..!m
7c30: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7c40: 20 6d 65 6d 64 62 67 0d 0a 54 43 4c 5f 4d 45 4d memdbg..TCL_MEM
7c50: 5f 44 45 42 55 47 09 20 20 20 20 3d 20 31 0d 0a _DEBUG. = 1..
7c60: 21 65 6c 73 65 0d 0a 54 43 4c 5f 4d 45 4d 5f 44 !else..TCL_MEM_D
7c70: 45 42 55 47 09 20 20 20 20 3d 20 30 0d 0a 21 65 EBUG. = 0..!e
7c80: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 ndif....!if [nma
7c90: 6b 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 kehlp -f $(STATS
7ca0: 29 20 22 63 6f 6d 70 64 62 67 22 5d 0d 0a 21 6d ) "compdbg"]..!m
7cb0: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7cc0: 20 63 6f 6d 70 64 62 67 0d 0a 54 43 4c 5f 43 4f compdbg..TCL_CO
7cd0: 4d 50 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 MPILE_DEBUG =
7ce0: 31 0d 0a 21 65 6c 73 65 0d 0a 54 43 4c 5f 43 4f 1..!else..TCL_CO
7cf0: 4d 50 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 MPILE_DEBUG =
7d00: 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 0..!endif....!en
7d10: 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 dif....#########
7d20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d50: 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 39 ###########..# 9
7d60: 2e 20 50 61 72 73 65 20 74 68 65 20 43 48 45 43 . Parse the CHEC
7d70: 4b 53 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 KS macro to conf
7d80: 69 67 75 72 65 20 61 64 64 69 74 69 6f 6e 61 6c igure additional
7d90: 20 63 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 compiler checks
7da0: 0d 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e ..# The followin
7db0: 67 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 g macros are set
7dc0: 20 62 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e by this section
7dd0: 3a 0d 0a 23 20 57 41 52 4e 49 4e 47 53 20 2d 20 :..# WARNINGS -
7de0: 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 compiler switche
7df0: 73 20 74 68 61 74 20 63 6f 6e 74 72 6f 6c 20 74 s that control t
7e00: 68 65 20 77 61 72 6e 69 6e 67 73 20 6c 65 76 65 he warnings leve
7e10: 6c 0d 0a 23 20 54 43 4c 5f 4e 4f 5f 44 45 50 52 l..# TCL_NO_DEPR
7e20: 45 43 41 54 45 44 20 2d 20 31 20 2d 3e 20 64 69 ECATED - 1 -> di
7e30: 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f sable support fo
7e40: 72 20 64 65 70 72 65 63 61 74 65 64 20 66 75 6e r deprecated fun
7e50: 63 74 69 6f 6e 73 0d 0a 23 20 20 20 20 20 20 20 ctions..#
7e60: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 0
7e70: 2d 3e 20 65 6e 61 62 6c 65 20 64 65 70 72 65 63 -> enable deprec
7e80: 61 74 65 64 20 66 75 6e 63 74 69 6f 6e 73 0d 0a ated functions..
7e90: 0d 0a 23 20 44 65 66 61 75 6c 74 73 20 2d 20 50 ..# Defaults - P
7ea0: 65 72 6d 69 74 20 64 65 70 72 65 63 61 74 65 64 ermit deprecated
7eb0: 20 66 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 77 functions and w
7ec0: 61 72 6e 69 6e 67 20 6c 65 76 65 6c 20 33 0d 0a arning level 3..
7ed0: 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 TCL_NO_DEPRECATE
7ee0: 44 09 20 20 20 20 3d 20 30 0d 0a 57 41 52 4e 49 D. = 0..WARNI
7ef0: 4e 47 53 09 09 20 20 20 20 3d 20 2d 57 33 0d 0a NGS.. = -W3..
7f00: 0d 0a 21 69 66 20 22 24 28 43 48 45 43 4b 53 29 ..!if "$(CHECKS)
7f10: 22 20 21 3d 20 22 22 20 26 26 20 21 5b 6e 6d 61 " != "" && ![nma
7f20: 6b 65 68 6c 70 20 2d 66 20 22 24 28 43 48 45 43 kehlp -f "$(CHEC
7f30: 4b 53 29 22 20 22 6e 6f 6e 65 22 5d 0d 0a 0d 0a KS)" "none"]....
7f40: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7f50: 20 24 28 43 48 45 43 4b 53 29 20 22 6e 6f 64 65 $(CHECKS) "node
7f60: 70 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a p"]..!message **
7f70: 2a 20 44 6f 69 6e 67 20 6e 6f 64 65 70 20 63 68 * Doing nodep ch
7f80: 65 63 6b 0d 0a 54 43 4c 5f 4e 4f 5f 44 45 50 52 eck..TCL_NO_DEPR
7f90: 45 43 41 54 45 44 09 20 20 20 20 3d 20 31 0d 0a ECATED. = 1..
7fa0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e !endif....!if [n
7fb0: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 makehlp -f $(CHE
7fc0: 43 4b 53 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d CKS) "fullwarn"]
7fd0: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ..!message *** D
7fe0: 6f 69 6e 67 20 66 75 6c 6c 20 77 61 72 6e 69 6e oing full warnin
7ff0: 67 73 20 63 68 65 63 6b 0d 0a 57 41 52 4e 49 4e gs check..WARNIN
8000: 47 53 09 09 20 20 20 20 3d 20 2d 57 34 0d 0a 21 GS.. = -W4..!
8010: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 if [nmakehlp -l
8020: 2d 77 61 72 6e 3a 33 20 24 28 4c 49 4e 4b 45 52 -warn:3 $(LINKER
8030: 5f 54 45 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 _TESTFLAGS)]..LI
8040: 4e 4b 45 52 46 4c 41 47 53 09 09 20 20 20 20 3d NKERFLAGS.. =
8050: 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 $(LINKERFLAGS)
8060: 2d 77 61 72 6e 3a 33 0d 0a 21 65 6e 64 69 66 0d -warn:3..!endif.
8070: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b .!endif....!if [
8080: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 nmakehlp -f $(CH
8090: 45 43 4b 53 29 20 22 36 34 62 69 74 22 5d 20 26 ECKS) "64bit"] &
80a0: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d & [nmakehlp -c -
80b0: 57 70 36 34 5d 0d 0a 21 6d 65 73 73 61 67 65 20 Wp64]..!message
80c0: 2a 2a 2a 20 44 6f 69 6e 67 20 36 34 62 69 74 20 *** Doing 64bit
80d0: 70 6f 72 74 61 62 69 6c 69 74 79 20 77 61 72 6e portability warn
80e0: 69 6e 67 73 0d 0a 57 41 52 4e 49 4e 47 53 09 09 ings..WARNINGS..
80f0: 20 20 20 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 = $(WARNINGS
8100: 29 20 2d 57 70 36 34 0d 0a 21 65 6e 64 69 66 0d ) -Wp64..!endif.
8110: 0a 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a 23 ...!endif......#
8120: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8130: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8140: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8150: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0d ###############.
8160: 0a 23 20 31 30 2e 20 43 6f 6e 73 74 72 75 63 74 .# 10. Construct
8170: 20 6f 75 74 70 75 74 20 64 69 72 65 63 74 6f 72 output director
8180: 79 20 61 6e 64 20 66 69 6c 65 20 70 61 74 68 73 y and file paths
8190: 0d 0a 23 20 46 69 67 75 72 65 2d 6f 75 74 20 68 ..# Figure-out h
81a0: 6f 77 20 74 6f 20 6e 61 6d 65 20 6f 75 72 20 69 ow to name our i
81b0: 6e 74 65 72 6d 65 64 69 61 74 65 20 61 6e 64 20 ntermediate and
81c0: 6f 75 74 70 75 74 20 64 69 72 65 63 74 6f 72 69 output directori
81d0: 65 73 2e 0d 0a 23 20 49 6e 20 6f 72 64 65 72 20 es...# In order
81e0: 74 6f 20 61 76 6f 69 64 20 69 6e 61 64 76 65 72 to avoid inadver
81f0: 74 65 6e 74 20 6d 69 78 69 6e 67 20 6f 66 20 6f tent mixing of o
8200: 62 6a 65 63 74 20 66 69 6c 65 73 20 62 75 69 6c bject files buil
8210: 74 20 75 73 69 6e 67 0d 0a 23 20 64 69 66 66 65 t using..# diffe
8220: 72 65 6e 74 20 63 6f 6d 70 69 6c 65 72 73 2c 20 rent compilers,
8230: 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 build configurat
8240: 69 6f 6e 73 20 65 74 63 2e 2c 0d 0a 23 0d 0a 23 ions etc.,..#..#
8250: 20 4e 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 Naming conventi
8260: 6f 6e 20 28 73 75 66 66 69 78 65 73 29 3a 0d 0a on (suffixes):..
8270: 23 20 20 20 74 20 3d 20 66 75 6c 6c 20 74 68 72 # t = full thr
8280: 65 61 64 20 73 75 70 70 6f 72 74 2e 20 28 4e 6f ead support. (No
8290: 74 20 75 73 65 64 20 66 6f 72 20 54 63 6c 20 3e t used for Tcl >
82a0: 3d 20 39 2e 30 29 0d 0a 23 20 20 20 73 20 3d 20 = 9.0)..# s =
82b0: 73 74 61 74 69 63 20 6c 69 62 72 61 72 79 20 28 static library (
82c0: 61 73 20 6f 70 70 6f 73 65 64 20 74 6f 20 61 6e as opposed to an
82d0: 20 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 29 import library)
82e0: 0d 0a 23 20 20 20 67 20 3d 20 6c 69 6e 6b 65 64 ..# g = linked
82f0: 20 74 6f 20 74 68 65 20 64 65 62 75 67 20 65 6e to the debug en
8300: 61 62 6c 65 64 20 43 20 72 75 6e 2d 74 69 6d 65 abled C run-time
8310: 2e 0d 0a 23 20 20 20 78 20 3d 20 73 70 65 63 69 ...# x = speci
8320: 61 6c 20 73 74 61 74 69 63 20 62 75 69 6c 64 20 al static build
8330: 77 68 65 6e 20 69 74 20 6c 69 6e 6b 73 20 74 6f when it links to
8340: 20 74 68 65 20 64 79 6e 61 6d 69 63 20 43 20 72 the dynamic C r
8350: 75 6e 2d 74 69 6d 65 2e 0d 0a 23 0d 0a 23 20 54 un-time...#..# T
8360: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 he following mac
8370: 72 6f 73 20 61 72 65 20 73 65 74 20 69 6e 20 74 ros are set in t
8380: 68 69 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23 20 his section:..#
8390: 53 55 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 SUFX - the suffi
83a0: 78 20 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e x to use for bin
83b0: 61 72 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 aries based on a
83c0: 62 6f 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 bove naming conv
83d0: 65 6e 74 69 6f 6e 0d 0a 23 20 42 55 49 4c 44 44 ention..# BUILDD
83e0: 49 52 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c IRTOP - the topl
83f0: 65 76 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 evel default out
8400: 70 75 74 20 64 69 72 65 63 74 6f 72 79 0d 0a 23 put directory..#
8410: 20 20 20 20 20 20 69 73 20 6f 66 20 74 68 65 20 is of the
8420: 66 6f 72 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 form {Release,De
8430: 62 75 67 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f bug}[_AMD64][_CO
8440: 4d 50 49 4c 45 52 56 45 52 53 49 4f 4e 5d 0d 0a MPILERVERSION]..
8450: 23 20 54 4d 50 5f 44 49 52 20 2d 20 64 69 72 65 # TMP_DIR - dire
8460: 63 74 6f 72 79 20 77 68 65 72 65 20 6f 62 6a 65 ctory where obje
8470: 63 74 20 66 69 6c 65 73 20 61 72 65 20 63 72 65 ct files are cre
8480: 61 74 65 64 0d 0a 23 20 4f 55 54 5f 44 49 52 20 ated..# OUT_DIR
8490: 2d 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 - directory wher
84a0: 65 20 6f 75 74 70 75 74 20 65 78 65 63 75 74 61 e output executa
84b0: 62 6c 65 73 20 61 72 65 20 63 72 65 61 74 65 64 bles are created
84c0: 0d 0a 23 20 42 6f 74 68 20 54 4d 50 5f 44 49 52 ..# Both TMP_DIR
84d0: 20 61 6e 64 20 4f 55 54 5f 44 49 52 20 61 72 65 and OUT_DIR are
84e0: 20 64 65 66 61 75 6c 74 65 64 20 6f 6e 6c 79 20 defaulted only
84f0: 69 66 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 62 if not defined b
8500: 79 20 74 68 65 0d 0a 23 20 70 61 72 65 6e 74 20 y the..# parent
8510: 6d 61 6b 65 66 69 6c 65 20 28 6f 72 20 63 6f 6d makefile (or com
8520: 6d 61 6e 64 20 6c 69 6e 65 29 2e 20 54 68 65 20 mand line). The
8530: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 20 61 default values a
8540: 72 65 0d 0a 23 20 62 61 73 65 64 20 6f 6e 20 42 re..# based on B
8550: 55 49 4c 44 44 49 52 54 4f 50 2e 0d 0a 23 20 53 UILDDIRTOP...# S
8560: 54 55 42 50 52 45 46 49 58 20 2d 20 6e 61 6d 65 TUBPREFIX - name
8570: 20 6f 66 20 74 68 65 20 73 74 75 62 73 20 6c 69 of the stubs li
8580: 62 72 61 72 79 20 66 6f 72 20 74 68 69 73 20 70 brary for this p
8590: 72 6f 6a 65 63 74 0d 0a 23 20 50 52 4a 49 4d 50 roject..# PRJIMP
85a0: 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 61 74 LIB - output pat
85b0: 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 h of the generat
85c0: 65 64 20 70 72 6f 6a 65 63 74 20 69 6d 70 6f 72 ed project impor
85d0: 74 20 6c 69 62 72 61 72 79 0d 0a 23 20 50 52 4a t library..# PRJ
85e0: 4c 49 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f LIBNAME - name o
85f0: 66 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a f generated proj
8600: 65 63 74 20 6c 69 62 72 61 72 79 0d 0a 23 20 50 ect library..# P
8610: 52 4a 4c 49 42 20 20 20 20 20 2d 20 6f 75 74 70 RJLIB - outp
8620: 75 74 20 70 61 74 68 20 6f 66 20 67 65 6e 65 72 ut path of gener
8630: 61 74 65 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 ated project lib
8640: 72 61 72 79 0d 0a 23 20 50 52 4a 53 54 55 42 4c rary..# PRJSTUBL
8650: 49 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 IBNAME - name of
8660: 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 70 the generated p
8670: 72 6f 6a 65 63 74 20 73 74 75 62 73 20 6c 69 62 roject stubs lib
8680: 72 61 72 79 0d 0a 23 20 50 52 4a 53 54 55 42 4c rary..# PRJSTUBL
8690: 49 42 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 IB - output path
86a0: 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 of the generate
86b0: 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 73 20 d project stubs
86c0: 6c 69 62 72 61 72 79 0d 0a 23 20 52 45 53 46 49 library..# RESFI
86d0: 4c 45 20 2d 20 6f 75 74 70 75 74 20 72 65 73 6f LE - output reso
86e0: 75 72 63 65 20 66 69 6c 65 20 28 6f 6e 6c 79 20 urce file (only
86f0: 69 66 20 6e 6f 74 20 73 74 61 74 69 63 20 62 75 if not static bu
8700: 69 6c 64 29 0d 0a 0d 0a 53 55 46 58 09 20 20 20 ild)....SUFX.
8710: 20 3d 20 74 73 67 78 0d 0a 0d 0a 21 69 66 20 24 = tsgx....!if $
8720: 28 44 45 42 55 47 29 0d 0a 42 55 49 4c 44 44 49 (DEBUG)..BUILDDI
8730: 52 54 4f 50 20 3d 20 44 65 62 75 67 0d 0a 21 65 RTOP = Debug..!e
8740: 6c 73 65 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 lse..BUILDDIRTOP
8750: 20 3d 20 52 65 6c 65 61 73 65 0d 0a 21 65 6e 64 = Release..!end
8760: 69 66 0d 0a 0d 0a 21 69 66 20 22 24 28 4d 41 43 if....!if "$(MAC
8770: 48 49 4e 45 29 22 20 21 3d 20 22 49 58 38 36 22 HINE)" != "IX86"
8780: 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 ..BUILDDIRTOP =$
8790: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 24 28 (BUILDDIRTOP)_$(
87a0: 4d 41 43 48 49 4e 45 29 0d 0a 21 65 6e 64 69 66 MACHINE)..!endif
87b0: 0d 0a 21 69 66 20 24 28 56 43 56 45 52 29 20 3e ..!if $(VCVER) >
87c0: 20 36 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 6..BUILDDIRTOP
87d0: 3d 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f =$(BUILDDIRTOP)_
87e0: 56 43 24 28 56 43 56 45 52 29 0d 0a 21 65 6e 64 VC$(VCVER)..!end
87f0: 69 66 0d 0a 0d 0a 21 69 66 20 21 24 28 44 45 42 if....!if !$(DEB
8800: 55 47 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 UG) || $(TCL_VER
8810: 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 28 SION) > 86 || $(
8820: 44 45 42 55 47 29 20 26 26 20 24 28 55 4e 43 48 DEBUG) && $(UNCH
8830: 45 43 4b 45 44 29 0d 0a 53 55 46 58 09 20 20 20 ECKED)..SUFX.
8840: 20 3d 20 24 28 53 55 46 58 3a 67 3d 29 0d 0a 21 = $(SUFX:g=)..!
8850: 65 6e 64 69 66 0d 0a 0d 0a 54 4d 50 5f 44 49 52 endif....TMP_DIR
8860: 46 55 4c 4c 20 3d 20 2e 5c 24 28 42 55 49 4c 44 FULL = .\$(BUILD
8870: 44 49 52 54 4f 50 29 5c 24 28 50 52 4f 4a 45 43 DIRTOP)\$(PROJEC
8880: 54 29 5f 54 68 72 65 61 64 65 64 44 79 6e 61 6d T)_ThreadedDynam
8890: 69 63 53 74 61 74 69 63 58 0d 0a 0d 0a 21 69 66 icStaticX....!if
88a0: 20 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 !$(STATIC_BUILD
88b0: 29 0d 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d )..TMP_DIRFULL =
88c0: 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 53 $(TMP_DIRFULL:S
88d0: 74 61 74 69 63 3d 29 0d 0a 53 55 46 58 09 20 20 tatic=)..SUFX.
88e0: 20 20 3d 20 24 28 53 55 46 58 3a 73 3d 29 0d 0a = $(SUFX:s=)..
88f0: 45 58 54 09 20 20 20 20 3d 20 64 6c 6c 0d 0a 54 EXT. = dll..T
8900: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
8910: 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0d 0a MP_DIRFULL:X=)..
8920: 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 SUFX. = $(SUF
8930: 58 3a 78 3d 29 0d 0a 21 65 6c 73 65 0d 0a 54 4d X:x=)..!else..TM
8940: 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d P_DIRFULL = $(TM
8950: 50 5f 44 49 52 46 55 4c 4c 3a 44 79 6e 61 6d 69 P_DIRFULL:Dynami
8960: 63 3d 29 0d 0a 45 58 54 09 20 20 20 20 3d 20 6c c=)..EXT. = l
8970: 69 62 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 54 ib..!if $(MSVCRT
8980: 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 49 ) && $(TCL_VERSI
8990: 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 21 24 28 4d ON) > 86 || !$(M
89a0: 53 56 43 52 54 29 20 26 26 20 24 28 54 43 4c 5f SVCRT) && $(TCL_
89b0: 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0d 0a 54 VERSION) < 87..T
89c0: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
89d0: 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0d 0a MP_DIRFULL:X=)..
89e0: 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 SUFX. = $(SUF
89f0: 58 3a 78 3d 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 X:x=)..!endif..!
8a00: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 21 24 28 endif....!if !$(
8a10: 54 43 4c 5f 54 48 52 45 41 44 53 29 20 7c 7c 20 TCL_THREADS) ||
8a20: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e $(TCL_VERSION) >
8a30: 20 38 36 0d 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 86..TMP_DIRFULL
8a40: 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c = $(TMP_DIRFULL
8a50: 3a 54 68 72 65 61 64 65 64 3d 29 0d 0a 53 55 46 :Threaded=)..SUF
8a60: 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a 74 X. = $(SUFX:t
8a70: 3d 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 =)..!endif....!i
8a80: 66 6e 64 65 66 20 54 4d 50 5f 44 49 52 0d 0a 54 fndef TMP_DIR..T
8a90: 4d 50 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 MP_DIR. = $(T
8aa0: 4d 50 5f 44 49 52 46 55 4c 4c 29 0d 0a 21 69 66 MP_DIRFULL)..!if
8ab0: 6e 64 65 66 20 4f 55 54 5f 44 49 52 0d 0a 4f 55 ndef OUT_DIR..OU
8ac0: 54 5f 44 49 52 09 20 20 20 20 3d 20 2e 5c 24 28 T_DIR. = .\$(
8ad0: 42 55 49 4c 44 44 49 52 54 4f 50 29 0d 0a 21 65 BUILDDIRTOP)..!e
8ae0: 6e 64 69 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 ndif..!else..!if
8af0: 6e 64 65 66 20 4f 55 54 5f 44 49 52 0d 0a 4f 55 ndef OUT_DIR..OU
8b00: 54 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d T_DIR. = $(TM
8b10: 50 5f 44 49 52 29 0d 0a 21 65 6e 64 69 66 0d 0a P_DIR)..!endif..
8b20: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 52 65 6c 61 !endif....# Rela
8b30: 74 69 76 65 20 70 61 74 68 73 20 2d 3e 20 61 62 tive paths -> ab
8b40: 73 6f 6c 75 74 65 0d 0a 21 69 66 20 5b 65 63 68 solute..!if [ech
8b50: 6f 20 4f 55 54 5f 44 49 52 20 3d 20 5c 3e 20 6e o OUT_DIR = \> n
8b60: 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a makehlp.out] \..
8b70: 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 || [nmakehlp
8b80: 2d 51 20 22 24 28 4f 55 54 5f 44 49 52 29 22 20 -Q "$(OUT_DIR)"
8b90: 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d >> nmakehlp.out]
8ba0: 0d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 ..!error *** Cou
8bb0: 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 ld not fully qua
8bc0: 6c 69 66 79 20 70 61 74 68 20 4f 55 54 5f 44 49 lify path OUT_DI
8bd0: 52 3d 24 28 4f 55 54 5f 44 49 52 29 0d 0a 21 65 R=$(OUT_DIR)..!e
8be0: 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 ndif..!if [echo
8bf0: 54 4d 50 5f 44 49 52 20 3d 20 5c 3e 3e 20 6e 6d TMP_DIR = \>> nm
8c00: 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 akehlp.out] \..
8c10: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d || [nmakehlp -
8c20: 51 20 22 24 28 54 4d 50 5f 44 49 52 29 22 20 3e Q "$(TMP_DIR)" >
8c30: 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d > nmakehlp.out].
8c40: 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c .!error *** Coul
8c50: 64 20 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 6c d not fully qual
8c60: 69 66 79 20 70 61 74 68 20 54 4d 50 5f 44 49 52 ify path TMP_DIR
8c70: 3d 24 28 54 4d 50 5f 44 49 52 29 0d 0a 21 65 6e =$(TMP_DIR)..!en
8c80: 64 69 66 0d 0a 21 69 6e 63 6c 75 64 65 20 6e 6d dif..!include nm
8c90: 61 6b 65 68 6c 70 2e 6f 75 74 0d 0a 0d 0a 23 20 akehlp.out....#
8ca0: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 The name of the
8cb0: 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f stubs library fo
8cc0: 72 20 74 68 65 20 70 72 6f 6a 65 63 74 20 62 65 r the project be
8cd0: 69 6e 67 20 62 75 69 6c 74 0d 0a 53 54 55 42 50 ing built..STUBP
8ce0: 52 45 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 REFIX = $(P
8cf0: 52 4f 4a 45 43 54 29 73 74 75 62 0d 0a 0d 0a 23 ROJECT)stub....#
8d00: 0d 0a 23 20 53 65 74 20 75 70 20 70 61 74 68 73 ..# Set up paths
8d10: 20 74 6f 20 76 61 72 69 6f 75 73 20 54 63 6c 20 to various Tcl
8d20: 65 78 65 63 75 74 61 62 6c 65 73 20 61 6e 64 20 executables and
8d30: 6c 69 62 72 61 72 69 65 73 20 6e 65 65 64 65 64 libraries needed
8d40: 20 62 79 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a by extensions..
8d50: 23 0d 0a 0d 0a 23 20 54 49 50 20 34 33 30 2e 20 #....# TIP 430.
8d60: 55 6e 75 73 65 64 20 66 6f 72 20 38 2e 36 20 62 Unused for 8.6 b
8d70: 75 74 20 6e 6f 20 68 61 72 6d 20 64 65 66 69 6e ut no harm defin
8d80: 69 6e 67 20 69 74 20 74 6f 20 61 6c 6c 6f 77 20 ing it to allow
8d90: 61 20 63 6f 6d 6d 6f 6e 20 72 75 6c 65 73 2e 76 a common rules.v
8da0: 63 0d 0a 54 43 4c 5f 5a 49 50 5f 46 49 4c 45 20 c..TCL_ZIP_FILE
8db0: 3d 20 6c 69 62 74 63 6c 24 28 54 43 4c 5f 4d 41 = libtcl$(TCL_MA
8dc0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 JOR_VERSION).$(T
8dd0: 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e CL_MINOR_VERSION
8de0: 29 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 )$(TCL_PATCH_LET
8df0: 54 45 52 29 24 28 54 43 4c 5f 52 45 4c 45 41 53 TER)$(TCL_RELEAS
8e00: 45 5f 53 45 52 49 41 4c 29 2e 7a 69 70 0d 0a 54 E_SERIAL).zip..T
8e10: 4b 5f 5a 49 50 5f 46 49 4c 45 20 3d 20 6c 69 62 K_ZIP_FILE = lib
8e20: 74 6b 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 tk$(TK_MAJOR_VER
8e30: 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 SION).$(TK_MINOR
8e40: 5f 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 50 41 _VERSION)$(TK_PA
8e50: 54 43 48 5f 4c 45 54 54 45 52 29 24 28 54 4b 5f TCH_LETTER)$(TK_
8e60: 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 2e RELEASE_SERIAL).
8e70: 7a 69 70 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 zip....!if $(DOI
8e80: 4e 47 5f 54 43 4c 29 0d 0a 54 43 4c 53 48 4e 41 NG_TCL)..TCLSHNA
8e90: 4d 45 20 20 20 20 20 20 20 3d 20 24 28 50 52 4f ME = $(PRO
8ea0: 4a 45 43 54 29 73 68 24 28 56 45 52 53 49 4f 4e JECT)sh$(VERSION
8eb0: 29 24 28 53 55 46 58 29 2e 65 78 65 0d 0a 54 43 )$(SUFX).exe..TC
8ec0: 4c 53 48 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 LSH..= $(OUT_DIR
8ed0: 29 5c 24 28 54 43 4c 53 48 4e 41 4d 45 29 0d 0a )\$(TCLSHNAME)..
8ee0: 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 TCLIMPLIB.= $(OU
8ef0: 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 T_DIR)\$(PROJECT
8f00: 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 )$(VERSION)$(SUF
8f10: 58 29 2e 6c 69 62 0d 0a 54 43 4c 4c 49 42 4e 41 X).lib..TCLLIBNA
8f20: 4d 45 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 ME.= $(PROJECT)$
8f30: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 (VERSION)$(SUFX)
8f40: 2e 24 28 45 58 54 29 0d 0a 54 43 4c 4c 49 42 09 .$(EXT)..TCLLIB.
8f50: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
8f60: 54 43 4c 4c 49 42 4e 41 4d 45 29 0d 0a 54 43 4c TCLLIBNAME)..TCL
8f70: 53 43 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 SCRIPTZIP = $
8f80: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 5f (OUT_DIR)\$(TCL_
8f90: 5a 49 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 69 66 ZIP_FILE)....!if
8fa0: 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 $(TCL_MAJOR_VER
8fb0: 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 SION) == 8..TCLS
8fc0: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 TUBLIBNAME.= $(S
8fd0: 54 55 42 50 52 45 46 49 58 29 24 28 56 45 52 53 TUBPREFIX)$(VERS
8fe0: 49 4f 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d ION).lib..!else.
8ff0: 0a 54 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 09 .TCLSTUBLIBNAME.
9000: 3d 20 24 28 53 54 55 42 50 52 45 46 49 58 29 2e = $(STUBPREFIX).
9010: 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 4c lib..!endif..TCL
9020: 53 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f STUBLIB.= $(OUT_
9030: 44 49 52 29 5c 24 28 54 43 4c 53 54 55 42 4c 49 DIR)\$(TCLSTUBLI
9040: 42 4e 41 4d 45 29 0d 0a 54 43 4c 5f 49 4e 43 4c BNAME)..TCL_INCL
9050: 55 44 45 53 20 20 20 20 3d 20 2d 49 22 24 28 57 UDES = -I"$(W
9060: 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 47 45 IN_DIR)" -I"$(GE
9070: 4e 45 52 49 43 44 49 52 29 22 0d 0a 0d 0a 21 65 NERICDIR)"....!e
9080: 6c 73 65 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 lse # !$(DOING_T
9090: 43 4c 29 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c CL)....!if $(TCL
90a0: 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 69 6c 64 INSTALL) # Build
90b0: 69 6e 67 20 61 67 61 69 6e 73 74 20 61 6e 20 69 ing against an i
90c0: 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 0d 0a nstalled Tcl....
90d0: 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 # When building
90e0: 65 78 74 65 6e 73 69 6f 6e 73 2c 20 77 65 20 6e extensions, we n
90f0: 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 74 63 eed to locate tc
9100: 6c 73 68 2e 20 44 65 70 65 6e 64 69 6e 67 20 6f lsh. Depending o
9110: 6e 20 76 65 72 73 69 6f 6e 0d 0a 23 20 6f 66 20 n version..# of
9120: 54 63 6c 20 77 65 20 61 72 65 20 62 75 69 6c 64 Tcl we are build
9130: 69 6e 67 20 61 67 61 69 6e 73 74 2c 20 74 68 69 ing against, thi
9140: 73 20 6d 61 79 20 6f 72 20 6d 61 79 20 6e 6f 74 s may or may not
9150: 20 68 61 76 65 20 61 20 22 74 22 20 73 75 66 66 have a "t" suff
9160: 69 78 2e 0d 0a 23 20 54 72 79 20 76 61 72 69 6f ix...# Try vario
9170: 75 73 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 us possibilities
9180: 20 69 6e 20 74 75 72 6e 2e 0d 0a 54 43 4c 53 48 in turn...TCLSH
9190: 09 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 ..= $(_TCLDIR)\b
91a0: 69 6e 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 in\tclsh$(TCL_VE
91b0: 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 RSION)$(SUFX:t=)
91c0: 2e 65 78 65 0d 0a 21 69 66 20 21 65 78 69 73 74 .exe..!if !exist
91d0: 28 22 24 28 54 43 4c 53 48 29 22 29 0d 0a 54 43 ("$(TCLSH)")..TC
91e0: 4c 53 48 20 20 20 20 20 20 20 20 20 20 20 3d 20 LSH =
91f0: 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 $(_TCLDIR)\bin\t
9200: 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f clsh$(TCL_VERSIO
9210: 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 N)t$(SUFX:t=).ex
9220: 65 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 e..!endif....!if
9230: 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 $(TCL_MAJOR_VER
9240: 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 SION) == 8..TCLS
9250: 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 TUBLIB.= $(_TCLD
9260: 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 24 IR)\lib\tclstub$
9270: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 (TCL_VERSION).li
9280: 62 0d 0a 21 65 6c 73 65 0d 0a 54 43 4c 53 54 55 b..!else..TCLSTU
9290: 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 BLIB.= $(_TCLDIR
92a0: 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 2e 6c 69 )\lib\tclstub.li
92b0: 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 49 4d b..!endif..TCLIM
92c0: 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 PLIB.= $(_TCLDIR
92d0: 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 )\lib\tcl$(TCL_V
92e0: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d ERSION)$(SUFX:t=
92f0: 29 2e 6c 69 62 0d 0a 23 20 57 68 65 6e 20 62 75 ).lib..# When bu
9300: 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e ilding extension
9310: 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e s, may be linkin
9320: 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 g against Tcl th
9330: 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d at does not add.
9340: 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 65 .# "t" suffix (e
9350: 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 .g. 8.6). If lib
9360: 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b not found check
9370: 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 for that possib
9380: 69 6c 69 74 79 2e 0d 0a 21 69 66 20 21 65 78 69 ility...!if !exi
9390: 73 74 28 22 24 28 54 43 4c 49 4d 50 4c 49 42 29 st("$(TCLIMPLIB)
93a0: 22 29 0d 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 ")..TCLIMPLIB.=
93b0: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 $(_TCLDIR)\lib\t
93c0: 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 cl$(TCL_VERSION)
93d0: 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d t$(SUFX:t=).lib.
93e0: 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 5f 4c 49 42 .!endif..TCL_LIB
93f0: 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 RARY.= $(_TCLDIR
9400: 29 5c 6c 69 62 0d 0a 54 43 4c 52 45 47 4c 49 42 )\lib..TCLREGLIB
9410: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 .= $(_TCLDIR)\li
9420: 62 5c 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 b\tclreg13$(SUFX
9430: 3a 74 3d 29 2e 6c 69 62 0d 0a 54 43 4c 44 44 45 :t=).lib..TCLDDE
9440: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
9450: 5c 6c 69 62 5c 74 63 6c 64 64 65 31 34 24 28 53 \lib\tcldde14$(S
9460: 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 54 43 4c UFX:t=).lib..TCL
9470: 53 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 SCRIPTZIP.= $(_T
9480: 43 4c 44 49 52 29 5c 6c 69 62 5c 24 28 54 43 4c CLDIR)\lib\$(TCL
9490: 5f 5a 49 50 5f 46 49 4c 45 29 0d 0a 54 43 4c 54 _ZIP_FILE)..TCLT
94a0: 4f 4f 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 5c OOLSDIR.= \must\
94b0: 68 61 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 73 have\tcl\sources
94c0: 5c 74 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c 74 \to\build\this\t
94d0: 61 72 67 65 74 0d 0a 54 43 4c 5f 49 4e 43 4c 55 arget..TCL_INCLU
94e0: 44 45 53 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 DES = -I"$(_T
94f0: 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0d CLDIR)\include".
9500: 0a 0d 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 ...!else # Build
9510: 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 ing against Tcl
9520: 73 6f 75 72 63 65 73 0d 0a 0d 0a 54 43 4c 53 48 sources....TCLSH
9530: 09 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 ..= $(_TCLDIR)\w
9540: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9550: 29 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 )\tclsh$(TCL_VER
9560: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
9570: 65 78 65 0d 0a 21 69 66 20 21 65 78 69 73 74 28 exe..!if !exist(
9580: 24 28 54 43 4c 53 48 29 29 0d 0a 54 43 4c 53 48 $(TCLSH))..TCLSH
9590: 09 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 ..= $(_TCLDIR)\w
95a0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
95b0: 29 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 )\tclsh$(TCL_VER
95c0: 53 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 SION)t$(SUFX:t=)
95d0: 2e 65 78 65 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 .exe..!endif..!i
95e0: 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 f $(TCL_MAJOR_VE
95f0: 52 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c RSION) == 8..TCL
9600: 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c STUBLIB.= $(_TCL
9610: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
9620: 44 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 24 DIRTOP)\tclstub$
9630: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 (TCL_VERSION).li
9640: 62 0d 0a 21 65 6c 73 65 0d 0a 54 43 4c 53 54 55 b..!else..TCLSTU
9650: 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 BLIB.= $(_TCLDIR
9660: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
9670: 54 4f 50 29 5c 74 63 6c 73 74 75 62 2e 6c 69 62 TOP)\tclstub.lib
9680: 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 49 4d 50 ..!endif..TCLIMP
9690: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
96a0: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
96b0: 4f 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 OP)\tcl$(TCL_VER
96c0: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
96d0: 6c 69 62 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c lib..# When buil
96e0: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c ding extensions,
96f0: 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 may be linking
9700: 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 against Tcl that
9710: 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23 does not add..#
9720: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 "t" suffix (e.g
9730: 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e . 8.6). If lib n
9740: 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 ot found check f
9750: 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c or that possibil
9760: 69 74 79 2e 0d 0a 21 69 66 20 21 65 78 69 73 74 ity...!if !exist
9770: 28 22 24 28 54 43 4c 49 4d 50 4c 49 42 29 22 29 ("$(TCLIMPLIB)")
9780: 0d 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 ..TCLIMPLIB.= $(
9790: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 _TCLDIR)\win\$(B
97a0: 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 24 UILDDIRTOP)\tcl$
97b0: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 (TCL_VERSION)t$(
97c0: 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 21 65 SUFX:t=).lib..!e
97d0: 6e 64 69 66 0d 0a 54 43 4c 5f 4c 49 42 52 41 52 ndif..TCL_LIBRAR
97e0: 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c Y.= $(_TCLDIR)\l
97f0: 69 62 72 61 72 79 0d 0a 54 43 4c 52 45 47 4c 49 ibrary..TCLREGLI
9800: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
9810: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9820: 29 5c 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 )\tclreg13$(SUFX
9830: 3a 74 3d 29 2e 6c 69 62 0d 0a 54 43 4c 44 44 45 :t=).lib..TCLDDE
9840: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
9850: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
9860: 4f 50 29 5c 74 63 6c 64 64 65 31 34 24 28 53 55 OP)\tcldde14$(SU
9870: 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 54 43 4c 53 FX:t=).lib..TCLS
9880: 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 CRIPTZIP.= $(_TC
9890: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
98a0: 44 44 49 52 54 4f 50 29 5c 24 28 54 43 4c 5f 5a DDIRTOP)\$(TCL_Z
98b0: 49 50 5f 46 49 4c 45 29 0d 0a 54 43 4c 54 4f 4f IP_FILE)..TCLTOO
98c0: 4c 53 44 49 52 09 3d 20 24 28 5f 54 43 4c 44 49 LSDIR.= $(_TCLDI
98d0: 52 29 5c 74 6f 6f 6c 73 0d 0a 54 43 4c 5f 49 4e R)\tools..TCL_IN
98e0: 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 28 5f 54 CLUDES.= -I"$(_T
98f0: 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 CLDIR)\generic"
9900: 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 -I"$(_TCLDIR)\wi
9910: 6e 22 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 n"....!endif # T
9920: 43 4c 49 4e 53 54 41 4c 4c 0d 0a 0d 0a 21 69 66 CLINSTALL....!if
9930: 20 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 !$(STATIC_BUILD
9940: 29 20 26 26 20 22 24 28 54 43 4c 5f 42 55 49 4c ) && "$(TCL_BUIL
9950: 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 0d 0a D_FOR)" == "8"..
9960: 74 63 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c tcllibs = "$(TCL
9970: 53 54 55 42 4c 49 42 29 22 0d 0a 21 65 6c 73 65 STUBLIB)"..!else
9980: 0d 0a 74 63 6c 6c 69 62 73 20 3d 20 22 24 28 54 ..tcllibs = "$(T
9990: 43 4c 53 54 55 42 4c 49 42 29 22 20 22 24 28 54 CLSTUBLIB)" "$(T
99a0: 43 4c 49 4d 50 4c 49 42 29 22 0d 0a 21 65 6e 64 CLIMPLIB)"..!end
99b0: 69 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 24 if....!endif # $
99c0: 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 23 (DOING_TCL)....#
99d0: 20 57 65 20 6e 65 65 64 20 61 20 74 63 6c 73 68 We need a tclsh
99e0: 20 74 68 61 74 20 77 69 6c 6c 20 72 75 6e 20 6f that will run o
99f0: 6e 20 74 68 65 20 68 6f 73 74 20 6d 61 63 68 69 n the host machi
9a00: 6e 65 20 61 73 20 70 61 72 74 20 6f 66 20 74 68 ne as part of th
9a10: 65 20 62 75 69 6c 64 2e 0d 0a 23 20 49 58 38 36 e build...# IX86
9a20: 20 72 75 6e 73 20 6f 6e 20 61 6c 6c 20 61 72 63 runs on all arc
9a30: 68 69 74 65 63 74 75 72 65 73 2e 0d 0a 21 69 66 hitectures...!if
9a40: 6e 64 65 66 20 54 43 4c 53 48 5f 4e 41 54 49 56 ndef TCLSH_NATIV
9a50: 45 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e E..!if "$(MACHIN
9a60: 45 29 22 20 3d 3d 20 22 49 58 38 36 22 20 7c 7c E)" == "IX86" ||
9a70: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
9a80: 20 22 24 28 4e 41 54 49 56 45 5f 41 52 43 48 29 "$(NATIVE_ARCH)
9a90: 22 0d 0a 54 43 4c 53 48 5f 4e 41 54 49 56 45 09 "..TCLSH_NATIVE.
9aa0: 3d 20 24 28 54 43 4c 53 48 29 0d 0a 21 65 6c 73 = $(TCLSH)..!els
9ab0: 65 0d 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 e..!error You mu
9ac0: 73 74 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 st explicitly se
9ad0: 74 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 t TCLSH_NATIVE f
9ae0: 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 or cross-compila
9af0: 74 69 6f 6e 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 tion..!endif..!e
9b00: 6e 64 69 66 0d 0a 0d 0a 23 20 44 6f 20 74 68 65 ndif....# Do the
9b10: 20 73 61 6d 65 20 66 6f 72 20 54 6b 20 61 6e 64 same for Tk and
9b20: 20 54 6b 20 65 78 74 65 6e 73 69 6f 6e 73 20 74 Tk extensions t
9b30: 68 61 74 20 72 65 71 75 69 72 65 20 74 68 65 20 hat require the
9b40: 54 6b 20 6c 69 62 72 61 72 69 65 73 0d 0a 21 69 Tk libraries..!i
9b50: 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c f $(DOING_TK) ||
9b60: 20 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 57 49 53 $(NEED_TK)..WIS
9b70: 48 4e 41 4d 45 50 52 45 46 49 58 20 3d 20 77 69 HNAMEPREFIX = wi
9b80: 73 68 0d 0a 57 49 53 48 4e 41 4d 45 20 3d 20 24 sh..WISHNAME = $
9b90: 28 57 49 53 48 4e 41 4d 45 50 52 45 46 49 58 29 (WISHNAMEPREFIX)
9ba0: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
9bb0: 55 46 58 29 2e 65 78 65 0d 0a 54 4b 4c 49 42 4e UFX).exe..TKLIBN
9bc0: 41 4d 45 38 09 3d 20 74 6b 24 28 54 4b 5f 56 45 AME8.= tk$(TK_VE
9bd0: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 RSION)$(SUFX).$(
9be0: 45 58 54 29 0d 0a 54 4b 4c 49 42 4e 41 4d 45 39 EXT)..TKLIBNAME9
9bf0: 09 3d 20 74 63 6c 39 74 6b 24 28 54 4b 5f 56 45 .= tcl9tk$(TK_VE
9c00: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 RSION)$(SUFX).$(
9c10: 45 58 54 29 0d 0a 21 69 66 20 24 28 54 43 4c 5f EXT)..!if $(TCL_
9c20: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
9c30: 3d 20 38 20 7c 7c 20 22 24 28 54 43 4c 5f 42 55 = 8 || "$(TCL_BU
9c40: 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 ILD_FOR)" == "8"
9c50: 0d 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 6b ..TKLIBNAME.= tk
9c60: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
9c70: 55 46 58 29 2e 24 28 45 58 54 29 0d 0a 54 4b 49 UFX).$(EXT)..TKI
9c80: 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 MPLIBNAME.= tk$(
9c90: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
9ca0: 58 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54 X).lib..!else..T
9cb0: 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 KLIBNAME.= tcl9t
9cc0: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9cd0: 53 55 46 58 29 2e 24 28 45 58 54 29 0d 0a 54 4b SUFX).$(EXT)..TK
9ce0: 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c IMPLIBNAME.= tcl
9cf0: 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 9tk$(TK_VERSION)
9d00: 24 28 53 55 46 58 29 2e 6c 69 62 0d 0a 21 65 6e $(SUFX).lib..!en
9d10: 64 69 66 0d 0a 21 69 66 20 24 28 54 4b 5f 4d 41 dif..!if $(TK_MA
9d20: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 JOR_VERSION) ==
9d30: 38 0d 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 8..TKSTUBLIBNAME
9d40: 09 3d 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 45 .= tkstub$(TK_VE
9d50: 52 53 49 4f 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 RSION).lib..!els
9d60: 65 0d 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 e..TKSTUBLIBNAME
9d70: 09 3d 20 74 6b 73 74 75 62 2e 6c 69 62 0d 0a 21 .= tkstub.lib..!
9d80: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 44 endif....!if $(D
9d90: 4f 49 4e 47 5f 54 4b 29 0d 0a 57 49 53 48 09 09 OING_TK)..WISH..
9da0: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 57 = $(OUT_DIR)\$(W
9db0: 49 53 48 4e 41 4d 45 29 0d 0a 54 4b 53 54 55 42 ISHNAME)..TKSTUB
9dc0: 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 LIB.= $(OUT_DIR)
9dd0: 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 \$(TKSTUBLIBNAME
9de0: 29 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 )..TKIMPLIB.= $(
9df0: 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 49 4d 50 OUT_DIR)\$(TKIMP
9e00: 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 4c 49 42 09 LIBNAME)..TKLIB.
9e10: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
9e20: 54 4b 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 5f 49 TKLIBNAME)..TK_I
9e30: 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 2d 49 NCLUDES = -I
9e40: 22 24 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 "$(WIN_DIR)" -I"
9e50: 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 0d 0a $(GENERICDIR)"..
9e60: 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 20 TKSCRIPTZIP
9e70: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
9e80: 4b 5f 5a 49 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 K_ZIP_FILE)....!
9e90: 65 6c 73 65 20 23 20 65 66 66 65 63 74 69 76 65 else # effective
9ea0: 6c 79 20 4e 45 45 44 5f 54 4b 0d 0a 0d 0a 21 69 ly NEED_TK....!i
9eb0: 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 f $(TKINSTALL) #
9ec0: 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 Building agains
9ed0: 74 20 69 6e 73 74 61 6c 6c 65 64 20 54 6b 0d 0a t installed Tk..
9ee0: 57 49 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 WISH..= $(_TKDIR
9ef0: 29 5c 62 69 6e 5c 24 28 57 49 53 48 4e 41 4d 45 )\bin\$(WISHNAME
9f00: 29 0d 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 )..TKSTUBLIB.= $
9f10: 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 (_TKDIR)\lib\$(T
9f20: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 KSTUBLIBNAME)..T
9f30: 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 KIMPLIB.= $(_TKD
9f40: 49 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c IR)\lib\$(TKIMPL
9f50: 49 42 4e 41 4d 45 29 0d 0a 23 20 57 68 65 6e 20 IBNAME)..# When
9f60: 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 building extensi
9f70: 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b ons, may be link
9f80: 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 74 ing against Tk t
9f90: 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 hat does not add
9fa0: 0d 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 ..# "t" suffix (
9fb0: 65 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 e.g. 8.6). If li
9fc0: 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 b not found chec
9fd0: 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 k for that possi
9fe0: 62 69 6c 69 74 79 2e 0d 0a 21 69 66 20 21 65 78 bility...!if !ex
9ff0: 69 73 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 ist("$(TKIMPLIB)
a000: 22 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 ")..TKIMPLIBNAME
a010: 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f .= tk$(TK_VERSIO
a020: 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 N)$(SUFX:t=).lib
a030: 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f ..TKIMPLIB.= $(_
a040: 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 49 TKDIR)\lib\$(TKI
a050: 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 21 65 6e 64 MPLIBNAME)..!end
a060: 69 66 0d 0a 54 4b 5f 49 4e 43 4c 55 44 45 53 20 if..TK_INCLUDES
a070: 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 4b 44 49 = -I"$(_TKDI
a080: 52 29 5c 69 6e 63 6c 75 64 65 22 0d 0a 54 4b 53 R)\include"..TKS
a090: 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 24 CRIPTZIP = $
a0a0: 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 (_TKDIR)\lib\$(T
a0b0: 4b 5f 5a 49 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 K_ZIP_FILE)....!
a0c0: 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e 67 20 else # Building
a0d0: 61 67 61 69 6e 73 74 20 54 6b 20 73 6f 75 72 63 against Tk sourc
a0e0: 65 73 0d 0a 0d 0a 57 49 53 48 09 09 3d 20 24 28 es....WISH..= $(
a0f0: 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 _TKDIR)\win\$(BU
a100: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 57 49 53 ILDDIRTOP)\$(WIS
a110: 48 4e 41 4d 45 29 0d 0a 54 4b 53 54 55 42 4c 49 HNAME)..TKSTUBLI
a120: 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 B.= $(_TKDIR)\wi
a130: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
a140: 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 \$(TKSTUBLIBNAME
a150: 29 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 )..TKIMPLIB.= $(
a160: 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 _TKDIR)\win\$(BU
a170: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 ILDDIRTOP)\$(TKI
a180: 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 23 20 57 68 MPLIBNAME)..# Wh
a190: 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 en building exte
a1a0: 6e 73 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c nsions, may be l
a1b0: 69 6e 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 inking against T
a1c0: 6b 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 k that does not
a1d0: 61 64 64 0d 0a 23 20 22 74 22 20 73 75 66 66 69 add..# "t" suffi
a1e0: 78 20 28 65 2e 67 2e 20 38 2e 36 29 2e 20 49 66 x (e.g. 8.6). If
a1f0: 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 lib not found c
a200: 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f heck for that po
a210: 73 73 69 62 69 6c 69 74 79 2e 0d 0a 21 69 66 20 ssibility...!if
a220: 21 65 78 69 73 74 28 22 24 28 54 4b 49 4d 50 4c !exist("$(TKIMPL
a230: 49 42 29 22 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e IB)")..TKIMPLIBN
a240: 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 AME.= tk$(TK_VER
a250: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
a260: 6c 69 62 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 lib..TKIMPLIB.=
a270: 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 $(_TKDIR)\win\$(
a280: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 BUILDDIRTOP)\$(T
a290: 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 21 65 KIMPLIBNAME)..!e
a2a0: 6e 64 69 66 0d 0a 54 4b 5f 49 4e 43 4c 55 44 45 ndif..TK_INCLUDE
a2b0: 53 20 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 4b S = -I"$(_TK
a2c0: 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 2d 49 DIR)\generic" -I
a2d0: 22 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 22 20 "$(_TKDIR)\win"
a2e0: 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 78 6c 69 -I"$(_TKDIR)\xli
a2f0: 62 22 0d 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 b"..TKSCRIPTZIP
a300: 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c = $(_TKDIR)\
a310: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
a320: 50 29 5c 24 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 P)\$(TK_ZIP_FILE
a330: 29 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 4b )....!endif # TK
a340: 49 4e 53 54 41 4c 4c 0d 0a 0d 0a 74 6b 6c 69 62 INSTALL....tklib
a350: 73 20 3d 20 22 24 28 54 4b 53 54 55 42 4c 49 42 s = "$(TKSTUBLIB
a360: 29 22 20 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 )" "$(TKIMPLIB)"
a370: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 44 ....!endif # $(D
a380: 4f 49 4e 47 5f 54 4b 29 0d 0a 21 65 6e 64 69 66 OING_TK)..!endif
a390: 20 23 20 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c # $(DOING_TK) |
a3a0: 7c 20 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 0d 0a | $(NEED_TK)....
a3b0: 23 20 56 61 72 69 6f 75 73 20 6f 75 74 70 75 74 # Various output
a3c0: 20 70 61 74 68 73 0d 0a 50 52 4a 49 4d 50 4c 49 paths..PRJIMPLI
a3d0: 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 B.= $(OUT_DIR)\$
a3e0: 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 (PROJECT)$(VERSI
a3f0: 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0d 0a ON)$(SUFX).lib..
a400: 23 20 45 76 65 6e 20 77 68 65 6e 20 62 75 69 6c # Even when buil
a410: 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c ding against Tcl
a420: 20 39 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 38 20 9, PRJLIBNAME8
a430: 6d 75 73 74 20 68 61 76 65 20 22 74 22 0d 0a 50 must have "t"..P
a440: 52 4a 4c 49 42 4e 41 4d 45 38 09 3d 20 24 28 50 RJLIBNAME8.= $(P
a450: 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e ROJECT)$(VERSION
a460: 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 24 28 45 )t$(SUFX:t=).$(E
a470: 58 54 29 0d 0a 23 20 45 76 65 6e 20 77 68 65 6e XT)..# Even when
a480: 20 62 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 building agains
a490: 74 20 54 63 6c 20 38 2c 20 50 52 4a 4c 49 42 4e t Tcl 8, PRJLIBN
a4a0: 41 4d 45 39 20 6d 75 73 74 20 6e 6f 74 20 68 61 AME9 must not ha
a4b0: 76 65 20 22 74 22 0d 0a 50 52 4a 4c 49 42 4e 41 ve "t"..PRJLIBNA
a4c0: 4d 45 39 09 3d 20 74 63 6c 39 24 28 50 52 4f 4a ME9.= tcl9$(PROJ
a4d0: 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 ECT)$(VERSION)$(
a4e0: 53 55 46 58 3a 74 3d 29 2e 24 28 45 58 54 29 0d SUFX:t=).$(EXT).
a4f0: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
a500: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 7c _VERSION) == 8 |
a510: 7c 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 | "$(TCL_BUILD_F
a520: 4f 52 29 22 20 3d 3d 20 22 38 22 0d 0a 50 52 4a OR)" == "8"..PRJ
a530: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 4a 4c LIBNAME.= $(PRJL
a540: 49 42 4e 41 4d 45 38 29 0d 0a 21 65 6c 73 65 0d IBNAME8)..!else.
a550: 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 28 .PRJLIBNAME.= $(
a560: 50 52 4a 4c 49 42 4e 41 4d 45 39 29 0d 0a 21 65 PRJLIBNAME9)..!e
a570: 6e 64 69 66 0d 0a 50 52 4a 4c 49 42 09 09 3d 20 ndif..PRJLIB..=
a580: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4a $(OUT_DIR)\$(PRJ
a590: 4c 49 42 4e 41 4d 45 29 0d 0a 0d 0a 21 69 66 20 LIBNAME)....!if
a5a0: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
a5b0: 49 4f 4e 29 20 3d 3d 20 38 0d 0a 50 52 4a 53 54 ION) == 8..PRJST
a5c0: 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 UBLIBNAME.= $(ST
a5d0: 55 42 50 52 45 46 49 58 29 24 28 56 45 52 53 49 UBPREFIX)$(VERSI
a5e0: 4f 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a ON).lib..!else..
a5f0: 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d PRJSTUBLIBNAME.=
a600: 20 24 28 53 54 55 42 50 52 45 46 49 58 29 2e 6c $(STUBPREFIX).l
a610: 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 50 52 4a 53 ib..!endif..PRJS
a620: 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 TUBLIB.= $(OUT_D
a630: 49 52 29 5c 24 28 50 52 4a 53 54 55 42 4c 49 42 IR)\$(PRJSTUBLIB
a640: 4e 41 4d 45 29 0d 0a 0d 0a 23 20 49 66 20 65 78 NAME)....# If ex
a650: 74 65 6e 73 69 6f 6e 20 70 61 72 65 6e 74 20 6d tension parent m
a660: 61 6b 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 akefile has not
a670: 64 65 66 69 6e 65 64 20 61 20 72 65 73 6f 75 72 defined a resour
a680: 63 65 20 64 65 66 69 6e 69 74 69 6f 6e 20 66 69 ce definition fi
a690: 6c 65 2c 0d 0a 23 20 77 65 20 77 69 6c 6c 20 67 le,..# we will g
a6a0: 65 6e 65 72 61 74 65 20 6f 6e 65 20 66 72 6f 6d enerate one from
a6b0: 20 73 74 61 6e 64 61 72 64 20 74 65 6d 70 6c 61 standard templa
a6c0: 74 65 2e 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e te...!if !$(DOIN
a6d0: 47 5f 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 G_TCL) && !$(DOI
a6e0: 4e 47 5f 54 4b 29 20 26 26 20 21 24 28 53 54 41 NG_TK) && !$(STA
a6f0: 54 49 43 5f 42 55 49 4c 44 29 0d 0a 21 69 66 64 TIC_BUILD)..!ifd
a700: 65 66 20 52 43 46 49 4c 45 0d 0a 52 45 53 46 49 ef RCFILE..RESFI
a710: 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c LE = $(TMP_DIR)\
a720: 24 28 52 43 46 49 4c 45 3a 2e 72 63 3d 2e 72 65 $(RCFILE:.rc=.re
a730: 73 29 0d 0a 21 65 6c 73 65 0d 0a 52 45 53 46 49 s)..!else..RESFI
a740: 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c LE = $(TMP_DIR)\
a750: 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 0d 0a $(PROJECT).res..
a760: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
a770: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
a780: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a790: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a7a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a7b0: 23 23 23 23 23 0d 0a 23 20 31 31 2e 20 43 6f 6e #####..# 11. Con
a7c0: 73 74 72 75 63 74 20 74 68 65 20 70 61 74 68 73 struct the paths
a7d0: 20 66 6f 72 20 74 68 65 20 69 6e 73 74 61 6c 6c for the install
a7e0: 61 74 69 6f 6e 20 64 69 72 65 63 74 6f 72 69 65 ation directorie
a7f0: 73 0d 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 s..# The followi
a800: 6e 67 20 6d 61 63 72 6f 73 20 67 65 74 20 64 65 ng macros get de
a810: 66 69 6e 65 64 20 69 6e 20 74 68 69 73 20 73 65 fined in this se
a820: 63 74 69 6f 6e 3a 0d 0a 23 20 4c 49 42 5f 49 4e ction:..# LIB_IN
a830: 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 STALL_DIR - wher
a840: 65 20 6c 69 62 72 61 72 69 65 73 20 73 68 6f 75 e libraries shou
a850: 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d ld be installed.
a860: 0a 23 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 .# BIN_INSTALL_D
a870: 49 52 20 2d 20 77 68 65 72 65 20 74 68 65 20 65 IR - where the e
a880: 78 65 63 75 74 61 62 6c 65 73 20 73 68 6f 75 6c xecutables shoul
a890: 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a d be installed..
a8a0: 23 20 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 # DOC_INSTALL_DI
a8b0: 52 20 2d 20 77 68 65 72 65 20 64 6f 63 75 6d 65 R - where docume
a8c0: 6e 74 61 74 69 6f 6e 20 73 68 6f 75 6c 64 20 62 ntation should b
a8d0: 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 53 e installed..# S
a8e0: 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 CRIPT_INSTALL_DI
a8f0: 52 20 2d 20 77 68 65 72 65 20 73 63 72 69 70 74 R - where script
a900: 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 s should be inst
a910: 61 6c 6c 65 64 0d 0a 23 20 49 4e 43 4c 55 44 45 alled..# INCLUDE
a920: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a930: 68 65 72 65 20 43 20 69 6e 63 6c 75 64 65 20 66 here C include f
a940: 69 6c 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 iles should be i
a950: 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 44 45 4d 4f nstalled..# DEMO
a960: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a970: 68 65 72 65 20 64 65 6d 6f 73 20 73 68 6f 75 6c here demos shoul
a980: 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a d be installed..
a990: 23 20 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 # PRJ_INSTALL_DI
a9a0: 52 20 2d 20 77 68 65 72 65 20 70 61 63 6b 61 67 R - where packag
a9b0: 65 20 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c e will be instal
a9c0: 6c 65 64 20 28 6e 6f 74 20 73 65 74 20 66 6f 72 led (not set for
a9d0: 20 54 63 6c 20 61 6e 64 20 54 6b 29 0d 0a 0d 0a Tcl and Tk)....
a9e0: 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 !if $(DOING_TCL)
a9f0: 20 7c 7c 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0d || $(DOING_TK).
aa00: 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 .LIB_INSTALL_DIR
aa10: 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 ..= $(_INSTALLDI
aa20: 52 29 5c 6c 69 62 0d 0a 42 49 4e 5f 49 4e 53 54 R)\lib..BIN_INST
aa30: 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e ALL_DIR..= $(_IN
aa40: 53 54 41 4c 4c 44 49 52 29 5c 62 69 6e 0d 0a 44 STALLDIR)\bin..D
aa50: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 OC_INSTALL_DIR..
aa60: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 = $(_INSTALLDIR)
aa70: 5c 64 6f 63 0d 0a 21 69 66 20 24 28 44 4f 49 4e \doc..!if $(DOIN
aa80: 47 5f 54 43 4c 29 0d 0a 53 43 52 49 50 54 5f 49 G_TCL)..SCRIPT_I
aa90: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f NSTALL_DIR.= $(_
aaa0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c INSTALLDIR)\lib\
aab0: 24 28 50 52 4f 4a 45 43 54 29 24 28 54 43 4c 5f $(PROJECT)$(TCL_
aac0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 MAJOR_VERSION).$
aad0: 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 (TCL_MINOR_VERSI
aae0: 4f 4e 29 0d 0a 4d 4f 44 55 4c 45 5f 49 4e 53 54 ON)..MODULE_INST
aaf0: 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 ALL_DIR.= $(_INS
ab00: 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c TALLDIR)\lib\tcl
ab10: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
ab20: 49 4f 4e 29 0d 0a 21 65 6c 73 65 20 23 20 44 4f ION)..!else # DO
ab30: 49 4e 47 5f 54 4b 0d 0a 53 43 52 49 50 54 5f 49 ING_TK..SCRIPT_I
ab40: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f NSTALL_DIR.= $(_
ab50: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c INSTALLDIR)\lib\
ab60: 24 28 50 52 4f 4a 45 43 54 29 24 28 54 4b 5f 4d $(PROJECT)$(TK_M
ab70: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 AJOR_VERSION).$(
ab80: 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e TK_MINOR_VERSION
ab90: 29 0d 0a 21 65 6e 64 69 66 0d 0a 44 45 4d 4f 5f )..!endif..DEMO_
aba0: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 INSTALL_DIR.= $(
abb0: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
abc0: 49 52 29 5c 64 65 6d 6f 73 0d 0a 49 4e 43 4c 55 IR)\demos..INCLU
abd0: 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d DE_INSTALL_DIR.=
abe0: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c $(_INSTALLDIR)\
abf0: 69 6e 63 6c 75 64 65 0d 0a 0d 0a 21 65 6c 73 65 include....!else
ac00: 20 23 20 65 78 74 65 6e 73 69 6f 6e 20 6f 74 68 # extension oth
ac10: 65 72 20 74 68 61 6e 20 54 6b 0d 0a 0d 0a 50 52 er than Tk....PR
ac20: 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 20 20 J_INSTALL_DIR
ac30: 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 = $(_INSTA
ac40: 4c 4c 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 LLDIR)\$(PROJECT
ac50: 29 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 0d 0a )$(DOTVERSION)..
ac60: 21 69 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 46 !if $(MULTIPLATF
ac70: 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 0d 0a 4c 49 ORM_INSTALL)..LI
ac80: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d B_INSTALL_DIR..=
ac90: 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 $(PRJ_INSTALL_D
aca0: 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 4d 5f 49 IR)\$(PLATFORM_I
acb0: 44 45 4e 54 49 46 59 29 0d 0a 42 49 4e 5f 49 4e DENTIFY)..BIN_IN
acc0: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 STALL_DIR..= $(P
acd0: 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c RJ_INSTALL_DIR)\
ace0: 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 $(PLATFORM_IDENT
acf0: 49 46 59 29 0d 0a 21 65 6c 73 65 0d 0a 4c 49 42 IFY)..!else..LIB
ad00: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _INSTALL_DIR..=
ad10: 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(PRJ_INSTALL_DI
ad20: 52 29 0d 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f R)..BIN_INSTALL_
ad30: 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 DIR..= $(PRJ_INS
ad40: 54 41 4c 4c 5f 44 49 52 29 0d 0a 21 65 6e 64 69 TALL_DIR)..!endi
ad50: 66 0d 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 f..DOC_INSTALL_D
ad60: 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 IR..= $(PRJ_INST
ad70: 41 4c 4c 5f 44 49 52 29 0d 0a 53 43 52 49 50 54 ALL_DIR)..SCRIPT
ad80: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 _INSTALL_DIR.= $
ad90: 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (PRJ_INSTALL_DIR
ada0: 29 0d 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f )..DEMO_INSTALL_
adb0: 44 49 52 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 DIR.= $(PRJ_INST
adc0: 41 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 0d 0a ALL_DIR)\demos..
add0: 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f INCLUDE_INSTALL_
ade0: 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c DIR.= $(_INSTALL
adf0: 44 49 52 29 5c 2e 2e 5c 69 6e 63 6c 75 64 65 0d DIR)\..\include.
ae00: 0a 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 ...!endif....###
ae10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ae20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ae30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ae40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ae50: 0d 0a 23 20 31 32 2e 20 53 65 74 20 75 70 20 61 ..# 12. Set up a
ae60: 63 74 75 61 6c 20 6f 70 74 69 6f 6e 73 20 74 6f ctual options to
ae70: 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 be passed to th
ae80: 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c e compiler and l
ae90: 69 6e 6b 65 72 0d 0a 23 20 4e 6f 77 20 77 65 20 inker..# Now we
aea0: 68 61 76 65 20 61 6c 6c 20 74 68 65 20 69 6e 66 have all the inf
aeb0: 6f 72 6d 61 74 69 6f 6e 20 77 65 20 6e 65 65 64 ormation we need
aec0: 2c 20 73 65 74 20 75 70 20 74 68 65 20 61 63 74 , set up the act
aed0: 75 61 6c 20 66 6c 61 67 73 20 61 6e 64 0d 0a 23 ual flags and..#
aee0: 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 77 65 options that we
aef0: 20 77 69 6c 6c 20 70 61 73 73 20 74 6f 20 74 68 will pass to th
af00: 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c e compiler and l
af10: 69 6e 6b 65 72 2e 20 54 68 65 20 6d 61 69 6e 0d inker. The main.
af20: 0a 23 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f 75 .# makefile shou
af30: 6c 64 20 75 73 65 20 74 68 65 73 65 20 69 6e 20 ld use these in
af40: 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 68 combination with
af50: 20 77 68 61 74 65 76 65 72 20 6f 74 68 65 72 20 whatever other
af60: 66 6c 61 67 73 0d 0a 23 20 61 6e 64 20 73 77 69 flags..# and swi
af70: 74 63 68 65 73 20 61 72 65 20 73 70 65 63 69 66 tches are specif
af80: 69 63 20 74 6f 20 69 74 2e 0d 0a 23 20 54 68 65 ic to it...# The
af90: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
afa0: 73 20 61 72 65 20 64 65 66 69 6e 65 64 2c 20 6e s are defined, n
afb0: 61 6d 65 73 20 61 72 65 20 66 6f 72 20 68 69 73 ames are for his
afc0: 74 6f 72 69 63 61 6c 20 63 6f 6d 70 61 74 69 62 torical compatib
afd0: 69 6c 69 74 79 3a 0d 0a 23 20 4f 50 54 44 45 46 ility:..# OPTDEF
afe0: 49 4e 45 53 20 2d 20 2f 44 78 78 78 20 43 20 6d INES - /Dxxx C m
aff0: 61 63 72 6f 20 66 6c 61 67 73 20 62 61 73 65 64 acro flags based
b000: 20 6f 6e 20 75 73 65 72 2d 73 70 65 63 69 66 69 on user-specifi
b010: 65 64 20 4f 50 54 53 0d 0a 23 20 43 4f 4d 50 49 ed OPTS..# COMPI
b020: 4c 45 52 46 4c 41 47 53 20 2d 20 2f 44 78 78 78 LERFLAGS - /Dxxx
b030: 20 43 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 69 C macro flags i
b040: 6e 64 65 70 65 6e 64 65 6e 74 20 6f 66 20 61 6e ndependent of an
b050: 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 y configuration
b060: 6f 70 74 69 6f 6e 73 0d 0a 23 20 63 72 74 20 2d options..# crt -
b070: 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 Compiler switch
b080: 20 74 68 61 74 20 73 65 6c 65 63 74 73 20 74 68 that selects th
b090: 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 43 20 e appropriate C
b0a0: 72 75 6e 74 69 6d 65 0d 0a 23 20 63 64 65 62 75 runtime..# cdebu
b0b0: 67 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 g - Compiler swi
b0c0: 74 63 68 65 73 20 72 65 6c 61 74 65 64 20 74 6f tches related to
b0d0: 20 64 65 62 75 67 20 41 4e 44 20 6f 70 74 69 6d debug AND optim
b0e0: 69 7a 61 74 69 6f 6e 73 0d 0a 23 20 63 77 61 72 izations..# cwar
b0f0: 6e 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 n - Compiler swi
b100: 74 63 68 65 73 20 74 68 61 74 20 73 65 74 20 77 tches that set w
b110: 61 72 6e 69 6e 67 20 6c 65 76 65 6c 73 0d 0a 23 arning levels..#
b120: 20 63 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 cflags - comple
b130: 74 65 20 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 te compiler swit
b140: 63 68 65 73 20 28 73 75 62 73 75 6d 65 73 20 63 ches (subsumes c
b150: 64 65 62 75 67 20 61 6e 64 20 63 77 61 72 6e 29 debug and cwarn)
b160: 0d 0a 23 20 6c 64 65 62 75 67 20 2d 20 4c 69 6e ..# ldebug - Lin
b170: 6b 65 72 20 73 77 69 74 63 68 65 73 20 63 6f 6e ker switches con
b180: 74 72 6f 6c 6c 69 6e 67 20 64 65 62 75 67 20 69 trolling debug i
b190: 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 6e 64 20 6f nformation and o
b1a0: 70 74 69 6d 69 7a 61 74 69 6f 6e 0d 0a 23 20 6c ptimization..# l
b1b0: 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 flags - complete
b1c0: 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 linker switches
b1d0: 20 28 73 75 62 73 75 6d 65 73 20 6c 64 65 62 75 (subsumes ldebu
b1e0: 67 29 20 65 78 63 65 70 74 20 73 75 62 73 79 73 g) except subsys
b1f0: 74 65 6d 20 74 79 70 65 0d 0a 23 20 64 6c 6c 6c tem type..# dlll
b200: 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 flags - complete
b210: 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 linker switches
b220: 20 74 6f 20 62 75 69 6c 64 20 44 4c 4c 73 20 28 to build DLLs (
b230: 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 subsumes lflags)
b240: 0d 0a 23 20 63 6f 6e 6c 66 6c 61 67 73 20 2d 20 ..# conlflags -
b250: 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 complete linker
b260: 73 77 69 74 63 68 65 73 20 66 6f 72 20 63 6f 6e switches for con
b270: 73 6f 6c 65 20 70 72 6f 67 72 61 6d 20 28 73 75 sole program (su
b280: 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 0d 0a bsumes lflags)..
b290: 23 20 67 75 69 6c 66 6c 61 67 73 20 2d 20 63 6f # guilflags - co
b2a0: 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 mplete linker sw
b2b0: 69 74 63 68 65 73 20 66 6f 72 20 47 55 49 20 70 itches for GUI p
b2c0: 72 6f 67 72 61 6d 20 28 73 75 62 73 75 6d 65 73 rogram (subsumes
b2d0: 20 6c 66 6c 61 67 73 29 0d 0a 23 20 62 61 73 65 lflags)..# base
b2e0: 6c 69 62 73 20 2d 20 6d 69 6e 69 6d 75 6d 20 57 libs - minimum W
b2f0: 69 6e 64 6f 77 73 20 6c 69 62 72 61 72 69 65 73 indows libraries
b300: 20 72 65 71 75 69 72 65 64 2e 20 50 61 72 65 6e required. Paren
b310: 74 20 6d 61 6b 65 66 69 6c 65 20 63 61 6e 0d 0a t makefile can..
b320: 23 20 20 20 20 64 65 66 69 6e 65 20 50 52 4a 5f # define PRJ_
b330: 4c 49 42 53 20 62 65 66 6f 72 65 20 69 6e 63 6c LIBS before incl
b340: 75 64 69 6e 67 20 72 75 6c 65 73 2e 72 63 20 69 uding rules.rc i
b350: 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 6c 69 62 f additional lib
b360: 73 20 61 72 65 20 6e 65 65 64 65 64 0d 0a 0d 0a s are needed....
b370: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 2f 44 53 OPTDEFINES.= /DS
b380: 54 44 43 5f 48 45 41 44 45 52 53 20 2f 44 55 53 TDC_HEADERS /DUS
b390: 45 5f 4e 4d 41 4b 45 3d 31 0d 0a 21 69 66 20 24 E_NMAKE=1..!if $
b3a0: 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 36 (VCVERSION) > 16
b3b0: 30 30 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 00..OPTDEFINES.=
b3c0: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b3d0: 44 48 41 56 45 5f 53 54 44 49 4e 54 5f 48 3d 31 DHAVE_STDINT_H=1
b3e0: 0d 0a 21 65 6c 73 65 0d 0a 4f 50 54 44 45 46 49 ..!else..OPTDEFI
b3f0: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b400: 45 53 29 20 2f 44 4d 50 5f 4e 4f 5f 53 54 44 49 ES) /DMP_NO_STDI
b410: 4e 54 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 NT=1..!endif..!i
b420: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
b430: 3d 20 31 38 30 30 0d 0a 4f 50 54 44 45 46 49 4e = 1800..OPTDEFIN
b440: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b450: 53 29 20 2f 44 48 41 56 45 5f 49 4e 54 54 59 50 S) /DHAVE_INTTYP
b460: 45 53 5f 48 3d 31 20 2f 44 48 41 56 45 5f 53 54 ES_H=1 /DHAVE_ST
b470: 44 42 4f 4f 4c 5f 48 3d 31 0d 0a 21 65 6e 64 69 DBOOL_H=1..!endi
b480: 66 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d f....!if $(TCL_M
b490: 45 4d 5f 44 45 42 55 47 29 0d 0a 4f 50 54 44 45 EM_DEBUG)..OPTDE
b4a0: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b4b0: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4d 45 4d 5f INES) /DTCL_MEM_
b4c0: 44 45 42 55 47 0d 0a 21 65 6e 64 69 66 0d 0a 21 DEBUG..!endif..!
b4d0: 69 66 20 24 28 54 43 4c 5f 43 4f 4d 50 49 4c 45 if $(TCL_COMPILE
b4e0: 5f 44 45 42 55 47 29 0d 0a 4f 50 54 44 45 46 49 _DEBUG)..OPTDEFI
b4f0: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b500: 45 53 29 20 2f 44 54 43 4c 5f 43 4f 4d 50 49 4c ES) /DTCL_COMPIL
b510: 45 5f 44 45 42 55 47 20 2f 44 54 43 4c 5f 43 4f E_DEBUG /DTCL_CO
b520: 4d 50 49 4c 45 5f 53 54 41 54 53 0d 0a 21 65 6e MPILE_STATS..!en
b530: 64 69 66 0d 0a 21 69 66 20 24 28 54 43 4c 5f 54 dif..!if $(TCL_T
b540: 48 52 45 41 44 53 29 20 26 26 20 24 28 54 43 4c HREADS) && $(TCL
b550: 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0d 0a _VERSION) < 87..
b560: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b570: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
b580: 5f 54 48 52 45 41 44 53 3d 31 0d 0a 21 69 66 20 _THREADS=1..!if
b590: 24 28 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c $(USE_THREAD_ALL
b5a0: 4f 43 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 OC) && $(TCL_VER
b5b0: 53 49 4f 4e 29 20 3c 20 38 37 0d 0a 4f 50 54 44 SION) < 87..OPTD
b5c0: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b5d0: 46 49 4e 45 53 29 20 2f 44 55 53 45 5f 54 48 52 FINES) /DUSE_THR
b5e0: 45 41 44 5f 41 4c 4c 4f 43 3d 31 0d 0a 21 65 6e EAD_ALLOC=1..!en
b5f0: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 dif..!endif..!if
b600: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
b610: 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ..OPTDEFINES.= $
b620: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 53 (OPTDEFINES) /DS
b630: 54 41 54 49 43 5f 42 55 49 4c 44 0d 0a 21 65 6c TATIC_BUILD..!el
b640: 73 65 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 seif $(TCL_VERSI
b650: 4f 4e 29 20 3e 20 38 36 0d 0a 4f 50 54 44 45 46 ON) > 86..OPTDEF
b660: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b670: 4e 45 53 29 20 2f 44 54 43 4c 5f 57 49 54 48 5f NES) /DTCL_WITH_
b680: 45 58 54 45 52 4e 41 4c 5f 54 4f 4d 4d 41 54 48 EXTERNAL_TOMMATH
b690: 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 ..!if "$(MACHINE
b6a0: 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c )" == "AMD64" ||
b6b0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
b6c0: 20 22 41 52 4d 36 34 22 0d 0a 4f 50 54 44 45 46 "ARM64"..OPTDEF
b6d0: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b6e0: 4e 45 53 29 20 2f 44 4d 50 5f 36 34 42 49 54 0d NES) /DMP_64BIT.
b6f0: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d .!endif..!endif.
b700: 0a 21 69 66 20 24 28 54 43 4c 5f 4e 4f 5f 44 45 .!if $(TCL_NO_DE
b710: 50 52 45 43 41 54 45 44 29 0d 0a 4f 50 54 44 45 PRECATED)..OPTDE
b720: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b730: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4e 4f 5f 44 INES) /DTCL_NO_D
b740: 45 50 52 45 43 41 54 45 44 0d 0a 21 65 6e 64 69 EPRECATED..!endi
b750: 66 0d 0a 0d 0a 21 69 66 20 24 28 55 53 45 5f 53 f....!if $(USE_S
b760: 54 55 42 53 29 0d 0a 23 20 4e 6f 74 65 20 77 65 TUBS)..# Note we
b770: 20 64 6f 20 6e 6f 74 20 64 65 66 69 6e 65 20 55 do not define U
b780: 53 45 5f 54 43 4c 5f 53 54 55 42 53 20 65 76 65 SE_TCL_STUBS eve
b790: 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 n when building
b7a0: 74 6b 20 73 69 6e 63 65 20 73 6f 6d 65 0d 0a 23 tk since some..#
b7b0: 20 74 65 73 74 20 74 61 72 67 65 74 73 20 69 6e test targets in
b7c0: 20 74 6b 20 64 6f 20 6e 6f 74 20 75 73 65 20 73 tk do not use s
b7d0: 74 75 62 73 0d 0a 21 69 66 20 21 24 28 44 4f 49 tubs..!if !$(DOI
b7e0: 4e 47 5f 54 43 4c 29 0d 0a 55 53 45 5f 53 54 55 NG_TCL)..USE_STU
b7f0: 42 53 5f 44 45 46 53 20 20 3d 20 2f 44 55 53 45 BS_DEFS = /DUSE
b800: 5f 54 43 4c 5f 53 54 55 42 53 20 2f 44 55 53 45 _TCL_STUBS /DUSE
b810: 5f 54 43 4c 4f 4f 5f 53 54 55 42 53 0d 0a 21 69 _TCLOO_STUBS..!i
b820: 66 20 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 55 53 f $(NEED_TK)..US
b830: 45 5f 53 54 55 42 53 5f 44 45 46 53 20 20 3d 20 E_STUBS_DEFS =
b840: 24 28 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 $(USE_STUBS_DEFS
b850: 29 20 2f 44 55 53 45 5f 54 4b 5f 53 54 55 42 53 ) /DUSE_TK_STUBS
b860: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 ..!endif..!endif
b870: 0d 0a 21 65 6e 64 69 66 20 23 20 55 53 45 5f 53 ..!endif # USE_S
b880: 54 55 42 53 0d 0a 0d 0a 21 69 66 20 21 24 28 44 TUBS....!if !$(D
b890: 45 42 55 47 29 0d 0a 4f 50 54 44 45 46 49 4e 45 EBUG)..OPTDEFINE
b8a0: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b8b0: 29 20 2f 44 4e 44 45 42 55 47 0d 0a 21 69 66 20 ) /DNDEBUG..!if
b8c0: 24 28 4f 50 54 49 4d 49 5a 49 4e 47 29 0d 0a 4f $(OPTIMIZING)..O
b8d0: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b8e0: 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f TDEFINES) /DTCL_
b8f0: 43 46 47 5f 4f 50 54 49 4d 49 5a 45 44 0d 0a 21 CFG_OPTIMIZED..!
b900: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 endif..!endif..!
b910: 69 66 20 24 28 50 52 4f 46 49 4c 45 29 0d 0a 4f if $(PROFILE)..O
b920: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b930: 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f TDEFINES) /DTCL_
b940: 43 46 47 5f 50 52 4f 46 49 4c 45 44 0d 0a 21 65 CFG_PROFILED..!e
b950: 6e 64 69 66 0d 0a 21 69 66 20 22 24 28 4d 41 43 ndif..!if "$(MAC
b960: 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 HINE)" == "AMD64
b970: 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 " || "$(MACHINE)
b980: 22 20 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 4f 50 " == "ARM64"..OP
b990: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
b9a0: 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 DEFINES) /DTCL_C
b9b0: 46 47 5f 44 4f 36 34 42 49 54 0d 0a 21 65 6e 64 FG_DO64BIT..!end
b9c0: 69 66 0d 0a 21 69 66 20 24 28 56 43 56 45 52 53 if..!if $(VCVERS
b9d0: 49 4f 4e 29 20 3c 20 31 33 30 30 0d 0a 4f 50 54 ION) < 1300..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 4e 4f 5f 53 54 52 EFINES) /DNO_STR
ba00: 54 4f 49 36 34 3d 31 0d 0a 21 65 6e 64 69 66 0d TOI64=1..!endif.
ba10: 0a 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a ...!if $(TCL_MAJ
ba20: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 OR_VERSION) == 8
ba30: 0d 0a 21 69 66 20 22 24 28 5f 55 53 45 5f 36 34 ..!if "$(_USE_64
ba40: 42 49 54 5f 54 49 4d 45 5f 54 29 22 20 3d 3d 20 BIT_TIME_T)" ==
ba50: 22 31 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 "1"..OPTDEFINES.
ba60: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
ba70: 2f 44 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d /D_USE_64BIT_TIM
ba80: 45 5f 54 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 21 E_T=1..!endif..!
ba90: 65 6e 64 69 66 0d 0a 21 69 66 20 22 24 28 54 43 endif..!if "$(TC
baa0: 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d L_BUILD_FOR)" ==
bab0: 20 22 38 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 "8"..OPTDEFINES
bac0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
bad0: 20 2f 44 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 /DTCL_MAJOR_VER
bae0: 53 49 4f 4e 3d 38 20 2f 44 54 4b 5f 4d 41 4a 4f SION=8 /DTK_MAJO
baf0: 52 5f 56 45 52 53 49 4f 4e 3d 38 0d 0a 21 65 6e R_VERSION=8..!en
bb00: 64 69 66 0d 0a 0d 0a 23 20 4c 69 6b 65 20 74 68 dif....# Like th
bb10: 65 20 54 45 41 20 73 79 73 74 65 6d 20 6f 6e 6c e TEA system onl
bb20: 79 20 73 65 74 20 74 68 69 73 20 6e 6f 6e 20 65 y set this non e
bb30: 6d 70 74 79 20 66 6f 72 20 6e 6f 6e 2d 54 6b 20 mpty for non-Tk
bb40: 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 4e 6f extensions..# No
bb50: 74 65 3a 20 73 6f 6d 65 20 65 78 74 65 6e 73 69 te: some extensi
bb60: 6f 6e 73 20 75 73 65 20 50 41 43 4b 41 47 45 5f ons use PACKAGE_
bb70: 4e 41 4d 45 20 61 6e 64 20 6f 74 68 65 72 73 20 NAME and others
bb80: 75 73 65 20 50 41 43 4b 41 47 45 5f 54 43 4c 4e use PACKAGE_TCLN
bb90: 41 4d 45 0d 0a 23 20 73 6f 20 77 65 20 70 61 73 AME..# so we pas
bba0: 73 20 62 6f 74 68 0d 0a 21 69 66 20 21 24 28 44 s both..!if !$(D
bbb0: 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 28 OING_TCL) && !$(
bbc0: 44 4f 49 4e 47 5f 54 4b 29 0d 0a 50 4b 47 4e 41 DOING_TK)..PKGNA
bbd0: 4d 45 46 4c 41 47 53 20 3d 20 2f 44 50 41 43 4b MEFLAGS = /DPACK
bbe0: 41 47 45 5f 4e 41 4d 45 3d 22 5c 22 24 28 50 52 AGE_NAME="\"$(PR
bbf0: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
bc00: 45 29 5c 22 22 20 5c 0d 0a 09 2f 44 50 41 43 4b E)\"" \.../DPACK
bc10: 41 47 45 5f 54 43 4c 4e 41 4d 45 3d 22 5c 22 24 AGE_TCLNAME="\"$
bc20: 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c (PRJ_PACKAGE_TCL
bc30: 4e 41 4d 45 29 5c 22 22 20 5c 0d 0a 09 2f 44 50 NAME)\"" \.../DP
bc40: 41 43 4b 41 47 45 5f 56 45 52 53 49 4f 4e 3d 22 ACKAGE_VERSION="
bc50: 5c 22 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c \"$(DOTVERSION)\
bc60: 22 22 20 5c 0d 0a 09 2f 44 4d 4f 44 55 4c 45 5f "" \.../DMODULE_
bc70: 53 43 4f 50 45 3d 65 78 74 65 72 6e 0d 0a 21 65 SCOPE=extern..!e
bc80: 6e 64 69 66 0d 0a 0d 0a 23 20 63 72 74 20 70 69 ndif....# crt pi
bc90: 63 6b 73 20 74 68 65 20 43 20 72 75 6e 20 74 69 cks the C run ti
bca0: 6d 65 20 62 61 73 65 64 20 6f 6e 20 73 65 6c 65 me based on sele
bcb0: 63 74 65 64 20 4f 50 54 53 0d 0a 21 69 66 20 24 cted OPTS..!if $
bcc0: 28 4d 53 56 43 52 54 29 0d 0a 21 69 66 20 24 28 (MSVCRT)..!if $(
bcd0: 44 45 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 DEBUG) && !$(UNC
bce0: 48 45 43 4b 45 44 29 0d 0a 63 72 74 20 3d 20 2d HECKED)..crt = -
bcf0: 4d 44 64 0d 0a 21 65 6c 73 65 0d 0a 63 72 74 20 MDd..!else..crt
bd00: 3d 20 2d 4d 44 0d 0a 21 65 6e 64 69 66 0d 0a 21 = -MD..!endif..!
bd10: 65 6c 73 65 0d 0a 21 69 66 20 24 28 44 45 42 55 else..!if $(DEBU
bd20: 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b G) && !$(UNCHECK
bd30: 45 44 29 0d 0a 63 72 74 20 3d 20 2d 4d 54 64 0d ED)..crt = -MTd.
bd40: 0a 21 65 6c 73 65 0d 0a 63 72 74 20 3d 20 2d 4d .!else..crt = -M
bd50: 54 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 T..!endif..!endi
bd60: 66 0d 0a 0d 0a 23 20 63 64 65 62 75 67 20 69 6e f....# cdebug in
bd70: 63 6c 75 64 65 73 20 63 6f 6d 70 69 6c 65 72 20 cludes compiler
bd80: 6f 70 74 69 6f 6e 73 20 66 6f 72 20 64 65 62 75 options for debu
bd90: 67 67 69 6e 67 20 61 73 20 77 65 6c 6c 20 61 73 gging as well as
bda0: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0d 0a optimization...
bdb0: 21 69 66 20 24 28 44 45 42 55 47 29 0d 0a 0d 0a !if $(DEBUG)....
bdc0: 23 20 49 6e 20 64 65 62 75 67 67 69 6e 67 20 6d # In debugging m
bdd0: 6f 64 65 2c 20 6f 70 74 69 6d 69 7a 61 74 69 6f ode, optimizatio
bde0: 6e 73 20 6e 65 65 64 20 74 6f 20 62 65 20 64 69 ns need to be di
bdf0: 73 61 62 6c 65 64 0d 0a 63 64 65 62 75 67 20 3d sabled..cdebug =
be00: 20 2d 5a 69 20 2d 4f 64 20 24 28 44 45 42 55 47 -Zi -Od $(DEBUG
be10: 46 4c 41 47 53 29 0d 0a 0d 0a 21 65 6c 73 65 0d FLAGS)....!else.
be20: 0a 0d 0a 63 64 65 62 75 67 20 3d 20 24 28 4f 50 ...cdebug = $(OP
be30: 54 49 4d 49 5a 41 54 49 4f 4e 53 29 0d 0a 21 69 TIMIZATIONS)..!i
be40: 66 20 24 28 53 59 4d 42 4f 4c 53 29 0d 0a 63 64 f $(SYMBOLS)..cd
be50: 65 62 75 67 20 3d 20 24 28 63 64 65 62 75 67 29 ebug = $(cdebug)
be60: 20 2d 5a 69 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a -Zi..!endif....
be70: 21 65 6e 64 69 66 20 23 20 24 28 44 45 42 55 47 !endif # $(DEBUG
be80: 29 0d 0a 0d 0a 23 20 63 77 61 72 6e 20 69 6e 63 )....# cwarn inc
be90: 6c 75 64 65 73 20 64 65 66 61 75 6c 74 20 77 61 ludes default wa
bea0: 72 6e 69 6e 67 20 6c 65 76 65 6c 73 2c 20 61 6c rning levels, al
beb0: 73 6f 20 43 34 30 39 30 20 28 62 75 67 67 79 29 so C4090 (buggy)
bec0: 20 61 6e 64 20 43 34 31 34 36 20 69 73 20 75 73 and C4146 is us
bed0: 65 6c 65 73 73 2e 0d 0a 63 77 61 72 6e 20 3d 20 eless...cwarn =
bee0: 24 28 57 41 52 4e 49 4e 47 53 29 20 2d 77 64 34 $(WARNINGS) -wd4
bef0: 30 39 30 20 2d 77 64 34 31 34 36 0d 0a 0d 0a 21 090 -wd4146....!
bf00: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
bf10: 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 == "AMD64" || "$
bf20: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 (MACHINE)" == "A
bf30: 52 4d 36 34 22 0d 0a 23 20 44 69 73 61 62 6c 65 RM64"..# Disable
bf40: 20 70 6f 69 6e 74 65 72 3c 2d 3e 69 6e 74 20 77 pointer<->int w
bf50: 61 72 6e 69 6e 67 73 20 72 65 6c 61 74 65 64 20 arnings related
bf60: 74 6f 20 63 61 73 74 20 62 65 74 77 65 65 6e 20 to cast between
bf70: 64 69 66 66 65 72 65 6e 74 20 73 69 7a 65 73 0d different sizes.
bf80: 0a 23 20 54 68 65 72 65 20 61 72 65 20 61 20 67 .# There are a g
bf90: 61 64 7a 69 6c 6c 69 6f 6e 20 6f 66 20 74 68 65 adzillion of the
bfa0: 73 65 20 64 75 65 20 74 6f 20 75 73 65 20 6f 66 se due to use of
bfb0: 20 43 6c 69 65 6e 74 44 61 74 61 20 61 6e 64 0d ClientData and.
bfc0: 0a 23 20 63 6c 75 74 74 65 72 20 75 70 20 63 6f .# clutter up co
bfd0: 6d 70 69 6c 65 72 0d 0a 23 20 6f 75 74 70 75 74 mpiler..# output
bfe0: 20 69 6e 63 72 65 61 73 69 6e 67 20 63 68 61 6e increasing chan
bff0: 63 65 20 6f 66 20 61 20 72 65 61 6c 20 77 61 72 ce of a real war
c000: 6e 69 6e 67 20 67 65 74 74 69 6e 67 20 6c 6f 73 ning getting los
c010: 74 2e 20 53 6f 20 64 69 73 61 62 6c 65 20 74 68 t. So disable th
c020: 65 6d 2e 0d 0a 23 20 45 76 65 6e 74 75 61 6c 6c em...# Eventuall
c030: 79 20 73 6f 6d 65 20 64 61 79 2c 20 54 63 6c 20 y some day, Tcl
c040: 77 69 6c 6c 20 62 65 20 36 34 2d 62 69 74 20 63 will be 64-bit c
c050: 6c 65 61 6e 2e 0d 0a 63 77 61 72 6e 20 3d 20 24 lean...cwarn = $
c060: 28 63 77 61 72 6e 29 20 2d 77 64 34 33 31 31 20 (cwarn) -wd4311
c070: 2d 77 64 34 33 31 32 0d 0a 21 65 6e 64 69 66 0d -wd4312..!endif.
c080: 0a 0d 0a 23 23 23 20 43 6f 6d 6d 6f 6e 20 63 6f ...### Common co
c090: 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 74 mpiler options t
c0a0: 68 61 74 20 61 72 65 20 61 72 63 68 69 74 65 63 hat are architec
c0b0: 74 75 72 65 20 73 70 65 63 69 66 69 63 0d 0a 21 ture specific..!
c0c0: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
c0d0: 3d 3d 20 22 41 52 4d 22 0d 0a 63 61 72 63 68 20 == "ARM"..carch
c0e0: 3d 20 2f 44 5f 41 52 4d 5f 57 49 4e 41 50 49 5f = /D_ARM_WINAPI_
c0f0: 50 41 52 54 49 54 49 4f 4e 5f 44 45 53 4b 54 4f PARTITION_DESKTO
c100: 50 5f 53 44 4b 5f 41 56 41 49 4c 41 42 4c 45 0d P_SDK_AVAILABLE.
c110: 0a 21 65 6c 73 65 0d 0a 63 61 72 63 68 20 3d 0d .!else..carch =.
c120: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 63 70 75 .!endif....# cpu
c130: 69 64 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c id is only avail
c140: 61 62 6c 65 20 6f 6e 20 69 6e 74 65 6c 20 6d 61 able on intel ma
c150: 63 68 69 6e 65 73 0d 0a 21 69 66 20 22 24 28 4d chines..!if "$(M
c160: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 ACHINE)" == "IX8
c170: 36 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 6" || "$(MACHINE
c180: 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0d 0a 63 )" == "AMD64"..c
c190: 61 72 63 68 20 3d 20 24 28 63 61 72 63 68 29 20 arch = $(carch)
c1a0: 2f 44 48 41 56 45 5f 43 50 55 49 44 3d 31 0d 0a /DHAVE_CPUID=1..
c1b0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 !endif....!if $(
c1c0: 44 45 42 55 47 29 0d 0a 23 20 54 75 72 6e 20 77 DEBUG)..# Turn w
c1d0: 61 72 6e 69 6e 67 73 20 69 6e 74 6f 20 65 72 72 arnings into err
c1e0: 6f 72 73 0d 0a 63 77 61 72 6e 20 3d 20 24 28 63 ors..cwarn = $(c
c1f0: 77 61 72 6e 29 20 2d 57 58 0d 0a 21 65 6e 64 69 warn) -WX..!endi
c200: 66 0d 0a 0d 0a 49 4e 43 4c 55 44 45 53 20 3d 20 f....INCLUDES =
c210: 24 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 $(TCL_INCLUDES)
c220: 24 28 54 4b 5f 49 4e 43 4c 55 44 45 53 29 20 24 $(TK_INCLUDES) $
c230: 28 50 52 4a 5f 49 4e 43 4c 55 44 45 53 29 0d 0a (PRJ_INCLUDES)..
c240: 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c !if !$(DOING_TCL
c250: 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 4b ) && !$(DOING_TK
c260: 29 0d 0a 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 )..INCLUDES = $(
c270: 49 4e 43 4c 55 44 45 53 29 20 2d 49 22 24 28 47 INCLUDES) -I"$(G
c280: 45 4e 45 52 49 43 44 49 52 29 22 20 2d 49 22 24 ENERICDIR)" -I"$
c290: 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 (WIN_DIR)" -I"$(
c2a0: 43 4f 4d 50 41 54 44 49 52 29 22 0d 0a 21 65 6e COMPATDIR)"..!en
c2b0: 64 69 66 0d 0a 0d 0a 23 20 54 68 65 73 65 20 66 dif....# These f
c2c0: 6c 61 67 73 20 61 72 65 20 64 65 66 69 6e 65 64 lags are defined
c2d0: 20 72 6f 75 67 68 6c 79 20 69 6e 20 74 68 65 20 roughly in the
c2e0: 6f 72 64 65 72 20 6f 66 20 74 68 65 20 70 72 65 order of the pre
c2f0: 2d 72 65 66 6f 72 6d 0d 0a 23 20 72 75 6c 65 73 -reform..# rules
c300: 2e 76 63 2f 6d 61 6b 65 66 69 6c 65 2e 76 63 20 .vc/makefile.vc
c310: 74 6f 20 68 65 6c 70 20 76 69 73 75 61 6c 6c 79 to help visually
c320: 20 63 6f 6d 70 61 72 65 20 74 68 61 74 20 74 68 compare that th
c330: 65 20 70 72 65 2d 20 61 6e 64 0d 0a 23 20 70 6f e pre- and..# po
c340: 73 74 2d 72 65 66 6f 72 6d 20 62 75 69 6c 64 20 st-reform build
c350: 6c 6f 67 73 0d 0a 0d 0a 23 20 63 66 6c 61 67 73 logs....# cflags
c360: 20 63 6f 6e 74 61 69 6e 73 20 67 65 6e 65 72 69 contains generi
c370: 63 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 c flags used for
c380: 20 62 75 69 6c 64 69 6e 67 20 70 72 61 63 74 69 building practi
c390: 63 61 6c 6c 79 20 61 6c 6c 20 6f 62 6a 65 63 74 cally all object
c3a0: 20 66 69 6c 65 73 0d 0a 63 66 6c 61 67 73 20 3d files..cflags =
c3b0: 20 2d 6e 6f 6c 6f 67 6f 20 2d 63 20 24 28 43 4f -nologo -c $(CO
c3c0: 4d 50 49 4c 45 52 46 4c 41 47 53 29 20 24 28 63 MPILERFLAGS) $(c
c3d0: 61 72 63 68 29 20 24 28 63 77 61 72 6e 29 20 2d arch) $(cwarn) -
c3e0: 46 70 24 28 54 4d 50 5f 44 49 52 29 5e 5c 20 24 Fp$(TMP_DIR)^\ $
c3f0: 28 63 64 65 62 75 67 29 0d 0a 0d 0a 21 69 66 20 (cdebug)....!if
c400: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
c410: 49 4f 4e 29 20 3d 3d 20 38 20 26 26 20 24 28 54 ION) == 8 && $(T
c420: 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e CL_MINOR_VERSION
c430: 29 20 3c 20 37 0d 0a 63 66 6c 61 67 73 20 3d 20 ) < 7..cflags =
c440: 24 28 63 66 6c 61 67 73 29 20 2d 44 54 63 6c 5f $(cflags) -DTcl_
c450: 53 69 7a 65 3d 69 6e 74 0d 0a 21 65 6e 64 69 66 Size=int..!endif
c460: 0d 0a 0d 0a 23 20 61 70 70 63 66 6c 61 67 73 20 ....# appcflags
c470: 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 contains $(cflag
c480: 73 29 20 61 6e 64 20 66 6c 61 67 73 20 66 6f 72 s) and flags for
c490: 20 62 75 69 6c 64 69 6e 67 20 74 68 65 20 61 70 building the ap
c4a0: 70 6c 69 63 61 74 69 6f 6e 0d 0a 23 20 6f 62 6a plication..# obj
c4b0: 65 63 74 20 66 69 6c 65 73 20 28 65 2e 67 2e 20 ect files (e.g.
c4c0: 74 63 6c 73 68 2c 20 6f 72 20 77 69 73 68 29 20 tclsh, or wish)
c4d0: 70 6b 67 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 pkgcflags contai
c4e0: 6e 73 20 24 28 63 66 6c 61 67 73 29 20 70 6c 75 ns $(cflags) plu
c4f0: 73 0d 0a 23 20 66 6c 61 67 73 20 75 73 65 64 20 s..# flags used
c500: 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 73 68 61 for building sha
c510: 72 65 64 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 red object files
c520: 20 54 68 65 20 74 77 6f 20 64 69 66 66 65 72 20 The two differ
c530: 69 6e 20 74 68 65 0d 0a 23 20 42 55 49 4c 44 5f in the..# BUILD_
c540: 24 28 50 52 4f 4a 45 43 54 29 20 6d 61 63 72 6f $(PROJECT) macro
c550: 20 77 68 69 63 68 20 73 68 6f 75 6c 64 20 62 65 which should be
c560: 20 64 65 66 69 6e 65 64 20 6f 6e 6c 79 20 66 6f defined only fo
c570: 72 20 74 68 65 20 73 68 61 72 65 64 0d 0a 23 20 r the shared..#
c580: 6c 69 62 72 61 72 79 20 2a 69 6d 70 6c 65 6d 65 library *impleme
c590: 6e 74 61 74 69 6f 6e 2a 20 61 6e 64 20 6e 6f 74 ntation* and not
c5a0: 20 66 6f 72 20 69 74 73 20 63 61 6c 6c 65 72 20 for its caller
c5b0: 69 6e 74 65 72 66 61 63 65 0d 0a 0d 0a 61 70 70 interface....app
c5c0: 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d cflags_nostubs =
c5d0: 20 24 28 63 66 6c 61 67 73 29 20 24 28 63 72 74 $(cflags) $(crt
c5e0: 29 20 24 28 49 4e 43 4c 55 44 45 53 29 20 24 28 ) $(INCLUDES) $(
c5f0: 54 43 4c 5f 44 45 46 49 4e 45 53 29 20 24 28 50 TCL_DEFINES) $(P
c600: 52 4a 5f 44 45 46 49 4e 45 53 29 20 24 28 4f 50 RJ_DEFINES) $(OP
c610: 54 44 45 46 49 4e 45 53 29 0d 0a 61 70 70 63 66 TDEFINES)..appcf
c620: 6c 61 67 73 20 3d 20 24 28 61 70 70 63 66 6c 61 lags = $(appcfla
c630: 67 73 5f 6e 6f 73 74 75 62 73 29 20 24 28 55 53 gs_nostubs) $(US
c640: 45 5f 53 54 55 42 53 5f 44 45 46 53 29 0d 0a 70 E_STUBS_DEFS)..p
c650: 6b 67 63 66 6c 61 67 73 20 3d 20 24 28 61 70 70 kgcflags = $(app
c660: 63 66 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d cflags) $(PKGNAM
c670: 45 46 4c 41 47 53 29 20 2f 44 42 55 49 4c 44 5f EFLAGS) /DBUILD_
c680: 24 28 50 52 4f 4a 45 43 54 29 0d 0a 70 6b 67 63 $(PROJECT)..pkgc
c690: 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 flags_nostubs =
c6a0: 24 28 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 $(appcflags_nost
c6b0: 75 62 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c ubs) $(PKGNAMEFL
c6c0: 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 AGS) /DBUILD_$(P
c6d0: 52 4f 4a 45 43 54 29 0d 0a 0d 0a 23 20 73 74 75 ROJECT)....# stu
c6e0: 62 73 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e bscflags contain
c6f0: 73 20 24 28 63 66 6c 61 67 73 29 20 70 6c 75 73 s $(cflags) plus
c700: 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 20 flags used for
c710: 62 75 69 6c 64 69 6e 67 20 61 20 73 74 75 62 73 building a stubs
c720: 0d 0a 23 20 6c 69 62 72 61 72 79 20 66 6f 72 20 ..# library for
c730: 74 68 65 20 70 61 63 6b 61 67 65 2e 20 20 4e 6f the package. No
c740: 74 65 3a 20 2f 44 53 54 41 54 49 43 5f 42 55 49 te: /DSTATIC_BUI
c750: 4c 44 20 69 73 20 64 65 66 69 6e 65 64 20 69 6e LD is defined in
c760: 0d 0a 23 20 24 28 4f 50 54 44 45 46 49 4e 45 53 ..# $(OPTDEFINES
c770: 29 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 4f 50 ) only if the OP
c780: 54 53 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e TS configuration
c790: 20 69 6e 64 69 63 61 74 65 73 20 61 20 73 74 61 indicates a sta
c7a0: 74 69 63 0d 0a 23 20 6c 69 62 72 61 72 79 2e 20 tic..# library.
c7b0: 48 6f 77 65 76 65 72 20 74 68 65 20 73 74 75 62 However the stub
c7c0: 73 20 6c 69 62 72 61 72 79 20 69 73 20 41 4c 57 s library is ALW
c7d0: 41 59 53 20 73 74 61 74 69 63 20 68 65 6e 63 65 AYS static hence
c7e0: 20 69 6e 63 6c 75 64 65 64 0d 0a 23 20 68 65 72 included..# her
c7f0: 65 20 69 72 72 65 73 70 65 63 74 69 76 65 20 6f e irrespective o
c800: 66 20 74 68 65 20 4f 50 54 53 20 73 65 74 74 69 f the OPTS setti
c810: 6e 67 2e 0d 0a 23 0d 0a 23 20 54 42 44 20 2d 20 ng...#..# TBD -
c820: 74 63 6c 76 66 73 20 68 61 73 20 61 20 63 6f 6d tclvfs has a com
c830: 6d 65 6e 74 20 74 68 61 74 20 73 74 75 62 73 20 ment that stubs
c840: 6c 69 62 73 20 73 68 6f 75 6c 64 20 6e 6f 74 20 libs should not
c850: 62 65 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 be compiled with
c860: 20 2d 47 4c 0d 0a 23 20 77 69 74 68 6f 75 74 20 -GL..# without
c870: 73 74 61 74 69 6e 67 20 77 68 79 2e 20 54 63 6c stating why. Tcl
c880: 20 69 74 73 65 6c 66 20 63 6f 6d 70 69 6c 65 64 itself compiled
c890: 20 73 74 75 62 73 20 6c 69 62 73 20 77 69 74 68 stubs libs with
c8a0: 20 74 68 69 73 20 66 6c 61 67 2e 0d 0a 23 20 73 this flag...# s
c8b0: 6f 20 77 65 20 64 6f 20 6e 6f 74 20 72 65 6d 6f o we do not remo
c8c0: 76 65 20 69 74 20 66 72 6f 6d 20 63 66 6c 61 67 ve it from cflag
c8d0: 73 2e 20 2d 47 4c 20 6d 61 79 20 70 72 65 76 65 s. -GL may preve
c8e0: 6e 74 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 nt extensions..#
c8f0: 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 6f compiled with o
c900: 6e 65 20 56 43 20 76 65 72 73 69 6f 6e 20 74 6f ne VC version to
c910: 20 66 61 69 6c 20 74 6f 20 6c 69 6e 6b 20 61 67 fail to link ag
c920: 61 69 6e 73 74 20 73 74 75 62 73 20 6c 69 62 72 ainst stubs libr
c930: 61 72 79 0d 0a 23 20 63 6f 6d 70 69 6c 65 64 20 ary..# compiled
c940: 77 69 74 68 20 61 6e 6f 74 68 65 72 20 56 43 20 with another VC
c950: 76 65 72 73 69 6f 6e 2e 20 43 68 65 63 6b 20 66 version. Check f
c960: 6f 72 20 74 68 69 73 20 61 6e 64 20 66 69 78 20 or this and fix
c970: 61 63 63 6f 72 64 69 6e 67 6c 79 2e 0d 0a 73 74 accordingly...st
c980: 75 62 73 63 66 6c 61 67 73 20 3d 20 24 28 63 66 ubscflags = $(cf
c990: 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 lags) $(PKGNAMEF
c9a0: 4c 41 47 53 29 20 24 28 50 52 4a 5f 44 45 46 49 LAGS) $(PRJ_DEFI
c9b0: 4e 45 53 29 20 24 28 4f 50 54 44 45 46 49 4e 45 NES) $(OPTDEFINE
c9c0: 53 29 20 2f 5a 6c 20 2f 47 4c 2d 20 2f 44 53 54 S) /Zl /GL- /DST
c9d0: 41 54 49 43 5f 42 55 49 4c 44 20 24 28 49 4e 43 ATIC_BUILD $(INC
c9e0: 4c 55 44 45 53 29 20 24 28 55 53 45 5f 53 54 55 LUDES) $(USE_STU
c9f0: 42 53 5f 44 45 46 53 29 0d 0a 0d 0a 23 20 4c 69 BS_DEFS)....# Li
ca00: 6e 6b 20 66 6c 61 67 73 0d 0a 0d 0a 21 69 66 20 nk flags....!if
ca10: 24 28 44 45 42 55 47 29 0d 0a 6c 64 65 62 75 67 $(DEBUG)..ldebug
ca20: 09 3d 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67 .= -debug -debug
ca30: 74 79 70 65 3a 63 76 0d 0a 21 65 6c 73 65 0d 0a type:cv..!else..
ca40: 6c 64 65 62 75 67 09 3d 20 2d 72 65 6c 65 61 73 ldebug.= -releas
ca50: 65 20 2d 6f 70 74 3a 72 65 66 20 2d 6f 70 74 3a e -opt:ref -opt:
ca60: 69 63 66 2c 33 0d 0a 21 69 66 20 24 28 53 59 4d icf,3..!if $(SYM
ca70: 42 4f 4c 53 29 0d 0a 6c 64 65 62 75 67 09 3d 20 BOLS)..ldebug.=
ca80: 24 28 6c 64 65 62 75 67 29 20 2d 64 65 62 75 67 $(ldebug) -debug
ca90: 20 2d 64 65 62 75 67 74 79 70 65 3a 63 76 0d 0a -debugtype:cv..
caa0: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
cab0: 0d 0a 23 20 4e 6f 74 65 3a 20 50 72 6f 66 69 6c ..# Note: Profil
cac0: 69 6e 67 20 69 73 20 63 75 72 72 65 6e 74 6c 79 ing is currently
cad0: 20 6f 6e 6c 79 20 70 6f 73 73 69 62 6c 65 20 77 only possible w
cae0: 69 74 68 20 74 68 65 20 56 69 73 75 61 6c 20 53 ith the Visual S
caf0: 74 75 64 69 6f 20 45 6e 74 65 72 70 72 69 73 65 tudio Enterprise
cb00: 0d 0a 21 69 66 20 24 28 50 52 4f 46 49 4c 45 29 ..!if $(PROFILE)
cb10: 0d 0a 6c 64 65 62 75 67 3d 20 24 28 6c 64 65 62 ..ldebug= $(ldeb
cb20: 75 67 29 20 2d 70 72 6f 66 69 6c 65 0d 0a 21 65 ug) -profile..!e
cb30: 6e 64 69 66 0d 0a 0d 0a 23 23 23 20 44 65 63 6c ndif....### Decl
cb40: 61 72 61 74 69 6f 6e 73 20 63 6f 6d 6d 6f 6e 20 arations common
cb50: 74 6f 20 61 6c 6c 20 6c 69 6e 6b 65 72 20 76 65 to all linker ve
cb60: 72 73 69 6f 6e 73 0d 0a 6c 66 6c 61 67 73 09 3d rsions..lflags.=
cb70: 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 63 68 69 6e -nologo -machin
cb80: 65 3a 24 28 4d 41 43 48 49 4e 45 29 20 24 28 4c e:$(MACHINE) $(L
cb90: 49 4e 4b 45 52 46 4c 41 47 53 29 20 24 28 6c 64 INKERFLAGS) $(ld
cba0: 65 62 75 67 29 0d 0a 0d 0a 21 69 66 20 24 28 4d ebug)....!if $(M
cbb0: 53 56 43 52 54 29 20 26 26 20 21 28 24 28 44 45 SVCRT) && !($(DE
cbc0: 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 BUG) && !$(UNCHE
cbd0: 43 4b 45 44 29 29 20 26 26 20 24 28 56 43 56 45 CKED)) && $(VCVE
cbe0: 52 53 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0d 0a RSION) >= 1900..
cbf0: 6c 66 6c 61 67 73 09 3d 20 24 28 6c 66 6c 61 67 lflags.= $(lflag
cc00: 73 29 20 2d 6e 6f 64 65 66 61 75 6c 74 6c 69 62 s) -nodefaultlib
cc10: 3a 75 63 72 74 2e 6c 69 62 0d 0a 21 65 6e 64 69 :ucrt.lib..!endi
cc20: 66 0d 0a 0d 0a 64 6c 6c 6c 66 6c 61 67 73 20 3d f....dlllflags =
cc30: 20 24 28 6c 66 6c 61 67 73 29 20 2d 64 6c 6c 0d $(lflags) -dll.
cc40: 0a 63 6f 6e 6c 66 6c 61 67 73 20 3d 20 24 28 6c .conlflags = $(l
cc50: 66 6c 61 67 73 29 20 2d 73 75 62 73 79 73 74 65 flags) -subsyste
cc60: 6d 3a 63 6f 6e 73 6f 6c 65 0d 0a 67 75 69 6c 66 m:console..guilf
cc70: 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 lags = $(lflags)
cc80: 20 2d 73 75 62 73 79 73 74 65 6d 3a 77 69 6e 64 -subsystem:wind
cc90: 6f 77 73 0d 0a 0d 0a 23 20 4c 69 62 72 61 72 69 ows....# Librari
cca0: 65 73 20 74 68 61 74 20 61 72 65 20 72 65 71 75 es that are requ
ccb0: 69 72 65 64 20 66 6f 72 20 65 76 65 72 79 20 69 ired for every i
ccc0: 6d 61 67 65 2e 0d 0a 23 20 45 78 74 65 6e 73 69 mage...# Extensi
ccd0: 6f 6e 73 20 73 68 6f 75 6c 64 20 64 65 66 69 6e ons should defin
cce0: 65 20 61 6e 79 20 61 64 64 69 74 69 6f 6e 61 6c e any additional
ccf0: 20 6c 69 62 72 61 72 69 65 73 20 77 69 74 68 20 libraries with
cd00: 24 28 50 52 4a 5f 4c 49 42 53 29 0d 0a 77 69 6e $(PRJ_LIBS)..win
cd10: 6c 69 62 73 20 20 20 3d 20 6b 65 72 6e 65 6c 33 libs = kernel3
cd20: 32 2e 6c 69 62 20 61 64 76 61 70 69 33 32 2e 6c 2.lib advapi32.l
cd30: 69 62 0d 0a 0d 0a 21 69 66 20 24 28 4e 45 45 44 ib....!if $(NEED
cd40: 5f 54 4b 29 0d 0a 77 69 6e 6c 69 62 73 20 3d 20 _TK)..winlibs =
cd50: 24 28 77 69 6e 6c 69 62 73 29 20 67 64 69 33 32 $(winlibs) gdi32
cd60: 2e 6c 69 62 20 75 73 65 72 33 32 2e 6c 69 62 20 .lib user32.lib
cd70: 75 78 74 68 65 6d 65 2e 6c 69 62 0d 0a 21 65 6e uxtheme.lib..!en
cd80: 64 69 66 0d 0a 0d 0a 23 20 41 76 6f 69 64 20 27 dif....# Avoid '
cd90: 75 6e 72 65 73 6f 6c 76 65 64 20 65 78 74 65 72 unresolved exter
cda0: 6e 61 6c 20 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 nal symbol __sec
cdb0: 75 72 69 74 79 5f 63 6f 6f 6b 69 65 27 20 65 72 urity_cookie' er
cdc0: 72 6f 72 73 2e 0d 0a 23 20 63 2e 66 2e 20 68 74 rors...# c.f. ht
cdd0: 74 70 3a 2f 2f 73 75 70 70 6f 72 74 2e 6d 69 63 tp://support.mic
cde0: 72 6f 73 6f 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 rosoft.com/?id=8
cdf0: 39 34 35 37 33 0d 0a 21 69 66 20 22 24 28 4d 41 94573..!if "$(MA
ce00: 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 CHINE)" == "AMD6
ce10: 34 22 0d 0a 21 69 66 20 24 28 56 43 56 45 52 53 4"..!if $(VCVERS
ce20: 49 4f 4e 29 20 3e 20 31 33 39 39 20 26 26 20 24 ION) > 1399 && $
ce30: 28 56 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 35 (VCVERSION) < 15
ce40: 30 30 0d 0a 77 69 6e 6c 69 62 73 20 20 20 3d 20 00..winlibs =
ce50: 24 28 77 69 6e 6c 69 62 73 29 20 62 75 66 66 65 $(winlibs) buffe
ce60: 72 6f 76 65 72 66 6c 6f 77 55 2e 6c 69 62 0d 0a roverflowU.lib..
ce70: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a !endif..!endif..
ce80: 0d 0a 62 61 73 65 6c 69 62 73 20 3d 20 24 28 77 ..baselibs = $(w
ce90: 69 6e 6c 69 62 73 29 20 24 28 50 52 4a 5f 4c 49 inlibs) $(PRJ_LI
cea0: 42 53 29 0d 0a 0d 0a 21 69 66 20 24 28 4d 53 56 BS)....!if $(MSV
ceb0: 43 52 54 29 20 26 26 20 21 28 24 28 44 45 42 55 CRT) && !($(DEBU
cec0: 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b G) && !$(UNCHECK
ced0: 45 44 29 29 20 26 26 20 24 28 56 43 56 45 52 53 ED)) && $(VCVERS
cee0: 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0d 0a 62 61 ION) >= 1900..ba
cef0: 73 65 6c 69 62 73 20 20 20 3d 20 24 28 62 61 73 selibs = $(bas
cf00: 65 6c 69 62 73 29 20 75 63 72 74 2e 6c 69 62 0d elibs) ucrt.lib.
cf10: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 .!endif....#####
cf20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cf30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cf40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cf50: 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 31 ###########..# 1
cf60: 33 2e 20 44 65 66 69 6e 65 20 73 74 61 6e 64 61 3. Define standa
cf70: 72 64 20 63 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d rd commands, com
cf80: 6d 6f 6e 20 6d 61 6b 65 20 74 61 72 67 65 74 73 mon make targets
cf90: 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 and implicit ru
cfa0: 6c 65 73 0d 0a 0d 0a 43 43 50 4b 47 43 4d 44 20 les....CCPKGCMD
cfb0: 3d 20 24 28 63 63 33 32 29 20 24 28 70 6b 67 63 = $(cc32) $(pkgc
cfc0: 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f flags) -Fo$(TMP_
cfd0: 44 49 52 29 5e 5c 0d 0a 43 43 41 50 50 43 4d 44 DIR)^\..CCAPPCMD
cfe0: 20 3d 20 24 28 63 63 33 32 29 20 24 28 61 70 70 = $(cc32) $(app
cff0: 63 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 cflags) -Fo$(TMP
d000: 5f 44 49 52 29 5e 5c 0d 0a 43 43 53 54 55 42 53 _DIR)^\..CCSTUBS
d010: 43 4d 44 20 3d 20 24 28 63 63 33 32 29 20 24 28 CMD = $(cc32) $(
d020: 73 74 75 62 73 63 66 6c 61 67 73 29 20 2d 46 6f stubscflags) -Fo
d030: 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0d 0a 0d 0a $(TMP_DIR)^\....
d040: 4c 49 42 43 4d 44 20 3d 20 24 28 6c 69 62 33 32 LIBCMD = $(lib32
d050: 29 20 2d 6e 6f 6c 6f 67 6f 20 24 28 4c 49 4e 4b ) -nologo $(LINK
d060: 45 52 46 4c 41 47 53 29 20 2d 6f 75 74 3a 24 40 ERFLAGS) -out:$@
d070: 0d 0a 44 4c 4c 43 4d 44 20 3d 20 24 28 6c 69 6e ..DLLCMD = $(lin
d080: 6b 33 32 29 20 24 28 64 6c 6c 6c 66 6c 61 67 73 k32) $(dlllflags
d090: 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 65 ) -out:$@ $(base
d0a0: 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 73 29 libs) $(tcllibs)
d0b0: 20 24 28 74 6b 6c 69 62 73 29 0d 0a 0d 0a 43 4f $(tklibs)....CO
d0c0: 4e 45 58 45 43 4d 44 20 3d 20 24 28 6c 69 6e 6b NEXECMD = $(link
d0d0: 33 32 29 20 24 28 63 6f 6e 6c 66 6c 61 67 73 29 32) $(conlflags)
d0e0: 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 65 6c -out:$@ $(basel
d0f0: 69 62 73 29 20 24 28 74 63 6c 6c 69 62 73 29 20 ibs) $(tcllibs)
d100: 24 28 74 6b 6c 69 62 73 29 0d 0a 47 55 49 45 58 $(tklibs)..GUIEX
d110: 45 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29 ECMD = $(link32)
d120: 20 24 28 67 75 69 6c 66 6c 61 67 73 29 20 2d 6f $(guilflags) -o
d130: 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 62 73 ut:$@ $(baselibs
d140: 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 28 74 ) $(tcllibs) $(t
d150: 6b 6c 69 62 73 29 0d 0a 52 45 53 43 4d 44 20 20 klibs)..RESCMD
d160: 3d 20 24 28 72 63 33 32 29 20 2d 66 6f 20 24 40 = $(rc32) -fo $@
d170: 20 2d 72 20 2d 69 20 22 24 28 47 45 4e 45 52 49 -r -i "$(GENERI
d180: 43 44 49 52 29 22 20 2d 69 20 22 24 28 54 4d 50 CDIR)" -i "$(TMP
d190: 5f 44 49 52 29 22 20 5c 0d 0a 09 20 20 20 20 24 _DIR)" \... $
d1a0: 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 2f (TCL_INCLUDES) /
d1b0: 44 53 54 41 54 49 43 5f 42 55 49 4c 44 3d 24 28 DSTATIC_BUILD=$(
d1c0: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 5c 0d STATIC_BUILD) \.
d1d0: 0a 09 20 20 20 20 2f 44 44 45 42 55 47 3d 24 28 .. /DDEBUG=$(
d1e0: 44 45 42 55 47 29 20 2d 64 20 55 4e 43 48 45 43 DEBUG) -d UNCHEC
d1f0: 4b 45 44 3d 24 28 55 4e 43 48 45 43 4b 45 44 29 KED=$(UNCHECKED)
d200: 20 5c 0d 0a 09 20 20 20 20 2f 44 43 4f 4d 4d 41 \... /DCOMMA
d210: 56 45 52 53 49 4f 4e 3d 24 28 52 43 43 4f 4d 4d VERSION=$(RCCOMM
d220: 41 56 45 52 53 49 4f 4e 29 20 5c 0d 0a 09 20 20 AVERSION) \...
d230: 20 20 2f 44 44 4f 54 56 45 52 53 49 4f 4e 3d 5c /DDOTVERSION=\
d240: 22 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 "$(DOTVERSION)\"
d250: 20 5c 0d 0a 09 20 20 20 20 2f 44 56 45 52 53 49 \... /DVERSI
d260: 4f 4e 3d 5c 22 24 28 56 45 52 53 49 4f 4e 29 5c ON=\"$(VERSION)\
d270: 22 20 5c 0d 0a 09 20 20 20 20 2f 44 53 55 46 58 " \... /DSUFX
d280: 3d 5c 22 24 28 53 55 46 58 29 5c 22 20 5c 0d 0a =\"$(SUFX)\" \..
d290: 09 20 20 20 20 2f 44 50 52 4f 4a 45 43 54 3d 5c . /DPROJECT=\
d2a0: 22 24 28 50 52 4f 4a 45 43 54 29 5c 22 20 5c 0d "$(PROJECT)\" \.
d2b0: 0a 09 20 20 20 20 2f 44 50 52 4a 4c 49 42 4e 41 .. /DPRJLIBNA
d2c0: 4d 45 3d 5c 22 24 28 50 52 4a 4c 49 42 4e 41 4d ME=\"$(PRJLIBNAM
d2d0: 45 29 5c 22 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 E)\"....!ifndef
d2e0: 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 DEFAULT_BUILD_TA
d2f0: 52 47 45 54 0d 0a 44 45 46 41 55 4c 54 5f 42 55 RGET..DEFAULT_BU
d300: 49 4c 44 5f 54 41 52 47 45 54 20 3d 20 24 28 50 ILD_TARGET = $(P
d310: 52 4f 4a 45 43 54 29 0d 0a 21 65 6e 64 69 66 0d ROJECT)..!endif.
d320: 0a 0d 0a 64 65 66 61 75 6c 74 2d 74 61 72 67 65 ...default-targe
d330: 74 3a 20 24 28 44 45 46 41 55 4c 54 5f 42 55 49 t: $(DEFAULT_BUI
d340: 4c 44 5f 54 41 52 47 45 54 29 0d 0a 0d 0a 21 69 LD_TARGET)....!i
d350: 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 f $(MULTIPLATFOR
d360: 4d 5f 49 4e 53 54 41 4c 4c 29 0d 0a 64 65 66 61 M_INSTALL)..defa
d370: 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a 0d 0a 09 ult-pkgindex:...
d380: 40 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 6b 61 @echo if {[packa
d390: 67 65 20 76 73 61 74 69 73 66 69 65 73 20 5b 70 ge vsatisfies [p
d3a0: 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65 20 54 ackage provide T
d3b0: 63 6c 5d 20 39 2e 30 5d 7d 20 7b 20 3e 20 24 28 cl] 9.0]} { > $(
d3c0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d3d0: 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 70 61 x.tcl...@echo pa
d3e0: 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 ckage ifneeded $
d3f0: 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c (PRJ_PACKAGE_TCL
d400: 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 NAME) $(DOTVERSI
d410: 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 ON) \... [lis
d420: 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 t load [file joi
d430: 6e 20 24 24 64 69 72 20 24 28 50 4c 41 54 46 4f n $$dir $(PLATFO
d440: 52 4d 5f 49 44 45 4e 54 49 46 59 29 20 24 28 50 RM_IDENTIFY) $(P
d450: 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e RJLIBNAME9)]] >>
d460: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
d470: 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f ndex.tcl...@echo
d480: 20 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f } else { >> $(O
d490: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d4a0: 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 70 61 63 .tcl...@echo pac
d4b0: 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 kage ifneeded $(
d4c0: 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e PRJ_PACKAGE_TCLN
d4d0: 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f AME) $(DOTVERSIO
d4e0: 4e 29 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 74 N) \... [list
d4f0: 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e load [file join
d500: 20 24 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 $$dir $(PLATFOR
d510: 4d 5f 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 M_IDENTIFY) $(PR
d520: 4a 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 JLIBNAME8)]] >>
d530: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
d540: 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 dex.tcl...@echo
d550: 7d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c } >> $(OUT_DIR)\
d560: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 21 65 pkgIndex.tcl..!e
d570: 6c 73 65 0d 0a 64 65 66 61 75 6c 74 2d 70 6b 67 lse..default-pkg
d580: 69 6e 64 65 78 3a 0d 0a 09 40 65 63 68 6f 20 69 index:...@echo i
d590: 66 20 7b 5b 70 61 63 6b 61 67 65 20 76 73 61 74 f {[package vsat
d5a0: 69 73 66 69 65 73 20 5b 70 61 63 6b 61 67 65 20 isfies [package
d5b0: 70 72 6f 76 69 64 65 20 54 63 6c 5d 20 39 2e 30 provide Tcl] 9.0
d5c0: 5d 7d 20 7b 20 3e 20 24 28 4f 55 54 5f 44 49 52 ]} { > $(OUT_DIR
d5d0: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a )\pkgIndex.tcl..
d5e0: 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 .@echo package i
d5f0: 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 fneeded $(PRJ_PA
d600: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 CKAGE_TCLNAME) $
d610: 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0d 0a (DOTVERSION) \..
d620: 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 . [list load
d630: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 [file join $$dir
d640: 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 5d $(PRJLIBNAME9)]
d650: 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c ] >> $(OUT_DIR)\
d660: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 pkgIndex.tcl...@
d670: 65 63 68 6f 20 7d 20 65 6c 73 65 20 7b 20 3e 3e echo } else { >>
d680: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
d690: 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f ndex.tcl...@echo
d6a0: 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 package ifneede
d6b0: 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f d $(PRJ_PACKAGE_
d6c0: 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 TCLNAME) $(DOTVE
d6d0: 52 53 49 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 5b RSION) \... [
d6e0: 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 list load [file
d6f0: 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a join $$dir $(PRJ
d700: 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 LIBNAME8)]] >> $
d710: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
d720: 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d ex.tcl...@echo }
d730: 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 >> $(OUT_DIR)\p
d740: 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 21 65 6e kgIndex.tcl..!en
d750: 64 69 66 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 70 dif....default-p
d760: 6b 67 69 6e 64 65 78 2d 74 65 61 3a 0d 0a 09 40 kgindex-tea:...@
d770: 69 66 20 65 78 69 73 74 20 24 28 52 4f 4f 54 29 if exist $(ROOT)
d780: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e \pkgIndex.tcl.in
d790: 20 6e 6d 61 6b 65 68 6c 70 20 2d 73 20 3c 3c 20 nmakehlp -s <<
d7a0: 24 28 52 4f 4f 54 29 5c 70 6b 67 49 6e 64 65 78 $(ROOT)\pkgIndex
d7b0: 2e 74 63 6c 2e 69 6e 20 3e 20 24 28 4f 55 54 5f .tcl.in > $(OUT_
d7c0: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 DIR)\pkgIndex.tc
d7d0: 6c 0d 0a 40 50 41 43 4b 41 47 45 5f 56 45 52 53 l..@PACKAGE_VERS
d7e0: 49 4f 4e 40 20 20 20 20 24 28 44 4f 54 56 45 52 ION@ $(DOTVER
d7f0: 53 49 4f 4e 29 0d 0a 40 50 41 43 4b 41 47 45 5f SION)..@PACKAGE_
d800: 4e 41 4d 45 40 20 20 20 20 20 20 20 24 28 50 52 NAME@ $(PR
d810: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
d820: 45 29 0d 0a 40 50 41 43 4b 41 47 45 5f 54 43 4c E)..@PACKAGE_TCL
d830: 4e 41 4d 45 40 20 20 20 20 24 28 50 52 4a 5f 50 NAME@ $(PRJ_P
d840: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0d ACKAGE_TCLNAME).
d850: 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 40 20 .@PKG_LIB_FILE@
d860: 20 20 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 $(PRJLIBNA
d870: 4d 45 29 0d 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 ME)..@PKG_LIB_FI
d880: 4c 45 38 40 20 20 20 20 20 20 24 28 50 52 4a 4c LE8@ $(PRJL
d890: 49 42 4e 41 4d 45 38 29 0d 0a 40 50 4b 47 5f 4c IBNAME8)..@PKG_L
d8a0: 49 42 5f 46 49 4c 45 39 40 20 20 20 20 20 20 24 IB_FILE9@ $
d8b0: 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 0d 0a 3c (PRJLIBNAME9)..<
d8c0: 3c 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 <....default-ins
d8d0: 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 69 6e tall: default-in
d8e0: 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 64 stall-binaries d
d8f0: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c efault-install-l
d900: 69 62 72 61 72 69 65 73 0d 0a 21 69 66 20 24 28 ibraries..!if $(
d910: 53 59 4d 42 4f 4c 53 29 0d 0a 64 65 66 61 75 6c SYMBOLS)..defaul
d920: 74 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 t-install: defau
d930: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 0d lt-install-pdbs.
d940: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 41 67 61 .!endif....# Aga
d950: 69 6e 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 in to deal with
d960: 68 69 73 74 6f 72 69 63 61 6c 20 62 72 6f 6b 65 historical broke
d970: 6e 6e 65 73 73 2c 20 74 68 65 72 65 20 69 73 20 nness, there is
d980: 73 6f 6d 65 20 63 6f 6e 66 75 73 69 6f 6e 0d 0a some confusion..
d990: 23 20 69 6e 20 74 65 72 6d 69 6e 6c 6f 67 79 2e # in terminlogy.
d9a0: 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c For extensions,
d9b0: 20 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d 62 69 the "install-bi
d9c0: 6e 61 72 69 65 73 22 20 77 61 73 20 75 73 65 64 naries" was used
d9d0: 20 74 6f 0d 0a 23 20 6c 6f 63 61 74 65 20 74 61 to..# locate ta
d9e0: 72 67 65 74 20 64 69 72 65 63 74 6f 72 79 20 66 rget directory f
d9f0: 6f 72 20 2a 62 69 6e 61 72 79 20 73 68 61 72 65 or *binary share
da00: 64 20 6c 69 62 72 61 72 69 65 73 2a 20 61 6e 64 d libraries* and
da10: 20 74 68 75 73 0d 0a 23 20 74 68 65 20 61 70 70 thus..# the app
da20: 72 6f 70 72 69 61 74 65 20 6d 61 63 72 6f 20 69 ropriate macro i
da30: 73 20 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 s LIB_INSTALL_DI
da40: 52 20 73 69 6e 63 65 20 42 49 4e 5f 49 4e 53 54 R since BIN_INST
da50: 41 4c 4c 5f 44 49 52 20 69 73 0d 0a 23 20 66 6f ALL_DIR is..# fo
da60: 72 20 65 78 65 63 75 74 61 62 6c 65 73 20 28 65 r executables (e
da70: 78 65 73 29 2e 20 4f 6e 20 74 68 65 20 6f 74 68 xes). On the oth
da80: 65 72 20 68 61 6e 64 20 74 68 65 20 22 69 6e 73 er hand the "ins
da90: 74 61 6c 6c 2d 6c 69 62 72 61 72 69 65 73 22 0d tall-libraries".
daa0: 0a 23 20 74 61 72 67 65 74 20 69 73 20 66 6f 72 .# target is for
dab0: 20 2a 73 63 72 69 70 74 73 2a 20 61 6e 64 20 73 *scripts* and s
dac0: 68 6f 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 hould have been
dad0: 63 61 6c 6c 65 64 20 22 69 6e 73 74 61 6c 6c 2d called "install-
dae0: 73 63 72 69 70 74 73 22 2e 0d 0a 64 65 66 61 75 scripts"...defau
daf0: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 lt-install-binar
db00: 69 65 73 3a 20 24 28 50 52 4a 4c 49 42 29 0d 0a ies: $(PRJLIB)..
db10: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
db20: 67 20 62 69 6e 61 72 69 65 73 20 74 6f 20 27 24 g binaries to '$
db30: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
db40: 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 )'...@if not exi
db50: 73 74 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c st "$(LIB_INSTAL
db60: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
db70: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
db80: 29 22 0d 0a 09 40 24 28 43 50 59 29 20 24 28 50 )"...@$(CPY) $(P
db90: 52 4a 4c 49 42 29 20 22 24 28 4c 49 42 5f 49 4e RJLIB) "$(LIB_IN
dba0: 53 54 41 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c STALL_DIR)" >NUL
dbb0: 0d 0a 0d 0a 23 20 41 6c 69 61 73 20 66 6f 72 20 ....# Alias for
dbc0: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
dbd0: 73 63 72 69 70 74 73 0d 0a 64 65 66 61 75 6c 74 scripts..default
dbe0: 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 -install-librari
dbf0: 65 73 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 es: default-inst
dc00: 61 6c 6c 2d 73 63 72 69 70 74 73 0d 0a 0d 0a 64 all-scripts....d
dc10: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 efault-install-s
dc20: 63 72 69 70 74 73 3a 20 24 28 4f 55 54 5f 44 49 cripts: $(OUT_DI
dc30: 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d R)\pkgIndex.tcl.
dc40: 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 ..@echo Installi
dc50: 6e 67 20 6c 69 62 72 61 72 69 65 73 20 74 6f 20 ng libraries to
dc60: 27 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c '$(SCRIPT_INSTAL
dc70: 4c 5f 44 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f L_DIR)'...@if no
dc80: 74 20 65 78 69 73 74 20 22 24 28 53 43 52 49 50 t exist "$(SCRIP
dc90: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 T_INSTALL_DIR)"
dca0: 6d 6b 64 69 72 20 22 24 28 53 43 52 49 50 54 5f mkdir "$(SCRIPT_
dcb0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 INSTALL_DIR)"...
dcc0: 40 69 66 20 65 78 69 73 74 20 24 28 4c 49 42 44 @if exist $(LIBD
dcd0: 49 52 29 20 24 28 43 50 59 29 20 24 28 4c 49 42 IR) $(CPY) $(LIB
dce0: 44 49 52 29 5c 2a 2e 74 63 6c 20 22 24 28 53 43 DIR)\*.tcl "$(SC
dcf0: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
dd00: 29 22 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 )"...@echo Insta
dd10: 6c 6c 69 6e 67 20 70 61 63 6b 61 67 65 20 69 6e lling package in
dd20: 64 65 78 20 69 6e 20 27 24 28 53 43 52 49 50 54 dex in '$(SCRIPT
dd30: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a _INSTALL_DIR)'..
dd40: 09 40 24 28 43 50 59 29 20 24 28 4f 55 54 5f 44 .@$(CPY) $(OUT_D
dd50: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
dd60: 20 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c $(SCRIPT_INSTAL
dd70: 4c 5f 44 49 52 29 0d 0a 0d 0a 64 65 66 61 75 6c L_DIR)....defaul
dd80: 74 2d 69 6e 73 74 61 6c 6c 2d 73 74 75 62 73 3a t-install-stubs:
dd90: 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c ...@echo Install
dda0: 69 6e 67 20 73 74 75 62 73 20 6c 69 62 72 61 72 ing stubs librar
ddb0: 79 20 74 6f 20 27 24 28 53 43 52 49 50 54 5f 49 y to '$(SCRIPT_I
ddc0: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 NSTALL_DIR)'...@
ddd0: 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 if not exist "$(
dde0: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
ddf0: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 53 43 IR)" mkdir "$(SC
de00: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
de10: 29 22 0d 0a 09 40 24 28 43 50 59 29 20 24 28 50 )"...@$(CPY) $(P
de20: 52 4a 53 54 55 42 4c 49 42 29 20 22 24 28 53 43 RJSTUBLIB) "$(SC
de30: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
de40: 29 22 20 3e 4e 55 4c 0d 0a 0d 0a 64 65 66 61 75 )" >NUL....defau
de50: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 3a lt-install-pdbs:
de60: 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c ...@echo Install
de70: 69 6e 67 20 50 44 42 73 20 74 6f 20 27 24 28 4c ing PDBs to '$(L
de80: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 IB_INSTALL_DIR)'
de90: 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 ...@if not exist
dea0: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f "$(LIB_INSTALL_
deb0: 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c DIR)" mkdir "$(L
dec0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 IB_INSTALL_DIR)"
ded0: 0d 0a 09 40 24 28 43 50 59 29 20 22 24 28 4f 55 ...@$(CPY) "$(OU
dee0: 54 5f 44 49 52 29 5c 2a 2e 70 64 62 22 20 22 24 T_DIR)\*.pdb" "$
def0: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
df00: 29 5c 22 0d 0a 0d 0a 23 20 22 65 6d 61 63 73 20 )\"....# "emacs
df10: 66 6f 6e 74 2d 6c 6f 63 6b 20 68 69 67 68 6c 69 font-lock highli
df20: 67 68 74 69 6e 67 20 66 69 78 0d 0a 0d 0a 64 65 ghting fix....de
df30: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f fault-install-do
df40: 63 73 2d 68 74 6d 6c 3a 0d 0a 09 40 65 63 68 6f cs-html:...@echo
df50: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 Installing docu
df60: 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 mentation files
df70: 74 6f 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c to '$(DOC_INSTAL
df80: 4c 5f 44 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f L_DIR)'...@if no
df90: 74 20 65 78 69 73 74 20 22 24 28 44 4f 43 5f 49 t exist "$(DOC_I
dfa0: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 NSTALL_DIR)" mkd
dfb0: 69 72 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c ir "$(DOC_INSTAL
dfc0: 4c 5f 44 49 52 29 22 0d 0a 09 40 69 66 20 65 78 L_DIR)"...@if ex
dfd0: 69 73 74 20 24 28 44 4f 43 44 49 52 29 20 66 6f ist $(DOCDIR) fo
dfe0: 72 20 25 66 20 69 6e 20 28 22 24 28 44 4f 43 44 r %f in ("$(DOCD
dff0: 49 52 29 5c 2a 2e 68 74 6d 6c 22 20 22 24 28 44 IR)\*.html" "$(D
e000: 4f 43 44 49 52 29 5c 2a 2e 63 73 73 22 20 22 24 OCDIR)\*.css" "$
e010: 28 44 4f 43 44 49 52 29 5c 2a 2e 70 6e 67 22 29 (DOCDIR)\*.png")
e020: 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66 20 do @$(COPY) %f
e030: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 "$(DOC_INSTALL_D
e040: 49 52 29 22 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d IR)"....default-
e050: 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d 6e 3a 0d install-docs-n:.
e060: 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 ..@echo Installi
e070: 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e ng documentation
e080: 20 66 69 6c 65 73 20 74 6f 20 27 24 28 44 4f 43 files to '$(DOC
e090: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d 0a _INSTALL_DIR)'..
e0a0: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 .@if not exist "
e0b0: 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(DOC_INSTALL_DI
e0c0: 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 R)" mkdir "$(DOC
e0d0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a _INSTALL_DIR)"..
e0e0: 09 40 69 66 20 65 78 69 73 74 20 24 28 44 4f 43 .@if exist $(DOC
e0f0: 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 DIR) for %f in (
e100: 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 6e 22 29 "$(DOCDIR)\*.n")
e110: 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66 20 do @$(COPY) %f
e120: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 "$(DOC_INSTALL_D
e130: 49 52 29 22 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d IR)"....default-
e140: 69 6e 73 74 61 6c 6c 2d 64 65 6d 6f 73 3a 0d 0a install-demos:..
e150: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
e160: 67 20 64 65 6d 6f 73 20 74 6f 20 27 24 28 44 45 g demos to '$(DE
e170: 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 MO_INSTALL_DIR)'
e180: 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 ...@if not exist
e190: 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c "$(DEMO_INSTALL
e1a0: 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 _DIR)" mkdir "$(
e1b0: 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DEMO_INSTALL_DIR
e1c0: 29 22 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 )"...@if exist $
e1d0: 28 44 45 4d 4f 44 49 52 29 20 24 28 43 50 59 44 (DEMODIR) $(CPYD
e1e0: 49 52 29 20 22 24 28 44 45 4d 4f 44 49 52 29 22 IR) "$(DEMODIR)"
e1f0: 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c "$(DEMO_INSTALL
e200: 5f 44 49 52 29 22 0d 0a 0d 0a 64 65 66 61 75 6c _DIR)"....defaul
e210: 74 2d 63 6c 65 61 6e 3a 0d 0a 09 40 65 63 68 6f t-clean:...@echo
e220: 20 43 6c 65 61 6e 69 6e 67 20 24 28 54 4d 50 5f Cleaning $(TMP_
e230: 44 49 52 29 5c 2a 20 2e 2e 2e 0d 0a 09 40 69 66 DIR)\* ......@if
e240: 20 65 78 69 73 74 20 24 28 54 4d 50 5f 44 49 52 exist $(TMP_DIR
e250: 29 5c 6e 75 6c 20 24 28 52 4d 44 49 52 29 20 24 )\nul $(RMDIR) $
e260: 28 54 4d 50 5f 44 49 52 29 0d 0a 09 40 65 63 68 (TMP_DIR)...@ech
e270: 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e o Cleaning $(WIN
e280: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
e290: 62 6a 2c 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 bj, nmakehlp.exe
e2a0: 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 ......@if exist
e2b0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
e2c0: 65 68 6c 70 2e 6f 62 6a 20 64 65 6c 20 24 28 57 ehlp.obj del $(W
e2d0: 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 IN_DIR)\nmakehlp
e2e0: 2e 6f 62 6a 0d 0a 09 40 69 66 20 65 78 69 73 74 .obj...@if exist
e2f0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
e300: 65 68 6c 70 2e 65 78 65 20 64 65 6c 20 24 28 57 ehlp.exe del $(W
e310: 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 IN_DIR)\nmakehlp
e320: 2e 65 78 65 0d 0a 09 40 69 66 20 65 78 69 73 74 .exe...@if exist
e330: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
e340: 65 68 6c 70 2e 6f 75 74 20 64 65 6c 20 24 28 57 ehlp.out del $(W
e350: 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 IN_DIR)\nmakehlp
e360: 2e 6f 75 74 0d 0a 09 40 65 63 68 6f 20 43 6c 65 .out...@echo Cle
e370: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
e380: 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 2e \nmhlp-out.txt .
e390: 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
e3a0: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d (WIN_DIR)\nmhlp-
e3b0: 6f 75 74 2e 74 78 74 20 64 65 6c 20 24 28 57 49 out.txt del $(WI
e3c0: 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 N_DIR)\nmhlp-out
e3d0: 2e 74 78 74 0d 0a 09 40 65 63 68 6f 20 43 6c 65 .txt...@echo Cle
e3e0: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
e3f0: 5c 5f 6a 75 6e 6b 2e 70 63 68 20 2e 2e 2e 0d 0a \_junk.pch .....
e400: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
e410: 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 _DIR)\_junk.pch
e420: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f del $(WIN_DIR)\_
e430: 6a 75 6e 6b 2e 70 63 68 0d 0a 09 40 65 63 68 6f junk.pch...@echo
e440: 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f Cleaning $(WIN_
e450: 44 49 52 29 5c 76 65 72 63 6c 2e 78 2c 20 76 65 DIR)\vercl.x, ve
e460: 72 63 6c 2e 69 20 2e 2e 2e 0d 0a 09 40 69 66 20 rcl.i ......@if
e470: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
e480: 5c 76 65 72 63 6c 2e 78 20 64 65 6c 20 24 28 57 \vercl.x del $(W
e490: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 0d IN_DIR)\vercl.x.
e4a0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 ..@if exist $(WI
e4b0: 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 69 20 64 N_DIR)\vercl.i d
e4c0: 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 el $(WIN_DIR)\ve
e4d0: 72 63 6c 2e 69 0d 0a 09 40 65 63 68 6f 20 43 6c rcl.i...@echo Cl
e4e0: 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 eaning $(WIN_DIR
e4f0: 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 2c 20 76 )\versions.vc, v
e500: 65 72 73 69 6f 6e 2e 76 63 20 2e 2e 2e 0d 0a 09 ersion.vc ......
e510: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
e520: 44 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 DIR)\versions.vc
e530: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c del $(WIN_DIR)\
e540: 76 65 72 73 69 6f 6e 73 2e 76 63 0d 0a 09 40 69 versions.vc...@i
e550: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
e560: 52 29 5c 76 65 72 73 69 6f 6e 2e 76 63 20 64 65 R)\version.vc de
e570: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 l $(WIN_DIR)\ver
e580: 73 69 6f 6e 2e 76 63 0d 0a 0d 0a 64 65 66 61 75 sion.vc....defau
e590: 6c 74 2d 68 6f 73 65 3a 20 64 65 66 61 75 6c 74 lt-hose: default
e5a0: 2d 63 6c 65 61 6e 0d 0a 09 40 65 63 68 6f 20 48 -clean...@echo H
e5b0: 6f 73 69 6e 67 20 24 28 4f 55 54 5f 44 49 52 29 osing $(OUT_DIR)
e5c0: 5c 2a 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 69 \* ......@if exi
e5d0: 73 74 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e 75 st $(OUT_DIR)\nu
e5e0: 6c 20 24 28 52 4d 44 49 52 29 20 24 28 4f 55 54 l $(RMDIR) $(OUT
e5f0: 5f 44 49 52 29 0d 0a 0d 0a 23 20 4f 6e 6c 79 20 _DIR)....# Only
e600: 66 6f 72 20 62 61 63 6b 77 61 72 64 20 63 6f 6d for backward com
e610: 70 61 74 69 62 69 6c 69 74 79 0d 0a 64 65 66 61 patibility..defa
e620: 75 6c 74 2d 64 69 73 74 63 6c 65 61 6e 3a 20 64 ult-distclean: d
e630: 65 66 61 75 6c 74 2d 68 6f 73 65 0d 0a 0d 0a 64 efault-hose....d
e640: 65 66 61 75 6c 74 2d 73 65 74 75 70 3a 0d 0a 09 efault-setup:...
e650: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 @if not exist $(
e660: 4f 55 54 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 OUT_DIR)\nul mkd
e670: 69 72 20 24 28 4f 55 54 5f 44 49 52 29 0d 0a 09 ir $(OUT_DIR)...
e680: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 @if not exist $(
e690: 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 TMP_DIR)\nul mkd
e6a0: 69 72 20 24 28 54 4d 50 5f 44 49 52 29 0d 0a 0d ir $(TMP_DIR)...
e6b0: 0a 21 69 66 20 22 24 28 54 45 53 54 50 41 54 29 .!if "$(TESTPAT)
e6c0: 22 20 21 3d 20 22 22 0d 0a 54 45 53 54 46 4c 41 " != ""..TESTFLA
e6d0: 47 53 20 3d 20 24 28 54 45 53 54 46 4c 41 47 53 GS = $(TESTFLAGS
e6e0: 29 20 2d 66 69 6c 65 20 24 28 54 45 53 54 50 41 ) -file $(TESTPA
e6f0: 54 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 64 65 T)..!endif....de
e700: 66 61 75 6c 74 2d 74 65 73 74 3a 20 64 65 66 61 fault-test: defa
e710: 75 6c 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a ult-setup $(PROJ
e720: 45 43 54 29 0d 0a 09 40 73 65 74 20 54 43 4c 4c ECT)...@set TCLL
e730: 49 42 50 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 IBPATH=$(OUT_DIR
e740: 3a 5c 3d 2f 29 0d 0a 09 40 69 66 20 65 78 69 73 :\=/)...@if exis
e750: 74 20 24 28 4c 49 42 44 49 52 29 20 66 6f 72 20 t $(LIBDIR) for
e760: 25 66 20 69 6e 20 28 22 24 28 4c 49 42 44 49 52 %f in ("$(LIBDIR
e770: 29 5c 2a 2e 74 63 6c 22 29 20 64 6f 20 40 24 28 )\*.tcl") do @$(
e780: 43 4f 50 59 29 20 25 66 20 22 24 28 4f 55 54 5f COPY) %f "$(OUT_
e790: 44 49 52 29 22 0d 0a 09 63 64 20 22 24 28 54 45 DIR)"...cd "$(TE
e7a0: 53 54 44 49 52 29 22 20 26 26 20 24 28 44 45 42 STDIR)" && $(DEB
e7b0: 55 47 47 45 52 29 20 24 28 54 43 4c 53 48 29 20 UGGER) $(TCLSH)
e7c0: 61 6c 6c 2e 74 63 6c 20 24 28 54 45 53 54 46 4c all.tcl $(TESTFL
e7d0: 41 47 53 29 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d AGS)....default-
e7e0: 73 68 65 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 73 shell: default-s
e7f0: 65 74 75 70 20 24 28 50 52 4f 4a 45 43 54 29 0d etup $(PROJECT).
e800: 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 50 41 54 ..@set TCLLIBPAT
e810: 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f 29 H=$(OUT_DIR:\=/)
e820: 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 4c ...@if exist $(L
e830: 49 42 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e IBDIR) for %f in
e840: 20 28 22 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 ("$(LIBDIR)\*.t
e850: 63 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 cl") do @$(COPY)
e860: 20 25 66 20 22 24 28 4f 55 54 5f 44 49 52 29 22 %f "$(OUT_DIR)"
e870: 0d 0a 09 24 28 44 45 42 55 47 47 45 52 29 20 24 ...$(DEBUGGER) $
e880: 28 54 43 4c 53 48 29 0d 0a 0d 0a 23 20 47 65 6e (TCLSH)....# Gen
e890: 65 72 61 74 69 6f 6e 20 6f 66 20 57 69 6e 64 6f eration of Windo
e8a0: 77 73 20 76 65 72 73 69 6f 6e 20 72 65 73 6f 75 ws version resou
e8b0: 72 63 65 0d 0a 21 69 66 64 65 66 20 52 43 46 49 rce..!ifdef RCFI
e8c0: 4c 45 0d 0a 0d 0a 23 20 4e 6f 74 65 3a 20 64 6f LE....# Note: do
e8d0: 6e 27 74 20 75 73 65 20 24 2a 2a 20 69 6e 20 62 n't use $** in b
e8e0: 65 6c 6f 77 20 72 75 6c 65 20 62 65 63 61 75 73 elow rule becaus
e8f0: 65 20 74 68 65 72 65 20 6d 61 79 20 62 65 20 6f e there may be o
e900: 74 68 65 72 20 64 65 70 65 6e 64 65 6e 63 69 65 ther dependencie
e910: 73 0d 0a 23 20 61 6e 64 20 6f 6e 6c 79 20 74 68 s..# and only th
e920: 65 20 22 6d 61 69 6e 22 20 72 63 20 6d 75 73 74 e "main" rc must
e930: 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 be passed to th
e940: 65 20 72 65 73 6f 75 72 63 65 20 63 6f 6d 70 69 e resource compi
e950: 6c 65 72 0d 0a 24 28 54 4d 50 5f 44 49 52 29 5c ler..$(TMP_DIR)\
e960: 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a 20 $(PROJECT).res:
e970: 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 $(RCDIR)\$(PROJE
e980: 43 54 29 2e 72 63 0d 0a 09 24 28 52 45 53 43 4d CT).rc...$(RESCM
e990: 44 29 20 24 28 52 43 44 49 52 29 5c 24 28 50 52 D) $(RCDIR)\$(PR
e9a0: 4f 4a 45 43 54 29 2e 72 63 0d 0a 0d 0a 21 65 6c OJECT).rc....!el
e9b0: 73 65 0d 0a 0d 0a 23 20 49 66 20 70 61 72 65 6e se....# If paren
e9c0: 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 6e t makefile has n
e9d0: 6f 74 20 64 65 66 69 6e 65 64 20 61 20 72 65 73 ot defined a res
e9e0: 6f 75 72 63 65 20 64 65 66 69 6e 69 74 69 6f 6e ource definition
e9f0: 20 66 69 6c 65 2c 0d 0a 23 20 77 65 20 77 69 6c file,..# we wil
ea00: 6c 20 67 65 6e 65 72 61 74 65 20 6f 6e 65 20 66 l generate one f
ea10: 72 6f 6d 20 73 74 61 6e 64 61 72 64 20 74 65 6d rom standard tem
ea20: 70 6c 61 74 65 2e 0d 0a 24 28 54 4d 50 5f 44 49 plate...$(TMP_DI
ea30: 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 R)\$(PROJECT).re
ea40: 73 3a 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 s: $(TMP_DIR)\$(
ea50: 50 52 4f 4a 45 43 54 29 2e 72 63 0d 0a 0d 0a 24 PROJECT).rc....$
ea60: 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a (TMP_DIR)\$(PROJ
ea70: 45 43 54 29 2e 72 63 3a 0d 0a 09 40 24 28 43 4f ECT).rc:...@$(CO
ea80: 50 59 29 20 3c 3c 20 24 28 54 4d 50 5f 44 49 52 PY) << $(TMP_DIR
ea90: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0d )\$(PROJECT).rc.
eaa0: 0a 23 69 6e 63 6c 75 64 65 20 3c 77 69 6e 76 65 .#include <winve
eab0: 72 2e 68 3e 0d 0a 0d 0a 56 53 5f 56 45 52 53 49 r.h>....VS_VERSI
eac0: 4f 4e 5f 49 4e 46 4f 20 56 45 52 53 49 4f 4e 49 ON_INFO VERSIONI
ead0: 4e 46 4f 0d 0a 20 46 49 4c 45 56 45 52 53 49 4f NFO.. FILEVERSIO
eae0: 4e 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0d 0a N.COMMAVERSION..
eaf0: 20 50 52 4f 44 55 43 54 56 45 52 53 49 4f 4e 09 PRODUCTVERSION.
eb00: 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0d 0a 20 46 COMMAVERSION.. F
eb10: 49 4c 45 46 4c 41 47 53 4d 41 53 4b 09 30 78 33 ILEFLAGSMASK.0x3
eb20: 66 4c 0d 0a 23 69 66 64 65 66 20 44 45 42 55 47 fL..#ifdef DEBUG
eb30: 0d 0a 20 46 49 4c 45 46 4c 41 47 53 09 56 53 5f .. FILEFLAGS.VS_
eb40: 46 46 5f 44 45 42 55 47 0d 0a 23 65 6c 73 65 0d FF_DEBUG..#else.
eb50: 0a 20 46 49 4c 45 46 4c 41 47 53 09 30 78 30 4c . FILEFLAGS.0x0L
eb60: 0d 0a 23 65 6e 64 69 66 0d 0a 20 46 49 4c 45 4f ..#endif.. FILEO
eb70: 53 09 09 56 4f 53 5f 4e 54 5f 57 49 4e 44 4f 57 S..VOS_NT_WINDOW
eb80: 53 33 32 0d 0a 20 46 49 4c 45 54 59 50 45 09 56 S32.. FILETYPE.V
eb90: 46 54 5f 44 4c 4c 0d 0a 20 46 49 4c 45 53 55 42 FT_DLL.. FILESUB
eba0: 54 59 50 45 09 30 78 30 4c 0d 0a 42 45 47 49 4e TYPE.0x0L..BEGIN
ebb0: 0d 0a 20 20 20 20 42 4c 4f 43 4b 20 22 53 74 72 .. BLOCK "Str
ebc0: 69 6e 67 46 69 6c 65 49 6e 66 6f 22 0d 0a 20 20 ingFileInfo"..
ebd0: 20 20 42 45 47 49 4e 0d 0a 09 42 4c 4f 43 4b 20 BEGIN...BLOCK
ebe0: 22 30 34 30 39 30 34 62 30 22 0d 0a 09 42 45 47 "040904b0"...BEG
ebf0: 49 4e 0d 0a 09 20 20 20 20 56 41 4c 55 45 20 22 IN... VALUE "
ec00: 46 69 6c 65 44 65 73 63 72 69 70 74 69 6f 6e 22 FileDescription"
ec10: 2c 20 20 22 54 63 6c 20 65 78 74 65 6e 73 69 6f , "Tcl extensio
ec20: 6e 20 22 20 50 52 4f 4a 45 43 54 0d 0a 09 20 20 n " PROJECT...
ec30: 20 20 56 41 4c 55 45 20 22 4f 72 69 67 69 6e 61 VALUE "Origina
ec40: 6c 46 69 6c 65 6e 61 6d 65 22 2c 20 50 52 4a 4c lFilename", PRJL
ec50: 49 42 4e 41 4d 45 0d 0a 09 20 20 20 20 56 41 4c IBNAME... VAL
ec60: 55 45 20 22 46 69 6c 65 56 65 72 73 69 6f 6e 22 UE "FileVersion"
ec70: 2c 20 20 20 20 20 20 44 4f 54 56 45 52 53 49 4f , DOTVERSIO
ec80: 4e 0d 0a 09 20 20 20 20 56 41 4c 55 45 20 22 50 N... VALUE "P
ec90: 72 6f 64 75 63 74 4e 61 6d 65 22 2c 20 20 20 20 roductName",
eca0: 20 20 22 50 61 63 6b 61 67 65 20 22 20 50 52 4f "Package " PRO
ecb0: 4a 45 43 54 20 22 20 66 6f 72 20 54 63 6c 22 0d JECT " for Tcl".
ecc0: 0a 09 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f .. VALUE "Pro
ecd0: 64 75 63 74 56 65 72 73 69 6f 6e 22 2c 20 20 20 ductVersion",
ece0: 44 4f 54 56 45 52 53 49 4f 4e 0d 0a 09 45 4e 44 DOTVERSION...END
ecf0: 0d 0a 20 20 20 20 45 4e 44 0d 0a 20 20 20 20 42 .. END.. B
ed00: 4c 4f 43 4b 20 22 56 61 72 46 69 6c 65 49 6e 66 LOCK "VarFileInf
ed10: 6f 22 0d 0a 20 20 20 20 42 45 47 49 4e 0d 0a 09 o".. BEGIN...
ed20: 56 41 4c 55 45 20 22 54 72 61 6e 73 6c 61 74 69 VALUE "Translati
ed30: 6f 6e 22 2c 20 30 78 34 30 39 2c 20 31 32 30 30 on", 0x409, 1200
ed40: 0d 0a 20 20 20 20 45 4e 44 0d 0a 45 4e 44 0d 0a .. END..END..
ed50: 0d 0a 3c 3c 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 ..<<....!endif #
ed60: 20 69 66 64 65 66 20 52 43 46 49 4c 45 0d 0a 0d ifdef RCFILE...
ed70: 0a 21 69 66 6e 64 65 66 20 44 49 53 41 42 4c 45 .!ifndef DISABLE
ed80: 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 0d _IMPLICIT_RULES.
ed90: 0a 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 .DISABLE_IMPLICI
eda0: 54 5f 52 55 4c 45 53 20 3d 20 30 0d 0a 21 65 6e T_RULES = 0..!en
edb0: 64 69 66 0d 0a 0d 0a 21 69 66 20 21 24 28 44 49 dif....!if !$(DI
edc0: 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f 52 SABLE_IMPLICIT_R
edd0: 55 4c 45 53 29 0d 0a 23 20 49 6d 70 6c 69 63 69 ULES)..# Implici
ede0: 74 20 72 75 6c 65 20 64 65 66 69 6e 69 74 69 6f t rule definitio
edf0: 6e 73 20 2d 20 6f 6e 6c 79 20 66 6f 72 20 62 75 ns - only for bu
ee00: 69 6c 64 69 6e 67 20 6c 69 62 72 61 72 79 20 6f ilding library o
ee10: 62 6a 65 63 74 73 2e 20 46 6f 72 20 73 74 75 62 bjects. For stub
ee20: 73 20 61 6e 64 0d 0a 23 20 6d 61 69 6e 20 61 70 s and..# main ap
ee30: 70 6c 69 63 61 74 69 6f 6e 2c 20 74 68 65 20 6d plication, the m
ee40: 61 6b 65 66 69 6c 65 20 73 68 6f 75 6c 64 20 64 akefile should d
ee50: 65 66 69 6e 65 20 65 78 70 6c 69 63 69 74 20 72 efine explicit r
ee60: 75 6c 65 73 2e 0d 0a 0d 0a 7b 24 28 52 4f 4f 54 ules.....{$(ROOT
ee70: 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d )}.c{$(TMP_DIR)}
ee80: 2e 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 .obj::...$(CCPKG
ee90: 43 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c CMD) @<<..$<..<<
eea0: 0d 0a 0d 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d ....{$(WIN_DIR)}
eeb0: 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f .c{$(TMP_DIR)}.o
eec0: 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 4d bj::...$(CCPKGCM
eed0: 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d 0a D) @<<..$<..<<..
eee0: 0d 0a 7b 24 28 47 45 4e 45 52 49 43 44 49 52 29 ..{$(GENERICDIR)
eef0: 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e }.c{$(TMP_DIR)}.
ef00: 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 obj::...$(CCPKGC
ef10: 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d MD) @<<..$<..<<.
ef20: 0a 0d 0a 7b 24 28 43 4f 4d 50 41 54 44 49 52 29 ...{$(COMPATDIR)
ef30: 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e }.c{$(TMP_DIR)}.
ef40: 6f 62 6a 3a 3a 0d 0a 09 24 28 43 43 50 4b 47 43 obj::...$(CCPKGC
ef50: 4d 44 29 20 40 3c 3c 0d 0a 24 3c 0d 0a 3c 3c 0d MD) @<<..$<..<<.
ef60: 0a 0d 0a 7b 24 28 52 43 44 49 52 29 7d 2e 72 63 ...{$(RCDIR)}.rc
ef70: 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 {$(TMP_DIR)}.res
ef80: 3a 0d 0a 09 24 28 52 45 53 43 4d 44 29 20 24 3c :...$(RESCMD) $<
ef90: 0d 0a 0d 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d ....{$(WIN_DIR)}
efa0: 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e .rc{$(TMP_DIR)}.
efb0: 72 65 73 3a 0d 0a 09 24 28 52 45 53 43 4d 44 29 res:...$(RESCMD)
efc0: 20 24 3c 0d 0a 0d 0a 7b 24 28 54 4d 50 5f 44 49 $<....{$(TMP_DI
efd0: 52 29 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 R)}.rc{$(TMP_DIR
efe0: 29 7d 2e 72 65 73 3a 0d 0a 09 24 28 52 45 53 43 )}.res:...$(RESC
eff0: 4d 44 29 20 24 3c 0d 0a 0d 0a 2e 53 55 46 46 49 MD) $<.....SUFFI
f000: 58 45 53 3a 0d 0a 2e 53 55 46 46 49 58 45 53 3a XES:...SUFFIXES:
f010: 2e 63 20 2e 72 63 0d 0a 0d 0a 21 65 6e 64 69 66 .c .rc....!endif
f020: 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 ....############
f030: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f040: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f050: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
f060: 23 23 23 23 0d 0a 23 20 31 34 2e 20 53 61 6e 69 ####..# 14. Sani
f070: 74 79 20 63 68 65 63 6b 20 73 65 6c 65 63 74 65 ty check selecte
f080: 64 20 6f 70 74 69 6f 6e 73 20 61 67 61 69 6e 73 d options agains
f090: 74 20 54 63 6c 20 62 75 69 6c 64 20 6f 70 74 69 t Tcl build opti
f0a0: 6f 6e 73 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c ons..# When buil
f0b0: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
f0c0: 6e 2c 20 63 65 72 74 61 69 6e 20 63 6f 6e 66 69 n, certain confi
f0d0: 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 guration options
f0e0: 20 73 68 6f 75 6c 64 0d 0a 23 20 6d 61 74 63 68 should..# match
f0f0: 20 74 68 65 20 6f 6e 65 73 20 75 73 65 64 20 77 the ones used w
f100: 68 65 6e 20 54 63 6c 20 77 61 73 20 62 75 69 6c hen Tcl was buil
f110: 74 2e 20 48 65 72 65 20 77 65 20 63 68 65 63 6b t. Here we check
f120: 20 61 6e 64 0d 0a 23 20 77 61 72 6e 20 6f 6e 20 and..# warn on
f130: 61 20 6d 69 73 6d 61 74 63 68 2e 0d 0a 21 69 66 a mismatch...!if
f140: 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a !$(DOING_TCL)..
f150: 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 ..!if $(TCLINSTA
f160: 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 LL) # Building a
f170: 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c gainst an instal
f180: 6c 65 64 20 54 63 6c 0d 0a 21 69 66 20 65 78 69 led Tcl..!if exi
f190: 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c st("$(_TCLDIR)\l
f1a0: 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 ib\nmake\tcl.nma
f1b0: 6b 65 22 29 0d 0a 54 43 4c 4e 4d 41 4b 45 43 4f ke")..TCLNMAKECO
f1c0: 4e 46 49 47 20 3d 20 22 24 28 5f 54 43 4c 44 49 NFIG = "$(_TCLDI
f1d0: 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c R)\lib\nmake\tcl
f1e0: 2e 6e 6d 61 6b 65 22 0d 0a 21 65 6e 64 69 66 0d .nmake"..!endif.
f1f0: 0a 21 65 6c 73 65 20 23 20 21 24 28 54 43 4c 49 .!else # !$(TCLI
f200: 4e 53 54 41 4c 4c 29 20 2d 20 62 75 69 6c 64 69 NSTALL) - buildi
f210: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 ng against Tcl s
f220: 6f 75 72 63 65 0d 0a 21 69 66 20 65 78 69 73 74 ource..!if exist
f230: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e ("$(_TCLDIR)\win
f240: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
f250: 74 63 6c 2e 6e 6d 61 6b 65 22 29 0d 0a 54 43 4c tcl.nmake")..TCL
f260: 4e 4d 41 4b 45 43 4f 4e 46 49 47 09 3d 20 22 24 NMAKECONFIG.= "$
f270: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 (_TCLDIR)\win\$(
f280: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c BUILDDIRTOP)\tcl
f290: 2e 6e 6d 61 6b 65 22 0d 0a 21 65 6e 64 69 66 0d .nmake"..!endif.
f2a0: 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 49 4e 53 .!endif # TCLINS
f2b0: 54 41 4c 4c 0d 0a 0d 0a 21 69 66 20 24 28 43 4f TALL....!if $(CO
f2c0: 4e 46 49 47 5f 43 48 45 43 4b 29 0d 0a 21 69 66 NFIG_CHECK)..!if
f2d0: 64 65 66 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 def TCLNMAKECONF
f2e0: 49 47 0d 0a 21 69 6e 63 6c 75 64 65 20 24 28 54 IG..!include $(T
f2f0: 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 29 0d 0a CLNMAKECONFIG)..
f300: 0d 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f ..!if defined(CO
f310: 52 45 5f 4d 41 43 48 49 4e 45 29 20 26 26 20 22 RE_MACHINE) && "
f320: 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 22 $(CORE_MACHINE)"
f330: 20 21 3d 20 22 24 28 4d 41 43 48 49 4e 45 29 22 != "$(MACHINE)"
f340: 0d 0a 21 65 72 72 6f 72 20 45 52 52 4f 52 3a 20 ..!error ERROR:
f350: 42 75 69 6c 64 20 74 61 72 67 65 74 20 28 24 28 Build target ($(
f360: 4d 41 43 48 49 4e 45 29 29 20 64 6f 65 73 20 6e MACHINE)) does n
f370: 6f 74 20 6d 61 74 63 68 20 74 68 65 20 54 63 6c ot match the Tcl
f380: 20 6c 69 62 72 61 72 79 20 61 72 63 68 69 74 65 library archite
f390: 63 74 75 72 65 20 28 24 28 43 4f 52 45 5f 4d 41 cture ($(CORE_MA
f3a0: 43 48 49 4e 45 29 29 2e 0d 0a 21 65 6e 64 69 66 CHINE))...!endif
f3b0: 0d 0a 21 69 66 20 24 28 54 43 4c 5f 56 45 52 53 ..!if $(TCL_VERS
f3c0: 49 4f 4e 29 20 3c 20 38 37 20 26 26 20 64 65 66 ION) < 87 && def
f3d0: 69 6e 65 64 28 43 4f 52 45 5f 55 53 45 5f 54 48 ined(CORE_USE_TH
f3e0: 52 45 41 44 5f 41 4c 4c 4f 43 29 20 26 26 20 24 READ_ALLOC) && $
f3f0: 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 (CORE_USE_THREAD
f400: 5f 41 4c 4c 4f 43 29 20 21 3d 20 24 28 55 53 45 _ALLOC) != $(USE
f410: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 0d 0a _THREAD_ALLOC)..
f420: 21 6d 65 73 73 61 67 65 20 57 41 52 4e 49 4e 47 !message WARNING
f430: 3a 20 56 61 6c 75 65 20 6f 66 20 55 53 45 5f 54 : Value of USE_T
f440: 48 52 45 41 44 5f 41 4c 4c 4f 43 20 28 24 28 55 HREAD_ALLOC ($(U
f450: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 SE_THREAD_ALLOC)
f460: 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 ) does not match
f470: 20 69 74 73 20 54 63 6c 20 63 6f 72 65 20 76 61 its Tcl core va
f480: 6c 75 65 20 28 24 28 43 4f 52 45 5f 55 53 45 5f lue ($(CORE_USE_
f490: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 29 2e 0d THREAD_ALLOC))..
f4a0: 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 64 65 66 .!endif..!if def
f4b0: 69 6e 65 64 28 43 4f 52 45 5f 44 45 42 55 47 29 ined(CORE_DEBUG)
f4c0: 20 26 26 20 24 28 43 4f 52 45 5f 44 45 42 55 47 && $(CORE_DEBUG
f4d0: 29 20 21 3d 20 24 28 44 45 42 55 47 29 0d 0a 21 ) != $(DEBUG)..!
f4e0: 6d 65 73 73 61 67 65 20 57 41 52 4e 49 4e 47 3a message WARNING:
f4f0: 20 56 61 6c 75 65 20 6f 66 20 44 45 42 55 47 20 Value of DEBUG
f500: 28 24 28 44 45 42 55 47 29 29 20 64 6f 65 73 20 ($(DEBUG)) does
f510: 6e 6f 74 20 6d 61 74 63 68 20 69 74 73 20 54 63 not match its Tc
f520: 6c 20 6c 69 62 72 61 72 79 20 63 6f 6e 66 69 67 l library config
f530: 75 72 61 74 69 6f 6e 20 28 24 28 44 45 42 55 47 uration ($(DEBUG
f540: 29 29 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e ))...!endif..!en
f550: 64 69 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 dif....!endif #
f560: 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 0d 0a TCLNMAKECONFIG..
f570: 0d 0a 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f ..!endif # !$(DO
f580: 49 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 0d 0a 23 2d ING_TCL)......#-
f590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f5a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f5b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f5c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 44 69 73 ---------..# Dis
f5d0: 70 6c 61 79 20 73 74 61 74 73 20 62 65 69 6e 67 play stats being
f5e0: 20 75 73 65 64 2e 0d 0a 23 2d 2d 2d 2d 2d 2d 2d used...#-------
f5f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f620: 2d 2d 2d 0d 0a 0d 0a 21 69 66 20 21 24 28 44 4f ---....!if !$(DO
f630: 49 4e 47 5f 54 43 4c 29 0d 0a 21 6d 65 73 73 61 ING_TCL)..!messa
f640: 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69 6e 67 20 ge *** Building
f650: 61 67 61 69 6e 73 74 20 54 63 6c 20 61 74 20 27 against Tcl at '
f660: 24 28 5f 54 43 4c 44 49 52 29 27 0d 0a 21 65 6e $(_TCLDIR)'..!en
f670: 64 69 66 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e dif..!if !$(DOIN
f680: 47 5f 54 4b 29 20 26 26 20 24 28 4e 45 45 44 5f G_TK) && $(NEED_
f690: 54 4b 29 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a TK)..!message **
f6a0: 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e * Building again
f6b0: 73 74 20 54 6b 20 61 74 20 27 24 28 5f 54 4b 44 st Tk at '$(_TKD
f6c0: 49 52 29 27 0d 0a 21 65 6e 64 69 66 0d 0a 21 6d IR)'..!endif..!m
f6d0: 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e 74 65 72 essage *** Inter
f6e0: 6d 65 64 69 61 74 65 20 64 69 72 65 63 74 6f 72 mediate director
f6f0: 79 20 77 69 6c 6c 20 62 65 20 27 24 28 54 4d 50 y will be '$(TMP
f700: 5f 44 49 52 29 27 0d 0a 21 6d 65 73 73 61 67 65 _DIR)'..!message
f710: 20 2a 2a 2a 20 4f 75 74 70 75 74 20 64 69 72 65 *** Output dire
f720: 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 24 ctory will be '$
f730: 28 4f 55 54 5f 44 49 52 29 27 0d 0a 21 6d 65 73 (OUT_DIR)'..!mes
f740: 73 61 67 65 20 2a 2a 2a 20 49 6e 73 74 61 6c 6c sage *** Install
f750: 61 74 69 6f 6e 2c 20 69 66 20 73 65 6c 65 63 74 ation, if select
f760: 65 64 2c 20 77 69 6c 6c 20 62 65 20 69 6e 20 27 ed, will be in '
f770: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 27 0d $(_INSTALLDIR)'.
f780: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 53 75 .!message *** Su
f790: 66 66 69 78 20 66 6f 72 20 62 69 6e 61 72 69 65 ffix for binarie
f7a0: 73 20 77 69 6c 6c 20 62 65 20 27 24 28 53 55 46 s will be '$(SUF
f7b0: 58 29 27 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a X)'..!message **
f7c0: 2a 20 43 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 * Compiler versi
f7d0: 6f 6e 20 24 28 56 43 56 45 52 29 2e 20 54 61 72 on $(VCVER). Tar
f7e0: 67 65 74 20 24 28 4d 41 43 48 49 4e 45 29 2c 20 get $(MACHINE),
f7f0: 68 6f 73 74 20 24 28 4e 41 54 49 56 45 5f 41 52 host $(NATIVE_AR
f800: 43 48 29 2e 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 CH).....!endif #
f810: 20 69 66 64 65 66 20 5f 52 55 4c 45 53 5f 56 43 ifdef _RULES_VC
f820: 0d 0a ..