Hex Artifact Content

Artifact d3dfd51ac2ab0ced96c2312ef70e3d3b4d24fa6be936b77023df26315d889ece:


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 33 0d 0a 0d 0a 23 20 54 68  NOR = 13....# Th
0450: 65 20 50 52 4f 4a 45 43 54 20 6d 61 63 72 6f 20  e PROJECT macro 
0460: 6d 75 73 74 20 62 65 20 64 65 66 69 6e 65 64 20  must be defined 
0470: 62 79 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69  by parent makefi
0480: 6c 65 2e 0d 0a 21 69 66 20 22 24 28 50 52 4f 4a  le...!if "$(PROJ
0490: 45 43 54 29 22 20 3d 3d 20 22 22 0d 0a 21 65 72  ECT)" == ""..!er
04a0: 72 6f 72 20 2a 2a 2a 20 45 72 72 6f 72 3a 20 4d  ror *** Error: M
04b0: 61 63 72 6f 20 50 52 4f 4a 45 43 54 20 6e 6f 74  acro PROJECT not
04c0: 20 64 65 66 69 6e 65 64 21 20 50 6c 65 61 73 65   defined! Please
04d0: 20 64 65 66 69 6e 65 20 69 74 20 62 65 66 6f 72   define it befor
04e0: 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65  e including rule
04f0: 73 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a  s.vc..!endif....
0500: 21 69 66 20 22 24 28 50 52 4a 5f 50 41 43 4b 41  !if "$(PRJ_PACKA
0510: 47 45 5f 54 43 4c 4e 41 4d 45 29 22 20 3d 3d 20  GE_TCLNAME)" == 
0520: 22 22 0d 0a 50 52 4a 5f 50 41 43 4b 41 47 45 5f  ""..PRJ_PACKAGE_
0530: 54 43 4c 4e 41 4d 45 20 3d 20 24 28 50 52 4f 4a  TCLNAME = $(PROJ
0540: 45 43 54 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a  ECT)..!endif....
0550: 23 20 41 6c 73 6f 20 73 70 65 63 69 61 6c 20 63  # Also special c
0560: 61 73 65 20 54 63 6c 20 61 6e 64 20 54 6b 20 74  ase Tcl and Tk t
0570: 6f 20 73 61 76 65 20 73 6f 6d 65 20 74 79 70 69  o save some typi
0580: 6e 67 20 6c 61 74 65 72 0d 0a 44 4f 49 4e 47 5f  ng later..DOING_
0590: 54 43 4c 20 3d 20 30 0d 0a 44 4f 49 4e 47 5f 54  TCL = 0..DOING_T
05a0: 4b 20 20 3d 20 30 0d 0a 21 69 66 20 22 24 28 50  K  = 0..!if "$(P
05b0: 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 74 63 6c  ROJECT)" == "tcl
05c0: 22 0d 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 31  "..DOING_TCL = 1
05d0: 0d 0a 21 65 6c 73 65 69 66 20 22 24 28 50 52 4f  ..!elseif "$(PRO
05e0: 4a 45 43 54 29 22 20 3d 3d 20 22 74 6b 22 0d 0a  JECT)" == "tk"..
05f0: 44 4f 49 4e 47 5f 54 4b 20 3d 20 31 0d 0a 21 65  DOING_TK = 1..!e
0600: 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20  ndif....!ifndef 
0610: 4e 45 45 44 5f 54 4b 0d 0a 23 20 42 61 63 6b 77  NEED_TK..# Backw
0620: 61 72 64 73 20 63 6f 6d 70 61 74 69 62 69 6c 69  ards compatibili
0630: 74 79 0d 0a 21 69 66 64 65 66 20 50 52 4f 4a 45  ty..!ifdef PROJE
0640: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 0d 0a  CT_REQUIRES_TK..
0650: 4e 45 45 44 5f 54 4b 20 3d 20 24 28 50 52 4f 4a  NEED_TK = $(PROJ
0660: 45 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 29  ECT_REQUIRES_TK)
0670: 0d 0a 21 65 6c 73 65 0d 0a 4e 45 45 44 5f 54 4b  ..!else..NEED_TK
0680: 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 21 65   = 0..!endif..!e
0690: 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20  ndif....!ifndef 
06a0: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 0d  NEED_TCL_SOURCE.
06b0: 0a 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45  .NEED_TCL_SOURCE
06c0: 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a   = 0..!endif....
06d0: 21 69 66 64 65 66 20 4e 45 45 44 5f 54 4b 5f 53  !ifdef NEED_TK_S
06e0: 4f 55 52 43 45 0d 0a 21 69 66 20 24 28 4e 45 45  OURCE..!if $(NEE
06f0: 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a 4e 45  D_TK_SOURCE)..NE
0700: 45 44 5f 54 4b 20 3d 20 31 0d 0a 21 65 6e 64 69  ED_TK = 1..!endi
0710: 66 0d 0a 21 65 6c 73 65 0d 0a 4e 45 45 44 5f 54  f..!else..NEED_T
0720: 4b 5f 53 4f 55 52 43 45 20 3d 20 30 0d 0a 21 65  K_SOURCE = 0..!e
0730: 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23  ndif....########
0740: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0750: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0760: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
0770: 23 23 23 23 23 23 23 23 0d 0a 23 20 4e 6d 61 6b  ########..# Nmak
0780: 65 20 69 73 20 61 20 70 72 65 74 74 79 20 77 65  e is a pretty we
0790: 61 6b 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 69  ak environment i
07a0: 6e 20 73 79 6e 74 61 78 20 61 6e 64 20 63 61 70  n syntax and cap
07b0: 61 62 69 6c 69 74 69 65 73 0d 0a 23 20 73 6f 20  abilities..# so 
07c0: 74 68 69 73 20 66 69 6c 65 20 69 73 20 6e 65 63  this file is nec
07d0: 65 73 73 61 72 69 6c 79 20 76 65 72 62 6f 73 65  essarily verbose
07e0: 2e 20 49 74 27 73 20 62 72 6f 6b 65 6e 20 64 6f  . It's broken do
07f0: 77 6e 20 69 6e 74 6f 0d 0a 23 20 74 68 65 20 66  wn into..# the f
0800: 6f 6c 6c 6f 77 69 6e 67 20 70 61 72 74 73 2e 0d  ollowing parts..
0810: 0a 23 0d 0a 23 20 30 2e 20 53 61 6e 69 74 79 20  .#..# 0. Sanity 
0820: 63 68 65 63 6b 20 74 68 61 74 20 63 6f 6d 70 69  check that compi
0830: 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  ler environment 
0840: 69 73 20 73 65 74 20 75 70 20 61 6e 64 20 69 6e  is set up and in
0850: 69 74 69 61 6c 69 7a 65 0d 0a 23 20 20 20 20 61  itialize..#    a
0860: 6e 79 20 62 75 69 6c 74 2d 69 6e 20 73 65 74 74  ny built-in sett
0870: 69 6e 67 73 20 66 72 6f 6d 20 74 68 65 20 70 61  ings from the pa
0880: 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 0d 0a 23  rent makefile..#
0890: 20 31 2e 20 46 69 72 73 74 20 64 65 66 69 6e 65   1. First define
08a0: 20 74 68 65 20 65 78 74 65 72 6e 61 6c 20 74 6f   the external to
08b0: 6f 6c 73 20 75 73 65 64 20 66 6f 72 20 63 6f 6d  ols used for com
08c0: 70 69 6c 69 6e 67 2c 20 63 6f 70 79 69 6e 67 20  piling, copying 
08d0: 65 74 63 2e 0d 0a 23 20 20 20 20 61 73 20 74 68  etc...#    as th
08e0: 69 73 20 69 73 20 69 6e 64 65 70 65 6e 64 65 6e  is is independen
08f0: 74 20 6f 66 20 65 76 65 72 79 74 68 69 6e 67 20  t of everything 
0900: 65 6c 73 65 2e 0d 0a 23 20 32 2e 20 46 69 67 75  else...# 2. Figu
0910: 72 65 20 6f 75 74 20 6f 75 72 20 62 75 69 6c 64  re out our build
0920: 20 73 74 72 75 63 74 75 72 65 20 69 6e 20 74 65   structure in te
0930: 72 6d 73 20 6f 66 20 74 68 65 20 64 69 72 65 63  rms of the direc
0940: 74 6f 72 79 2c 20 77 68 65 74 68 65 72 0d 0a 23  tory, whether..#
0950: 20 20 20 20 77 65 20 61 72 65 20 62 75 69 6c 64      we are build
0960: 69 6e 67 20 54 63 6c 20 6f 72 20 61 6e 20 65 78  ing Tcl or an ex
0970: 74 65 6e 73 69 6f 6e 2c 20 65 74 63 2e 0d 0a 23  tension, etc...#
0980: 20 33 2e 20 44 65 74 65 72 6d 69 6e 65 20 74 68   3. Determine th
0990: 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c  e compiler and l
09a0: 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 0d 0a  inker versions..
09b0: 23 20 34 2e 20 42 75 69 6c 64 20 74 68 65 20 6e  # 4. Build the n
09c0: 6d 61 6b 65 68 6c 70 20 68 65 6c 70 65 72 20 61  makehlp helper a
09d0: 70 70 6c 69 63 61 74 69 6f 6e 0d 0a 23 20 35 2e  pplication..# 5.
09e0: 20 44 65 74 65 72 6d 69 6e 65 20 74 68 65 20 73   Determine the s
09f0: 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 6c 65  upported compile
0a00: 72 20 6f 70 74 69 6f 6e 73 20 61 6e 64 20 66 65  r options and fe
0a10: 61 74 75 72 65 73 0d 0a 23 20 36 2e 20 45 78 74  atures..# 6. Ext
0a20: 72 61 63 74 20 54 63 6c 2c 20 54 6b 2c 20 61 6e  ract Tcl, Tk, an
0a30: 64 20 70 6f 73 73 69 62 6c 79 20 65 78 74 65 6e  d possibly exten
0a40: 73 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e 20 6e  sions, version n
0a50: 75 6d 62 65 72 73 20 66 72 6f 6d 20 74 68 65 0d  umbers from the.
0a60: 0a 23 20 20 20 20 68 65 61 64 65 72 73 0d 0a 23  .#    headers..#
0a70: 20 37 2e 20 50 61 72 73 65 20 74 68 65 20 4f 50   7. Parse the OP
0a80: 54 53 20 6d 61 63 72 6f 20 76 61 6c 75 65 20 66  TS macro value f
0a90: 6f 72 20 75 73 65 72 2d 73 70 65 63 69 66 69 65  or user-specifie
0aa0: 64 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72  d build configur
0ab0: 61 74 69 6f 6e 0d 0a 23 20 38 2e 20 50 61 72 73  ation..# 8. Pars
0ac0: 65 20 74 68 65 20 53 54 41 54 53 20 6d 61 63 72  e the STATS macr
0ad0: 6f 20 76 61 6c 75 65 20 66 6f 72 20 73 74 61 74  o value for stat
0ae0: 69 73 74 69 63 73 20 69 6e 73 74 72 75 6d 65 6e  istics instrumen
0af0: 74 61 74 69 6f 6e 0d 0a 23 20 39 2e 20 50 61 72  tation..# 9. Par
0b00: 73 65 20 74 68 65 20 43 48 45 43 4b 53 20 6d 61  se the CHECKS ma
0b10: 63 72 6f 20 66 6f 72 20 61 64 64 69 74 69 6f 6e  cro for addition
0b20: 61 6c 20 63 6f 6d 70 69 6c 61 74 69 6f 6e 20 63  al compilation c
0b30: 68 65 63 6b 73 0d 0a 23 20 31 30 2e 20 42 61 73  hecks..# 10. Bas
0b40: 65 64 20 6f 6e 20 74 68 69 73 20 73 65 6c 65 63  ed on this selec
0b50: 74 65 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f  ted configuratio
0b60: 6e 2c 20 63 6f 6e 73 74 72 75 63 74 20 74 68 65  n, construct the
0b70: 20 6f 75 74 70 75 74 0d 0a 23 20 20 20 20 20 64   output..#     d
0b80: 69 72 65 63 74 6f 72 79 20 61 6e 64 20 66 69 6c  irectory and fil
0b90: 65 20 70 61 74 68 73 0d 0a 23 20 31 31 2e 20 43  e paths..# 11. C
0ba0: 6f 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 74  onstruct the pat
0bb0: 68 73 20 77 68 65 72 65 20 74 68 65 20 70 61 63  hs where the pac
0bc0: 6b 61 67 65 20 69 73 20 74 6f 20 62 65 20 69 6e  kage is to be in
0bd0: 73 74 61 6c 6c 65 64 0d 0a 23 20 31 32 2e 20 53  stalled..# 12. S
0be0: 65 74 20 75 70 20 74 68 65 20 61 63 74 75 61 6c  et up the actual
0bf0: 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20   options passed 
0c00: 74 6f 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20  to compiler and 
0c10: 6c 69 6e 6b 65 72 20 62 61 73 65 64 0d 0a 23 20  linker based..# 
0c20: 20 20 20 20 6f 6e 20 74 68 65 20 69 6e 66 6f 72      on the infor
0c30: 6d 61 74 69 6f 6e 20 67 61 74 68 65 72 65 64 20  mation gathered 
0c40: 61 62 6f 76 65 2e 0d 0a 23 20 31 33 2e 20 44 65  above...# 13. De
0c50: 66 69 6e 65 20 73 6f 6d 65 20 73 74 61 6e 64 61  fine some standa
0c60: 72 64 20 62 75 69 6c 64 20 74 61 72 67 65 74 73  rd build targets
0c70: 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75   and implicit ru
0c80: 6c 65 73 2e 20 54 68 65 73 65 20 6d 61 79 0d 0a  les. These may..
0c90: 23 20 20 20 20 20 62 65 20 6f 70 74 69 6f 6e 61  #     be optiona
0ca0: 6c 6c 79 20 64 69 73 61 62 6c 65 64 20 62 79 20  lly disabled by 
0cb0: 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6b 65 66  the parent makef
0cc0: 69 6c 65 2e 0d 0a 23 20 31 34 2e 20 28 46 6f 72  ile...# 14. (For
0cd0: 20 65 78 74 65 6e 73 69 6f 6e 73 20 6f 6e 6c 79   extensions only
0ce0: 2e 29 20 43 6f 6d 70 61 72 65 20 74 68 65 20 63  .) Compare the c
0cf0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 66 20  onfiguration of 
0d00: 74 68 65 20 74 61 72 67 65 74 0d 0a 23 20 20 20  the target..#   
0d10: 20 20 54 63 6c 20 61 6e 64 20 74 68 65 20 65 78    Tcl and the ex
0d20: 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 77 61 72  tensions and war
0d30: 6e 20 61 67 61 69 6e 73 74 20 64 69 73 63 72 65  n against discre
0d40: 70 61 6e 63 69 65 73 2e 0d 0a 23 0d 0a 23 20 4f  pancies...#..# O
0d50: 6e 65 20 66 69 6e 61 6c 20 6e 6f 74 65 20 61 62  ne final note ab
0d60: 6f 75 74 20 74 68 65 20 6d 61 63 72 6f 20 6e 61  out the macro na
0d70: 6d 65 73 20 75 73 65 64 2e 20 54 68 65 79 20 61  mes used. They a
0d80: 72 65 20 61 73 20 74 68 65 79 20 61 72 65 0d 0a  re as they are..
0d90: 23 20 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c  # for historical
0da0: 20 72 65 61 73 6f 6e 73 2e 20 57 65 20 77 6f 75   reasons. We wou
0db0: 6c 64 20 6c 69 6b 65 20 6c 65 67 61 63 79 20 65  ld like legacy e
0dc0: 78 74 65 6e 73 69 6f 6e 73 20 74 6f 0d 0a 23 20  xtensions to..# 
0dd0: 63 6f 6e 74 69 6e 75 65 20 74 6f 20 77 6f 72 6b  continue to work
0de0: 20 77 69 74 68 20 74 68 69 73 20 6d 61 6b 65 20   with this make 
0df0: 69 6e 63 6c 75 64 65 20 66 69 6c 65 20 73 6f 20  include file so 
0e00: 62 65 20 77 61 72 79 20 6f 66 0d 0a 23 20 63 68  be wary of..# ch
0e10: 61 6e 67 69 6e 67 20 74 68 65 6d 20 66 6f 72 20  anging them for 
0e20: 63 6f 6e 73 69 73 74 65 6e 63 79 20 6f 72 20 63  consistency or c
0e30: 6c 61 72 69 74 79 2e 0d 0a 0d 0a 23 20 30 2e 20  larity.....# 0. 
0e40: 53 61 6e 69 74 79 20 63 68 65 63 6b 20 63 6f 6d  Sanity check com
0e50: 70 69 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e  piler environmen
0e60: 74 0d 0a 0d 0a 23 20 43 68 65 63 6b 20 74 6f 20  t....# Check to 
0e70: 73 65 65 20 77 65 20 61 72 65 20 63 6f 6e 66 69  see we are confi
0e80: 67 75 72 65 64 20 74 6f 20 62 75 69 6c 64 20 77  gured to build w
0e90: 69 74 68 20 4d 53 56 43 20 28 4d 53 44 45 56 44  ith MSVC (MSDEVD
0ea0: 49 52 2c 20 4d 53 56 43 44 49 52 20 6f 72 0d 0a  IR, MSVCDIR or..
0eb0: 23 20 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20  # VCINSTALLDIR) 
0ec0: 6f 72 20 77 69 74 68 20 74 68 65 20 4d 53 20 50  or with the MS P
0ed0: 6c 61 74 66 6f 72 6d 20 53 44 4b 20 28 4d 53 53  latform SDK (MSS
0ee0: 44 4b 20 6f 72 20 57 69 6e 64 6f 77 73 53 44 4b  DK or WindowsSDK
0ef0: 44 69 72 29 0d 0a 0d 0a 21 69 66 20 21 64 65 66  Dir)....!if !def
0f00: 69 6e 65 64 28 4d 53 44 45 56 44 49 52 29 20 26  ined(MSDEVDIR) &
0f10: 26 20 21 64 65 66 69 6e 65 64 28 4d 53 56 43 44  & !defined(MSVCD
0f20: 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28  IR) && !defined(
0f30: 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 26 26  VCINSTALLDIR) &&
0f40: 20 21 64 65 66 69 6e 65 64 28 4d 53 53 44 4b 29   !defined(MSSDK)
0f50: 20 26 26 20 21 64 65 66 69 6e 65 64 28 57 49 4e   && !defined(WIN
0f60: 44 4f 57 53 53 44 4b 44 49 52 29 0d 0a 4d 53 47  DOWSSDKDIR)..MSG
0f70: 20 3d 20 5e 0d 0a 56 69 73 75 61 6c 20 43 2b 2b   = ^..Visual C++
0f80: 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 72 6f   compiler enviro
0f90: 6e 6d 65 6e 74 20 6e 6f 74 20 69 6e 69 74 69 61  nment not initia
0fa0: 6c 69 7a 65 64 2e 0d 0a 21 65 72 72 6f 72 20 24  lized...!error $
0fb0: 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d  (MSG)..!endif...
0fc0: 0a 23 20 57 65 20 6e 65 65 64 20 74 6f 20 72 75  .# We need to ru
0fd0: 6e 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 63  n from the direc
0fe0: 74 6f 72 79 20 74 68 65 20 70 61 72 65 6e 74 20  tory the parent 
0ff0: 6d 61 6b 65 66 69 6c 65 20 69 73 20 6c 6f 63 61  makefile is loca
1000: 74 65 64 20 69 6e 2e 0d 0a 23 20 6e 6d 61 6b 65  ted in...# nmake
1010: 20 64 6f 65 73 20 6e 6f 74 20 74 65 6c 6c 20 75   does not tell u
1020: 73 20 77 68 61 74 20 6d 61 6b 65 66 69 6c 65 20  s what makefile 
1030: 77 61 73 20 75 73 65 64 20 74 6f 20 69 6e 76 6f  was used to invo
1040: 6b 65 20 69 74 20 73 6f 20 70 61 72 65 6e 74 0d  ke it so parent.
1050: 0a 23 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20  .# makefile has 
1060: 74 6f 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46  to set the MAKEF
1070: 49 4c 45 56 43 20 6d 61 63 72 6f 20 6f 72 20 77  ILEVC macro or w
1080: 65 20 6a 75 73 74 20 6d 61 6b 65 20 61 20 67 75  e just make a gu
1090: 65 73 73 20 61 6e 64 0d 0a 23 20 77 61 72 6e 20  ess and..# warn 
10a0: 69 66 20 77 65 20 74 68 69 6e 6b 20 74 68 61 74  if we think that
10b0: 20 69 73 20 6e 6f 74 20 74 68 65 20 63 61 73 65   is not the case
10c0: 2e 0d 0a 21 69 66 20 22 24 28 4d 41 4b 45 46 49  ...!if "$(MAKEFI
10d0: 4c 45 56 43 29 22 20 3d 3d 20 22 22 0d 0a 0d 0a  LEVC)" == ""....
10e0: 21 69 66 20 65 78 69 73 74 28 22 24 28 50 52 4f  !if exist("$(PRO
10f0: 4a 45 43 54 29 2e 76 63 22 29 0d 0a 4d 41 4b 45  JECT).vc")..MAKE
1100: 46 49 4c 45 56 43 20 3d 20 24 28 50 52 4f 4a 45  FILEVC = $(PROJE
1110: 43 54 29 2e 76 63 0d 0a 21 65 6c 73 65 69 66 20  CT).vc..!elseif 
1120: 65 78 69 73 74 28 22 6d 61 6b 65 66 69 6c 65 2e  exist("makefile.
1130: 76 63 22 29 0d 0a 4d 41 4b 45 46 49 4c 45 56 43  vc")..MAKEFILEVC
1140: 20 3d 20 6d 61 6b 65 66 69 6c 65 2e 76 63 0d 0a   = makefile.vc..
1150: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20 23  !endif..!endif #
1160: 20 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 22   "$(MAKEFILEVC)"
1170: 20 3d 3d 20 22 22 0d 0a 0d 0a 21 69 66 20 21 65   == ""....!if !e
1180: 78 69 73 74 28 22 24 28 4d 41 4b 45 46 49 4c 45  xist("$(MAKEFILE
1190: 56 43 29 22 29 0d 0a 4d 53 47 20 3d 20 5e 0d 0a  VC)")..MSG = ^..
11a0: 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 6e 6d 61  You must run nma
11b0: 6b 65 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65  ke from the dire
11c0: 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67  ctory containing
11d0: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 6b   the project mak
11e0: 65 66 69 6c 65 2e 5e 0d 0a 49 66 20 79 6f 75 20  efile.^..If you 
11f0: 61 72 65 20 64 6f 69 6e 67 20 74 68 61 74 20 61  are doing that a
1200: 6e 64 20 67 65 74 74 69 6e 67 20 74 68 69 73 20  nd getting this 
1210: 6d 65 73 73 61 67 65 2c 20 73 65 74 20 74 68 65  message, set the
1220: 20 4d 41 4b 45 46 49 4c 45 56 43 5e 0d 0a 6d 61   MAKEFILEVC^..ma
1230: 63 72 6f 20 74 6f 20 74 68 65 20 6e 61 6d 65 20  cro to the name 
1240: 6f 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d  of the project m
1250: 61 6b 65 66 69 6c 65 2e 0d 0a 21 6d 65 73 73 61  akefile...!messa
1260: 67 65 20 57 41 52 4e 49 4e 47 3a 20 24 28 4d 53  ge WARNING: $(MS
1270: 47 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a  G)..!endif......
1280: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
12a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
12b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
12c0: 0d 0a 23 20 31 2e 20 44 65 66 69 6e 65 20 65 78  ..# 1. Define ex
12d0: 74 65 72 6e 61 6c 20 70 72 6f 67 72 61 6d 73 20  ternal programs 
12e0: 62 65 69 6e 67 20 75 73 65 64 0d 0a 0d 0a 23 2d  being used....#-
12f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 53 65 74  ---------..# Set
1330: 20 74 68 65 20 70 72 6f 70 65 72 20 63 6f 70 79   the proper copy
1340: 20 6d 65 74 68 6f 64 20 74 6f 20 61 76 6f 69 64   method to avoid
1350: 20 6f 76 65 72 77 72 69 74 65 20 71 75 65 73 74   overwrite quest
1360: 69 6f 6e 73 0d 0a 23 20 74 6f 20 74 68 65 20 75  ions..# to the u
1370: 73 65 72 20 77 68 65 6e 20 63 6f 70 79 69 6e 67  ser when copying
1380: 20 66 69 6c 65 73 20 61 6e 64 20 73 65 6c 65 63   files and selec
1390: 74 69 6e 67 20 74 68 65 20 72 69 67 68 74 0d 0a  ting the right..
13a0: 23 20 22 64 65 6c 65 74 65 20 61 6c 6c 22 20 6d  # "delete all" m
13b0: 65 74 68 6f 64 2e 0d 0a 23 2d 2d 2d 2d 2d 2d 2d  ethod...#-------
13c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13f0: 2d 2d 2d 0d 0a 0d 0a 52 4d 44 49 52 09 3d 20 72  ---....RMDIR.= r
1400: 6d 64 69 72 20 2f 53 20 2f 51 0d 0a 43 50 59 09  mdir /S /Q..CPY.
1410: 3d 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e  = xcopy /i /y >N
1420: 55 4c 0d 0a 43 50 59 44 49 52 20 20 3d 20 78 63  UL..CPYDIR  = xc
1430: 6f 70 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e 55  opy /e /i /y >NU
1440: 4c 0d 0a 43 4f 50 59 09 3d 20 63 6f 70 79 20 2f  L..COPY.= copy /
1450: 79 20 3e 4e 55 4c 0d 0a 4d 4b 44 49 52 20 20 20  y >NUL..MKDIR   
1460: 3d 20 6d 6b 64 69 72 0d 0a 0d 0a 23 23 23 23 23  = mkdir....#####
1470: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1480: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
1490: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
14a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
14b0: 23 0d 0a 23 20 32 2e 20 46 69 67 75 72 65 20 6f  #..# 2. Figure o
14c0: 75 74 20 6f 75 72 20 62 75 69 6c 64 20 65 6e 76  ut our build env
14d0: 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 74 65 72 6d  ironment in term
14e0: 73 20 6f 66 20 77 68 61 74 20 77 65 27 72 65 20  s of what we're 
14f0: 62 75 69 6c 64 69 6e 67 2e 0d 0a 23 0d 0a 23 20  building...#..# 
1500: 28 61 29 20 54 63 6c 20 69 74 73 65 6c 66 0d 0a  (a) Tcl itself..
1510: 23 20 28 62 29 20 54 6b 0d 0a 23 20 28 63 29 20  # (b) Tk..# (c) 
1520: 61 20 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20  a Tcl extension 
1530: 75 73 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f  using libraries/
1540: 69 6e 63 6c 75 64 65 73 20 66 72 6f 6d 20 61 6e  includes from an
1550: 20 2a 69 6e 73 74 61 6c 6c 65 64 2a 20 54 63 6c   *installed* Tcl
1560: 0d 0a 23 20 28 64 29 20 61 20 54 63 6c 20 65 78  ..# (d) a Tcl ex
1570: 74 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69  tension using li
1580: 62 72 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73  braries/includes
1590: 20 66 72 6f 6d 20 54 63 6c 20 73 6f 75 72 63 65   from Tcl source
15a0: 20 64 69 72 65 63 74 6f 72 79 0d 0a 23 0d 0a 23   directory..#..#
15b0: 20 54 68 69 73 20 6c 61 73 74 20 69 73 20 6e 65   This last is ne
15c0: 65 64 65 64 20 62 65 63 61 75 73 65 20 73 6f 6d  eded because som
15d0: 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 73 74 69  e extensions sti
15e0: 6c 6c 20 6e 65 65 64 0d 0a 23 20 73 6f 6d 65 20  ll need..# some 
15f0: 54 63 6c 20 69 6e 74 65 72 66 61 63 65 73 20 74  Tcl interfaces t
1600: 68 61 74 20 61 72 65 20 6e 6f 74 20 70 75 62 6c  hat are not publ
1610: 69 63 6c 79 20 65 78 70 6f 73 65 64 2e 0d 0a 23  icly exposed...#
1620: 0d 0a 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74  ..# The fragment
1630: 20 77 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f   will set the fo
1640: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0d  llowing macros:.
1650: 0a 23 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f  .# ROOT - root o
1660: 66 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f  f this module so
1670: 75 72 63 65 73 0d 0a 23 20 43 4f 4d 50 41 54 44  urces..# COMPATD
1680: 49 52 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65  IR - source dire
1690: 63 74 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 73  ctory that holds
16a0: 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 73   compatibility s
16b0: 6f 75 72 63 65 73 0d 0a 23 20 44 4f 43 44 49 52  ources..# DOCDIR
16c0: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74   - source direct
16d0: 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64  ory containing d
16e0: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c  ocumentation fil
16f0: 65 73 0d 0a 23 20 47 45 4e 45 52 49 43 44 49 52  es..# GENERICDIR
1700: 20 2d 20 70 6c 61 74 66 6f 72 6d 2d 69 6e 64 65   - platform-inde
1710: 70 65 6e 64 65 6e 74 20 73 6f 75 72 63 65 20 64  pendent source d
1720: 69 72 65 63 74 6f 72 79 0d 0a 23 20 57 49 4e 5f  irectory..# WIN_
1730: 44 49 52 20 2d 20 57 69 6e 64 6f 77 73 2d 73 70  DIR - Windows-sp
1740: 65 63 69 66 69 63 20 73 6f 75 72 63 65 20 64 69  ecific source di
1750: 72 65 63 74 6f 72 79 0d 0a 23 20 54 45 53 54 44  rectory..# TESTD
1760: 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63  IR - directory c
1770: 6f 6e 74 61 69 6e 69 6e 67 20 74 65 73 74 20 66  ontaining test f
1780: 69 6c 65 73 0d 0a 23 20 54 4f 4f 4c 53 44 49 52  iles..# TOOLSDIR
1790: 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e   - directory con
17a0: 74 61 69 6e 69 6e 67 20 62 75 69 6c 64 20 74 6f  taining build to
17b0: 6f 6c 73 0d 0a 23 20 5f 54 43 4c 44 49 52 20 2d  ols..# _TCLDIR -
17c0: 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c   root of the Tcl
17d0: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f 52   installation OR
17e0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 73   the Tcl sources
17f0: 2e 20 4e 6f 74 20 73 65 74 0d 0a 23 20 20 20 20  . Not set..#    
1800: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 63  when building Tc
1810: 6c 20 69 74 73 65 6c 66 2e 0d 0a 23 20 5f 49 4e  l itself...# _IN
1820: 53 54 41 4c 4c 44 49 52 20 2d 20 6e 61 74 69 76  STALLDIR - nativ
1830: 65 20 66 6f 72 6d 20 6f 66 20 74 68 65 20 69 6e  e form of the in
1840: 73 74 61 6c 6c 61 74 69 6f 6e 20 70 61 74 68 2e  stallation path.
1850: 20 46 6f 72 20 54 63 6c 0d 0a 23 20 20 20 20 74   For Tcl..#    t
1860: 68 69 73 20 77 69 6c 6c 20 62 65 20 74 68 65 20  his will be the 
1870: 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c 20  root of the Tcl 
1880: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2e 20 46 6f  installation. Fo
1890: 72 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20  r extensions..# 
18a0: 20 20 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20     this will be 
18b0: 74 68 65 20 6c 69 62 20 64 69 72 65 63 74 6f 72  the lib director
18c0: 79 20 75 6e 64 65 72 20 74 68 65 20 72 6f 6f 74  y under the root
18d0: 2e 0d 0a 23 20 54 43 4c 49 4e 53 54 41 4c 4c 20  ...# TCLINSTALL 
18e0: 20 2d 20 73 65 74 20 74 6f 20 31 20 69 66 20 5f   - set to 1 if _
18f0: 54 43 4c 44 49 52 20 72 65 66 65 72 73 20 74 6f  TCLDIR refers to
1900: 0d 0a 23 20 20 20 20 68 65 61 64 65 72 73 20 61  ..#    headers a
1910: 6e 64 20 6c 69 62 72 61 72 69 65 73 20 66 72 6f  nd libraries fro
1920: 6d 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54  m an installed T
1930: 63 6c 2c 20 61 6e 64 20 30 20 69 66 20 62 75 69  cl, and 0 if bui
1940: 6c 74 20 61 67 61 69 6e 73 74 0d 0a 23 20 20 20  lt against..#   
1950: 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e 6f   Tcl sources. No
1960: 74 20 73 65 74 20 77 68 65 6e 20 62 75 69 6c 64  t set when build
1970: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e 20  ing Tcl itself. 
1980: 59 65 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 65  Yes, not very we
1990: 6c 6c 0d 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0d  ll..#    named..
19a0: 0a 23 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69  .# _TCL_H - nati
19b0: 76 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74  ve path to the t
19c0: 63 6c 2e 68 20 66 69 6c 65 0d 0a 23 0d 0a 23 20  cl.h file..#..# 
19d0: 49 66 20 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65  If Tk is involve
19e0: 64 2c 20 61 6c 73 6f 20 73 65 74 73 20 74 68 65  d, also sets the
19f0: 20 66 6f 6c 6c 6f 77 69 6e 67 0d 0a 23 20 5f 54   following..# _T
1a00: 4b 44 49 52 20 2d 20 6e 61 74 69 76 65 20 66 6f  KDIR - native fo
1a10: 72 6d 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74 69  rm Tk installati
1a20: 6f 6e 20 4f 52 20 54 6b 20 73 6f 75 72 63 65 2e  on OR Tk source.
1a30: 20 4e 6f 74 20 73 65 74 20 69 66 20 62 75 69 6c   Not set if buil
1a40: 64 69 6e 67 0d 0a 23 20 20 20 20 54 6b 20 69 74  ding..#    Tk it
1a50: 73 65 6c 66 2e 0d 0a 23 20 54 4b 49 4e 53 54 41  self...# TKINSTA
1a60: 4c 4c 20 2d 20 73 65 74 20 31 20 69 66 20 5f 54  LL - set 1 if _T
1a70: 4b 44 49 52 20 72 65 66 65 72 73 20 74 6f 20 69  KDIR refers to i
1a80: 6e 73 74 61 6c 6c 65 64 20 54 6b 20 61 6e 64 20  nstalled Tk and 
1a90: 30 20 69 66 20 54 6b 20 73 6f 75 72 63 65 73 0d  0 if Tk sources.
1aa0: 0a 23 20 5f 54 4b 5f 48 20 2d 20 6e 61 74 69 76  .# _TK_H - nativ
1ab0: 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 6b  e path to the tk
1ac0: 2e 68 20 66 69 6c 65 0d 0a 0d 0a 23 20 52 6f 6f  .h file....# Roo
1ad0: 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20  t directory for 
1ae0: 73 6f 75 72 63 65 73 20 61 6e 64 20 61 73 73 75  sources and assu
1af0: 6d 65 64 20 73 75 62 64 69 72 65 63 74 6f 72 69  med subdirectori
1b00: 65 73 0d 0a 52 4f 4f 54 20 3d 20 24 28 4d 41 4b  es..ROOT = $(MAK
1b10: 45 44 49 52 29 5c 2e 2e 0d 0a 23 20 54 68 65 20  EDIR)\....# The 
1b20: 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 74 68 73 20  following paths 
1b30: 43 41 4e 4e 4f 54 20 68 61 76 65 20 73 70 61 63  CANNOT have spac
1b40: 65 73 20 69 6e 20 74 68 65 6d 20 61 73 20 74 68  es in them as th
1b50: 65 79 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65  ey appear on the
1b60: 0d 0a 23 20 6c 65 66 74 20 73 69 64 65 20 6f 66  ..# left side of
1b70: 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 2e   implicit rules.
1b80: 0d 0a 21 69 66 6e 64 65 66 20 43 4f 4d 50 41 54  ..!ifndef COMPAT
1b90: 44 49 52 0d 0a 43 4f 4d 50 41 54 44 49 52 09 3d  DIR..COMPATDIR.=
1ba0: 20 24 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 74 0d   $(ROOT)\compat.
1bb0: 0a 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66  .!endif..!ifndef
1bc0: 20 44 4f 43 44 49 52 0d 0a 44 4f 43 44 49 52 09   DOCDIR..DOCDIR.
1bd0: 09 3d 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0d 0a  .= $(ROOT)\doc..
1be0: 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20  !endif..!ifndef 
1bf0: 47 45 4e 45 52 49 43 44 49 52 0d 0a 47 45 4e 45  GENERICDIR..GENE
1c00: 52 49 43 44 49 52 09 3d 20 24 28 52 4f 4f 54 29  RICDIR.= $(ROOT)
1c10: 5c 67 65 6e 65 72 69 63 0d 0a 21 65 6e 64 69 66  \generic..!endif
1c20: 0d 0a 21 69 66 6e 64 65 66 20 54 4f 4f 4c 53 44  ..!ifndef TOOLSD
1c30: 49 52 0d 0a 54 4f 4f 4c 53 44 49 52 09 3d 20 24  IR..TOOLSDIR.= $
1c40: 28 52 4f 4f 54 29 5c 74 6f 6f 6c 73 0d 0a 21 65  (ROOT)\tools..!e
1c50: 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20 54 45  ndif..!ifndef TE
1c60: 53 54 44 49 52 0d 0a 54 45 53 54 44 49 52 09 3d  STDIR..TESTDIR.=
1c70: 20 24 28 52 4f 4f 54 29 5c 74 65 73 74 73 0d 0a   $(ROOT)\tests..
1c80: 21 65 6e 64 69 66 0d 0a 21 69 66 6e 64 65 66 20  !endif..!ifndef 
1c90: 4c 49 42 44 49 52 0d 0a 21 69 66 20 65 78 69 73  LIBDIR..!if exis
1ca0: 74 28 22 24 28 52 4f 4f 54 29 5c 6c 69 62 72 61  t("$(ROOT)\libra
1cb0: 72 79 22 29 0d 0a 4c 49 42 44 49 52 20 20 20 20  ry")..LIBDIR    
1cc0: 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 29 5c        = $(ROOT)\
1cd0: 6c 69 62 72 61 72 79 0d 0a 21 65 6c 73 65 0d 0a  library..!else..
1ce0: 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20  LIBDIR          
1cf0: 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 0d 0a 21  = $(ROOT)\lib..!
1d00: 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21  endif..!endif..!
1d10: 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 52 0d 0a  ifndef DEMODIR..
1d20: 21 69 66 20 65 78 69 73 74 28 22 24 28 4c 49 42  !if exist("$(LIB
1d30: 44 49 52 29 5c 64 65 6d 6f 73 22 29 0d 0a 44 45  DIR)\demos")..DE
1d40: 4d 4f 44 49 52 09 09 3d 20 24 28 4c 49 42 44 49  MODIR..= $(LIBDI
1d50: 52 29 5c 64 65 6d 6f 73 0d 0a 21 65 6c 73 65 0d  R)\demos..!else.
1d60: 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 28 52 4f  .DEMODIR..= $(RO
1d70: 4f 54 29 5c 64 65 6d 6f 73 0d 0a 21 65 6e 64 69  OT)\demos..!endi
1d80: 66 0d 0a 21 65 6e 64 69 66 20 23 20 69 66 6e 64  f..!endif # ifnd
1d90: 65 66 20 44 45 4d 4f 44 49 52 0d 0a 23 20 44 6f  ef DEMODIR..# Do
1da0: 20 4e 4f 54 20 75 73 65 20 57 49 4e 44 49 52 20   NOT use WINDIR 
1db0: 62 65 63 61 75 73 65 20 69 74 20 69 73 20 57 69  because it is Wi
1dc0: 6e 64 6f 77 73 20 69 6e 74 65 72 6e 61 6c 20 65  ndows internal e
1dd0: 6e 76 69 72 6f 6e 6d 65 6e 74 0d 0a 23 20 76 61  nvironment..# va
1de0: 72 69 61 62 6c 65 20 74 6f 20 70 6f 69 6e 74 20  riable to point 
1df0: 74 6f 20 63 3a 5c 77 69 6e 64 6f 77 73 21 0d 0a  to c:\windows!..
1e00: 57 49 4e 5f 44 49 52 09 09 3d 20 24 28 52 4f 4f  WIN_DIR..= $(ROO
1e10: 54 29 5c 77 69 6e 0d 0a 0d 0a 21 69 66 6e 64 65  T)\win....!ifnde
1e20: 66 20 52 43 44 49 52 0d 0a 21 69 66 20 65 78 69  f RCDIR..!if exi
1e30: 73 74 28 22 24 28 57 49 4e 5f 44 49 52 29 5c 72  st("$(WIN_DIR)\r
1e40: 63 22 29 0d 0a 52 43 44 49 52 20 20 20 20 20 20  c")..RCDIR      
1e50: 20 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52       = $(WIN_DIR
1e60: 29 5c 72 63 0d 0a 21 65 6c 73 65 0d 0a 52 43 44  )\rc..!else..RCD
1e70: 49 52 20 20 20 20 20 20 20 20 20 20 20 3d 20 24  IR           = $
1e80: 28 57 49 4e 5f 44 49 52 29 0d 0a 21 65 6e 64 69  (WIN_DIR)..!endi
1e90: 66 0d 0a 21 65 6e 64 69 66 0d 0a 52 43 44 49 52  f..!endif..RCDIR
1ea0: 20 3d 20 24 28 52 43 44 49 52 3a 2f 3d 5c 29 0d   = $(RCDIR:/=\).
1eb0: 0a 0d 0a 23 20 54 68 65 20 74 61 72 67 65 74 20  ...# The target 
1ec0: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20  directory where 
1ed0: 74 68 65 20 62 75 69 6c 74 20 70 61 63 6b 61 67  the built packag
1ee0: 65 73 20 61 6e 64 20 62 69 6e 61 72 69 65 73 20  es and binaries 
1ef0: 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65  will be installe
1f00: 64 2e 0d 0a 23 20 49 4e 53 54 41 4c 4c 44 49 52  d...# INSTALLDIR
1f10: 20 69 73 20 74 68 65 20 28 6f 70 74 69 6f 6e 61   is the (optiona
1f20: 6c 29 20 70 61 74 68 20 73 70 65 63 69 66 69 65  l) path specifie
1f30: 64 20 62 79 20 74 68 65 20 75 73 65 72 2e 0d 0a  d by the user...
1f40: 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 73  # _INSTALLDIR is
1f50: 20 49 4e 53 54 41 4c 4c 44 49 52 20 75 73 69 6e   INSTALLDIR usin
1f60: 67 20 74 68 65 20 62 61 63 6b 73 6c 61 73 68 20  g the backslash 
1f70: 73 65 70 61 72 61 74 6f 72 20 73 79 6e 74 61 78  separator syntax
1f80: 0d 0a 21 69 66 64 65 66 20 49 4e 53 54 41 4c 4c  ..!ifdef INSTALL
1f90: 44 49 52 0d 0a 23 23 23 20 46 69 78 20 74 68 65  DIR..### Fix the
1fa0: 20 70 61 74 68 20 73 65 70 61 72 61 74 6f 72 73   path separators
1fb0: 2e 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 09 3d  ..._INSTALLDIR.=
1fc0: 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 3a 2f 3d   $(INSTALLDIR:/=
1fd0: 5c 29 0d 0a 21 65 6c 73 65 0d 0a 23 23 23 20 41  \)..!else..### A
1fe0: 73 73 75 6d 65 20 74 68 65 20 6e 6f 72 6d 61 6c  ssume the normal
1ff0: 20 64 65 66 61 75 6c 74 2e 0d 0a 5f 49 4e 53 54   default..._INST
2000: 41 4c 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 44  ALLDIR.= $(HOMED
2010: 52 49 56 45 29 5c 54 63 6c 0d 0a 21 65 6e 64 69  RIVE)\Tcl..!endi
2020: 66 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47  f....!if $(DOING
2030: 5f 54 43 4c 29 0d 0a 0d 0a 23 20 42 45 47 49 4e  _TCL)....# BEGIN
2040: 20 43 61 73 65 20 32 28 61 29 20 2d 20 42 75 69   Case 2(a) - Bui
2050: 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66  lding Tcl itself
2060: 0d 0a 0d 0a 23 20 4f 6e 6c 79 20 6e 65 65 64 20  ....# Only need 
2070: 74 6f 20 64 65 66 69 6e 65 20 5f 54 43 4c 5f 48  to define _TCL_H
2080: 0d 0a 5f 54 43 4c 5f 48 20 3d 20 2e 2e 5c 67 65  .._TCL_H = ..\ge
2090: 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a 0d 0a 23  neric\tcl.h....#
20a0: 20 45 4e 44 20 43 61 73 65 20 32 28 61 29 20 2d   END Case 2(a) -
20b0: 20 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74   Building Tcl it
20c0: 73 65 6c 66 0d 0a 0d 0a 21 65 6c 73 65 69 66 20  self....!elseif 
20d0: 24 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 0d 0a 23  $(DOING_TK)....#
20e0: 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 62 29   BEGIN Case 2(b)
20f0: 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 6b 0d 0a   - Building Tk..
2100: 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 30  ..TCLINSTALL = 0
2110: 20 23 20 54 6b 20 61 6c 77 61 79 73 20 62 75 69   # Tk always bui
2120: 6c 64 73 20 61 67 61 69 6e 73 74 20 54 63 6c 20  lds against Tcl 
2130: 73 6f 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 69  source, not an i
2140: 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 21 69  nstalled Tcl..!i
2150: 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d  f "$(TCLDIR)" ==
2160: 20 22 22 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54   ""..!if [echo T
2170: 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65  CLDIR = \> nmake
2180: 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20 7c  hlp.out] \..   |
2190: 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67  | [nmakehlp -L g
21a0: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20  eneric\tcl.h >> 
21b0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21  nmakehlp.out]..!
21c0: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20  error *** Could 
21d0: 6e 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73  not locate Tcl s
21e0: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e  ource directory.
21f0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75  ..!endif..!inclu
2200: 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d  de nmakehlp.out.
2210: 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 44 49 52  .!endif # TCLDIR
2220: 20 3d 3d 20 22 22 0d 0a 0d 0a 5f 54 43 4c 44 49   == ""...._TCLDI
2230: 52 09 3d 20 24 28 54 43 4c 44 49 52 3a 2f 3d 5c  R.= $(TCLDIR:/=\
2240: 29 0d 0a 5f 54 43 4c 5f 48 20 20 3d 20 24 28 5f  ).._TCL_H  = $(_
2250: 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 5c  TCLDIR)\generic\
2260: 74 63 6c 2e 68 0d 0a 21 69 66 20 21 65 78 69 73  tcl.h..!if !exis
2270: 74 28 22 24 28 5f 54 43 4c 5f 48 29 22 29 0d 0a  t("$(_TCL_H)")..
2280: 21 65 72 72 6f 72 20 43 6f 75 6c 64 20 6e 6f 74  !error Could not
2290: 20 6c 6f 63 61 74 65 20 74 63 6c 2e 68 2e 20 50   locate tcl.h. P
22a0: 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 54 43  lease set the TC
22b0: 4c 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 6f  LDIR macro to po
22c0: 69 6e 74 20 74 6f 20 74 68 65 20 54 63 6c 20 2a  int to the Tcl *
22d0: 73 6f 75 72 63 65 2a 20 64 69 72 65 63 74 6f 72  source* director
22e0: 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 5f 54  y...!endif...._T
22f0: 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63  K_H = ..\generic
2300: 5c 74 6b 2e 68 0d 0a 0d 0a 23 20 45 4e 44 20 43  \tk.h....# END C
2310: 61 73 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64  ase 2(b) - Build
2320: 69 6e 67 20 54 6b 0d 0a 0d 0a 21 65 6c 73 65 0d  ing Tk....!else.
2330: 0a 0d 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20  ...# BEGIN Case 
2340: 32 28 63 29 20 6f 72 20 28 64 29 20 2d 20 42 75  2(c) or (d) - Bu
2350: 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73  ilding an extens
2360: 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54  ion other than T
2370: 6b 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d 6d 61 6e  k....# If comman
2380: 64 20 6c 69 6e 65 20 68 61 73 20 73 70 65 63 69  d line has speci
2390: 66 69 65 64 20 54 63 6c 20 6c 6f 63 61 74 69 6f  fied Tcl locatio
23a0: 6e 20 74 68 72 6f 75 67 68 20 54 43 4c 44 49 52  n through TCLDIR
23b0: 2c 20 75 73 65 20 69 74 0d 0a 23 20 65 6c 73 65  , use it..# else
23c0: 20 64 65 66 61 75 6c 74 20 74 6f 20 74 68 65 20   default to the 
23d0: 49 4e 53 54 41 4c 4c 44 49 52 20 73 65 74 74 69  INSTALLDIR setti
23e0: 6e 67 0d 0a 21 69 66 20 22 24 28 54 43 4c 44 49  ng..!if "$(TCLDI
23f0: 52 29 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 43  R)" != ""...._TC
2400: 4c 44 49 52 09 3d 20 24 28 54 43 4c 44 49 52 3a  LDIR.= $(TCLDIR:
2410: 2f 3d 5c 29 0d 0a 21 69 66 20 65 78 69 73 74 28  /=\)..!if exist(
2420: 22 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c  "$(_TCLDIR)\incl
2430: 75 64 65 5c 74 63 6c 2e 68 22 29 20 23 20 43 61  ude\tcl.h") # Ca
2440: 73 65 20 32 28 63 29 20 77 69 74 68 20 54 43 4c  se 2(c) with TCL
2450: 44 49 52 20 64 65 66 69 6e 65 64 0d 0a 54 43 4c  DIR defined..TCL
2460: 49 4e 53 54 41 4c 4c 09 3d 20 31 0d 0a 5f 54 43  INSTALL.= 1.._TC
2470: 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24  L_H          = $
2480: 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64  (_TCLDIR)\includ
2490: 65 5c 74 63 6c 2e 68 0d 0a 21 65 6c 73 65 69 66  e\tcl.h..!elseif
24a0: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49   exist("$(_TCLDI
24b0: 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68  R)\generic\tcl.h
24c0: 22 29 20 23 20 43 61 73 65 20 32 28 64 29 20 77  ") # Case 2(d) w
24d0: 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e  ith TCLDIR defin
24e0: 65 64 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d  ed..TCLINSTALL.=
24f0: 20 30 0d 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20   0.._TCL_H      
2500: 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29      = $(_TCLDIR)
2510: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0d 0a  \generic\tcl.h..
2520: 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6c 73 65 20  !endif....!else 
2530: 20 23 20 20 23 20 43 61 73 65 20 32 28 63 29 20   #  # Case 2(c) 
2540: 66 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 77  for extensions w
2550: 69 74 68 20 54 43 4c 44 49 52 20 75 6e 64 65 66  ith TCLDIR undef
2560: 69 6e 65 64 0d 0a 0d 0a 23 20 4e 65 65 64 20 74  ined....# Need t
2570: 6f 20 6c 6f 63 61 74 65 20 54 63 6c 20 64 65 70  o locate Tcl dep
2580: 65 6e 64 69 6e 67 20 6f 6e 20 77 68 65 74 68 65  ending on whethe
2590: 72 20 69 74 20 6e 65 65 64 73 20 54 63 6c 20 73  r it needs Tcl s
25a0: 6f 75 72 63 65 20 6f 72 20 6e 6f 74 2e 0d 0a 23  ource or not...#
25b0: 20 49 66 20 77 65 20 64 6f 6e 27 74 2c 20 63 68   If we don't, ch
25c0: 65 63 6b 20 74 68 65 20 49 4e 53 54 41 4c 4c 44  eck the INSTALLD
25d0: 49 52 20 66 6f 72 20 61 6e 20 69 6e 73 74 61 6c  IR for an instal
25e0: 6c 65 64 20 54 63 6c 20 66 69 72 73 74 0d 0a 0d  led Tcl first...
25f0: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 49  .!if exist("$(_I
2600: 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75  NSTALLDIR)\inclu
2610: 64 65 5c 74 63 6c 2e 68 22 29 20 26 26 20 21 24  de\tcl.h") && !$
2620: 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45  (NEED_TCL_SOURCE
2630: 29 0d 0a 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c 09  )....TCLINSTALL.
2640: 3d 20 31 0d 0a 54 43 4c 44 49 52 20 20 20 20 20  = 1..TCLDIR     
2650: 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c       = $(_INSTAL
2660: 4c 44 49 52 29 5c 2e 2e 0d 0a 23 20 4e 4f 54 45  LDIR)\....# NOTE
2670: 3a 20 77 65 20 77 69 6c 6c 20 62 65 20 72 65 73  : we will be res
2680: 65 74 74 69 6e 67 20 5f 49 4e 53 54 41 4c 4c 44  etting _INSTALLD
2690: 49 52 20 74 6f 20 5f 49 4e 53 54 41 4c 4c 44 49  IR to _INSTALLDI
26a0: 52 2f 6c 69 62 20 66 6f 72 20 65 78 74 65 6e 73  R/lib for extens
26b0: 69 6f 6e 73 0d 0a 23 20 6c 61 74 65 72 20 73 6f  ions..# later so
26c0: 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f 75 6e 74   the \.. account
26d0: 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 62 0d 0a  s for the /lib..
26e0: 5f 54 43 4c 44 49 52 09 09 3d 20 24 28 5f 49 4e  _TCLDIR..= $(_IN
26f0: 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54  STALLDIR)\...._T
2700: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20  CL_H          = 
2710: 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75  $(_TCLDIR)\inclu
2720: 64 65 5c 74 63 6c 2e 68 0d 0a 0d 0a 21 65 6c 73  de\tcl.h....!els
2730: 65 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26  e # exist(...) &
2740: 26 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f  & !$(NEED_TCL_SO
2750: 55 52 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63  URCE)....!if [ec
2760: 68 6f 20 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20  ho _TCLDIR = \> 
2770: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d  nmakehlp.out] \.
2780: 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70  .   || [nmakehlp
2790: 20 2d 4c 20 67 65 6e 65 72 69 63 5c 74 63 6c 2e   -L generic\tcl.
27a0: 68 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75  h >> nmakehlp.ou
27b0: 74 5d 0d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43  t]..!error *** C
27c0: 6f 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20  ould not locate 
27d0: 54 63 6c 20 73 6f 75 72 63 65 20 64 69 72 65 63  Tcl source direc
27e0: 74 6f 72 79 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21  tory...!endif..!
27f0: 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70  include nmakehlp
2800: 2e 6f 75 74 0d 0a 54 43 4c 49 4e 53 54 41 4c 4c  .out..TCLINSTALL
2810: 20 20 20 20 20 20 3d 20 30 0d 0a 54 43 4c 44 49        = 0..TCLDI
2820: 52 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54  R         = $(_T
2830: 43 4c 44 49 52 29 0d 0a 5f 54 43 4c 5f 48 20 20  CLDIR).._TCL_H  
2840: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c          = $(_TCL
2850: 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c  DIR)\generic\tcl
2860: 2e 68 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 65  .h....!endif # e
2870: 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28  xist(...) && !$(
2880: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29  NEED_TCL_SOURCE)
2890: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c  ....!endif # TCL
28a0: 44 49 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f  DIR....!ifndef _
28b0: 54 43 4c 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46  TCL_H..MSG =^..F
28c0: 61 69 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 63  ailed to find tc
28d0: 6c 2e 68 2e 20 54 68 65 20 54 43 4c 44 49 52 20  l.h. The TCLDIR 
28e0: 6d 61 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63  macro is set inc
28f0: 6f 72 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e  orrectly or is n
2900: 6f 74 20 73 65 74 20 61 6e 64 20 64 65 66 61 75  ot set and defau
2910: 6c 74 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74  lt path does not
2920: 20 63 6f 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0d   contain tcl.h..
2930: 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a  .!error $(MSG)..
2940: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 4e 6f 77 20  !endif....# Now 
2950: 64 6f 20 74 68 65 20 73 61 6d 65 20 74 6f 20 6c  do the same to l
2960: 6f 63 61 74 65 20 54 6b 20 68 65 61 64 65 72 73  ocate Tk headers
2970: 20 61 6e 64 20 6c 69 62 73 20 69 66 20 70 72 6f   and libs if pro
2980: 6a 65 63 74 20 72 65 71 75 69 72 65 73 20 54 6b  ject requires Tk
2990: 0d 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29  ..!if $(NEED_TK)
29a0: 0d 0a 0d 0a 21 69 66 20 22 24 28 54 4b 44 49 52  ....!if "$(TKDIR
29b0: 29 22 20 21 3d 20 22 22 0d 0a 0d 0a 5f 54 4b 44  )" != ""...._TKD
29c0: 49 52 20 3d 20 24 28 54 4b 44 49 52 3a 2f 3d 5c  IR = $(TKDIR:/=\
29d0: 29 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28  )..!if exist("$(
29e0: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c  _TKDIR)\include\
29f0: 74 6b 2e 68 22 29 0d 0a 54 4b 49 4e 53 54 41 4c  tk.h")..TKINSTAL
2a00: 4c 20 20 20 20 20 20 3d 20 31 0d 0a 5f 54 4b 5f  L      = 1.._TK_
2a10: 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f  H          = $(_
2a20: 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74  TKDIR)\include\t
2a30: 6b 2e 68 0d 0a 21 65 6c 73 65 69 66 20 65 78 69  k.h..!elseif exi
2a40: 73 74 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 65  st("$(_TKDIR)\ge
2a50: 6e 65 72 69 63 5c 74 6b 2e 68 22 29 0d 0a 54 4b  neric\tk.h")..TK
2a60: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30  INSTALL      = 0
2a70: 0d 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20  .._TK_H         
2a80: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e   = $(_TKDIR)\gen
2a90: 65 72 69 63 5c 74 6b 2e 68 0d 0a 21 65 6e 64 69  eric\tk.h..!endi
2aa0: 66 0d 0a 0d 0a 21 65 6c 73 65 20 23 20 54 4b 44  f....!else # TKD
2ab0: 49 52 20 6e 6f 74 20 64 65 66 69 6e 65 64 0d 0a  IR not defined..
2ac0: 0d 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 61  ..# Need to loca
2ad0: 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e 67  te Tcl depending
2ae0: 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 6e   on whether it n
2af0: 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 20  eeds Tcl source 
2b00: 6f 72 20 6e 6f 74 2e 0d 0a 23 20 49 66 20 77 65  or not...# If we
2b10: 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68   don't, check th
2b20: 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72  e INSTALLDIR for
2b30: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63   an installed Tc
2b40: 6c 20 66 69 72 73 74 0d 0a 0d 0a 21 69 66 20 65  l first....!if e
2b50: 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c  xist("$(_INSTALL
2b60: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e  DIR)\include\tk.
2b70: 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54  h") && !$(NEED_T
2b80: 4b 5f 53 4f 55 52 43 45 29 0d 0a 0d 0a 54 4b 49  K_SOURCE)....TKI
2b90: 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0d  NSTALL      = 1.
2ba0: 0a 23 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c  .# NOTE: we will
2bb0: 20 62 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49   be resetting _I
2bc0: 4e 53 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e  NSTALLDIR to _IN
2bd0: 53 54 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72  STALLDIR/lib for
2be0: 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 20 6c   extensions..# l
2bf0: 61 74 65 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20  ater so the \.. 
2c00: 61 63 63 6f 75 6e 74 73 20 66 6f 72 20 74 68 65  accounts for the
2c10: 20 2f 6c 69 62 0d 0a 5f 54 4b 44 49 52 20 20 20   /lib.._TKDIR   
2c20: 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41        = $(_INSTA
2c30: 4c 4c 44 49 52 29 5c 2e 2e 0d 0a 5f 54 4b 5f 48  LLDIR)\...._TK_H
2c40: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54            = $(_T
2c50: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b  KDIR)\include\tk
2c60: 2e 68 0d 0a 54 4b 44 49 52 20 20 20 20 20 20 20  .h..TKDIR       
2c70: 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0d 0a     = $(_TKDIR)..
2c80: 0d 0a 21 65 6c 73 65 20 23 20 65 78 69 73 74 28  ..!else # exist(
2c90: 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c  "$(_INSTALLDIR)\
2ca0: 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26  include\tk.h") &
2cb0: 26 20 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55  & !$(NEED_TK_SOU
2cc0: 52 43 45 29 0d 0a 0d 0a 21 69 66 20 5b 65 63 68  RCE)....!if [ech
2cd0: 6f 20 5f 54 4b 44 49 52 20 3d 20 5c 3e 20 6e 6d  o _TKDIR = \> nm
2ce0: 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20  akehlp.out] \.. 
2cf0: 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d    || [nmakehlp -
2d00: 4c 20 67 65 6e 65 72 69 63 5c 74 6b 2e 68 20 3e  L generic\tk.h >
2d10: 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d  > nmakehlp.out].
2d20: 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c  .!error *** Coul
2d30: 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 54 6b 20  d not locate Tk 
2d40: 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79  source directory
2d50: 2e 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c  ...!endif..!incl
2d60: 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74  ude nmakehlp.out
2d70: 0d 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20  ..TKINSTALL     
2d80: 20 3d 20 30 0d 0a 54 4b 44 49 52 20 20 20 20 20   = 0..TKDIR     
2d90: 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29       = $(_TKDIR)
2da0: 0d 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20  .._TK_H         
2db0: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e   = $(_TKDIR)\gen
2dc0: 65 72 69 63 5c 74 6b 2e 68 0d 0a 0d 0a 21 65 6e  eric\tk.h....!en
2dd0: 64 69 66 20 23 20 65 78 69 73 74 28 22 24 28 5f  dif # exist("$(_
2de0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c  INSTALLDIR)\incl
2df0: 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24  ude\tk.h") && !$
2e00: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29  (NEED_TK_SOURCE)
2e10: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 54 4b 44  ....!endif # TKD
2e20: 49 52 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 5f 54  IR....!ifndef _T
2e30: 4b 5f 48 0d 0a 4d 53 47 20 3d 5e 0d 0a 46 61 69  K_H..MSG =^..Fai
2e40: 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68  led to find tk.h
2e50: 2e 20 54 68 65 20 54 4b 44 49 52 20 6d 61 63 72  . The TKDIR macr
2e60: 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 72 65  o is set incorre
2e70: 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 73  ctly or is not s
2e80: 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 20 70  et and default p
2e90: 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e  ath does not con
2ea0: 74 61 69 6e 20 74 6b 2e 68 2e 0d 0a 21 65 72 72  tain tk.h...!err
2eb0: 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69  or $(MSG)..!endi
2ec0: 66 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 4e 45  f....!endif # NE
2ed0: 45 44 5f 54 4b 0d 0a 0d 0a 21 69 66 20 24 28 4e  ED_TK....!if $(N
2ee0: 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 20  EED_TCL_SOURCE) 
2ef0: 26 26 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29  && $(TCLINSTALL)
2f00: 0d 0a 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57  ..MSG = ^..*** W
2f10: 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74  arning: This ext
2f20: 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20  ension requires 
2f30: 74 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72  the source distr
2f40: 69 62 75 74 69 6f 6e 20 6f 66 20 54 63 6c 2e 5e  ibution of Tcl.^
2f50: 0d 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74  ..*** Please set
2f60: 20 74 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72   the TCLDIR macr
2f70: 6f 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68  o to point to th
2f80: 65 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 0d 0a  e Tcl sources...
2f90: 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21  !error $(MSG)..!
2fa0: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 4e  endif....!if $(N
2fb0: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0d 0a  EED_TK_SOURCE)..
2fc0: 21 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29  !if $(TKINSTALL)
2fd0: 0d 0a 4d 53 47 20 3d 20 5e 0d 0a 2a 2a 2a 20 57  ..MSG = ^..*** W
2fe0: 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74  arning: This ext
2ff0: 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20  ension requires 
3000: 74 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72  the source distr
3010: 69 62 75 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0d  ibution of Tk.^.
3020: 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 20  .*** Please set 
3030: 74 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20  the TKDIR macro 
3040: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20  to point to the 
3050: 54 6b 20 73 6f 75 72 63 65 73 2e 0d 0a 21 65 72  Tk sources...!er
3060: 72 6f 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64  ror $(MSG)..!end
3070: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a  if..!endif......
3080: 23 20 49 66 20 49 4e 53 54 41 4c 4c 44 49 52 20  # If INSTALLDIR 
3090: 73 65 74 20 74 6f 20 54 63 6c 20 69 6e 73 74 61  set to Tcl insta
30a0: 6c 6c 61 74 69 6f 6e 20 72 6f 6f 74 20 64 69 72  llation root dir
30b0: 20 74 68 65 6e 20 72 65 73 65 74 20 74 6f 20 74   then reset to t
30c0: 68 65 0d 0a 23 20 6c 69 62 20 64 69 72 20 66 6f  he..# lib dir fo
30d0: 72 20 69 6e 73 74 61 6c 6c 69 6e 67 20 65 78 74  r installing ext
30e0: 65 6e 73 69 6f 6e 73 0d 0a 21 69 66 20 65 78 69  ensions..!if exi
30f0: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49  st("$(_INSTALLDI
3100: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68  R)\include\tcl.h
3110: 22 29 0d 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 3d  ").._INSTALLDIR=
3120: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c  $(_INSTALLDIR)\l
3130: 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20  ib..!endif....# 
3140: 45 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f 72  END Case 2(c) or
3150: 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20   (d) - Building 
3160: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 21 65  an extension..!e
3170: 6e 64 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e  ndif # if $(DOIN
3180: 47 5f 54 43 4c 29 0d 0a 0d 0a 23 23 23 23 23 23  G_TCL)....######
3190: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
31a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
31b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
31c0: 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20 33 2e  ##########..# 3.
31d0: 20 44 65 74 65 72 6d 69 6e 65 20 63 6f 6d 70 69   Determine compi
31e0: 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 6e 64 20  ler version and 
31f0: 61 72 63 68 69 74 65 63 74 75 72 65 0d 0a 23 20  architecture..# 
3200: 49 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e 2c  In this section,
3210: 20 77 65 20 66 69 67 75 72 65 20 6f 75 74 20 74   we figure out t
3220: 68 65 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 73  he compiler vers
3230: 69 6f 6e 20 61 6e 64 20 74 68 65 0d 0a 23 20 61  ion and the..# a
3240: 72 63 68 69 74 65 63 74 75 72 65 20 66 6f 72 20  rchitecture for 
3250: 77 68 69 63 68 20 77 65 20 61 72 65 20 62 75 69  which we are bui
3260: 6c 64 69 6e 67 2e 20 54 68 69 73 20 73 65 74 73  lding. This sets
3270: 20 74 68 65 0d 0a 23 20 66 6f 6c 6c 6f 77 69 6e   the..# followin
3280: 67 20 6d 61 63 72 6f 73 3a 0d 0a 23 20 56 43 56  g macros:..# VCV
3290: 45 52 53 49 4f 4e 20 2d 20 74 68 65 20 69 6e 74  ERSION - the int
32a0: 65 72 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 76  ernal compiler v
32b0: 65 72 73 69 6f 6e 20 61 73 20 31 32 30 30 2c 20  ersion as 1200, 
32c0: 31 34 30 30 2c 20 31 39 31 30 20 65 74 63 2e 0d  1400, 1910 etc..
32d0: 0a 23 20 20 20 20 20 54 68 69 73 20 69 73 20 61  .#     This is a
32e0: 6c 73 6f 20 70 72 69 6e 74 65 64 20 62 79 20 74  lso printed by t
32f0: 68 65 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 64  he compiler in d
3300: 6f 74 74 65 64 20 66 6f 72 6d 20 31 39 2e 31 30  otted form 19.10
3310: 20 65 74 63 2e 0d 0a 23 20 56 43 56 45 52 20 2d   etc...# VCVER -
3320: 20 74 68 65 20 22 6d 61 72 6b 65 74 69 6e 67 20   the "marketing 
3330: 76 65 72 73 69 6f 6e 22 2c 20 66 6f 72 20 65 78  version", for ex
3340: 61 6d 70 6c 65 20 56 69 73 75 61 6c 20 43 2b 2b  ample Visual C++
3350: 20 36 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 0d   6 for internal.
3360: 0a 23 20 20 20 20 20 63 6f 6d 70 69 6c 65 72 20  .#     compiler 
3370: 76 65 72 73 69 6f 6e 20 31 32 30 30 2e 20 54 68  version 1200. Th
3380: 69 73 20 69 73 20 6b 65 70 74 20 6f 6e 6c 79 20  is is kept only 
3390: 66 6f 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f  for legacy reaso
33a0: 6e 73 20 61 73 20 69 74 0d 0a 23 20 20 20 20 20  ns as it..#     
33b0: 64 6f 65 73 20 6e 6f 74 20 6d 61 6b 65 20 73 65  does not make se
33c0: 6e 73 65 20 66 6f 72 20 72 65 63 65 6e 74 20 4d  nse for recent M
33d0: 69 63 72 6f 73 6f 66 74 20 63 6f 6d 70 69 6c 65  icrosoft compile
33e0: 72 73 2e 20 4f 6e 6c 79 20 75 73 65 64 20 66 6f  rs. Only used fo
33f0: 72 0d 0a 23 20 20 20 20 20 6f 75 74 70 75 74 20  r..#     output 
3400: 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 73 2e  directory names.
3410: 0d 0a 23 20 41 52 43 48 20 2d 20 73 65 74 20 74  ..# ARCH - set t
3420: 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72  o IX86, ARM64 or
3430: 20 41 4d 44 36 34 20 64 65 70 65 6e 64 69 6e 67   AMD64 depending
3440: 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 2d 62 69   on 32- or 64-bi
3450: 74 20 74 61 72 67 65 74 0d 0a 23 20 4e 41 54 49  t target..# NATI
3460: 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 74 6f  VE_ARCH - set to
3470: 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 20   IX86, ARM64 or 
3480: 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 68 6f  AMD64 for the ho
3490: 73 74 20 6d 61 63 68 69 6e 65 0d 0a 23 20 4d 41  st machine..# MA
34a0: 43 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20  CHINE - same as 
34b0: 24 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79  $(ARCH) - legacy
34c0: 0d 0a 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54  ..# _VC_MANIFEST
34d0: 5f 45 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d  _EMBED_{DLL,EXE}
34e0: 20 2d 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20   - commands for 
34f0: 65 6d 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69  embedding a mani
3500: 66 65 73 74 20 69 66 20 6e 65 65 64 65 64 0d 0a  fest if needed..
3510: 0d 0a 63 63 33 32 09 09 3d 20 24 28 43 43 29 20  ..cc32..= $(CC) 
3520: 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 66    # built-in def
3530: 61 75 6c 74 2e 0d 0a 6c 69 6e 6b 33 32 09 09 3d  ault...link32..=
3540: 20 6c 69 6e 6b 0d 0a 6c 69 62 33 32 09 09 3d 20   link..lib32..= 
3550: 6c 69 62 0d 0a 72 63 33 32 09 09 3d 20 24 28 52  lib..rc32..= $(R
3560: 43 29 20 20 20 23 20 62 75 69 6c 74 2d 69 6e 20  C)   # built-in 
3570: 64 65 66 61 75 6c 74 2e 0d 0a 0d 0a 23 2d 2d 2d  default.....#---
3580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
35a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
35b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23  -------------..#
35c0: 20 46 69 67 75 72 65 20 6f 75 74 20 74 68 65 20   Figure out the 
35d0: 63 6f 6d 70 69 6c 65 72 20 61 72 63 68 69 74 65  compiler archite
35e0: 63 74 75 72 65 20 61 6e 64 20 76 65 72 73 69 6f  cture and versio
35f0: 6e 20 62 79 20 77 72 69 74 69 6e 67 0d 0a 23 20  n by writing..# 
3600: 74 68 65 20 43 20 6d 61 63 72 6f 73 20 74 6f 20  the C macros to 
3610: 61 20 66 69 6c 65 2c 20 70 72 65 70 72 6f 63 65  a file, preproce
3620: 73 73 69 6e 67 20 74 68 65 6d 20 77 69 74 68 20  ssing them with 
3630: 74 68 65 20 43 0d 0a 23 20 70 72 65 70 72 6f 63  the C..# preproc
3640: 65 73 73 6f 72 20 61 6e 64 20 72 65 61 64 69 6e  essor and readin
3650: 67 20 62 61 63 6b 20 74 68 65 20 63 72 65 61 74  g back the creat
3660: 65 64 20 66 69 6c 65 0d 0a 0d 0a 5f 48 41 53 48  ed file...._HASH
3670: 3d 5e 23 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53  =^#.._VC_MANIFES
3680: 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0d 0a 5f 56  T_EMBED_EXE=.._V
3690: 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44  C_MANIFEST_EMBED
36a0: 5f 44 4c 4c 3d 0d 0a 56 43 56 45 52 3d 30 0d 0a  _DLL=..VCVER=0..
36b0: 21 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52  !if ![echo VCVER
36c0: 53 49 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20  SION=_MSC_VER > 
36d0: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20  vercl.x] \..    
36e0: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53  && ![echo $(_HAS
36f0: 48 29 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f  H)if defined(_M_
3700: 49 58 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78  IX86) >> vercl.x
3710: 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63  ] \..    && ![ec
3720: 68 6f 20 41 52 43 48 3d 49 58 38 36 20 3e 3e 20  ho ARCH=IX86 >> 
3730: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20  vercl.x] \..    
3740: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53  && ![echo $(_HAS
3750: 48 29 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f  H)elif defined(_
3760: 4d 5f 41 4d 44 36 34 29 20 3e 3e 20 76 65 72 63  M_AMD64) >> verc
3770: 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20 26 26 20 21  l.x] \..    && !
3780: 5b 65 63 68 6f 20 41 52 43 48 3d 41 4d 44 36 34  [echo ARCH=AMD64
3790: 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a   >> vercl.x] \..
37a0: 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28      && ![echo $(
37b0: 5f 48 41 53 48 29 65 6c 69 66 20 64 65 66 69 6e  _HASH)elif defin
37c0: 65 64 28 5f 4d 5f 41 52 4d 36 34 29 20 3e 3e 20  ed(_M_ARM64) >> 
37d0: 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20 20 20 20  vercl.x] \..    
37e0: 26 26 20 21 5b 65 63 68 6f 20 41 52 43 48 3d 41  && ![echo ARCH=A
37f0: 52 4d 36 34 20 3e 3e 20 76 65 72 63 6c 2e 78 5d  RM64 >> vercl.x]
3800: 20 5c 0d 0a 20 20 20 20 26 26 20 21 5b 65 63 68   \..    && ![ech
3810: 6f 20 24 28 5f 48 41 53 48 29 65 6e 64 69 66 20  o $(_HASH)endif 
3820: 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0d 0a 20  >> vercl.x] \.. 
3830: 20 20 20 26 26 20 21 5b 24 28 63 63 33 32 29 20     && ![$(cc32) 
3840: 2d 6e 6f 6c 6f 67 6f 20 2d 54 43 20 2d 50 20 76  -nologo -TC -P v
3850: 65 72 63 6c 2e 78 20 32 3e 4e 55 4c 5d 0d 0a 21  ercl.x 2>NUL]..!
3860: 69 6e 63 6c 75 64 65 20 76 65 72 63 6c 2e 69 0d  include vercl.i.
3870: 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e  .!if $(VCVERSION
3880: 29 20 3c 20 31 39 30 30 0d 0a 21 69 66 20 21 5b  ) < 1900..!if ![
3890: 65 63 68 6f 20 56 43 56 45 52 3d 20 5e 5c 3e 20  echo VCVER= ^\> 
38a0: 76 65 72 63 6c 2e 76 63 5d 20 5c 0d 0a 20 20 20  vercl.vc] \..   
38b0: 20 26 26 20 21 5b 73 65 74 20 2f 61 20 24 28 56   && ![set /a $(V
38c0: 43 56 45 52 53 49 4f 4e 29 20 2f 20 31 30 30 20  CVERSION) / 100 
38d0: 2d 20 36 20 3e 3e 20 76 65 72 63 6c 2e 76 63 5d  - 6 >> vercl.vc]
38e0: 0d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 63 6c  ..!include vercl
38f0: 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c  .vc..!endif..!el
3900: 73 65 0d 0a 23 20 54 68 65 20 73 69 6d 70 6c 65  se..# The simple
3910: 20 63 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f   calculation abo
3920: 76 65 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c  ve does not appl
3930: 79 20 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20  y to new Visual 
3940: 53 74 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0d  Studio releases.
3950: 0a 23 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70  .# Keep the comp
3960: 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20  iler version in 
3970: 69 74 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e  its native form.
3980: 0d 0a 56 43 56 45 52 20 3d 20 24 28 56 43 56 45  ..VCVER = $(VCVE
3990: 52 53 49 4f 4e 29 0d 0a 21 65 6e 64 69 66 0d 0a  RSION)..!endif..
39a0: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 21 5b  !endif....!if ![
39b0: 64 65 6c 20 32 3e 4e 55 4c 20 2f 71 2f 66 20 76  del 2>NUL /q/f v
39c0: 65 72 63 6c 2e 78 20 76 65 72 63 6c 2e 69 20 76  ercl.x vercl.i v
39d0: 65 72 63 6c 2e 76 63 5d 0d 0a 21 65 6e 64 69 66  ercl.vc]..!endif
39e0: 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ....#-----------
39f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3a00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3a20: 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20 4d 41 43  -----..# The MAC
3a30: 48 49 4e 45 20 6d 61 63 72 6f 20 69 73 20 75 73  HINE macro is us
3a40: 65 64 20 62 79 20 6c 65 67 61 63 79 20 6d 61 6b  ed by legacy mak
3a50: 65 66 69 6c 65 73 20 73 6f 20 73 65 74 20 69 74  efiles so set it
3a60: 20 61 73 20 77 65 6c 6c 0d 0a 21 69 66 64 65 66   as well..!ifdef
3a70: 20 4d 41 43 48 49 4e 45 0d 0a 21 69 66 20 22 24   MACHINE..!if "$
3a80: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78  (MACHINE)" == "x
3a90: 38 36 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43 48  86"..!undef MACH
3aa0: 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20 49  INE..MACHINE = I
3ab0: 58 38 36 0d 0a 21 65 6c 73 65 69 66 20 22 24 28  X86..!elseif "$(
3ac0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72  MACHINE)" == "ar
3ad0: 6d 36 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43  m64"..!undef MAC
3ae0: 48 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20  HINE..MACHINE = 
3af0: 41 52 4d 36 34 0d 0a 21 65 6c 73 65 69 66 20 22  ARM64..!elseif "
3b00: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22  $(MACHINE)" == "
3b10: 78 36 34 22 0d 0a 21 75 6e 64 65 66 20 4d 41 43  x64"..!undef MAC
3b20: 48 49 4e 45 0d 0a 4d 41 43 48 49 4e 45 20 3d 20  HINE..MACHINE = 
3b30: 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66 0d 0a 21  AMD64..!endif..!
3b40: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20  if "$(MACHINE)" 
3b50: 21 3d 20 22 24 28 41 52 43 48 29 22 0d 0a 21 65  != "$(ARCH)"..!e
3b60: 72 72 6f 72 20 53 70 65 63 69 66 69 65 64 20 4d  rror Specified M
3b70: 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 24 28 4d  ACHINE macro $(M
3b80: 41 43 48 49 4e 45 29 20 64 6f 65 73 20 6e 6f 74  ACHINE) does not
3b90: 20 6d 61 74 63 68 20 64 65 74 65 63 74 65 64 20   match detected 
3ba0: 74 61 72 67 65 74 20 61 72 63 68 69 74 65 63 74  target architect
3bb0: 75 72 65 20 24 28 41 52 43 48 29 2e 0d 0a 21 65  ure $(ARCH)...!e
3bc0: 6e 64 69 66 0d 0a 21 65 6c 73 65 0d 0a 4d 41 43  ndif..!else..MAC
3bd0: 48 49 4e 45 3d 24 28 41 52 43 48 29 0d 0a 21 65  HINE=$(ARCH)..!e
3be0: 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d  ndif....#-------
3bf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3c00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3c10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3c20: 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 54 68 65 20  --------..# The 
3c30: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46  PLATFORM_IDENTIF
3c40: 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 20  Y macro matches 
3c50: 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 75 72  the values retur
3c60: 6e 65 64 20 62 79 0d 0a 23 20 74 68 65 20 54 63  ned by..# the Tc
3c70: 6c 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e  l platform::iden
3c80: 74 69 66 79 20 63 6f 6d 6d 61 6e 64 0d 0a 21 69  tify command..!i
3c90: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d  f "$(MACHINE)" =
3ca0: 3d 20 22 41 4d 44 36 34 22 0d 0a 50 4c 41 54 46  = "AMD64"..PLATF
3cb0: 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77  ORM_IDENTIFY = w
3cc0: 69 6e 33 32 2d 78 38 36 5f 36 34 0d 0a 21 65 6c  in32-x86_64..!el
3cd0: 73 65 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29  seif "$(MACHINE)
3ce0: 22 20 3d 3d 20 22 41 52 4d 36 34 22 0d 0a 50 4c  " == "ARM64"..PL
3cf0: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20  ATFORM_IDENTIFY 
3d00: 3d 20 77 69 6e 33 32 2d 61 72 6d 0d 0a 21 65 6c  = win32-arm..!el
3d10: 73 65 0d 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45  se..PLATFORM_IDE
3d20: 4e 54 49 46 59 20 3d 20 77 69 6e 33 32 2d 69 78  NTIFY = win32-ix
3d30: 38 36 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20  86..!endif....# 
3d40: 54 68 65 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52  The MULTIPLATFOR
3d50: 4d 20 6d 61 63 72 6f 20 63 6f 6e 74 72 6f 6c 73  M macro controls
3d60: 20 77 68 65 74 68 65 72 20 62 69 6e 61 72 79 20   whether binary 
3d70: 65 78 74 65 6e 73 69 6f 6e 73 20 61 72 65 20 69  extensions are i
3d80: 6e 73 74 61 6c 6c 65 64 0d 0a 23 20 69 6e 20 70  nstalled..# in p
3d90: 6c 61 74 66 6f 72 6d 2d 73 70 65 63 69 66 69 63  latform-specific
3da0: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 20 49 6e   directories. In
3db0: 74 65 6e 64 65 64 20 74 6f 20 62 65 20 73 65 74  tended to be set
3dc0: 2f 75 73 65 64 20 62 79 20 65 78 74 65 6e 73 69  /used by extensi
3dd0: 6f 6e 73 2e 0d 0a 21 69 66 6e 64 65 66 20 4d 55  ons...!ifndef MU
3de0: 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54  LTIPLATFORM_INST
3df0: 41 4c 4c 0d 0a 4d 55 4c 54 49 50 4c 41 54 46 4f  ALL..MULTIPLATFO
3e00: 52 4d 5f 49 4e 53 54 41 4c 4c 20 3d 20 30 0d 0a  RM_INSTALL = 0..
3e10: 21 65 6e 64 69 66 0d 0a 0d 0a 23 2d 2d 2d 2d 2d  !endif....#-----
3e20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3e30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3e40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
3e50: 2d 2d 2d 2d 2d 2d 2d 0d 0a 23 20 46 69 67 75 72  -------..# Figur
3e60: 65 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a  e out the *host*
3e70: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 62 79   architecture by
3e80: 20 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 67   reading the reg
3e90: 69 73 74 72 79 0d 0a 0d 0a 21 69 66 20 21 5b 72  istry....!if ![r
3ea0: 65 67 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61  eg query HKLM\Ha
3eb0: 72 64 77 61 72 65 5c 44 65 73 63 72 69 70 74 69  rdware\Descripti
3ec0: 6f 6e 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61  on\System\Centra
3ed0: 6c 50 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20  lProcessor\0 /v 
3ee0: 49 64 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e  Identifier | fin
3ef0: 64 73 74 72 20 2f 69 20 78 38 36 5d 0d 0a 4e 41  dstr /i x86]..NA
3f00: 54 49 56 45 5f 41 52 43 48 3d 49 58 38 36 0d 0a  TIVE_ARCH=IX86..
3f10: 21 65 6c 73 65 69 66 20 21 5b 72 65 67 20 71 75  !elseif ![reg qu
3f20: 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 77 61 72  ery HKLM\Hardwar
3f30: 65 5c 44 65 73 63 72 69 70 74 69 6f 6e 5c 53 79  e\Description\Sy
3f40: 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 72 6f 63  stem\CentralProc
3f50: 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 65 6e 74  essor\0 /v Ident
3f60: 69 66 69 65 72 20 7c 20 66 69 6e 64 73 74 72 20  ifier | findstr 
3f70: 2f 69 20 41 52 4d 20 7c 20 66 69 6e 64 73 74 72  /i ARM | findstr
3f80: 20 2f 69 20 36 34 2d 62 69 74 5d 0d 0a 4e 41 54   /i 64-bit]..NAT
3f90: 49 56 45 5f 41 52 43 48 3d 41 52 4d 36 34 0d 0a  IVE_ARCH=ARM64..
3fa0: 21 65 6c 73 65 0d 0a 4e 41 54 49 56 45 5f 41 52  !else..NATIVE_AR
3fb0: 43 48 3d 41 4d 44 36 34 0d 0a 21 65 6e 64 69 66  CH=AMD64..!endif
3fc0: 0d 0a 0d 0a 23 20 53 69 6e 63 65 20 4d 53 56 43  ....# Since MSVC
3fd0: 38 20 77 65 20 6d 75 73 74 20 64 65 61 6c 20 77  8 we must deal w
3fe0: 69 74 68 20 6d 61 6e 69 66 65 73 74 20 72 65 73  ith manifest res
3ff0: 6f 75 72 63 65 73 2e 0d 0a 21 69 66 20 24 28 56  ources...!if $(V
4000: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 34 30  CVERSION) >= 140
4010: 30 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f  0.._VC_MANIFEST_
4020: 45 4d 42 45 44 5f 45 58 45 3d 69 66 20 65 78 69  EMBED_EXE=if exi
4030: 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 6d  st $@.manifest m
4040: 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66  t -nologo -manif
4050: 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20  est $@.manifest 
4060: 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 63 65 3a  -outputresource:
4070: 24 40 3b 31 0d 0a 5f 56 43 5f 4d 41 4e 49 46 45  $@;1.._VC_MANIFE
4080: 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d 69 66 20  ST_EMBED_DLL=if 
4090: 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 73  exist $@.manifes
40a0: 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61  t mt -nologo -ma
40b0: 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 65  nifest $@.manife
40c0: 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 72  st -outputresour
40d0: 63 65 3a 24 40 3b 32 0d 0a 21 65 6e 64 69 66 0d  ce:$@;2..!endif.
40e0: 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23  ...#############
40f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4100: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4110: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
4120: 23 23 23 0d 0a 23 20 34 2e 20 42 75 69 6c 64 20  ###..# 4. Build 
4130: 74 68 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f  the nmakehlp pro
4140: 67 72 61 6d 0d 0a 23 20 54 68 69 73 20 69 73 20  gram..# This is 
4150: 61 20 68 65 6c 70 65 72 20 61 70 70 20 77 65 20  a helper app we 
4160: 6e 65 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65  need to overcome
4170: 20 6e 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e   nmake's limitin
4180: 67 0d 0a 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  g..# environment
4190: 2e 20 57 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f  . We will call o
41a0: 75 74 20 74 6f 20 69 74 20 74 6f 20 67 65 74 20  ut to it to get 
41b0: 76 61 72 69 6f 75 73 20 62 69 74 73 20 6f 66 0d  various bits of.
41c0: 0a 23 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61  .# information a
41d0: 62 6f 75 74 20 73 75 70 70 6f 72 74 65 64 20 63  bout supported c
41e0: 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20  ompiler options 
41f0: 65 74 63 2e 0d 0a 23 0d 0a 23 20 54 63 6c 20 69  etc...#..# Tcl i
4200: 74 73 65 6c 66 20 77 69 6c 6c 20 61 6c 77 61 79  tself will alway
4210: 73 20 75 73 65 20 74 68 65 20 6e 6d 61 6b 65 68  s use the nmakeh
4220: 6c 70 2e 63 20 70 72 6f 67 72 61 6d 20 77 68 69  lp.c program whi
4230: 63 68 20 69 73 0d 0a 23 20 69 6e 20 69 74 73 20  ch is..# in its 
4240: 6f 77 6e 20 73 6f 75 72 63 65 2e 20 49 74 20 77  own source. It w
4250: 69 6c 6c 20 62 65 20 6b 65 70 74 20 75 70 64 61  ill be kept upda
4260: 74 65 64 20 74 68 65 72 65 2e 0d 0a 23 0d 0a 23  ted there...#..#
4270: 20 45 78 74 65 6e 73 69 6f 6e 73 20 62 75 69 6c   Extensions buil
4280: 74 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73  t against an ins
4290: 74 61 6c 6c 65 64 20 54 63 6c 20 77 69 6c 6c 20  talled Tcl will 
42a0: 75 73 65 20 74 68 65 20 69 6e 73 74 61 6c 6c 65  use the installe
42b0: 64 0d 0a 23 20 63 6f 70 79 20 6f 66 20 54 63 6c  d..# copy of Tcl
42c0: 27 73 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 69 66  's nmakehlp.c if
42d0: 20 74 68 65 72 65 20 69 73 20 6f 6e 65 20 61 6e   there is one an
42e0: 64 20 74 68 65 69 72 20 6f 77 6e 20 76 65 72 73  d their own vers
42f0: 69 6f 6e 0d 0a 23 20 6f 74 68 65 72 77 69 73 65  ion..# otherwise
4300: 2e 20 49 6e 20 74 68 65 20 6c 61 74 74 65 72 20  . In the latter 
4310: 63 61 73 65 2c 20 74 68 65 79 20 77 6f 75 6c 64  case, they would
4320: 20 61 6c 73 6f 20 62 65 20 75 73 69 6e 67 20 74   also be using t
4330: 68 65 69 72 20 6f 77 6e 0d 0a 23 20 72 75 6c 65  heir own..# rule
4340: 73 2e 76 63 2e 20 4e 6f 74 65 20 74 68 61 74 20  s.vc. Note that 
4350: 6f 6c 64 65 72 20 76 65 72 73 69 6f 6e 73 20 6f  older versions o
4360: 66 20 54 63 6c 20 64 6f 20 6e 6f 74 20 69 6e 73  f Tcl do not ins
4370: 74 61 6c 6c 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d  tall nmakehlp.c.
4380: 0a 23 20 6f 72 20 72 75 6c 65 73 2e 76 63 2e 0d  .# or rules.vc..
4390: 0a 23 0d 0a 23 20 45 78 74 65 6e 73 69 6f 6e 73  .#..# Extensions
43a0: 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 54   built against T
43b0: 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c 6c 20  cl sources will 
43c0: 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 6f 6d  use the one from
43d0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 2e   the Tcl source.
43e0: 0d 0a 23 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c  ..#..# When buil
43f0: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f  ding an extensio
4400: 6e 20 75 73 69 6e 67 20 61 20 73 75 66 66 69 63  n using a suffic
4410: 69 65 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69  iently new versi
4420: 6f 6e 20 6f 66 20 54 63 6c 2c 0d 0a 23 20 72 75  on of Tcl,..# ru
4430: 6c 65 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20  les-ext.vc will 
4440: 64 65 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43  define NMAKEHLPC
4450: 20 61 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74   appropriately t
4460: 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 0d 0a  o point to the..
4470: 23 20 63 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68  # copy of nmakeh
4480: 6c 70 2e 63 20 74 6f 20 62 65 20 75 73 65 64 2e  lp.c to be used.
4490: 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 4e 4d 41 4b  ....!ifndef NMAK
44a0: 45 48 4c 50 43 0d 0a 23 20 44 65 66 61 75 6c 74  EHLPC..# Default
44b0: 20 74 6f 20 74 68 65 20 6f 6e 65 20 69 6e 20 74   to the one in t
44c0: 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63  he current direc
44d0: 74 6f 72 79 20 28 74 68 65 20 65 78 74 65 6e 73  tory (the extens
44e0: 69 6f 6e 27 73 20 6f 77 6e 20 6e 6d 61 6b 65 68  ion's own nmakeh
44f0: 6c 70 2e 63 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43  lp.c)..NMAKEHLPC
4500: 20 3d 20 6e 6d 61 6b 65 68 6c 70 2e 63 0d 0a 0d   = nmakehlp.c...
4510: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43  .!if !$(DOING_TC
4520: 4c 29 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e 53  L)..!if $(TCLINS
4530: 54 41 4c 4c 29 0d 0a 21 69 66 20 65 78 69 73 74  TALL)..!if exist
4540: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62  ("$(_TCLDIR)\lib
4550: 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e  \nmake\nmakehlp.
4560: 63 22 29 0d 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d  c")..NMAKEHLPC =
4570: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c   $(_TCLDIR)\lib\
4580: 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63  nmake\nmakehlp.c
4590: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 20  ..!endif..!else 
45a0: 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29  # !$(TCLINSTALL)
45b0: 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f  ..!if exist("$(_
45c0: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 6b  TCLDIR)\win\nmak
45d0: 65 68 6c 70 2e 63 22 29 0d 0a 4e 4d 41 4b 45 48  ehlp.c")..NMAKEH
45e0: 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29  LPC = $(_TCLDIR)
45f0: 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0d  \win\nmakehlp.c.
4600: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20  .!endif..!endif 
4610: 23 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0d  # $(TCLINSTALL).
4620: 0a 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49  .!endif # !$(DOI
4630: 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 21 65 6e 64 69  NG_TCL)....!endi
4640: 66 20 23 20 4e 4d 41 4b 45 48 4c 50 43 0d 0a 0d  f # NMAKEHLPC...
4650: 0a 23 20 57 65 20 61 6c 77 61 79 73 20 62 75 69  .# We always bui
4660: 6c 64 20 6e 6d 61 6b 65 68 6c 70 20 65 76 65 6e  ld nmakehlp even
4670: 20 69 66 20 69 74 20 65 78 69 73 74 73 20 73 69   if it exists si
4680: 6e 63 65 20 77 65 20 64 6f 20 6e 6f 74 20 6b 6e  nce we do not kn
4690: 6f 77 0d 0a 23 20 77 68 61 74 20 73 6f 75 72 63  ow..# what sourc
46a0: 65 20 69 74 20 77 61 73 20 62 75 69 6c 74 20 66  e it was built f
46b0: 72 6f 6d 2e 0d 0a 21 69 66 20 22 24 28 4d 41 43  rom...!if "$(MAC
46c0: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22  HINE)" == "IX86"
46d0: 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22   || "$(MACHINE)"
46e0: 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52   == "$(NATIVE_AR
46f0: 43 48 29 22 0d 0a 21 69 66 20 5b 24 28 63 63 33  CH)"..!if [$(cc3
4700: 32 29 20 2d 6e 6f 6c 6f 67 6f 20 22 24 28 4e 4d  2) -nologo "$(NM
4710: 41 4b 45 48 4c 50 43 29 22 20 2d 6c 69 6e 6b 20  AKEHLPC)" -link 
4720: 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f  -subsystem:conso
4730: 6c 65 20 3e 20 6e 75 6c 5d 0d 0a 21 65 6e 64 69  le > nul]..!endi
4740: 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20 5b 63  f..!else..!if [c
4750: 6f 70 79 20 24 28 4e 4d 41 4b 45 48 4c 50 43 3a  opy $(NMAKEHLPC:
4760: 6e 6d 61 6b 65 68 6c 70 2e 63 3d 78 38 36 5f 36  nmakehlp.c=x86_6
4770: 34 2d 77 36 34 2d 6d 69 6e 67 77 33 32 2d 6e 6d  4-w64-mingw32-nm
4780: 61 6b 65 68 6c 70 2e 65 78 65 29 20 6e 6d 61 6b  akehlp.exe) nmak
4790: 65 68 6c 70 2e 65 78 65 20 3e 4e 55 4c 5d 0d 0a  ehlp.exe >NUL]..
47a0: 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a  !endif..!endif..
47b0: 0d 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ..##############
47c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
47d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
47e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
47f0: 23 23 0d 0a 23 20 35 2e 20 54 65 73 74 20 66 6f  ##..# 5. Test fo
4800: 72 20 63 6f 6d 70 69 6c 65 72 20 66 65 61 74 75  r compiler featu
4810: 72 65 73 0d 0a 23 20 56 69 73 75 61 6c 20 43 2b  res..# Visual C+
4820: 2b 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f  + compiler optio
4830: 6e 73 20 68 61 76 65 20 63 68 61 6e 67 65 64 20  ns have changed 
4840: 6f 76 65 72 20 74 68 65 20 79 65 61 72 73 2e 20  over the years. 
4850: 43 68 65 63 6b 0d 0a 23 20 77 68 69 63 68 20 6f  Check..# which o
4860: 70 74 69 6f 6e 73 20 61 72 65 20 73 75 70 70 6f  ptions are suppo
4870: 72 74 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70  rted by the comp
4880: 69 6c 65 72 20 69 6e 20 75 73 65 2e 0d 0a 23 0d  iler in use...#.
4890: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  .# The following
48a0: 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 3a   macros are set:
48b0: 0d 0a 23 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e  ..# OPTIMIZATION
48c0: 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c 65 72  S - the compiler
48d0: 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 73 65   flags to be use
48e0: 64 20 66 6f 72 20 6f 70 74 69 6d 69 7a 65 64 20  d for optimized 
48f0: 62 75 69 6c 64 73 0d 0a 23 20 44 45 42 55 47 46  builds..# DEBUGF
4900: 4c 41 47 53 20 2d 20 74 68 65 20 63 6f 6d 70 69  LAGS - the compi
4910: 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20  ler flags to be 
4920: 75 73 65 64 20 66 6f 72 20 64 65 62 75 67 20 62  used for debug b
4930: 75 69 6c 64 73 0d 0a 23 20 4c 49 4e 4b 45 52 46  uilds..# LINKERF
4940: 4c 41 47 53 20 2d 20 46 6c 61 67 73 20 70 61 73  LAGS - Flags pas
4950: 73 65 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b 65  sed to the linke
4960: 72 0d 0a 23 0d 0a 23 20 4e 6f 74 65 20 74 68 61  r..#..# Note tha
4970: 74 20 74 68 65 73 65 20 61 72 65 20 74 68 65 20  t these are the 
4980: 63 6f 6d 70 69 6c 65 72 20 73 65 74 74 69 6e 67  compiler setting
4990: 73 20 2a 61 76 61 69 6c 61 62 6c 65 2a 2c 20 6e  s *available*, n
49a0: 6f 74 20 74 68 6f 73 65 0d 0a 23 20 74 68 61 74  ot those..# that
49b0: 20 77 69 6c 6c 20 62 65 20 2a 75 73 65 64 2a 2e   will be *used*.
49c0: 20 54 68 65 20 6c 61 74 74 65 72 20 64 65 70 65   The latter depe
49d0: 6e 64 73 20 6f 6e 20 74 68 65 20 4f 50 54 53 20  nds on the OPTS 
49e0: 6d 61 63 72 6f 20 73 65 74 74 69 6e 67 73 0d 0a  macro settings..
49f0: 23 20 77 68 69 63 68 20 77 65 20 68 61 76 65 20  # which we have 
4a00: 6e 6f 74 20 79 65 74 20 70 61 72 73 65 64 2e 0d  not yet parsed..
4a10: 0a 23 0d 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 20  .#..# Also note 
4a20: 74 68 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 65  that some of the
4a30: 20 66 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d 49   flags in OPTIMI
4a40: 5a 41 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 20  ZATIONS are not 
4a50: 72 65 61 6c 6c 79 0d 0a 23 20 72 65 6c 61 74 65  really..# relate
4a60: 64 20 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f  d to optimizatio
4a70: 6e 2e 20 54 68 65 79 20 61 72 65 20 70 6c 61 63  n. They are plac
4a80: 65 64 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f  ed there only fo
4a90: 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73  r legacy reasons
4aa0: 0d 0a 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65  ..# as some exte
4ab0: 6e 73 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68  nsions expect th
4ac0: 65 6d 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65  em to be include
4ad0: 64 20 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e  d in that macro.
4ae0: 0d 0a 0d 0a 23 20 2d 4f 70 20 69 6d 70 72 6f 76  ....# -Op improv
4af0: 65 73 20 66 6c 6f 61 74 20 63 6f 6e 73 69 73 74  es float consist
4b00: 65 6e 63 79 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20  ency. Note only 
4b10: 6e 65 65 64 65 64 20 66 6f 72 20 6f 6c 64 65 72  needed for older
4b20: 20 63 6f 6d 70 69 6c 65 72 73 0d 0a 23 20 4e 65   compilers..# Ne
4b30: 77 65 72 20 63 6f 6d 70 69 6c 65 72 73 20 64 6f  wer compilers do
4b40: 20 6e 6f 74 20 6e 65 65 64 20 6f 72 20 73 75 70   not need or sup
4b50: 70 6f 72 74 20 74 68 69 73 20 6f 70 74 69 6f 6e  port this option
4b60: 2e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70  ...!if [nmakehlp
4b70: 20 2d 63 20 2d 4f 70 5d 0d 0a 46 50 4f 50 54 53   -c -Op]..FPOPTS
4b80: 20 20 3d 20 2d 4f 70 0d 0a 21 65 6e 64 69 66 0d    = -Op..!endif.
4b90: 0a 0d 0a 23 20 53 74 72 69 63 74 20 66 6c 6f 61  ...# Strict floa
4ba0: 74 69 6e 67 20 70 6f 69 6e 74 20 73 65 6d 61 6e  ting point seman
4bb0: 74 69 63 73 20 2d 20 70 72 65 73 65 6e 74 20 69  tics - present i
4bc0: 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c 65 72  n newer compiler
4bd0: 73 20 69 6e 20 6c 69 65 75 20 6f 66 20 2d 4f 70  s in lieu of -Op
4be0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20  ..!if [nmakehlp 
4bf0: 2d 63 20 2d 66 70 3a 73 74 72 69 63 74 5d 0d 0a  -c -fp:strict]..
4c00: 46 50 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50  FPOPTS  = $(FPOP
4c10: 54 53 29 20 2d 66 70 3a 73 74 72 69 63 74 0d 0a  TS) -fp:strict..
4c20: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 22 24  !endif....!if "$
4c30: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49  (MACHINE)" == "I
4c40: 58 38 36 22 0d 0a 23 23 23 20 74 65 73 74 20 66  X86"..### test f
4c50: 6f 72 20 70 65 6e 74 69 75 6d 20 65 72 72 61 74  or pentium errat
4c60: 61 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70  a..!if [nmakehlp
4c70: 20 2d 63 20 2d 51 49 30 66 5d 0d 0a 21 6d 65 73   -c -QI0f]..!mes
4c80: 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65  sage *** Compile
4c90: 72 20 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30  r has 'Pentium 0
4ca0: 78 30 66 20 66 69 78 27 0d 0a 46 50 4f 50 54 53  x0f fix'..FPOPTS
4cb0: 20 20 3d 20 24 28 46 50 4f 50 54 53 29 20 2d 51    = $(FPOPTS) -Q
4cc0: 49 30 66 0d 0a 21 65 6c 73 65 0d 0a 21 6d 65 73  I0f..!else..!mes
4cd0: 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65  sage *** Compile
4ce0: 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20  r does not have 
4cf0: 27 50 65 6e 74 69 75 6d 20 30 78 30 66 20 66 69  'Pentium 0x0f fi
4d00: 78 27 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64  x'..!endif..!end
4d10: 69 66 0d 0a 0d 0a 23 23 23 20 74 65 73 74 20 66  if....### test f
4d20: 6f 72 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73  or optimizations
4d30: 0d 0a 23 20 2f 4f 32 20 6f 70 74 69 6d 69 7a 61  ..# /O2 optimiza
4d40: 74 69 6f 6e 20 69 6e 63 6c 75 64 65 73 20 2f 4f  tion includes /O
4d50: 67 20 2f 4f 69 20 2f 4f 74 20 2f 4f 79 20 2f 4f  g /Oi /Ot /Oy /O
4d60: 62 32 20 2f 47 73 20 2f 47 46 20 2f 47 79 20 61  b2 /Gs /GF /Gy a
4d70: 73 20 70 65 72 0d 0a 23 20 64 6f 63 75 6d 65 6e  s per..# documen
4d80: 74 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 77 65 20  tation. Note we 
4d90: 64 6f 20 4e 4f 54 20 77 61 6e 74 20 2f 47 73 20  do NOT want /Gs 
4da0: 61 73 20 74 68 61 74 20 69 6e 73 65 72 74 73 20  as that inserts 
4db0: 61 20 5f 63 68 6b 73 74 6b 0d 0a 23 20 73 74 61  a _chkstk..# sta
4dc0: 63 6b 20 70 72 6f 62 65 20 61 74 20 2a 65 76 65  ck probe at *eve
4dd0: 72 79 2a 20 66 75 6e 63 74 69 6f 6e 20 65 6e 74  ry* function ent
4de0: 72 79 2c 20 6e 6f 74 20 6a 75 73 74 20 74 68 6f  ry, not just tho
4df0: 73 65 20 77 69 74 68 20 6d 6f 72 65 20 74 68 61  se with more tha
4e00: 6e 0d 0a 23 20 61 20 70 61 67 65 20 6f 66 20 73  n..# a page of s
4e10: 74 61 63 6b 20 61 6c 6c 6f 63 61 74 69 6f 6e 20  tack allocation 
4e20: 72 65 73 75 6c 74 69 6e 67 20 69 6e 20 61 20 70  resulting in a p
4e30: 65 72 66 6f 72 6d 61 6e 63 65 20 68 69 74 2e 20  erformance hit. 
4e40: 20 48 6f 77 65 76 65 72 2c 0d 0a 23 20 2f 4f 32   However,..# /O2
4e50: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69   documentation i
4e60: 73 20 6d 69 73 6c 65 61 64 69 6e 67 20 61 73 20  s misleading as 
4e70: 69 74 73 20 73 74 61 63 6b 20 70 72 6f 62 65 73  its stack probes
4e80: 20 61 72 65 20 73 69 6d 70 6c 79 20 74 68 65 0d   are simply the.
4e90: 0a 23 20 64 65 66 61 75 6c 74 20 70 61 67 65 20  .# default page 
4ea0: 73 69 7a 65 20 6c 6f 63 61 6c 73 20 61 6c 6c 6f  size locals allo
4eb0: 63 61 74 69 6f 6e 20 70 72 6f 62 65 73 20 61 6e  cation probes an
4ec0: 64 20 6e 6f 74 20 77 68 61 74 20 69 73 20 69 6d  d not what is im
4ed0: 70 6c 69 65 64 0d 0a 23 20 62 79 20 61 6e 20 65  plied..# by an e
4ee0: 78 70 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 69  xplicit /Gs opti
4ef0: 6f 6e 2e 0d 0a 0d 0a 4f 50 54 49 4d 49 5a 41 54  on.....OPTIMIZAT
4f00: 49 4f 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29  IONS = $(FPOPTS)
4f10: 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c  ....!if [nmakehl
4f20: 70 20 2d 63 20 2d 4f 32 5d 0d 0a 4f 50 54 49 4d  p -c -O2]..OPTIM
4f30: 49 5a 49 4e 47 20 3d 20 31 0d 0a 4f 50 54 49 4d  IZING = 1..OPTIM
4f40: 49 5a 41 54 49 4f 4e 53 20 20 20 3d 20 24 28 4f  IZATIONS   = $(O
4f50: 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d 4f  PTIMIZATIONS) -O
4f60: 32 0d 0a 21 65 6c 73 65 0d 0a 23 20 4c 65 67 61  2..!else..# Lega
4f70: 63 79 2c 20 72 65 61 6c 6c 79 2e 20 41 6c 6c 20  cy, really. All 
4f80: 6d 6f 64 65 72 6e 20 63 6f 6d 70 69 6c 65 72 73  modern compilers
4f90: 20 73 75 70 70 6f 72 74 20 74 68 69 73 0d 0a 21   support this..!
4fa0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70  message *** Comp
4fb0: 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 68 61  iler does not ha
4fc0: 76 65 20 27 4f 70 74 69 6d 69 7a 61 74 69 6f 6e  ve 'Optimization
4fd0: 73 27 0d 0a 4f 50 54 49 4d 49 5a 49 4e 47 20 3d  s'..OPTIMIZING =
4fe0: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20   0..!endif....# 
4ff0: 43 68 65 63 6b 73 20 66 6f 72 20 62 75 66 66 65  Checks for buffe
5000: 72 20 6f 76 65 72 66 6c 6f 77 73 20 69 6e 20 6c  r overflows in l
5010: 6f 63 61 6c 20 61 72 72 61 79 73 0d 0a 21 69 66  ocal arrays..!if
5020: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47   [nmakehlp -c -G
5030: 53 5d 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e  S]..OPTIMIZATION
5040: 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54  S  = $(OPTIMIZAT
5050: 49 4f 4e 53 29 20 2d 47 53 0d 0a 21 65 6e 64 69  IONS) -GS..!endi
5060: 66 0d 0a 0d 0a 23 20 4c 69 6e 6b 20 74 69 6d 65  f....# Link time
5070: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e   optimization. N
5080: 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 6f 70  ote that this op
5090: 74 69 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c  tion (potentiall
50a0: 79 29 20 6d 61 6b 65 73 0d 0a 23 20 67 65 6e 65  y) makes..# gene
50b0: 72 61 74 65 64 20 6c 69 62 72 61 72 69 65 73 20  rated libraries 
50c0: 6f 6e 6c 79 20 75 73 61 62 6c 65 20 62 79 20 74  only usable by t
50d0: 68 65 20 73 70 65 63 69 66 69 63 20 56 43 2b 2b  he specific VC++
50e0: 20 76 65 72 73 69 6f 6e 20 74 68 61 74 0d 0a 23   version that..#
50f0: 20 63 72 65 61 74 65 64 20 69 74 2e 20 52 65 71   created it. Req
5100: 75 69 72 65 73 20 2f 4c 54 43 47 20 6c 69 6e 6b  uires /LTCG link
5110: 65 72 20 6f 70 74 69 6f 6e 0d 0a 21 69 66 20 5b  er option..!if [
5120: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d  nmakehlp -c -GL]
5130: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20  ..OPTIMIZATIONS 
5140: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f   = $(OPTIMIZATIO
5150: 4e 53 29 20 2d 47 4c 0d 0a 43 43 5f 47 4c 5f 4f  NS) -GL..CC_GL_O
5160: 50 54 5f 45 4e 41 42 4c 45 44 20 3d 20 31 0d 0a  PT_ENABLED = 1..
5170: 21 65 6c 73 65 0d 0a 23 20 49 6e 20 6e 65 77 65  !else..# In newe
5180: 72 20 63 6f 6d 70 69 6c 65 72 73 20 2d 47 4c 20  r compilers -GL 
5190: 61 6e 64 20 2d 59 58 20 61 72 65 20 69 6e 63 6f  and -YX are inco
51a0: 6d 70 61 74 69 62 6c 65 2e 0d 0a 21 69 66 20 5b  mpatible...!if [
51b0: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 59 58 5d  nmakehlp -c -YX]
51c0: 0d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20  ..OPTIMIZATIONS 
51d0: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f   = $(OPTIMIZATIO
51e0: 4e 53 29 20 2d 59 58 0d 0a 21 65 6e 64 69 66 0d  NS) -YX..!endif.
51f0: 0a 21 65 6e 64 69 66 20 23 20 5b 6e 6d 61 6b 65  .!endif # [nmake
5200: 68 6c 70 20 2d 63 20 2d 47 4c 5d 0d 0a 0d 0a 44  hlp -c -GL]....D
5210: 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20  EBUGFLAGS     = 
5220: 24 28 46 50 4f 50 54 53 29 0d 0a 0d 0a 23 20 52  $(FPOPTS)....# R
5230: 75 6e 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68  un time error ch
5240: 65 63 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61  ecks. Not availa
5250: 62 6c 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20  ble or valid in 
5260: 61 20 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64  a release, non-d
5270: 65 62 75 67 20 62 75 69 6c 64 0d 0a 23 20 52 54  ebug build..# RT
5280: 43 20 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20  C is for modern 
5290: 63 6f 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69  compilers, -GZ i
52a0: 73 20 6c 65 67 61 63 79 0d 0a 21 69 66 20 5b 6e  s legacy..!if [n
52b0: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 52 54 43 31  makehlp -c -RTC1
52c0: 5d 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20  ]..DEBUGFLAGS   
52d0: 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53    = $(DEBUGFLAGS
52e0: 29 20 2d 52 54 43 31 0d 0a 21 65 6c 73 65 69 66  ) -RTC1..!elseif
52f0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47   [nmakehlp -c -G
5300: 5a 5d 0d 0a 44 45 42 55 47 46 4c 41 47 53 20 20  Z]..DEBUGFLAGS  
5310: 20 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47     = $(DEBUGFLAG
5320: 53 29 20 2d 47 5a 0d 0a 21 65 6e 64 69 66 0d 0a  S) -GZ..!endif..
5330: 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..#-------------
5340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
5350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
5360: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
5370: 2d 2d 2d 0d 0a 23 20 4c 69 6e 6b 65 72 20 66 6c  ---..# Linker fl
5380: 61 67 73 0d 0a 0d 0a 23 20 4c 49 4e 4b 45 52 5f  ags....# LINKER_
5390: 54 45 53 54 46 4c 41 47 53 20 61 72 65 20 66 6f  TESTFLAGS are fo
53a0: 72 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 77  r internal use w
53b0: 68 65 6e 20 77 65 20 63 61 6c 6c 20 6e 6d 61 6b  hen we call nmak
53c0: 65 68 6c 70 20 74 6f 20 74 65 73 74 0d 0a 23 20  ehlp to test..# 
53d0: 69 66 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 75  if the linker su
53e0: 70 70 6f 72 74 73 20 61 20 73 70 65 63 69 66 69  pports a specifi
53f0: 63 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f 75  c option. Withou
5400: 74 20 74 68 65 73 65 20 66 6c 61 67 73 20 6c 69  t these flags li
5410: 6e 6b 20 77 69 6c 6c 0d 0a 23 20 72 65 74 75 72  nk will..# retur
5420: 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72  n "LNK1561: entr
5430: 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 62 65 20  y point must be 
5440: 64 65 66 69 6e 65 64 22 20 65 72 72 6f 72 20 63  defined" error c
5450: 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53  ompiling from VS
5460: 2d 49 44 45 3a 0d 0a 23 20 54 68 65 79 20 61 72  -IDE:..# They ar
5470: 65 20 6e 6f 74 20 70 61 73 73 65 64 20 74 68 72  e not passed thr
5480: 6f 75 67 68 20 74 6f 20 74 68 65 20 61 63 74 75  ough to the actu
5490: 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 2f  al application /
54a0: 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 23 20 6c 69   extension..# li
54b0: 6e 6b 20 72 75 6c 65 73 2e 0d 0a 21 69 66 6e 64  nk rules...!ifnd
54c0: 65 66 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c  ef LINKER_TESTFL
54d0: 41 47 53 0d 0a 4c 49 4e 4b 45 52 5f 54 45 53 54  AGS..LINKER_TEST
54e0: 46 4c 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f  FLAGS = /DLL /NO
54f0: 45 4e 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65  ENTRY /OUT:nmake
5500: 68 6c 70 2e 6f 75 74 0d 0a 21 65 6e 64 69 66 0d  hlp.out..!endif.
5510: 0a 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 20  ...LINKERFLAGS  
5520: 20 20 20 3d 0d 0a 0d 0a 23 20 49 66 20 63 6f 6d     =....# If com
5530: 70 69 6c 65 72 20 68 61 73 20 65 6e 61 62 6c 65  piler has enable
5540: 64 20 6c 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69  d link time opti
5550: 6d 69 7a 61 74 69 6f 6e 2c 20 6c 69 6e 6b 65 72  mization, linker
5560: 20 6d 75 73 74 20 74 6f 6f 20 77 69 74 68 20 2d   must too with -
5570: 6c 74 63 67 0d 0a 21 69 66 64 65 66 20 43 43 5f  ltcg..!ifdef CC_
5580: 47 4c 5f 4f 50 54 5f 45 4e 41 42 4c 45 44 0d 0a  GL_OPT_ENABLED..
5590: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c  !if [nmakehlp -l
55a0: 20 2d 6c 74 63 67 20 24 28 4c 49 4e 4b 45 52 5f   -ltcg $(LINKER_
55b0: 54 45 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e  TESTFLAGS)]..LIN
55c0: 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d 20 24  KERFLAGS     = $
55d0: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6c  (LINKERFLAGS) -l
55e0: 74 63 67 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e  tcg..!endif..!en
55f0: 64 69 66 0d 0a 0d 0a 0d 0a 23 23 23 23 23 23 23  dif......#######
5600: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
5610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
5620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
5630: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 36 2e 20  #########..# 6. 
5640: 45 78 74 72 61 63 74 20 76 61 72 69 6f 75 73 20  Extract various 
5650: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20  version numbers 
5660: 66 72 6f 6d 20 68 65 61 64 65 72 73 0d 0a 23 20  from headers..# 
5670: 46 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20  For Tcl and Tk, 
5680: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20  version numbers 
5690: 61 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72  are extracted fr
56a0: 6f 6d 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e  om tcl.h and tk.
56b0: 68 0d 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c  h..# respectivel
56c0: 79 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e  y. For extension
56d0: 73 2c 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20  s, versions are 
56e0: 65 78 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74  extracted from t
56f0: 68 65 0d 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e  he..# configure.
5700: 69 6e 20 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e  in or configure.
5710: 61 63 20 66 72 6f 6d 20 74 68 65 20 54 45 41 20  ac from the TEA 
5720: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 66  configuration if
5730: 20 69 74 0d 0a 23 20 65 78 69 73 74 73 2c 20 61   it..# exists, a
5740: 6e 64 20 75 6e 73 65 74 20 6f 74 68 65 72 77 69  nd unset otherwi
5750: 73 65 2e 0d 0a 23 20 53 65 74 73 20 74 68 65 20  se...# Sets the 
5760: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73  following macros
5770: 3a 0d 0a 23 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56  :..# TCL_MAJOR_V
5780: 45 52 53 49 4f 4e 0d 0a 23 20 54 43 4c 5f 4d 49  ERSION..# TCL_MI
5790: 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54  NOR_VERSION..# T
57a0: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41  CL_RELEASE_SERIA
57b0: 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c  L..# TCL_PATCH_L
57c0: 45 56 45 4c 0d 0a 23 20 54 43 4c 5f 50 41 54 43  EVEL..# TCL_PATC
57d0: 48 5f 4c 45 54 54 45 52 0d 0a 23 20 54 43 4c 5f  H_LETTER..# TCL_
57e0: 56 45 52 53 49 4f 4e 0d 0a 23 20 54 4b 5f 4d 41  VERSION..# TK_MA
57f0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 0d 0a 23 20 54  JOR_VERSION..# T
5800: 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0d  K_MINOR_VERSION.
5810: 0a 23 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45  .# TK_RELEASE_SE
5820: 52 49 41 4c 0d 0a 23 20 54 4b 5f 50 41 54 43 48  RIAL..# TK_PATCH
5830: 5f 4c 45 56 45 4c 0d 0a 23 20 54 4b 5f 50 41 54  _LEVEL..# TK_PAT
5840: 43 48 5f 4c 45 54 54 45 52 0d 0a 23 20 54 4b 5f  CH_LETTER..# TK_
5850: 56 45 52 53 49 4f 4e 0d 0a 23 20 44 4f 54 56 45  VERSION..# DOTVE
5860: 52 53 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28  RSION - set as (
5870: 66 6f 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35  for example) 2.5
5880: 0d 0a 23 20 56 45 52 53 49 4f 4e 20 2d 20 73 65  ..# VERSION - se
5890: 74 20 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c  t as (for exampl
58a0: 65 20 32 35 29 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d  e 25)..#--------
58b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
58c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
58d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
58e0: 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 21 69 66 20 5b 65  ------....!if [e
58f0: 63 68 6f 20 52 45 4d 20 3d 20 54 68 69 73 20 66  cho REM = This f
5900: 69 6c 65 20 69 73 20 67 65 6e 65 72 61 74 65 64  ile is generated
5910: 20 66 72 6f 6d 20 72 75 6c 65 73 2e 76 63 20 3e   from rules.vc >
5920: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21   versions.vc]..!
5930: 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f  endif..!if [echo
5940: 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49   TCL_MAJOR_VERSI
5950: 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e  ON = \>> version
5960: 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b  s.vc] \..   && [
5970: 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f  nmakehlp -V "$(_
5980: 54 43 4c 5f 48 29 22 20 22 64 65 66 69 6e 65 20  TCL_H)" "define 
5990: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f  TCL_MAJOR_VERSIO
59a0: 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76  N" >> versions.v
59b0: 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20  c]..!endif..!if 
59c0: 5b 65 63 68 6f 20 54 43 4c 5f 4d 49 4e 4f 52 5f  [echo TCL_MINOR_
59d0: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65  VERSION = \>> ve
59e0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20  rsions.vc] \..  
59f0: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56   && [nmakehlp -V
5a00: 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c   "$(_TCL_H)" TCL
5a10: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3e  _MINOR_VERSION >
5a20: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a  > versions.vc]..
5a30: 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68  !endif..!if [ech
5a40: 6f 20 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45  o TCL_RELEASE_SE
5a50: 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 69  RIAL = \>> versi
5a60: 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 26  ons.vc] \..   &&
5a70: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24   [nmakehlp -V "$
5a80: 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f 52 45  (_TCL_H)" TCL_RE
5a90: 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e 20  LEASE_SERIAL >> 
5aa0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65  versions.vc]..!e
5ab0: 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20  ndif..!if [echo 
5ac0: 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20  TCL_PATCH_LEVEL 
5ad0: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76  = \>> versions.v
5ae0: 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61  c] \..   && [nma
5af0: 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c  kehlp -V "$(_TCL
5b00: 5f 48 29 22 20 54 43 4c 5f 50 41 54 43 48 5f 4c  _H)" TCL_PATCH_L
5b10: 45 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73  EVEL >> versions
5b20: 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a  .vc]..!endif....
5b30: 21 69 66 20 64 65 66 69 6e 65 64 28 5f 54 4b 5f  !if defined(_TK_
5b40: 48 29 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b  H)..!if [echo TK
5b50: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 3d  _MAJOR_VERSION =
5b60: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63   \>> versions.vc
5b70: 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b  ] \..   && [nmak
5b80: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29  ehlp -V $(_TK_H)
5b90: 20 22 64 65 66 69 6e 65 20 54 4b 5f 4d 41 4a 4f   "define TK_MAJO
5ba0: 52 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65  R_VERSION" >> ve
5bb0: 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64  rsions.vc]..!end
5bc0: 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b  if..!if [echo TK
5bd0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d  _MINOR_VERSION =
5be0: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63   \>> versions.vc
5bf0: 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b  ] \..   && [nmak
5c00: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29  ehlp -V $(_TK_H)
5c10: 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f   TK_MINOR_VERSIO
5c20: 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63  N >> versions.vc
5c30: 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b  ]..!endif..!if [
5c40: 65 63 68 6f 20 54 4b 5f 52 45 4c 45 41 53 45 5f  echo TK_RELEASE_
5c50: 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 72  SERIAL = \>> ver
5c60: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20  sions.vc] \..   
5c70: 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20  && [nmakehlp -V 
5c80: 22 24 28 5f 54 4b 5f 48 29 22 20 54 4b 5f 52 45  "$(_TK_H)" TK_RE
5c90: 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e 20  LEASE_SERIAL >> 
5ca0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 65  versions.vc]..!e
5cb0: 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20  ndif..!if [echo 
5cc0: 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 3d  TK_PATCH_LEVEL =
5cd0: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63   \>> versions.vc
5ce0: 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 6e 6d 61 6b  ] \..   && [nmak
5cf0: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29  ehlp -V $(_TK_H)
5d00: 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20   TK_PATCH_LEVEL 
5d10: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d  >> versions.vc].
5d20: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20  .!endif..!endif 
5d30: 23 20 5f 54 4b 5f 48 0d 0a 0d 0a 21 69 6e 63 6c  # _TK_H....!incl
5d40: 75 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0d  ude versions.vc.
5d50: 0a 0d 0a 54 43 4c 5f 56 45 52 53 49 4f 4e 09 3d  ...TCL_VERSION.=
5d60: 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52   $(TCL_MAJOR_VER
5d70: 53 49 4f 4e 29 24 28 54 43 4c 5f 4d 49 4e 4f 52  SION)$(TCL_MINOR
5d80: 5f 56 45 52 53 49 4f 4e 29 0d 0a 54 43 4c 5f 44  _VERSION)..TCL_D
5d90: 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43  OTVERSION.= $(TC
5da0: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29  L_MAJOR_VERSION)
5db0: 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52  .$(TCL_MINOR_VER
5dc0: 53 49 4f 4e 29 0d 0a 21 69 66 20 5b 6e 6d 61 6b  SION)..!if [nmak
5dd0: 65 68 6c 70 20 2d 66 20 24 28 54 43 4c 5f 50 41  ehlp -f $(TCL_PA
5de0: 54 43 48 5f 4c 45 56 45 4c 29 20 22 61 22 5d 0d  TCH_LEVEL) "a"].
5df0: 0a 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45  .TCL_PATCH_LETTE
5e00: 52 20 3d 20 61 0d 0a 21 65 6c 73 65 69 66 20 5b  R = a..!elseif [
5e10: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 54 43  nmakehlp -f $(TC
5e20: 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 29 20 22  L_PATCH_LEVEL) "
5e30: 62 22 5d 0d 0a 54 43 4c 5f 50 41 54 43 48 5f 4c  b"]..TCL_PATCH_L
5e40: 45 54 54 45 52 20 3d 20 62 0d 0a 21 65 6c 73 65  ETTER = b..!else
5e50: 0d 0a 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54  ..TCL_PATCH_LETT
5e60: 45 52 20 3d 20 2e 0d 0a 21 65 6e 64 69 66 0d 0a  ER = ...!endif..
5e70: 0d 0a 21 69 66 20 64 65 66 69 6e 65 64 28 5f 54  ..!if defined(_T
5e80: 4b 5f 48 29 0d 0a 0d 0a 54 4b 5f 56 45 52 53 49  K_H)....TK_VERSI
5e90: 4f 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f  ON.= $(TK_MAJOR_
5ea0: 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 4d 49 4e  VERSION)$(TK_MIN
5eb0: 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 54 4b 5f  OR_VERSION)..TK_
5ec0: 44 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54  DOTVERSION.= $(T
5ed0: 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29  K_MAJOR_VERSION)
5ee0: 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53  .$(TK_MINOR_VERS
5ef0: 49 4f 4e 29 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65  ION)..!if [nmake
5f00: 68 6c 70 20 2d 66 20 24 28 54 4b 5f 50 41 54 43  hlp -f $(TK_PATC
5f10: 48 5f 4c 45 56 45 4c 29 20 22 61 22 5d 0d 0a 54  H_LEVEL) "a"]..T
5f20: 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d  K_PATCH_LETTER =
5f30: 20 61 0d 0a 21 65 6c 73 65 69 66 20 5b 6e 6d 61   a..!elseif [nma
5f40: 6b 65 68 6c 70 20 2d 66 20 24 28 54 4b 5f 50 41  kehlp -f $(TK_PA
5f50: 54 43 48 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0d  TCH_LEVEL) "b"].
5f60: 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52  .TK_PATCH_LETTER
5f70: 20 3d 20 62 0d 0a 21 65 6c 73 65 0d 0a 54 4b 5f   = b..!else..TK_
5f80: 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e  PATCH_LETTER = .
5f90: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64  ..!endif....!end
5fa0: 69 66 0d 0a 0d 0a 23 20 53 65 74 20 44 4f 54 56  if....# Set DOTV
5fb0: 45 52 53 49 4f 4e 20 61 6e 64 20 56 45 52 53 49  ERSION and VERSI
5fc0: 4f 4e 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f  ON..!if $(DOING_
5fd0: 54 43 4c 29 0d 0a 0d 0a 44 4f 54 56 45 52 53 49  TCL)....DOTVERSI
5fe0: 4f 4e 20 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52  ON = $(TCL_MAJOR
5ff0: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f  _VERSION).$(TCL_
6000: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a  MINOR_VERSION)..
6010: 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c 5f  VERSION = $(TCL_
6020: 56 45 52 53 49 4f 4e 29 0d 0a 0d 0a 21 65 6c 73  VERSION)....!els
6030: 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0d  eif $(DOING_TK).
6040: 0a 0d 0a 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20  ...DOTVERSION = 
6050: 24 28 54 4b 5f 44 4f 54 56 45 52 53 49 4f 4e 29  $(TK_DOTVERSION)
6060: 0d 0a 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b  ..VERSION = $(TK
6070: 5f 56 45 52 53 49 4f 4e 29 0d 0a 0d 0a 21 65 6c  _VERSION)....!el
6080: 73 65 20 23 20 44 6f 69 6e 67 20 61 20 6e 6f 6e  se # Doing a non
6090: 2d 54 6b 20 65 78 74 65 6e 73 69 6f 6e 0d 0a 0d  -Tk extension...
60a0: 0a 23 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b  .# If parent mak
60b0: 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65  efile has not de
60c0: 66 69 6e 65 64 20 44 4f 54 56 45 52 53 49 4f 4e  fined DOTVERSION
60d0: 2c 20 74 72 79 20 74 6f 20 67 65 74 20 69 74 20  , try to get it 
60e0: 66 72 6f 6d 20 54 45 41 0d 0a 23 20 66 69 72 73  from TEA..# firs
60f0: 74 20 66 72 6f 6d 20 61 20 63 6f 6e 66 69 67 75  t from a configu
6100: 72 65 2e 69 6e 20 66 69 6c 65 2c 20 61 6e 64 20  re.in file, and 
6110: 74 68 65 6e 20 66 72 6f 6d 20 63 6f 6e 66 69 67  then from config
6120: 75 72 65 2e 61 63 0d 0a 21 69 66 6e 64 65 66 20  ure.ac..!ifndef 
6130: 44 4f 54 56 45 52 53 49 4f 4e 0d 0a 21 69 66 20  DOTVERSION..!if 
6140: 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 49 4f 4e  [echo DOTVERSION
6150: 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 2e 76   = \> versions.v
6160: 63 5d 20 5c 0d 0a 20 20 20 7c 7c 20 5b 6e 6d 61  c] \..   || [nma
6170: 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f 54 29  kehlp -V $(ROOT)
6180: 5c 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 5e 5b  \configure.in ^[
6190: 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e 3e 20  $(PROJECT)^] >> 
61a0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21 69  versions.vc]..!i
61b0: 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 49  f [echo DOTVERSI
61c0: 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73  ON = \> versions
61d0: 2e 76 63 5d 20 5c 0d 0a 20 20 20 7c 7c 20 5b 6e  .vc] \..   || [n
61e0: 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f  makehlp -V $(ROO
61f0: 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 61 63 20  T)\configure.ac 
6200: 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e  ^[$(PROJECT)^] >
6210: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a  > versions.vc]..
6220: 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64  !error *** Could
6230: 20 6e 6f 74 20 66 69 67 75 72 65 20 6f 75 74 20   not figure out 
6240: 65 78 74 65 6e 73 69 6f 6e 20 76 65 72 73 69 6f  extension versio
6250: 6e 2e 20 50 6c 65 61 73 65 20 64 65 66 69 6e 65  n. Please define
6260: 20 44 4f 54 56 45 52 53 49 4f 4e 20 69 6e 20 70   DOTVERSION in p
6270: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 62  arent makefile b
6280: 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20  efore including 
6290: 72 75 6c 65 73 2e 76 63 2e 0d 0a 21 65 6e 64 69  rules.vc...!endi
62a0: 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c  f..!endif..!incl
62b0: 75 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0d  ude versions.vc.
62c0: 0a 21 65 6e 64 69 66 20 23 20 44 4f 54 56 45 52  .!endif # DOTVER
62d0: 53 49 4f 4e 0d 0a 56 45 52 53 49 4f 4e 20 20 20  SION..VERSION   
62e0: 20 20 20 20 20 20 3d 20 24 28 44 4f 54 56 45 52        = $(DOTVER
62f0: 53 49 4f 4e 3a 2e 3d 29 0d 0a 0d 0a 21 65 6e 64  SION:.=)....!end
6300: 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 43 4c  if # $(DOING_TCL
6310: 29 20 2e 2e 2e 20 65 74 63 2e 0d 0a 0d 0a 23 20  ) ... etc.....# 
6320: 57 69 6e 64 6f 77 73 20 52 43 20 66 69 6c 65 73  Windows RC files
6330: 20 68 61 76 65 20 33 20 76 65 72 73 69 6f 6e 20   have 3 version 
6340: 63 6f 6d 70 6f 6e 65 6e 74 73 2e 20 45 6e 73 75  components. Ensu
6350: 72 65 20 74 68 69 73 20 69 72 72 65 73 70 65 63  re this irrespec
6360: 74 69 76 65 0d 0a 23 20 6f 66 20 68 6f 77 20 6d  tive..# of how m
6370: 61 6e 79 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 74  any components t
6380: 68 65 20 70 61 63 6b 61 67 65 20 68 61 73 20 73  he package has s
6390: 70 65 63 69 66 69 65 64 2e 20 42 61 73 69 63 61  pecified. Basica
63a0: 6c 6c 79 2c 20 65 6e 73 75 72 65 0d 0a 23 20 6d  lly, ensure..# m
63b0: 69 6e 69 6d 75 6d 20 34 20 63 6f 6d 70 6f 6e 65  inimum 4 compone
63c0: 6e 74 73 20 62 79 20 61 70 70 65 6e 64 69 6e 67  nts by appending
63d0: 20 34 20 30 27 73 20 61 6e 64 20 74 68 65 6e 20   4 0's and then 
63e0: 70 69 63 6b 20 6f 75 74 20 74 68 65 20 66 69 72  pick out the fir
63f0: 73 74 20 34 2e 0d 0a 23 20 41 6c 73 6f 20 74 61  st 4...# Also ta
6400: 6b 65 20 63 61 72 65 20 6f 66 20 74 68 65 20 66  ke care of the f
6410: 61 63 74 20 74 68 61 74 20 44 4f 54 56 45 52 53  act that DOTVERS
6420: 49 4f 4e 20 6d 61 79 20 68 61 76 65 20 22 61 22  ION may have "a"
6430: 20 6f 72 20 22 62 22 20 69 6e 73 74 65 61 64 0d   or "b" instead.
6440: 0a 23 20 6f 66 20 22 2e 22 20 73 65 70 61 72 61  .# of "." separa
6450: 74 69 6e 67 20 74 68 65 20 76 65 72 73 69 6f 6e  ting the version
6460: 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e 0d 0a 44 4f   components...DO
6470: 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54  TSEPARATED=$(DOT
6480: 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 0d 0a 44 4f  VERSION:a=.)..DO
6490: 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54  TSEPARATED=$(DOT
64a0: 53 45 50 41 52 41 54 45 44 3a 62 3d 2e 29 0d 0a  SEPARATED:b=.)..
64b0: 21 69 66 20 5b 65 63 68 6f 20 52 43 43 4f 4d 4d  !if [echo RCCOMM
64c0: 41 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65  AVERSION = \> ve
64d0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20  rsions.vc] \..  
64e0: 7c 7c 20 5b 66 6f 72 20 2f 66 20 22 74 6f 6b 65  || [for /f "toke
64f0: 6e 73 3d 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 65  ns=1,2,3,4,5* de
6500: 6c 69 6d 73 3d 2e 22 20 25 61 20 69 6e 20 28 22  lims=." %a in ("
6510: 24 28 44 4f 54 53 45 50 41 52 41 54 45 44 29 2e  $(DOTSEPARATED).
6520: 30 2e 30 2e 30 2e 30 22 29 20 64 6f 20 65 63 68  0.0.0.0") do ech
6530: 6f 20 25 61 2c 25 62 2c 25 63 2c 25 64 20 3e 3e  o %a,%b,%c,%d >>
6540: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a 21   versions.vc]..!
6550: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20  error *** Could 
6560: 6e 6f 74 20 67 65 6e 65 72 61 74 65 20 52 43 43  not generate RCC
6570: 4f 4d 4d 41 56 45 52 53 49 4f 4e 20 2a 2a 2a 0d  OMMAVERSION ***.
6580: 0a 21 65 6e 64 69 66 0d 0a 21 69 6e 63 6c 75 64  .!endif..!includ
6590: 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0d 0a 0d  e versions.vc...
65a0: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  .###############
65b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
65c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
65d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
65e0: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 37 2e 20  #########..# 7. 
65f0: 50 61 72 73 65 20 74 68 65 20 4f 50 54 53 20 6d  Parse the OPTS m
6600: 61 63 72 6f 20 74 6f 20 77 6f 72 6b 20 6f 75 74  acro to work out
6610: 20 74 68 65 20 72 65 71 75 65 73 74 65 64 20 62   the requested b
6620: 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69  uild configurati
6630: 6f 6e 2e 0d 0a 23 20 42 61 73 65 64 20 6f 6e 20  on...# Based on 
6640: 74 68 69 73 2c 20 77 65 20 77 69 6c 6c 20 63 6f  this, we will co
6650: 6e 73 74 72 75 63 74 20 74 68 65 20 61 63 74 75  nstruct the actu
6660: 61 6c 20 73 77 69 74 63 68 65 73 20 74 6f 20 62  al switches to b
6670: 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 0d  e passed to the.
6680: 0a 23 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20  .# compiler and 
6690: 6c 69 6e 6b 65 72 20 75 73 69 6e 67 20 74 68 65  linker using the
66a0: 20 6d 61 63 72 6f 73 20 64 65 66 69 6e 65 64 20   macros defined 
66b0: 69 6e 20 74 68 65 20 70 72 65 76 69 6f 75 73 20  in the previous 
66c0: 73 65 63 74 69 6f 6e 2e 0d 0a 23 20 54 68 65 20  section...# The 
66d0: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73  following macros
66e0: 20 61 72 65 20 64 65 66 69 6e 65 64 20 62 79 20   are defined by 
66f0: 74 68 69 73 20 73 65 63 74 69 6f 6e 20 62 61 73  this section bas
6700: 65 64 20 6f 6e 20 4f 50 54 53 0d 0a 23 20 53 54  ed on OPTS..# ST
6710: 41 54 49 43 5f 42 55 49 4c 44 20 2d 20 30 20 2d  ATIC_BUILD - 0 -
6720: 3e 20 54 63 6c 20 69 73 20 74 6f 20 62 65 20 62  > Tcl is to be b
6730: 75 69 6c 74 20 61 73 20 61 20 73 68 61 72 65 64  uilt as a shared
6740: 20 6c 69 62 72 61 72 79 0d 0a 23 20 20 20 20 20   library..#     
6750: 20 20 20 20 20 20 20 20 20 20 20 31 20 2d 3e 20             1 -> 
6760: 62 75 69 6c 64 20 61 73 20 61 20 73 74 61 74 69  build as a stati
6770: 63 20 6c 69 62 72 61 72 79 20 61 6e 64 20 73 68  c library and sh
6780: 65 6c 6c 0d 0a 23 20 54 43 4c 5f 54 48 52 45 41  ell..# TCL_THREA
6790: 44 53 20 2d 20 6c 65 67 61 63 79 20 62 75 74 20  DS - legacy but 
67a0: 61 6c 77 61 79 73 20 31 20 6f 6e 20 57 69 6e 64  always 1 on Wind
67b0: 6f 77 73 20 73 69 6e 63 65 20 77 69 6e 73 6f 63  ows since winsoc
67c0: 6b 20 72 65 71 75 69 72 65 73 20 69 74 2e 0d 0a  k requires it...
67d0: 23 20 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 64  # DEBUG - 1 -> d
67e0: 65 62 75 67 20 62 75 69 6c 64 2c 20 30 20 2d 3e  ebug build, 0 ->
67f0: 20 72 65 6c 65 61 73 65 20 62 75 69 6c 64 73 0d   release builds.
6800: 0a 23 20 53 59 4d 42 4f 4c 53 20 2d 20 31 20 2d  .# SYMBOLS - 1 -
6810: 3e 20 67 65 6e 65 72 61 74 65 20 50 44 42 27 73  > generate PDB's
6820: 2c 20 30 20 2d 3e 20 6e 6f 20 50 44 42 27 73 0d  , 0 -> no PDB's.
6830: 0a 23 20 50 52 4f 46 49 4c 45 20 2d 20 31 20 2d  .# PROFILE - 1 -
6840: 3e 20 67 65 6e 65 72 61 74 65 20 70 72 6f 66 69  > generate profi
6850: 6c 69 6e 67 20 69 6e 66 6f 2c 20 30 20 2d 3e 20  ling info, 0 -> 
6860: 6e 6f 20 70 72 6f 66 69 6c 69 6e 67 0d 0a 23 20  no profiling..# 
6870: 50 47 4f 20 20 20 20 20 2d 20 31 20 2d 3e 20 70  PGO     - 1 -> p
6880: 72 6f 66 69 6c 65 20 62 61 73 65 64 20 6f 70 74  rofile based opt
6890: 69 6d 69 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e 20  imization, 0 -> 
68a0: 6e 6f 0d 0a 23 20 4d 53 56 43 52 54 20 20 2d 20  no..# MSVCRT  - 
68b0: 31 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 64 79 6e  1 -> link to dyn
68c0: 61 6d 69 63 20 43 20 72 75 6e 74 69 6d 65 20 65  amic C runtime e
68d0: 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e  ven when buildin
68e0: 67 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69  g static Tcl bui
68f0: 6c 64 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20  ld..#           
6900: 30 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 73 74 61  0 -> link to sta
6910: 74 69 63 20 43 20 72 75 6e 74 69 6d 65 20 66 6f  tic C runtime fo
6920: 72 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69  r static Tcl bui
6930: 6c 64 2e 0d 0a 23 20 20 20 20 20 20 20 20 20 20  ld...#          
6940: 20 44 6f 65 73 20 6e 6f 74 20 69 6d 70 61 63 74   Does not impact
6950: 20 73 68 61 72 65 64 20 54 63 6c 20 62 75 69 6c   shared Tcl buil
6960: 64 73 20 28 53 54 41 54 49 43 5f 42 55 49 4c 44  ds (STATIC_BUILD
6970: 20 3d 3d 20 30 29 0d 0a 23 20 20 20 20 20 20 20   == 0)..#       
6980: 20 20 20 20 44 65 66 61 75 6c 74 3a 20 31 20 66      Default: 1 f
6990: 6f 72 20 54 63 6c 20 38 2e 37 20 61 6e 64 20 75  or Tcl 8.7 and u
69a0: 70 2c 20 30 20 6f 74 68 65 72 77 69 73 65 2e 0d  p, 0 otherwise..
69b0: 0a 23 20 54 43 4c 5f 55 53 45 5f 53 54 41 54 49  .# TCL_USE_STATI
69c0: 43 5f 50 41 43 4b 41 47 45 53 20 2d 20 31 20 2d  C_PACKAGES - 1 -
69d0: 3e 20 73 74 61 74 69 63 61 6c 6c 79 20 6c 69 6e  > statically lin
69e0: 6b 20 74 68 65 20 72 65 67 69 73 74 72 79 20 61  k the registry a
69f0: 6e 64 20 64 64 65 20 65 78 74 65 6e 73 69 6f 6e  nd dde extension
6a00: 73 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20 69  s..#           i
6a10: 6e 20 74 68 65 20 54 63 6c 20 61 6e 64 20 57 69  n the Tcl and Wi
6a20: 73 68 20 73 68 65 6c 6c 2e 20 30 20 2d 3e 20 6b  sh shell. 0 -> k
6a30: 65 65 70 20 74 68 65 6d 20 61 73 20 73 68 61 72  eep them as shar
6a40: 65 64 20 6c 69 62 72 61 72 69 65 73 2e 20 44 6f  ed libraries. Do
6a50: 65 73 0d 0a 23 20 20 20 20 20 20 20 20 20 20 20  es..#           
6a60: 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 61 72 65  not impact share
6a70: 64 20 54 63 6c 20 62 75 69 6c 64 73 2e 20 49 6d  d Tcl builds. Im
6a80: 70 6c 69 65 64 20 62 79 20 53 54 41 54 49 43 5f  plied by STATIC_
6a90: 42 55 49 4c 44 20 73 69 6e 63 65 20 54 63 6c 20  BUILD since Tcl 
6aa0: 38 2e 37 2e 0d 0a 23 20 55 53 45 5f 54 48 52 45  8.7...# USE_THRE
6ab0: 41 44 5f 41 4c 4c 4f 43 20 2d 20 31 20 2d 3e 20  AD_ALLOC - 1 -> 
6ac0: 55 73 65 20 61 20 73 68 61 72 65 64 20 67 6c 6f  Use a shared glo
6ad0: 62 61 6c 20 66 72 65 65 20 70 6f 6f 6c 20 66 6f  bal free pool fo
6ae0: 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 2e 0d 0a 23  r allocation...#
6af0: 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20             0 -> 
6b00: 55 73 65 20 74 68 65 20 6e 6f 6e 2d 74 68 72 65  Use the non-thre
6b10: 61 64 20 61 6c 6c 6f 63 61 74 6f 72 2e 0d 0a 23  ad allocator...#
6b20: 20 55 4e 43 48 45 43 4b 45 44 20 2d 20 31 20 2d   UNCHECKED - 1 -
6b30: 3e 20 77 68 65 6e 20 64 6f 69 6e 67 20 61 20 64  > when doing a d
6b40: 65 62 75 67 20 62 75 69 6c 64 20 77 69 74 68 20  ebug build with 
6b50: 73 79 6d 62 6f 6c 73 2c 20 75 73 65 20 74 68 65  symbols, use the
6b60: 20 72 65 6c 65 61 73 65 0d 0a 23 20 20 20 20 20   release..#     
6b70: 20 20 20 20 20 20 43 20 72 75 6e 74 69 6d 65 2c        C runtime,
6b80: 20 30 20 2d 3e 20 75 73 65 20 74 68 65 20 64 65   0 -> use the de
6b90: 62 75 67 20 43 20 72 75 6e 74 69 6d 65 2e 0d 0a  bug C runtime...
6ba0: 23 20 55 53 45 5f 53 54 55 42 53 20 2d 20 31 20  # USE_STUBS - 1 
6bb0: 2d 3e 20 63 6f 6d 70 69 6c 65 20 74 6f 20 75 73  -> compile to us
6bc0: 65 20 73 74 75 62 73 20 69 6e 74 65 72 66 61 63  e stubs interfac
6bd0: 65 73 2c 20 30 20 2d 3e 20 64 69 72 65 63 74 20  es, 0 -> direct 
6be0: 6c 69 6e 6b 69 6e 67 0d 0a 23 20 43 4f 4e 46 49  linking..# CONFI
6bf0: 47 5f 43 48 45 43 4b 20 2d 20 31 20 2d 3e 20 63  G_CHECK - 1 -> c
6c00: 68 65 63 6b 20 63 75 72 72 65 6e 74 20 62 75 69  heck current bui
6c10: 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  ld configuration
6c20: 20 61 67 61 69 6e 73 74 20 54 63 6c 0d 0a 23 20   against Tcl..# 
6c30: 20 20 20 20 20 20 20 20 20 20 63 6f 6e 66 69 67            config
6c40: 75 72 61 74 69 6f 6e 20 28 69 67 6e 6f 72 65 64  uration (ignored
6c50: 20 66 6f 72 20 54 63 6c 20 69 74 73 65 6c 66 29   for Tcl itself)
6c60: 0d 0a 23 20 5f 55 53 45 5f 36 34 42 49 54 5f 54  ..# _USE_64BIT_T
6c70: 49 4d 45 5f 54 20 2d 20 66 6f 72 63 65 73 20 61  IME_T - forces a
6c80: 20 62 75 69 6c 64 20 75 73 69 6e 67 20 36 34 2d   build using 64-
6c90: 62 69 74 20 74 69 6d 65 5f 74 20 66 6f 72 20 33  bit time_t for 3
6ca0: 32 2d 62 69 74 20 62 75 69 6c 64 0d 0a 23 20 20  2-bit build..#  
6cb0: 20 20 20 20 20 20 20 20 20 28 43 52 54 20 6c 69           (CRT li
6cc0: 62 72 61 72 79 20 73 68 6f 75 6c 64 20 73 75 70  brary should sup
6cd0: 70 6f 72 74 20 74 68 69 73 2c 20 6e 6f 74 20 6e  port this, not n
6ce0: 65 65 64 65 64 20 66 6f 72 20 54 63 6c 20 39 2e  eeded for Tcl 9.
6cf0: 78 29 0d 0a 23 20 46 75 72 74 68 65 72 2c 20 4c  x)..# Further, L
6d00: 49 4e 4b 45 52 46 4c 41 47 53 20 61 72 65 20 6d  INKERFLAGS are m
6d10: 6f 64 69 66 69 65 64 20 62 61 73 65 64 20 6f 6e  odified based on
6d20: 20 61 62 6f 76 65 2e 0d 0a 0d 0a 23 20 44 65 66   above.....# Def
6d30: 61 75 6c 74 20 76 61 6c 75 65 73 20 66 6f 72 20  ault values for 
6d40: 61 6c 6c 20 74 68 65 20 61 62 6f 76 65 0d 0a 53  all the above..S
6d50: 54 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 30 0d  TATIC_BUILD.= 0.
6d60: 0a 54 43 4c 5f 54 48 52 45 41 44 53 09 3d 20 31  .TCL_THREADS.= 1
6d70: 0d 0a 44 45 42 55 47 09 09 3d 20 30 0d 0a 53 59  ..DEBUG..= 0..SY
6d80: 4d 42 4f 4c 53 09 09 3d 20 30 0d 0a 50 52 4f 46  MBOLS..= 0..PROF
6d90: 49 4c 45 09 09 3d 20 30 0d 0a 50 47 4f 09 09 3d  ILE..= 0..PGO..=
6da0: 20 30 0d 0a 4d 53 56 43 52 54 09 09 3d 20 31 0d   0..MSVCRT..= 1.
6db0: 0a 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f  .TCL_USE_STATIC_
6dc0: 50 41 43 4b 41 47 45 53 09 3d 20 30 0d 0a 55 53  PACKAGES.= 0..US
6dd0: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d  E_THREAD_ALLOC =
6de0: 20 31 0d 0a 55 4e 43 48 45 43 4b 45 44 09 3d 20   1..UNCHECKED.= 
6df0: 30 0d 0a 43 4f 4e 46 49 47 5f 43 48 45 43 4b 20  0..CONFIG_CHECK 
6e00: 20 20 20 3d 20 31 0d 0a 21 69 66 20 24 28 44 4f     = 1..!if $(DO
6e10: 49 4e 47 5f 54 43 4c 29 0d 0a 55 53 45 5f 53 54  ING_TCL)..USE_ST
6e20: 55 42 53 20 20 20 20 20 20 20 3d 20 30 0d 0a 21  UBS       = 0..!
6e30: 65 6c 73 65 0d 0a 55 53 45 5f 53 54 55 42 53 20  else..USE_STUBS 
6e40: 20 20 20 20 20 20 3d 20 31 0d 0a 21 65 6e 64 69        = 1..!endi
6e50: 66 0d 0a 0d 0a 23 20 49 66 20 4f 50 54 53 20 69  f....# If OPTS i
6e60: 73 20 6e 6f 74 20 65 6d 70 74 79 20 41 4e 44 20  s not empty AND 
6e70: 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e  does not contain
6e80: 20 22 6e 6f 6e 65 22 20 77 68 69 63 68 20 74 75   "none" which tu
6e90: 72 6e 73 20 6f 66 66 20 61 6c 6c 20 4f 50 54 53  rns off all OPTS
6ea0: 0d 0a 23 20 73 65 74 20 74 68 65 20 61 62 6f 76  ..# set the abov
6eb0: 65 20 6d 61 63 72 6f 73 20 62 61 73 65 64 20 6f  e macros based o
6ec0: 6e 20 4f 50 54 53 20 63 6f 6e 74 65 6e 74 0d 0a  n OPTS content..
6ed0: 21 69 66 20 22 24 28 4f 50 54 53 29 22 20 21 3d  !if "$(OPTS)" !=
6ee0: 20 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c   "" && ![nmakehl
6ef0: 70 20 2d 66 20 22 24 28 4f 50 54 53 29 22 20 22  p -f "$(OPTS)" "
6f00: 6e 6f 6e 65 22 5d 0d 0a 0d 0a 23 20 4f 50 54 53  none"]....# OPTS
6f10: 20 61 72 65 20 73 70 65 63 69 66 69 65 64 2c 20   are specified, 
6f20: 70 61 72 73 65 20 74 68 65 6d 0d 0a 0d 0a 21 69  parse them....!i
6f30: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24  f [nmakehlp -f $
6f40: 28 4f 50 54 53 29 20 22 73 74 61 74 69 63 22 5d  (OPTS) "static"]
6f50: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44  ..!message *** D
6f60: 6f 69 6e 67 20 73 74 61 74 69 63 0d 0a 53 54 41  oing static..STA
6f70: 54 49 43 5f 42 55 49 4c 44 09 3d 20 31 0d 0a 21  TIC_BUILD.= 1..!
6f80: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d  endif....!if [nm
6f90: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53  akehlp -f $(OPTS
6fa0: 29 20 22 6e 6f 73 74 75 62 73 22 5d 0d 0a 21 6d  ) "nostubs"]..!m
6fb0: 65 73 73 61 67 65 20 2a 2a 2a 20 4e 6f 74 20 75  essage *** Not u
6fc0: 73 69 6e 67 20 73 74 75 62 73 0d 0a 55 53 45 5f  sing stubs..USE_
6fd0: 53 54 55 42 53 09 3d 20 30 0d 0a 21 65 6e 64 69  STUBS.= 0..!endi
6fe0: 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68  f....!if [nmakeh
6ff0: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e  lp -f $(OPTS) "n
7000: 6f 6d 73 76 63 72 74 22 5d 0d 0a 21 6d 65 73 73  omsvcrt"]..!mess
7010: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6e 6f  age *** Doing no
7020: 6d 73 76 63 72 74 0d 0a 4d 53 56 43 52 54 09 09  msvcrt..MSVCRT..
7030: 3d 20 30 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 20  = 0..!else..!if 
7040: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f  [nmakehlp -f $(O
7050: 50 54 53 29 20 22 6d 73 76 63 72 74 22 5d 0d 0a  PTS) "msvcrt"]..
7060: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69  !message *** Doi
7070: 6e 67 20 6d 73 76 63 72 74 0d 0a 21 65 6c 73 65  ng msvcrt..!else
7080: 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f  ..!if $(TCL_MAJO
7090: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20  R_VERSION) == 8 
70a0: 26 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56  && $(TCL_MINOR_V
70b0: 45 52 53 49 4f 4e 29 20 3c 20 37 20 26 26 20 24  ERSION) < 7 && $
70c0: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0d 0a  (STATIC_BUILD)..
70d0: 4d 53 56 43 52 54 09 09 3d 20 30 0d 0a 21 65 6e  MSVCRT..= 0..!en
70e0: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e  dif..!endif..!en
70f0: 64 69 66 20 23 20 5b 6e 6d 61 6b 65 68 6c 70 20  dif # [nmakehlp 
7100: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73  -f $(OPTS) "noms
7110: 76 63 72 74 22 5d 0d 0a 0d 0a 21 69 66 20 5b 6e  vcrt"]....!if [n
7120: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54  makehlp -f $(OPT
7130: 53 29 20 22 73 74 61 74 69 63 70 6b 67 22 5d 20  S) "staticpkg"] 
7140: 26 26 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c  && $(STATIC_BUIL
7150: 44 29 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a  D)..!message ***
7160: 20 44 6f 69 6e 67 20 73 74 61 74 69 63 70 6b 67   Doing staticpkg
7170: 0d 0a 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43  ..TCL_USE_STATIC
7180: 5f 50 41 43 4b 41 47 45 53 09 3d 20 31 0d 0a 21  _PACKAGES.= 1..!
7190: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d  endif....!if [nm
71a0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53  akehlp -f $(OPTS
71b0: 29 20 22 6e 6f 74 68 72 65 61 64 73 22 5d 0d 0a  ) "nothreads"]..
71c0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d  !message *** Com
71d0: 70 69 6c 65 20 65 78 70 6c 69 63 69 74 6c 79 20  pile explicitly 
71e0: 66 6f 72 20 6e 6f 6e 2d 74 68 72 65 61 64 65 64  for non-threaded
71f0: 20 74 63 6c 0d 0a 54 43 4c 5f 54 48 52 45 41 44   tcl..TCL_THREAD
7200: 53 20 3d 20 30 0d 0a 55 53 45 5f 54 48 52 45 41  S = 0..USE_THREA
7210: 44 5f 41 4c 4c 4f 43 3d 20 30 0d 0a 21 65 6e 64  D_ALLOC= 0..!end
7220: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65  if....!if [nmake
7230: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22  hlp -f $(OPTS) "
7240: 74 63 6c 38 22 5d 0d 0a 21 6d 65 73 73 61 67 65  tcl8"]..!message
7250: 20 2a 2a 2a 20 42 75 69 6c 64 20 66 6f 72 20 54   *** Build for T
7260: 63 6c 38 0d 0a 54 43 4c 5f 42 55 49 4c 44 5f 46  cl8..TCL_BUILD_F
7270: 4f 52 20 3d 20 38 0d 0a 21 65 6e 64 69 66 0d 0a  OR = 8..!endif..
7280: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66  !if [nmakehlp -f
7290: 20 24 28 4f 50 54 53 29 20 22 74 6b 38 22 5d 0d   $(OPTS) "tk8"].
72a0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 42 75  .!message *** Bu
72b0: 69 6c 64 20 66 6f 72 20 54 6b 38 0d 0a 54 4b 5f  ild for Tk8..TK_
72c0: 42 55 49 4c 44 5f 46 4f 52 20 3d 20 38 0d 0a 21  BUILD_FOR = 8..!
72d0: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28 54  endif....!if $(T
72e0: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e  CL_MAJOR_VERSION
72f0: 29 20 3d 3d 20 38 0d 0a 21 69 66 20 5b 6e 6d 61  ) == 8..!if [nma
7300: 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29  kehlp -f $(OPTS)
7310: 20 22 74 69 6d 65 36 34 62 69 74 22 5d 0d 0a 21   "time64bit"]..!
7320: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 46 6f 72 63  message *** Forc
7330: 65 20 36 34 2d 62 69 74 20 74 69 6d 65 5f 74 0d  e 64-bit time_t.
7340: 0a 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45  ._USE_64BIT_TIME
7350: 5f 54 20 3d 20 31 0d 0a 21 65 6e 64 69 66 0d 0a  _T = 1..!endif..
7360: 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 59 65 73 2c  !endif....# Yes,
7370: 20 69 74 27 73 20 77 65 69 72 64 20 74 68 61 74   it's weird that
7380: 20 74 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 6f   the "symbols" o
7390: 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 44  ption controls D
73a0: 45 42 55 47 20 61 6e 64 0d 0a 23 20 74 68 65 20  EBUG and..# the 
73b0: 22 70 64 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f  "pdbs" option co
73c0: 6e 74 72 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20  ntrols SYMBOLS. 
73d0: 54 68 61 74 27 73 20 68 69 73 74 6f 72 69 63 61  That's historica
73e0: 6c 2e 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c  l...!if [nmakehl
73f0: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 79  p -f $(OPTS) "sy
7400: 6d 62 6f 6c 73 22 5d 0d 0a 21 6d 65 73 73 61 67  mbols"]..!messag
7410: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 79 6d 62  e *** Doing symb
7420: 6f 6c 73 0d 0a 44 45 42 55 47 09 09 3d 20 31 0d  ols..DEBUG..= 1.
7430: 0a 21 65 6c 73 65 0d 0a 44 45 42 55 47 09 09 3d  .!else..DEBUG..=
7440: 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69   0..!endif....!i
7450: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24  f [nmakehlp -f $
7460: 28 4f 50 54 53 29 20 22 70 64 62 73 22 5d 0d 0a  (OPTS) "pdbs"]..
7470: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69  !message *** Doi
7480: 6e 67 20 70 64 62 73 0d 0a 53 59 4d 42 4f 4c 53  ng pdbs..SYMBOLS
7490: 09 09 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 53 59  ..= 1..!else..SY
74a0: 4d 42 4f 4c 53 09 09 3d 20 30 0d 0a 21 65 6e 64  MBOLS..= 0..!end
74b0: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65  if....!if [nmake
74c0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22  hlp -f $(OPTS) "
74d0: 70 72 6f 66 69 6c 65 22 5d 0d 0a 21 6d 65 73 73  profile"]..!mess
74e0: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72  age *** Doing pr
74f0: 6f 66 69 6c 65 0d 0a 50 52 4f 46 49 4c 45 09 09  ofile..PROFILE..
7500: 3d 20 31 0d 0a 21 65 6c 73 65 0d 0a 50 52 4f 46  = 1..!else..PROF
7510: 49 4c 45 09 09 3d 20 30 0d 0a 21 65 6e 64 69 66  ILE..= 0..!endif
7520: 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c  ....!if [nmakehl
7530: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 67  p -f $(OPTS) "pg
7540: 69 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a  i"]..!message **
7550: 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20  * Doing profile 
7560: 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74  guided optimizat
7570: 69 6f 6e 20 69 6e 73 74 72 75 6d 65 6e 74 61 74  ion instrumentat
7580: 69 6f 6e 0d 0a 50 47 4f 09 09 3d 20 31 0d 0a 21  ion..PGO..= 1..!
7590: 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70  elseif [nmakehlp
75a0: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 67 6f   -f $(OPTS) "pgo
75b0: 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a  "]..!message ***
75c0: 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20 67   Doing profile g
75d0: 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69  uided optimizati
75e0: 6f 6e 0d 0a 50 47 4f 09 09 3d 20 32 0d 0a 21 65  on..PGO..= 2..!e
75f0: 6c 73 65 0d 0a 50 47 4f 09 09 3d 20 30 0d 0a 21  lse..PGO..= 0..!
7600: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d  endif....!if [nm
7610: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53  akehlp -f $(OPTS
7620: 29 20 22 6c 6f 69 6d 70 61 63 74 22 5d 0d 0a 21  ) "loimpact"]..!
7630: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 57 61 72 6e  message *** Warn
7640: 69 6e 67 3a 20 69 67 6e 6f 72 69 6e 67 20 6f 70  ing: ignoring op
7650: 74 69 6f 6e 20 22 6c 6f 69 6d 70 61 63 74 22 20  tion "loimpact" 
7660: 2d 20 64 65 70 72 65 63 61 74 65 64 20 6f 6e 20  - deprecated on 
7670: 6d 6f 64 65 72 6e 20 57 69 6e 64 6f 77 73 2e 0d  modern Windows..
7680: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 54 42 44  .!endif....# TBD
7690: 20 2d 20 73 68 6f 75 6c 64 20 67 65 74 20 72 69   - should get ri
76a0: 64 20 6f 66 20 74 68 69 73 20 6f 70 74 69 6f 6e  d of this option
76b0: 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20  ..!if [nmakehlp 
76c0: 2d 66 20 24 28 4f 50 54 53 29 20 22 74 68 72 64  -f $(OPTS) "thrd
76d0: 61 6c 6c 6f 63 22 5d 0d 0a 21 6d 65 73 73 61 67  alloc"]..!messag
76e0: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 74 68 72 64  e *** Doing thrd
76f0: 61 6c 6c 6f 63 0d 0a 55 53 45 5f 54 48 52 45 41  alloc..USE_THREA
7700: 44 5f 41 4c 4c 4f 43 20 3d 20 31 0d 0a 21 65 6e  D_ALLOC = 1..!en
7710: 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b  dif....!if [nmak
7720: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20  ehlp -f $(OPTS) 
7730: 22 74 63 6c 61 6c 6c 6f 63 22 5d 0d 0a 55 53 45  "tclalloc"]..USE
7740: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20  _THREAD_ALLOC = 
7750: 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66  0..!endif....!if
7760: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28   [nmakehlp -f $(
7770: 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b 65 64  OPTS) "unchecked
7780: 22 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a  "]..!message ***
7790: 20 44 6f 69 6e 67 20 75 6e 63 68 65 63 6b 65 64   Doing unchecked
77a0: 0d 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 31 0d  ..UNCHECKED = 1.
77b0: 0a 21 65 6c 73 65 0d 0a 55 4e 43 48 45 43 4b 45  .!else..UNCHECKE
77c0: 44 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d  D = 0..!endif...
77d0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d  .!if [nmakehlp -
77e0: 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 63 6f 6e  f $(OPTS) "nocon
77f0: 66 69 67 63 68 65 63 6b 22 5d 0d 0a 43 4f 4e 46  figcheck"]..CONF
7800: 49 47 5f 43 48 45 43 4b 20 3d 20 31 0d 0a 21 65  IG_CHECK = 1..!e
7810: 6c 73 65 0d 0a 43 4f 4e 46 49 47 5f 43 48 45 43  lse..CONFIG_CHEC
7820: 4b 20 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d  K = 0..!endif...
7830: 0a 21 65 6e 64 69 66 20 23 20 22 24 28 4f 50 54  .!endif # "$(OPT
7840: 53 29 22 20 21 3d 20 22 22 20 20 26 26 20 2e 2e  S)" != ""  && ..
7850: 2e 20 70 61 72 73 69 6e 67 20 6f 66 20 4f 50 54  . parsing of OPT
7860: 53 0d 0a 0d 0a 23 20 53 65 74 20 6c 69 6e 6b 65  S....# Set linke
7870: 72 20 66 6c 61 67 73 20 62 61 73 65 64 20 6f 6e  r flags based on
7880: 20 61 62 6f 76 65 0d 0a 0d 0a 21 69 66 20 24 28   above....!if $(
7890: 50 47 4f 29 20 3e 20 31 0d 0a 21 69 66 20 5b 6e  PGO) > 1..!if [n
78a0: 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67  makehlp -l -ltcg
78b0: 3a 70 67 6f 70 74 69 6d 69 7a 65 20 24 28 4c 49  :pgoptimize $(LI
78c0: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d  NKER_TESTFLAGS)]
78d0: 0d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20  ..LINKERFLAGS.= 
78e0: 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c  $(LINKERFLAGS:-l
78f0: 74 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 6f 70  tcg=) -ltcg:pgop
7900: 74 69 6d 69 7a 65 0d 0a 21 65 6c 73 65 0d 0a 4d  timize..!else..M
7910: 53 47 3d 5e 0d 0a 54 68 69 73 20 63 6f 6d 70 69  SG=^..This compi
7920: 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 73 75 70  ler does not sup
7930: 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 67 75 69  port profile gui
7940: 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e  ded optimization
7950: 2e 0d 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29  ...!error $(MSG)
7960: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 69  ..!endif..!elsei
7970: 66 20 24 28 50 47 4f 29 20 3e 20 30 0d 0a 21 69  f $(PGO) > 0..!i
7980: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d  f [nmakehlp -l -
7990: 6c 74 63 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e  ltcg:pginstrumen
79a0: 74 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46  t $(LINKER_TESTF
79b0: 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b 45 52 46 4c  LAGS)]..LINKERFL
79c0: 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 52 46 4c  AGS.= $(LINKERFL
79d0: 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c 74 63  AGS:-ltcg=) -ltc
79e0: 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 0d 0a  g:pginstrument..
79f0: 21 65 6c 73 65 0d 0a 4d 53 47 3d 5e 0d 0a 54 68  !else..MSG=^..Th
7a00: 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 6f 65 73  is compiler does
7a10: 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 70 72 6f   not support pro
7a20: 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69  file guided opti
7a30: 6d 69 7a 61 74 69 6f 6e 2e 0d 0a 21 65 72 72 6f  mization...!erro
7a40: 72 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 66  r $(MSG)..!endif
7a50: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23  ..!endif....####
7a60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
7a70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
7a80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
7a90: 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20  ############..# 
7aa0: 38 2e 20 50 61 72 73 65 20 74 68 65 20 53 54 41  8. Parse the STA
7ab0: 54 53 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66  TS macro to conf
7ac0: 69 67 75 72 65 20 63 6f 64 65 20 69 6e 73 74 72  igure code instr
7ad0: 75 6d 65 6e 74 61 74 69 6f 6e 0d 0a 23 20 54 68  umentation..# Th
7ae0: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72  e following macr
7af0: 6f 73 20 61 72 65 20 73 65 74 20 62 79 20 74 68  os are set by th
7b00: 69 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23 20 54  is section:..# T
7b10: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 20 2d 20 31  CL_MEM_DEBUG - 1
7b20: 20 2d 3e 20 65 6e 61 62 6c 65 73 20 6d 65 6d 6f   -> enables memo
7b30: 72 79 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 69 6e  ry allocation in
7b40: 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0d 0a 23  strumentation..#
7b50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
7b60: 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0d 0a   0 -> disables..
7b70: 23 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45  # TCL_COMPILE_DE
7b80: 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 62 6c  BUG - 1 -> enabl
7b90: 65 73 20 62 79 74 65 20 63 6f 6d 70 69 6c 65 72  es byte compiler
7ba0: 20 6c 6f 67 67 69 6e 67 0d 0a 23 20 20 20 20 20   logging..#     
7bb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
7bc0: 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0d 0a 0d  0 -> disables...
7bd0: 0a 23 20 44 65 66 61 75 6c 74 20 62 6f 74 68 20  .# Default both 
7be0: 61 72 65 20 6f 66 66 0d 0a 54 43 4c 5f 4d 45 4d  are off..TCL_MEM
7bf0: 5f 44 45 42 55 47 09 20 20 20 20 3d 20 30 0d 0a  _DEBUG.    = 0..
7c00: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55  TCL_COMPILE_DEBU
7c10: 47 20 20 20 3d 20 30 0d 0a 0d 0a 21 69 66 20 22  G   = 0....!if "
7c20: 24 28 53 54 41 54 53 29 22 20 21 3d 20 22 22 20  $(STATS)" != "" 
7c30: 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66  && ![nmakehlp -f
7c40: 20 22 24 28 53 54 41 54 53 29 22 20 22 6e 6f 6e   "$(STATS)" "non
7c50: 65 22 5d 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b  e"]....!if [nmak
7c60: 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 29  ehlp -f $(STATS)
7c70: 20 22 6d 65 6d 64 62 67 22 5d 0d 0a 21 6d 65 73   "memdbg"]..!mes
7c80: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6d  sage *** Doing m
7c90: 65 6d 64 62 67 0d 0a 54 43 4c 5f 4d 45 4d 5f 44  emdbg..TCL_MEM_D
7ca0: 45 42 55 47 09 20 20 20 20 3d 20 31 0d 0a 21 65  EBUG.    = 1..!e
7cb0: 6c 73 65 0d 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42  lse..TCL_MEM_DEB
7cc0: 55 47 09 20 20 20 20 3d 20 30 0d 0a 21 65 6e 64  UG.    = 0..!end
7cd0: 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61 6b 65  if....!if [nmake
7ce0: 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 29 20  hlp -f $(STATS) 
7cf0: 22 63 6f 6d 70 64 62 67 22 5d 0d 0a 21 6d 65 73  "compdbg"]..!mes
7d00: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 63  sage *** Doing c
7d10: 6f 6d 70 64 62 67 0d 0a 54 43 4c 5f 43 4f 4d 50  ompdbg..TCL_COMP
7d20: 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 31 0d  ILE_DEBUG   = 1.
7d30: 0a 21 65 6c 73 65 0d 0a 54 43 4c 5f 43 4f 4d 50  .!else..TCL_COMP
7d40: 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 30 0d  ILE_DEBUG   = 0.
7d50: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 69  .!endif....!endi
7d60: 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23 23 23  f....###########
7d70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
7d80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
7d90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
7da0: 23 23 23 23 23 23 23 23 23 0d 0a 23 20 39 2e 20  #########..# 9. 
7db0: 50 61 72 73 65 20 74 68 65 20 43 48 45 43 4b 53  Parse the CHECKS
7dc0: 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67   macro to config
7dd0: 75 72 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63  ure additional c
7de0: 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 0d 0a  ompiler checks..
7df0: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20  # The following 
7e00: 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 62  macros are set b
7e10: 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0d  y this section:.
7e20: 0a 23 20 57 41 52 4e 49 4e 47 53 20 2d 20 63 6f  .# WARNINGS - co
7e30: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20  mpiler switches 
7e40: 74 68 61 74 20 63 6f 6e 74 72 6f 6c 20 74 68 65  that control the
7e50: 20 77 61 72 6e 69 6e 67 73 20 6c 65 76 65 6c 0d   warnings level.
7e60: 0a 23 20 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43  .# TCL_NO_DEPREC
7e70: 41 54 45 44 20 2d 20 31 20 2d 3e 20 64 69 73 61  ATED - 1 -> disa
7e80: 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20  ble support for 
7e90: 64 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 74  deprecated funct
7ea0: 69 6f 6e 73 0d 0a 23 20 20 20 20 20 20 20 20 20  ions..#         
7eb0: 20 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e              0 ->
7ec0: 20 65 6e 61 62 6c 65 20 64 65 70 72 65 63 61 74   enable deprecat
7ed0: 65 64 20 66 75 6e 63 74 69 6f 6e 73 0d 0a 0d 0a  ed functions....
7ee0: 23 20 44 65 66 61 75 6c 74 73 20 2d 20 50 65 72  # Defaults - Per
7ef0: 6d 69 74 20 64 65 70 72 65 63 61 74 65 64 20 66  mit deprecated f
7f00: 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 77 61 72  unctions and war
7f10: 6e 69 6e 67 20 6c 65 76 65 6c 20 33 0d 0a 54 43  ning level 3..TC
7f20: 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09  L_NO_DEPRECATED.
7f30: 20 20 20 20 3d 20 30 0d 0a 57 41 52 4e 49 4e 47      = 0..WARNING
7f40: 53 09 09 20 20 20 20 3d 20 2d 57 33 0d 0a 0d 0a  S..    = -W3....
7f50: 21 69 66 20 22 24 28 43 48 45 43 4b 53 29 22 20  !if "$(CHECKS)" 
7f60: 21 3d 20 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65  != "" && ![nmake
7f70: 68 6c 70 20 2d 66 20 22 24 28 43 48 45 43 4b 53  hlp -f "$(CHECKS
7f80: 29 22 20 22 6e 6f 6e 65 22 5d 0d 0a 0d 0a 21 69  )" "none"]....!i
7f90: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24  f [nmakehlp -f $
7fa0: 28 43 48 45 43 4b 53 29 20 22 6e 6f 64 65 70 22  (CHECKS) "nodep"
7fb0: 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20  ]..!message *** 
7fc0: 44 6f 69 6e 67 20 6e 6f 64 65 70 20 63 68 65 63  Doing nodep chec
7fd0: 6b 0d 0a 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43  k..TCL_NO_DEPREC
7fe0: 41 54 45 44 09 20 20 20 20 3d 20 31 0d 0a 21 65  ATED.    = 1..!e
7ff0: 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d 61  ndif....!if [nma
8000: 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b  kehlp -f $(CHECK
8010: 53 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0d 0a  S) "fullwarn"]..
8020: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69  !message *** Doi
8030: 6e 67 20 66 75 6c 6c 20 77 61 72 6e 69 6e 67 73  ng full warnings
8040: 20 63 68 65 63 6b 0d 0a 57 41 52 4e 49 4e 47 53   check..WARNINGS
8050: 09 09 20 20 20 20 3d 20 2d 57 34 0d 0a 21 69 66  ..    = -W4..!if
8060: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 77   [nmakehlp -l -w
8070: 61 72 6e 3a 33 20 24 28 4c 49 4e 4b 45 52 5f 54  arn:3 $(LINKER_T
8080: 45 53 54 46 4c 41 47 53 29 5d 0d 0a 4c 49 4e 4b  ESTFLAGS)]..LINK
8090: 45 52 46 4c 41 47 53 09 09 20 20 20 20 3d 20 24  ERFLAGS..    = $
80a0: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 77  (LINKERFLAGS) -w
80b0: 61 72 6e 3a 33 0d 0a 21 65 6e 64 69 66 0d 0a 21  arn:3..!endif..!
80c0: 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 5b 6e 6d  endif....!if [nm
80d0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43  akehlp -f $(CHEC
80e0: 4b 53 29 20 22 36 34 62 69 74 22 5d 20 26 26 20  KS) "64bit"] && 
80f0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 57 70  [nmakehlp -c -Wp
8100: 36 34 5d 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a  64]..!message **
8110: 2a 20 44 6f 69 6e 67 20 36 34 62 69 74 20 70 6f  * Doing 64bit po
8120: 72 74 61 62 69 6c 69 74 79 20 77 61 72 6e 69 6e  rtability warnin
8130: 67 73 0d 0a 57 41 52 4e 49 4e 47 53 09 09 20 20  gs..WARNINGS..  
8140: 20 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 20    = $(WARNINGS) 
8150: 2d 57 70 36 34 0d 0a 21 65 6e 64 69 66 0d 0a 0d  -Wp64..!endif...
8160: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 0d 0a 23 23 23  .!endif......###
8170: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
8180: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
8190: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
81a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23  #############..#
81b0: 20 31 30 2e 20 43 6f 6e 73 74 72 75 63 74 20 6f   10. Construct o
81c0: 75 74 70 75 74 20 64 69 72 65 63 74 6f 72 79 20  utput directory 
81d0: 61 6e 64 20 66 69 6c 65 20 70 61 74 68 73 0d 0a  and file paths..
81e0: 23 20 46 69 67 75 72 65 2d 6f 75 74 20 68 6f 77  # Figure-out how
81f0: 20 74 6f 20 6e 61 6d 65 20 6f 75 72 20 69 6e 74   to name our int
8200: 65 72 6d 65 64 69 61 74 65 20 61 6e 64 20 6f 75  ermediate and ou
8210: 74 70 75 74 20 64 69 72 65 63 74 6f 72 69 65 73  tput directories
8220: 2e 0d 0a 23 20 49 6e 20 6f 72 64 65 72 20 74 6f  ...# In order to
8230: 20 61 76 6f 69 64 20 69 6e 61 64 76 65 72 74 65   avoid inadverte
8240: 6e 74 20 6d 69 78 69 6e 67 20 6f 66 20 6f 62 6a  nt mixing of obj
8250: 65 63 74 20 66 69 6c 65 73 20 62 75 69 6c 74 20  ect files built 
8260: 75 73 69 6e 67 0d 0a 23 20 64 69 66 66 65 72 65  using..# differe
8270: 6e 74 20 63 6f 6d 70 69 6c 65 72 73 2c 20 62 75  nt compilers, bu
8280: 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f  ild configuratio
8290: 6e 73 20 65 74 63 2e 2c 0d 0a 23 0d 0a 23 20 4e  ns etc.,..#..# N
82a0: 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e  aming convention
82b0: 20 28 73 75 66 66 69 78 65 73 29 3a 0d 0a 23 20   (suffixes):..# 
82c0: 20 20 74 20 3d 20 66 75 6c 6c 20 74 68 72 65 61    t = full threa
82d0: 64 20 73 75 70 70 6f 72 74 2e 20 28 4e 6f 74 20  d support. (Not 
82e0: 75 73 65 64 20 66 6f 72 20 54 63 6c 20 3e 3d 20  used for Tcl >= 
82f0: 38 2e 37 29 0d 0a 23 20 20 20 73 20 3d 20 73 74  8.7)..#   s = st
8300: 61 74 69 63 20 6c 69 62 72 61 72 79 20 28 61 73  atic library (as
8310: 20 6f 70 70 6f 73 65 64 20 74 6f 20 61 6e 20 69   opposed to an i
8320: 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 29 0d 0a  mport library)..
8330: 23 20 20 20 67 20 3d 20 6c 69 6e 6b 65 64 20 74  #   g = linked t
8340: 6f 20 74 68 65 20 64 65 62 75 67 20 65 6e 61 62  o the debug enab
8350: 6c 65 64 20 43 20 72 75 6e 2d 74 69 6d 65 2e 0d  led C run-time..
8360: 0a 23 20 20 20 78 20 3d 20 73 70 65 63 69 61 6c  .#   x = special
8370: 20 73 74 61 74 69 63 20 62 75 69 6c 64 20 77 68   static build wh
8380: 65 6e 20 69 74 20 6c 69 6e 6b 73 20 74 6f 20 74  en it links to t
8390: 68 65 20 64 79 6e 61 6d 69 63 20 43 20 72 75 6e  he dynamic C run
83a0: 2d 74 69 6d 65 2e 0d 0a 23 0d 0a 23 20 54 68 65  -time...#..# The
83b0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f   following macro
83c0: 73 20 61 72 65 20 73 65 74 20 69 6e 20 74 68 69  s are set in thi
83d0: 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23 20 53 55  s section:..# SU
83e0: 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 78 20  FX - the suffix 
83f0: 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e 61 72  to use for binar
8400: 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 62 6f  ies based on abo
8410: 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 65 6e  ve naming conven
8420: 74 69 6f 6e 0d 0a 23 20 42 55 49 4c 44 44 49 52  tion..# BUILDDIR
8430: 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c 65 76  TOP - the toplev
8440: 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 70 75  el default outpu
8450: 74 20 64 69 72 65 63 74 6f 72 79 0d 0a 23 20 20  t directory..#  
8460: 20 20 20 20 69 73 20 6f 66 20 74 68 65 20 66 6f      is of the fo
8470: 72 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 62 75  rm {Release,Debu
8480: 67 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f 4d 50  g}[_AMD64][_COMP
8490: 49 4c 45 52 56 45 52 53 49 4f 4e 5d 0d 0a 23 20  ILERVERSION]..# 
84a0: 54 4d 50 5f 44 49 52 20 2d 20 64 69 72 65 63 74  TMP_DIR - direct
84b0: 6f 72 79 20 77 68 65 72 65 20 6f 62 6a 65 63 74  ory where object
84c0: 20 66 69 6c 65 73 20 61 72 65 20 63 72 65 61 74   files are creat
84d0: 65 64 0d 0a 23 20 4f 55 54 5f 44 49 52 20 2d 20  ed..# OUT_DIR - 
84e0: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20  directory where 
84f0: 6f 75 74 70 75 74 20 65 78 65 63 75 74 61 62 6c  output executabl
8500: 65 73 20 61 72 65 20 63 72 65 61 74 65 64 0d 0a  es are created..
8510: 23 20 42 6f 74 68 20 54 4d 50 5f 44 49 52 20 61  # Both TMP_DIR a
8520: 6e 64 20 4f 55 54 5f 44 49 52 20 61 72 65 20 64  nd OUT_DIR are d
8530: 65 66 61 75 6c 74 65 64 20 6f 6e 6c 79 20 69 66  efaulted only if
8540: 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 62 79 20   not defined by 
8550: 74 68 65 0d 0a 23 20 70 61 72 65 6e 74 20 6d 61  the..# parent ma
8560: 6b 65 66 69 6c 65 20 28 6f 72 20 63 6f 6d 6d 61  kefile (or comma
8570: 6e 64 20 6c 69 6e 65 29 2e 20 54 68 65 20 64 65  nd line). The de
8580: 66 61 75 6c 74 20 76 61 6c 75 65 73 20 61 72 65  fault values are
8590: 0d 0a 23 20 62 61 73 65 64 20 6f 6e 20 42 55 49  ..# based on BUI
85a0: 4c 44 44 49 52 54 4f 50 2e 0d 0a 23 20 53 54 55  LDDIRTOP...# STU
85b0: 42 50 52 45 46 49 58 20 2d 20 6e 61 6d 65 20 6f  BPREFIX - name o
85c0: 66 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 72  f the stubs libr
85d0: 61 72 79 20 66 6f 72 20 74 68 69 73 20 70 72 6f  ary for this pro
85e0: 6a 65 63 74 0d 0a 23 20 50 52 4a 49 4d 50 4c 49  ject..# PRJIMPLI
85f0: 42 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20  B - output path 
8600: 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 64  of the generated
8610: 20 70 72 6f 6a 65 63 74 20 69 6d 70 6f 72 74 20   project import 
8620: 6c 69 62 72 61 72 79 0d 0a 23 20 50 52 4a 4c 49  library..# PRJLI
8630: 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20  BNAME - name of 
8640: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63  generated projec
8650: 74 20 6c 69 62 72 61 72 79 0d 0a 23 20 50 52 4a  t library..# PRJ
8660: 4c 49 42 20 20 20 20 20 2d 20 6f 75 74 70 75 74  LIB     - output
8670: 20 70 61 74 68 20 6f 66 20 67 65 6e 65 72 61 74   path of generat
8680: 65 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61  ed project libra
8690: 72 79 0d 0a 23 20 50 52 4a 53 54 55 42 4c 49 42  ry..# PRJSTUBLIB
86a0: 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20 74  NAME - name of t
86b0: 68 65 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f  he generated pro
86c0: 6a 65 63 74 20 73 74 75 62 73 20 6c 69 62 72 61  ject stubs libra
86d0: 72 79 0d 0a 23 20 50 52 4a 53 54 55 42 4c 49 42  ry..# PRJSTUBLIB
86e0: 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f   - output path o
86f0: 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20  f the generated 
8700: 70 72 6f 6a 65 63 74 20 73 74 75 62 73 20 6c 69  project stubs li
8710: 62 72 61 72 79 0d 0a 23 20 52 45 53 46 49 4c 45  brary..# RESFILE
8720: 20 2d 20 6f 75 74 70 75 74 20 72 65 73 6f 75 72   - output resour
8730: 63 65 20 66 69 6c 65 20 28 6f 6e 6c 79 20 69 66  ce file (only if
8740: 20 6e 6f 74 20 73 74 61 74 69 63 20 62 75 69 6c   not static buil
8750: 64 29 0d 0a 0d 0a 53 55 46 58 09 20 20 20 20 3d  d)....SUFX.    =
8760: 20 74 73 67 78 0d 0a 0d 0a 21 69 66 20 24 28 44   tsgx....!if $(D
8770: 45 42 55 47 29 0d 0a 42 55 49 4c 44 44 49 52 54  EBUG)..BUILDDIRT
8780: 4f 50 20 3d 20 44 65 62 75 67 0d 0a 21 65 6c 73  OP = Debug..!els
8790: 65 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d  e..BUILDDIRTOP =
87a0: 20 52 65 6c 65 61 73 65 0d 0a 21 65 6e 64 69 66   Release..!endif
87b0: 0d 0a 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49  ....!if "$(MACHI
87c0: 4e 45 29 22 20 21 3d 20 22 49 58 38 36 22 0d 0a  NE)" != "IX86"..
87d0: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 28 42  BUILDDIRTOP =$(B
87e0: 55 49 4c 44 44 49 52 54 4f 50 29 5f 24 28 4d 41  UILDDIRTOP)_$(MA
87f0: 43 48 49 4e 45 29 0d 0a 21 65 6e 64 69 66 0d 0a  CHINE)..!endif..
8800: 21 69 66 20 24 28 56 43 56 45 52 29 20 3e 20 36  !if $(VCVER) > 6
8810: 0d 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24  ..BUILDDIRTOP =$
8820: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 56 43  (BUILDDIRTOP)_VC
8830: 24 28 56 43 56 45 52 29 0d 0a 21 65 6e 64 69 66  $(VCVER)..!endif
8840: 0d 0a 0d 0a 21 69 66 20 21 24 28 44 45 42 55 47  ....!if !$(DEBUG
8850: 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 53 49  ) || $(TCL_VERSI
8860: 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 28 44 45  ON) > 86 || $(DE
8870: 42 55 47 29 20 26 26 20 24 28 55 4e 43 48 45 43  BUG) && $(UNCHEC
8880: 4b 45 44 29 0d 0a 53 55 46 58 09 20 20 20 20 3d  KED)..SUFX.    =
8890: 20 24 28 53 55 46 58 3a 67 3d 29 0d 0a 21 65 6e   $(SUFX:g=)..!en
88a0: 64 69 66 0d 0a 0d 0a 54 4d 50 5f 44 49 52 46 55  dif....TMP_DIRFU
88b0: 4c 4c 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49  LL = .\$(BUILDDI
88c0: 52 54 4f 50 29 5c 24 28 50 52 4f 4a 45 43 54 29  RTOP)\$(PROJECT)
88d0: 5f 54 68 72 65 61 64 65 64 44 79 6e 61 6d 69 63  _ThreadedDynamic
88e0: 53 74 61 74 69 63 58 0d 0a 0d 0a 21 69 66 20 21  StaticX....!if !
88f0: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0d  $(STATIC_BUILD).
8900: 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24  .TMP_DIRFULL = $
8910: 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 53 74 61  (TMP_DIRFULL:Sta
8920: 74 69 63 3d 29 0d 0a 53 55 46 58 09 20 20 20 20  tic=)..SUFX.    
8930: 3d 20 24 28 53 55 46 58 3a 73 3d 29 0d 0a 45 58  = $(SUFX:s=)..EX
8940: 54 09 20 20 20 20 3d 20 64 6c 6c 0d 0a 54 4d 50  T.    = dll..TMP
8950: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50  _DIRFULL = $(TMP
8960: 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0d 0a 53 55  _DIRFULL:X=)..SU
8970: 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a  FX.    = $(SUFX:
8980: 78 3d 29 0d 0a 21 65 6c 73 65 0d 0a 54 4d 50 5f  x=)..!else..TMP_
8990: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f  DIRFULL = $(TMP_
89a0: 44 49 52 46 55 4c 4c 3a 44 79 6e 61 6d 69 63 3d  DIRFULL:Dynamic=
89b0: 29 0d 0a 45 58 54 09 20 20 20 20 3d 20 6c 69 62  )..EXT.    = lib
89c0: 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 54 29 20  ..!if $(MSVCRT) 
89d0: 26 26 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e  && $(TCL_VERSION
89e0: 29 20 3e 20 38 36 20 7c 7c 20 21 24 28 4d 53 56  ) > 86 || !$(MSV
89f0: 43 52 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45  CRT) && $(TCL_VE
8a00: 52 53 49 4f 4e 29 20 3c 20 38 37 0d 0a 54 4d 50  RSION) < 87..TMP
8a10: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50  _DIRFULL = $(TMP
8a20: 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0d 0a 53 55  _DIRFULL:X=)..SU
8a30: 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a  FX.    = $(SUFX:
8a40: 78 3d 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e  x=)..!endif..!en
8a50: 64 69 66 0d 0a 0d 0a 21 69 66 20 21 24 28 54 43  dif....!if !$(TC
8a60: 4c 5f 54 48 52 45 41 44 53 29 20 7c 7c 20 24 28  L_THREADS) || $(
8a70: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38  TCL_VERSION) > 8
8a80: 36 0d 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d  6..TMP_DIRFULL =
8a90: 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 54   $(TMP_DIRFULL:T
8aa0: 68 72 65 61 64 65 64 3d 29 0d 0a 53 55 46 58 09  hreaded=)..SUFX.
8ab0: 20 20 20 20 3d 20 24 28 53 55 46 58 3a 74 3d 29      = $(SUFX:t=)
8ac0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 6e  ..!endif....!ifn
8ad0: 64 65 66 20 54 4d 50 5f 44 49 52 0d 0a 54 4d 50  def TMP_DIR..TMP
8ae0: 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50  _DIR.    = $(TMP
8af0: 5f 44 49 52 46 55 4c 4c 29 0d 0a 21 69 66 6e 64  _DIRFULL)..!ifnd
8b00: 65 66 20 4f 55 54 5f 44 49 52 0d 0a 4f 55 54 5f  ef OUT_DIR..OUT_
8b10: 44 49 52 09 20 20 20 20 3d 20 2e 5c 24 28 42 55  DIR.    = .\$(BU
8b20: 49 4c 44 44 49 52 54 4f 50 29 0d 0a 21 65 6e 64  ILDDIRTOP)..!end
8b30: 69 66 0d 0a 21 65 6c 73 65 0d 0a 21 69 66 6e 64  if..!else..!ifnd
8b40: 65 66 20 4f 55 54 5f 44 49 52 0d 0a 4f 55 54 5f  ef OUT_DIR..OUT_
8b50: 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50 5f  DIR.    = $(TMP_
8b60: 44 49 52 29 0d 0a 21 65 6e 64 69 66 0d 0a 21 65  DIR)..!endif..!e
8b70: 6e 64 69 66 0d 0a 0d 0a 23 20 52 65 6c 61 74 69  ndif....# Relati
8b80: 76 65 20 70 61 74 68 73 20 2d 3e 20 61 62 73 6f  ve paths -> abso
8b90: 6c 75 74 65 0d 0a 21 69 66 20 5b 65 63 68 6f 20  lute..!if [echo 
8ba0: 4f 55 54 5f 44 49 52 20 3d 20 5c 3e 20 6e 6d 61  OUT_DIR = \> nma
8bb0: 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20  kehlp.out] \..  
8bc0: 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 51   || [nmakehlp -Q
8bd0: 20 22 24 28 4f 55 54 5f 44 49 52 29 22 20 3e 3e   "$(OUT_DIR)" >>
8be0: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a   nmakehlp.out]..
8bf0: 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64  !error *** Could
8c00: 20 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 6c 69   not fully quali
8c10: 66 79 20 70 61 74 68 20 4f 55 54 5f 44 49 52 3d  fy path OUT_DIR=
8c20: 24 28 4f 55 54 5f 44 49 52 29 0d 0a 21 65 6e 64  $(OUT_DIR)..!end
8c30: 69 66 0d 0a 21 69 66 20 5b 65 63 68 6f 20 54 4d  if..!if [echo TM
8c40: 50 5f 44 49 52 20 3d 20 5c 3e 3e 20 6e 6d 61 6b  P_DIR = \>> nmak
8c50: 65 68 6c 70 2e 6f 75 74 5d 20 5c 0d 0a 20 20 20  ehlp.out] \..   
8c60: 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 51 20  || [nmakehlp -Q 
8c70: 22 24 28 54 4d 50 5f 44 49 52 29 22 20 3e 3e 20  "$(TMP_DIR)" >> 
8c80: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d 0a 21  nmakehlp.out]..!
8c90: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20  error *** Could 
8ca0: 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 6c 69 66  not fully qualif
8cb0: 79 20 70 61 74 68 20 54 4d 50 5f 44 49 52 3d 24  y path TMP_DIR=$
8cc0: 28 54 4d 50 5f 44 49 52 29 0d 0a 21 65 6e 64 69  (TMP_DIR)..!endi
8cd0: 66 0d 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b  f..!include nmak
8ce0: 65 68 6c 70 2e 6f 75 74 0d 0a 0d 0a 23 20 54 68  ehlp.out....# Th
8cf0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 74  e name of the st
8d00: 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 20  ubs library for 
8d10: 74 68 65 20 70 72 6f 6a 65 63 74 20 62 65 69 6e  the project bein
8d20: 67 20 62 75 69 6c 74 0d 0a 53 54 55 42 50 52 45  g built..STUBPRE
8d30: 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 52 4f  FIX      = $(PRO
8d40: 4a 45 43 54 29 73 74 75 62 0d 0a 0d 0a 23 0d 0a  JECT)stub....#..
8d50: 23 20 53 65 74 20 75 70 20 70 61 74 68 73 20 74  # Set up paths t
8d60: 6f 20 76 61 72 69 6f 75 73 20 54 63 6c 20 65 78  o various Tcl ex
8d70: 65 63 75 74 61 62 6c 65 73 20 61 6e 64 20 6c 69  ecutables and li
8d80: 62 72 61 72 69 65 73 20 6e 65 65 64 65 64 20 62  braries needed b
8d90: 79 20 65 78 74 65 6e 73 69 6f 6e 73 0d 0a 23 0d  y extensions..#.
8da0: 0a 0d 0a 23 20 54 49 50 20 34 33 30 2e 20 55 6e  ...# TIP 430. Un
8db0: 75 73 65 64 20 66 6f 72 20 38 2e 36 20 62 75 74  used for 8.6 but
8dc0: 20 6e 6f 20 68 61 72 6d 20 64 65 66 69 6e 69 6e   no harm definin
8dd0: 67 20 69 74 20 74 6f 20 61 6c 6c 6f 77 20 61 20  g it to allow a 
8de0: 63 6f 6d 6d 6f 6e 20 72 75 6c 65 73 2e 76 63 0d  common rules.vc.
8df0: 0a 54 43 4c 5f 5a 49 50 5f 46 49 4c 45 20 3d 20  .TCL_ZIP_FILE = 
8e00: 6c 69 62 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f  libtcl$(TCL_MAJO
8e10: 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c  R_VERSION).$(TCL
8e20: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24  _MINOR_VERSION)$
8e30: 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45  (TCL_PATCH_LETTE
8e40: 52 29 24 28 54 43 4c 5f 52 45 4c 45 41 53 45 5f  R)$(TCL_RELEASE_
8e50: 53 45 52 49 41 4c 29 2e 7a 69 70 0d 0a 54 4b 5f  SERIAL).zip..TK_
8e60: 5a 49 50 5f 46 49 4c 45 20 3d 20 6c 69 62 74 6b  ZIP_FILE = libtk
8e70: 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49  $(TK_MAJOR_VERSI
8e80: 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56  ON).$(TK_MINOR_V
8e90: 45 52 53 49 4f 4e 29 24 28 54 4b 5f 50 41 54 43  ERSION)$(TK_PATC
8ea0: 48 5f 4c 45 54 54 45 52 29 24 28 54 4b 5f 52 45  H_LETTER)$(TK_RE
8eb0: 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 2e 7a 69  LEASE_SERIAL).zi
8ec0: 70 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47  p....!if $(DOING
8ed0: 5f 54 43 4c 29 0d 0a 54 43 4c 53 48 4e 41 4d 45  _TCL)..TCLSHNAME
8ee0: 20 20 20 20 20 20 20 3d 20 24 28 50 52 4f 4a 45         = $(PROJE
8ef0: 43 54 29 73 68 24 28 56 45 52 53 49 4f 4e 29 24  CT)sh$(VERSION)$
8f00: 28 53 55 46 58 29 2e 65 78 65 0d 0a 54 43 4c 53  (SUFX).exe..TCLS
8f10: 48 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c  H..= $(OUT_DIR)\
8f20: 24 28 54 43 4c 53 48 4e 41 4d 45 29 0d 0a 54 43  $(TCLSHNAME)..TC
8f30: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 54 5f  LIMPLIB.= $(OUT_
8f40: 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 24  DIR)\$(PROJECT)$
8f50: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29  (VERSION)$(SUFX)
8f60: 2e 6c 69 62 0d 0a 54 43 4c 4c 49 42 4e 41 4d 45  .lib..TCLLIBNAME
8f70: 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 28 56  .= $(PROJECT)$(V
8f80: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24  ERSION)$(SUFX).$
8f90: 28 45 58 54 29 0d 0a 54 43 4c 4c 49 42 09 09 3d  (EXT)..TCLLIB..=
8fa0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43   $(OUT_DIR)\$(TC
8fb0: 4c 4c 49 42 4e 41 4d 45 29 0d 0a 54 43 4c 53 43  LLIBNAME)..TCLSC
8fc0: 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 28 4f  RIPTZIP    = $(O
8fd0: 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 5f 5a 49  UT_DIR)\$(TCL_ZI
8fe0: 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 69 66 20 24  P_FILE)....!if $
8ff0: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49  (TCL_MAJOR_VERSI
9000: 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 54 55  ON) == 8..TCLSTU
9010: 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55  BLIBNAME.= $(STU
9020: 42 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f  BPREFIX)$(VERSIO
9030: 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54  N).lib..!else..T
9040: 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20  CLSTUBLIBNAME.= 
9050: 24 28 53 54 55 42 50 52 45 46 49 58 29 2e 6c 69  $(STUBPREFIX).li
9060: 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 53 54  b..!endif..TCLST
9070: 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49  UBLIB.= $(OUT_DI
9080: 52 29 5c 24 28 54 43 4c 53 54 55 42 4c 49 42 4e  R)\$(TCLSTUBLIBN
9090: 41 4d 45 29 0d 0a 54 43 4c 5f 49 4e 43 4c 55 44  AME)..TCL_INCLUD
90a0: 45 53 20 20 20 20 3d 20 2d 49 22 24 28 57 49 4e  ES    = -I"$(WIN
90b0: 5f 44 49 52 29 22 20 2d 49 22 24 28 47 45 4e 45  _DIR)" -I"$(GENE
90c0: 52 49 43 44 49 52 29 22 0d 0a 0d 0a 21 65 6c 73  RICDIR)"....!els
90d0: 65 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c  e # !$(DOING_TCL
90e0: 29 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c 49 4e  )....!if $(TCLIN
90f0: 53 54 41 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e  STALL) # Buildin
9100: 67 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73  g against an ins
9110: 74 61 6c 6c 65 64 20 54 63 6c 0d 0a 0d 0a 23 20  talled Tcl....# 
9120: 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78  When building ex
9130: 74 65 6e 73 69 6f 6e 73 2c 20 77 65 20 6e 65 65  tensions, we nee
9140: 64 20 74 6f 20 6c 6f 63 61 74 65 20 74 63 6c 73  d to locate tcls
9150: 68 2e 20 44 65 70 65 6e 64 69 6e 67 20 6f 6e 20  h. Depending on 
9160: 76 65 72 73 69 6f 6e 0d 0a 23 20 6f 66 20 54 63  version..# of Tc
9170: 6c 20 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e  l we are buildin
9180: 67 20 61 67 61 69 6e 73 74 2c 20 74 68 69 73 20  g against, this 
9190: 6d 61 79 20 6f 72 20 6d 61 79 20 6e 6f 74 20 68  may or may not h
91a0: 61 76 65 20 61 20 22 74 22 20 73 75 66 66 69 78  ave a "t" suffix
91b0: 2e 0d 0a 23 20 54 72 79 20 76 61 72 69 6f 75 73  ...# Try various
91c0: 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 20 69   possibilities i
91d0: 6e 20 74 75 72 6e 2e 0d 0a 54 43 4c 53 48 09 09  n turn...TCLSH..
91e0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 6e  = $(_TCLDIR)\bin
91f0: 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53  \tclsh$(TCL_VERS
9200: 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 65  ION)$(SUFX:t=).e
9210: 78 65 0d 0a 21 69 66 20 21 65 78 69 73 74 28 22  xe..!if !exist("
9220: 24 28 54 43 4c 53 48 29 22 29 0d 0a 54 43 4c 53  $(TCLSH)")..TCLS
9230: 48 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28  H           = $(
9240: 5f 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c  _TCLDIR)\bin\tcl
9250: 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29  sh$(TCL_VERSION)
9260: 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0d  t$(SUFX:t=).exe.
9270: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24  .!endif....!if $
9280: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49  (TCL_MAJOR_VERSI
9290: 4f 4e 29 20 3d 3d 20 38 0d 0a 54 43 4c 53 54 55  ON) == 8..TCLSTU
92a0: 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52  BLIB.= $(_TCLDIR
92b0: 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 24 28 54  )\lib\tclstub$(T
92c0: 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0d  CL_VERSION).lib.
92d0: 0a 21 65 6c 73 65 0d 0a 54 43 4c 53 54 55 42 4c  .!else..TCLSTUBL
92e0: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c  IB.= $(_TCLDIR)\
92f0: 6c 69 62 5c 74 63 6c 73 74 75 62 2e 6c 69 62 0d  lib\tclstub.lib.
9300: 0a 21 65 6e 64 69 66 0d 0a 54 43 4c 49 4d 50 4c  .!endif..TCLIMPL
9310: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c  IB.= $(_TCLDIR)\
9320: 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52  lib\tcl$(TCL_VER
9330: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e  SION)$(SUFX:t=).
9340: 6c 69 62 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c  lib..# When buil
9350: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c  ding extensions,
9360: 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20   may be linking 
9370: 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74  against Tcl that
9380: 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23   does not add..#
9390: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67   "t" suffix (e.g
93a0: 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49  . 8.5 or 8.7). I
93b0: 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20  f lib not found 
93c0: 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70  check for that p
93d0: 6f 73 73 69 62 69 6c 69 74 79 2e 0d 0a 21 69 66  ossibility...!if
93e0: 20 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d   !exist("$(TCLIM
93f0: 50 4c 49 42 29 22 29 0d 0a 54 43 4c 49 4d 50 4c  PLIB)")..TCLIMPL
9400: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c  IB.= $(_TCLDIR)\
9410: 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52  lib\tcl$(TCL_VER
9420: 53 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29  SION)t$(SUFX:t=)
9430: 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 54 43  .lib..!endif..TC
9440: 4c 5f 4c 49 42 52 41 52 59 09 3d 20 24 28 5f 54  L_LIBRARY.= $(_T
9450: 43 4c 44 49 52 29 5c 6c 69 62 0d 0a 54 43 4c 52  CLDIR)\lib..TCLR
9460: 45 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49  EGLIB.= $(_TCLDI
9470: 52 29 5c 6c 69 62 5c 74 63 6c 72 65 67 31 33 24  R)\lib\tclreg13$
9480: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 54  (SUFX:t=).lib..T
9490: 43 4c 44 44 45 4c 49 42 09 3d 20 24 28 5f 54 43  CLDDELIB.= $(_TC
94a0: 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 64 64 65  LDIR)\lib\tcldde
94b0: 31 34 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62  14$(SUFX:t=).lib
94c0: 0d 0a 54 43 4c 53 43 52 49 50 54 5a 49 50 09 3d  ..TCLSCRIPTZIP.=
94d0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c   $(_TCLDIR)\lib\
94e0: 24 28 54 43 4c 5f 5a 49 50 5f 46 49 4c 45 29 0d  $(TCL_ZIP_FILE).
94f0: 0a 54 43 4c 54 4f 4f 4c 53 44 49 52 09 3d 20 5c  .TCLTOOLSDIR.= \
9500: 6d 75 73 74 5c 68 61 76 65 5c 74 63 6c 5c 73 6f  must\have\tcl\so
9510: 75 72 63 65 73 5c 74 6f 5c 62 75 69 6c 64 5c 74  urces\to\build\t
9520: 68 69 73 5c 74 61 72 67 65 74 0d 0a 54 43 4c 5f  his\target..TCL_
9530: 49 4e 43 4c 55 44 45 53 20 20 20 20 3d 20 2d 49  INCLUDES    = -I
9540: 22 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c  "$(_TCLDIR)\incl
9550: 75 64 65 22 0d 0a 0d 0a 21 65 6c 73 65 20 23 20  ude"....!else # 
9560: 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74  Building against
9570: 20 54 63 6c 20 73 6f 75 72 63 65 73 0d 0a 0d 0a   Tcl sources....
9580: 54 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 4c 44  TCLSH..= $(_TCLD
9590: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44  IR)\win\$(BUILDD
95a0: 49 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 54 43  IRTOP)\tclsh$(TC
95b0: 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58  L_VERSION)$(SUFX
95c0: 3a 74 3d 29 2e 65 78 65 0d 0a 21 69 66 20 21 65  :t=).exe..!if !e
95d0: 78 69 73 74 28 24 28 54 43 4c 53 48 29 29 0d 0a  xist($(TCLSH))..
95e0: 54 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 4c 44  TCLSH..= $(_TCLD
95f0: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44  IR)\win\$(BUILDD
9600: 49 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 54 43  IRTOP)\tclsh$(TC
9610: 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46  L_VERSION)t$(SUF
9620: 58 3a 74 3d 29 2e 65 78 65 0d 0a 21 65 6e 64 69  X:t=).exe..!endi
9630: 66 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a  f..!if $(TCL_MAJ
9640: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38  OR_VERSION) == 8
9650: 0d 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24  ..TCLSTUBLIB.= $
9660: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28  (_TCLDIR)\win\$(
9670: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c  BUILDDIRTOP)\tcl
9680: 73 74 75 62 24 28 54 43 4c 5f 56 45 52 53 49 4f  stub$(TCL_VERSIO
9690: 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54  N).lib..!else..T
96a0: 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54  CLSTUBLIB.= $(_T
96b0: 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49  CLDIR)\win\$(BUI
96c0: 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 74 75  LDDIRTOP)\tclstu
96d0: 62 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 54  b.lib..!endif..T
96e0: 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43  CLIMPLIB.= $(_TC
96f0: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c  LDIR)\win\$(BUIL
9700: 44 44 49 52 54 4f 50 29 5c 74 63 6c 24 28 54 43  DDIRTOP)\tcl$(TC
9710: 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58  L_VERSION)$(SUFX
9720: 3a 74 3d 29 2e 6c 69 62 0d 0a 23 20 57 68 65 6e  :t=).lib..# When
9730: 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73   building extens
9740: 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e  ions, may be lin
9750: 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c  king against Tcl
9760: 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61   that does not a
9770: 64 64 0d 0a 23 20 22 74 22 20 73 75 66 66 69 78  dd..# "t" suffix
9780: 20 28 65 2e 67 2e 20 38 2e 35 20 6f 72 20 38 2e   (e.g. 8.5 or 8.
9790: 37 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66  7). If lib not f
97a0: 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74  ound check for t
97b0: 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e  hat possibility.
97c0: 0d 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 28  ..!if !exist("$(
97d0: 54 43 4c 49 4d 50 4c 49 42 29 22 29 0d 0a 54 43  TCLIMPLIB)")..TC
97e0: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c  LIMPLIB.= $(_TCL
97f0: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44  DIR)\win\$(BUILD
9800: 44 49 52 54 4f 50 29 5c 74 63 6c 24 28 54 43 4c  DIRTOP)\tcl$(TCL
9810: 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58  _VERSION)t$(SUFX
9820: 3a 74 3d 29 2e 6c 69 62 0d 0a 21 65 6e 64 69 66  :t=).lib..!endif
9830: 0d 0a 54 43 4c 5f 4c 49 42 52 41 52 59 09 3d 20  ..TCL_LIBRARY.= 
9840: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 72 61  $(_TCLDIR)\libra
9850: 72 79 0d 0a 54 43 4c 52 45 47 4c 49 42 09 3d 20  ry..TCLREGLIB.= 
9860: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24  $(_TCLDIR)\win\$
9870: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63  (BUILDDIRTOP)\tc
9880: 6c 72 65 67 31 33 24 28 53 55 46 58 3a 74 3d 29  lreg13$(SUFX:t=)
9890: 2e 6c 69 62 0d 0a 54 43 4c 44 44 45 4c 49 42 09  .lib..TCLDDELIB.
98a0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e  = $(_TCLDIR)\win
98b0: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c  \$(BUILDDIRTOP)\
98c0: 74 63 6c 64 64 65 31 34 24 28 53 55 46 58 3a 74  tcldde14$(SUFX:t
98d0: 3d 29 2e 6c 69 62 0d 0a 54 43 4c 53 43 52 49 50  =).lib..TCLSCRIP
98e0: 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 49 52  TZIP.= $(_TCLDIR
98f0: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52  )\win\$(BUILDDIR
9900: 54 4f 50 29 5c 24 28 54 43 4c 5f 5a 49 50 5f 46  TOP)\$(TCL_ZIP_F
9910: 49 4c 45 29 0d 0a 54 43 4c 54 4f 4f 4c 53 44 49  ILE)..TCLTOOLSDI
9920: 52 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 74  R.= $(_TCLDIR)\t
9930: 6f 6f 6c 73 0d 0a 54 43 4c 5f 49 4e 43 4c 55 44  ools..TCL_INCLUD
9940: 45 53 09 3d 20 2d 49 22 24 28 5f 54 43 4c 44 49  ES.= -I"$(_TCLDI
9950: 52 29 5c 67 65 6e 65 72 69 63 22 20 2d 49 22 24  R)\generic" -I"$
9960: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 22 0d 0a  (_TCLDIR)\win"..
9970: 0d 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 49 4e  ..!endif # TCLIN
9980: 53 54 41 4c 4c 0d 0a 0d 0a 21 69 66 20 21 24 28  STALL....!if !$(
9990: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 26 26  STATIC_BUILD) &&
99a0: 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f   "$(TCL_BUILD_FO
99b0: 52 29 22 20 3d 3d 20 22 38 22 0d 0a 74 63 6c 6c  R)" == "8"..tcll
99c0: 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42  ibs = "$(TCLSTUB
99d0: 4c 49 42 29 22 0d 0a 21 65 6c 73 65 0d 0a 74 63  LIB)"..!else..tc
99e0: 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54  llibs = "$(TCLST
99f0: 55 42 4c 49 42 29 22 20 22 24 28 54 43 4c 49 4d  UBLIB)" "$(TCLIM
9a00: 50 4c 49 42 29 22 0d 0a 21 65 6e 64 69 66 0d 0a  PLIB)"..!endif..
9a10: 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49  ..!endif # $(DOI
9a20: 4e 47 5f 54 43 4c 29 0d 0a 0d 0a 23 20 57 65 20  NG_TCL)....# We 
9a30: 6e 65 65 64 20 61 20 74 63 6c 73 68 20 74 68 61  need a tclsh tha
9a40: 74 20 77 69 6c 6c 20 72 75 6e 20 6f 6e 20 74 68  t will run on th
9a50: 65 20 68 6f 73 74 20 6d 61 63 68 69 6e 65 20 61  e host machine a
9a60: 73 20 70 61 72 74 20 6f 66 20 74 68 65 20 62 75  s part of the bu
9a70: 69 6c 64 2e 0d 0a 23 20 49 58 38 36 20 72 75 6e  ild...# IX86 run
9a80: 73 20 6f 6e 20 61 6c 6c 20 61 72 63 68 69 74 65  s on all archite
9a90: 63 74 75 72 65 73 2e 0d 0a 21 69 66 6e 64 65 66  ctures...!ifndef
9aa0: 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 0d 0a 21   TCLSH_NATIVE..!
9ab0: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20  if "$(MACHINE)" 
9ac0: 3d 3d 20 22 49 58 38 36 22 20 7c 7c 20 22 24 28  == "IX86" || "$(
9ad0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 24 28  MACHINE)" == "$(
9ae0: 4e 41 54 49 56 45 5f 41 52 43 48 29 22 0d 0a 54  NATIVE_ARCH)"..T
9af0: 43 4c 53 48 5f 4e 41 54 49 56 45 09 3d 20 24 28  CLSH_NATIVE.= $(
9b00: 54 43 4c 53 48 29 0d 0a 21 65 6c 73 65 0d 0a 21  TCLSH)..!else..!
9b10: 65 72 72 6f 72 20 59 6f 75 20 6d 75 73 74 20 65  error You must e
9b20: 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 54 43  xplicitly set TC
9b30: 4c 53 48 5f 4e 41 54 49 56 45 20 66 6f 72 20 63  LSH_NATIVE for c
9b40: 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 6f 6e  ross-compilation
9b50: 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66  ..!endif..!endif
9b60: 0d 0a 0d 0a 23 20 44 6f 20 74 68 65 20 73 61 6d  ....# Do the sam
9b70: 65 20 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20  e for Tk and Tk 
9b80: 65 78 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 20  extensions that 
9b90: 72 65 71 75 69 72 65 20 74 68 65 20 54 6b 20 6c  require the Tk l
9ba0: 69 62 72 61 72 69 65 73 0d 0a 21 69 66 20 24 28  ibraries..!if $(
9bb0: 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e  DOING_TK) || $(N
9bc0: 45 45 44 5f 54 4b 29 0d 0a 57 49 53 48 4e 41 4d  EED_TK)..WISHNAM
9bd0: 45 50 52 45 46 49 58 20 3d 20 77 69 73 68 0d 0a  EPREFIX = wish..
9be0: 57 49 53 48 4e 41 4d 45 20 3d 20 24 28 57 49 53  WISHNAME = $(WIS
9bf0: 48 4e 41 4d 45 50 52 45 46 49 58 29 24 28 54 4b  HNAMEPREFIX)$(TK
9c00: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29  _VERSION)$(SUFX)
9c10: 2e 65 78 65 0d 0a 54 4b 4c 49 42 4e 41 4d 45 38  .exe..TKLIBNAME8
9c20: 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f  .= tk$(TK_VERSIO
9c30: 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29  N)$(SUFX).$(EXT)
9c40: 0d 0a 54 4b 4c 49 42 4e 41 4d 45 39 09 3d 20 74  ..TKLIBNAME9.= t
9c50: 63 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f  cl9tk$(TK_VERSIO
9c60: 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29  N)$(SUFX).$(EXT)
9c70: 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f  ..!if $(TCL_MAJO
9c80: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20  R_VERSION) == 8 
9c90: 7c 7c 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f  || "$(TCL_BUILD_
9ca0: 46 4f 52 29 22 20 3d 3d 20 22 38 22 0d 0a 54 4b  FOR)" == "8"..TK
9cb0: 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b  LIBNAME.= tk$(TK
9cc0: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29  _VERSION)$(SUFX)
9cd0: 2e 24 28 45 58 54 29 0d 0a 54 4b 49 4d 50 4c 49  .$(EXT)..TKIMPLI
9ce0: 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56  BNAME.= tk$(TK_V
9cf0: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c  ERSION)$(SUFX).l
9d00: 69 62 0d 0a 21 65 6c 73 65 0d 0a 54 4b 4c 49 42  ib..!else..TKLIB
9d10: 4e 41 4d 45 09 3d 20 74 63 6c 39 74 6b 24 28 54  NAME.= tcl9tk$(T
9d20: 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58  K_VERSION)$(SUFX
9d30: 29 2e 24 28 45 58 54 29 0d 0a 54 4b 49 4d 50 4c  ).$(EXT)..TKIMPL
9d40: 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 6b 24  IBNAME.= tcl9tk$
9d50: 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55  (TK_VERSION)$(SU
9d60: 46 58 29 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d  FX).lib..!endif.
9d70: 0a 21 69 66 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f  .!if $(TK_MAJOR_
9d80: 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0d 0a 54  VERSION) == 8..T
9d90: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74  KSTUBLIBNAME.= t
9da0: 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 53 49 4f  kstub$(TK_VERSIO
9db0: 4e 29 2e 6c 69 62 0d 0a 21 65 6c 73 65 0d 0a 54  N).lib..!else..T
9dc0: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74  KSTUBLIBNAME.= t
9dd0: 6b 73 74 75 62 2e 6c 69 62 0d 0a 21 65 6e 64 69  kstub.lib..!endi
9de0: 66 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49 4e 47  f....!if $(DOING
9df0: 5f 54 4b 29 0d 0a 57 49 53 48 09 09 3d 20 24 28  _TK)..WISH..= $(
9e00: 4f 55 54 5f 44 49 52 29 5c 24 28 57 49 53 48 4e  OUT_DIR)\$(WISHN
9e10: 41 4d 45 29 0d 0a 54 4b 53 54 55 42 4c 49 42 09  AME)..TKSTUBLIB.
9e20: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54  = $(OUT_DIR)\$(T
9e30: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 54  KSTUBLIBNAME)..T
9e40: 4b 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 54 5f  KIMPLIB.= $(OUT_
9e50: 44 49 52 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e  DIR)\$(TKIMPLIBN
9e60: 41 4d 45 29 0d 0a 54 4b 4c 49 42 09 09 3d 20 24  AME)..TKLIB..= $
9e70: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 4c 49  (OUT_DIR)\$(TKLI
9e80: 42 4e 41 4d 45 29 0d 0a 54 4b 5f 49 4e 43 4c 55  BNAME)..TK_INCLU
9e90: 44 45 53 20 20 20 20 20 3d 20 2d 49 22 24 28 57  DES     = -I"$(W
9ea0: 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 47 45  IN_DIR)" -I"$(GE
9eb0: 4e 45 52 49 43 44 49 52 29 22 0d 0a 54 4b 53 43  NERICDIR)"..TKSC
9ec0: 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 24 28  RIPTZIP     = $(
9ed0: 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 5f 5a 49  OUT_DIR)\$(TK_ZI
9ee0: 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21 65 6c 73 65  P_FILE)....!else
9ef0: 20 23 20 65 66 66 65 63 74 69 76 65 6c 79 20 4e   # effectively N
9f00: 45 45 44 5f 54 4b 0d 0a 0d 0a 21 69 66 20 24 28  EED_TK....!if $(
9f10: 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 69  TKINSTALL) # Bui
9f20: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 69 6e  lding against in
9f30: 73 74 61 6c 6c 65 64 20 54 6b 0d 0a 57 49 53 48  stalled Tk..WISH
9f40: 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 62 69  ..= $(_TKDIR)\bi
9f50: 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0d 0a 54  n\$(WISHNAME)..T
9f60: 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 4b  KSTUBLIB.= $(_TK
9f70: 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 54 55  DIR)\lib\$(TKSTU
9f80: 42 4c 49 42 4e 41 4d 45 29 0d 0a 54 4b 49 4d 50  BLIBNAME)..TKIMP
9f90: 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c  LIB.= $(_TKDIR)\
9fa0: 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41  lib\$(TKIMPLIBNA
9fb0: 4d 45 29 0d 0a 23 20 57 68 65 6e 20 62 75 69 6c  ME)..# When buil
9fc0: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c  ding extensions,
9fd0: 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20   may be linking 
9fe0: 61 67 61 69 6e 73 74 20 54 6b 20 74 68 61 74 20  against Tk that 
9ff0: 64 6f 65 73 20 6e 6f 74 20 61 64 64 0d 0a 23 20  does not add..# 
a000: 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e  "t" suffix (e.g.
a010: 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66   8.5 or 8.7). If
a020: 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63   lib not found c
a030: 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f  heck for that po
a040: 73 73 69 62 69 6c 69 74 79 2e 0d 0a 21 69 66 20  ssibility...!if 
a050: 21 65 78 69 73 74 28 22 24 28 54 4b 49 4d 50 4c  !exist("$(TKIMPL
a060: 49 42 29 22 29 0d 0a 54 4b 49 4d 50 4c 49 42 4e  IB)")..TKIMPLIBN
a070: 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52  AME.= tk$(TK_VER
a080: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e  SION)$(SUFX:t=).
a090: 6c 69 62 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d 20  lib..TKIMPLIB.= 
a0a0: 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28  $(_TKDIR)\lib\$(
a0b0: 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 21  TKIMPLIBNAME)..!
a0c0: 65 6e 64 69 66 0d 0a 54 4b 5f 49 4e 43 4c 55 44  endif..TK_INCLUD
a0d0: 45 53 20 20 20 20 20 3d 20 2d 49 22 24 28 5f 54  ES     = -I"$(_T
a0e0: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0d 0a  KDIR)\include"..
a0f0: 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 20  TKSCRIPTZIP     
a100: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c  = $(_TKDIR)\lib\
a110: 24 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0d 0a  $(TK_ZIP_FILE)..
a120: 0d 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69  ..!else # Buildi
a130: 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 73 6f  ng against Tk so
a140: 75 72 63 65 73 0d 0a 0d 0a 57 49 53 48 09 09 3d  urces....WISH..=
a150: 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24   $(_TKDIR)\win\$
a160: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28  (BUILDDIRTOP)\$(
a170: 57 49 53 48 4e 41 4d 45 29 0d 0a 54 4b 53 54 55  WISHNAME)..TKSTU
a180: 42 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29  BLIB.= $(_TKDIR)
a190: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54  \win\$(BUILDDIRT
a1a0: 4f 50 29 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e  OP)\$(TKSTUBLIBN
a1b0: 41 4d 45 29 0d 0a 54 4b 49 4d 50 4c 49 42 09 3d  AME)..TKIMPLIB.=
a1c0: 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24   $(_TKDIR)\win\$
a1d0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28  (BUILDDIRTOP)\$(
a1e0: 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0d 0a 23  TKIMPLIBNAME)..#
a1f0: 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65   When building e
a200: 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 79 20 62  xtensions, may b
a210: 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 69 6e 73  e linking agains
a220: 74 20 54 6b 20 74 68 61 74 20 64 6f 65 73 20 6e  t Tk that does n
a230: 6f 74 20 61 64 64 0d 0a 23 20 22 74 22 20 73 75  ot add..# "t" su
a240: 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 35 20 6f  ffix (e.g. 8.5 o
a250: 72 20 38 2e 37 29 2e 20 49 66 20 6c 69 62 20 6e  r 8.7). If lib n
a260: 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66  ot found check f
a270: 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c  or that possibil
a280: 69 74 79 2e 0d 0a 21 69 66 20 21 65 78 69 73 74  ity...!if !exist
a290: 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 0d  ("$(TKIMPLIB)").
a2a0: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20  .TKIMPLIBNAME.= 
a2b0: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24  tk$(TK_VERSION)$
a2c0: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0d 0a 54  (SUFX:t=).lib..T
a2d0: 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44  KIMPLIB.= $(_TKD
a2e0: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44  IR)\win\$(BUILDD
a2f0: 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49  IRTOP)\$(TKIMPLI
a300: 42 4e 41 4d 45 29 0d 0a 21 65 6e 64 69 66 0d 0a  BNAME)..!endif..
a310: 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20  TK_INCLUDES     
a320: 3d 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 67  = -I"$(_TKDIR)\g
a330: 65 6e 65 72 69 63 22 20 2d 49 22 24 28 5f 54 4b  eneric" -I"$(_TK
a340: 44 49 52 29 5c 77 69 6e 22 20 2d 49 22 24 28 5f  DIR)\win" -I"$(_
a350: 54 4b 44 49 52 29 5c 78 6c 69 62 22 0d 0a 54 4b  TKDIR)\xlib"..TK
a360: 53 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20  SCRIPTZIP     = 
a370: 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28  $(_TKDIR)\win\$(
a380: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54  BUILDDIRTOP)\$(T
a390: 4b 5f 5a 49 50 5f 46 49 4c 45 29 0d 0a 0d 0a 21  K_ZIP_FILE)....!
a3a0: 65 6e 64 69 66 20 23 20 54 4b 49 4e 53 54 41 4c  endif # TKINSTAL
a3b0: 4c 0d 0a 0d 0a 74 6b 6c 69 62 73 20 3d 20 22 24  L....tklibs = "$
a3c0: 28 54 4b 53 54 55 42 4c 49 42 29 22 20 22 24 28  (TKSTUBLIB)" "$(
a3d0: 54 4b 49 4d 50 4c 49 42 29 22 0d 0a 0d 0a 21 65  TKIMPLIB)"....!e
a3e0: 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54  ndif # $(DOING_T
a3f0: 4b 29 0d 0a 21 65 6e 64 69 66 20 23 20 24 28 44  K)..!endif # $(D
a400: 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45  OING_TK) || $(NE
a410: 45 44 5f 54 4b 29 0d 0a 0d 0a 23 20 56 61 72 69  ED_TK)....# Vari
a420: 6f 75 73 20 6f 75 74 70 75 74 20 70 61 74 68 73  ous output paths
a430: 0d 0a 50 52 4a 49 4d 50 4c 49 42 09 3d 20 24 28  ..PRJIMPLIB.= $(
a440: 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45  OUT_DIR)\$(PROJE
a450: 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53  CT)$(VERSION)$(S
a460: 55 46 58 29 2e 6c 69 62 0d 0a 50 52 4a 4c 49 42  UFX).lib..PRJLIB
a470: 4e 41 4d 45 38 09 3d 20 24 28 50 52 4f 4a 45 43  NAME8.= $(PROJEC
a480: 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55  T)$(VERSION)$(SU
a490: 46 58 29 2e 24 28 45 58 54 29 0d 0a 23 20 45 76  FX).$(EXT)..# Ev
a4a0: 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67  en when building
a4b0: 20 61 67 61 69 6e 73 74 20 54 63 6c 20 38 2c 20   against Tcl 8, 
a4c0: 50 52 4a 4c 49 42 4e 41 4d 45 39 20 6d 75 73 74  PRJLIBNAME9 must
a4d0: 20 6e 6f 74 20 68 61 76 65 20 22 74 22 0d 0a 50   not have "t"..P
a4e0: 52 4a 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c  RJLIBNAME9.= tcl
a4f0: 39 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52  9$(PROJECT)$(VER
a500: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e  SION)$(SUFX:t=).
a510: 24 28 45 58 54 29 0d 0a 21 69 66 20 24 28 54 43  $(EXT)..!if $(TC
a520: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29  L_MAJOR_VERSION)
a530: 20 3d 3d 20 38 20 7c 7c 20 22 24 28 54 43 4c 5f   == 8 || "$(TCL_
a540: 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22  BUILD_FOR)" == "
a550: 38 22 0d 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d  8"..PRJLIBNAME.=
a560: 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0d   $(PRJLIBNAME8).
a570: 0a 21 65 6c 73 65 0d 0a 50 52 4a 4c 49 42 4e 41  .!else..PRJLIBNA
a580: 4d 45 09 3d 20 24 28 50 52 4a 4c 49 42 4e 41 4d  ME.= $(PRJLIBNAM
a590: 45 39 29 0d 0a 21 65 6e 64 69 66 0d 0a 50 52 4a  E9)..!endif..PRJ
a5a0: 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 52  LIB..= $(OUT_DIR
a5b0: 29 5c 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 0d  )\$(PRJLIBNAME).
a5c0: 0a 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a  ...!if $(TCL_MAJ
a5d0: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38  OR_VERSION) == 8
a5e0: 0d 0a 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45  ..PRJSTUBLIBNAME
a5f0: 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 58 29  .= $(STUBPREFIX)
a600: 24 28 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0d 0a  $(VERSION).lib..
a610: 21 65 6c 73 65 0d 0a 50 52 4a 53 54 55 42 4c 49  !else..PRJSTUBLI
a620: 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52  BNAME.= $(STUBPR
a630: 45 46 49 58 29 2e 6c 69 62 0d 0a 21 65 6e 64 69  EFIX).lib..!endi
a640: 66 0d 0a 50 52 4a 53 54 55 42 4c 49 42 09 3d 20  f..PRJSTUBLIB.= 
a650: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4a  $(OUT_DIR)\$(PRJ
a660: 53 54 55 42 4c 49 42 4e 41 4d 45 29 0d 0a 0d 0a  STUBLIBNAME)....
a670: 23 20 49 66 20 65 78 74 65 6e 73 69 6f 6e 20 70  # If extension p
a680: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68  arent makefile h
a690: 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 61  as not defined a
a6a0: 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 6e 69   resource defini
a6b0: 74 69 6f 6e 20 66 69 6c 65 2c 0d 0a 23 20 77 65  tion file,..# we
a6c0: 20 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f   will generate o
a6d0: 6e 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 64  ne from standard
a6e0: 20 74 65 6d 70 6c 61 74 65 2e 0d 0a 21 69 66 20   template...!if 
a6f0: 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26  !$(DOING_TCL) &&
a700: 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26   !$(DOING_TK) &&
a710: 20 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44   !$(STATIC_BUILD
a720: 29 0d 0a 21 69 66 64 65 66 20 52 43 46 49 4c 45  )..!ifdef RCFILE
a730: 0d 0a 52 45 53 46 49 4c 45 20 3d 20 24 28 54 4d  ..RESFILE = $(TM
a740: 50 5f 44 49 52 29 5c 24 28 52 43 46 49 4c 45 3a  P_DIR)\$(RCFILE:
a750: 2e 72 63 3d 2e 72 65 73 29 0d 0a 21 65 6c 73 65  .rc=.res)..!else
a760: 0d 0a 52 45 53 46 49 4c 45 20 3d 20 24 28 54 4d  ..RESFILE = $(TM
a770: 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54  P_DIR)\$(PROJECT
a780: 29 2e 72 65 73 0d 0a 21 65 6e 64 69 66 0d 0a 21  ).res..!endif..!
a790: 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23  endif....#######
a7a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a7b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a7c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
a7d0: 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20  ############..# 
a7e0: 31 31 2e 20 43 6f 6e 73 74 72 75 63 74 20 74 68  11. Construct th
a7f0: 65 20 70 61 74 68 73 20 66 6f 72 20 74 68 65 20  e paths for the 
a800: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 64 69 72  installation dir
a810: 65 63 74 6f 72 69 65 73 0d 0a 23 20 54 68 65 20  ectories..# The 
a820: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73  following macros
a830: 20 67 65 74 20 64 65 66 69 6e 65 64 20 69 6e 20   get defined in 
a840: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0d 0a 23  this section:..#
a850: 20 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52   LIB_INSTALL_DIR
a860: 20 2d 20 77 68 65 72 65 20 6c 69 62 72 61 72 69   - where librari
a870: 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73  es should be ins
a880: 74 61 6c 6c 65 64 0d 0a 23 20 42 49 4e 5f 49 4e  talled..# BIN_IN
a890: 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72  STALL_DIR - wher
a8a0: 65 20 74 68 65 20 65 78 65 63 75 74 61 62 6c 65  e the executable
a8b0: 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74  s should be inst
a8c0: 61 6c 6c 65 64 0d 0a 23 20 44 4f 43 5f 49 4e 53  alled..# DOC_INS
a8d0: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65  TALL_DIR - where
a8e0: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 73   documentation s
a8f0: 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c  hould be install
a900: 65 64 0d 0a 23 20 53 43 52 49 50 54 5f 49 4e 53  ed..# SCRIPT_INS
a910: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65  TALL_DIR - where
a920: 20 73 63 72 69 70 74 73 20 73 68 6f 75 6c 64 20   scripts should 
a930: 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d 0a 23 20  be installed..# 
a940: 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f  INCLUDE_INSTALL_
a950: 44 49 52 20 2d 20 77 68 65 72 65 20 43 20 69 6e  DIR - where C in
a960: 63 6c 75 64 65 20 66 69 6c 65 73 20 73 68 6f 75  clude files shou
a970: 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0d  ld be installed.
a980: 0a 23 20 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f  .# DEMO_INSTALL_
a990: 44 49 52 20 2d 20 77 68 65 72 65 20 64 65 6d 6f  DIR - where demo
a9a0: 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74  s should be inst
a9b0: 61 6c 6c 65 64 0d 0a 23 20 50 52 4a 5f 49 4e 53  alled..# PRJ_INS
a9c0: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65  TALL_DIR - where
a9d0: 20 70 61 63 6b 61 67 65 20 77 69 6c 6c 20 62 65   package will be
a9e0: 20 69 6e 73 74 61 6c 6c 65 64 20 28 6e 6f 74 20   installed (not 
a9f0: 73 65 74 20 66 6f 72 20 54 63 6c 20 61 6e 64 20  set for Tcl and 
aa00: 54 6b 29 0d 0a 0d 0a 21 69 66 20 24 28 44 4f 49  Tk)....!if $(DOI
aa10: 4e 47 5f 54 43 4c 29 20 7c 7c 20 24 28 44 4f 49  NG_TCL) || $(DOI
aa20: 4e 47 5f 54 4b 29 0d 0a 4c 49 42 5f 49 4e 53 54  NG_TK)..LIB_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 6c 69 62 0d 0a 42  STALLDIR)\lib..B
aa50: 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09  IN_INSTALL_DIR..
aa60: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29  = $(_INSTALLDIR)
aa70: 5c 62 69 6e 0d 0a 44 4f 43 5f 49 4e 53 54 41 4c  \bin..DOC_INSTAL
aa80: 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54  L_DIR..= $(_INST
aa90: 41 4c 4c 44 49 52 29 5c 64 6f 63 0d 0a 21 69 66  ALLDIR)\doc..!if
aaa0: 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a 53   $(DOING_TCL)..S
aab0: 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49  CRIPT_INSTALL_DI
aac0: 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49  R.= $(_INSTALLDI
aad0: 52 29 5c 6c 69 62 5c 24 28 50 52 4f 4a 45 43 54  R)\lib\$(PROJECT
aae0: 29 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52  )$(TCL_MAJOR_VER
aaf0: 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f  SION).$(TCL_MINO
ab00: 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 4d 4f 44 55  R_VERSION)..MODU
ab10: 4c 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d  LE_INSTALL_DIR.=
ab20: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c   $(_INSTALLDIR)\
ab30: 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 4d 41 4a  lib\tcl$(TCL_MAJ
ab40: 4f 52 5f 56 45 52 53 49 4f 4e 29 0d 0a 21 65 6c  OR_VERSION)..!el
ab50: 73 65 20 23 20 44 4f 49 4e 47 5f 54 4b 0d 0a 53  se # DOING_TK..S
ab60: 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49  CRIPT_INSTALL_DI
ab70: 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49  R.= $(_INSTALLDI
ab80: 52 29 5c 6c 69 62 5c 24 28 50 52 4f 4a 45 43 54  R)\lib\$(PROJECT
ab90: 29 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53  )$(TK_MAJOR_VERS
aba0: 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f  ION).$(TK_MINOR_
abb0: 56 45 52 53 49 4f 4e 29 0d 0a 21 65 6e 64 69 66  VERSION)..!endif
abc0: 0d 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44  ..DEMO_INSTALL_D
abd0: 49 52 09 3d 20 24 28 53 43 52 49 50 54 5f 49 4e  IR.= $(SCRIPT_IN
abe0: 53 54 41 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f 73  STALL_DIR)\demos
abf0: 0d 0a 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c  ..INCLUDE_INSTAL
ac00: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41  L_DIR.= $(_INSTA
ac10: 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 0d 0a  LLDIR)\include..
ac20: 0d 0a 21 65 6c 73 65 20 23 20 65 78 74 65 6e 73  ..!else # extens
ac30: 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54  ion other than T
ac40: 6b 0d 0a 0d 0a 50 52 4a 5f 49 4e 53 54 41 4c 4c  k....PRJ_INSTALL
ac50: 5f 44 49 52 20 20 20 20 20 20 20 20 20 3d 20 24  _DIR         = $
ac60: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 24 28  (_INSTALLDIR)\$(
ac70: 50 52 4f 4a 45 43 54 29 24 28 44 4f 54 56 45 52  PROJECT)$(DOTVER
ac80: 53 49 4f 4e 29 0d 0a 21 69 66 20 24 28 4d 55 4c  SION)..!if $(MUL
ac90: 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41  TIPLATFORM_INSTA
aca0: 4c 4c 29 0d 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c  LL)..LIB_INSTALL
acb0: 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e  _DIR..= $(PRJ_IN
acc0: 53 54 41 4c 4c 5f 44 49 52 29 5c 24 28 50 4c 41  STALL_DIR)\$(PLA
acd0: 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 0d  TFORM_IDENTIFY).
ace0: 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52  .BIN_INSTALL_DIR
acf0: 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c  ..= $(PRJ_INSTAL
ad00: 4c 5f 44 49 52 29 5c 24 28 50 4c 41 54 46 4f 52  L_DIR)\$(PLATFOR
ad10: 4d 5f 49 44 45 4e 54 49 46 59 29 0d 0a 21 65 6c  M_IDENTIFY)..!el
ad20: 73 65 0d 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f  se..LIB_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 42 49 4e 5f 49  TALL_DIR)..BIN_I
ad50: 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28  NSTALL_DIR..= $(
ad60: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29  PRJ_INSTALL_DIR)
ad70: 0d 0a 21 65 6e 64 69 66 0d 0a 44 4f 43 5f 49 4e  ..!endif..DOC_IN
ad80: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50  STALL_DIR..= $(P
ad90: 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0d  RJ_INSTALL_DIR).
ada0: 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f  .SCRIPT_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 0d 0a 44 45 4d 4f 5f 49  ALL_DIR)..DEMO_I
add0: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 50  NSTALL_DIR.= $(P
ade0: 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c  RJ_INSTALL_DIR)\
adf0: 64 65 6d 6f 73 0d 0a 49 4e 43 4c 55 44 45 5f 49  demos..INCLUDE_I
ae00: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f  NSTALL_DIR.= $(_
ae10: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 5c 69  INSTALLDIR)\..\i
ae20: 6e 63 6c 75 64 65 0d 0a 0d 0a 21 65 6e 64 69 66  nclude....!endif
ae30: 0d 0a 0d 0a 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: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
ae60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
ae70: 23 23 23 23 23 23 23 0d 0a 23 20 31 32 2e 20 53  #######..# 12. S
ae80: 65 74 20 75 70 20 61 63 74 75 61 6c 20 6f 70 74  et up actual opt
ae90: 69 6f 6e 73 20 74 6f 20 62 65 20 70 61 73 73 65  ions to be passe
aea0: 64 20 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65  d to the compile
aeb0: 72 20 61 6e 64 20 6c 69 6e 6b 65 72 0d 0a 23 20  r and linker..# 
aec0: 4e 6f 77 20 77 65 20 68 61 76 65 20 61 6c 6c 20  Now we have all 
aed0: 74 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20  the information 
aee0: 77 65 20 6e 65 65 64 2c 20 73 65 74 20 75 70 20  we need, set up 
aef0: 74 68 65 20 61 63 74 75 61 6c 20 66 6c 61 67 73  the actual flags
af00: 20 61 6e 64 0d 0a 23 20 6f 70 74 69 6f 6e 73 20   and..# options 
af10: 74 68 61 74 20 77 65 20 77 69 6c 6c 20 70 61 73  that we will pas
af20: 73 20 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65  s to the compile
af30: 72 20 61 6e 64 20 6c 69 6e 6b 65 72 2e 20 54 68  r and linker. Th
af40: 65 20 6d 61 69 6e 0d 0a 23 20 6d 61 6b 65 66 69  e main..# makefi
af50: 6c 65 20 73 68 6f 75 6c 64 20 75 73 65 20 74 68  le should use th
af60: 65 73 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69  ese in combinati
af70: 6f 6e 20 77 69 74 68 20 77 68 61 74 65 76 65 72  on with whatever
af80: 20 6f 74 68 65 72 20 66 6c 61 67 73 0d 0a 23 20   other flags..# 
af90: 61 6e 64 20 73 77 69 74 63 68 65 73 20 61 72 65  and switches are
afa0: 20 73 70 65 63 69 66 69 63 20 74 6f 20 69 74 2e   specific to it.
afb0: 0d 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e  ..# The followin
afc0: 67 20 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66  g macros are def
afd0: 69 6e 65 64 2c 20 6e 61 6d 65 73 20 61 72 65 20  ined, names are 
afe0: 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c 20 63  for historical c
aff0: 6f 6d 70 61 74 69 62 69 6c 69 74 79 3a 0d 0a 23  ompatibility:..#
b000: 20 4f 50 54 44 45 46 49 4e 45 53 20 2d 20 2f 44   OPTDEFINES - /D
b010: 78 78 78 20 43 20 6d 61 63 72 6f 20 66 6c 61 67  xxx C macro flag
b020: 73 20 62 61 73 65 64 20 6f 6e 20 75 73 65 72 2d  s based on user-
b030: 73 70 65 63 69 66 69 65 64 20 4f 50 54 53 0d 0a  specified OPTS..
b040: 23 20 43 4f 4d 50 49 4c 45 52 46 4c 41 47 53 20  # COMPILERFLAGS 
b050: 2d 20 2f 44 78 78 78 20 43 20 6d 61 63 72 6f 20  - /Dxxx C macro 
b060: 66 6c 61 67 73 20 69 6e 64 65 70 65 6e 64 65 6e  flags independen
b070: 74 20 6f 66 20 61 6e 79 20 63 6f 6e 66 69 67 75  t of any configu
b080: 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 0d 0a  ration options..
b090: 23 20 63 72 74 20 2d 20 43 6f 6d 70 69 6c 65 72  # crt - Compiler
b0a0: 20 73 77 69 74 63 68 20 74 68 61 74 20 73 65 6c   switch that sel
b0b0: 65 63 74 73 20 74 68 65 20 61 70 70 72 6f 70 72  ects the appropr
b0c0: 69 61 74 65 20 43 20 72 75 6e 74 69 6d 65 0d 0a  iate C runtime..
b0d0: 23 20 63 64 65 62 75 67 20 2d 20 43 6f 6d 70 69  # cdebug - Compi
b0e0: 6c 65 72 20 73 77 69 74 63 68 65 73 20 72 65 6c  ler switches rel
b0f0: 61 74 65 64 20 74 6f 20 64 65 62 75 67 20 41 4e  ated to debug AN
b100: 44 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 0d  D optimizations.
b110: 0a 23 20 63 77 61 72 6e 20 2d 20 43 6f 6d 70 69  .# cwarn - Compi
b120: 6c 65 72 20 73 77 69 74 63 68 65 73 20 74 68 61  ler switches tha
b130: 74 20 73 65 74 20 77 61 72 6e 69 6e 67 20 6c 65  t set warning le
b140: 76 65 6c 73 0d 0a 23 20 63 66 6c 61 67 73 20 2d  vels..# cflags -
b150: 20 63 6f 6d 70 6c 65 74 65 20 63 6f 6d 70 69 6c   complete compil
b160: 65 72 20 73 77 69 74 63 68 65 73 20 28 73 75 62  er switches (sub
b170: 73 75 6d 65 73 20 63 64 65 62 75 67 20 61 6e 64  sumes cdebug and
b180: 20 63 77 61 72 6e 29 0d 0a 23 20 6c 64 65 62 75   cwarn)..# ldebu
b190: 67 20 2d 20 4c 69 6e 6b 65 72 20 73 77 69 74 63  g - Linker switc
b1a0: 68 65 73 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20  hes controlling 
b1b0: 64 65 62 75 67 20 69 6e 66 6f 72 6d 61 74 69 6f  debug informatio
b1c0: 6e 20 61 6e 64 20 6f 70 74 69 6d 69 7a 61 74 69  n and optimizati
b1d0: 6f 6e 0d 0a 23 20 6c 66 6c 61 67 73 20 2d 20 63  on..# lflags - c
b1e0: 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73  omplete linker s
b1f0: 77 69 74 63 68 65 73 20 28 73 75 62 73 75 6d 65  witches (subsume
b200: 73 20 6c 64 65 62 75 67 29 20 65 78 63 65 70 74  s ldebug) except
b210: 20 73 75 62 73 79 73 74 65 6d 20 74 79 70 65 0d   subsystem type.
b220: 0a 23 20 64 6c 6c 6c 66 6c 61 67 73 20 2d 20 63  .# dlllflags - c
b230: 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73  omplete linker s
b240: 77 69 74 63 68 65 73 20 74 6f 20 62 75 69 6c 64  witches to build
b250: 20 44 4c 4c 73 20 28 73 75 62 73 75 6d 65 73 20   DLLs (subsumes 
b260: 6c 66 6c 61 67 73 29 0d 0a 23 20 63 6f 6e 6c 66  lflags)..# conlf
b270: 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20  lags - complete 
b280: 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20  linker switches 
b290: 66 6f 72 20 63 6f 6e 73 6f 6c 65 20 70 72 6f 67  for console prog
b2a0: 72 61 6d 20 28 73 75 62 73 75 6d 65 73 20 6c 66  ram (subsumes lf
b2b0: 6c 61 67 73 29 0d 0a 23 20 67 75 69 6c 66 6c 61  lags)..# guilfla
b2c0: 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69  gs - complete li
b2d0: 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 66 6f  nker switches fo
b2e0: 72 20 47 55 49 20 70 72 6f 67 72 61 6d 20 28 73  r GUI program (s
b2f0: 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 0d  ubsumes lflags).
b300: 0a 23 20 62 61 73 65 6c 69 62 73 20 2d 20 6d 69  .# baselibs - mi
b310: 6e 69 6d 75 6d 20 57 69 6e 64 6f 77 73 20 6c 69  nimum Windows li
b320: 62 72 61 72 69 65 73 20 72 65 71 75 69 72 65 64  braries required
b330: 2e 20 50 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c  . Parent makefil
b340: 65 20 63 61 6e 0d 0a 23 20 20 20 20 64 65 66 69  e can..#    defi
b350: 6e 65 20 50 52 4a 5f 4c 49 42 53 20 62 65 66 6f  ne PRJ_LIBS befo
b360: 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 6c  re including rul
b370: 65 73 2e 72 63 20 69 66 20 61 64 64 69 74 69 6f  es.rc if additio
b380: 6e 61 6c 20 6c 69 62 73 20 61 72 65 20 6e 65 65  nal libs are nee
b390: 64 65 64 0d 0a 0d 0a 4f 50 54 44 45 46 49 4e 45  ded....OPTDEFINE
b3a0: 53 09 3d 20 2f 44 53 54 44 43 5f 48 45 41 44 45  S.= /DSTDC_HEADE
b3b0: 52 53 20 2f 44 55 53 45 5f 4e 4d 41 4b 45 3d 31  RS /DUSE_NMAKE=1
b3c0: 0d 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f  ..!if $(VCVERSIO
b3d0: 4e 29 20 3e 20 31 36 30 30 0d 0a 4f 50 54 44 45  N) > 1600..OPTDE
b3e0: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46  FINES.= $(OPTDEF
b3f0: 49 4e 45 53 29 20 2f 44 48 41 56 45 5f 53 54 44  INES) /DHAVE_STD
b400: 49 4e 54 5f 48 3d 31 0d 0a 21 65 6c 73 65 0d 0a  INT_H=1..!else..
b410: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f  OPTDEFINES.= $(O
b420: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4d 50 5f  PTDEFINES) /DMP_
b430: 4e 4f 5f 53 54 44 49 4e 54 3d 31 0d 0a 21 65 6e  NO_STDINT=1..!en
b440: 64 69 66 0d 0a 21 69 66 20 24 28 56 43 56 45 52  dif..!if $(VCVER
b450: 53 49 4f 4e 29 20 3e 3d 20 31 38 30 30 0d 0a 4f  SION) >= 1800..O
b460: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50  PTDEFINES.= $(OP
b470: 54 44 45 46 49 4e 45 53 29 20 2f 44 48 41 56 45  TDEFINES) /DHAVE
b480: 5f 49 4e 54 54 59 50 45 53 5f 48 3d 31 20 2f 44  _INTTYPES_H=1 /D
b490: 48 41 56 45 5f 53 54 44 42 4f 4f 4c 5f 48 3d 31  HAVE_STDBOOL_H=1
b4a0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20  ..!endif....!if 
b4b0: 24 28 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 29  $(TCL_MEM_DEBUG)
b4c0: 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24  ..OPTDEFINES.= $
b4d0: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54  (OPTDEFINES) /DT
b4e0: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 0d 0a 21 65  CL_MEM_DEBUG..!e
b4f0: 6e 64 69 66 0d 0a 21 69 66 20 24 28 54 43 4c 5f  ndif..!if $(TCL_
b500: 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 29 0d 0a  COMPILE_DEBUG)..
b510: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f  OPTDEFINES.= $(O
b520: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c  PTDEFINES) /DTCL
b530: 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 2f  _COMPILE_DEBUG /
b540: 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 53 54 41  DTCL_COMPILE_STA
b550: 54 53 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20  TS..!endif..!if 
b560: 24 28 54 43 4c 5f 54 48 52 45 41 44 53 29 20 26  $(TCL_THREADS) &
b570: 26 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29  & $(TCL_VERSION)
b580: 20 3c 20 38 37 0d 0a 4f 50 54 44 45 46 49 4e 45   < 87..OPTDEFINE
b590: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53  S.= $(OPTDEFINES
b5a0: 29 20 2f 44 54 43 4c 5f 54 48 52 45 41 44 53 3d  ) /DTCL_THREADS=
b5b0: 31 0d 0a 21 69 66 20 24 28 55 53 45 5f 54 48 52  1..!if $(USE_THR
b5c0: 45 41 44 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28  EAD_ALLOC) && $(
b5d0: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38  TCL_VERSION) < 8
b5e0: 37 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20  7..OPTDEFINES.= 
b5f0: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44  $(OPTDEFINES) /D
b600: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43  USE_THREAD_ALLOC
b610: 3d 31 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64  =1..!endif..!end
b620: 69 66 0d 0a 21 69 66 20 24 28 53 54 41 54 49 43  if..!if $(STATIC
b630: 5f 42 55 49 4c 44 29 0d 0a 4f 50 54 44 45 46 49  _BUILD)..OPTDEFI
b640: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e  NES.= $(OPTDEFIN
b650: 45 53 29 20 2f 44 53 54 41 54 49 43 5f 42 55 49  ES) /DSTATIC_BUI
b660: 4c 44 0d 0a 21 65 6c 73 65 69 66 20 24 28 54 43  LD..!elseif $(TC
b670: 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0d  L_VERSION) > 86.
b680: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28  .OPTDEFINES.= $(
b690: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43  OPTDEFINES) /DTC
b6a0: 4c 5f 57 49 54 48 5f 45 58 54 45 52 4e 41 4c 5f  L_WITH_EXTERNAL_
b6b0: 54 4f 4d 4d 41 54 48 0d 0a 21 69 66 20 22 24 28  TOMMATH..!if "$(
b6c0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d  MACHINE)" == "AM
b6d0: 44 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 48 49  D64" || "$(MACHI
b6e0: 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0d  NE)" == "ARM64".
b6f0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28  .OPTDEFINES.= $(
b700: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4d 50  OPTDEFINES) /DMP
b710: 5f 36 34 42 49 54 0d 0a 21 65 6e 64 69 66 0d 0a  _64BIT..!endif..
b720: 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28 54 43  !endif..!if $(TC
b730: 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 29  L_NO_DEPRECATED)
b740: 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24  ..OPTDEFINES.= $
b750: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54  (OPTDEFINES) /DT
b760: 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44  CL_NO_DEPRECATED
b770: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20  ..!endif....!if 
b780: 24 28 55 53 45 5f 53 54 55 42 53 29 0d 0a 23 20  $(USE_STUBS)..# 
b790: 4e 6f 74 65 20 77 65 20 64 6f 20 6e 6f 74 20 64  Note we do not d
b7a0: 65 66 69 6e 65 20 55 53 45 5f 54 43 4c 5f 53 54  efine USE_TCL_ST
b7b0: 55 42 53 20 65 76 65 6e 20 77 68 65 6e 20 62 75  UBS even when bu
b7c0: 69 6c 64 69 6e 67 20 74 6b 20 73 69 6e 63 65 20  ilding tk since 
b7d0: 73 6f 6d 65 0d 0a 23 20 74 65 73 74 20 74 61 72  some..# test tar
b7e0: 67 65 74 73 20 69 6e 20 74 6b 20 64 6f 20 6e 6f  gets in tk do no
b7f0: 74 20 75 73 65 20 73 74 75 62 73 0d 0a 21 69 66  t use stubs..!if
b800: 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0d 0a   !$(DOING_TCL)..
b810: 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 20 20  USE_STUBS_DEFS  
b820: 3d 20 2f 44 55 53 45 5f 54 43 4c 5f 53 54 55 42  = /DUSE_TCL_STUB
b830: 53 20 2f 44 55 53 45 5f 54 43 4c 4f 4f 5f 53 54  S /DUSE_TCLOO_ST
b840: 55 42 53 0d 0a 21 69 66 20 24 28 4e 45 45 44 5f  UBS..!if $(NEED_
b850: 54 4b 29 0d 0a 55 53 45 5f 53 54 55 42 53 5f 44  TK)..USE_STUBS_D
b860: 45 46 53 20 20 3d 20 24 28 55 53 45 5f 53 54 55  EFS  = $(USE_STU
b870: 42 53 5f 44 45 46 53 29 20 2f 44 55 53 45 5f 54  BS_DEFS) /DUSE_T
b880: 4b 5f 53 54 55 42 53 0d 0a 21 65 6e 64 69 66 0d  K_STUBS..!endif.
b890: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20  .!endif..!endif 
b8a0: 23 20 55 53 45 5f 53 54 55 42 53 0d 0a 0d 0a 21  # USE_STUBS....!
b8b0: 69 66 20 21 24 28 44 45 42 55 47 29 0d 0a 4f 50  if !$(DEBUG)..OP
b8c0: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54  TDEFINES.= $(OPT
b8d0: 44 45 46 49 4e 45 53 29 20 2f 44 4e 44 45 42 55  DEFINES) /DNDEBU
b8e0: 47 0d 0a 21 69 66 20 24 28 4f 50 54 49 4d 49 5a  G..!if $(OPTIMIZ
b8f0: 49 4e 47 29 0d 0a 4f 50 54 44 45 46 49 4e 45 53  ING)..OPTDEFINES
b900: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29  .= $(OPTDEFINES)
b910: 20 2f 44 54 43 4c 5f 43 46 47 5f 4f 50 54 49 4d   /DTCL_CFG_OPTIM
b920: 49 5a 45 44 0d 0a 21 65 6e 64 69 66 0d 0a 21 65  IZED..!endif..!e
b930: 6e 64 69 66 0d 0a 21 69 66 20 24 28 50 52 4f 46  ndif..!if $(PROF
b940: 49 4c 45 29 0d 0a 4f 50 54 44 45 46 49 4e 45 53  ILE)..OPTDEFINES
b950: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29  .= $(OPTDEFINES)
b960: 20 2f 44 54 43 4c 5f 43 46 47 5f 50 52 4f 46 49   /DTCL_CFG_PROFI
b970: 4c 45 44 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66  LED..!endif..!if
b980: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d   "$(MACHINE)" ==
b990: 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 4d   "AMD64" || "$(M
b9a0: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d  ACHINE)" == "ARM
b9b0: 36 34 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09  64"..OPTDEFINES.
b9c0: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20  = $(OPTDEFINES) 
b9d0: 2f 44 54 43 4c 5f 43 46 47 5f 44 4f 36 34 42 49  /DTCL_CFG_DO64BI
b9e0: 54 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24  T..!endif..!if $
b9f0: 28 56 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 33  (VCVERSION) < 13
ba00: 30 30 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d  00..OPTDEFINES.=
ba10: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f   $(OPTDEFINES) /
ba20: 44 4e 4f 5f 53 54 52 54 4f 49 36 34 3d 31 0d 0a  DNO_STRTOI64=1..
ba30: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 24 28  !endif....!if $(
ba40: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f  TCL_MAJOR_VERSIO
ba50: 4e 29 20 3d 3d 20 38 0d 0a 21 69 66 20 22 24 28  N) == 8..!if "$(
ba60: 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f  _USE_64BIT_TIME_
ba70: 54 29 22 20 3d 3d 20 22 31 22 0d 0a 4f 50 54 44  T)" == "1"..OPTD
ba80: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45  EFINES.= $(OPTDE
ba90: 46 49 4e 45 53 29 20 2f 44 5f 55 53 45 5f 36 34  FINES) /D_USE_64
baa0: 42 49 54 5f 54 49 4d 45 5f 54 3d 31 0d 0a 21 65  BIT_TIME_T=1..!e
bab0: 6e 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 69  ndif..!endif..!i
bac0: 66 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46  f "$(TCL_BUILD_F
bad0: 4f 52 29 22 20 3d 3d 20 22 38 22 0d 0a 4f 50 54  OR)" == "8"..OPT
bae0: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44  DEFINES.= $(OPTD
baf0: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4d 41  EFINES) /DTCL_MA
bb00: 4a 4f 52 5f 56 45 52 53 49 4f 4e 3d 38 0d 0a 21  JOR_VERSION=8..!
bb10: 65 6e 64 69 66 0d 0a 21 69 66 20 22 24 28 54 4b  endif..!if "$(TK
bb20: 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20  _BUILD_FOR)" == 
bb30: 22 38 22 0d 0a 4f 50 54 44 45 46 49 4e 45 53 09  "8"..OPTDEFINES.
bb40: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20  = $(OPTDEFINES) 
bb50: 2f 44 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49  /DTK_MAJOR_VERSI
bb60: 4f 4e 3d 38 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a  ON=8..!endif....
bb70: 23 20 4c 69 6b 65 20 74 68 65 20 54 45 41 20 73  # Like the TEA s
bb80: 79 73 74 65 6d 20 6f 6e 6c 79 20 73 65 74 20 74  ystem only set t
bb90: 68 69 73 20 6e 6f 6e 20 65 6d 70 74 79 20 66 6f  his non empty fo
bba0: 72 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 6e 73 69  r non-Tk extensi
bbb0: 6f 6e 73 0d 0a 23 20 4e 6f 74 65 3a 20 73 6f 6d  ons..# Note: som
bbc0: 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 75 73 65  e extensions use
bbd0: 20 50 41 43 4b 41 47 45 5f 4e 41 4d 45 20 61 6e   PACKAGE_NAME an
bbe0: 64 20 6f 74 68 65 72 73 20 75 73 65 20 50 41 43  d others use PAC
bbf0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 0d 0a 23 20  KAGE_TCLNAME..# 
bc00: 73 6f 20 77 65 20 70 61 73 73 20 62 6f 74 68 0d  so we pass both.
bc10: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43  .!if !$(DOING_TC
bc20: 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54  L) && !$(DOING_T
bc30: 4b 29 0d 0a 50 4b 47 4e 41 4d 45 46 4c 41 47 53  K)..PKGNAMEFLAGS
bc40: 20 3d 20 2f 44 50 41 43 4b 41 47 45 5f 4e 41 4d   = /DPACKAGE_NAM
bc50: 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 43 4b 41  E="\"$(PRJ_PACKA
bc60: 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 20 5c  GE_TCLNAME)\"" \
bc70: 0d 0a 09 2f 44 50 41 43 4b 41 47 45 5f 54 43 4c  .../DPACKAGE_TCL
bc80: 4e 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41  NAME="\"$(PRJ_PA
bc90: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22  CKAGE_TCLNAME)\"
bca0: 22 20 5c 0d 0a 09 2f 44 50 41 43 4b 41 47 45 5f  " \.../DPACKAGE_
bcb0: 56 45 52 53 49 4f 4e 3d 22 5c 22 24 28 44 4f 54  VERSION="\"$(DOT
bcc0: 56 45 52 53 49 4f 4e 29 5c 22 22 20 5c 0d 0a 09  VERSION)\"" \...
bcd0: 2f 44 4d 4f 44 55 4c 45 5f 53 43 4f 50 45 3d 65  /DMODULE_SCOPE=e
bce0: 78 74 65 72 6e 0d 0a 21 65 6e 64 69 66 0d 0a 0d  xtern..!endif...
bcf0: 0a 23 20 63 72 74 20 70 69 63 6b 73 20 74 68 65  .# crt picks the
bd00: 20 43 20 72 75 6e 20 74 69 6d 65 20 62 61 73 65   C run time base
bd10: 64 20 6f 6e 20 73 65 6c 65 63 74 65 64 20 4f 50  d on selected OP
bd20: 54 53 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 54  TS..!if $(MSVCRT
bd30: 29 0d 0a 21 69 66 20 24 28 44 45 42 55 47 29 20  )..!if $(DEBUG) 
bd40: 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29  && !$(UNCHECKED)
bd50: 0d 0a 63 72 74 20 3d 20 2d 4d 44 64 0d 0a 21 65  ..crt = -MDd..!e
bd60: 6c 73 65 0d 0a 63 72 74 20 3d 20 2d 4d 44 0d 0a  lse..crt = -MD..
bd70: 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 0d 0a 21  !endif..!else..!
bd80: 69 66 20 24 28 44 45 42 55 47 29 20 26 26 20 21  if $(DEBUG) && !
bd90: 24 28 55 4e 43 48 45 43 4b 45 44 29 0d 0a 63 72  $(UNCHECKED)..cr
bda0: 74 20 3d 20 2d 4d 54 64 0d 0a 21 65 6c 73 65 0d  t = -MTd..!else.
bdb0: 0a 63 72 74 20 3d 20 2d 4d 54 0d 0a 21 65 6e 64  .crt = -MT..!end
bdc0: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20  if..!endif....# 
bdd0: 63 64 65 62 75 67 20 69 6e 63 6c 75 64 65 73 20  cdebug includes 
bde0: 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73  compiler options
bdf0: 20 66 6f 72 20 64 65 62 75 67 67 69 6e 67 20 61   for debugging a
be00: 73 20 77 65 6c 6c 20 61 73 20 6f 70 74 69 6d 69  s well as optimi
be10: 7a 61 74 69 6f 6e 2e 0d 0a 21 69 66 20 24 28 44  zation...!if $(D
be20: 45 42 55 47 29 0d 0a 0d 0a 23 20 49 6e 20 64 65  EBUG)....# In de
be30: 62 75 67 67 69 6e 67 20 6d 6f 64 65 2c 20 6f 70  bugging mode, op
be40: 74 69 6d 69 7a 61 74 69 6f 6e 73 20 6e 65 65 64  timizations need
be50: 20 74 6f 20 62 65 20 64 69 73 61 62 6c 65 64 0d   to be disabled.
be60: 0a 63 64 65 62 75 67 20 3d 20 2d 5a 69 20 2d 4f  .cdebug = -Zi -O
be70: 64 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 0d  d $(DEBUGFLAGS).
be80: 0a 0d 0a 21 65 6c 73 65 0d 0a 0d 0a 63 64 65 62  ...!else....cdeb
be90: 75 67 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54  ug = $(OPTIMIZAT
bea0: 49 4f 4e 53 29 0d 0a 21 69 66 20 24 28 53 59 4d  IONS)..!if $(SYM
beb0: 42 4f 4c 53 29 0d 0a 63 64 65 62 75 67 20 3d 20  BOLS)..cdebug = 
bec0: 24 28 63 64 65 62 75 67 29 20 2d 5a 69 0d 0a 21  $(cdebug) -Zi..!
bed0: 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e 64 69 66 20  endif....!endif 
bee0: 23 20 24 28 44 45 42 55 47 29 0d 0a 0d 0a 23 20  # $(DEBUG)....# 
bef0: 63 77 61 72 6e 20 69 6e 63 6c 75 64 65 73 20 64  cwarn includes d
bf00: 65 66 61 75 6c 74 20 77 61 72 6e 69 6e 67 20 6c  efault warning l
bf10: 65 76 65 6c 73 2c 20 61 6c 73 6f 20 43 34 30 39  evels, also C409
bf20: 30 20 28 62 75 67 67 79 29 20 61 6e 64 20 43 34  0 (buggy) and C4
bf30: 31 34 36 20 69 73 20 75 73 65 6c 65 73 73 2e 0d  146 is useless..
bf40: 0a 63 77 61 72 6e 20 3d 20 24 28 57 41 52 4e 49  .cwarn = $(WARNI
bf50: 4e 47 53 29 20 2d 77 64 34 30 39 30 20 2d 77 64  NGS) -wd4090 -wd
bf60: 34 31 34 36 0d 0a 0d 0a 21 69 66 20 22 24 28 4d  4146....!if "$(M
bf70: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44  ACHINE)" == "AMD
bf80: 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e  64" || "$(MACHIN
bf90: 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0d 0a  E)" == "ARM64"..
bfa0: 23 20 44 69 73 61 62 6c 65 20 70 6f 69 6e 74 65  # Disable pointe
bfb0: 72 3c 2d 3e 69 6e 74 20 77 61 72 6e 69 6e 67 73  r<->int warnings
bfc0: 20 72 65 6c 61 74 65 64 20 74 6f 20 63 61 73 74   related to cast
bfd0: 20 62 65 74 77 65 65 6e 20 64 69 66 66 65 72 65   between differe
bfe0: 6e 74 20 73 69 7a 65 73 0d 0a 23 20 54 68 65 72  nt sizes..# Ther
bff0: 65 20 61 72 65 20 61 20 67 61 64 7a 69 6c 6c 69  e are a gadzilli
c000: 6f 6e 20 6f 66 20 74 68 65 73 65 20 64 75 65 20  on of these due 
c010: 74 6f 20 75 73 65 20 6f 66 20 43 6c 69 65 6e 74  to use of Client
c020: 44 61 74 61 20 61 6e 64 0d 0a 23 20 63 6c 75 74  Data and..# clut
c030: 74 65 72 20 75 70 20 63 6f 6d 70 69 6c 65 72 0d  ter up compiler.
c040: 0a 23 20 6f 75 74 70 75 74 20 69 6e 63 72 65 61  .# output increa
c050: 73 69 6e 67 20 63 68 61 6e 63 65 20 6f 66 20 61  sing chance of a
c060: 20 72 65 61 6c 20 77 61 72 6e 69 6e 67 20 67 65   real warning ge
c070: 74 74 69 6e 67 20 6c 6f 73 74 2e 20 53 6f 20 64  tting lost. So d
c080: 69 73 61 62 6c 65 20 74 68 65 6d 2e 0d 0a 23 20  isable them...# 
c090: 45 76 65 6e 74 75 61 6c 6c 79 20 73 6f 6d 65 20  Eventually some 
c0a0: 64 61 79 2c 20 54 63 6c 20 77 69 6c 6c 20 62 65  day, Tcl will be
c0b0: 20 36 34 2d 62 69 74 20 63 6c 65 61 6e 2e 0d 0a   64-bit clean...
c0c0: 63 77 61 72 6e 20 3d 20 24 28 63 77 61 72 6e 29  cwarn = $(cwarn)
c0d0: 20 2d 77 64 34 33 31 31 20 2d 77 64 34 33 31 32   -wd4311 -wd4312
c0e0: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 20  ..!endif....### 
c0f0: 43 6f 6d 6d 6f 6e 20 63 6f 6d 70 69 6c 65 72 20  Common compiler 
c100: 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 61 72 65  options that are
c110: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 73 70   architecture sp
c120: 65 63 69 66 69 63 0d 0a 21 69 66 20 22 24 28 4d  ecific..!if "$(M
c130: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d  ACHINE)" == "ARM
c140: 22 0d 0a 63 61 72 63 68 20 3d 20 2f 44 5f 41 52  "..carch = /D_AR
c150: 4d 5f 57 49 4e 41 50 49 5f 50 41 52 54 49 54 49  M_WINAPI_PARTITI
c160: 4f 4e 5f 44 45 53 4b 54 4f 50 5f 53 44 4b 5f 41  ON_DESKTOP_SDK_A
c170: 56 41 49 4c 41 42 4c 45 0d 0a 21 65 6c 73 65 0d  VAILABLE..!else.
c180: 0a 63 61 72 63 68 20 3d 0d 0a 21 65 6e 64 69 66  .carch =..!endif
c190: 0d 0a 0d 0a 23 20 63 70 75 69 64 20 69 73 20 6f  ....# cpuid is o
c1a0: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 6f 6e  nly available on
c1b0: 20 69 6e 74 65 6c 20 6d 61 63 68 69 6e 65 73 0d   intel machines.
c1c0: 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29  .!if "$(MACHINE)
c1d0: 22 20 3d 3d 20 22 49 58 38 36 22 20 7c 7c 20 22  " == "IX86" || "
c1e0: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22  $(MACHINE)" == "
c1f0: 41 4d 44 36 34 22 0d 0a 63 61 72 63 68 20 3d 20  AMD64"..carch = 
c200: 24 28 63 61 72 63 68 29 20 2f 44 48 41 56 45 5f  $(carch) /DHAVE_
c210: 43 50 55 49 44 3d 31 0d 0a 21 65 6e 64 69 66 0d  CPUID=1..!endif.
c220: 0a 0d 0a 21 69 66 20 24 28 44 45 42 55 47 29 0d  ...!if $(DEBUG).
c230: 0a 23 20 54 75 72 6e 20 77 61 72 6e 69 6e 67 73  .# Turn warnings
c240: 20 69 6e 74 6f 20 65 72 72 6f 72 73 0d 0a 63 77   into errors..cw
c250: 61 72 6e 20 3d 20 24 28 63 77 61 72 6e 29 20 2d  arn = $(cwarn) -
c260: 57 58 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 49 4e  WX..!endif....IN
c270: 43 4c 55 44 45 53 20 3d 20 24 28 54 43 4c 5f 49  CLUDES = $(TCL_I
c280: 4e 43 4c 55 44 45 53 29 20 24 28 54 4b 5f 49 4e  NCLUDES) $(TK_IN
c290: 43 4c 55 44 45 53 29 20 24 28 50 52 4a 5f 49 4e  CLUDES) $(PRJ_IN
c2a0: 43 4c 55 44 45 53 29 0d 0a 21 69 66 20 21 24 28  CLUDES)..!if !$(
c2b0: 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24  DOING_TCL) && !$
c2c0: 28 44 4f 49 4e 47 5f 54 4b 29 0d 0a 49 4e 43 4c  (DOING_TK)..INCL
c2d0: 55 44 45 53 20 3d 20 24 28 49 4e 43 4c 55 44 45  UDES = $(INCLUDE
c2e0: 53 29 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44  S) -I"$(GENERICD
c2f0: 49 52 29 22 20 2d 49 22 24 28 57 49 4e 5f 44 49  IR)" -I"$(WIN_DI
c300: 52 29 22 20 2d 49 22 24 28 43 4f 4d 50 41 54 44  R)" -I"$(COMPATD
c310: 49 52 29 22 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a  IR)"..!endif....
c320: 23 20 54 68 65 73 65 20 66 6c 61 67 73 20 61 72  # These flags ar
c330: 65 20 64 65 66 69 6e 65 64 20 72 6f 75 67 68 6c  e defined roughl
c340: 79 20 69 6e 20 74 68 65 20 6f 72 64 65 72 20 6f  y in the order o
c350: 66 20 74 68 65 20 70 72 65 2d 72 65 66 6f 72 6d  f the pre-reform
c360: 0d 0a 23 20 72 75 6c 65 73 2e 76 63 2f 6d 61 6b  ..# rules.vc/mak
c370: 65 66 69 6c 65 2e 76 63 20 74 6f 20 68 65 6c 70  efile.vc to help
c380: 20 76 69 73 75 61 6c 6c 79 20 63 6f 6d 70 61 72   visually compar
c390: 65 20 74 68 61 74 20 74 68 65 20 70 72 65 2d 20  e that the pre- 
c3a0: 61 6e 64 0d 0a 23 20 70 6f 73 74 2d 72 65 66 6f  and..# post-refo
c3b0: 72 6d 20 62 75 69 6c 64 20 6c 6f 67 73 0d 0a 0d  rm build logs...
c3c0: 0a 23 20 63 66 6c 61 67 73 20 63 6f 6e 74 61 69  .# cflags contai
c3d0: 6e 73 20 67 65 6e 65 72 69 63 20 66 6c 61 67 73  ns generic flags
c3e0: 20 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69   used for buildi
c3f0: 6e 67 20 70 72 61 63 74 69 63 61 6c 6c 79 20 61  ng practically a
c400: 6c 6c 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 0d  ll object files.
c410: 0a 63 66 6c 61 67 73 20 3d 20 2d 6e 6f 6c 6f 67  .cflags = -nolog
c420: 6f 20 2d 63 20 24 28 43 4f 4d 50 49 4c 45 52 46  o -c $(COMPILERF
c430: 4c 41 47 53 29 20 24 28 63 61 72 63 68 29 20 24  LAGS) $(carch) $
c440: 28 63 77 61 72 6e 29 20 2d 46 70 24 28 54 4d 50  (cwarn) -Fp$(TMP
c450: 5f 44 49 52 29 5e 5c 20 24 28 63 64 65 62 75 67  _DIR)^\ $(cdebug
c460: 29 0d 0a 0d 0a 21 69 66 20 24 28 54 43 4c 5f 4d  )....!if $(TCL_M
c470: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d  AJOR_VERSION) ==
c480: 20 38 20 26 26 20 24 28 54 43 4c 5f 4d 49 4e 4f   8 && $(TCL_MINO
c490: 52 5f 56 45 52 53 49 4f 4e 29 20 3c 20 37 0d 0a  R_VERSION) < 7..
c4a0: 63 66 6c 61 67 73 20 3d 20 24 28 63 66 6c 61 67  cflags = $(cflag
c4b0: 73 29 20 2d 44 54 63 6c 5f 53 69 7a 65 3d 69 6e  s) -DTcl_Size=in
c4c0: 74 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 61  t..!endif....# a
c4d0: 70 70 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e  ppcflags contain
c4e0: 73 20 24 28 63 66 6c 61 67 73 29 20 61 6e 64 20  s $(cflags) and 
c4f0: 66 6c 61 67 73 20 66 6f 72 20 62 75 69 6c 64 69  flags for buildi
c500: 6e 67 20 74 68 65 20 61 70 70 6c 69 63 61 74 69  ng the applicati
c510: 6f 6e 0d 0a 23 20 6f 62 6a 65 63 74 20 66 69 6c  on..# object fil
c520: 65 73 20 28 65 2e 67 2e 20 74 63 6c 73 68 2c 20  es (e.g. tclsh, 
c530: 6f 72 20 77 69 73 68 29 20 70 6b 67 63 66 6c 61  or wish) pkgcfla
c540: 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 66  gs contains $(cf
c550: 6c 61 67 73 29 20 70 6c 75 73 0d 0a 23 20 66 6c  lags) plus..# fl
c560: 61 67 73 20 75 73 65 64 20 66 6f 72 20 62 75 69  ags used for bui
c570: 6c 64 69 6e 67 20 73 68 61 72 65 64 20 6f 62 6a  lding shared obj
c580: 65 63 74 20 66 69 6c 65 73 20 54 68 65 20 74 77  ect files The tw
c590: 6f 20 64 69 66 66 65 72 20 69 6e 20 74 68 65 0d  o differ in the.
c5a0: 0a 23 20 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45  .# BUILD_$(PROJE
c5b0: 43 54 29 20 6d 61 63 72 6f 20 77 68 69 63 68 20  CT) macro which 
c5c0: 73 68 6f 75 6c 64 20 62 65 20 64 65 66 69 6e 65  should be define
c5d0: 64 20 6f 6e 6c 79 20 66 6f 72 20 74 68 65 20 73  d only for the s
c5e0: 68 61 72 65 64 0d 0a 23 20 6c 69 62 72 61 72 79  hared..# library
c5f0: 20 2a 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e   *implementation
c600: 2a 20 61 6e 64 20 6e 6f 74 20 66 6f 72 20 69 74  * and not for it
c610: 73 20 63 61 6c 6c 65 72 20 69 6e 74 65 72 66 61  s caller interfa
c620: 63 65 0d 0a 0d 0a 61 70 70 63 66 6c 61 67 73 5f  ce....appcflags_
c630: 6e 6f 73 74 75 62 73 20 3d 20 24 28 63 66 6c 61  nostubs = $(cfla
c640: 67 73 29 20 24 28 63 72 74 29 20 24 28 49 4e 43  gs) $(crt) $(INC
c650: 4c 55 44 45 53 29 20 24 28 54 43 4c 5f 44 45 46  LUDES) $(TCL_DEF
c660: 49 4e 45 53 29 20 24 28 50 52 4a 5f 44 45 46 49  INES) $(PRJ_DEFI
c670: 4e 45 53 29 20 24 28 4f 50 54 44 45 46 49 4e 45  NES) $(OPTDEFINE
c680: 53 29 0d 0a 61 70 70 63 66 6c 61 67 73 20 3d 20  S)..appcflags = 
c690: 24 28 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74  $(appcflags_nost
c6a0: 75 62 73 29 20 24 28 55 53 45 5f 53 54 55 42 53  ubs) $(USE_STUBS
c6b0: 5f 44 45 46 53 29 0d 0a 70 6b 67 63 66 6c 61 67  _DEFS)..pkgcflag
c6c0: 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 73 29  s = $(appcflags)
c6d0: 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29   $(PKGNAMEFLAGS)
c6e0: 20 2f 44 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45   /DBUILD_$(PROJE
c6f0: 43 54 29 0d 0a 70 6b 67 63 66 6c 61 67 73 5f 6e  CT)..pkgcflags_n
c700: 6f 73 74 75 62 73 20 3d 20 24 28 61 70 70 63 66  ostubs = $(appcf
c710: 6c 61 67 73 5f 6e 6f 73 74 75 62 73 29 20 24 28  lags_nostubs) $(
c720: 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29 20 2f 44  PKGNAMEFLAGS) /D
c730: 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29  BUILD_$(PROJECT)
c740: 0d 0a 0d 0a 23 20 73 74 75 62 73 63 66 6c 61 67  ....# stubscflag
c750: 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c  s contains $(cfl
c760: 61 67 73 29 20 70 6c 75 73 20 66 6c 61 67 73 20  ags) plus flags 
c770: 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e  used for buildin
c780: 67 20 61 20 73 74 75 62 73 0d 0a 23 20 6c 69 62  g a stubs..# lib
c790: 72 61 72 79 20 66 6f 72 20 74 68 65 20 70 61 63  rary for the pac
c7a0: 6b 61 67 65 2e 20 20 4e 6f 74 65 3a 20 2f 44 53  kage.  Note: /DS
c7b0: 54 41 54 49 43 5f 42 55 49 4c 44 20 69 73 20 64  TATIC_BUILD is d
c7c0: 65 66 69 6e 65 64 20 69 6e 0d 0a 23 20 24 28 4f  efined in..# $(O
c7d0: 50 54 44 45 46 49 4e 45 53 29 20 6f 6e 6c 79 20  PTDEFINES) only 
c7e0: 69 66 20 74 68 65 20 4f 50 54 53 20 63 6f 6e 66  if the OPTS conf
c7f0: 69 67 75 72 61 74 69 6f 6e 20 69 6e 64 69 63 61  iguration indica
c800: 74 65 73 20 61 20 73 74 61 74 69 63 0d 0a 23 20  tes a static..# 
c810: 6c 69 62 72 61 72 79 2e 20 48 6f 77 65 76 65 72  library. However
c820: 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 72 61   the stubs libra
c830: 72 79 20 69 73 20 41 4c 57 41 59 53 20 73 74 61  ry is ALWAYS sta
c840: 74 69 63 20 68 65 6e 63 65 20 69 6e 63 6c 75 64  tic hence includ
c850: 65 64 0d 0a 23 20 68 65 72 65 20 69 72 72 65 73  ed..# here irres
c860: 70 65 63 74 69 76 65 20 6f 66 20 74 68 65 20 4f  pective of the O
c870: 50 54 53 20 73 65 74 74 69 6e 67 2e 0d 0a 23 0d  PTS setting...#.
c880: 0a 23 20 54 42 44 20 2d 20 74 63 6c 76 66 73 20  .# TBD - tclvfs 
c890: 68 61 73 20 61 20 63 6f 6d 6d 65 6e 74 20 74 68  has a comment th
c8a0: 61 74 20 73 74 75 62 73 20 6c 69 62 73 20 73 68  at stubs libs sh
c8b0: 6f 75 6c 64 20 6e 6f 74 20 62 65 20 63 6f 6d 70  ould not be comp
c8c0: 69 6c 65 64 20 77 69 74 68 20 2d 47 4c 0d 0a 23  iled with -GL..#
c8d0: 20 77 69 74 68 6f 75 74 20 73 74 61 74 69 6e 67   without stating
c8e0: 20 77 68 79 2e 20 54 63 6c 20 69 74 73 65 6c 66   why. Tcl itself
c8f0: 20 63 6f 6d 70 69 6c 65 64 20 73 74 75 62 73 20   compiled stubs 
c900: 6c 69 62 73 20 77 69 74 68 20 74 68 69 73 20 66  libs with this f
c910: 6c 61 67 2e 0d 0a 23 20 73 6f 20 77 65 20 64 6f  lag...# so we do
c920: 20 6e 6f 74 20 72 65 6d 6f 76 65 20 69 74 20 66   not remove it f
c930: 72 6f 6d 20 63 66 6c 61 67 73 2e 20 2d 47 4c 20  rom cflags. -GL 
c940: 6d 61 79 20 70 72 65 76 65 6e 74 20 65 78 74 65  may prevent exte
c950: 6e 73 69 6f 6e 73 0d 0a 23 20 63 6f 6d 70 69 6c  nsions..# compil
c960: 65 64 20 77 69 74 68 20 6f 6e 65 20 56 43 20 76  ed with one VC v
c970: 65 72 73 69 6f 6e 20 74 6f 20 66 61 69 6c 20 74  ersion to fail t
c980: 6f 20 6c 69 6e 6b 20 61 67 61 69 6e 73 74 20 73  o link against s
c990: 74 75 62 73 20 6c 69 62 72 61 72 79 0d 0a 23 20  tubs library..# 
c9a0: 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 61 6e  compiled with an
c9b0: 6f 74 68 65 72 20 56 43 20 76 65 72 73 69 6f 6e  other VC version
c9c0: 2e 20 43 68 65 63 6b 20 66 6f 72 20 74 68 69 73  . Check for this
c9d0: 20 61 6e 64 20 66 69 78 20 61 63 63 6f 72 64 69   and fix accordi
c9e0: 6e 67 6c 79 2e 0d 0a 73 74 75 62 73 63 66 6c 61  ngly...stubscfla
c9f0: 67 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 24  gs = $(cflags) $
ca00: 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29 20 24  (PKGNAMEFLAGS) $
ca10: 28 50 52 4a 5f 44 45 46 49 4e 45 53 29 20 24 28  (PRJ_DEFINES) $(
ca20: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 5a 6c 20  OPTDEFINES) /Zl 
ca30: 2f 47 4c 2d 20 2f 44 53 54 41 54 49 43 5f 42 55  /GL- /DSTATIC_BU
ca40: 49 4c 44 20 24 28 49 4e 43 4c 55 44 45 53 29 20  ILD $(INCLUDES) 
ca50: 24 28 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53  $(USE_STUBS_DEFS
ca60: 29 0d 0a 0d 0a 23 20 4c 69 6e 6b 20 66 6c 61 67  )....# Link flag
ca70: 73 0d 0a 0d 0a 21 69 66 20 24 28 44 45 42 55 47  s....!if $(DEBUG
ca80: 29 0d 0a 6c 64 65 62 75 67 09 3d 20 2d 64 65 62  )..ldebug.= -deb
ca90: 75 67 20 2d 64 65 62 75 67 74 79 70 65 3a 63 76  ug -debugtype:cv
caa0: 0d 0a 21 65 6c 73 65 0d 0a 6c 64 65 62 75 67 09  ..!else..ldebug.
cab0: 3d 20 2d 72 65 6c 65 61 73 65 20 2d 6f 70 74 3a  = -release -opt:
cac0: 72 65 66 20 2d 6f 70 74 3a 69 63 66 2c 33 0d 0a  ref -opt:icf,3..
cad0: 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 29 0d 0a  !if $(SYMBOLS)..
cae0: 6c 64 65 62 75 67 09 3d 20 24 28 6c 64 65 62 75  ldebug.= $(ldebu
caf0: 67 29 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67  g) -debug -debug
cb00: 74 79 70 65 3a 63 76 0d 0a 21 65 6e 64 69 66 0d  type:cv..!endif.
cb10: 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 4e 6f 74  .!endif....# Not
cb20: 65 3a 20 50 72 6f 66 69 6c 69 6e 67 20 69 73 20  e: Profiling is 
cb30: 63 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 70  currently only p
cb40: 6f 73 73 69 62 6c 65 20 77 69 74 68 20 74 68 65  ossible with the
cb50: 20 56 69 73 75 61 6c 20 53 74 75 64 69 6f 20 45   Visual Studio E
cb60: 6e 74 65 72 70 72 69 73 65 0d 0a 21 69 66 20 24  nterprise..!if $
cb70: 28 50 52 4f 46 49 4c 45 29 0d 0a 6c 64 65 62 75  (PROFILE)..ldebu
cb80: 67 3d 20 24 28 6c 64 65 62 75 67 29 20 2d 70 72  g= $(ldebug) -pr
cb90: 6f 66 69 6c 65 0d 0a 21 65 6e 64 69 66 0d 0a 0d  ofile..!endif...
cba0: 0a 23 23 23 20 44 65 63 6c 61 72 61 74 69 6f 6e  .### Declaration
cbb0: 73 20 63 6f 6d 6d 6f 6e 20 74 6f 20 61 6c 6c 20  s common to all 
cbc0: 6c 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 0d  linker versions.
cbd0: 0a 6c 66 6c 61 67 73 09 3d 20 2d 6e 6f 6c 6f 67  .lflags.= -nolog
cbe0: 6f 20 2d 6d 61 63 68 69 6e 65 3a 24 28 4d 41 43  o -machine:$(MAC
cbf0: 48 49 4e 45 29 20 24 28 4c 49 4e 4b 45 52 46 4c  HINE) $(LINKERFL
cc00: 41 47 53 29 20 24 28 6c 64 65 62 75 67 29 0d 0a  AGS) $(ldebug)..
cc10: 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 54 29 20  ..!if $(MSVCRT) 
cc20: 26 26 20 21 28 24 28 44 45 42 55 47 29 20 26 26  && !($(DEBUG) &&
cc30: 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 29 20   !$(UNCHECKED)) 
cc40: 26 26 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20  && $(VCVERSION) 
cc50: 3e 3d 20 31 39 30 30 0d 0a 6c 66 6c 61 67 73 09  >= 1900..lflags.
cc60: 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 6e 6f 64  = $(lflags) -nod
cc70: 65 66 61 75 6c 74 6c 69 62 3a 6c 69 62 75 63 72  efaultlib:libucr
cc80: 74 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d 0a 0d  t.lib..!endif...
cc90: 0a 64 6c 6c 6c 66 6c 61 67 73 20 3d 20 24 28 6c  .dlllflags = $(l
cca0: 66 6c 61 67 73 29 20 2d 64 6c 6c 0d 0a 63 6f 6e  flags) -dll..con
ccb0: 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67  lflags = $(lflag
ccc0: 73 29 20 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f  s) -subsystem:co
ccd0: 6e 73 6f 6c 65 0d 0a 67 75 69 6c 66 6c 61 67 73  nsole..guilflags
cce0: 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 73 75   = $(lflags) -su
ccf0: 62 73 79 73 74 65 6d 3a 77 69 6e 64 6f 77 73 0d  bsystem:windows.
cd00: 0a 0d 0a 23 20 4c 69 62 72 61 72 69 65 73 20 74  ...# Libraries t
cd10: 68 61 74 20 61 72 65 20 72 65 71 75 69 72 65 64  hat are required
cd20: 20 66 6f 72 20 65 76 65 72 79 20 69 6d 61 67 65   for every image
cd30: 2e 0d 0a 23 20 45 78 74 65 6e 73 69 6f 6e 73 20  ...# Extensions 
cd40: 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 61 6e  should define an
cd50: 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 6c 69 62  y additional lib
cd60: 72 61 72 69 65 73 20 77 69 74 68 20 24 28 50 52  raries with $(PR
cd70: 4a 5f 4c 49 42 53 29 0d 0a 77 69 6e 6c 69 62 73  J_LIBS)..winlibs
cd80: 20 20 20 3d 20 6b 65 72 6e 65 6c 33 32 2e 6c 69     = kernel32.li
cd90: 62 20 61 64 76 61 70 69 33 32 2e 6c 69 62 0d 0a  b advapi32.lib..
cda0: 0d 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29  ..!if $(NEED_TK)
cdb0: 0d 0a 77 69 6e 6c 69 62 73 20 3d 20 24 28 77 69  ..winlibs = $(wi
cdc0: 6e 6c 69 62 73 29 20 67 64 69 33 32 2e 6c 69 62  nlibs) gdi32.lib
cdd0: 20 75 73 65 72 33 32 2e 6c 69 62 20 75 78 74 68   user32.lib uxth
cde0: 65 6d 65 2e 6c 69 62 0d 0a 21 65 6e 64 69 66 0d  eme.lib..!endif.
cdf0: 0a 0d 0a 23 20 41 76 6f 69 64 20 27 75 6e 72 65  ...# Avoid 'unre
ce00: 73 6f 6c 76 65 64 20 65 78 74 65 72 6e 61 6c 20  solved external 
ce10: 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 75 72 69 74  symbol __securit
ce20: 79 5f 63 6f 6f 6b 69 65 27 20 65 72 72 6f 72 73  y_cookie' errors
ce30: 2e 0d 0a 23 20 63 2e 66 2e 20 68 74 74 70 3a 2f  ...# c.f. http:/
ce40: 2f 73 75 70 70 6f 72 74 2e 6d 69 63 72 6f 73 6f  /support.microso
ce50: 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 39 34 35 37  ft.com/?id=89457
ce60: 33 0d 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e  3..!if "$(MACHIN
ce70: 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0d 0a  E)" == "AMD64"..
ce80: 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29  !if $(VCVERSION)
ce90: 20 3e 20 31 33 39 39 20 26 26 20 24 28 56 43 56   > 1399 && $(VCV
cea0: 45 52 53 49 4f 4e 29 20 3c 20 31 35 30 30 0d 0a  ERSION) < 1500..
ceb0: 77 69 6e 6c 69 62 73 20 20 20 3d 20 24 28 77 69  winlibs   = $(wi
cec0: 6e 6c 69 62 73 29 20 62 75 66 66 65 72 6f 76 65  nlibs) bufferove
ced0: 72 66 6c 6f 77 55 2e 6c 69 62 0d 0a 21 65 6e 64  rflowU.lib..!end
cee0: 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 62 61  if..!endif....ba
cef0: 73 65 6c 69 62 73 20 3d 20 24 28 77 69 6e 6c 69  selibs = $(winli
cf00: 62 73 29 20 24 28 50 52 4a 5f 4c 49 42 53 29 0d  bs) $(PRJ_LIBS).
cf10: 0a 0d 0a 21 69 66 20 24 28 4d 53 56 43 52 54 29  ...!if $(MSVCRT)
cf20: 20 26 26 20 21 28 24 28 44 45 42 55 47 29 20 26   && !($(DEBUG) &
cf30: 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 29  & !$(UNCHECKED))
cf40: 20 26 26 20 24 28 56 43 56 45 52 53 49 4f 4e 29   && $(VCVERSION)
cf50: 20 3e 3d 20 31 39 30 30 0d 0a 62 61 73 65 6c 69   >= 1900..baseli
cf60: 62 73 20 20 20 3d 20 24 28 62 61 73 65 6c 69 62  bs   = $(baselib
cf70: 73 29 20 75 63 72 74 2e 6c 69 62 0d 0a 21 65 6e  s) ucrt.lib..!en
cf80: 64 69 66 0d 0a 0d 0a 23 23 23 23 23 23 23 23 23  dif....#########
cf90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
cfa0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
cfb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
cfc0: 23 23 23 23 23 23 23 0d 0a 23 20 31 33 2e 20 44  #######..# 13. D
cfd0: 65 66 69 6e 65 20 73 74 61 6e 64 61 72 64 20 63  efine standard c
cfe0: 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d 6d 6f 6e 20  ommands, common 
cff0: 6d 61 6b 65 20 74 61 72 67 65 74 73 20 61 6e 64  make targets and
d000: 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 0d   implicit rules.
d010: 0a 0d 0a 43 43 50 4b 47 43 4d 44 20 3d 20 24 28  ...CCPKGCMD = $(
d020: 63 63 33 32 29 20 24 28 70 6b 67 63 66 6c 61 67  cc32) $(pkgcflag
d030: 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29  s) -Fo$(TMP_DIR)
d040: 5e 5c 0d 0a 43 43 41 50 50 43 4d 44 20 3d 20 24  ^\..CCAPPCMD = $
d050: 28 63 63 33 32 29 20 24 28 61 70 70 63 66 6c 61  (cc32) $(appcfla
d060: 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52  gs) -Fo$(TMP_DIR
d070: 29 5e 5c 0d 0a 43 43 53 54 55 42 53 43 4d 44 20  )^\..CCSTUBSCMD 
d080: 3d 20 24 28 63 63 33 32 29 20 24 28 73 74 75 62  = $(cc32) $(stub
d090: 73 63 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d  scflags) -Fo$(TM
d0a0: 50 5f 44 49 52 29 5e 5c 0d 0a 0d 0a 4c 49 42 43  P_DIR)^\....LIBC
d0b0: 4d 44 20 3d 20 24 28 6c 69 62 33 32 29 20 2d 6e  MD = $(lib32) -n
d0c0: 6f 6c 6f 67 6f 20 24 28 4c 49 4e 4b 45 52 46 4c  ologo $(LINKERFL
d0d0: 41 47 53 29 20 2d 6f 75 74 3a 24 40 0d 0a 44 4c  AGS) -out:$@..DL
d0e0: 4c 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29  LCMD = $(link32)
d0f0: 20 24 28 64 6c 6c 6c 66 6c 61 67 73 29 20 2d 6f   $(dlllflags) -o
d100: 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 62 73  ut:$@ $(baselibs
d110: 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 28 74  ) $(tcllibs) $(t
d120: 6b 6c 69 62 73 29 0d 0a 0d 0a 43 4f 4e 45 58 45  klibs)....CONEXE
d130: 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20  CMD = $(link32) 
d140: 24 28 63 6f 6e 6c 66 6c 61 67 73 29 20 2d 6f 75  $(conlflags) -ou
d150: 74 3a 24 40 20 24 28 62 61 73 65 6c 69 62 73 29  t:$@ $(baselibs)
d160: 20 24 28 74 63 6c 6c 69 62 73 29 20 24 28 74 6b   $(tcllibs) $(tk
d170: 6c 69 62 73 29 0d 0a 47 55 49 45 58 45 43 4d 44  libs)..GUIEXECMD
d180: 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 67   = $(link32) $(g
d190: 75 69 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24  uilflags) -out:$
d1a0: 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 28  @ $(baselibs) $(
d1b0: 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62  tcllibs) $(tklib
d1c0: 73 29 0d 0a 52 45 53 43 4d 44 20 20 3d 20 24 28  s)..RESCMD  = $(
d1d0: 72 63 33 32 29 20 2d 66 6f 20 24 40 20 2d 72 20  rc32) -fo $@ -r 
d1e0: 2d 69 20 22 24 28 47 45 4e 45 52 49 43 44 49 52  -i "$(GENERICDIR
d1f0: 29 22 20 2d 69 20 22 24 28 54 4d 50 5f 44 49 52  )" -i "$(TMP_DIR
d200: 29 22 20 5c 0d 0a 09 20 20 20 20 24 28 54 43 4c  )" \...    $(TCL
d210: 5f 49 4e 43 4c 55 44 45 53 29 20 2f 44 53 54 41  _INCLUDES) /DSTA
d220: 54 49 43 5f 42 55 49 4c 44 3d 24 28 53 54 41 54  TIC_BUILD=$(STAT
d230: 49 43 5f 42 55 49 4c 44 29 20 5c 0d 0a 09 20 20  IC_BUILD) \...  
d240: 20 20 2f 44 44 45 42 55 47 3d 24 28 44 45 42 55    /DDEBUG=$(DEBU
d250: 47 29 20 2d 64 20 55 4e 43 48 45 43 4b 45 44 3d  G) -d UNCHECKED=
d260: 24 28 55 4e 43 48 45 43 4b 45 44 29 20 5c 0d 0a  $(UNCHECKED) \..
d270: 09 20 20 20 20 2f 44 43 4f 4d 4d 41 56 45 52 53  .    /DCOMMAVERS
d280: 49 4f 4e 3d 24 28 52 43 43 4f 4d 4d 41 56 45 52  ION=$(RCCOMMAVER
d290: 53 49 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 2f 44  SION) \...    /D
d2a0: 44 4f 54 56 45 52 53 49 4f 4e 3d 5c 22 24 28 44  DOTVERSION=\"$(D
d2b0: 4f 54 56 45 52 53 49 4f 4e 29 5c 22 20 5c 0d 0a  OTVERSION)\" \..
d2c0: 09 20 20 20 20 2f 44 56 45 52 53 49 4f 4e 3d 5c  .    /DVERSION=\
d2d0: 22 24 28 56 45 52 53 49 4f 4e 29 5c 22 20 5c 0d  "$(VERSION)\" \.
d2e0: 0a 09 20 20 20 20 2f 44 53 55 46 58 3d 5c 22 24  ..    /DSUFX=\"$
d2f0: 28 53 55 46 58 29 5c 22 20 5c 0d 0a 09 20 20 20  (SUFX)\" \...   
d300: 20 2f 44 50 52 4f 4a 45 43 54 3d 5c 22 24 28 50   /DPROJECT=\"$(P
d310: 52 4f 4a 45 43 54 29 5c 22 20 5c 0d 0a 09 20 20  ROJECT)\" \...  
d320: 20 20 2f 44 50 52 4a 4c 49 42 4e 41 4d 45 3d 5c    /DPRJLIBNAME=\
d330: 22 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 5c 22  "$(PRJLIBNAME)\"
d340: 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 44 45 46 41  ....!ifndef DEFA
d350: 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54  ULT_BUILD_TARGET
d360: 0d 0a 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f  ..DEFAULT_BUILD_
d370: 54 41 52 47 45 54 20 3d 20 24 28 50 52 4f 4a 45  TARGET = $(PROJE
d380: 43 54 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 64  CT)..!endif....d
d390: 65 66 61 75 6c 74 2d 74 61 72 67 65 74 3a 20 24  efault-target: $
d3a0: 28 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54  (DEFAULT_BUILD_T
d3b0: 41 52 47 45 54 29 0d 0a 0d 0a 21 69 66 20 24 28  ARGET)....!if $(
d3c0: 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e  MULTIPLATFORM_IN
d3d0: 53 54 41 4c 4c 29 0d 0a 64 65 66 61 75 6c 74 2d  STALL)..default-
d3e0: 70 6b 67 69 6e 64 65 78 3a 0d 0a 09 40 65 63 68  pkgindex:...@ech
d3f0: 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 65 20 76  o if {[package v
d400: 73 61 74 69 73 66 69 65 73 20 5b 70 61 63 6b 61  satisfies [packa
d410: 67 65 20 70 72 6f 76 69 64 65 20 54 63 6c 5d 20  ge provide Tcl] 
d420: 39 2e 30 2d 5d 7d 20 7b 20 3e 20 24 28 4f 55 54  9.0-]} { > $(OUT
d430: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74  _DIR)\pkgIndex.t
d440: 63 6c 0d 0a 09 40 65 63 68 6f 20 70 61 63 6b 61  cl...@echo packa
d450: 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52  ge ifneeded $(PR
d460: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d  J_PACKAGE_TCLNAM
d470: 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29  E) $(DOTVERSION)
d480: 20 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c   \...    [list l
d490: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24  oad [file join $
d4a0: 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f  $dir $(PLATFORM_
d4b0: 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c  IDENTIFY) $(PRJL
d4c0: 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28  IBNAME9)]] >> $(
d4d0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65  OUT_DIR)\pkgInde
d4e0: 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d 20  x.tcl...@echo } 
d4f0: 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 5f  else { >> $(OUT_
d500: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63  DIR)\pkgIndex.tc
d510: 6c 0d 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67  l...@echo packag
d520: 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a  e ifneeded $(PRJ
d530: 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45  _PACKAGE_TCLNAME
d540: 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20  ) $(DOTVERSION) 
d550: 5c 0d 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f  \...    [list lo
d560: 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24  ad [file join $$
d570: 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f 49  dir $(PLATFORM_I
d580: 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c 49  DENTIFY) $(PRJLI
d590: 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 4f  BNAME8)]] >> $(O
d5a0: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78  UT_DIR)\pkgIndex
d5b0: 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d 20 3e  .tcl...@echo } >
d5c0: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67  > $(OUT_DIR)\pkg
d5d0: 49 6e 64 65 78 2e 74 63 6c 0d 0a 21 65 6c 73 65  Index.tcl..!else
d5e0: 0d 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64  ..default-pkgind
d5f0: 65 78 3a 0d 0a 09 40 65 63 68 6f 20 69 66 20 7b  ex:...@echo if {
d600: 5b 70 61 63 6b 61 67 65 20 76 73 61 74 69 73 66  [package vsatisf
d610: 69 65 73 20 5b 70 61 63 6b 61 67 65 20 70 72 6f  ies [package pro
d620: 76 69 64 65 20 54 63 6c 5d 20 39 2e 30 2d 5d 7d  vide Tcl] 9.0-]}
d630: 20 7b 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c   { > $(OUT_DIR)\
d640: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 40  pkgIndex.tcl...@
d650: 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 66 6e  echo package ifn
d660: 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 43 4b  eeded $(PRJ_PACK
d670: 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44  AGE_TCLNAME) $(D
d680: 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0d 0a 09 20  OTVERSION) \... 
d690: 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66     [list load [f
d6a0: 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 20 24  ile join $$dir $
d6b0: 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20  (PRJLIBNAME9)]] 
d6c0: 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b  >> $(OUT_DIR)\pk
d6d0: 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09 40 65 63  gIndex.tcl...@ec
d6e0: 68 6f 20 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24  ho } else { >> $
d6f0: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64  (OUT_DIR)\pkgInd
d700: 65 78 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 70  ex.tcl...@echo p
d710: 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20  ackage ifneeded 
d720: 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43  $(PRJ_PACKAGE_TC
d730: 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53  LNAME) $(DOTVERS
d740: 49 4f 4e 29 20 5c 0d 0a 09 20 20 20 20 5b 6c 69  ION) \...    [li
d750: 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f  st load [file jo
d760: 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a 4c 49  in $$dir $(PRJLI
d770: 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 4f  BNAME8)]] >> $(O
d780: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78  UT_DIR)\pkgIndex
d790: 2e 74 63 6c 0d 0a 09 40 65 63 68 6f 20 7d 20 3e  .tcl...@echo } >
d7a0: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67  > $(OUT_DIR)\pkg
d7b0: 49 6e 64 65 78 2e 74 63 6c 0d 0a 21 65 6e 64 69  Index.tcl..!endi
d7c0: 66 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 70 6b 67  f....default-pkg
d7d0: 69 6e 64 65 78 2d 74 65 61 3a 0d 0a 09 40 69 66  index-tea:...@if
d7e0: 20 65 78 69 73 74 20 24 28 52 4f 4f 54 29 5c 70   exist $(ROOT)\p
d7f0: 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e 20 6e  kgIndex.tcl.in n
d800: 6d 61 6b 65 68 6c 70 20 2d 73 20 3c 3c 20 24 28  makehlp -s << $(
d810: 52 4f 4f 54 29 5c 70 6b 67 49 6e 64 65 78 2e 74  ROOT)\pkgIndex.t
d820: 63 6c 2e 69 6e 20 3e 20 24 28 4f 55 54 5f 44 49  cl.in > $(OUT_DI
d830: 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d  R)\pkgIndex.tcl.
d840: 0a 40 50 41 43 4b 41 47 45 5f 56 45 52 53 49 4f  .@PACKAGE_VERSIO
d850: 4e 40 20 20 20 20 24 28 44 4f 54 56 45 52 53 49  N@    $(DOTVERSI
d860: 4f 4e 29 0d 0a 40 50 41 43 4b 41 47 45 5f 4e 41  ON)..@PACKAGE_NA
d870: 4d 45 40 20 20 20 20 20 20 20 24 28 50 52 4a 5f  ME@       $(PRJ_
d880: 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29  PACKAGE_TCLNAME)
d890: 0d 0a 40 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41  ..@PACKAGE_TCLNA
d8a0: 4d 45 40 20 20 20 20 24 28 50 52 4a 5f 50 41 43  ME@    $(PRJ_PAC
d8b0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0d 0a 40  KAGE_TCLNAME)..@
d8c0: 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 40 20 20 20  PKG_LIB_FILE@   
d8d0: 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45      $(PRJLIBNAME
d8e0: 29 0d 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45  )..@PKG_LIB_FILE
d8f0: 38 40 20 20 20 20 20 20 24 28 50 52 4a 4c 49 42  8@      $(PRJLIB
d900: 4e 41 4d 45 38 29 0d 0a 40 50 4b 47 5f 4c 49 42  NAME8)..@PKG_LIB
d910: 5f 46 49 4c 45 39 40 20 20 20 20 20 20 24 28 50  _FILE9@      $(P
d920: 52 4a 4c 49 42 4e 41 4d 45 39 29 0d 0a 3c 3c 0d  RJLIBNAME9)..<<.
d930: 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61  ...default-insta
d940: 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74  ll: default-inst
d950: 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 64 65 66  all-binaries def
d960: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62  ault-install-lib
d970: 72 61 72 69 65 73 0d 0a 21 69 66 20 24 28 53 59  raries..!if $(SY
d980: 4d 42 4f 4c 53 29 0d 0a 64 65 66 61 75 6c 74 2d  MBOLS)..default-
d990: 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74  install: default
d9a0: 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 0d 0a 21  -install-pdbs..!
d9b0: 65 6e 64 69 66 0d 0a 0d 0a 23 20 41 67 61 69 6e  endif....# Again
d9c0: 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 68 69   to deal with hi
d9d0: 73 74 6f 72 69 63 61 6c 20 62 72 6f 6b 65 6e 6e  storical brokenn
d9e0: 65 73 73 2c 20 74 68 65 72 65 20 69 73 20 73 6f  ess, there is so
d9f0: 6d 65 20 63 6f 6e 66 75 73 69 6f 6e 0d 0a 23 20  me confusion..# 
da00: 69 6e 20 74 65 72 6d 69 6e 6c 6f 67 79 2e 20 46  in terminlogy. F
da10: 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 74  or extensions, t
da20: 68 65 20 22 69 6e 73 74 61 6c 6c 2d 62 69 6e 61  he "install-bina
da30: 72 69 65 73 22 20 77 61 73 20 75 73 65 64 20 74  ries" was used t
da40: 6f 0d 0a 23 20 6c 6f 63 61 74 65 20 74 61 72 67  o..# locate targ
da50: 65 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72  et directory for
da60: 20 2a 62 69 6e 61 72 79 20 73 68 61 72 65 64 20   *binary shared 
da70: 6c 69 62 72 61 72 69 65 73 2a 20 61 6e 64 20 74  libraries* and t
da80: 68 75 73 0d 0a 23 20 74 68 65 20 61 70 70 72 6f  hus..# the appro
da90: 70 72 69 61 74 65 20 6d 61 63 72 6f 20 69 73 20  priate macro is 
daa0: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20  LIB_INSTALL_DIR 
dab0: 73 69 6e 63 65 20 42 49 4e 5f 49 4e 53 54 41 4c  since BIN_INSTAL
dac0: 4c 5f 44 49 52 20 69 73 0d 0a 23 20 66 6f 72 20  L_DIR is..# for 
dad0: 65 78 65 63 75 74 61 62 6c 65 73 20 28 65 78 65  executables (exe
dae0: 73 29 2e 20 4f 6e 20 74 68 65 20 6f 74 68 65 72  s). On the other
daf0: 20 68 61 6e 64 20 74 68 65 20 22 69 6e 73 74 61   hand the "insta
db00: 6c 6c 2d 6c 69 62 72 61 72 69 65 73 22 0d 0a 23  ll-libraries"..#
db10: 20 74 61 72 67 65 74 20 69 73 20 66 6f 72 20 2a   target is for *
db20: 73 63 72 69 70 74 73 2a 20 61 6e 64 20 73 68 6f  scripts* and sho
db30: 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 63 61  uld have been ca
db40: 6c 6c 65 64 20 22 69 6e 73 74 61 6c 6c 2d 73 63  lled "install-sc
db50: 72 69 70 74 73 22 2e 0d 0a 64 65 66 61 75 6c 74  ripts"...default
db60: 2d 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65  -install-binarie
db70: 73 3a 20 24 28 50 52 4a 4c 49 42 29 0d 0a 09 40  s: $(PRJLIB)...@
db80: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20  echo Installing 
db90: 62 69 6e 61 72 69 65 73 20 74 6f 20 27 24 28 4c  binaries to '$(L
dba0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27  IB_INSTALL_DIR)'
dbb0: 0d 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74  ...@if not exist
dbc0: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f   "$(LIB_INSTALL_
dbd0: 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c  DIR)" mkdir "$(L
dbe0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22  IB_INSTALL_DIR)"
dbf0: 0d 0a 09 40 24 28 43 50 59 29 20 24 28 50 52 4a  ...@$(CPY) $(PRJ
dc00: 4c 49 42 29 20 22 24 28 4c 49 42 5f 49 4e 53 54  LIB) "$(LIB_INST
dc10: 41 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0d 0a  ALL_DIR)" >NUL..
dc20: 0d 0a 23 20 41 6c 69 61 73 20 66 6f 72 20 64 65  ..# Alias for de
dc30: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63  fault-install-sc
dc40: 72 69 70 74 73 0d 0a 64 65 66 61 75 6c 74 2d 69  ripts..default-i
dc50: 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 65 73  nstall-libraries
dc60: 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c  : default-instal
dc70: 6c 2d 73 63 72 69 70 74 73 0d 0a 0d 0a 64 65 66  l-scripts....def
dc80: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72  ault-install-scr
dc90: 69 70 74 73 3a 20 24 28 4f 55 54 5f 44 49 52 29  ipts: $(OUT_DIR)
dca0: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0d 0a 09  \pkgIndex.tcl...
dcb0: 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67  @echo Installing
dcc0: 20 6c 69 62 72 61 72 69 65 73 20 74 6f 20 27 24   libraries to '$
dcd0: 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f  (SCRIPT_INSTALL_
dce0: 44 49 52 29 27 0d 0a 09 40 69 66 20 65 78 69 73  DIR)'...@if exis
dcf0: 74 20 24 28 4c 49 42 44 49 52 29 20 24 28 43 50  t $(LIBDIR) $(CP
dd00: 59 29 20 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74  Y) $(LIBDIR)\*.t
dd10: 63 6c 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53  cl "$(SCRIPT_INS
dd20: 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 65 63  TALL_DIR)"...@ec
dd30: 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 70 61  ho Installing pa
dd40: 63 6b 61 67 65 20 69 6e 64 65 78 20 69 6e 20 27  ckage index in '
dd50: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c  $(SCRIPT_INSTALL
dd60: 5f 44 49 52 29 27 0d 0a 09 40 24 28 43 50 59 29  _DIR)'...@$(CPY)
dd70: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49   $(OUT_DIR)\pkgI
dd80: 6e 64 65 78 2e 74 63 6c 20 24 28 53 43 52 49 50  ndex.tcl $(SCRIP
dd90: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0d 0a  T_INSTALL_DIR)..
dda0: 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c  ..default-instal
ddb0: 6c 2d 73 74 75 62 73 3a 0d 0a 09 40 65 63 68 6f  l-stubs:...@echo
ddc0: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 73 74 75 62   Installing stub
ddd0: 73 20 6c 69 62 72 61 72 79 20 74 6f 20 27 24 28  s library to '$(
dde0: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44  SCRIPT_INSTALL_D
ddf0: 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f 74 20 65  IR)'...@if not e
de00: 78 69 73 74 20 22 24 28 53 43 52 49 50 54 5f 49  xist "$(SCRIPT_I
de10: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64  NSTALL_DIR)" mkd
de20: 69 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53  ir "$(SCRIPT_INS
de30: 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 24 28  TALL_DIR)"...@$(
de40: 43 50 59 29 20 24 28 50 52 4a 53 54 55 42 4c 49  CPY) $(PRJSTUBLI
de50: 42 29 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53  B) "$(SCRIPT_INS
de60: 54 41 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0d  TALL_DIR)" >NUL.
de70: 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61  ...default-insta
de80: 6c 6c 2d 70 64 62 73 3a 0d 0a 09 40 65 63 68 6f  ll-pdbs:...@echo
de90: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 50 44 42 73   Installing PDBs
dea0: 20 74 6f 20 27 24 28 4c 49 42 5f 49 4e 53 54 41   to '$(LIB_INSTA
deb0: 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 69 66 20 6e  LL_DIR)'...@if n
dec0: 6f 74 20 65 78 69 73 74 20 22 24 28 4c 49 42 5f  ot exist "$(LIB_
ded0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b  INSTALL_DIR)" mk
dee0: 64 69 72 20 22 24 28 4c 49 42 5f 49 4e 53 54 41  dir "$(LIB_INSTA
def0: 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 24 28 43 50  LL_DIR)"...@$(CP
df00: 59 29 20 22 24 28 4f 55 54 5f 44 49 52 29 5c 2a  Y) "$(OUT_DIR)\*
df10: 2e 70 64 62 22 20 22 24 28 4c 49 42 5f 49 4e 53  .pdb" "$(LIB_INS
df20: 54 41 4c 4c 5f 44 49 52 29 5c 22 0d 0a 0d 0a 23  TALL_DIR)\"....#
df30: 20 22 65 6d 61 63 73 20 66 6f 6e 74 2d 6c 6f 63   "emacs font-loc
df40: 6b 20 68 69 67 68 6c 69 67 68 74 69 6e 67 20 66  k highlighting f
df50: 69 78 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 69 6e  ix....default-in
df60: 73 74 61 6c 6c 2d 64 6f 63 73 2d 68 74 6d 6c 3a  stall-docs-html:
df70: 0d 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c  ...@echo Install
df80: 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f  ing documentatio
df90: 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 28 44 4f  n files to '$(DO
dfa0: 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0d  C_INSTALL_DIR)'.
dfb0: 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20  ..@if not exist 
dfc0: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44  "$(DOC_INSTALL_D
dfd0: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 4f  IR)" mkdir "$(DO
dfe0: 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d  C_INSTALL_DIR)".
dff0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 44 4f  ..@if exist $(DO
e000: 43 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20  CDIR) for %f in 
e010: 28 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 68 74  ("$(DOCDIR)\*.ht
e020: 6d 6c 22 20 22 24 28 44 4f 43 44 49 52 29 5c 2a  ml" "$(DOCDIR)\*
e030: 2e 63 73 73 22 20 22 24 28 44 4f 43 44 49 52 29  .css" "$(DOCDIR)
e040: 5c 2a 2e 70 6e 67 22 29 20 64 6f 20 40 24 28 43  \*.png") do @$(C
e050: 4f 50 59 29 20 25 66 20 22 24 28 44 4f 43 5f 49  OPY) %f "$(DOC_I
e060: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 0d 0a  NSTALL_DIR)"....
e070: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d  default-install-
e080: 64 6f 63 73 2d 6e 3a 0d 0a 09 40 65 63 68 6f 20  docs-n:...@echo 
e090: 49 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d  Installing docum
e0a0: 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 74  entation files t
e0b0: 6f 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c  o '$(DOC_INSTALL
e0c0: 5f 44 49 52 29 27 0d 0a 09 40 69 66 20 6e 6f 74  _DIR)'...@if not
e0d0: 20 65 78 69 73 74 20 22 24 28 44 4f 43 5f 49 4e   exist "$(DOC_IN
e0e0: 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69  STALL_DIR)" mkdi
e0f0: 72 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c  r "$(DOC_INSTALL
e100: 5f 44 49 52 29 22 0d 0a 09 40 69 66 20 65 78 69  _DIR)"...@if exi
e110: 73 74 20 24 28 44 4f 43 44 49 52 29 20 66 6f 72  st $(DOCDIR) for
e120: 20 25 66 20 69 6e 20 28 22 24 28 44 4f 43 44 49   %f in ("$(DOCDI
e130: 52 29 5c 2a 2e 6e 22 29 20 64 6f 20 40 24 28 43  R)\*.n") do @$(C
e140: 4f 50 59 29 20 25 66 20 22 24 28 44 4f 43 5f 49  OPY) %f "$(DOC_I
e150: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 0d 0a  NSTALL_DIR)"....
e160: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d  default-install-
e170: 64 65 6d 6f 73 3a 0d 0a 09 40 65 63 68 6f 20 49  demos:...@echo I
e180: 6e 73 74 61 6c 6c 69 6e 67 20 64 65 6d 6f 73 20  nstalling demos 
e190: 74 6f 20 27 24 28 44 45 4d 4f 5f 49 4e 53 54 41  to '$(DEMO_INSTA
e1a0: 4c 4c 5f 44 49 52 29 27 0d 0a 09 40 69 66 20 6e  LL_DIR)'...@if n
e1b0: 6f 74 20 65 78 69 73 74 20 22 24 28 44 45 4d 4f  ot exist "$(DEMO
e1c0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d  _INSTALL_DIR)" m
e1d0: 6b 64 69 72 20 22 24 28 44 45 4d 4f 5f 49 4e 53  kdir "$(DEMO_INS
e1e0: 54 41 4c 4c 5f 44 49 52 29 22 0d 0a 09 40 69 66  TALL_DIR)"...@if
e1f0: 20 65 78 69 73 74 20 24 28 44 45 4d 4f 44 49 52   exist $(DEMODIR
e200: 29 20 24 28 43 50 59 44 49 52 29 20 22 24 28 44  ) $(CPYDIR) "$(D
e210: 45 4d 4f 44 49 52 29 22 20 22 24 28 44 45 4d 4f  EMODIR)" "$(DEMO
e220: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0d 0a  _INSTALL_DIR)"..
e230: 0d 0a 64 65 66 61 75 6c 74 2d 63 6c 65 61 6e 3a  ..default-clean:
e240: 0d 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e  ...@echo Cleanin
e250: 67 20 24 28 54 4d 50 5f 44 49 52 29 5c 2a 20 2e  g $(TMP_DIR)\* .
e260: 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24  .....@if exist $
e270: 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 24 28  (TMP_DIR)\nul $(
e280: 52 4d 44 49 52 29 20 24 28 54 4d 50 5f 44 49 52  RMDIR) $(TMP_DIR
e290: 29 0d 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69  )...@echo Cleani
e2a0: 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d  ng $(WIN_DIR)\nm
e2b0: 61 6b 65 68 6c 70 2e 6f 62 6a 2c 20 6e 6d 61 6b  akehlp.obj, nmak
e2c0: 65 68 6c 70 2e 65 78 65 20 2e 2e 2e 0d 0a 09 40  ehlp.exe ......@
e2d0: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44  if exist $(WIN_D
e2e0: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a  IR)\nmakehlp.obj
e2f0: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c   del $(WIN_DIR)\
e300: 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 0d 0a 09 40  nmakehlp.obj...@
e310: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44  if exist $(WIN_D
e320: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 65  IR)\nmakehlp.exe
e330: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c   del $(WIN_DIR)\
e340: 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 0d 0a 09 40  nmakehlp.exe...@
e350: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44  if exist $(WIN_D
e360: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74  IR)\nmakehlp.out
e370: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c   del $(WIN_DIR)\
e380: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d 0a 09 40  nmakehlp.out...@
e390: 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28  echo Cleaning $(
e3a0: 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f  WIN_DIR)\nmhlp-o
e3b0: 75 74 2e 74 78 74 20 2e 2e 2e 0d 0a 09 40 69 66  ut.txt ......@if
e3c0: 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52   exist $(WIN_DIR
e3d0: 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20  )\nmhlp-out.txt 
e3e0: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e  del $(WIN_DIR)\n
e3f0: 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 0d 0a 09 40  mhlp-out.txt...@
e400: 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28  echo Cleaning $(
e410: 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70  WIN_DIR)\_junk.p
e420: 63 68 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 69  ch ......@if exi
e430: 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f 6a  st $(WIN_DIR)\_j
e440: 75 6e 6b 2e 70 63 68 20 64 65 6c 20 24 28 57 49  unk.pch del $(WI
e450: 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68  N_DIR)\_junk.pch
e460: 0d 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e  ...@echo Cleanin
e470: 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72  g $(WIN_DIR)\ver
e480: 63 6c 2e 78 2c 20 76 65 72 63 6c 2e 69 20 2e 2e  cl.x, vercl.i ..
e490: 2e 0d 0a 09 40 69 66 20 65 78 69 73 74 20 24 28  ....@if exist $(
e4a0: 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78  WIN_DIR)\vercl.x
e4b0: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c   del $(WIN_DIR)\
e4c0: 76 65 72 63 6c 2e 78 0d 0a 09 40 69 66 20 65 78  vercl.x...@if ex
e4d0: 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76  ist $(WIN_DIR)\v
e4e0: 65 72 63 6c 2e 69 20 64 65 6c 20 24 28 57 49 4e  ercl.i del $(WIN
e4f0: 5f 44 49 52 29 5c 76 65 72 63 6c 2e 69 0d 0a 09  _DIR)\vercl.i...
e500: 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24  @echo Cleaning $
e510: 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f  (WIN_DIR)\versio
e520: 6e 73 2e 76 63 2c 20 76 65 72 73 69 6f 6e 2e 76  ns.vc, version.v
e530: 63 20 2e 2e 2e 0d 0a 09 40 69 66 20 65 78 69 73  c ......@if exis
e540: 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72  t $(WIN_DIR)\ver
e550: 73 69 6f 6e 73 2e 76 63 20 64 65 6c 20 24 28 57  sions.vc del $(W
e560: 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 73  IN_DIR)\versions
e570: 2e 76 63 0d 0a 09 40 69 66 20 65 78 69 73 74 20  .vc...@if exist 
e580: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69  $(WIN_DIR)\versi
e590: 6f 6e 2e 76 63 20 64 65 6c 20 24 28 57 49 4e 5f  on.vc del $(WIN_
e5a0: 44 49 52 29 5c 76 65 72 73 69 6f 6e 2e 76 63 0d  DIR)\version.vc.
e5b0: 0a 0d 0a 64 65 66 61 75 6c 74 2d 68 6f 73 65 3a  ...default-hose:
e5c0: 20 64 65 66 61 75 6c 74 2d 63 6c 65 61 6e 0d 0a   default-clean..
e5d0: 09 40 65 63 68 6f 20 48 6f 73 69 6e 67 20 24 28  .@echo Hosing $(
e5e0: 4f 55 54 5f 44 49 52 29 5c 2a 20 2e 2e 2e 0d 0a  OUT_DIR)\* .....
e5f0: 09 40 69 66 20 65 78 69 73 74 20 24 28 4f 55 54  .@if exist $(OUT
e600: 5f 44 49 52 29 5c 6e 75 6c 20 24 28 52 4d 44 49  _DIR)\nul $(RMDI
e610: 52 29 20 24 28 4f 55 54 5f 44 49 52 29 0d 0a 0d  R) $(OUT_DIR)...
e620: 0a 23 20 4f 6e 6c 79 20 66 6f 72 20 62 61 63 6b  .# Only for back
e630: 77 61 72 64 20 63 6f 6d 70 61 74 69 62 69 6c 69  ward compatibili
e640: 74 79 0d 0a 64 65 66 61 75 6c 74 2d 64 69 73 74  ty..default-dist
e650: 63 6c 65 61 6e 3a 20 64 65 66 61 75 6c 74 2d 68  clean: default-h
e660: 6f 73 65 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 73  ose....default-s
e670: 65 74 75 70 3a 0d 0a 09 40 69 66 20 6e 6f 74 20  etup:...@if not 
e680: 65 78 69 73 74 20 24 28 4f 55 54 5f 44 49 52 29  exist $(OUT_DIR)
e690: 5c 6e 75 6c 20 6d 6b 64 69 72 20 24 28 4f 55 54  \nul mkdir $(OUT
e6a0: 5f 44 49 52 29 0d 0a 09 40 69 66 20 6e 6f 74 20  _DIR)...@if not 
e6b0: 65 78 69 73 74 20 24 28 54 4d 50 5f 44 49 52 29  exist $(TMP_DIR)
e6c0: 5c 6e 75 6c 20 6d 6b 64 69 72 20 24 28 54 4d 50  \nul mkdir $(TMP
e6d0: 5f 44 49 52 29 0d 0a 0d 0a 21 69 66 20 22 24 28  _DIR)....!if "$(
e6e0: 54 45 53 54 50 41 54 29 22 20 21 3d 20 22 22 0d  TESTPAT)" != "".
e6f0: 0a 54 45 53 54 46 4c 41 47 53 20 3d 20 24 28 54  .TESTFLAGS = $(T
e700: 45 53 54 46 4c 41 47 53 29 20 2d 66 69 6c 65 20  ESTFLAGS) -file 
e710: 24 28 54 45 53 54 50 41 54 29 0d 0a 21 65 6e 64  $(TESTPAT)..!end
e720: 69 66 0d 0a 0d 0a 64 65 66 61 75 6c 74 2d 74 65  if....default-te
e730: 73 74 3a 20 64 65 66 61 75 6c 74 2d 73 65 74 75  st: default-setu
e740: 70 20 24 28 50 52 4f 4a 45 43 54 29 0d 0a 09 40  p $(PROJECT)...@
e750: 73 65 74 20 54 43 4c 4c 49 42 50 41 54 48 3d 24  set TCLLIBPATH=$
e760: 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f 29 0d 0a 09  (OUT_DIR:\=/)...
e770: 40 69 66 20 65 78 69 73 74 20 24 28 4c 49 42 44  @if exist $(LIBD
e780: 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22  IR) for %f in ("
e790: 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 6c 22  $(LIBDIR)\*.tcl"
e7a0: 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66  ) do @$(COPY) %f
e7b0: 20 22 24 28 4f 55 54 5f 44 49 52 29 22 0d 0a 09   "$(OUT_DIR)"...
e7c0: 63 64 20 22 24 28 54 45 53 54 44 49 52 29 22 20  cd "$(TESTDIR)" 
e7d0: 26 26 20 24 28 44 45 42 55 47 47 45 52 29 20 24  && $(DEBUGGER) $
e7e0: 28 54 43 4c 53 48 29 20 61 6c 6c 2e 74 63 6c 20  (TCLSH) all.tcl 
e7f0: 24 28 54 45 53 54 46 4c 41 47 53 29 0d 0a 0d 0a  $(TESTFLAGS)....
e800: 64 65 66 61 75 6c 74 2d 73 68 65 6c 6c 3a 20 64  default-shell: d
e810: 65 66 61 75 6c 74 2d 73 65 74 75 70 20 24 28 50  efault-setup $(P
e820: 52 4f 4a 45 43 54 29 0d 0a 09 40 73 65 74 20 54  ROJECT)...@set T
e830: 43 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 54 5f  CLLIBPATH=$(OUT_
e840: 44 49 52 3a 5c 3d 2f 29 0d 0a 09 40 69 66 20 65  DIR:\=/)...@if e
e850: 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 66  xist $(LIBDIR) f
e860: 6f 72 20 25 66 20 69 6e 20 28 22 24 28 4c 49 42  or %f in ("$(LIB
e870: 44 49 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f 20  DIR)\*.tcl") do 
e880: 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 28 4f  @$(COPY) %f "$(O
e890: 55 54 5f 44 49 52 29 22 0d 0a 09 24 28 44 45 42  UT_DIR)"...$(DEB
e8a0: 55 47 47 45 52 29 20 24 28 54 43 4c 53 48 29 0d  UGGER) $(TCLSH).
e8b0: 0a 0d 0a 23 20 47 65 6e 65 72 61 74 69 6f 6e 20  ...# Generation 
e8c0: 6f 66 20 57 69 6e 64 6f 77 73 20 76 65 72 73 69  of Windows versi
e8d0: 6f 6e 20 72 65 73 6f 75 72 63 65 0d 0a 21 69 66  on resource..!if
e8e0: 64 65 66 20 52 43 46 49 4c 45 0d 0a 0d 0a 23 20  def RCFILE....# 
e8f0: 4e 6f 74 65 3a 20 64 6f 6e 27 74 20 75 73 65 20  Note: don't use 
e900: 24 2a 2a 20 69 6e 20 62 65 6c 6f 77 20 72 75 6c  $** in below rul
e910: 65 20 62 65 63 61 75 73 65 20 74 68 65 72 65 20  e because there 
e920: 6d 61 79 20 62 65 20 6f 74 68 65 72 20 64 65 70  may be other dep
e930: 65 6e 64 65 6e 63 69 65 73 0d 0a 23 20 61 6e 64  endencies..# and
e940: 20 6f 6e 6c 79 20 74 68 65 20 22 6d 61 69 6e 22   only the "main"
e950: 20 72 63 20 6d 75 73 74 20 62 65 20 70 61 73 73   rc must be pass
e960: 65 64 20 74 6f 20 74 68 65 20 72 65 73 6f 75 72  ed to the resour
e970: 63 65 20 63 6f 6d 70 69 6c 65 72 0d 0a 24 28 54  ce compiler..$(T
e980: 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43  MP_DIR)\$(PROJEC
e990: 54 29 2e 72 65 73 3a 20 24 28 52 43 44 49 52 29  T).res: $(RCDIR)
e9a0: 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0d 0a  \$(PROJECT).rc..
e9b0: 09 24 28 52 45 53 43 4d 44 29 20 24 28 52 43 44  .$(RESCMD) $(RCD
e9c0: 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72  IR)\$(PROJECT).r
e9d0: 63 0d 0a 0d 0a 21 65 6c 73 65 0d 0a 0d 0a 23 20  c....!else....# 
e9e0: 49 66 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69  If parent makefi
e9f0: 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 6e  le has not defin
ea00: 65 64 20 61 20 72 65 73 6f 75 72 63 65 20 64 65  ed a resource de
ea10: 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0d 0a  finition file,..
ea20: 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 72 61  # we will genera
ea30: 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e  te one from stan
ea40: 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e 0d 0a  dard template...
ea50: 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f  $(TMP_DIR)\$(PRO
ea60: 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 54 4d 50  JECT).res: $(TMP
ea70: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29  _DIR)\$(PROJECT)
ea80: 2e 72 63 0d 0a 0d 0a 24 28 54 4d 50 5f 44 49 52  .rc....$(TMP_DIR
ea90: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 3a  )\$(PROJECT).rc:
eaa0: 0d 0a 09 40 24 28 43 4f 50 59 29 20 3c 3c 20 24  ...@$(COPY) << $
eab0: 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a  (TMP_DIR)\$(PROJ
eac0: 45 43 54 29 2e 72 63 0d 0a 23 69 6e 63 6c 75 64  ECT).rc..#includ
ead0: 65 20 3c 77 69 6e 76 65 72 2e 68 3e 0d 0a 0d 0a  e <winver.h>....
eae0: 56 53 5f 56 45 52 53 49 4f 4e 5f 49 4e 46 4f 20  VS_VERSION_INFO 
eaf0: 56 45 52 53 49 4f 4e 49 4e 46 4f 0d 0a 20 46 49  VERSIONINFO.. FI
eb00: 4c 45 56 45 52 53 49 4f 4e 09 43 4f 4d 4d 41 56  LEVERSION.COMMAV
eb10: 45 52 53 49 4f 4e 0d 0a 20 50 52 4f 44 55 43 54  ERSION.. PRODUCT
eb20: 56 45 52 53 49 4f 4e 09 43 4f 4d 4d 41 56 45 52  VERSION.COMMAVER
eb30: 53 49 4f 4e 0d 0a 20 46 49 4c 45 46 4c 41 47 53  SION.. FILEFLAGS
eb40: 4d 41 53 4b 09 30 78 33 66 4c 0d 0a 23 69 66 64  MASK.0x3fL..#ifd
eb50: 65 66 20 44 45 42 55 47 0d 0a 20 46 49 4c 45 46  ef DEBUG.. FILEF
eb60: 4c 41 47 53 09 56 53 5f 46 46 5f 44 45 42 55 47  LAGS.VS_FF_DEBUG
eb70: 0d 0a 23 65 6c 73 65 0d 0a 20 46 49 4c 45 46 4c  ..#else.. FILEFL
eb80: 41 47 53 09 30 78 30 4c 0d 0a 23 65 6e 64 69 66  AGS.0x0L..#endif
eb90: 0d 0a 20 46 49 4c 45 4f 53 09 09 56 4f 53 5f 4e  .. FILEOS..VOS_N
eba0: 54 5f 57 49 4e 44 4f 57 53 33 32 0d 0a 20 46 49  T_WINDOWS32.. FI
ebb0: 4c 45 54 59 50 45 09 56 46 54 5f 44 4c 4c 0d 0a  LETYPE.VFT_DLL..
ebc0: 20 46 49 4c 45 53 55 42 54 59 50 45 09 30 78 30   FILESUBTYPE.0x0
ebd0: 4c 0d 0a 42 45 47 49 4e 0d 0a 20 20 20 20 42 4c  L..BEGIN..    BL
ebe0: 4f 43 4b 20 22 53 74 72 69 6e 67 46 69 6c 65 49  OCK "StringFileI
ebf0: 6e 66 6f 22 0d 0a 20 20 20 20 42 45 47 49 4e 0d  nfo"..    BEGIN.
ec00: 0a 09 42 4c 4f 43 4b 20 22 30 34 30 39 30 34 62  ..BLOCK "040904b
ec10: 30 22 0d 0a 09 42 45 47 49 4e 0d 0a 09 20 20 20  0"...BEGIN...   
ec20: 20 56 41 4c 55 45 20 22 46 69 6c 65 44 65 73 63   VALUE "FileDesc
ec30: 72 69 70 74 69 6f 6e 22 2c 20 20 22 54 63 6c 20  ription",  "Tcl 
ec40: 65 78 74 65 6e 73 69 6f 6e 20 22 20 50 52 4f 4a  extension " PROJ
ec50: 45 43 54 0d 0a 09 20 20 20 20 56 41 4c 55 45 20  ECT...    VALUE 
ec60: 22 4f 72 69 67 69 6e 61 6c 46 69 6c 65 6e 61 6d  "OriginalFilenam
ec70: 65 22 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 0d 0a  e", PRJLIBNAME..
ec80: 09 20 20 20 20 56 41 4c 55 45 20 22 46 69 6c 65  .    VALUE "File
ec90: 56 65 72 73 69 6f 6e 22 2c 20 20 20 20 20 20 44  Version",      D
eca0: 4f 54 56 45 52 53 49 4f 4e 0d 0a 09 20 20 20 20  OTVERSION...    
ecb0: 56 41 4c 55 45 20 22 50 72 6f 64 75 63 74 4e 61  VALUE "ProductNa
ecc0: 6d 65 22 2c 20 20 20 20 20 20 22 50 61 63 6b 61  me",      "Packa
ecd0: 67 65 20 22 20 50 52 4f 4a 45 43 54 20 22 20 66  ge " PROJECT " f
ece0: 6f 72 20 54 63 6c 22 0d 0a 09 20 20 20 20 56 41  or Tcl"...    VA
ecf0: 4c 55 45 20 22 50 72 6f 64 75 63 74 56 65 72 73  LUE "ProductVers
ed00: 69 6f 6e 22 2c 20 20 20 44 4f 54 56 45 52 53 49  ion",   DOTVERSI
ed10: 4f 4e 0d 0a 09 45 4e 44 0d 0a 20 20 20 20 45 4e  ON...END..    EN
ed20: 44 0d 0a 20 20 20 20 42 4c 4f 43 4b 20 22 56 61  D..    BLOCK "Va
ed30: 72 46 69 6c 65 49 6e 66 6f 22 0d 0a 20 20 20 20  rFileInfo"..    
ed40: 42 45 47 49 4e 0d 0a 09 56 41 4c 55 45 20 22 54  BEGIN...VALUE "T
ed50: 72 61 6e 73 6c 61 74 69 6f 6e 22 2c 20 30 78 34  ranslation", 0x4
ed60: 30 39 2c 20 31 32 30 30 0d 0a 20 20 20 20 45 4e  09, 1200..    EN
ed70: 44 0d 0a 45 4e 44 0d 0a 0d 0a 3c 3c 0d 0a 0d 0a  D..END....<<....
ed80: 21 65 6e 64 69 66 20 23 20 69 66 64 65 66 20 52  !endif # ifdef R
ed90: 43 46 49 4c 45 0d 0a 0d 0a 21 69 66 6e 64 65 66  CFILE....!ifndef
eda0: 20 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49   DISABLE_IMPLICI
edb0: 54 5f 52 55 4c 45 53 0d 0a 44 49 53 41 42 4c 45  T_RULES..DISABLE
edc0: 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 20  _IMPLICIT_RULES 
edd0: 3d 20 30 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21  = 0..!endif....!
ede0: 69 66 20 21 24 28 44 49 53 41 42 4c 45 5f 49 4d  if !$(DISABLE_IM
edf0: 50 4c 49 43 49 54 5f 52 55 4c 45 53 29 0d 0a 23  PLICIT_RULES)..#
ee00: 20 49 6d 70 6c 69 63 69 74 20 72 75 6c 65 20 64   Implicit rule d
ee10: 65 66 69 6e 69 74 69 6f 6e 73 20 2d 20 6f 6e 6c  efinitions - onl
ee20: 79 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 6c  y for building l
ee30: 69 62 72 61 72 79 20 6f 62 6a 65 63 74 73 2e 20  ibrary objects. 
ee40: 46 6f 72 20 73 74 75 62 73 20 61 6e 64 0d 0a 23  For stubs and..#
ee50: 20 6d 61 69 6e 20 61 70 70 6c 69 63 61 74 69 6f   main applicatio
ee60: 6e 2c 20 74 68 65 20 6d 61 6b 65 66 69 6c 65 20  n, the makefile 
ee70: 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 65 78  should define ex
ee80: 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0d 0a 0d  plicit rules....
ee90: 0a 7b 24 28 52 4f 4f 54 29 7d 2e 63 7b 24 28 54  .{$(ROOT)}.c{$(T
eea0: 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0d 0a  MP_DIR)}.obj::..
eeb0: 09 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c  .$(CCPKGCMD) @<<
eec0: 0d 0a 24 3c 0d 0a 3c 3c 0d 0a 0d 0a 7b 24 28 57  ..$<..<<....{$(W
eed0: 49 4e 5f 44 49 52 29 7d 2e 63 7b 24 28 54 4d 50  IN_DIR)}.c{$(TMP
eee0: 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0d 0a 09 24  _DIR)}.obj::...$
eef0: 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0d 0a  (CCPKGCMD) @<<..
ef00: 24 3c 0d 0a 3c 3c 0d 0a 0d 0a 7b 24 28 47 45 4e  $<..<<....{$(GEN
ef10: 45 52 49 43 44 49 52 29 7d 2e 63 7b 24 28 54 4d  ERICDIR)}.c{$(TM
ef20: 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0d 0a 09  P_DIR)}.obj::...
ef30: 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0d  $(CCPKGCMD) @<<.
ef40: 0a 24 3c 0d 0a 3c 3c 0d 0a 0d 0a 7b 24 28 43 4f  .$<..<<....{$(CO
ef50: 4d 50 41 54 44 49 52 29 7d 2e 63 7b 24 28 54 4d  MPATDIR)}.c{$(TM
ef60: 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0d 0a 09  P_DIR)}.obj::...
ef70: 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0d  $(CCPKGCMD) @<<.
ef80: 0a 24 3c 0d 0a 3c 3c 0d 0a 0d 0a 7b 24 28 52 43  .$<..<<....{$(RC
ef90: 44 49 52 29 7d 2e 72 63 7b 24 28 54 4d 50 5f 44  DIR)}.rc{$(TMP_D
efa0: 49 52 29 7d 2e 72 65 73 3a 0d 0a 09 24 28 52 45  IR)}.res:...$(RE
efb0: 53 43 4d 44 29 20 24 3c 0d 0a 0d 0a 7b 24 28 57  SCMD) $<....{$(W
efc0: 49 4e 5f 44 49 52 29 7d 2e 72 63 7b 24 28 54 4d  IN_DIR)}.rc{$(TM
efd0: 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0d 0a 09 24  P_DIR)}.res:...$
efe0: 28 52 45 53 43 4d 44 29 20 24 3c 0d 0a 0d 0a 7b  (RESCMD) $<....{
eff0: 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 63 7b 24  $(TMP_DIR)}.rc{$
f000: 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0d  (TMP_DIR)}.res:.
f010: 0a 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0d 0a  ..$(RESCMD) $<..
f020: 0d 0a 2e 53 55 46 46 49 58 45 53 3a 0d 0a 2e 53  ...SUFFIXES:...S
f030: 55 46 46 49 58 45 53 3a 2e 63 20 2e 72 63 0d 0a  UFFIXES:.c .rc..
f040: 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 23 23 23  ..!endif....####
f050: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
f060: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
f070: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23  ################
f080: 23 23 23 23 23 23 23 23 23 23 23 23 0d 0a 23 20  ############..# 
f090: 31 34 2e 20 53 61 6e 69 74 79 20 63 68 65 63 6b  14. Sanity check
f0a0: 20 73 65 6c 65 63 74 65 64 20 6f 70 74 69 6f 6e   selected option
f0b0: 73 20 61 67 61 69 6e 73 74 20 54 63 6c 20 62 75  s against Tcl bu
f0c0: 69 6c 64 20 6f 70 74 69 6f 6e 73 0d 0a 23 20 57  ild options..# W
f0d0: 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 61 6e 20  hen building an 
f0e0: 65 78 74 65 6e 73 69 6f 6e 2c 20 63 65 72 74 61  extension, certa
f0f0: 69 6e 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  in configuration
f100: 20 6f 70 74 69 6f 6e 73 20 73 68 6f 75 6c 64 0d   options should.
f110: 0a 23 20 6d 61 74 63 68 20 74 68 65 20 6f 6e 65  .# match the one
f120: 73 20 75 73 65 64 20 77 68 65 6e 20 54 63 6c 20  s used when Tcl 
f130: 77 61 73 20 62 75 69 6c 74 2e 20 48 65 72 65 20  was built. Here 
f140: 77 65 20 63 68 65 63 6b 20 61 6e 64 0d 0a 23 20  we check and..# 
f150: 77 61 72 6e 20 6f 6e 20 61 20 6d 69 73 6d 61 74  warn on a mismat
f160: 63 68 2e 0d 0a 21 69 66 20 21 24 28 44 4f 49 4e  ch...!if !$(DOIN
f170: 47 5f 54 43 4c 29 0d 0a 0d 0a 21 69 66 20 24 28  G_TCL)....!if $(
f180: 54 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 75  TCLINSTALL) # Bu
f190: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 61  ilding against a
f1a0: 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0d  n installed Tcl.
f1b0: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54  .!if exist("$(_T
f1c0: 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65  CLDIR)\lib\nmake
f1d0: 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 0d 0a 54 43  \tcl.nmake")..TC
f1e0: 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 20 3d 20 22  LNMAKECONFIG = "
f1f0: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e  $(_TCLDIR)\lib\n
f200: 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0d  make\tcl.nmake".
f210: 0a 21 65 6e 64 69 66 0d 0a 21 65 6c 73 65 20 23  .!endif..!else #
f220: 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20   !$(TCLINSTALL) 
f230: 2d 20 62 75 69 6c 64 69 6e 67 20 61 67 61 69 6e  - building again
f240: 73 74 20 54 63 6c 20 73 6f 75 72 63 65 0d 0a 21  st Tcl source..!
f250: 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c  if exist("$(_TCL
f260: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44  DIR)\win\$(BUILD
f270: 44 49 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b  DIRTOP)\tcl.nmak
f280: 65 22 29 0d 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e  e")..TCLNMAKECON
f290: 46 49 47 09 3d 20 22 24 28 5f 54 43 4c 44 49 52  FIG.= "$(_TCLDIR
f2a0: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52  )\win\$(BUILDDIR
f2b0: 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0d  TOP)\tcl.nmake".
f2c0: 0a 21 65 6e 64 69 66 0d 0a 21 65 6e 64 69 66 20  .!endif..!endif 
f2d0: 23 20 54 43 4c 49 4e 53 54 41 4c 4c 0d 0a 0d 0a  # TCLINSTALL....
f2e0: 21 69 66 20 24 28 43 4f 4e 46 49 47 5f 43 48 45  !if $(CONFIG_CHE
f2f0: 43 4b 29 0d 0a 21 69 66 64 65 66 20 54 43 4c 4e  CK)..!ifdef TCLN
f300: 4d 41 4b 45 43 4f 4e 46 49 47 0d 0a 21 69 6e 63  MAKECONFIG..!inc
f310: 6c 75 64 65 20 24 28 54 43 4c 4e 4d 41 4b 45 43  lude $(TCLNMAKEC
f320: 4f 4e 46 49 47 29 0d 0a 0d 0a 21 69 66 20 64 65  ONFIG)....!if de
f330: 66 69 6e 65 64 28 43 4f 52 45 5f 4d 41 43 48 49  fined(CORE_MACHI
f340: 4e 45 29 20 26 26 20 22 24 28 43 4f 52 45 5f 4d  NE) && "$(CORE_M
f350: 41 43 48 49 4e 45 29 22 20 21 3d 20 22 24 28 4d  ACHINE)" != "$(M
f360: 41 43 48 49 4e 45 29 22 0d 0a 21 65 72 72 6f 72  ACHINE)"..!error
f370: 20 45 52 52 4f 52 3a 20 42 75 69 6c 64 20 74 61   ERROR: Build ta
f380: 72 67 65 74 20 28 24 28 4d 41 43 48 49 4e 45 29  rget ($(MACHINE)
f390: 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68  ) does not match
f3a0: 20 74 68 65 20 54 63 6c 20 6c 69 62 72 61 72 79   the Tcl library
f3b0: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 28 24   architecture ($
f3c0: 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 29 2e  (CORE_MACHINE)).
f3d0: 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66 20 24 28  ..!endif..!if $(
f3e0: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38  TCL_VERSION) < 8
f3f0: 37 20 26 26 20 64 65 66 69 6e 65 64 28 43 4f 52  7 && defined(COR
f400: 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c  E_USE_THREAD_ALL
f410: 4f 43 29 20 26 26 20 24 28 43 4f 52 45 5f 55 53  OC) && $(CORE_US
f420: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 20  E_THREAD_ALLOC) 
f430: 21 3d 20 24 28 55 53 45 5f 54 48 52 45 41 44 5f  != $(USE_THREAD_
f440: 41 4c 4c 4f 43 29 0d 0a 21 6d 65 73 73 61 67 65  ALLOC)..!message
f450: 20 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20   WARNING: Value 
f460: 6f 66 20 55 53 45 5f 54 48 52 45 41 44 5f 41 4c  of USE_THREAD_AL
f470: 4c 4f 43 20 28 24 28 55 53 45 5f 54 48 52 45 41  LOC ($(USE_THREA
f480: 44 5f 41 4c 4c 4f 43 29 29 20 64 6f 65 73 20 6e  D_ALLOC)) does n
f490: 6f 74 20 6d 61 74 63 68 20 69 74 73 20 54 63 6c  ot match its Tcl
f4a0: 20 63 6f 72 65 20 76 61 6c 75 65 20 28 24 28 43   core value ($(C
f4b0: 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41  ORE_USE_THREAD_A
f4c0: 4c 4c 4f 43 29 29 2e 0d 0a 21 65 6e 64 69 66 0d  LLOC))...!endif.
f4d0: 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f 52  .!if defined(COR
f4e0: 45 5f 44 45 42 55 47 29 20 26 26 20 24 28 43 4f  E_DEBUG) && $(CO
f4f0: 52 45 5f 44 45 42 55 47 29 20 21 3d 20 24 28 44  RE_DEBUG) != $(D
f500: 45 42 55 47 29 0d 0a 21 6d 65 73 73 61 67 65 20  EBUG)..!message 
f510: 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20 6f  WARNING: Value o
f520: 66 20 44 45 42 55 47 20 28 24 28 44 45 42 55 47  f DEBUG ($(DEBUG
f530: 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63  )) does not matc
f540: 68 20 69 74 73 20 54 63 6c 20 6c 69 62 72 61 72  h its Tcl librar
f550: 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20  y configuration 
f560: 28 24 28 44 45 42 55 47 29 29 2e 0d 0a 21 65 6e  ($(DEBUG))...!en
f570: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21  dif..!endif....!
f580: 65 6e 64 69 66 20 23 20 54 43 4c 4e 4d 41 4b 45  endif # TCLNMAKE
f590: 43 4f 4e 46 49 47 0d 0a 0d 0a 21 65 6e 64 69 66  CONFIG....!endif
f5a0: 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29   # !$(DOING_TCL)
f5b0: 0d 0a 0d 0a 0d 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d  ......#---------
f5c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
f5d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
f5e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
f5f0: 2d 0d 0a 23 20 44 69 73 70 6c 61 79 20 73 74 61  -..# Display sta
f600: 74 73 20 62 65 69 6e 67 20 75 73 65 64 2e 0d 0a  ts being used...
f610: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  #---------------
f620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
f630: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
f640: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 0a 0d 0a 21  -----------....!
f650: 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29  if !$(DOING_TCL)
f660: 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 42  ..!message *** B
f670: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20  uilding against 
f680: 54 63 6c 20 61 74 20 27 24 28 5f 54 43 4c 44 49  Tcl at '$(_TCLDI
f690: 52 29 27 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 66  R)'..!endif..!if
f6a0: 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26   !$(DOING_TK) &&
f6b0: 20 24 28 4e 45 45 44 5f 54 4b 29 0d 0a 21 6d 65   $(NEED_TK)..!me
f6c0: 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69  ssage *** Buildi
f6d0: 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 61 74  ng against Tk at
f6e0: 20 27 24 28 5f 54 4b 44 49 52 29 27 0d 0a 21 65   '$(_TKDIR)'..!e
f6f0: 6e 64 69 66 0d 0a 21 6d 65 73 73 61 67 65 20 2a  ndif..!message *
f700: 2a 2a 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20  ** Intermediate 
f710: 64 69 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62  directory will b
f720: 65 20 27 24 28 54 4d 50 5f 44 49 52 29 27 0d 0a  e '$(TMP_DIR)'..
f730: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 4f 75 74  !message *** Out
f740: 70 75 74 20 64 69 72 65 63 74 6f 72 79 20 77 69  put directory wi
f750: 6c 6c 20 62 65 20 27 24 28 4f 55 54 5f 44 49 52  ll be '$(OUT_DIR
f760: 29 27 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a  )'..!message ***
f770: 20 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 2c 20 69   Installation, i
f780: 66 20 73 65 6c 65 63 74 65 64 2c 20 77 69 6c 6c  f selected, will
f790: 20 62 65 20 69 6e 20 27 24 28 5f 49 4e 53 54 41   be in '$(_INSTA
f7a0: 4c 4c 44 49 52 29 27 0d 0a 21 6d 65 73 73 61 67  LLDIR)'..!messag
f7b0: 65 20 2a 2a 2a 20 53 75 66 66 69 78 20 66 6f 72  e *** Suffix for
f7c0: 20 62 69 6e 61 72 69 65 73 20 77 69 6c 6c 20 62   binaries will b
f7d0: 65 20 27 24 28 53 55 46 58 29 27 0d 0a 21 6d 65  e '$(SUFX)'..!me
f7e0: 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c  ssage *** Compil
f7f0: 65 72 20 76 65 72 73 69 6f 6e 20 24 28 56 43 56  er version $(VCV
f800: 45 52 29 2e 20 54 61 72 67 65 74 20 24 28 4d 41  ER). Target $(MA
f810: 43 48 49 4e 45 29 2c 20 68 6f 73 74 20 24 28 4e  CHINE), host $(N
f820: 41 54 49 56 45 5f 41 52 43 48 29 2e 0d 0a 0d 0a  ATIVE_ARCH).....
f830: 21 65 6e 64 69 66 20 23 20 69 66 64 65 66 20 5f  !endif # ifdef _
f840: 52 55 4c 45 53 5f 56 43 0d 0a                    RULES_VC..