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 0a *- makefile -*-.
0050: 23 20 72 75 6c 65 73 2e 76 63 20 2d 2d 0a 23 0a # rules.vc --.#.
0060: 23 20 50 61 72 74 20 6f 66 20 74 68 65 20 6e 6d # Part of the nm
0070: 61 6b 65 20 62 61 73 65 64 20 62 75 69 6c 64 20 ake based build
0080: 73 79 73 74 65 6d 20 66 6f 72 20 54 63 6c 20 61 system for Tcl a
0090: 6e 64 20 69 74 73 20 65 78 74 65 6e 73 69 6f 6e nd its extension
00a0: 73 2e 0a 23 20 54 68 69 73 20 66 69 6c 65 20 64 s..# This file d
00b0: 6f 65 73 20 61 6c 6c 20 74 68 65 20 68 61 72 64 oes all the hard
00c0: 20 77 6f 72 6b 20 69 6e 20 74 65 72 6d 73 20 6f work in terms o
00d0: 66 20 70 61 72 73 69 6e 67 20 62 75 69 6c 64 20 f parsing build
00e0: 6f 70 74 69 6f 6e 73 2c 0a 23 20 63 6f 6d 70 69 options,.# compi
00f0: 6c 65 72 20 73 77 69 74 63 68 65 73 2c 20 64 65 ler switches, de
0100: 66 69 6e 69 6e 67 20 63 6f 6d 6d 6f 6e 20 74 61 fining common ta
0110: 72 67 65 74 73 20 61 6e 64 20 6d 61 63 72 6f 73 rgets and macros
0120: 2e 20 54 68 65 20 54 63 6c 20 6d 61 6b 65 66 69 . The Tcl makefi
0130: 6c 65 0a 23 20 64 69 72 65 63 74 6c 79 20 69 6e le.# directly in
0140: 63 6c 75 64 65 73 20 74 68 69 73 2e 20 45 78 74 cludes this. Ext
0150: 65 6e 73 69 6f 6e 73 20 69 6e 63 6c 75 64 65 20 ensions include
0160: 69 74 20 76 69 61 20 22 72 75 6c 65 73 2d 65 78 it via "rules-ex
0170: 74 2e 76 63 22 2e 0a 23 0a 23 20 53 65 65 20 54 t.vc"..#.# See T
0180: 49 50 20 34 37 37 20 28 68 74 74 70 73 3a 2f 2f IP 477 (https://
0190: 63 6f 72 65 2e 74 63 6c 2d 6c 61 6e 67 2e 6f 72 core.tcl-lang.or
01a0: 67 2f 74 69 70 73 2f 64 6f 63 2f 6d 61 69 6e 2f g/tips/doc/main/
01b0: 74 69 70 2f 34 37 37 2e 6d 64 29 20 66 6f 72 0a tip/477.md) for.
01c0: 23 20 64 65 74 61 69 6c 65 64 20 64 6f 63 75 6d # detailed docum
01d0: 65 6e 74 61 74 69 6f 6e 2e 0a 23 0a 23 20 53 65 entation..#.# Se
01e0: 65 20 74 68 65 20 66 69 6c 65 20 22 6c 69 63 65 e the file "lice
01f0: 6e 73 65 2e 74 65 72 6d 73 22 20 66 6f 72 20 69 nse.terms" for i
0200: 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 20 75 73 nformation on us
0210: 61 67 65 20 61 6e 64 20 72 65 64 69 73 74 72 69 age and redistri
0220: 62 75 74 69 6f 6e 0a 23 20 6f 66 20 74 68 69 73 bution.# of this
0230: 20 66 69 6c 65 2c 20 61 6e 64 20 66 6f 72 20 61 file, and for a
0240: 20 44 49 53 43 4c 41 49 4d 45 52 20 4f 46 20 41 DISCLAIMER OF A
0250: 4c 4c 20 57 41 52 52 41 4e 54 49 45 53 2e 0a 23 LL WARRANTIES..#
0260: 0a 23 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 .# Copyright (c)
0270: 20 32 30 30 31 2d 32 30 30 33 20 44 61 76 69 64 2001-2003 David
0280: 20 47 72 61 76 65 72 65 61 75 78 2e 0a 23 20 43 Gravereaux..# C
0290: 6f 70 79 72 69 67 68 74 20 28 63 29 20 32 30 30 opyright (c) 200
02a0: 33 2d 32 30 30 38 20 50 61 74 72 69 63 6b 20 54 3-2008 Patrick T
02b0: 68 6f 79 74 73 0a 23 20 43 6f 70 79 72 69 67 68 hoyts.# Copyrigh
02c0: 74 20 28 63 29 20 32 30 31 37 20 20 20 20 20 20 t (c) 2017
02d0: 41 73 68 6f 6b 20 50 2e 20 4e 61 64 6b 61 72 6e Ashok P. Nadkarn
02e0: 69 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d i.#-------------
02f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 0a 21 69 66 6e 64 65 66 20 5f 52 55 4c 45 -..!ifndef _RULE
0340: 53 5f 56 43 0a 5f 52 55 4c 45 53 5f 56 43 20 3d S_VC._RULES_VC =
0350: 20 31 0a 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 1..# The follow
0360: 69 6e 67 20 6d 61 63 72 6f 73 20 64 65 66 69 6e ing macros defin
0370: 65 20 74 68 65 20 76 65 72 73 69 6f 6e 20 6f 66 e the version of
0380: 20 74 68 65 20 72 75 6c 65 73 2e 76 63 20 6e 6d the rules.vc nm
0390: 61 6b 65 20 62 75 69 6c 64 20 73 79 73 74 65 6d ake build system
03a0: 0a 23 20 46 6f 72 20 6d 6f 64 69 66 69 63 61 74 .# For modificat
03b0: 69 6f 6e 73 20 74 68 61 74 20 61 72 65 20 6e 6f ions that are no
03c0: 74 20 62 61 63 6b 77 61 72 64 2d 63 6f 6d 70 61 t backward-compa
03d0: 74 69 62 6c 65 2c 20 79 6f 75 20 2a 6d 75 73 74 tible, you *must
03e0: 2a 20 63 68 61 6e 67 65 0a 23 20 74 68 65 20 6d * change.# the m
03f0: 61 6a 6f 72 20 76 65 72 73 69 6f 6e 2e 0a 52 55 ajor version..RU
0400: 4c 45 53 5f 56 45 52 53 49 4f 4e 5f 4d 41 4a 4f LES_VERSION_MAJO
0410: 52 20 3d 20 31 0a 52 55 4c 45 53 5f 56 45 52 53 R = 1.RULES_VERS
0420: 49 4f 4e 5f 4d 49 4e 4f 52 20 3d 20 31 36 0a 0a ION_MINOR = 16..
0430: 23 20 54 68 65 20 50 52 4f 4a 45 43 54 20 6d 61 # The PROJECT ma
0440: 63 72 6f 20 6d 75 73 74 20 62 65 20 64 65 66 69 cro must be defi
0450: 6e 65 64 20 62 79 20 70 61 72 65 6e 74 20 6d 61 ned by parent ma
0460: 6b 65 66 69 6c 65 2e 0a 21 69 66 20 22 24 28 50 kefile..!if "$(P
0470: 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 22 0a 21 ROJECT)" == "".!
0480: 65 72 72 6f 72 20 2a 2a 2a 20 45 72 72 6f 72 3a error *** Error:
0490: 20 4d 61 63 72 6f 20 50 52 4f 4a 45 43 54 20 6e Macro PROJECT n
04a0: 6f 74 20 64 65 66 69 6e 65 64 21 20 50 6c 65 61 ot defined! Plea
04b0: 73 65 20 64 65 66 69 6e 65 20 69 74 20 62 65 66 se define it bef
04c0: 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 ore including ru
04d0: 6c 65 73 2e 76 63 0a 21 65 6e 64 69 66 0a 0a 21 les.vc.!endif..!
04e0: 69 66 20 22 24 28 50 52 4a 5f 50 41 43 4b 41 47 if "$(PRJ_PACKAG
04f0: 45 5f 54 43 4c 4e 41 4d 45 29 22 20 3d 3d 20 22 E_TCLNAME)" == "
0500: 22 0a 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 ".PRJ_PACKAGE_TC
0510: 4c 4e 41 4d 45 20 3d 20 24 28 50 52 4f 4a 45 43 LNAME = $(PROJEC
0520: 54 29 0a 21 65 6e 64 69 66 0a 0a 23 20 41 6c 73 T).!endif..# Als
0530: 6f 20 73 70 65 63 69 61 6c 20 63 61 73 65 20 54 o special case T
0540: 63 6c 20 61 6e 64 20 54 6b 20 74 6f 20 73 61 76 cl and Tk to sav
0550: 65 20 73 6f 6d 65 20 74 79 70 69 6e 67 20 6c 61 e some typing la
0560: 74 65 72 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 ter.DOING_TCL =
0570: 30 0a 44 4f 49 4e 47 5f 54 4b 20 20 3d 20 30 0a 0.DOING_TK = 0.
0580: 21 69 66 20 22 24 28 50 52 4f 4a 45 43 54 29 22 !if "$(PROJECT)"
0590: 20 3d 3d 20 22 74 63 6c 22 0a 44 4f 49 4e 47 5f == "tcl".DOING_
05a0: 54 43 4c 20 3d 20 31 0a 21 65 6c 73 65 69 66 20 TCL = 1.!elseif
05b0: 22 24 28 50 52 4f 4a 45 43 54 29 22 20 3d 3d 20 "$(PROJECT)" ==
05c0: 22 74 6b 22 0a 44 4f 49 4e 47 5f 54 4b 20 3d 20 "tk".DOING_TK =
05d0: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 6e 64 65 1.!endif..!ifnde
05e0: 66 20 4e 45 45 44 5f 54 4b 0a 23 20 42 61 63 6b f NEED_TK.# Back
05f0: 77 61 72 64 73 20 63 6f 6d 70 61 74 69 62 69 6c wards compatibil
0600: 69 74 79 0a 21 69 66 64 65 66 20 50 52 4f 4a 45 ity.!ifdef PROJE
0610: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 0a 4e CT_REQUIRES_TK.N
0620: 45 45 44 5f 54 4b 20 3d 20 24 28 50 52 4f 4a 45 EED_TK = $(PROJE
0630: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 29 0a CT_REQUIRES_TK).
0640: 21 65 6c 73 65 0a 4e 45 45 44 5f 54 4b 20 3d 20 !else.NEED_TK =
0650: 30 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0.!endif.!endif.
0660: 0a 21 69 66 6e 64 65 66 20 4e 45 45 44 5f 54 43 .!ifndef NEED_TC
0670: 4c 5f 53 4f 55 52 43 45 0a 4e 45 45 44 5f 54 43 L_SOURCE.NEED_TC
0680: 4c 5f 53 4f 55 52 43 45 20 3d 20 30 0a 21 65 6e L_SOURCE = 0.!en
0690: 64 69 66 0a 0a 21 69 66 64 65 66 20 4e 45 45 44 dif..!ifdef NEED
06a0: 5f 54 4b 5f 53 4f 55 52 43 45 0a 21 69 66 20 24 _TK_SOURCE.!if $
06b0: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 (NEED_TK_SOURCE)
06c0: 0a 4e 45 45 44 5f 54 4b 20 3d 20 31 0a 21 65 6e .NEED_TK = 1.!en
06d0: 64 69 66 0a 21 65 6c 73 65 0a 4e 45 45 44 5f 54 dif.!else.NEED_T
06e0: 4b 5f 53 4f 55 52 43 45 20 3d 20 30 0a 21 65 6e K_SOURCE = 0.!en
06f0: 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 dif..###########
0700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0710: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0730: 23 23 23 23 23 0a 23 20 4e 6d 61 6b 65 20 69 73 #####.# Nmake is
0740: 20 61 20 70 72 65 74 74 79 20 77 65 61 6b 20 65 a pretty weak e
0750: 6e 76 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 73 79 nvironment in sy
0760: 6e 74 61 78 20 61 6e 64 20 63 61 70 61 62 69 6c ntax and capabil
0770: 69 74 69 65 73 0a 23 20 73 6f 20 74 68 69 73 20 ities.# so this
0780: 66 69 6c 65 20 69 73 20 6e 65 63 65 73 73 61 72 file is necessar
0790: 69 6c 79 20 76 65 72 62 6f 73 65 2e 20 49 74 27 ily verbose. It'
07a0: 73 20 62 72 6f 6b 65 6e 20 64 6f 77 6e 20 69 6e s broken down in
07b0: 74 6f 0a 23 20 74 68 65 20 66 6f 6c 6c 6f 77 69 to.# the followi
07c0: 6e 67 20 70 61 72 74 73 2e 0a 23 0a 23 20 30 2e ng parts..#.# 0.
07d0: 20 53 61 6e 69 74 79 20 63 68 65 63 6b 20 74 68 Sanity check th
07e0: 61 74 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 at compiler envi
07f0: 72 6f 6e 6d 65 6e 74 20 69 73 20 73 65 74 20 75 ronment is set u
0800: 70 20 61 6e 64 20 69 6e 69 74 69 61 6c 69 7a 65 p and initialize
0810: 0a 23 20 20 20 20 61 6e 79 20 62 75 69 6c 74 2d .# any built-
0820: 69 6e 20 73 65 74 74 69 6e 67 73 20 66 72 6f 6d in settings from
0830: 20 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6b 65 the parent make
0840: 66 69 6c 65 0a 23 20 31 2e 20 46 69 72 73 74 20 file.# 1. First
0850: 64 65 66 69 6e 65 20 74 68 65 20 65 78 74 65 72 define the exter
0860: 6e 61 6c 20 74 6f 6f 6c 73 20 75 73 65 64 20 66 nal tools used f
0870: 6f 72 20 63 6f 6d 70 69 6c 69 6e 67 2c 20 63 6f or compiling, co
0880: 70 79 69 6e 67 20 65 74 63 2e 0a 23 20 20 20 20 pying etc..#
0890: 61 73 20 74 68 69 73 20 69 73 20 69 6e 64 65 70 as this is indep
08a0: 65 6e 64 65 6e 74 20 6f 66 20 65 76 65 72 79 74 endent of everyt
08b0: 68 69 6e 67 20 65 6c 73 65 2e 0a 23 20 32 2e 20 hing else..# 2.
08c0: 46 69 67 75 72 65 20 6f 75 74 20 6f 75 72 20 62 Figure out our b
08d0: 75 69 6c 64 20 73 74 72 75 63 74 75 72 65 20 69 uild structure i
08e0: 6e 20 74 65 72 6d 73 20 6f 66 20 74 68 65 20 64 n terms of the d
08f0: 69 72 65 63 74 6f 72 79 2c 20 77 68 65 74 68 65 irectory, whethe
0900: 72 0a 23 20 20 20 20 77 65 20 61 72 65 20 62 75 r.# we are bu
0910: 69 6c 64 69 6e 67 20 54 63 6c 20 6f 72 20 61 6e ilding Tcl or an
0920: 20 65 78 74 65 6e 73 69 6f 6e 2c 20 65 74 63 2e extension, etc.
0930: 0a 23 20 33 2e 20 44 65 74 65 72 6d 69 6e 65 20 .# 3. Determine
0940: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 the compiler and
0950: 20 6c 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 linker versions
0960: 0a 23 20 34 2e 20 42 75 69 6c 64 20 74 68 65 20 .# 4. Build the
0970: 6e 6d 61 6b 65 68 6c 70 20 68 65 6c 70 65 72 20 nmakehlp helper
0980: 61 70 70 6c 69 63 61 74 69 6f 6e 0a 23 20 35 2e application.# 5.
0990: 20 44 65 74 65 72 6d 69 6e 65 20 74 68 65 20 73 Determine the s
09a0: 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 6c 65 upported compile
09b0: 72 20 6f 70 74 69 6f 6e 73 20 61 6e 64 20 66 65 r options and fe
09c0: 61 74 75 72 65 73 0a 23 20 36 2e 20 45 78 74 72 atures.# 6. Extr
09d0: 61 63 74 20 54 63 6c 2c 20 54 6b 2c 20 61 6e 64 act Tcl, Tk, and
09e0: 20 70 6f 73 73 69 62 6c 79 20 65 78 74 65 6e 73 possibly extens
09f0: 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e 20 6e 75 ions, version nu
0a00: 6d 62 65 72 73 20 66 72 6f 6d 20 74 68 65 0a 23 mbers from the.#
0a10: 20 20 20 20 68 65 61 64 65 72 73 0a 23 20 37 2e headers.# 7.
0a20: 20 50 61 72 73 65 20 74 68 65 20 4f 50 54 53 20 Parse the OPTS
0a30: 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 6f 72 20 macro value for
0a40: 75 73 65 72 2d 73 70 65 63 69 66 69 65 64 20 62 user-specified b
0a50: 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 uild configurati
0a60: 6f 6e 0a 23 20 38 2e 20 50 61 72 73 65 20 74 68 on.# 8. Parse th
0a70: 65 20 53 54 41 54 53 20 6d 61 63 72 6f 20 76 61 e STATS macro va
0a80: 6c 75 65 20 66 6f 72 20 73 74 61 74 69 73 74 69 lue for statisti
0a90: 63 73 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 cs instrumentati
0aa0: 6f 6e 0a 23 20 39 2e 20 50 61 72 73 65 20 74 68 on.# 9. Parse th
0ab0: 65 20 43 48 45 43 4b 53 20 6d 61 63 72 6f 20 66 e CHECKS macro f
0ac0: 6f 72 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f or additional co
0ad0: 6d 70 69 6c 61 74 69 6f 6e 20 63 68 65 63 6b 73 mpilation checks
0ae0: 0a 23 20 31 30 2e 20 42 61 73 65 64 20 6f 6e 20 .# 10. Based on
0af0: 74 68 69 73 20 73 65 6c 65 63 74 65 64 20 63 6f this selected co
0b00: 6e 66 69 67 75 72 61 74 69 6f 6e 2c 20 63 6f 6e nfiguration, con
0b10: 73 74 72 75 63 74 20 74 68 65 20 6f 75 74 70 75 struct the outpu
0b20: 74 0a 23 20 20 20 20 20 64 69 72 65 63 74 6f 72 t.# director
0b30: 79 20 61 6e 64 20 66 69 6c 65 20 70 61 74 68 73 y and file paths
0b40: 0a 23 20 31 31 2e 20 43 6f 6e 73 74 72 75 63 74 .# 11. Construct
0b50: 20 74 68 65 20 70 61 74 68 73 20 77 68 65 72 65 the paths where
0b60: 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 the package is
0b70: 74 6f 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a to be installed.
0b80: 23 20 31 32 2e 20 53 65 74 20 75 70 20 74 68 65 # 12. Set up the
0b90: 20 61 63 74 75 61 6c 20 6f 70 74 69 6f 6e 73 20 actual options
0ba0: 70 61 73 73 65 64 20 74 6f 20 63 6f 6d 70 69 6c passed to compil
0bb0: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 62 61 er and linker ba
0bc0: 73 65 64 0a 23 20 20 20 20 20 6f 6e 20 74 68 65 sed.# on the
0bd0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 67 61 74 information gat
0be0: 68 65 72 65 64 20 61 62 6f 76 65 2e 0a 23 20 31 hered above..# 1
0bf0: 33 2e 20 44 65 66 69 6e 65 20 73 6f 6d 65 20 73 3. Define some s
0c00: 74 61 6e 64 61 72 64 20 62 75 69 6c 64 20 74 61 tandard build ta
0c10: 72 67 65 74 73 20 61 6e 64 20 69 6d 70 6c 69 63 rgets and implic
0c20: 69 74 20 72 75 6c 65 73 2e 20 54 68 65 73 65 20 it rules. These
0c30: 6d 61 79 0a 23 20 20 20 20 20 62 65 20 6f 70 74 may.# be opt
0c40: 69 6f 6e 61 6c 6c 79 20 64 69 73 61 62 6c 65 64 ionally disabled
0c50: 20 62 79 20 74 68 65 20 70 61 72 65 6e 74 20 6d by the parent m
0c60: 61 6b 65 66 69 6c 65 2e 0a 23 20 31 34 2e 20 28 akefile..# 14. (
0c70: 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 6f For extensions o
0c80: 6e 6c 79 2e 29 20 43 6f 6d 70 61 72 65 20 74 68 nly.) Compare th
0c90: 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 e configuration
0ca0: 6f 66 20 74 68 65 20 74 61 72 67 65 74 0a 23 20 of the target.#
0cb0: 20 20 20 20 54 63 6c 20 61 6e 64 20 74 68 65 20 Tcl and the
0cc0: 65 78 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 77 extensions and w
0cd0: 61 72 6e 20 61 67 61 69 6e 73 74 20 64 69 73 63 arn against disc
0ce0: 72 65 70 61 6e 63 69 65 73 2e 0a 23 0a 23 20 4f repancies..#.# O
0cf0: 6e 65 20 66 69 6e 61 6c 20 6e 6f 74 65 20 61 62 ne final note ab
0d00: 6f 75 74 20 74 68 65 20 6d 61 63 72 6f 20 6e 61 out the macro na
0d10: 6d 65 73 20 75 73 65 64 2e 20 54 68 65 79 20 61 mes used. They a
0d20: 72 65 20 61 73 20 74 68 65 79 20 61 72 65 0a 23 re as they are.#
0d30: 20 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c 20 for historical
0d40: 72 65 61 73 6f 6e 73 2e 20 57 65 20 77 6f 75 6c reasons. We woul
0d50: 64 20 6c 69 6b 65 20 6c 65 67 61 63 79 20 65 78 d like legacy ex
0d60: 74 65 6e 73 69 6f 6e 73 20 74 6f 0a 23 20 63 6f tensions to.# co
0d70: 6e 74 69 6e 75 65 20 74 6f 20 77 6f 72 6b 20 77 ntinue to work w
0d80: 69 74 68 20 74 68 69 73 20 6d 61 6b 65 20 69 6e ith this make in
0d90: 63 6c 75 64 65 20 66 69 6c 65 20 73 6f 20 62 65 clude file so be
0da0: 20 77 61 72 79 20 6f 66 0a 23 20 63 68 61 6e 67 wary of.# chang
0db0: 69 6e 67 20 74 68 65 6d 20 66 6f 72 20 63 6f 6e ing them for con
0dc0: 73 69 73 74 65 6e 63 79 20 6f 72 20 63 6c 61 72 sistency or clar
0dd0: 69 74 79 2e 0a 0a 23 20 30 2e 20 53 61 6e 69 74 ity...# 0. Sanit
0de0: 79 20 63 68 65 63 6b 20 63 6f 6d 70 69 6c 65 72 y check compiler
0df0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 0a 23 20 environment..#
0e00: 43 68 65 63 6b 20 74 6f 20 73 65 65 20 77 65 20 Check to see we
0e10: 61 72 65 20 63 6f 6e 66 69 67 75 72 65 64 20 74 are configured t
0e20: 6f 20 62 75 69 6c 64 20 77 69 74 68 20 4d 53 56 o build with MSV
0e30: 43 20 28 4d 53 44 45 56 44 49 52 2c 20 4d 53 56 C (MSDEVDIR, MSV
0e40: 43 44 49 52 20 6f 72 0a 23 20 56 43 49 4e 53 54 CDIR or.# VCINST
0e50: 41 4c 4c 44 49 52 29 20 6f 72 20 77 69 74 68 20 ALLDIR) or with
0e60: 74 68 65 20 4d 53 20 50 6c 61 74 66 6f 72 6d 20 the MS Platform
0e70: 53 44 4b 20 28 4d 53 53 44 4b 20 6f 72 20 57 69 SDK (MSSDK or Wi
0e80: 6e 64 6f 77 73 53 44 4b 44 69 72 29 0a 0a 21 69 ndowsSDKDir)..!i
0e90: 66 20 21 64 65 66 69 6e 65 64 28 4d 53 44 45 56 f !defined(MSDEV
0ea0: 44 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 DIR) && !defined
0eb0: 28 4d 53 56 43 44 49 52 29 20 26 26 20 21 64 65 (MSVCDIR) && !de
0ec0: 66 69 6e 65 64 28 56 43 49 4e 53 54 41 4c 4c 44 fined(VCINSTALLD
0ed0: 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 IR) && !defined(
0ee0: 4d 53 53 44 4b 29 20 26 26 20 21 64 65 66 69 6e MSSDK) && !defin
0ef0: 65 64 28 57 49 4e 44 4f 57 53 53 44 4b 44 49 52 ed(WINDOWSSDKDIR
0f00: 29 0a 4d 53 47 20 3d 20 5e 0a 56 69 73 75 61 6c ).MSG = ^.Visual
0f10: 20 43 2b 2b 20 63 6f 6d 70 69 6c 65 72 20 65 6e C++ compiler en
0f20: 76 69 72 6f 6e 6d 65 6e 74 20 6e 6f 74 20 69 6e vironment not in
0f30: 69 74 69 61 6c 69 7a 65 64 2e 0a 21 65 72 72 6f itialized..!erro
0f40: 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a r $(MSG).!endif.
0f50: 0a 23 20 57 65 20 6e 65 65 64 20 74 6f 20 72 75 .# We need to ru
0f60: 6e 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 63 n from the direc
0f70: 74 6f 72 79 20 74 68 65 20 70 61 72 65 6e 74 20 tory the parent
0f80: 6d 61 6b 65 66 69 6c 65 20 69 73 20 6c 6f 63 61 makefile is loca
0f90: 74 65 64 20 69 6e 2e 0a 23 20 6e 6d 61 6b 65 20 ted in..# nmake
0fa0: 64 6f 65 73 20 6e 6f 74 20 74 65 6c 6c 20 75 73 does not tell us
0fb0: 20 77 68 61 74 20 6d 61 6b 65 66 69 6c 65 20 77 what makefile w
0fc0: 61 73 20 75 73 65 64 20 74 6f 20 69 6e 76 6f 6b as used to invok
0fd0: 65 20 69 74 20 73 6f 20 70 61 72 65 6e 74 0a 23 e it so parent.#
0fe0: 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 74 6f makefile has to
0ff0: 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46 49 4c set the MAKEFIL
1000: 45 56 43 20 6d 61 63 72 6f 20 6f 72 20 77 65 20 EVC macro or we
1010: 6a 75 73 74 20 6d 61 6b 65 20 61 20 67 75 65 73 just make a gues
1020: 73 20 61 6e 64 0a 23 20 77 61 72 6e 20 69 66 20 s and.# warn if
1030: 77 65 20 74 68 69 6e 6b 20 74 68 61 74 20 69 73 we think that is
1040: 20 6e 6f 74 20 74 68 65 20 63 61 73 65 2e 0a 21 not the case..!
1050: 69 66 20 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 if "$(MAKEFILEVC
1060: 29 22 20 3d 3d 20 22 22 0a 0a 21 69 66 20 65 78 )" == ""..!if ex
1070: 69 73 74 28 22 24 28 50 52 4f 4a 45 43 54 29 2e ist("$(PROJECT).
1080: 76 63 22 29 0a 4d 41 4b 45 46 49 4c 45 56 43 20 vc").MAKEFILEVC
1090: 3d 20 24 28 50 52 4f 4a 45 43 54 29 2e 76 63 0a = $(PROJECT).vc.
10a0: 21 65 6c 73 65 69 66 20 65 78 69 73 74 28 22 6d !elseif exist("m
10b0: 61 6b 65 66 69 6c 65 2e 76 63 22 29 0a 4d 41 4b akefile.vc").MAK
10c0: 45 46 49 4c 45 56 43 20 3d 20 6d 61 6b 65 66 69 EFILEVC = makefi
10d0: 6c 65 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 6e le.vc.!endif.!en
10e0: 64 69 66 20 23 20 22 24 28 4d 41 4b 45 46 49 4c dif # "$(MAKEFIL
10f0: 45 56 43 29 22 20 3d 3d 20 22 22 0a 0a 21 69 66 EVC)" == ""..!if
1100: 20 21 65 78 69 73 74 28 22 24 28 4d 41 4b 45 46 !exist("$(MAKEF
1110: 49 4c 45 56 43 29 22 29 0a 4d 53 47 20 3d 20 5e ILEVC)").MSG = ^
1120: 0a 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 6e 6d .You must run nm
1130: 61 6b 65 20 66 72 6f 6d 20 74 68 65 20 64 69 72 ake from the dir
1140: 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e ectory containin
1150: 67 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 g the project ma
1160: 6b 65 66 69 6c 65 2e 5e 0a 49 66 20 79 6f 75 20 kefile.^.If you
1170: 61 72 65 20 64 6f 69 6e 67 20 74 68 61 74 20 61 are doing that a
1180: 6e 64 20 67 65 74 74 69 6e 67 20 74 68 69 73 20 nd getting this
1190: 6d 65 73 73 61 67 65 2c 20 73 65 74 20 74 68 65 message, set the
11a0: 20 4d 41 4b 45 46 49 4c 45 56 43 5e 0a 6d 61 63 MAKEFILEVC^.mac
11b0: 72 6f 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f ro to the name o
11c0: 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 f the project ma
11d0: 6b 65 66 69 6c 65 2e 0a 21 6d 65 73 73 61 67 65 kefile..!message
11e0: 20 57 41 52 4e 49 4e 47 3a 20 24 28 4d 53 47 29 WARNING: $(MSG)
11f0: 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 23 .!endif...######
1200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1210: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1220: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1230: 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 2e 20 ##########.# 1.
1240: 44 65 66 69 6e 65 20 65 78 74 65 72 6e 61 6c 20 Define external
1250: 70 72 6f 67 72 61 6d 73 20 62 65 69 6e 67 20 75 programs being u
1260: 73 65 64 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d sed..#----------
1270: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1280: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1290: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
12a0: 0a 23 20 53 65 74 20 74 68 65 20 70 72 6f 70 65 .# Set the prope
12b0: 72 20 63 6f 70 79 20 6d 65 74 68 6f 64 20 74 6f r copy method to
12c0: 20 61 76 6f 69 64 20 6f 76 65 72 77 72 69 74 65 avoid overwrite
12d0: 20 71 75 65 73 74 69 6f 6e 73 0a 23 20 74 6f 20 questions.# to
12e0: 74 68 65 20 75 73 65 72 20 77 68 65 6e 20 63 6f the user when co
12f0: 70 79 69 6e 67 20 66 69 6c 65 73 20 61 6e 64 20 pying files and
1300: 73 65 6c 65 63 74 69 6e 67 20 74 68 65 20 72 69 selecting the ri
1310: 67 68 74 0a 23 20 22 64 65 6c 65 74 65 20 61 6c ght.# "delete al
1320: 6c 22 20 6d 65 74 68 6f 64 2e 0a 23 2d 2d 2d 2d l" method..#----
1330: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1360: 2d 2d 2d 2d 2d 2d 0a 23 20 54 63 6c 20 42 75 67 ------.# Tcl Bug
1370: 20 62 65 34 30 62 37 33 36 3a 20 75 73 65 20 72 be40b736: use r
1380: 64 2f 6d 64 20 69 6e 73 74 65 61 64 20 72 6d 64 d/md instead rmd
1390: 69 72 2f 6d 6b 64 69 72 2e 0a 23 20 4f 74 68 65 ir/mkdir..# Othe
13a0: 72 77 69 73 65 2c 20 61 6e 20 65 76 65 6e 74 75 rwise, an eventu
13b0: 61 6c 20 63 79 67 77 69 6e 20 76 65 72 73 69 6f al cygwin versio
13c0: 6e 20 77 69 74 68 20 64 69 66 66 65 72 65 6e 74 n with different
13d0: 0a 23 20 70 61 72 61 6d 65 74 65 72 73 20 6d 61 .# parameters ma
13e0: 79 20 62 65 20 75 73 65 64 2e 0a 23 2d 2d 2d 2d y be used..#----
13f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1400: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1410: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1420: 2d 2d 2d 2d 2d 2d 0a 0a 52 4d 44 49 52 09 3d 20 ------..RMDIR.=
1430: 72 64 20 2f 53 20 2f 51 0a 43 50 59 09 3d 20 78 rd /S /Q.CPY.= x
1440: 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e 55 4c 0a copy /i /y >NUL.
1450: 43 50 59 44 49 52 20 20 3d 20 78 63 6f 70 79 20 CPYDIR = xcopy
1460: 2f 65 20 2f 69 20 2f 79 20 3e 4e 55 4c 0a 43 4f /e /i /y >NUL.CO
1470: 50 59 09 3d 20 63 6f 70 79 20 2f 79 20 3e 4e 55 PY.= copy /y >NU
1480: 4c 0a 4d 4b 44 49 52 20 20 20 3d 20 6d 64 0a 0a L.MKDIR = md..
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 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
14c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
14d0: 23 23 23 23 23 23 0a 23 20 32 2e 20 46 69 67 75 ######.# 2. Figu
14e0: 72 65 20 6f 75 74 20 6f 75 72 20 62 75 69 6c 64 re out our build
14f0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 environment in
1500: 74 65 72 6d 73 20 6f 66 20 77 68 61 74 20 77 65 terms of what we
1510: 27 72 65 20 62 75 69 6c 64 69 6e 67 2e 0a 23 0a 're building..#.
1520: 23 20 28 61 29 20 54 63 6c 20 69 74 73 65 6c 66 # (a) Tcl itself
1530: 0a 23 20 28 62 29 20 54 6b 0a 23 20 28 63 29 20 .# (b) Tk.# (c)
1540: 61 20 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 a Tcl extension
1550: 75 73 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f using libraries/
1560: 69 6e 63 6c 75 64 65 73 20 66 72 6f 6d 20 61 6e includes from an
1570: 20 2a 69 6e 73 74 61 6c 6c 65 64 2a 20 54 63 6c *installed* Tcl
1580: 0a 23 20 28 64 29 20 61 20 54 63 6c 20 65 78 74 .# (d) a Tcl ext
1590: 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 62 ension using lib
15a0: 72 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 20 raries/includes
15b0: 66 72 6f 6d 20 54 63 6c 20 73 6f 75 72 63 65 20 from Tcl source
15c0: 64 69 72 65 63 74 6f 72 79 0a 23 0a 23 20 54 68 directory.#.# Th
15d0: 69 73 20 6c 61 73 74 20 69 73 20 6e 65 65 64 65 is last is neede
15e0: 64 20 62 65 63 61 75 73 65 20 73 6f 6d 65 20 65 d because some e
15f0: 78 74 65 6e 73 69 6f 6e 73 20 73 74 69 6c 6c 20 xtensions still
1600: 6e 65 65 64 0a 23 20 73 6f 6d 65 20 54 63 6c 20 need.# some Tcl
1610: 69 6e 74 65 72 66 61 63 65 73 20 74 68 61 74 20 interfaces that
1620: 61 72 65 20 6e 6f 74 20 70 75 62 6c 69 63 6c 79 are not publicly
1630: 20 65 78 70 6f 73 65 64 2e 0a 23 0a 23 20 54 68 exposed..#.# Th
1640: 65 20 66 72 61 67 6d 65 6e 74 20 77 69 6c 6c 20 e fragment will
1650: 73 65 74 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e set the followin
1660: 67 20 6d 61 63 72 6f 73 3a 0a 23 20 52 4f 4f 54 g macros:.# ROOT
1670: 20 2d 20 72 6f 6f 74 20 6f 66 20 74 68 69 73 20 - root of this
1680: 6d 6f 64 75 6c 65 20 73 6f 75 72 63 65 73 0a 23 module sources.#
1690: 20 43 4f 4d 50 41 54 44 49 52 20 2d 20 73 6f 75 COMPATDIR - sou
16a0: 72 63 65 20 64 69 72 65 63 74 6f 72 79 20 74 68 rce directory th
16b0: 61 74 20 68 6f 6c 64 73 20 63 6f 6d 70 61 74 69 at holds compati
16c0: 62 69 6c 69 74 79 20 73 6f 75 72 63 65 73 0a 23 bility sources.#
16d0: 20 44 4f 43 44 49 52 20 2d 20 73 6f 75 72 63 65 DOCDIR - source
16e0: 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 directory conta
16f0: 69 6e 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 ining documentat
1700: 69 6f 6e 20 66 69 6c 65 73 0a 23 20 47 45 4e 45 ion files.# GENE
1710: 52 49 43 44 49 52 20 2d 20 70 6c 61 74 66 6f 72 RICDIR - platfor
1720: 6d 2d 69 6e 64 65 70 65 6e 64 65 6e 74 20 73 6f m-independent so
1730: 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 0a 23 urce directory.#
1740: 20 57 49 4e 5f 44 49 52 20 2d 20 57 69 6e 64 6f WIN_DIR - Windo
1750: 77 73 2d 73 70 65 63 69 66 69 63 20 73 6f 75 72 ws-specific sour
1760: 63 65 20 64 69 72 65 63 74 6f 72 79 0a 23 20 54 ce directory.# T
1770: 45 53 54 44 49 52 20 2d 20 64 69 72 65 63 74 6f ESTDIR - directo
1780: 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 65 ry containing te
1790: 73 74 20 66 69 6c 65 73 0a 23 20 54 4f 4f 4c 53 st files.# TOOLS
17a0: 44 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 20 DIR - directory
17b0: 63 6f 6e 74 61 69 6e 69 6e 67 20 62 75 69 6c 64 containing build
17c0: 20 74 6f 6f 6c 73 0a 23 20 5f 54 43 4c 44 49 52 tools.# _TCLDIR
17d0: 20 2d 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 - root of the T
17e0: 63 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 cl installation
17f0: 4f 52 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 OR the Tcl sourc
1800: 65 73 2e 20 4e 6f 74 20 73 65 74 0a 23 20 20 20 es. Not set.#
1810: 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 when building T
1820: 63 6c 20 69 74 73 65 6c 66 2e 0a 23 20 5f 49 4e cl itself..# _IN
1830: 53 54 41 4c 4c 44 49 52 20 2d 20 6e 61 74 69 76 STALLDIR - nativ
1840: 65 20 66 6f 72 6d 20 6f 66 20 74 68 65 20 69 6e e form of the in
1850: 73 74 61 6c 6c 61 74 69 6f 6e 20 70 61 74 68 2e stallation path.
1860: 20 46 6f 72 20 54 63 6c 0a 23 20 20 20 20 74 68 For Tcl.# th
1870: 69 73 20 77 69 6c 6c 20 62 65 20 74 68 65 20 72 is will be the r
1880: 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c 20 69 oot of the Tcl i
1890: 6e 73 74 61 6c 6c 61 74 69 6f 6e 2e 20 46 6f 72 nstallation. For
18a0: 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 20 20 extensions.#
18b0: 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 74 68 this will be th
18c0: 65 20 6c 69 62 20 64 69 72 65 63 74 6f 72 79 20 e lib directory
18d0: 75 6e 64 65 72 20 74 68 65 20 72 6f 6f 74 2e 0a under the root..
18e0: 23 20 54 43 4c 49 4e 53 54 41 4c 4c 20 20 2d 20 # TCLINSTALL -
18f0: 73 65 74 20 74 6f 20 31 20 69 66 20 5f 54 43 4c set to 1 if _TCL
1900: 44 49 52 20 72 65 66 65 72 73 20 74 6f 0a 23 20 DIR refers to.#
1910: 20 20 20 68 65 61 64 65 72 73 20 61 6e 64 20 6c headers and l
1920: 69 62 72 61 72 69 65 73 20 66 72 6f 6d 20 61 6e ibraries from an
1930: 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 2c 20 installed Tcl,
1940: 61 6e 64 20 30 20 69 66 20 62 75 69 6c 74 20 61 and 0 if built a
1950: 67 61 69 6e 73 74 0a 23 20 20 20 20 54 63 6c 20 gainst.# Tcl
1960: 73 6f 75 72 63 65 73 2e 20 4e 6f 74 20 73 65 74 sources. Not set
1970: 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 when building T
1980: 63 6c 20 69 74 73 65 6c 66 2e 20 59 65 73 2c 20 cl itself. Yes,
1990: 6e 6f 74 20 76 65 72 79 20 77 65 6c 6c 0a 23 20 not very well.#
19a0: 20 20 20 6e 61 6d 65 64 2e 0a 23 20 5f 54 43 4c named..# _TCL
19b0: 5f 48 20 2d 20 6e 61 74 69 76 65 20 70 61 74 68 _H - native path
19c0: 20 74 6f 20 74 68 65 20 74 63 6c 2e 68 20 66 69 to the tcl.h fi
19d0: 6c 65 0a 23 0a 23 20 49 66 20 54 6b 20 69 73 20 le.#.# If Tk is
19e0: 69 6e 76 6f 6c 76 65 64 2c 20 61 6c 73 6f 20 73 involved, also s
19f0: 65 74 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e ets the followin
1a00: 67 0a 23 20 5f 54 4b 44 49 52 20 2d 20 6e 61 74 g.# _TKDIR - nat
1a10: 69 76 65 20 66 6f 72 6d 20 54 6b 20 69 6e 73 74 ive form Tk inst
1a20: 61 6c 6c 61 74 69 6f 6e 20 4f 52 20 54 6b 20 73 allation OR Tk s
1a30: 6f 75 72 63 65 2e 20 4e 6f 74 20 73 65 74 20 69 ource. Not set i
1a40: 66 20 62 75 69 6c 64 69 6e 67 0a 23 20 20 20 20 f building.#
1a50: 54 6b 20 69 74 73 65 6c 66 2e 0a 23 20 54 4b 49 Tk itself..# TKI
1a60: 4e 53 54 41 4c 4c 20 2d 20 73 65 74 20 31 20 69 NSTALL - set 1 i
1a70: 66 20 5f 54 4b 44 49 52 20 72 65 66 65 72 73 20 f _TKDIR refers
1a80: 74 6f 20 69 6e 73 74 61 6c 6c 65 64 20 54 6b 20 to installed Tk
1a90: 61 6e 64 20 30 20 69 66 20 54 6b 20 73 6f 75 72 and 0 if Tk sour
1aa0: 63 65 73 0a 23 20 5f 54 4b 5f 48 20 2d 20 6e 61 ces.# _TK_H - na
1ab0: 74 69 76 65 20 70 61 74 68 20 74 6f 20 74 68 65 tive path to the
1ac0: 20 74 6b 2e 68 20 66 69 6c 65 0a 0a 23 20 52 6f tk.h file..# Ro
1ad0: 6f 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 ot directory for
1ae0: 20 73 6f 75 72 63 65 73 20 61 6e 64 20 61 73 73 sources and ass
1af0: 75 6d 65 64 20 73 75 62 64 69 72 65 63 74 6f 72 umed subdirector
1b00: 69 65 73 0a 52 4f 4f 54 20 3d 20 24 28 4d 41 4b ies.ROOT = $(MAK
1b10: 45 44 49 52 29 5c 2e 2e 0a 23 20 54 68 65 20 66 EDIR)\...# The f
1b20: 6f 6c 6c 6f 77 69 6e 67 20 70 61 74 68 73 20 43 ollowing paths C
1b30: 41 4e 4e 4f 54 20 68 61 76 65 20 73 70 61 63 65 ANNOT have space
1b40: 73 20 69 6e 20 74 68 65 6d 20 61 73 20 74 68 65 s in them as the
1b50: 79 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65 0a y appear on the.
1b60: 23 20 6c 65 66 74 20 73 69 64 65 20 6f 66 20 69 # left side of i
1b70: 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0a 21 mplicit rules..!
1b80: 69 66 6e 64 65 66 20 43 4f 4d 50 41 54 44 49 52 ifndef COMPATDIR
1b90: 0a 43 4f 4d 50 41 54 44 49 52 09 3d 20 24 28 52 .COMPATDIR.= $(R
1ba0: 4f 4f 54 29 5c 63 6f 6d 70 61 74 0a 21 65 6e 64 OOT)\compat.!end
1bb0: 69 66 0a 21 69 66 6e 64 65 66 20 44 4f 43 44 49 if.!ifndef DOCDI
1bc0: 52 0a 44 4f 43 44 49 52 09 09 3d 20 24 28 52 4f R.DOCDIR..= $(RO
1bd0: 4f 54 29 5c 64 6f 63 0a 21 65 6e 64 69 66 0a 21 OT)\doc.!endif.!
1be0: 69 66 6e 64 65 66 20 47 45 4e 45 52 49 43 44 49 ifndef GENERICDI
1bf0: 52 0a 47 45 4e 45 52 49 43 44 49 52 09 3d 20 24 R.GENERICDIR.= $
1c00: 28 52 4f 4f 54 29 5c 67 65 6e 65 72 69 63 0a 21 (ROOT)\generic.!
1c10: 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 54 4f endif.!ifndef TO
1c20: 4f 4c 53 44 49 52 0a 54 4f 4f 4c 53 44 49 52 09 OLSDIR.TOOLSDIR.
1c30: 3d 20 24 28 52 4f 4f 54 29 5c 74 6f 6f 6c 73 0a = $(ROOT)\tools.
1c40: 21 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 54 !endif.!ifndef T
1c50: 45 53 54 44 49 52 0a 54 45 53 54 44 49 52 09 3d ESTDIR.TESTDIR.=
1c60: 20 24 28 52 4f 4f 54 29 5c 74 65 73 74 73 0a 21 $(ROOT)\tests.!
1c70: 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 4c 49 endif.!ifndef LI
1c80: 42 44 49 52 0a 21 69 66 20 65 78 69 73 74 28 22 BDIR.!if exist("
1c90: 24 28 52 4f 4f 54 29 5c 6c 69 62 72 61 72 79 22 $(ROOT)\library"
1ca0: 29 0a 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 ).LIBDIR
1cb0: 20 20 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 72 = $(ROOT)\libr
1cc0: 61 72 79 0a 21 65 6c 73 65 0a 4c 49 42 44 49 52 ary.!else.LIBDIR
1cd0: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 52 4f = $(RO
1ce0: 4f 54 29 5c 6c 69 62 0a 21 65 6e 64 69 66 0a 21 OT)\lib.!endif.!
1cf0: 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 44 45 endif.!ifndef DE
1d00: 4d 4f 44 49 52 0a 21 69 66 20 65 78 69 73 74 28 MODIR.!if exist(
1d10: 22 24 28 4c 49 42 44 49 52 29 5c 64 65 6d 6f 73 "$(LIBDIR)\demos
1d20: 22 29 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 28 ").DEMODIR..= $(
1d30: 4c 49 42 44 49 52 29 5c 64 65 6d 6f 73 0a 21 65 LIBDIR)\demos.!e
1d40: 6c 73 65 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 lse.DEMODIR..= $
1d50: 28 52 4f 4f 54 29 5c 64 65 6d 6f 73 0a 21 65 6e (ROOT)\demos.!en
1d60: 64 69 66 0a 21 65 6e 64 69 66 20 23 20 69 66 6e dif.!endif # ifn
1d70: 64 65 66 20 44 45 4d 4f 44 49 52 0a 23 20 44 6f def DEMODIR.# Do
1d80: 20 4e 4f 54 20 75 73 65 20 57 49 4e 44 49 52 20 NOT use WINDIR
1d90: 62 65 63 61 75 73 65 20 69 74 20 69 73 20 57 69 because it is Wi
1da0: 6e 64 6f 77 73 20 69 6e 74 65 72 6e 61 6c 20 65 ndows internal e
1db0: 6e 76 69 72 6f 6e 6d 65 6e 74 0a 23 20 76 61 72 nvironment.# var
1dc0: 69 61 62 6c 65 20 74 6f 20 70 6f 69 6e 74 20 74 iable to point t
1dd0: 6f 20 63 3a 5c 77 69 6e 64 6f 77 73 21 0a 57 49 o c:\windows!.WI
1de0: 4e 5f 44 49 52 09 09 3d 20 24 28 52 4f 4f 54 29 N_DIR..= $(ROOT)
1df0: 5c 77 69 6e 0a 0a 21 69 66 6e 64 65 66 20 52 43 \win..!ifndef RC
1e00: 44 49 52 0a 21 69 66 20 65 78 69 73 74 28 22 24 DIR.!if exist("$
1e10: 28 57 49 4e 5f 44 49 52 29 5c 72 63 22 29 0a 52 (WIN_DIR)\rc").R
1e20: 43 44 49 52 20 20 20 20 20 20 20 20 20 20 20 3d CDIR =
1e30: 20 24 28 57 49 4e 5f 44 49 52 29 5c 72 63 0a 21 $(WIN_DIR)\rc.!
1e40: 65 6c 73 65 0a 52 43 44 49 52 20 20 20 20 20 20 else.RCDIR
1e50: 20 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 = $(WIN_DIR
1e60: 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a ).!endif.!endif.
1e70: 52 43 44 49 52 20 3d 20 24 28 52 43 44 49 52 3a RCDIR = $(RCDIR:
1e80: 2f 3d 5c 29 0a 0a 23 20 54 68 65 20 74 61 72 67 /=\)..# The targ
1e90: 65 74 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 et directory whe
1ea0: 72 65 20 74 68 65 20 62 75 69 6c 74 20 70 61 63 re the built pac
1eb0: 6b 61 67 65 73 20 61 6e 64 20 62 69 6e 61 72 69 kages and binari
1ec0: 65 73 20 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 es will be insta
1ed0: 6c 6c 65 64 2e 0a 23 20 49 4e 53 54 41 4c 4c 44 lled..# INSTALLD
1ee0: 49 52 20 69 73 20 74 68 65 20 28 6f 70 74 69 6f IR is the (optio
1ef0: 6e 61 6c 29 20 70 61 74 68 20 73 70 65 63 69 66 nal) path specif
1f00: 69 65 64 20 62 79 20 74 68 65 20 75 73 65 72 2e ied by the user.
1f10: 0a 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 .# _INSTALLDIR i
1f20: 73 20 49 4e 53 54 41 4c 4c 44 49 52 20 75 73 69 s INSTALLDIR usi
1f30: 6e 67 20 74 68 65 20 62 61 63 6b 73 6c 61 73 68 ng the backslash
1f40: 20 73 65 70 61 72 61 74 6f 72 20 73 79 6e 74 61 separator synta
1f50: 78 0a 21 69 66 64 65 66 20 49 4e 53 54 41 4c 4c x.!ifdef INSTALL
1f60: 44 49 52 0a 23 23 23 20 46 69 78 20 74 68 65 20 DIR.### Fix the
1f70: 70 61 74 68 20 73 65 70 61 72 61 74 6f 72 73 2e path separators.
1f80: 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 09 3d 20 24 ._INSTALLDIR.= $
1f90: 28 49 4e 53 54 41 4c 4c 44 49 52 3a 2f 3d 5c 29 (INSTALLDIR:/=\)
1fa0: 0a 21 65 6c 73 65 0a 23 23 23 20 41 73 73 75 6d .!else.### Assum
1fb0: 65 20 74 68 65 20 6e 6f 72 6d 61 6c 20 64 65 66 e the normal def
1fc0: 61 75 6c 74 2e 0a 5f 49 4e 53 54 41 4c 4c 44 49 ault.._INSTALLDI
1fd0: 52 09 3d 20 24 28 48 4f 4d 45 44 52 49 56 45 29 R.= $(HOMEDRIVE)
1fe0: 5c 54 63 6c 0a 21 65 6e 64 69 66 0a 0a 21 69 66 \Tcl.!endif..!if
1ff0: 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 23 $(DOING_TCL)..#
2000: 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 61 29 BEGIN Case 2(a)
2010: 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 - Building Tcl
2020: 69 74 73 65 6c 66 0a 0a 23 20 4f 6e 6c 79 20 6e itself..# Only n
2030: 65 65 64 20 74 6f 20 64 65 66 69 6e 65 20 5f 54 eed to define _T
2040: 43 4c 5f 48 0a 5f 54 43 4c 5f 48 20 3d 20 2e 2e CL_H._TCL_H = ..
2050: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 0a \generic\tcl.h..
2060: 23 20 45 4e 44 20 43 61 73 65 20 32 28 61 29 20 # END Case 2(a)
2070: 2d 20 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 - Building Tcl i
2080: 74 73 65 6c 66 0a 0a 21 65 6c 73 65 69 66 20 24 tself..!elseif $
2090: 28 44 4f 49 4e 47 5f 54 4b 29 0a 0a 23 20 42 45 (DOING_TK)..# BE
20a0: 47 49 4e 20 43 61 73 65 20 32 28 62 29 20 2d 20 GIN Case 2(b) -
20b0: 42 75 69 6c 64 69 6e 67 20 54 6b 0a 0a 54 43 4c Building Tk..TCL
20c0: 49 4e 53 54 41 4c 4c 20 3d 20 30 20 23 20 54 6b INSTALL = 0 # Tk
20d0: 20 61 6c 77 61 79 73 20 62 75 69 6c 64 73 20 61 always builds a
20e0: 67 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 gainst Tcl sourc
20f0: 65 2c 20 6e 6f 74 20 61 6e 20 69 6e 73 74 61 6c e, not an instal
2100: 6c 65 64 20 54 63 6c 0a 21 69 66 20 22 24 28 54 led Tcl.!if "$(T
2110: 43 4c 44 49 52 29 22 20 3d 3d 20 22 22 0a 21 69 CLDIR)" == "".!i
2120: 66 20 5b 65 63 68 6f 20 54 43 4c 44 49 52 20 3d f [echo TCLDIR =
2130: 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 \> nmakehlp.out
2140: 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 ] \. || [nmake
2150: 68 6c 70 20 2d 4c 20 67 65 6e 65 72 69 63 5c 74 hlp -L generic\t
2160: 63 6c 2e 68 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 cl.h >> nmakehlp
2170: 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a .out].!error ***
2180: 20 43 6f 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 Could not locat
2190: 65 20 54 63 6c 20 73 6f 75 72 63 65 20 64 69 72 e Tcl source dir
21a0: 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 21 ectory..!endif.!
21b0: 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 include nmakehlp
21c0: 2e 6f 75 74 0a 21 65 6e 64 69 66 20 23 20 54 43 .out.!endif # TC
21d0: 4c 44 49 52 20 3d 3d 20 22 22 0a 0a 5f 54 43 4c LDIR == "".._TCL
21e0: 44 49 52 09 3d 20 24 28 54 43 4c 44 49 52 3a 2f DIR.= $(TCLDIR:/
21f0: 3d 5c 29 0a 5f 54 43 4c 5f 48 20 20 3d 20 24 28 =\)._TCL_H = $(
2200: 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 _TCLDIR)\generic
2210: 5c 74 63 6c 2e 68 0a 21 69 66 20 21 65 78 69 73 \tcl.h.!if !exis
2220: 74 28 22 24 28 5f 54 43 4c 5f 48 29 22 29 0a 21 t("$(_TCL_H)").!
2230: 65 72 72 6f 72 20 43 6f 75 6c 64 20 6e 6f 74 20 error Could not
2240: 6c 6f 63 61 74 65 20 74 63 6c 2e 68 2e 20 50 6c locate tcl.h. Pl
2250: 65 61 73 65 20 73 65 74 20 74 68 65 20 54 43 4c ease set the TCL
2260: 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 6f 69 DIR macro to poi
2270: 6e 74 20 74 6f 20 74 68 65 20 54 63 6c 20 2a 73 nt to the Tcl *s
2280: 6f 75 72 63 65 2a 20 64 69 72 65 63 74 6f 72 79 ource* directory
2290: 2e 0a 21 65 6e 64 69 66 0a 0a 5f 54 4b 5f 48 20 ..!endif.._TK_H
22a0: 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 5c 74 6b 2e = ..\generic\tk.
22b0: 68 0a 0a 23 20 45 4e 44 20 43 61 73 65 20 32 28 h..# END Case 2(
22c0: 62 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 6b b) - Building Tk
22d0: 0a 0a 21 65 6c 73 65 0a 0a 23 20 42 45 47 49 4e ..!else..# BEGIN
22e0: 20 43 61 73 65 20 32 28 63 29 20 6f 72 20 28 64 Case 2(c) or (d
22f0: 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 61 6e 20 ) - Building an
2300: 65 78 74 65 6e 73 69 6f 6e 20 6f 74 68 65 72 20 extension other
2310: 74 68 61 6e 20 54 6b 0a 0a 23 20 49 66 20 63 6f than Tk..# If co
2320: 6d 6d 61 6e 64 20 6c 69 6e 65 20 68 61 73 20 73 mmand line has s
2330: 70 65 63 69 66 69 65 64 20 54 63 6c 20 6c 6f 63 pecified Tcl loc
2340: 61 74 69 6f 6e 20 74 68 72 6f 75 67 68 20 54 43 ation through TC
2350: 4c 44 49 52 2c 20 75 73 65 20 69 74 0a 23 20 65 LDIR, use it.# e
2360: 6c 73 65 20 64 65 66 61 75 6c 74 20 74 6f 20 74 lse default to t
2370: 68 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 73 65 he INSTALLDIR se
2380: 74 74 69 6e 67 0a 21 69 66 20 22 24 28 54 43 4c tting.!if "$(TCL
2390: 44 49 52 29 22 20 21 3d 20 22 22 0a 0a 5f 54 43 DIR)" != "".._TC
23a0: 4c 44 49 52 09 3d 20 24 28 54 43 4c 44 49 52 3a LDIR.= $(TCLDIR:
23b0: 2f 3d 5c 29 0a 21 69 66 20 65 78 69 73 74 28 22 /=\).!if exist("
23c0: 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 $(_TCLDIR)\inclu
23d0: 64 65 5c 74 63 6c 2e 68 22 29 20 23 20 43 61 73 de\tcl.h") # Cas
23e0: 65 20 32 28 63 29 20 77 69 74 68 20 54 43 4c 44 e 2(c) with TCLD
23f0: 49 52 20 64 65 66 69 6e 65 64 0a 54 43 4c 49 4e IR defined.TCLIN
2400: 53 54 41 4c 4c 09 3d 20 31 0a 5f 54 43 4c 5f 48 STALL.= 1._TCL_H
2410: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2420: 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 CLDIR)\include\t
2430: 63 6c 2e 68 0a 21 65 6c 73 65 69 66 20 65 78 69 cl.h.!elseif exi
2440: 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 67 st("$(_TCLDIR)\g
2450: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 22 29 20 23 eneric\tcl.h") #
2460: 20 43 61 73 65 20 32 28 64 29 20 77 69 74 68 20 Case 2(d) with
2470: 54 43 4c 44 49 52 20 64 65 66 69 6e 65 64 0a 54 TCLDIR defined.T
2480: 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 30 0a 5f 54 CLINSTALL.= 0._T
2490: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 CL_H =
24a0: 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 $(_TCLDIR)\gener
24b0: 69 63 5c 74 63 6c 2e 68 0a 21 65 6e 64 69 66 0a ic\tcl.h.!endif.
24c0: 0a 21 65 6c 73 65 20 20 23 20 20 23 20 43 61 73 .!else # # Cas
24d0: 65 20 32 28 63 29 20 66 6f 72 20 65 78 74 65 6e e 2(c) for exten
24e0: 73 69 6f 6e 73 20 77 69 74 68 20 54 43 4c 44 49 sions with TCLDI
24f0: 52 20 75 6e 64 65 66 69 6e 65 64 0a 0a 23 20 4e R undefined..# N
2500: 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 54 63 eed to locate Tc
2510: 6c 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77 l depending on w
2520: 68 65 74 68 65 72 20 69 74 20 6e 65 65 64 73 20 hether it needs
2530: 54 63 6c 20 73 6f 75 72 63 65 20 6f 72 20 6e 6f Tcl source or no
2540: 74 2e 0a 23 20 49 66 20 77 65 20 64 6f 6e 27 74 t..# If we don't
2550: 2c 20 63 68 65 63 6b 20 74 68 65 20 49 4e 53 54 , check the INST
2560: 41 4c 4c 44 49 52 20 66 6f 72 20 61 6e 20 69 6e ALLDIR for an in
2570: 73 74 61 6c 6c 65 64 20 54 63 6c 20 66 69 72 73 stalled Tcl firs
2580: 74 0a 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 t..!if exist("$(
2590: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 _INSTALLDIR)\inc
25a0: 6c 75 64 65 5c 74 63 6c 2e 68 22 29 20 26 26 20 lude\tcl.h") &&
25b0: 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 !$(NEED_TCL_SOUR
25c0: 43 45 29 0a 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 CE)..TCLINSTALL.
25d0: 3d 20 31 0a 54 43 4c 44 49 52 20 20 20 20 20 20 = 1.TCLDIR
25e0: 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c = $(_INSTALL
25f0: 44 49 52 29 5c 2e 2e 0a 23 20 4e 4f 54 45 3a 20 DIR)\...# NOTE:
2600: 77 65 20 77 69 6c 6c 20 62 65 20 72 65 73 65 74 we will be reset
2610: 74 69 6e 67 20 5f 49 4e 53 54 41 4c 4c 44 49 52 ting _INSTALLDIR
2620: 20 74 6f 20 5f 49 4e 53 54 41 4c 4c 44 49 52 2f to _INSTALLDIR/
2630: 6c 69 62 20 66 6f 72 20 65 78 74 65 6e 73 69 6f lib for extensio
2640: 6e 73 0a 23 20 6c 61 74 65 72 20 73 6f 20 74 68 ns.# later so th
2650: 65 20 5c 2e 2e 20 61 63 63 6f 75 6e 74 73 20 66 e \.. accounts f
2660: 6f 72 20 74 68 65 20 2f 6c 69 62 0a 5f 54 43 4c or the /lib._TCL
2670: 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c DIR..= $(_INSTAL
2680: 4c 44 49 52 29 5c 2e 2e 0a 5f 54 43 4c 5f 48 20 LDIR)\..._TCL_H
2690: 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 = $(_TC
26a0: 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 LDIR)\include\tc
26b0: 6c 2e 68 0a 0a 21 65 6c 73 65 20 23 20 65 78 69 l.h..!else # exi
26c0: 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28 4e 45 st(...) && !$(NE
26d0: 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 0a 0a ED_TCL_SOURCE)..
26e0: 21 69 66 20 5b 65 63 68 6f 20 5f 54 43 4c 44 49 !if [echo _TCLDI
26f0: 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e R = \> nmakehlp.
2700: 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d out] \. || [nm
2710: 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e 65 72 69 akehlp -L generi
2720: 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d 61 6b 65 c\tcl.h >> nmake
2730: 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 hlp.out].!error
2740: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 6c 6f *** Could not lo
2750: 63 61 74 65 20 54 63 6c 20 73 6f 75 72 63 65 20 cate Tcl source
2760: 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 directory..!endi
2770: 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 f.!include nmake
2780: 68 6c 70 2e 6f 75 74 0a 54 43 4c 49 4e 53 54 41 hlp.out.TCLINSTA
2790: 4c 4c 20 20 20 20 20 20 3d 20 30 0a 54 43 4c 44 LL = 0.TCLD
27a0: 49 52 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f IR = $(_
27b0: 54 43 4c 44 49 52 29 0a 5f 54 43 4c 5f 48 20 20 TCLDIR)._TCL_H
27c0: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c = $(_TCL
27d0: 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c DIR)\generic\tcl
27e0: 2e 68 0a 0a 21 65 6e 64 69 66 20 23 20 65 78 69 .h..!endif # exi
27f0: 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28 4e 45 st(...) && !$(NE
2800: 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 0a 0a ED_TCL_SOURCE)..
2810: 21 65 6e 64 69 66 20 23 20 54 43 4c 44 49 52 0a !endif # TCLDIR.
2820: 0a 21 69 66 6e 64 65 66 20 5f 54 43 4c 5f 48 0a .!ifndef _TCL_H.
2830: 4d 53 47 20 3d 5e 0a 46 61 69 6c 65 64 20 74 6f MSG =^.Failed to
2840: 20 66 69 6e 64 20 74 63 6c 2e 68 2e 20 54 68 65 find tcl.h. The
2850: 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 69 73 TCLDIR macro is
2860: 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 6c 79 set incorrectly
2870: 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 20 61 or is not set a
2880: 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 68 20 nd default path
2890: 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e does not contain
28a0: 20 74 63 6c 2e 68 2e 0a 21 65 72 72 6f 72 20 24 tcl.h..!error $
28b0: 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a 23 20 (MSG).!endif..#
28c0: 4e 6f 77 20 64 6f 20 74 68 65 20 73 61 6d 65 20 Now do the same
28d0: 74 6f 20 6c 6f 63 61 74 65 20 54 6b 20 68 65 61 to locate Tk hea
28e0: 64 65 72 73 20 61 6e 64 20 6c 69 62 73 20 69 66 ders and libs if
28f0: 20 70 72 6f 6a 65 63 74 20 72 65 71 75 69 72 65 project require
2900: 73 20 54 6b 0a 21 69 66 20 24 28 4e 45 45 44 5f s Tk.!if $(NEED_
2910: 54 4b 29 0a 0a 21 69 66 20 22 24 28 54 4b 44 49 TK)..!if "$(TKDI
2920: 52 29 22 20 21 3d 20 22 22 0a 0a 5f 54 4b 44 49 R)" != "".._TKDI
2930: 52 20 3d 20 24 28 54 4b 44 49 52 3a 2f 3d 5c 29 R = $(TKDIR:/=\)
2940: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 .!if exist("$(_T
2950: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b KDIR)\include\tk
2960: 2e 68 22 29 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 .h").TKINSTALL
2970: 20 20 20 20 3d 20 31 0a 5f 54 4b 5f 48 20 20 20 = 1._TK_H
2980: 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 = $(_TKDI
2990: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 0a R)\include\tk.h.
29a0: 21 65 6c 73 65 69 66 20 65 78 69 73 74 28 22 24 !elseif exist("$
29b0: 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 69 63 (_TKDIR)\generic
29c0: 5c 74 6b 2e 68 22 29 0a 54 4b 49 4e 53 54 41 4c \tk.h").TKINSTAL
29d0: 4c 20 20 20 20 20 20 3d 20 30 0a 5f 54 4b 5f 48 L = 0._TK_H
29e0: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
29f0: 4b 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 6b KDIR)\generic\tk
2a00: 2e 68 0a 21 65 6e 64 69 66 0a 0a 21 65 6c 73 65 .h.!endif..!else
2a10: 20 23 20 54 4b 44 49 52 20 6e 6f 74 20 64 65 66 # TKDIR not def
2a20: 69 6e 65 64 0a 0a 23 20 4e 65 65 64 20 74 6f 20 ined..# Need to
2a30: 6c 6f 63 61 74 65 20 54 63 6c 20 64 65 70 65 6e locate Tcl depen
2a40: 64 69 6e 67 20 6f 6e 20 77 68 65 74 68 65 72 20 ding on whether
2a50: 69 74 20 6e 65 65 64 73 20 54 63 6c 20 73 6f 75 it needs Tcl sou
2a60: 72 63 65 20 6f 72 20 6e 6f 74 2e 0a 23 20 49 66 rce or not..# If
2a70: 20 77 65 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b we don't, check
2a80: 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 the INSTALLDIR
2a90: 66 6f 72 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 for an installed
2aa0: 20 54 63 6c 20 66 69 72 73 74 0a 0a 21 69 66 20 Tcl first..!if
2ab0: 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c exist("$(_INSTAL
2ac0: 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b LDIR)\include\tk
2ad0: 2e 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f .h") && !$(NEED_
2ae0: 54 4b 5f 53 4f 55 52 43 45 29 0a 0a 54 4b 49 4e TK_SOURCE)..TKIN
2af0: 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0a 23 STALL = 1.#
2b00: 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c 20 62 NOTE: we will b
2b10: 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49 4e 53 e resetting _INS
2b20: 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e 53 54 TALLDIR to _INST
2b30: 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 20 65 ALLDIR/lib for e
2b40: 78 74 65 6e 73 69 6f 6e 73 0a 23 20 6c 61 74 65 xtensions.# late
2b50: 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20 61 63 63 r so the \.. acc
2b60: 6f 75 6e 74 73 20 66 6f 72 20 74 68 65 20 2f 6c ounts for the /l
2b70: 69 62 0a 5f 54 4b 44 49 52 20 20 20 20 20 20 20 ib._TKDIR
2b80: 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 = $(_INSTALLDI
2b90: 52 29 5c 2e 2e 0a 5f 54 4b 5f 48 20 20 20 20 20 R)\..._TK_H
2ba0: 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 = $(_TKDIR)
2bb0: 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 0a 54 4b \include\tk.h.TK
2bc0: 44 49 52 20 20 20 20 20 20 20 20 20 20 3d 20 24 DIR = $
2bd0: 28 5f 54 4b 44 49 52 29 0a 0a 21 65 6c 73 65 20 (_TKDIR)..!else
2be0: 23 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 # exist("$(_INST
2bf0: 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c ALLDIR)\include\
2c00: 74 6b 2e 68 22 29 20 26 26 20 21 24 28 4e 45 45 tk.h") && !$(NEE
2c10: 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 0a 21 69 D_TK_SOURCE)..!i
2c20: 66 20 5b 65 63 68 6f 20 5f 54 4b 44 49 52 20 3d f [echo _TKDIR =
2c30: 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 \> nmakehlp.out
2c40: 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 ] \. || [nmake
2c50: 68 6c 70 20 2d 4c 20 67 65 6e 65 72 69 63 5c 74 hlp -L generic\t
2c60: 6b 2e 68 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e k.h >> nmakehlp.
2c70: 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 out].!error ***
2c80: 43 6f 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 65 Could not locate
2c90: 20 54 6b 20 73 6f 75 72 63 65 20 64 69 72 65 63 Tk source direc
2ca0: 74 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 21 69 6e tory..!endif.!in
2cb0: 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f clude nmakehlp.o
2cc0: 75 74 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 ut.TKINSTALL
2cd0: 20 20 3d 20 30 0a 54 4b 44 49 52 20 20 20 20 20 = 0.TKDIR
2ce0: 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 = $(_TKDIR)
2cf0: 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 20 ._TK_H
2d00: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 = $(_TKDIR)\gene
2d10: 72 69 63 5c 74 6b 2e 68 0a 0a 21 65 6e 64 69 66 ric\tk.h..!endif
2d20: 20 23 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 # exist("$(_INS
2d30: 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 TALLDIR)\include
2d40: 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 28 4e 45 \tk.h") && !$(NE
2d50: 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 0a 21 ED_TK_SOURCE)..!
2d60: 65 6e 64 69 66 20 23 20 54 4b 44 49 52 0a 0a 21 endif # TKDIR..!
2d70: 69 66 6e 64 65 66 20 5f 54 4b 5f 48 0a 4d 53 47 ifndef _TK_H.MSG
2d80: 20 3d 5e 0a 46 61 69 6c 65 64 20 74 6f 20 66 69 =^.Failed to fi
2d90: 6e 64 20 74 6b 2e 68 2e 20 54 68 65 20 54 4b 44 nd tk.h. The TKD
2da0: 49 52 20 6d 61 63 72 6f 20 69 73 20 73 65 74 20 IR macro is set
2db0: 69 6e 63 6f 72 72 65 63 74 6c 79 20 6f 72 20 69 incorrectly or i
2dc0: 73 20 6e 6f 74 20 73 65 74 20 61 6e 64 20 64 65 s not set and de
2dd0: 66 61 75 6c 74 20 70 61 74 68 20 64 6f 65 73 20 fault path does
2de0: 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 74 6b 2e 68 not contain tk.h
2df0: 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0a ..!error $(MSG).
2e00: 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 !endif..!endif #
2e10: 20 4e 45 45 44 5f 54 4b 0a 0a 21 69 66 20 24 28 NEED_TK..!if $(
2e20: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 NEED_TCL_SOURCE)
2e30: 20 26 26 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c && $(TCLINSTALL
2e40: 29 0a 4d 53 47 20 3d 20 5e 0a 2a 2a 2a 20 57 61 ).MSG = ^.*** Wa
2e50: 72 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 65 rning: This exte
2e60: 6e 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 nsion requires t
2e70: 68 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 69 he source distri
2e80: 62 75 74 69 6f 6e 20 6f 66 20 54 63 6c 2e 5e 0a bution of Tcl.^.
2e90: 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 74 20 74 *** Please set t
2ea0: 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 he TCLDIR macro
2eb0: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 to point to the
2ec0: 54 63 6c 20 73 6f 75 72 63 65 73 2e 0a 21 65 72 Tcl sources..!er
2ed0: 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 ror $(MSG).!endi
2ee0: 66 0a 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b f..!if $(NEED_TK
2ef0: 5f 53 4f 55 52 43 45 29 0a 21 69 66 20 24 28 54 _SOURCE).!if $(T
2f00: 4b 49 4e 53 54 41 4c 4c 29 0a 4d 53 47 20 3d 20 KINSTALL).MSG =
2f10: 5e 0a 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 54 ^.*** Warning: T
2f20: 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 72 65 his extension re
2f30: 71 75 69 72 65 73 20 74 68 65 20 73 6f 75 72 63 quires the sourc
2f40: 65 20 64 69 73 74 72 69 62 75 74 69 6f 6e 20 6f e distribution o
2f50: 66 20 54 6b 2e 5e 0a 2a 2a 2a 20 50 6c 65 61 73 f Tk.^.*** Pleas
2f60: 65 20 73 65 74 20 74 68 65 20 54 4b 44 49 52 20 e set the TKDIR
2f70: 6d 61 63 72 6f 20 74 6f 20 70 6f 69 6e 74 20 74 macro to point t
2f80: 6f 20 74 68 65 20 54 6b 20 73 6f 75 72 63 65 73 o the Tk sources
2f90: 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0a ..!error $(MSG).
2fa0: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 0a !endif.!endif...
2fb0: 23 20 49 66 20 49 4e 53 54 41 4c 4c 44 49 52 20 # If INSTALLDIR
2fc0: 73 65 74 20 74 6f 20 54 63 6c 20 69 6e 73 74 61 set to Tcl insta
2fd0: 6c 6c 61 74 69 6f 6e 20 72 6f 6f 74 20 64 69 72 llation root dir
2fe0: 20 74 68 65 6e 20 72 65 73 65 74 20 74 6f 20 74 then reset to t
2ff0: 68 65 0a 23 20 6c 69 62 20 64 69 72 20 66 6f 72 he.# lib dir for
3000: 20 69 6e 73 74 61 6c 6c 69 6e 67 20 65 78 74 65 installing exte
3010: 6e 73 69 6f 6e 73 0a 21 69 66 20 65 78 69 73 74 nsions.!if exist
3020: 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 ("$(_INSTALLDIR)
3030: 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 \include\tcl.h")
3040: 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 3d 24 28 5f ._INSTALLDIR=$(_
3050: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 0a INSTALLDIR)\lib.
3060: 21 65 6e 64 69 66 0a 0a 23 20 45 4e 44 20 43 61 !endif..# END Ca
3070: 73 65 20 32 28 63 29 20 6f 72 20 28 64 29 20 2d se 2(c) or (d) -
3080: 20 42 75 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 Building an ext
3090: 65 6e 73 69 6f 6e 0a 21 65 6e 64 69 66 20 23 20 ension.!endif #
30a0: 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a if $(DOING_TCL).
30b0: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
30c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
30f0: 23 0a 23 20 33 2e 20 44 65 74 65 72 6d 69 6e 65 #.# 3. Determine
3100: 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f compiler versio
3110: 6e 20 61 6e 64 20 61 72 63 68 69 74 65 63 74 75 n and architectu
3120: 72 65 0a 23 20 49 6e 20 74 68 69 73 20 73 65 63 re.# In this sec
3130: 74 69 6f 6e 2c 20 77 65 20 66 69 67 75 72 65 20 tion, we figure
3140: 6f 75 74 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 out the compiler
3150: 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 74 68 65 version and the
3160: 0a 23 20 61 72 63 68 69 74 65 63 74 75 72 65 20 .# architecture
3170: 66 6f 72 20 77 68 69 63 68 20 77 65 20 61 72 65 for which we are
3180: 20 62 75 69 6c 64 69 6e 67 2e 20 54 68 69 73 20 building. This
3190: 73 65 74 73 20 74 68 65 0a 23 20 66 6f 6c 6c 6f sets the.# follo
31a0: 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a 23 20 56 wing macros:.# V
31b0: 43 56 45 52 53 49 4f 4e 20 2d 20 74 68 65 20 69 CVERSION - the i
31c0: 6e 74 65 72 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 nternal compiler
31d0: 20 76 65 72 73 69 6f 6e 20 61 73 20 31 32 30 30 version as 1200
31e0: 2c 20 31 34 30 30 2c 20 31 39 31 30 20 65 74 63 , 1400, 1910 etc
31f0: 2e 0a 23 20 20 20 20 20 54 68 69 73 20 69 73 20 ..# This is
3200: 61 6c 73 6f 20 70 72 69 6e 74 65 64 20 62 79 20 also printed by
3210: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 the compiler in
3220: 64 6f 74 74 65 64 20 66 6f 72 6d 20 31 39 2e 31 dotted form 19.1
3230: 30 20 65 74 63 2e 0a 23 20 56 43 56 45 52 20 2d 0 etc..# VCVER -
3240: 20 74 68 65 20 22 6d 61 72 6b 65 74 69 6e 67 20 the "marketing
3250: 76 65 72 73 69 6f 6e 22 2c 20 66 6f 72 20 65 78 version", for ex
3260: 61 6d 70 6c 65 20 56 69 73 75 61 6c 20 43 2b 2b ample Visual C++
3270: 20 36 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 0a 6 for internal.
3280: 23 20 20 20 20 20 63 6f 6d 70 69 6c 65 72 20 76 # compiler v
3290: 65 72 73 69 6f 6e 20 31 32 30 30 2e 20 54 68 69 ersion 1200. Thi
32a0: 73 20 69 73 20 6b 65 70 74 20 6f 6e 6c 79 20 66 s is kept only f
32b0: 6f 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e or legacy reason
32c0: 73 20 61 73 20 69 74 0a 23 20 20 20 20 20 64 6f s as it.# do
32d0: 65 73 20 6e 6f 74 20 6d 61 6b 65 20 73 65 6e 73 es not make sens
32e0: 65 20 66 6f 72 20 72 65 63 65 6e 74 20 4d 69 63 e for recent Mic
32f0: 72 6f 73 6f 66 74 20 63 6f 6d 70 69 6c 65 72 73 rosoft compilers
3300: 2e 20 4f 6e 6c 79 20 75 73 65 64 20 66 6f 72 0a . Only used for.
3310: 23 20 20 20 20 20 6f 75 74 70 75 74 20 64 69 72 # output dir
3320: 65 63 74 6f 72 79 20 6e 61 6d 65 73 2e 0a 23 20 ectory names..#
3330: 41 52 43 48 20 2d 20 73 65 74 20 74 6f 20 49 58 ARCH - set to IX
3340: 38 36 2c 20 41 52 4d 36 34 20 6f 72 20 41 4d 44 86, ARM64 or AMD
3350: 36 34 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 64 depending on
3360: 33 32 2d 20 6f 72 20 36 34 2d 62 69 74 20 74 61 32- or 64-bit ta
3370: 72 67 65 74 0a 23 20 4e 41 54 49 56 45 5f 41 52 rget.# NATIVE_AR
3380: 43 48 20 2d 20 73 65 74 20 74 6f 20 49 58 38 36 CH - set to IX86
3390: 2c 20 41 52 4d 36 34 20 6f 72 20 41 4d 44 36 34 , ARM64 or AMD64
33a0: 20 66 6f 72 20 74 68 65 20 68 6f 73 74 20 6d 61 for the host ma
33b0: 63 68 69 6e 65 0a 23 20 4d 41 43 48 49 4e 45 20 chine.# MACHINE
33c0: 2d 20 73 61 6d 65 20 61 73 20 24 28 41 52 43 48 - same as $(ARCH
33d0: 29 20 2d 20 6c 65 67 61 63 79 0a 23 20 5f 56 43 ) - legacy.# _VC
33e0: 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 5f _MANIFEST_EMBED_
33f0: 7b 44 4c 4c 2c 45 58 45 7d 20 2d 20 63 6f 6d 6d {DLL,EXE} - comm
3400: 61 6e 64 73 20 66 6f 72 20 65 6d 62 65 64 64 69 ands for embeddi
3410: 6e 67 20 61 20 6d 61 6e 69 66 65 73 74 20 69 66 ng a manifest if
3420: 20 6e 65 65 64 65 64 0a 0a 63 63 33 32 09 09 3d needed..cc32..=
3430: 20 24 28 43 43 29 20 20 20 23 20 62 75 69 6c 74 $(CC) # built
3440: 2d 69 6e 20 64 65 66 61 75 6c 74 2e 0a 6c 69 6e -in default..lin
3450: 6b 33 32 09 09 3d 20 6c 69 6e 6b 0a 6c 69 62 33 k32..= link.lib3
3460: 32 09 09 3d 20 6c 69 62 0a 72 63 33 32 09 09 3d 2..= lib.rc32..=
3470: 20 24 28 52 43 29 20 20 20 23 20 62 75 69 6c 74 $(RC) # built
3480: 2d 69 6e 20 64 65 66 61 75 6c 74 2e 0a 0a 23 2d -in default...#-
3490: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
34a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
34b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
34c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a ---------------.
34d0: 23 20 46 69 67 75 72 65 20 6f 75 74 20 74 68 65 # Figure out the
34e0: 20 63 6f 6d 70 69 6c 65 72 20 61 72 63 68 69 74 compiler archit
34f0: 65 63 74 75 72 65 20 61 6e 64 20 76 65 72 73 69 ecture and versi
3500: 6f 6e 20 62 79 20 77 72 69 74 69 6e 67 0a 23 20 on by writing.#
3510: 74 68 65 20 43 20 6d 61 63 72 6f 73 20 74 6f 20 the C macros to
3520: 61 20 66 69 6c 65 2c 20 70 72 65 70 72 6f 63 65 a file, preproce
3530: 73 73 69 6e 67 20 74 68 65 6d 20 77 69 74 68 20 ssing them with
3540: 74 68 65 20 43 0a 23 20 70 72 65 70 72 6f 63 65 the C.# preproce
3550: 73 73 6f 72 20 61 6e 64 20 72 65 61 64 69 6e 67 ssor and reading
3560: 20 62 61 63 6b 20 74 68 65 20 63 72 65 61 74 65 back the create
3570: 64 20 66 69 6c 65 0a 0a 5f 48 41 53 48 3d 5e 23 d file.._HASH=^#
3580: 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d ._VC_MANIFEST_EM
3590: 42 45 44 5f 45 58 45 3d 0a 5f 56 43 5f 4d 41 4e BED_EXE=._VC_MAN
35a0: 49 46 45 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d IFEST_EMBED_DLL=
35b0: 0a 56 43 56 45 52 3d 30 0a 21 69 66 20 21 5b 65 .VCVER=0.!if ![e
35c0: 63 68 6f 20 56 43 56 45 52 53 49 4f 4e 3d 5f 4d cho VCVERSION=_M
35d0: 53 43 5f 56 45 52 20 3e 20 76 65 72 63 6c 2e 78 SC_VER > vercl.x
35e0: 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 ] \. && ![ech
35f0: 6f 20 24 28 5f 48 41 53 48 29 69 66 20 64 65 66 o $(_HASH)if def
3600: 69 6e 65 64 28 5f 4d 5f 49 58 38 36 29 20 3e 3e ined(_M_IX86) >>
3610: 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 vercl.x] \.
3620: 26 26 20 21 5b 65 63 68 6f 20 41 52 43 48 3d 49 && ![echo ARCH=I
3630: 58 38 36 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 X86 >> vercl.x]
3640: 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 \. && ![echo
3650: 24 28 5f 48 41 53 48 29 65 6c 69 66 20 64 65 66 $(_HASH)elif def
3660: 69 6e 65 64 28 5f 4d 5f 41 4d 44 36 34 29 20 3e ined(_M_AMD64) >
3670: 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 > vercl.x] \.
3680: 20 26 26 20 21 5b 65 63 68 6f 20 41 52 43 48 3d && ![echo ARCH=
3690: 41 4d 44 36 34 20 3e 3e 20 76 65 72 63 6c 2e 78 AMD64 >> vercl.x
36a0: 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 ] \. && ![ech
36b0: 6f 20 24 28 5f 48 41 53 48 29 65 6c 69 66 20 64 o $(_HASH)elif d
36c0: 65 66 69 6e 65 64 28 5f 4d 5f 41 52 4d 36 34 29 efined(_M_ARM64)
36d0: 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 >> vercl.x] \.
36e0: 20 20 20 26 26 20 21 5b 65 63 68 6f 20 41 52 43 && ![echo ARC
36f0: 48 3d 41 52 4d 36 34 20 3e 3e 20 76 65 72 63 6c H=ARM64 >> vercl
3700: 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 .x] \. && ![e
3710: 63 68 6f 20 24 28 5f 48 41 53 48 29 65 6e 64 69 cho $(_HASH)endi
3720: 66 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a f >> vercl.x] \.
3730: 20 20 20 20 26 26 20 21 5b 24 28 63 63 33 32 29 && ![$(cc32)
3740: 20 2d 6e 6f 6c 6f 67 6f 20 2d 54 43 20 2d 50 20 -nologo -TC -P
3750: 76 65 72 63 6c 2e 78 20 32 3e 4e 55 4c 5d 0a 21 vercl.x 2>NUL].!
3760: 69 6e 63 6c 75 64 65 20 76 65 72 63 6c 2e 69 0a include vercl.i.
3770: 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 !if $(VCVERSION)
3780: 20 3c 20 31 39 30 30 0a 21 69 66 20 21 5b 65 63 < 1900.!if ![ec
3790: 68 6f 20 56 43 56 45 52 3d 20 5e 5c 3e 20 76 65 ho VCVER= ^\> ve
37a0: 72 63 6c 2e 76 63 5d 20 5c 0a 20 20 20 20 26 26 rcl.vc] \. &&
37b0: 20 21 5b 73 65 74 20 2f 61 20 24 28 56 43 56 45 ![set /a $(VCVE
37c0: 52 53 49 4f 4e 29 20 2f 20 31 30 30 20 2d 20 36 RSION) / 100 - 6
37d0: 20 3e 3e 20 76 65 72 63 6c 2e 76 63 5d 0a 21 69 >> vercl.vc].!i
37e0: 6e 63 6c 75 64 65 20 76 65 72 63 6c 2e 76 63 0a nclude vercl.vc.
37f0: 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 23 20 54 !endif.!else.# T
3800: 68 65 20 73 69 6d 70 6c 65 20 63 61 6c 63 75 6c he simple calcul
3810: 61 74 69 6f 6e 20 61 62 6f 76 65 20 64 6f 65 73 ation above does
3820: 20 6e 6f 74 20 61 70 70 6c 79 20 74 6f 20 6e 65 not apply to ne
3830: 77 20 56 69 73 75 61 6c 20 53 74 75 64 69 6f 20 w Visual Studio
3840: 72 65 6c 65 61 73 65 73 0a 23 20 4b 65 65 70 20 releases.# Keep
3850: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 the compiler ver
3860: 73 69 6f 6e 20 69 6e 20 69 74 73 20 6e 61 74 69 sion in its nati
3870: 76 65 20 66 6f 72 6d 2e 0a 56 43 56 45 52 20 3d ve form..VCVER =
3880: 20 24 28 56 43 56 45 52 53 49 4f 4e 29 0a 21 65 $(VCVERSION).!e
3890: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 21 69 66 ndif.!endif..!if
38a0: 20 21 5b 64 65 6c 20 32 3e 4e 55 4c 20 2f 71 2f ![del 2>NUL /q/
38b0: 66 20 76 65 72 63 6c 2e 78 20 76 65 72 63 6c 2e f vercl.x vercl.
38c0: 69 20 76 65 72 63 6c 2e 76 63 5d 0a 21 65 6e 64 i vercl.vc].!end
38d0: 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d if..#-----------
38e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
38f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3900: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3910: 2d 2d 2d 2d 2d 0a 23 20 54 68 65 20 4d 41 43 48 -----.# The MACH
3920: 49 4e 45 20 6d 61 63 72 6f 20 69 73 20 75 73 65 INE macro is use
3930: 64 20 62 79 20 6c 65 67 61 63 79 20 6d 61 6b 65 d by legacy make
3940: 66 69 6c 65 73 20 73 6f 20 73 65 74 20 69 74 20 files so set it
3950: 61 73 20 77 65 6c 6c 0a 21 69 66 64 65 66 20 4d as well.!ifdef M
3960: 41 43 48 49 4e 45 0a 21 69 66 20 22 24 28 4d 41 ACHINE.!if "$(MA
3970: 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 38 36 22 CHINE)" == "x86"
3980: 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4e 45 0a .!undef MACHINE.
3990: 4d 41 43 48 49 4e 45 20 3d 20 49 58 38 36 0a 21 MACHINE = IX86.!
39a0: 65 6c 73 65 69 66 20 22 24 28 4d 41 43 48 49 4e elseif "$(MACHIN
39b0: 45 29 22 20 3d 3d 20 22 61 72 6d 36 34 22 0a 21 E)" == "arm64".!
39c0: 75 6e 64 65 66 20 4d 41 43 48 49 4e 45 0a 4d 41 undef MACHINE.MA
39d0: 43 48 49 4e 45 20 3d 20 41 52 4d 36 34 0a 21 65 CHINE = ARM64.!e
39e0: 6c 73 65 69 66 20 22 24 28 4d 41 43 48 49 4e 45 lseif "$(MACHINE
39f0: 29 22 20 3d 3d 20 22 78 36 34 22 0a 21 75 6e 64 )" == "x64".!und
3a00: 65 66 20 4d 41 43 48 49 4e 45 0a 4d 41 43 48 49 ef MACHINE.MACHI
3a10: 4e 45 20 3d 20 41 4d 44 36 34 0a 21 65 6e 64 69 NE = AMD64.!endi
3a20: 66 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 f.!if "$(MACHINE
3a30: 29 22 20 21 3d 20 22 24 28 41 52 43 48 29 22 0a )" != "$(ARCH)".
3a40: 21 65 72 72 6f 72 20 53 70 65 63 69 66 69 65 64 !error Specified
3a50: 20 4d 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 24 MACHINE macro $
3a60: 28 4d 41 43 48 49 4e 45 29 20 64 6f 65 73 20 6e (MACHINE) does n
3a70: 6f 74 20 6d 61 74 63 68 20 64 65 74 65 63 74 65 ot match detecte
3a80: 64 20 74 61 72 67 65 74 20 61 72 63 68 69 74 65 d target archite
3a90: 63 74 75 72 65 20 24 28 41 52 43 48 29 2e 0a 21 cture $(ARCH)..!
3aa0: 65 6e 64 69 66 0a 21 65 6c 73 65 0a 4d 41 43 48 endif.!else.MACH
3ab0: 49 4e 45 3d 24 28 41 52 43 48 29 0a 21 65 6e 64 INE=$(ARCH).!end
3ac0: 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d if..#-----------
3ad0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3ae0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3af0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3b00: 2d 2d 2d 2d 0a 23 20 54 68 65 20 50 4c 41 54 46 ----.# The PLATF
3b10: 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 6d 61 63 ORM_IDENTIFY mac
3b20: 72 6f 20 6d 61 74 63 68 65 73 20 74 68 65 20 76 ro matches the v
3b30: 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64 20 62 alues returned b
3b40: 79 0a 23 20 74 68 65 20 54 63 6c 20 70 6c 61 74 y.# the Tcl plat
3b50: 66 6f 72 6d 3a 3a 69 64 65 6e 74 69 66 79 20 63 form::identify c
3b60: 6f 6d 6d 61 6e 64 0a 21 69 66 20 22 24 28 4d 41 ommand.!if "$(MA
3b70: 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 CHINE)" == "AMD6
3b80: 34 22 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 4".PLATFORM_IDEN
3b90: 54 49 46 59 20 3d 20 77 69 6e 33 32 2d 78 38 36 TIFY = win32-x86
3ba0: 5f 36 34 0a 21 65 6c 73 65 69 66 20 22 24 28 4d _64.!elseif "$(M
3bb0: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d ACHINE)" == "ARM
3bc0: 36 34 22 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45 64".PLATFORM_IDE
3bd0: 4e 54 49 46 59 20 3d 20 77 69 6e 33 32 2d 61 72 NTIFY = win32-ar
3be0: 6d 0a 21 65 6c 73 65 0a 50 4c 41 54 46 4f 52 4d m.!else.PLATFORM
3bf0: 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 6e 33 _IDENTIFY = win3
3c00: 32 2d 69 78 38 36 0a 21 65 6e 64 69 66 0a 0a 23 2-ix86.!endif..#
3c10: 20 54 68 65 20 4d 55 4c 54 49 50 4c 41 54 46 4f The MULTIPLATFO
3c20: 52 4d 20 6d 61 63 72 6f 20 63 6f 6e 74 72 6f 6c RM macro control
3c30: 73 20 77 68 65 74 68 65 72 20 62 69 6e 61 72 79 s whether binary
3c40: 20 65 78 74 65 6e 73 69 6f 6e 73 20 61 72 65 20 extensions are
3c50: 69 6e 73 74 61 6c 6c 65 64 0a 23 20 69 6e 20 70 installed.# in p
3c60: 6c 61 74 66 6f 72 6d 2d 73 70 65 63 69 66 69 63 latform-specific
3c70: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 20 49 6e directories. In
3c80: 74 65 6e 64 65 64 20 74 6f 20 62 65 20 73 65 74 tended to be set
3c90: 2f 75 73 65 64 20 62 79 20 65 78 74 65 6e 73 69 /used by extensi
3ca0: 6f 6e 73 2e 0a 21 69 66 6e 64 65 66 20 4d 55 4c ons..!ifndef MUL
3cb0: 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 TIPLATFORM_INSTA
3cc0: 4c 4c 0a 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d LL.MULTIPLATFORM
3cd0: 5f 49 4e 53 54 41 4c 4c 20 3d 20 30 0a 21 65 6e _INSTALL = 0.!en
3ce0: 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d dif..#----------
3cf0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d20: 2d 2d 0a 23 20 46 69 67 75 72 65 20 6f 75 74 20 --.# Figure out
3d30: 74 68 65 20 2a 68 6f 73 74 2a 20 61 72 63 68 69 the *host* archi
3d40: 74 65 63 74 75 72 65 20 62 79 20 72 65 61 64 69 tecture by readi
3d50: 6e 67 20 74 68 65 20 72 65 67 69 73 74 72 79 0a ng the registry.
3d60: 0a 21 69 66 20 21 5b 72 65 67 20 71 75 65 72 79 .!if ![reg query
3d70: 20 48 4b 4c 4d 5c 48 61 72 64 77 61 72 65 5c 44 HKLM\Hardware\D
3d80: 65 73 63 72 69 70 74 69 6f 6e 5c 53 79 73 74 65 escription\Syste
3d90: 6d 5c 43 65 6e 74 72 61 6c 50 72 6f 63 65 73 73 m\CentralProcess
3da0: 6f 72 5c 30 20 2f 76 20 49 64 65 6e 74 69 66 69 or\0 /v Identifi
3db0: 65 72 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 er | findstr /i
3dc0: 78 38 36 5d 0a 4e 41 54 49 56 45 5f 41 52 43 48 x86].NATIVE_ARCH
3dd0: 3d 49 58 38 36 0a 21 65 6c 73 65 69 66 20 21 5b =IX86.!elseif ![
3de0: 72 65 67 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 reg query HKLM\H
3df0: 61 72 64 77 61 72 65 5c 44 65 73 63 72 69 70 74 ardware\Descript
3e00: 69 6f 6e 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 ion\System\Centr
3e10: 61 6c 50 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 alProcessor\0 /v
3e20: 20 49 64 65 6e 74 69 66 69 65 72 20 7c 20 66 69 Identifier | fi
3e30: 6e 64 73 74 72 20 2f 69 20 41 52 4d 20 7c 20 66 ndstr /i ARM | f
3e40: 69 6e 64 73 74 72 20 2f 69 20 36 34 2d 62 69 74 indstr /i 64-bit
3e50: 5d 0a 4e 41 54 49 56 45 5f 41 52 43 48 3d 41 52 ].NATIVE_ARCH=AR
3e60: 4d 36 34 0a 21 65 6c 73 65 0a 4e 41 54 49 56 45 M64.!else.NATIVE
3e70: 5f 41 52 43 48 3d 41 4d 44 36 34 0a 21 65 6e 64 _ARCH=AMD64.!end
3e80: 69 66 0a 0a 23 20 53 69 6e 63 65 20 4d 53 56 43 if..# Since MSVC
3e90: 38 20 77 65 20 6d 75 73 74 20 64 65 61 6c 20 77 8 we must deal w
3ea0: 69 74 68 20 6d 61 6e 69 66 65 73 74 20 72 65 73 ith manifest res
3eb0: 6f 75 72 63 65 73 2e 0a 21 69 66 20 24 28 56 43 ources..!if $(VC
3ec0: 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 34 30 30 VERSION) >= 1400
3ed0: 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d ._VC_MANIFEST_EM
3ee0: 42 45 44 5f 45 58 45 3d 69 66 20 65 78 69 73 74 BED_EXE=if exist
3ef0: 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 6d 74 20 $@.manifest mt
3f00: 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66 65 73 -nologo -manifes
3f10: 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 2d 6f t $@.manifest -o
3f20: 75 74 70 75 74 72 65 73 6f 75 72 63 65 3a 24 40 utputresource:$@
3f30: 3b 31 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f ;1._VC_MANIFEST_
3f40: 45 4d 42 45 44 5f 44 4c 4c 3d 69 66 20 65 78 69 EMBED_DLL=if exi
3f50: 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 6d st $@.manifest m
3f60: 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66 t -nologo -manif
3f70: 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 74 20 est $@.manifest
3f80: 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 63 65 3a -outputresource:
3f90: 24 40 3b 32 0a 21 65 6e 64 69 66 0a 0a 23 23 23 $@;2.!endif..###
3fa0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3fb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3fc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3fd0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 #############.#
3fe0: 34 2e 20 42 75 69 6c 64 20 74 68 65 20 6e 6d 61 4. Build the nma
3ff0: 6b 65 68 6c 70 20 70 72 6f 67 72 61 6d 0a 23 20 kehlp program.#
4000: 54 68 69 73 20 69 73 20 61 20 68 65 6c 70 65 72 This is a helper
4010: 20 61 70 70 20 77 65 20 6e 65 65 64 20 74 6f 20 app we need to
4020: 6f 76 65 72 63 6f 6d 65 20 6e 6d 61 6b 65 27 73 overcome nmake's
4030: 20 6c 69 6d 69 74 69 6e 67 0a 23 20 65 6e 76 69 limiting.# envi
4040: 72 6f 6e 6d 65 6e 74 2e 20 57 65 20 77 69 6c 6c ronment. We will
4050: 20 63 61 6c 6c 20 6f 75 74 20 74 6f 20 69 74 20 call out to it
4060: 74 6f 20 67 65 74 20 76 61 72 69 6f 75 73 20 62 to get various b
4070: 69 74 73 20 6f 66 0a 23 20 69 6e 66 6f 72 6d 61 its of.# informa
4080: 74 69 6f 6e 20 61 62 6f 75 74 20 73 75 70 70 6f tion about suppo
4090: 72 74 65 64 20 63 6f 6d 70 69 6c 65 72 20 6f 70 rted compiler op
40a0: 74 69 6f 6e 73 20 65 74 63 2e 0a 23 0a 23 20 54 tions etc..#.# T
40b0: 63 6c 20 69 74 73 65 6c 66 20 77 69 6c 6c 20 61 cl itself will a
40c0: 6c 77 61 79 73 20 75 73 65 20 74 68 65 20 6e 6d lways use the nm
40d0: 61 6b 65 68 6c 70 2e 63 20 70 72 6f 67 72 61 6d akehlp.c program
40e0: 20 77 68 69 63 68 20 69 73 0a 23 20 69 6e 20 69 which is.# in i
40f0: 74 73 20 6f 77 6e 20 73 6f 75 72 63 65 2e 20 49 ts own source. I
4100: 74 20 77 69 6c 6c 20 62 65 20 6b 65 70 74 20 75 t will be kept u
4110: 70 64 61 74 65 64 20 74 68 65 72 65 2e 0a 23 0a pdated there..#.
4120: 23 20 45 78 74 65 6e 73 69 6f 6e 73 20 62 75 69 # Extensions bui
4130: 6c 74 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e lt against an in
4140: 73 74 61 6c 6c 65 64 20 54 63 6c 20 77 69 6c 6c stalled Tcl will
4150: 20 75 73 65 20 74 68 65 20 69 6e 73 74 61 6c 6c use the install
4160: 65 64 0a 23 20 63 6f 70 79 20 6f 66 20 54 63 6c ed.# copy of Tcl
4170: 27 73 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 69 66 's nmakehlp.c if
4180: 20 74 68 65 72 65 20 69 73 20 6f 6e 65 20 61 6e there is one an
4190: 64 20 74 68 65 69 72 20 6f 77 6e 20 76 65 72 73 d their own vers
41a0: 69 6f 6e 0a 23 20 6f 74 68 65 72 77 69 73 65 2e ion.# otherwise.
41b0: 20 49 6e 20 74 68 65 20 6c 61 74 74 65 72 20 63 In the latter c
41c0: 61 73 65 2c 20 74 68 65 79 20 77 6f 75 6c 64 20 ase, they would
41d0: 61 6c 73 6f 20 62 65 20 75 73 69 6e 67 20 74 68 also be using th
41e0: 65 69 72 20 6f 77 6e 0a 23 20 72 75 6c 65 73 2e eir own.# rules.
41f0: 76 63 2e 20 4e 6f 74 65 20 74 68 61 74 20 6f 6c vc. Note that ol
4200: 64 65 72 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 der versions of
4210: 54 63 6c 20 64 6f 20 6e 6f 74 20 69 6e 73 74 61 Tcl do not insta
4220: 6c 6c 20 6e 6d 61 6b 65 68 6c 70 2e 63 0a 23 20 ll nmakehlp.c.#
4230: 6f 72 20 72 75 6c 65 73 2e 76 63 2e 0a 23 0a 23 or rules.vc..#.#
4240: 20 45 78 74 65 6e 73 69 6f 6e 73 20 62 75 69 6c Extensions buil
4250: 74 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f t against Tcl so
4260: 75 72 63 65 73 20 77 69 6c 6c 20 75 73 65 20 74 urces will use t
4270: 68 65 20 6f 6e 65 20 66 72 6f 6d 20 74 68 65 20 he one from the
4280: 54 63 6c 20 73 6f 75 72 63 65 2e 0a 23 0a 23 20 Tcl source..#.#
4290: 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 61 6e When building an
42a0: 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 69 6e 67 extension using
42b0: 20 61 20 73 75 66 66 69 63 69 65 6e 74 6c 79 20 a sufficiently
42c0: 6e 65 77 20 76 65 72 73 69 6f 6e 20 6f 66 20 54 new version of T
42d0: 63 6c 2c 0a 23 20 72 75 6c 65 73 2d 65 78 74 2e cl,.# rules-ext.
42e0: 76 63 20 77 69 6c 6c 20 64 65 66 69 6e 65 20 4e vc will define N
42f0: 4d 41 4b 45 48 4c 50 43 20 61 70 70 72 6f 70 72 MAKEHLPC appropr
4300: 69 61 74 65 6c 79 20 74 6f 20 70 6f 69 6e 74 20 iately to point
4310: 74 6f 20 74 68 65 0a 23 20 63 6f 70 79 20 6f 66 to the.# copy of
4320: 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 74 6f 20 62 nmakehlp.c to b
4330: 65 20 75 73 65 64 2e 0a 0a 21 69 66 6e 64 65 66 e used...!ifndef
4340: 20 4e 4d 41 4b 45 48 4c 50 43 0a 23 20 44 65 66 NMAKEHLPC.# Def
4350: 61 75 6c 74 20 74 6f 20 74 68 65 20 6f 6e 65 20 ault to the one
4360: 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 in the current d
4370: 69 72 65 63 74 6f 72 79 20 28 74 68 65 20 65 78 irectory (the ex
4380: 74 65 6e 73 69 6f 6e 27 73 20 6f 77 6e 20 6e 6d tension's own nm
4390: 61 6b 65 68 6c 70 2e 63 29 0a 4e 4d 41 4b 45 48 akehlp.c).NMAKEH
43a0: 4c 50 43 20 3d 20 6e 6d 61 6b 65 68 6c 70 2e 63 LPC = nmakehlp.c
43b0: 0a 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 ..!if !$(DOING_T
43c0: 43 4c 29 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 CL).!if $(TCLINS
43d0: 54 41 4c 4c 29 0a 21 69 66 20 65 78 69 73 74 28 TALL).!if exist(
43e0: 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c "$(_TCLDIR)\lib\
43f0: 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 nmake\nmakehlp.c
4400: 22 29 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 24 ").NMAKEHLPC = $
4410: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d (_TCLDIR)\lib\nm
4420: 61 6b 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0a 21 ake\nmakehlp.c.!
4430: 65 6e 64 69 66 0a 21 65 6c 73 65 20 23 20 21 24 endif.!else # !$
4440: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 69 66 (TCLINSTALL).!if
4450: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 exist("$(_TCLDI
4460: 52 29 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e R)\win\nmakehlp.
4470: 63 22 29 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 c").NMAKEHLPC =
4480: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e $(_TCLDIR)\win\n
4490: 6d 61 6b 65 68 6c 70 2e 63 0a 21 65 6e 64 69 66 makehlp.c.!endif
44a0: 0a 21 65 6e 64 69 66 20 23 20 24 28 54 43 4c 49 .!endif # $(TCLI
44b0: 4e 53 54 41 4c 4c 29 0a 21 65 6e 64 69 66 20 23 NSTALL).!endif #
44c0: 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a !$(DOING_TCL)..
44d0: 21 65 6e 64 69 66 20 23 20 4e 4d 41 4b 45 48 4c !endif # NMAKEHL
44e0: 50 43 0a 0a 23 20 57 65 20 61 6c 77 61 79 73 20 PC..# We always
44f0: 62 75 69 6c 64 20 6e 6d 61 6b 65 68 6c 70 20 65 build nmakehlp e
4500: 76 65 6e 20 69 66 20 69 74 20 65 78 69 73 74 73 ven if it exists
4510: 20 73 69 6e 63 65 20 77 65 20 64 6f 20 6e 6f 74 since we do not
4520: 20 6b 6e 6f 77 0a 23 20 77 68 61 74 20 73 6f 75 know.# what sou
4530: 72 63 65 20 69 74 20 77 61 73 20 62 75 69 6c 74 rce it was built
4540: 20 66 72 6f 6d 2e 0a 21 69 66 20 22 24 28 4d 41 from..!if "$(MA
4550: 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 CHINE)" == "IX86
4560: 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 " || "$(MACHINE)
4570: 22 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 " == "$(NATIVE_A
4580: 52 43 48 29 22 0a 21 69 66 20 5b 24 28 63 63 33 RCH)".!if [$(cc3
4590: 32 29 20 2d 6e 6f 6c 6f 67 6f 20 22 24 28 4e 4d 2) -nologo "$(NM
45a0: 41 4b 45 48 4c 50 43 29 22 20 2d 6c 69 6e 6b 20 AKEHLPC)" -link
45b0: 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f -subsystem:conso
45c0: 6c 65 20 3e 20 6e 75 6c 5d 0a 21 65 6e 64 69 66 le > nul].!endif
45d0: 0a 21 65 6c 73 65 0a 21 69 66 20 5b 63 6f 70 79 .!else.!if [copy
45e0: 20 24 28 4e 4d 41 4b 45 48 4c 50 43 3a 6e 6d 61 $(NMAKEHLPC:nma
45f0: 6b 65 68 6c 70 2e 63 3d 78 38 36 5f 36 34 2d 77 kehlp.c=x86_64-w
4600: 36 34 2d 6d 69 6e 67 77 33 32 2d 6e 6d 61 6b 65 64-mingw32-nmake
4610: 68 6c 70 2e 65 78 65 29 20 6e 6d 61 6b 65 68 6c hlp.exe) nmakehl
4620: 70 2e 65 78 65 20 3e 4e 55 4c 5d 0a 21 65 6e 64 p.exe >NUL].!end
4630: 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 if.!endif..#####
4640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4670: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 35 2e ###########.# 5.
4680: 20 54 65 73 74 20 66 6f 72 20 63 6f 6d 70 69 6c Test for compil
4690: 65 72 20 66 65 61 74 75 72 65 73 0a 23 20 56 69 er features.# Vi
46a0: 73 75 61 6c 20 43 2b 2b 20 63 6f 6d 70 69 6c 65 sual C++ compile
46b0: 72 20 6f 70 74 69 6f 6e 73 20 68 61 76 65 20 63 r options have c
46c0: 68 61 6e 67 65 64 20 6f 76 65 72 20 74 68 65 20 hanged over the
46d0: 79 65 61 72 73 2e 20 43 68 65 63 6b 0a 23 20 77 years. Check.# w
46e0: 68 69 63 68 20 6f 70 74 69 6f 6e 73 20 61 72 65 hich options are
46f0: 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 74 68 supported by th
4700: 65 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 75 73 e compiler in us
4710: 65 2e 0a 23 0a 23 20 54 68 65 20 66 6f 6c 6c 6f e..#.# The follo
4720: 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 wing macros are
4730: 73 65 74 3a 0a 23 20 4f 50 54 49 4d 49 5a 41 54 set:.# OPTIMIZAT
4740: 49 4f 4e 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 IONS - the compi
4750: 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20 ler flags to be
4760: 75 73 65 64 20 66 6f 72 20 6f 70 74 69 6d 69 7a used for optimiz
4770: 65 64 20 62 75 69 6c 64 73 0a 23 20 44 45 42 55 ed builds.# DEBU
4780: 47 46 4c 41 47 53 20 2d 20 74 68 65 20 63 6f 6d GFLAGS - the com
4790: 70 69 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 62 piler flags to b
47a0: 65 20 75 73 65 64 20 66 6f 72 20 64 65 62 75 67 e used for debug
47b0: 20 62 75 69 6c 64 73 0a 23 20 4c 49 4e 4b 45 52 builds.# LINKER
47c0: 46 4c 41 47 53 20 2d 20 46 6c 61 67 73 20 70 61 FLAGS - Flags pa
47d0: 73 73 65 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b ssed to the link
47e0: 65 72 0a 23 0a 23 20 4e 6f 74 65 20 74 68 61 74 er.#.# Note that
47f0: 20 74 68 65 73 65 20 61 72 65 20 74 68 65 20 63 these are the c
4800: 6f 6d 70 69 6c 65 72 20 73 65 74 74 69 6e 67 73 ompiler settings
4810: 20 2a 61 76 61 69 6c 61 62 6c 65 2a 2c 20 6e 6f *available*, no
4820: 74 20 74 68 6f 73 65 0a 23 20 74 68 61 74 20 77 t those.# that w
4830: 69 6c 6c 20 62 65 20 2a 75 73 65 64 2a 2e 20 54 ill be *used*. T
4840: 68 65 20 6c 61 74 74 65 72 20 64 65 70 65 6e 64 he latter depend
4850: 73 20 6f 6e 20 74 68 65 20 4f 50 54 53 20 6d 61 s on the OPTS ma
4860: 63 72 6f 20 73 65 74 74 69 6e 67 73 0a 23 20 77 cro settings.# w
4870: 68 69 63 68 20 77 65 20 68 61 76 65 20 6e 6f 74 hich we have not
4880: 20 79 65 74 20 70 61 72 73 65 64 2e 0a 23 0a 23 yet parsed..#.#
4890: 20 41 6c 73 6f 20 6e 6f 74 65 20 74 68 61 74 20 Also note that
48a0: 73 6f 6d 65 20 6f 66 20 74 68 65 20 66 6c 61 67 some of the flag
48b0: 73 20 69 6e 20 4f 50 54 49 4d 49 5a 41 54 49 4f s in OPTIMIZATIO
48c0: 4e 53 20 61 72 65 20 6e 6f 74 20 72 65 61 6c 6c NS are not reall
48d0: 79 0a 23 20 72 65 6c 61 74 65 64 20 74 6f 20 6f y.# related to o
48e0: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 54 68 65 ptimization. The
48f0: 79 20 61 72 65 20 70 6c 61 63 65 64 20 74 68 65 y are placed the
4900: 72 65 20 6f 6e 6c 79 20 66 6f 72 20 6c 65 67 61 re only for lega
4910: 63 79 20 72 65 61 73 6f 6e 73 0a 23 20 61 73 20 cy reasons.# as
4920: 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 some extensions
4930: 65 78 70 65 63 74 20 74 68 65 6d 20 74 6f 20 62 expect them to b
4940: 65 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 e included in th
4950: 61 74 20 6d 61 63 72 6f 2e 0a 0a 23 20 2d 4f 70 at macro...# -Op
4960: 20 69 6d 70 72 6f 76 65 73 20 66 6c 6f 61 74 20 improves float
4970: 63 6f 6e 73 69 73 74 65 6e 63 79 2e 20 4e 6f 74 consistency. Not
4980: 65 20 6f 6e 6c 79 20 6e 65 65 64 65 64 20 66 6f e only needed fo
4990: 72 20 6f 6c 64 65 72 20 63 6f 6d 70 69 6c 65 72 r older compiler
49a0: 73 0a 23 20 4e 65 77 65 72 20 63 6f 6d 70 69 6c s.# Newer compil
49b0: 65 72 73 20 64 6f 20 6e 6f 74 20 6e 65 65 64 20 ers do not need
49c0: 6f 72 20 73 75 70 70 6f 72 74 20 74 68 69 73 20 or support this
49d0: 6f 70 74 69 6f 6e 2e 0a 21 69 66 20 5b 6e 6d 61 option..!if [nma
49e0: 6b 65 68 6c 70 20 2d 63 20 2d 4f 70 5d 0a 46 50 kehlp -c -Op].FP
49f0: 4f 50 54 53 20 20 3d 20 2d 4f 70 0a 21 65 6e 64 OPTS = -Op.!end
4a00: 69 66 0a 0a 23 20 53 74 72 69 63 74 20 66 6c 6f if..# Strict flo
4a10: 61 74 69 6e 67 20 70 6f 69 6e 74 20 73 65 6d 61 ating point sema
4a20: 6e 74 69 63 73 20 2d 20 70 72 65 73 65 6e 74 20 ntics - present
4a30: 69 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c 65 in newer compile
4a40: 72 73 20 69 6e 20 6c 69 65 75 20 6f 66 20 2d 4f rs in lieu of -O
4a50: 70 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 p.!if [nmakehlp
4a60: 2d 63 20 2d 66 70 3a 73 74 72 69 63 74 5d 0a 46 -c -fp:strict].F
4a70: 50 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50 54 POPTS = $(FPOPT
4a80: 53 29 20 2d 66 70 3a 73 74 72 69 63 74 0a 21 65 S) -fp:strict.!e
4a90: 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 4d 41 43 ndif..!if "$(MAC
4aa0: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 HINE)" == "IX86"
4ab0: 0a 23 23 23 20 74 65 73 74 20 66 6f 72 20 70 65 .### test for pe
4ac0: 6e 74 69 75 6d 20 65 72 72 61 74 61 0a 21 69 66 ntium errata.!if
4ad0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 51 [nmakehlp -c -Q
4ae0: 49 30 66 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a I0f].!message **
4af0: 2a 20 43 6f 6d 70 69 6c 65 72 20 68 61 73 20 27 * Compiler has '
4b00: 50 65 6e 74 69 75 6d 20 30 78 30 66 20 66 69 78 Pentium 0x0f fix
4b10: 27 0a 46 50 4f 50 54 53 20 20 3d 20 24 28 46 50 '.FPOPTS = $(FP
4b20: 4f 50 54 53 29 20 2d 51 49 30 66 0a 21 65 6c 73 OPTS) -QI0f.!els
4b30: 65 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 e.!message *** C
4b40: 6f 6d 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 ompiler does not
4b50: 20 68 61 76 65 20 27 50 65 6e 74 69 75 6d 20 30 have 'Pentium 0
4b60: 78 30 66 20 66 69 78 27 0a 21 65 6e 64 69 66 0a x0f fix'.!endif.
4b70: 21 65 6e 64 69 66 0a 0a 23 23 23 20 74 65 73 74 !endif..### test
4b80: 20 66 6f 72 20 6f 70 74 69 6d 69 7a 61 74 69 6f for optimizatio
4b90: 6e 73 0a 23 20 2f 4f 32 20 6f 70 74 69 6d 69 7a ns.# /O2 optimiz
4ba0: 61 74 69 6f 6e 20 69 6e 63 6c 75 64 65 73 20 2f ation includes /
4bb0: 4f 67 20 2f 4f 69 20 2f 4f 74 20 2f 4f 79 20 2f Og /Oi /Ot /Oy /
4bc0: 4f 62 32 20 2f 47 73 20 2f 47 46 20 2f 47 79 20 Ob2 /Gs /GF /Gy
4bd0: 61 73 20 70 65 72 0a 23 20 64 6f 63 75 6d 65 6e as per.# documen
4be0: 74 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 77 65 20 tation. Note we
4bf0: 64 6f 20 4e 4f 54 20 77 61 6e 74 20 2f 47 73 20 do NOT want /Gs
4c00: 61 73 20 74 68 61 74 20 69 6e 73 65 72 74 73 20 as that inserts
4c10: 61 20 5f 63 68 6b 73 74 6b 0a 23 20 73 74 61 63 a _chkstk.# stac
4c20: 6b 20 70 72 6f 62 65 20 61 74 20 2a 65 76 65 72 k probe at *ever
4c30: 79 2a 20 66 75 6e 63 74 69 6f 6e 20 65 6e 74 72 y* function entr
4c40: 79 2c 20 6e 6f 74 20 6a 75 73 74 20 74 68 6f 73 y, not just thos
4c50: 65 20 77 69 74 68 20 6d 6f 72 65 20 74 68 61 6e e with more than
4c60: 0a 23 20 61 20 70 61 67 65 20 6f 66 20 73 74 61 .# a page of sta
4c70: 63 6b 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 72 65 ck allocation re
4c80: 73 75 6c 74 69 6e 67 20 69 6e 20 61 20 70 65 72 sulting in a per
4c90: 66 6f 72 6d 61 6e 63 65 20 68 69 74 2e 20 20 48 formance hit. H
4ca0: 6f 77 65 76 65 72 2c 0a 23 20 2f 4f 32 20 64 6f owever,.# /O2 do
4cb0: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 69 73 20 6d cumentation is m
4cc0: 69 73 6c 65 61 64 69 6e 67 20 61 73 20 69 74 73 isleading as its
4cd0: 20 73 74 61 63 6b 20 70 72 6f 62 65 73 20 61 72 stack probes ar
4ce0: 65 20 73 69 6d 70 6c 79 20 74 68 65 0a 23 20 64 e simply the.# d
4cf0: 65 66 61 75 6c 74 20 70 61 67 65 20 73 69 7a 65 efault page size
4d00: 20 6c 6f 63 61 6c 73 20 61 6c 6c 6f 63 61 74 69 locals allocati
4d10: 6f 6e 20 70 72 6f 62 65 73 20 61 6e 64 20 6e 6f on probes and no
4d20: 74 20 77 68 61 74 20 69 73 20 69 6d 70 6c 69 65 t what is implie
4d30: 64 0a 23 20 62 79 20 61 6e 20 65 78 70 6c 69 63 d.# by an explic
4d40: 69 74 20 2f 47 73 20 6f 70 74 69 6f 6e 2e 0a 0a it /Gs option...
4d50: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 3d 20 OPTIMIZATIONS =
4d60: 24 28 46 50 4f 50 54 53 29 0a 0a 21 69 66 20 5b $(FPOPTS)..!if [
4d70: 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 4f 32 5d nmakehlp -c -O2]
4d80: 0a 4f 50 54 49 4d 49 5a 49 4e 47 20 3d 20 31 0a .OPTIMIZING = 1.
4d90: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 20 OPTIMIZATIONS
4da0: 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e = $(OPTIMIZATION
4db0: 53 29 20 2d 4f 32 0a 21 65 6c 73 65 0a 23 20 4c S) -O2.!else.# L
4dc0: 65 67 61 63 79 2c 20 72 65 61 6c 6c 79 2e 20 41 egacy, really. A
4dd0: 6c 6c 20 6d 6f 64 65 72 6e 20 63 6f 6d 70 69 6c ll modern compil
4de0: 65 72 73 20 73 75 70 70 6f 72 74 20 74 68 69 73 ers support this
4df0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f .!message *** Co
4e00: 6d 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 mpiler does not
4e10: 68 61 76 65 20 27 4f 70 74 69 6d 69 7a 61 74 69 have 'Optimizati
4e20: 6f 6e 73 27 0a 4f 50 54 49 4d 49 5a 49 4e 47 20 ons'.OPTIMIZING
4e30: 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 23 20 43 68 = 0.!endif..# Ch
4e40: 65 63 6b 73 20 66 6f 72 20 62 75 66 66 65 72 20 ecks for buffer
4e50: 6f 76 65 72 66 6c 6f 77 73 20 69 6e 20 6c 6f 63 overflows in loc
4e60: 61 6c 20 61 72 72 61 79 73 0a 21 69 66 20 5b 6e al arrays.!if [n
4e70: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 53 5d 0a makehlp -c -GS].
4e80: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d OPTIMIZATIONS =
4e90: 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 $(OPTIMIZATIONS
4ea0: 29 20 2d 47 53 0a 21 65 6e 64 69 66 0a 0a 23 20 ) -GS.!endif..#
4eb0: 4c 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69 6d 69 Link time optimi
4ec0: 7a 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 74 68 61 zation. Note tha
4ed0: 74 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 28 70 t this option (p
4ee0: 6f 74 65 6e 74 69 61 6c 6c 79 29 20 6d 61 6b 65 otentially) make
4ef0: 73 0a 23 20 67 65 6e 65 72 61 74 65 64 20 6c 69 s.# generated li
4f00: 62 72 61 72 69 65 73 20 6f 6e 6c 79 20 75 73 61 braries only usa
4f10: 62 6c 65 20 62 79 20 74 68 65 20 73 70 65 63 69 ble by the speci
4f20: 66 69 63 20 56 43 2b 2b 20 76 65 72 73 69 6f 6e fic VC++ version
4f30: 20 74 68 61 74 0a 23 20 63 72 65 61 74 65 64 20 that.# created
4f40: 69 74 2e 20 52 65 71 75 69 72 65 73 20 2f 4c 54 it. Requires /LT
4f50: 43 47 20 6c 69 6e 6b 65 72 20 6f 70 74 69 6f 6e CG linker option
4f60: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
4f70: 63 20 2d 47 4c 5d 0a 4f 50 54 49 4d 49 5a 41 54 c -GL].OPTIMIZAT
4f80: 49 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 IONS = $(OPTIMI
4f90: 5a 41 54 49 4f 4e 53 29 20 2d 47 4c 0a 43 43 5f ZATIONS) -GL.CC_
4fa0: 47 4c 5f 4f 50 54 5f 45 4e 41 42 4c 45 44 20 3d GL_OPT_ENABLED =
4fb0: 20 31 0a 21 65 6c 73 65 0a 23 20 49 6e 20 6e 65 1.!else.# In ne
4fc0: 77 65 72 20 63 6f 6d 70 69 6c 65 72 73 20 2d 47 wer compilers -G
4fd0: 4c 20 61 6e 64 20 2d 59 58 20 61 72 65 20 69 6e L and -YX are in
4fe0: 63 6f 6d 70 61 74 69 62 6c 65 2e 0a 21 69 66 20 compatible..!if
4ff0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 59 58 [nmakehlp -c -YX
5000: 5d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ].OPTIMIZATIONS
5010: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
5020: 4e 53 29 20 2d 59 58 0a 21 65 6e 64 69 66 0a 21 NS) -YX.!endif.!
5030: 65 6e 64 69 66 20 23 20 5b 6e 6d 61 6b 65 68 6c endif # [nmakehl
5040: 70 20 2d 63 20 2d 47 4c 5d 0a 0a 44 45 42 55 47 p -c -GL]..DEBUG
5050: 46 4c 41 47 53 20 20 20 20 20 3d 20 24 28 46 50 FLAGS = $(FP
5060: 4f 50 54 53 29 0a 0a 23 20 52 75 6e 20 74 69 6d OPTS)..# Run tim
5070: 65 20 65 72 72 6f 72 20 63 68 65 63 6b 73 2e 20 e error checks.
5080: 4e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 6f 72 Not available or
5090: 20 76 61 6c 69 64 20 69 6e 20 61 20 72 65 6c 65 valid in a rele
50a0: 61 73 65 2c 20 6e 6f 6e 2d 64 65 62 75 67 20 62 ase, non-debug b
50b0: 75 69 6c 64 0a 23 20 52 54 43 20 69 73 20 66 6f uild.# RTC is fo
50c0: 72 20 6d 6f 64 65 72 6e 20 63 6f 6d 70 69 6c 65 r modern compile
50d0: 72 73 2c 20 2d 47 5a 20 69 73 20 6c 65 67 61 63 rs, -GZ is legac
50e0: 79 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 y.!if [nmakehlp
50f0: 2d 63 20 2d 52 54 43 31 5d 0a 44 45 42 55 47 46 -c -RTC1].DEBUGF
5100: 4c 41 47 53 20 20 20 20 20 3d 20 24 28 44 45 42 LAGS = $(DEB
5110: 55 47 46 4c 41 47 53 29 20 2d 52 54 43 31 0a 21 UGFLAGS) -RTC1.!
5120: 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 elseif [nmakehlp
5130: 20 2d 63 20 2d 47 5a 5d 0a 44 45 42 55 47 46 4c -c -GZ].DEBUGFL
5140: 41 47 53 20 20 20 20 20 3d 20 24 28 44 45 42 55 AGS = $(DEBU
5150: 47 46 4c 41 47 53 29 20 2d 47 5a 0a 21 65 6e 64 GFLAGS) -GZ.!end
5160: 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d if..#-----------
5170: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5180: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5190: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
51a0: 2d 2d 2d 2d 2d 0a 23 20 4c 69 6e 6b 65 72 20 66 -----.# Linker f
51b0: 6c 61 67 73 0a 0a 23 20 4c 49 4e 4b 45 52 5f 54 lags..# LINKER_T
51c0: 45 53 54 46 4c 41 47 53 20 61 72 65 20 66 6f 72 ESTFLAGS are for
51d0: 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 77 68 internal use wh
51e0: 65 6e 20 77 65 20 63 61 6c 6c 20 6e 6d 61 6b 65 en we call nmake
51f0: 68 6c 70 20 74 6f 20 74 65 73 74 0a 23 20 69 66 hlp to test.# if
5200: 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 75 70 70 the linker supp
5210: 6f 72 74 73 20 61 20 73 70 65 63 69 66 69 63 20 orts a specific
5220: 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f 75 74 20 option. Without
5230: 74 68 65 73 65 20 66 6c 61 67 73 20 6c 69 6e 6b these flags link
5240: 20 77 69 6c 6c 0a 23 20 72 65 74 75 72 6e 20 22 will.# return "
5250: 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72 79 20 70 LNK1561: entry p
5260: 6f 69 6e 74 20 6d 75 73 74 20 62 65 20 64 65 66 oint must be def
5270: 69 6e 65 64 22 20 65 72 72 6f 72 20 63 6f 6d 70 ined" error comp
5280: 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53 2d 49 44 iling from VS-ID
5290: 45 3a 0a 23 20 54 68 65 79 20 61 72 65 20 6e 6f E:.# They are no
52a0: 74 20 70 61 73 73 65 64 20 74 68 72 6f 75 67 68 t passed through
52b0: 20 74 6f 20 74 68 65 20 61 63 74 75 61 6c 20 61 to the actual a
52c0: 70 70 6c 69 63 61 74 69 6f 6e 20 2f 20 65 78 74 pplication / ext
52d0: 65 6e 73 69 6f 6e 0a 23 20 6c 69 6e 6b 20 72 75 ension.# link ru
52e0: 6c 65 73 2e 0a 21 69 66 6e 64 65 66 20 4c 49 4e les..!ifndef LIN
52f0: 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 0a 4c 49 KER_TESTFLAGS.LI
5300: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 20 3d NKER_TESTFLAGS =
5310: 20 2f 44 4c 4c 20 2f 4e 4f 45 4e 54 52 59 20 2f /DLL /NOENTRY /
5320: 4f 55 54 3a 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 OUT:nmakehlp.out
5330: 0a 21 65 6e 64 69 66 0a 0a 4c 49 4e 4b 45 52 46 .!endif..LINKERF
5340: 4c 41 47 53 20 20 20 20 20 3d 0a 0a 23 20 49 66 LAGS =..# If
5350: 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 20 65 6e compiler has en
5360: 61 62 6c 65 64 20 6c 69 6e 6b 20 74 69 6d 65 20 abled link time
5370: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2c 20 6c 69 optimization, li
5380: 6e 6b 65 72 20 6d 75 73 74 20 74 6f 6f 20 77 69 nker must too wi
5390: 74 68 20 2d 6c 74 63 67 0a 21 69 66 64 65 66 20 th -ltcg.!ifdef
53a0: 43 43 5f 47 4c 5f 4f 50 54 5f 45 4e 41 42 4c 45 CC_GL_OPT_ENABLE
53b0: 44 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 D.!if [nmakehlp
53c0: 2d 6c 20 2d 6c 74 63 67 20 24 28 4c 49 4e 4b 45 -l -ltcg $(LINKE
53d0: 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 R_TESTFLAGS)].LI
53e0: 4e 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d 20 NKERFLAGS =
53f0: 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d $(LINKERFLAGS) -
5400: 6c 74 63 67 0a 21 65 6e 64 69 66 0a 21 65 6e 64 ltcg.!endif.!end
5410: 69 66 0a 0a 0a 23 23 23 23 23 23 23 23 23 23 23 if...###########
5420: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5430: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5450: 23 23 23 23 23 0a 23 20 36 2e 20 45 78 74 72 61 #####.# 6. Extra
5460: 63 74 20 76 61 72 69 6f 75 73 20 76 65 72 73 69 ct various versi
5470: 6f 6e 20 6e 75 6d 62 65 72 73 20 66 72 6f 6d 20 on numbers from
5480: 68 65 61 64 65 72 73 0a 23 20 46 6f 72 20 54 63 headers.# For Tc
5490: 6c 20 61 6e 64 20 54 6b 2c 20 76 65 72 73 69 6f l and Tk, versio
54a0: 6e 20 6e 75 6d 62 65 72 73 20 61 72 65 20 65 78 n numbers are ex
54b0: 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 63 6c tracted from tcl
54c0: 2e 68 20 61 6e 64 20 74 6b 2e 68 0a 23 20 72 65 .h and tk.h.# re
54d0: 73 70 65 63 74 69 76 65 6c 79 2e 20 46 6f 72 20 spectively. For
54e0: 65 78 74 65 6e 73 69 6f 6e 73 2c 20 76 65 72 73 extensions, vers
54f0: 69 6f 6e 73 20 61 72 65 20 65 78 74 72 61 63 74 ions are extract
5500: 65 64 20 66 72 6f 6d 20 74 68 65 0a 23 20 63 6f ed from the.# co
5510: 6e 66 69 67 75 72 65 2e 69 6e 20 6f 72 20 63 6f nfigure.in or co
5520: 6e 66 69 67 75 72 65 2e 61 63 20 66 72 6f 6d 20 nfigure.ac from
5530: 74 68 65 20 54 45 41 20 63 6f 6e 66 69 67 75 72 the TEA configur
5540: 61 74 69 6f 6e 20 69 66 20 69 74 0a 23 20 65 78 ation if it.# ex
5550: 69 73 74 73 2c 20 61 6e 64 20 75 6e 73 65 74 20 ists, and unset
5560: 6f 74 68 65 72 77 69 73 65 2e 0a 23 20 53 65 74 otherwise..# Set
5570: 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 s the following
5580: 6d 61 63 72 6f 73 3a 0a 23 20 54 43 4c 5f 4d 41 macros:.# TCL_MA
5590: 4a 4f 52 5f 56 45 52 53 49 4f 4e 0a 23 20 54 43 JOR_VERSION.# TC
55a0: 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0a L_MINOR_VERSION.
55b0: 23 20 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 # TCL_RELEASE_SE
55c0: 52 49 41 4c 0a 23 20 54 43 4c 5f 50 41 54 43 48 RIAL.# TCL_PATCH
55d0: 5f 4c 45 56 45 4c 0a 23 20 54 43 4c 5f 50 41 54 _LEVEL.# TCL_PAT
55e0: 43 48 5f 4c 45 54 54 45 52 0a 23 20 54 43 4c 5f CH_LETTER.# TCL_
55f0: 56 45 52 53 49 4f 4e 0a 23 20 54 4b 5f 4d 41 4a VERSION.# TK_MAJ
5600: 4f 52 5f 56 45 52 53 49 4f 4e 0a 23 20 54 4b 5f OR_VERSION.# TK_
5610: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0a 23 20 MINOR_VERSION.#
5620: 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 TK_RELEASE_SERIA
5630: 4c 0a 23 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 L.# TK_PATCH_LEV
5640: 45 4c 0a 23 20 54 4b 5f 50 41 54 43 48 5f 4c 45 EL.# TK_PATCH_LE
5650: 54 54 45 52 0a 23 20 54 4b 5f 56 45 52 53 49 4f TTER.# TK_VERSIO
5660: 4e 0a 23 20 44 4f 54 56 45 52 53 49 4f 4e 20 2d N.# DOTVERSION -
5670: 20 73 65 74 20 61 73 20 28 66 6f 72 20 65 78 61 set as (for exa
5680: 6d 70 6c 65 29 20 32 2e 35 0a 23 20 56 45 52 53 mple) 2.5.# VERS
5690: 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 66 6f ION - set as (fo
56a0: 72 20 65 78 61 6d 70 6c 65 20 32 35 29 0a 23 2d r example 25).#-
56b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
56c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
56d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
56e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 21 -------------..!
56f0: 69 66 20 5b 65 63 68 6f 20 52 45 4d 20 3d 20 54 if [echo REM = T
5700: 68 69 73 20 66 69 6c 65 20 69 73 20 67 65 6e 65 his file is gene
5710: 72 61 74 65 64 20 66 72 6f 6d 20 72 75 6c 65 73 rated from rules
5720: 2e 76 63 20 3e 20 76 65 72 73 69 6f 6e 73 2e 76 .vc > versions.v
5730: 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 c].!endif.!if [e
5740: 63 68 6f 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 cho TCL_MAJOR_VE
5750: 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 RSION = \>> vers
5760: 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 ions.vc] \. &&
5770: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24 [nmakehlp -V "$
5780: 28 5f 54 43 4c 5f 48 29 22 20 22 64 65 66 69 6e (_TCL_H)" "defin
5790: 65 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 e TCL_MAJOR_VERS
57a0: 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 ION" >> versions
57b0: 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 .vc].!endif.!if
57c0: 5b 65 63 68 6f 20 54 43 4c 5f 4d 49 4e 4f 52 5f [echo TCL_MINOR_
57d0: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 VERSION = \>> ve
57e0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 rsions.vc] \.
57f0: 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 && [nmakehlp -V
5800: 22 24 28 5f 54 43 4c 5f 48 29 22 20 22 64 65 66 "$(_TCL_H)" "def
5810: 69 6e 65 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 ine TCL_MINOR_VE
5820: 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f RSION" >> versio
5830: 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 ns.vc].!endif.!i
5840: 66 20 5b 65 63 68 6f 20 54 43 4c 5f 52 45 4c 45 f [echo TCL_RELE
5850: 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e 3e ASE_SERIAL = \>>
5860: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a versions.vc] \.
5870: 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 && [nmakehlp
5880: 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 -V "$(_TCL_H)" T
5890: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
58a0: 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 L >> versions.vc
58b0: 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 ].!endif.!if [ec
58c0: 68 6f 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 ho TCL_PATCH_LEV
58d0: 45 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e EL = \>> version
58e0: 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b 6e s.vc] \. && [n
58f0: 6d 61 6b 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 makehlp -V "$(_T
5900: 43 4c 5f 48 29 22 20 54 43 4c 5f 50 41 54 43 48 CL_H)" TCL_PATCH
5910: 5f 4c 45 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f _LEVEL >> versio
5920: 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 0a 21 ns.vc].!endif..!
5930: 69 66 20 64 65 66 69 6e 65 64 28 5f 54 4b 5f 48 if defined(_TK_H
5940: 29 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b 5f 4d ).!if [echo TK_M
5950: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c AJOR_VERSION = \
5960: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 >> versions.vc]
5970: 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c \. && [nmakehl
5980: 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29 20 22 64 p -V $(_TK_H) "d
5990: 65 66 69 6e 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 efine TK_MAJOR_V
59a0: 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 ERSION" >> versi
59b0: 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 ons.vc].!endif.!
59c0: 69 66 20 5b 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f if [echo TK_MINO
59d0: 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 R_VERSION = \>>
59e0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 versions.vc] \.
59f0: 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d && [nmakehlp -
5a00: 56 20 24 28 5f 54 4b 5f 48 29 20 54 4b 5f 4d 49 V $(_TK_H) TK_MI
5a10: 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3e 3e 20 76 NOR_VERSION >> v
5a20: 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 ersions.vc].!end
5a30: 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 4b 5f if.!if [echo TK_
5a40: 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3d RELEASE_SERIAL =
5a50: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 \>> versions.vc
5a60: 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 ] \. && [nmake
5a70: 68 6c 70 20 2d 56 20 22 24 28 5f 54 4b 5f 48 29 hlp -V "$(_TK_H)
5a80: 22 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 52 " TK_RELEASE_SER
5a90: 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e IAL >> versions.
5aa0: 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b vc].!endif.!if [
5ab0: 65 63 68 6f 20 54 4b 5f 50 41 54 43 48 5f 4c 45 echo TK_PATCH_LE
5ac0: 56 45 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f VEL = \>> versio
5ad0: 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b ns.vc] \. && [
5ae0: 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 5f 54 nmakehlp -V $(_T
5af0: 4b 5f 48 29 20 54 4b 5f 50 41 54 43 48 5f 4c 45 K_H) TK_PATCH_LE
5b00: 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e VEL >> versions.
5b10: 76 63 5d 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 vc].!endif.!endi
5b20: 66 20 23 20 5f 54 4b 5f 48 0a 0a 21 69 6e 63 6c f # _TK_H..!incl
5b30: 75 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a ude versions.vc.
5b40: 0a 54 43 4c 5f 56 45 52 53 49 4f 4e 09 3d 20 24 .TCL_VERSION.= $
5b50: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
5b60: 4f 4e 29 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 ON)$(TCL_MINOR_V
5b70: 45 52 53 49 4f 4e 29 0a 54 43 4c 5f 44 4f 54 56 ERSION).TCL_DOTV
5b80: 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d ERSION.= $(TCL_M
5b90: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 AJOR_VERSION).$(
5ba0: 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f TCL_MINOR_VERSIO
5bb0: 4e 29 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 N).!if [nmakehlp
5bc0: 20 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 48 5f -f $(TCL_PATCH_
5bd0: 4c 45 56 45 4c 29 20 22 61 22 5d 0a 54 43 4c 5f LEVEL) "a"].TCL_
5be0: 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 PATCH_LETTER = a
5bf0: 0a 21 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 .!elseif [nmakeh
5c00: 6c 70 20 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 lp -f $(TCL_PATC
5c10: 48 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0a 54 43 H_LEVEL) "b"].TC
5c20: 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d L_PATCH_LETTER =
5c30: 20 62 0a 21 65 6c 73 65 0a 54 43 4c 5f 50 41 54 b.!else.TCL_PAT
5c40: 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e 0a 21 65 CH_LETTER = ..!e
5c50: 6e 64 69 66 0a 0a 21 69 66 20 64 65 66 69 6e 65 ndif..!if define
5c60: 64 28 5f 54 4b 5f 48 29 0a 0a 54 4b 5f 56 45 52 d(_TK_H)..TK_VER
5c70: 53 49 4f 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f SION.= $(TK_MAJO
5c80: 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 4d R_VERSION)$(TK_M
5c90: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 54 4b INOR_VERSION).TK
5ca0: 5f 44 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 _DOTVERSION.= $(
5cb0: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
5cc0: 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 ).$(TK_MINOR_VER
5cd0: 53 49 4f 4e 29 0a 21 69 66 20 5b 6e 6d 61 6b 65 SION).!if [nmake
5ce0: 68 6c 70 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 hlp -f $(TK_PATC
5cf0: 48 5f 4c 45 56 45 4c 29 20 22 61 22 5d 0a 54 4b H_LEVEL) "a"].TK
5d00: 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 _PATCH_LETTER =
5d10: 61 0a 21 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 a.!elseif [nmake
5d20: 68 6c 70 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 hlp -f $(TK_PATC
5d30: 48 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0a 54 4b H_LEVEL) "b"].TK
5d40: 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 _PATCH_LETTER =
5d50: 62 0a 21 65 6c 73 65 0a 54 4b 5f 50 41 54 43 48 b.!else.TK_PATCH
5d60: 5f 4c 45 54 54 45 52 20 3d 20 2e 0a 21 65 6e 64 _LETTER = ..!end
5d70: 69 66 0a 0a 21 65 6e 64 69 66 0a 0a 23 20 53 65 if..!endif..# Se
5d80: 74 20 44 4f 54 56 45 52 53 49 4f 4e 20 61 6e 64 t DOTVERSION and
5d90: 20 56 45 52 53 49 4f 4e 0a 21 69 66 20 24 28 44 VERSION.!if $(D
5da0: 4f 49 4e 47 5f 54 43 4c 29 0a 0a 44 4f 54 56 45 OING_TCL)..DOTVE
5db0: 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c 5f 4d 41 RSION = $(TCL_MA
5dc0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 JOR_VERSION).$(T
5dd0: 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e CL_MINOR_VERSION
5de0: 29 0a 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 ).VERSION = $(TC
5df0: 4c 5f 56 45 52 53 49 4f 4e 29 0a 0a 21 65 6c 73 L_VERSION)..!els
5e00: 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a eif $(DOING_TK).
5e10: 0a 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 .DOTVERSION = $(
5e20: 54 4b 5f 44 4f 54 56 45 52 53 49 4f 4e 29 0a 56 TK_DOTVERSION).V
5e30: 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b 5f 56 45 ERSION = $(TK_VE
5e40: 52 53 49 4f 4e 29 0a 0a 21 65 6c 73 65 20 23 20 RSION)..!else #
5e50: 44 6f 69 6e 67 20 61 20 6e 6f 6e 2d 54 6b 20 65 Doing a non-Tk e
5e60: 78 74 65 6e 73 69 6f 6e 0a 0a 23 20 49 66 20 70 xtension..# If p
5e70: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 arent makefile h
5e80: 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 44 as not defined D
5e90: 4f 54 56 45 52 53 49 4f 4e 2c 20 74 72 79 20 74 OTVERSION, try t
5ea0: 6f 20 67 65 74 20 69 74 20 66 72 6f 6d 20 54 45 o get it from TE
5eb0: 41 0a 23 20 66 69 72 73 74 20 66 72 6f 6d 20 61 A.# first from a
5ec0: 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 66 69 configure.in fi
5ed0: 6c 65 2c 20 61 6e 64 20 74 68 65 6e 20 66 72 6f le, and then fro
5ee0: 6d 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 0a 21 m configure.ac.!
5ef0: 69 66 6e 64 65 66 20 44 4f 54 56 45 52 53 49 4f ifndef DOTVERSIO
5f00: 4e 0a 21 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 N.!if [echo DOTV
5f10: 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 ERSION = \> vers
5f20: 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c ions.vc] \. ||
5f30: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 [nmakehlp -V $(
5f40: 52 4f 4f 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e ROOT)\configure.
5f50: 69 6e 20 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e in ^[$(PROJECT)^
5f60: 5d 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 ] >> versions.vc
5f70: 5d 0a 21 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 ].!if [echo DOTV
5f80: 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 ERSION = \> vers
5f90: 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c ions.vc] \. ||
5fa0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 [nmakehlp -V $(
5fb0: 52 4f 4f 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e ROOT)\configure.
5fc0: 61 63 20 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e ac ^[$(PROJECT)^
5fd0: 5d 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 ] >> versions.vc
5fe0: 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 ].!error *** Cou
5ff0: 6c 64 20 6e 6f 74 20 66 69 67 75 72 65 20 6f 75 ld not figure ou
6000: 74 20 65 78 74 65 6e 73 69 6f 6e 20 76 65 72 73 t extension vers
6010: 69 6f 6e 2e 20 50 6c 65 61 73 65 20 64 65 66 69 ion. Please defi
6020: 6e 65 20 44 4f 54 56 45 52 53 49 4f 4e 20 69 6e ne DOTVERSION in
6030: 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 parent makefile
6040: 20 62 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e before includin
6050: 67 20 72 75 6c 65 73 2e 76 63 2e 0a 21 65 6e 64 g rules.vc..!end
6060: 69 66 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 if.!endif.!inclu
6070: 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a 21 de versions.vc.!
6080: 65 6e 64 69 66 20 23 20 44 4f 54 56 45 52 53 49 endif # DOTVERSI
6090: 4f 4e 0a 56 45 52 53 49 4f 4e 20 20 20 20 20 20 ON.VERSION
60a0: 20 20 20 3d 20 24 28 44 4f 54 56 45 52 53 49 4f = $(DOTVERSIO
60b0: 4e 3a 2e 3d 29 0a 0a 21 65 6e 64 69 66 20 23 20 N:.=)..!endif #
60c0: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e $(DOING_TCL) ...
60d0: 20 65 74 63 2e 0a 0a 23 20 57 69 6e 64 6f 77 73 etc...# Windows
60e0: 20 52 43 20 66 69 6c 65 73 20 68 61 76 65 20 33 RC files have 3
60f0: 20 76 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 version compone
6100: 6e 74 73 2e 20 45 6e 73 75 72 65 20 74 68 69 73 nts. Ensure this
6110: 20 69 72 72 65 73 70 65 63 74 69 76 65 0a 23 20 irrespective.#
6120: 6f 66 20 68 6f 77 20 6d 61 6e 79 20 63 6f 6d 70 of how many comp
6130: 6f 6e 65 6e 74 73 20 74 68 65 20 70 61 63 6b 61 onents the packa
6140: 67 65 20 68 61 73 20 73 70 65 63 69 66 69 65 64 ge has specified
6150: 2e 20 42 61 73 69 63 61 6c 6c 79 2c 20 65 6e 73 . Basically, ens
6160: 75 72 65 0a 23 20 6d 69 6e 69 6d 75 6d 20 34 20 ure.# minimum 4
6170: 63 6f 6d 70 6f 6e 65 6e 74 73 20 62 79 20 61 70 components by ap
6180: 70 65 6e 64 69 6e 67 20 34 20 30 27 73 20 61 6e pending 4 0's an
6190: 64 20 74 68 65 6e 20 70 69 63 6b 20 6f 75 74 20 d then pick out
61a0: 74 68 65 20 66 69 72 73 74 20 34 2e 0a 23 20 41 the first 4..# A
61b0: 6c 73 6f 20 74 61 6b 65 20 63 61 72 65 20 6f 66 lso take care of
61c0: 20 74 68 65 20 66 61 63 74 20 74 68 61 74 20 44 the fact that D
61d0: 4f 54 56 45 52 53 49 4f 4e 20 6d 61 79 20 68 61 OTVERSION may ha
61e0: 76 65 20 22 61 22 20 6f 72 20 22 62 22 20 69 6e ve "a" or "b" in
61f0: 73 74 65 61 64 0a 23 20 6f 66 20 22 2e 22 20 73 stead.# of "." s
6200: 65 70 61 72 61 74 69 6e 67 20 74 68 65 20 76 65 eparating the ve
6210: 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 rsion components
6220: 2e 0a 44 4f 54 53 45 50 41 52 41 54 45 44 3d 24 ..DOTSEPARATED=$
6230: 28 44 4f 54 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 (DOTVERSION:a=.)
6240: 0a 44 4f 54 53 45 50 41 52 41 54 45 44 3d 24 28 .DOTSEPARATED=$(
6250: 44 4f 54 53 45 50 41 52 41 54 45 44 3a 62 3d 2e DOTSEPARATED:b=.
6260: 29 0a 21 69 66 20 5b 65 63 68 6f 20 52 43 43 4f ).!if [echo RCCO
6270: 4d 4d 41 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 MMAVERSION = \>
6280: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 versions.vc] \.
6290: 20 7c 7c 20 5b 66 6f 72 20 2f 66 20 22 74 6f 6b || [for /f "tok
62a0: 65 6e 73 3d 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 ens=1,2,3,4,5* d
62b0: 65 6c 69 6d 73 3d 2e 22 20 25 61 20 69 6e 20 28 elims=." %a in (
62c0: 22 24 28 44 4f 54 53 45 50 41 52 41 54 45 44 29 "$(DOTSEPARATED)
62d0: 2e 30 2e 30 2e 30 2e 30 22 29 20 64 6f 20 65 63 .0.0.0.0") do ec
62e0: 68 6f 20 25 61 2c 25 62 2c 25 63 2c 25 64 20 3e ho %a,%b,%c,%d >
62f0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
6300: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
6310: 6e 6f 74 20 67 65 6e 65 72 61 74 65 20 52 43 43 not generate RCC
6320: 4f 4d 4d 41 56 45 52 53 49 4f 4e 20 2a 2a 2a 0a OMMAVERSION ***.
6330: 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 !endif.!include
6340: 76 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 23 23 23 versions.vc..###
6350: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6360: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6370: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6380: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6390: 23 23 23 23 23 0a 23 20 37 2e 20 50 61 72 73 65 #####.# 7. Parse
63a0: 20 74 68 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 the OPTS macro
63b0: 74 6f 20 77 6f 72 6b 20 6f 75 74 20 74 68 65 20 to work out the
63c0: 72 65 71 75 65 73 74 65 64 20 62 75 69 6c 64 20 requested build
63d0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 0a 23 configuration..#
63e0: 20 42 61 73 65 64 20 6f 6e 20 74 68 69 73 2c 20 Based on this,
63f0: 77 65 20 77 69 6c 6c 20 63 6f 6e 73 74 72 75 63 we will construc
6400: 74 20 74 68 65 20 61 63 74 75 61 6c 20 73 77 69 t the actual swi
6410: 74 63 68 65 73 20 74 6f 20 62 65 20 70 61 73 73 tches to be pass
6420: 65 64 20 74 6f 20 74 68 65 0a 23 20 63 6f 6d 70 ed to the.# comp
6430: 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 iler and linker
6440: 75 73 69 6e 67 20 74 68 65 20 6d 61 63 72 6f 73 using the macros
6450: 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 defined in the
6460: 70 72 65 76 69 6f 75 73 20 73 65 63 74 69 6f 6e previous section
6470: 2e 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e ..# The followin
6480: 67 20 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66 g macros are def
6490: 69 6e 65 64 20 62 79 20 74 68 69 73 20 73 65 63 ined by this sec
64a0: 74 69 6f 6e 20 62 61 73 65 64 20 6f 6e 20 4f 50 tion based on OP
64b0: 54 53 0a 23 20 53 54 41 54 49 43 5f 42 55 49 4c TS.# STATIC_BUIL
64c0: 44 20 2d 20 30 20 2d 3e 20 54 63 6c 20 69 73 20 D - 0 -> Tcl is
64d0: 74 6f 20 62 65 20 62 75 69 6c 74 20 61 73 20 61 to be built as a
64e0: 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 79 0a shared library.
64f0: 23 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 #
6500: 20 31 20 2d 3e 20 62 75 69 6c 64 20 61 73 20 61 1 -> build as a
6510: 20 73 74 61 74 69 63 20 6c 69 62 72 61 72 79 20 static library
6520: 61 6e 64 20 73 68 65 6c 6c 0a 23 20 54 43 4c 5f and shell.# TCL_
6530: 54 48 52 45 41 44 53 20 2d 20 6c 65 67 61 63 79 THREADS - legacy
6540: 20 62 75 74 20 61 6c 77 61 79 73 20 31 20 6f 6e but always 1 on
6550: 20 57 69 6e 64 6f 77 73 20 73 69 6e 63 65 20 77 Windows since w
6560: 69 6e 73 6f 63 6b 20 72 65 71 75 69 72 65 73 20 insock requires
6570: 69 74 2e 0a 23 20 44 45 42 55 47 20 2d 20 31 20 it..# DEBUG - 1
6580: 2d 3e 20 64 65 62 75 67 20 62 75 69 6c 64 2c 20 -> debug build,
6590: 30 20 2d 3e 20 72 65 6c 65 61 73 65 20 62 75 69 0 -> release bui
65a0: 6c 64 73 0a 23 20 53 59 4d 42 4f 4c 53 20 2d 20 lds.# SYMBOLS -
65b0: 31 20 2d 3e 20 67 65 6e 65 72 61 74 65 20 50 44 1 -> generate PD
65c0: 42 27 73 2c 20 30 20 2d 3e 20 6e 6f 20 50 44 42 B's, 0 -> no PDB
65d0: 27 73 0a 23 20 50 52 4f 46 49 4c 45 20 2d 20 31 's.# PROFILE - 1
65e0: 20 2d 3e 20 67 65 6e 65 72 61 74 65 20 70 72 6f -> generate pro
65f0: 66 69 6c 69 6e 67 20 69 6e 66 6f 2c 20 30 20 2d filing info, 0 -
6600: 3e 20 6e 6f 20 70 72 6f 66 69 6c 69 6e 67 0a 23 > no profiling.#
6610: 20 50 47 4f 20 20 20 20 20 2d 20 31 20 2d 3e 20 PGO - 1 ->
6620: 70 72 6f 66 69 6c 65 20 62 61 73 65 64 20 6f 70 profile based op
6630: 74 69 6d 69 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e timization, 0 ->
6640: 20 6e 6f 0a 23 20 4d 53 56 43 52 54 20 20 2d 20 no.# MSVCRT -
6650: 31 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 64 79 6e 1 -> link to dyn
6660: 61 6d 69 63 20 43 20 72 75 6e 74 69 6d 65 20 65 amic C runtime e
6670: 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e ven when buildin
6680: 67 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 g static Tcl bui
6690: 6c 64 0a 23 20 20 20 20 20 20 20 20 20 20 20 30 ld.# 0
66a0: 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 73 74 61 74 -> link to stat
66b0: 69 63 20 43 20 72 75 6e 74 69 6d 65 20 66 6f 72 ic C runtime for
66c0: 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 6c static Tcl buil
66d0: 64 2e 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 d..# D
66e0: 6f 65 73 20 6e 6f 74 20 69 6d 70 61 63 74 20 73 oes not impact s
66f0: 68 61 72 65 64 20 54 63 6c 20 62 75 69 6c 64 73 hared Tcl builds
6700: 20 28 53 54 41 54 49 43 5f 42 55 49 4c 44 20 3d (STATIC_BUILD =
6710: 3d 20 30 29 0a 23 20 20 20 20 20 20 20 20 20 20 = 0).#
6720: 20 44 65 66 61 75 6c 74 3a 20 31 20 66 6f 72 20 Default: 1 for
6730: 54 63 6c 20 39 2e 30 20 61 6e 64 20 75 70 2c 20 Tcl 9.0 and up,
6740: 30 20 6f 74 68 65 72 77 69 73 65 2e 0a 23 20 54 0 otherwise..# T
6750: 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 CL_USE_STATIC_PA
6760: 43 4b 41 47 45 53 20 2d 20 31 20 2d 3e 20 73 74 CKAGES - 1 -> st
6770: 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 68 atically link th
6780: 65 20 72 65 67 69 73 74 72 79 20 61 6e 64 20 64 e registry and d
6790: 64 65 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 de extensions.#
67a0: 20 20 20 20 20 20 20 20 20 20 69 6e 20 74 68 65 in the
67b0: 20 54 63 6c 20 61 6e 64 20 57 69 73 68 20 73 68 Tcl and Wish sh
67c0: 65 6c 6c 2e 20 30 20 2d 3e 20 6b 65 65 70 20 74 ell. 0 -> keep t
67d0: 68 65 6d 20 61 73 20 73 68 61 72 65 64 20 6c 69 hem as shared li
67e0: 62 72 61 72 69 65 73 2e 20 44 6f 65 73 0a 23 20 braries. Does.#
67f0: 20 20 20 20 20 20 20 20 20 20 6e 6f 74 20 69 6d not im
6800: 70 61 63 74 20 73 68 61 72 65 64 20 54 63 6c 20 pact shared Tcl
6810: 62 75 69 6c 64 73 2e 20 49 6d 70 6c 69 65 64 20 builds. Implied
6820: 62 79 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 by STATIC_BUILD
6830: 73 69 6e 63 65 20 54 63 6c 20 39 2e 30 2e 0a 23 since Tcl 9.0..#
6840: 20 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f USE_THREAD_ALLO
6850: 43 20 2d 20 31 20 2d 3e 20 55 73 65 20 61 20 73 C - 1 -> Use a s
6860: 68 61 72 65 64 20 67 6c 6f 62 61 6c 20 66 72 65 hared global fre
6870: 65 20 70 6f 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 e pool for alloc
6880: 61 74 69 6f 6e 2e 0a 23 20 20 20 20 20 20 20 20 ation..#
6890: 20 20 20 30 20 2d 3e 20 55 73 65 20 74 68 65 20 0 -> Use the
68a0: 6e 6f 6e 2d 74 68 72 65 61 64 20 61 6c 6c 6f 63 non-thread alloc
68b0: 61 74 6f 72 2e 0a 23 20 55 4e 43 48 45 43 4b 45 ator..# UNCHECKE
68c0: 44 20 2d 20 31 20 2d 3e 20 77 68 65 6e 20 64 6f D - 1 -> when do
68d0: 69 6e 67 20 61 20 64 65 62 75 67 20 62 75 69 6c ing a debug buil
68e0: 64 20 77 69 74 68 20 73 79 6d 62 6f 6c 73 2c 20 d with symbols,
68f0: 75 73 65 20 74 68 65 20 72 65 6c 65 61 73 65 0a use the release.
6900: 23 20 20 20 20 20 20 20 20 20 20 20 43 20 72 75 # C ru
6910: 6e 74 69 6d 65 2c 20 30 20 2d 3e 20 75 73 65 20 ntime, 0 -> use
6920: 74 68 65 20 64 65 62 75 67 20 43 20 72 75 6e 74 the debug C runt
6930: 69 6d 65 2e 0a 23 20 55 53 45 5f 53 54 55 42 53 ime..# USE_STUBS
6940: 20 2d 20 31 20 2d 3e 20 63 6f 6d 70 69 6c 65 20 - 1 -> compile
6950: 74 6f 20 75 73 65 20 73 74 75 62 73 20 69 6e 74 to use stubs int
6960: 65 72 66 61 63 65 73 2c 20 30 20 2d 3e 20 64 69 erfaces, 0 -> di
6970: 72 65 63 74 20 6c 69 6e 6b 69 6e 67 0a 23 20 43 rect linking.# C
6980: 4f 4e 46 49 47 5f 43 48 45 43 4b 20 2d 20 31 20 ONFIG_CHECK - 1
6990: 2d 3e 20 63 68 65 63 6b 20 63 75 72 72 65 6e 74 -> check current
69a0: 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 build configura
69b0: 74 69 6f 6e 20 61 67 61 69 6e 73 74 20 54 63 6c tion against Tcl
69c0: 0a 23 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e .# con
69d0: 66 69 67 75 72 61 74 69 6f 6e 20 28 69 67 6e 6f figuration (igno
69e0: 72 65 64 20 66 6f 72 20 54 63 6c 20 69 74 73 65 red for Tcl itse
69f0: 6c 66 29 0a 23 20 5f 55 53 45 5f 36 34 42 49 54 lf).# _USE_64BIT
6a00: 5f 54 49 4d 45 5f 54 20 2d 20 66 6f 72 63 65 73 _TIME_T - forces
6a10: 20 61 20 62 75 69 6c 64 20 75 73 69 6e 67 20 36 a build using 6
6a20: 34 2d 62 69 74 20 74 69 6d 65 5f 74 20 66 6f 72 4-bit time_t for
6a30: 20 33 32 2d 62 69 74 20 62 75 69 6c 64 0a 23 20 32-bit build.#
6a40: 20 20 20 20 20 20 20 20 20 20 28 43 52 54 20 6c (CRT l
6a50: 69 62 72 61 72 79 20 73 68 6f 75 6c 64 20 73 75 ibrary should su
6a60: 70 70 6f 72 74 20 74 68 69 73 2c 20 6e 6f 74 20 pport this, not
6a70: 6e 65 65 64 65 64 20 66 6f 72 20 54 63 6c 20 39 needed for Tcl 9
6a80: 2e 78 29 0a 23 20 46 75 72 74 68 65 72 2c 20 4c .x).# Further, L
6a90: 49 4e 4b 45 52 46 4c 41 47 53 20 61 72 65 20 6d INKERFLAGS are m
6aa0: 6f 64 69 66 69 65 64 20 62 61 73 65 64 20 6f 6e odified based on
6ab0: 20 61 62 6f 76 65 2e 0a 0a 23 20 44 65 66 61 75 above...# Defau
6ac0: 6c 74 20 76 61 6c 75 65 73 20 66 6f 72 20 61 6c lt values for al
6ad0: 6c 20 74 68 65 20 61 62 6f 76 65 0a 53 54 41 54 l the above.STAT
6ae0: 49 43 5f 42 55 49 4c 44 09 3d 20 30 0a 54 43 4c IC_BUILD.= 0.TCL
6af0: 5f 54 48 52 45 41 44 53 09 3d 20 31 0a 44 45 42 _THREADS.= 1.DEB
6b00: 55 47 09 09 3d 20 30 0a 53 59 4d 42 4f 4c 53 09 UG..= 0.SYMBOLS.
6b10: 09 3d 20 30 0a 50 52 4f 46 49 4c 45 09 09 3d 20 .= 0.PROFILE..=
6b20: 30 0a 50 47 4f 09 09 3d 20 30 0a 4d 53 56 43 52 0.PGO..= 0.MSVCR
6b30: 54 09 09 3d 20 31 0a 54 43 4c 5f 55 53 45 5f 53 T..= 1.TCL_USE_S
6b40: 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 09 3d TATIC_PACKAGES.=
6b50: 20 30 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 0.USE_THREAD_AL
6b60: 4c 4f 43 20 3d 20 31 0a 55 4e 43 48 45 43 4b 45 LOC = 1.UNCHECKE
6b70: 44 09 3d 20 30 0a 43 4f 4e 46 49 47 5f 43 48 45 D.= 0.CONFIG_CHE
6b80: 43 4b 20 20 20 20 3d 20 31 0a 21 69 66 20 24 28 CK = 1.!if $(
6b90: 44 4f 49 4e 47 5f 54 43 4c 29 0a 55 53 45 5f 53 DOING_TCL).USE_S
6ba0: 54 55 42 53 20 20 20 20 20 20 20 3d 20 30 0a 21 TUBS = 0.!
6bb0: 65 6c 73 65 0a 55 53 45 5f 53 54 55 42 53 20 20 else.USE_STUBS
6bc0: 20 20 20 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a = 1.!endif.
6bd0: 0a 23 20 49 66 20 4f 50 54 53 20 69 73 20 6e 6f .# If OPTS is no
6be0: 74 20 65 6d 70 74 79 20 41 4e 44 20 64 6f 65 73 t empty AND does
6bf0: 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 22 6e 6f not contain "no
6c00: 6e 65 22 20 77 68 69 63 68 20 74 75 72 6e 73 20 ne" which turns
6c10: 6f 66 66 20 61 6c 6c 20 4f 50 54 53 0a 23 20 73 off all OPTS.# s
6c20: 65 74 20 74 68 65 20 61 62 6f 76 65 20 6d 61 63 et the above mac
6c30: 72 6f 73 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 ros based on OPT
6c40: 53 20 63 6f 6e 74 65 6e 74 0a 21 69 66 20 22 24 S content.!if "$
6c50: 28 4f 50 54 53 29 22 20 21 3d 20 22 22 20 26 26 (OPTS)" != "" &&
6c60: 20 21 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 ![nmakehlp -f "
6c70: 24 28 4f 50 54 53 29 22 20 22 6e 6f 6e 65 22 5d $(OPTS)" "none"]
6c80: 0a 0a 23 20 4f 50 54 53 20 61 72 65 20 73 70 65 ..# OPTS are spe
6c90: 63 69 66 69 65 64 2c 20 70 61 72 73 65 20 74 68 cified, parse th
6ca0: 65 6d 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c em..!if [nmakehl
6cb0: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 74 p -f $(OPTS) "st
6cc0: 61 74 69 63 22 5d 0a 21 6d 65 73 73 61 67 65 20 atic"].!message
6cd0: 2a 2a 2a 20 44 6f 69 6e 67 20 73 74 61 74 69 63 *** Doing static
6ce0: 0a 53 54 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 .STATIC_BUILD.=
6cf0: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 1.!endif..!if [n
6d00: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
6d10: 53 29 20 22 6e 6f 73 74 75 62 73 22 5d 0a 21 6d S) "nostubs"].!m
6d20: 65 73 73 61 67 65 20 2a 2a 2a 20 4e 6f 74 20 75 essage *** Not u
6d30: 73 69 6e 67 20 73 74 75 62 73 0a 55 53 45 5f 53 sing stubs.USE_S
6d40: 54 55 42 53 09 3d 20 30 0a 21 65 6e 64 69 66 0a TUBS.= 0.!endif.
6d50: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
6d60: 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73 76 f $(OPTS) "nomsv
6d70: 63 72 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a crt"].!message *
6d80: 2a 2a 20 44 6f 69 6e 67 20 6e 6f 6d 73 76 63 72 ** Doing nomsvcr
6d90: 74 0a 4d 53 56 43 52 54 09 09 3d 20 30 0a 21 65 t.MSVCRT..= 0.!e
6da0: 6c 73 65 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c lse.!if [nmakehl
6db0: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6d 73 p -f $(OPTS) "ms
6dc0: 76 63 72 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 vcrt"].!message
6dd0: 2a 2a 2a 20 44 6f 69 6e 67 20 6d 73 76 63 72 74 *** Doing msvcrt
6de0: 0a 21 65 6c 73 65 0a 21 69 66 20 24 28 54 43 4c .!else.!if $(TCL
6df0: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
6e00: 3d 3d 20 38 20 26 26 20 24 28 54 43 4c 5f 4d 49 == 8 && $(TCL_MI
6e10: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3c 20 37 NOR_VERSION) < 7
6e20: 20 26 26 20 24 28 53 54 41 54 49 43 5f 42 55 49 && $(STATIC_BUI
6e30: 4c 44 29 0a 4d 53 56 43 52 54 09 09 3d 20 30 0a LD).MSVCRT..= 0.
6e40: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 !endif.!endif.!e
6e50: 6e 64 69 66 20 23 20 5b 6e 6d 61 6b 65 68 6c 70 ndif # [nmakehlp
6e60: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d -f $(OPTS) "nom
6e70: 73 76 63 72 74 22 5d 0a 0a 21 69 66 20 5b 6e 6d svcrt"]..!if [nm
6e80: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
6e90: 29 20 22 73 74 61 74 69 63 70 6b 67 22 5d 20 26 ) "staticpkg"] &
6ea0: 26 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 & $(STATIC_BUILD
6eb0: 29 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ).!message *** D
6ec0: 6f 69 6e 67 20 73 74 61 74 69 63 70 6b 67 0a 54 oing staticpkg.T
6ed0: 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 CL_USE_STATIC_PA
6ee0: 43 4b 41 47 45 53 09 3d 20 31 0a 21 65 6e 64 69 CKAGES.= 1.!endi
6ef0: 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 f..!if [nmakehlp
6f00: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 74 -f $(OPTS) "not
6f10: 68 72 65 61 64 73 22 5d 0a 21 6d 65 73 73 61 67 hreads"].!messag
6f20: 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 20 65 78 e *** Compile ex
6f30: 70 6c 69 63 69 74 6c 79 20 66 6f 72 20 6e 6f 6e plicitly for non
6f40: 2d 74 68 72 65 61 64 65 64 20 74 63 6c 0a 54 43 -threaded tcl.TC
6f50: 4c 5f 54 48 52 45 41 44 53 20 3d 20 30 0a 55 53 L_THREADS = 0.US
6f60: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 3d 20 E_THREAD_ALLOC=
6f70: 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 0.!endif..!if [n
6f80: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
6f90: 53 29 20 22 74 63 6c 38 22 5d 0a 21 6d 65 73 73 S) "tcl8"].!mess
6fa0: 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 20 66 6f age *** Build fo
6fb0: 72 20 54 63 6c 38 0a 54 43 4c 5f 42 55 49 4c 44 r Tcl8.TCL_BUILD
6fc0: 5f 46 4f 52 20 3d 20 38 0a 21 65 6e 64 69 66 0a _FOR = 8.!endif.
6fd0: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
6fe0: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 21 _VERSION) == 8.!
6ff0: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7000: 24 28 4f 50 54 53 29 20 22 74 69 6d 65 36 34 62 $(OPTS) "time64b
7010: 69 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a it"].!message **
7020: 2a 20 46 6f 72 63 65 20 36 34 2d 62 69 74 20 74 * Force 64-bit t
7030: 69 6d 65 5f 74 0a 5f 55 53 45 5f 36 34 42 49 54 ime_t._USE_64BIT
7040: 5f 54 49 4d 45 5f 54 20 3d 20 31 0a 21 65 6e 64 _TIME_T = 1.!end
7050: 69 66 0a 21 65 6e 64 69 66 0a 0a 23 20 59 65 73 if.!endif..# Yes
7060: 2c 20 69 74 27 73 20 77 65 69 72 64 20 74 68 61 , it's weird tha
7070: 74 20 74 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 t the "symbols"
7080: 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 option controls
7090: 44 45 42 55 47 20 61 6e 64 0a 23 20 74 68 65 20 DEBUG and.# the
70a0: 22 70 64 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f "pdbs" option co
70b0: 6e 74 72 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20 ntrols SYMBOLS.
70c0: 54 68 61 74 27 73 20 68 69 73 74 6f 72 69 63 61 That's historica
70d0: 6c 2e 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 l..!if [nmakehlp
70e0: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 79 6d -f $(OPTS) "sym
70f0: 62 6f 6c 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 bols"].!message
7100: 2a 2a 2a 20 44 6f 69 6e 67 20 73 79 6d 62 6f 6c *** Doing symbol
7110: 73 0a 44 45 42 55 47 09 09 3d 20 31 0a 21 65 6c s.DEBUG..= 1.!el
7120: 73 65 0a 44 45 42 55 47 09 09 3d 20 30 0a 21 65 se.DEBUG..= 0.!e
7130: 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 ndif..!if [nmake
7140: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
7150: 70 64 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 pdbs"].!message
7160: 2a 2a 2a 20 44 6f 69 6e 67 20 70 64 62 73 0a 53 *** Doing pdbs.S
7170: 59 4d 42 4f 4c 53 09 09 3d 20 31 0a 21 65 6c 73 YMBOLS..= 1.!els
7180: 65 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 21 e.SYMBOLS..= 0.!
7190: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
71a0: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
71b0: 22 70 72 6f 66 69 6c 65 22 5d 0a 21 6d 65 73 73 "profile"].!mess
71c0: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 age *** Doing pr
71d0: 6f 66 69 6c 65 0a 50 52 4f 46 49 4c 45 09 09 3d ofile.PROFILE..=
71e0: 20 31 0a 21 65 6c 73 65 0a 50 52 4f 46 49 4c 45 1.!else.PROFILE
71f0: 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 ..= 0.!endif..!i
7200: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
7210: 28 4f 50 54 53 29 20 22 70 67 69 22 5d 0a 21 6d (OPTS) "pgi"].!m
7220: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7230: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
7240: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 73 optimization ins
7250: 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 50 47 4f trumentation.PGO
7260: 09 09 3d 20 31 0a 21 65 6c 73 65 69 66 20 5b 6e ..= 1.!elseif [n
7270: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
7280: 53 29 20 22 70 67 6f 22 5d 0a 21 6d 65 73 73 61 S) "pgo"].!messa
7290: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f ge *** Doing pro
72a0: 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 file guided opti
72b0: 6d 69 7a 61 74 69 6f 6e 0a 50 47 4f 09 09 3d 20 mization.PGO..=
72c0: 32 0a 21 65 6c 73 65 0a 50 47 4f 09 09 3d 20 30 2.!else.PGO..= 0
72d0: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
72e0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
72f0: 29 20 22 6c 6f 69 6d 70 61 63 74 22 5d 0a 21 6d ) "loimpact"].!m
7300: 65 73 73 61 67 65 20 2a 2a 2a 20 57 61 72 6e 69 essage *** Warni
7310: 6e 67 3a 20 69 67 6e 6f 72 69 6e 67 20 6f 70 74 ng: ignoring opt
7320: 69 6f 6e 20 22 6c 6f 69 6d 70 61 63 74 22 20 2d ion "loimpact" -
7330: 20 64 65 70 72 65 63 61 74 65 64 20 6f 6e 20 6d deprecated on m
7340: 6f 64 65 72 6e 20 57 69 6e 64 6f 77 73 2e 0a 21 odern Windows..!
7350: 65 6e 64 69 66 0a 0a 23 20 54 42 44 20 2d 20 73 endif..# TBD - s
7360: 68 6f 75 6c 64 20 67 65 74 20 72 69 64 20 6f 66 hould get rid of
7370: 20 74 68 69 73 20 6f 70 74 69 6f 6e 0a 21 69 66 this option.!if
7380: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
7390: 4f 50 54 53 29 20 22 74 68 72 64 61 6c 6c 6f 63 OPTS) "thrdalloc
73a0: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
73b0: 44 6f 69 6e 67 20 74 68 72 64 61 6c 6c 6f 63 0a Doing thrdalloc.
73c0: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
73d0: 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 = 1.!endif..!if
73e0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
73f0: 4f 50 54 53 29 20 22 74 63 6c 61 6c 6c 6f 63 22 OPTS) "tclalloc"
7400: 5d 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c ].USE_THREAD_ALL
7410: 4f 43 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 OC = 0.!endif..!
7420: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7430: 24 28 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b $(OPTS) "uncheck
7440: 65 64 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a ed"].!message **
7450: 2a 20 44 6f 69 6e 67 20 75 6e 63 68 65 63 6b 65 * Doing unchecke
7460: 64 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 31 0a d.UNCHECKED = 1.
7470: 21 65 6c 73 65 0a 55 4e 43 48 45 43 4b 45 44 20 !else.UNCHECKED
7480: 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 = 0.!endif..!if
7490: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
74a0: 50 54 53 29 20 22 6e 6f 63 6f 6e 66 69 67 63 68 PTS) "noconfigch
74b0: 65 63 6b 22 5d 0a 43 4f 4e 46 49 47 5f 43 48 45 eck"].CONFIG_CHE
74c0: 43 4b 20 3d 20 31 0a 21 65 6c 73 65 0a 43 4f 4e CK = 1.!else.CON
74d0: 46 49 47 5f 43 48 45 43 4b 20 3d 20 30 0a 21 65 FIG_CHECK = 0.!e
74e0: 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 22 ndif..!endif # "
74f0: 24 28 4f 50 54 53 29 22 20 21 3d 20 22 22 20 20 $(OPTS)" != ""
7500: 26 26 20 2e 2e 2e 20 70 61 72 73 69 6e 67 20 6f && ... parsing o
7510: 66 20 4f 50 54 53 0a 0a 23 20 53 65 74 20 6c 69 f OPTS..# Set li
7520: 6e 6b 65 72 20 66 6c 61 67 73 20 62 61 73 65 64 nker flags based
7530: 20 6f 6e 20 61 62 6f 76 65 0a 0a 21 69 66 20 24 on above..!if $
7540: 28 50 47 4f 29 20 3e 20 31 0a 21 69 66 20 5b 6e (PGO) > 1.!if [n
7550: 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 makehlp -l -ltcg
7560: 3a 70 67 6f 70 74 69 6d 69 7a 65 20 24 28 4c 49 :pgoptimize $(LI
7570: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d NKER_TESTFLAGS)]
7580: 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 .LINKERFLAGS.= $
7590: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 (LINKERFLAGS:-lt
75a0: 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 6f 70 74 cg=) -ltcg:pgopt
75b0: 69 6d 69 7a 65 0a 21 65 6c 73 65 0a 4d 53 47 3d imize.!else.MSG=
75c0: 5e 0a 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 ^.This compiler
75d0: 64 6f 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 does not support
75e0: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
75f0: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 optimization..!e
7600: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
7610: 69 66 0a 21 65 6c 73 65 69 66 20 24 28 50 47 4f if.!elseif $(PGO
7620: 29 20 3e 20 30 0a 21 69 66 20 5b 6e 6d 61 6b 65 ) > 0.!if [nmake
7630: 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 69 hlp -l -ltcg:pgi
7640: 6e 73 74 72 75 6d 65 6e 74 20 24 28 4c 49 4e 4b nstrument $(LINK
7650: 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c ER_TESTFLAGS)].L
7660: 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 28 4c INKERFLAGS.= $(L
7670: 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 63 67 INKERFLAGS:-ltcg
7680: 3d 29 20 2d 6c 74 63 67 3a 70 67 69 6e 73 74 72 =) -ltcg:pginstr
7690: 75 6d 65 6e 74 0a 21 65 6c 73 65 0a 4d 53 47 3d ument.!else.MSG=
76a0: 5e 0a 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 ^.This compiler
76b0: 64 6f 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 does not support
76c0: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
76d0: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 optimization..!e
76e0: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
76f0: 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 if.!endif..#####
7700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7710: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7730: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 38 2e ###########.# 8.
7740: 20 50 61 72 73 65 20 74 68 65 20 53 54 41 54 53 Parse the STATS
7750: 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 macro to config
7760: 75 72 65 20 63 6f 64 65 20 69 6e 73 74 72 75 6d ure code instrum
7770: 65 6e 74 61 74 69 6f 6e 0a 23 20 54 68 65 20 66 entation.# The f
7780: 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 ollowing macros
7790: 61 72 65 20 73 65 74 20 62 79 20 74 68 69 73 20 are set by this
77a0: 73 65 63 74 69 6f 6e 3a 0a 23 20 54 43 4c 5f 4d section:.# TCL_M
77b0: 45 4d 5f 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 EM_DEBUG - 1 ->
77c0: 65 6e 61 62 6c 65 73 20 6d 65 6d 6f 72 79 20 61 enables memory a
77d0: 6c 6c 6f 63 61 74 69 6f 6e 20 69 6e 73 74 72 75 llocation instru
77e0: 6d 65 6e 74 61 74 69 6f 6e 0a 23 20 20 20 20 20 mentation.#
77f0: 20 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 0 ->
7800: 20 64 69 73 61 62 6c 65 73 0a 23 20 54 43 4c 5f disables.# TCL_
7810: 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 2d 20 COMPILE_DEBUG -
7820: 31 20 2d 3e 20 65 6e 61 62 6c 65 73 20 62 79 74 1 -> enables byt
7830: 65 20 63 6f 6d 70 69 6c 65 72 20 6c 6f 67 67 69 e compiler loggi
7840: 6e 67 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 ng.#
7850: 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 64 69 0 -> di
7860: 73 61 62 6c 65 73 0a 0a 23 20 44 65 66 61 75 6c sables..# Defaul
7870: 74 20 62 6f 74 68 20 61 72 65 20 6f 66 66 0a 54 t both are off.T
7880: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 CL_MEM_DEBUG.
7890: 20 3d 20 30 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 = 0.TCL_COMPILE
78a0: 5f 44 45 42 55 47 20 20 20 3d 20 30 0a 0a 21 69 _DEBUG = 0..!i
78b0: 66 20 22 24 28 53 54 41 54 53 29 22 20 21 3d 20 f "$(STATS)" !=
78c0: 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 "" && ![nmakehlp
78d0: 20 2d 66 20 22 24 28 53 54 41 54 53 29 22 20 22 -f "$(STATS)" "
78e0: 6e 6f 6e 65 22 5d 0a 0a 21 69 66 20 5b 6e 6d 61 none"]..!if [nma
78f0: 6b 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 kehlp -f $(STATS
7900: 29 20 22 6d 65 6d 64 62 67 22 5d 0a 21 6d 65 73 ) "memdbg"].!mes
7910: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6d sage *** Doing m
7920: 65 6d 64 62 67 0a 54 43 4c 5f 4d 45 4d 5f 44 45 emdbg.TCL_MEM_DE
7930: 42 55 47 09 20 20 20 20 3d 20 31 0a 21 65 6c 73 BUG. = 1.!els
7940: 65 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 e.TCL_MEM_DEBUG.
7950: 20 20 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a = 0.!endif..
7960: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7970: 20 24 28 53 54 41 54 53 29 20 22 63 6f 6d 70 64 $(STATS) "compd
7980: 62 67 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a bg"].!message **
7990: 2a 20 44 6f 69 6e 67 20 63 6f 6d 70 64 62 67 0a * Doing compdbg.
79a0: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 TCL_COMPILE_DEBU
79b0: 47 20 20 20 3d 20 31 0a 21 65 6c 73 65 0a 54 43 G = 1.!else.TC
79c0: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 L_COMPILE_DEBUG
79d0: 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 65 = 0.!endif..!e
79e0: 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 ndif..##########
79f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a20: 23 23 23 23 23 23 23 23 23 23 0a 23 20 39 2e 20 ##########.# 9.
7a30: 50 61 72 73 65 20 74 68 65 20 43 48 45 43 4b 53 Parse the CHECKS
7a40: 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 macro to config
7a50: 75 72 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 ure additional c
7a60: 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 0a 23 ompiler checks.#
7a70: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d The following m
7a80: 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 79 acros are set by
7a90: 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 this section:.#
7aa0: 20 57 41 52 4e 49 4e 47 53 20 2d 20 63 6f 6d 70 WARNINGS - comp
7ab0: 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 74 68 iler switches th
7ac0: 61 74 20 63 6f 6e 74 72 6f 6c 20 74 68 65 20 77 at control the w
7ad0: 61 72 6e 69 6e 67 73 20 6c 65 76 65 6c 0a 23 20 arnings level.#
7ae0: 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 TCL_NO_DEPRECATE
7af0: 44 20 2d 20 31 20 2d 3e 20 64 69 73 61 62 6c 65 D - 1 -> disable
7b00: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 64 65 70 support for dep
7b10: 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e recated function
7b20: 73 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 s.#
7b30: 20 20 20 20 20 20 20 20 30 20 2d 3e 20 65 6e 61 0 -> ena
7b40: 62 6c 65 20 64 65 70 72 65 63 61 74 65 64 20 66 ble deprecated f
7b50: 75 6e 63 74 69 6f 6e 73 0a 0a 23 20 44 65 66 61 unctions..# Defa
7b60: 75 6c 74 73 20 2d 20 50 65 72 6d 69 74 20 64 65 ults - Permit de
7b70: 70 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f precated functio
7b80: 6e 73 20 61 6e 64 20 77 61 72 6e 69 6e 67 20 6c ns and warning l
7b90: 65 76 65 6c 20 33 0a 54 43 4c 5f 4e 4f 5f 44 45 evel 3.TCL_NO_DE
7ba0: 50 52 45 43 41 54 45 44 09 20 20 20 20 3d 20 30 PRECATED. = 0
7bb0: 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 3d .WARNINGS.. =
7bc0: 20 2d 57 33 0a 0a 21 69 66 20 22 24 28 43 48 45 -W3..!if "$(CHE
7bd0: 43 4b 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 CKS)" != "" && !
7be0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 [nmakehlp -f "$(
7bf0: 43 48 45 43 4b 53 29 22 20 22 6e 6f 6e 65 22 5d CHECKS)" "none"]
7c00: 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
7c10: 2d 66 20 24 28 43 48 45 43 4b 53 29 20 22 6e 6f -f $(CHECKS) "no
7c20: 64 65 70 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a dep"].!message *
7c30: 2a 2a 20 44 6f 69 6e 67 20 6e 6f 64 65 70 20 63 ** Doing nodep c
7c40: 68 65 63 6b 0a 54 43 4c 5f 4e 4f 5f 44 45 50 52 heck.TCL_NO_DEPR
7c50: 45 43 41 54 45 44 09 20 20 20 20 3d 20 31 0a 21 ECATED. = 1.!
7c60: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
7c70: 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b 53 ehlp -f $(CHECKS
7c80: 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0a 21 6d ) "fullwarn"].!m
7c90: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7ca0: 20 66 75 6c 6c 20 77 61 72 6e 69 6e 67 73 20 63 full warnings c
7cb0: 68 65 63 6b 0a 57 41 52 4e 49 4e 47 53 09 09 20 heck.WARNINGS..
7cc0: 20 20 20 3d 20 2d 57 34 0a 21 69 66 20 5b 6e 6d = -W4.!if [nm
7cd0: 61 6b 65 68 6c 70 20 2d 6c 20 2d 77 61 72 6e 3a akehlp -l -warn:
7ce0: 33 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 3 $(LINKER_TESTF
7cf0: 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 LAGS)].LINKERFLA
7d00: 47 53 09 09 20 20 20 20 3d 20 24 28 4c 49 4e 4b GS.. = $(LINK
7d10: 45 52 46 4c 41 47 53 29 20 2d 77 61 72 6e 3a 33 ERFLAGS) -warn:3
7d20: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
7d30: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7d40: 20 24 28 43 48 45 43 4b 53 29 20 22 36 34 62 69 $(CHECKS) "64bi
7d50: 74 22 5d 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 t"] && [nmakehlp
7d60: 20 2d 63 20 2d 57 70 36 34 5d 0a 21 6d 65 73 73 -c -Wp64].!mess
7d70: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 36 34 age *** Doing 64
7d80: 62 69 74 20 70 6f 72 74 61 62 69 6c 69 74 79 20 bit portability
7d90: 77 61 72 6e 69 6e 67 73 0a 57 41 52 4e 49 4e 47 warnings.WARNING
7da0: 53 09 09 20 20 20 20 3d 20 24 28 57 41 52 4e 49 S.. = $(WARNI
7db0: 4e 47 53 29 20 2d 57 70 36 34 0a 21 65 6e 64 69 NGS) -Wp64.!endi
7dc0: 66 0a 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 f..!endif...####
7dd0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7de0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7df0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7e00: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 ############.# 1
7e10: 30 2e 20 43 6f 6e 73 74 72 75 63 74 20 6f 75 74 0. Construct out
7e20: 70 75 74 20 64 69 72 65 63 74 6f 72 79 20 61 6e put directory an
7e30: 64 20 66 69 6c 65 20 70 61 74 68 73 0a 23 20 46 d file paths.# F
7e40: 69 67 75 72 65 2d 6f 75 74 20 68 6f 77 20 74 6f igure-out how to
7e50: 20 6e 61 6d 65 20 6f 75 72 20 69 6e 74 65 72 6d name our interm
7e60: 65 64 69 61 74 65 20 61 6e 64 20 6f 75 74 70 75 ediate and outpu
7e70: 74 20 64 69 72 65 63 74 6f 72 69 65 73 2e 0a 23 t directories..#
7e80: 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 61 76 6f In order to avo
7e90: 69 64 20 69 6e 61 64 76 65 72 74 65 6e 74 20 6d id inadvertent m
7ea0: 69 78 69 6e 67 20 6f 66 20 6f 62 6a 65 63 74 20 ixing of object
7eb0: 66 69 6c 65 73 20 62 75 69 6c 74 20 75 73 69 6e files built usin
7ec0: 67 0a 23 20 64 69 66 66 65 72 65 6e 74 20 63 6f g.# different co
7ed0: 6d 70 69 6c 65 72 73 2c 20 62 75 69 6c 64 20 63 mpilers, build c
7ee0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 73 20 65 74 onfigurations et
7ef0: 63 2e 2c 0a 23 0a 23 20 4e 61 6d 69 6e 67 20 63 c.,.#.# Naming c
7f00: 6f 6e 76 65 6e 74 69 6f 6e 20 28 73 75 66 66 69 onvention (suffi
7f10: 78 65 73 29 3a 0a 23 20 20 20 74 20 3d 20 66 75 xes):.# t = fu
7f20: 6c 6c 20 74 68 72 65 61 64 20 73 75 70 70 6f 72 ll thread suppor
7f30: 74 2e 20 28 4e 6f 74 20 75 73 65 64 20 66 6f 72 t. (Not used for
7f40: 20 54 63 6c 20 3e 3d 20 39 2e 30 29 0a 23 20 20 Tcl >= 9.0).#
7f50: 20 73 20 3d 20 73 74 61 74 69 63 20 6c 69 62 72 s = static libr
7f60: 61 72 79 20 28 61 73 20 6f 70 70 6f 73 65 64 20 ary (as opposed
7f70: 74 6f 20 61 6e 20 69 6d 70 6f 72 74 20 6c 69 62 to an import lib
7f80: 72 61 72 79 29 0a 23 20 20 20 67 20 3d 20 6c 69 rary).# g = li
7f90: 6e 6b 65 64 20 74 6f 20 74 68 65 20 64 65 62 75 nked to the debu
7fa0: 67 20 65 6e 61 62 6c 65 64 20 43 20 72 75 6e 2d g enabled C run-
7fb0: 74 69 6d 65 2e 0a 23 20 20 20 78 20 3d 20 73 70 time..# x = sp
7fc0: 65 63 69 61 6c 20 73 74 61 74 69 63 20 62 75 69 ecial static bui
7fd0: 6c 64 20 77 68 65 6e 20 69 74 20 6c 69 6e 6b 73 ld when it links
7fe0: 20 74 6f 20 74 68 65 20 64 79 6e 61 6d 69 63 20 to the dynamic
7ff0: 43 20 72 75 6e 2d 74 69 6d 65 2e 0a 23 0a 23 20 C run-time..#.#
8000: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
8010: 63 72 6f 73 20 61 72 65 20 73 65 74 20 69 6e 20 cros are set in
8020: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 this section:.#
8030: 53 55 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 SUFX - the suffi
8040: 78 20 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e x to use for bin
8050: 61 72 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 aries based on a
8060: 62 6f 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 bove naming conv
8070: 65 6e 74 69 6f 6e 0a 23 20 42 55 49 4c 44 44 49 ention.# BUILDDI
8080: 52 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c 65 RTOP - the tople
8090: 76 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 70 vel default outp
80a0: 75 74 20 64 69 72 65 63 74 6f 72 79 0a 23 20 20 ut directory.#
80b0: 20 20 20 20 69 73 20 6f 66 20 74 68 65 20 66 6f is of the fo
80c0: 72 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 62 75 rm {Release,Debu
80d0: 67 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f 4d 50 g}[_AMD64][_COMP
80e0: 49 4c 45 52 56 45 52 53 49 4f 4e 5d 0a 23 20 54 ILERVERSION].# T
80f0: 4d 50 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f MP_DIR - directo
8100: 72 79 20 77 68 65 72 65 20 6f 62 6a 65 63 74 20 ry where object
8110: 66 69 6c 65 73 20 61 72 65 20 63 72 65 61 74 65 files are create
8120: 64 0a 23 20 4f 55 54 5f 44 49 52 20 2d 20 64 69 d.# OUT_DIR - di
8130: 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 6f 75 rectory where ou
8140: 74 70 75 74 20 65 78 65 63 75 74 61 62 6c 65 73 tput executables
8150: 20 61 72 65 20 63 72 65 61 74 65 64 0a 23 20 42 are created.# B
8160: 6f 74 68 20 54 4d 50 5f 44 49 52 20 61 6e 64 20 oth TMP_DIR and
8170: 4f 55 54 5f 44 49 52 20 61 72 65 20 64 65 66 61 OUT_DIR are defa
8180: 75 6c 74 65 64 20 6f 6e 6c 79 20 69 66 20 6e 6f ulted only if no
8190: 74 20 64 65 66 69 6e 65 64 20 62 79 20 74 68 65 t defined by the
81a0: 0a 23 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 .# parent makefi
81b0: 6c 65 20 28 6f 72 20 63 6f 6d 6d 61 6e 64 20 6c le (or command l
81c0: 69 6e 65 29 2e 20 54 68 65 20 64 65 66 61 75 6c ine). The defaul
81d0: 74 20 76 61 6c 75 65 73 20 61 72 65 0a 23 20 62 t values are.# b
81e0: 61 73 65 64 20 6f 6e 20 42 55 49 4c 44 44 49 52 ased on BUILDDIR
81f0: 54 4f 50 2e 0a 23 20 53 54 55 42 50 52 45 46 49 TOP..# STUBPREFI
8200: 58 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 X - name of the
8210: 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f stubs library fo
8220: 72 20 74 68 69 73 20 70 72 6f 6a 65 63 74 0a 23 r this project.#
8230: 20 50 52 4a 49 4d 50 4c 49 42 20 2d 20 6f 75 74 PRJIMPLIB - out
8240: 70 75 74 20 70 61 74 68 20 6f 66 20 74 68 65 20 put path of the
8250: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
8260: 74 20 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 t import library
8270: 0a 23 20 50 52 4a 4c 49 42 4e 41 4d 45 20 2d 20 .# PRJLIBNAME -
8280: 6e 61 6d 65 20 6f 66 20 67 65 6e 65 72 61 74 65 name of generate
8290: 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 72 d project librar
82a0: 79 0a 23 20 50 52 4a 4c 49 42 20 20 20 20 20 2d y.# PRJLIB -
82b0: 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f 66 20 output path of
82c0: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
82d0: 74 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 t library.# PRJS
82e0: 54 55 42 4c 49 42 4e 41 4d 45 20 2d 20 6e 61 6d TUBLIBNAME - nam
82f0: 65 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 e of the generat
8300: 65 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 73 ed project stubs
8310: 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 54 library.# PRJST
8320: 55 42 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 UBLIB - output p
8330: 61 74 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 ath of the gener
8340: 61 74 65 64 20 70 72 6f 6a 65 63 74 20 73 74 75 ated project stu
8350: 62 73 20 6c 69 62 72 61 72 79 0a 23 20 52 45 53 bs library.# RES
8360: 46 49 4c 45 20 2d 20 6f 75 74 70 75 74 20 72 65 FILE - output re
8370: 73 6f 75 72 63 65 20 66 69 6c 65 20 28 6f 6e 6c source file (onl
8380: 79 20 69 66 20 6e 6f 74 20 73 74 61 74 69 63 20 y if not static
8390: 62 75 69 6c 64 29 0a 0a 53 55 46 58 09 20 20 20 build)..SUFX.
83a0: 20 3d 20 74 73 67 78 0a 0a 21 69 66 20 24 28 44 = tsgx..!if $(D
83b0: 45 42 55 47 29 0a 42 55 49 4c 44 44 49 52 54 4f EBUG).BUILDDIRTO
83c0: 50 20 3d 20 44 65 62 75 67 0a 21 65 6c 73 65 0a P = Debug.!else.
83d0: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 52 65 BUILDDIRTOP = Re
83e0: 6c 65 61 73 65 0a 21 65 6e 64 69 66 0a 0a 21 69 lease.!endif..!i
83f0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 f "$(MACHINE)" !
8400: 3d 20 22 49 58 38 36 22 0a 42 55 49 4c 44 44 49 = "IX86".BUILDDI
8410: 52 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 RTOP =$(BUILDDIR
8420: 54 4f 50 29 5f 24 28 4d 41 43 48 49 4e 45 29 0a TOP)_$(MACHINE).
8430: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 56 43 56 !endif.!if $(VCV
8440: 45 52 29 20 3e 20 36 0a 42 55 49 4c 44 44 49 52 ER) > 6.BUILDDIR
8450: 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 54 TOP =$(BUILDDIRT
8460: 4f 50 29 5f 56 43 24 28 56 43 56 45 52 29 0a 21 OP)_VC$(VCVER).!
8470: 65 6e 64 69 66 0a 0a 21 69 66 20 21 24 28 44 45 endif..!if !$(DE
8480: 42 55 47 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 BUG) || $(TCL_VE
8490: 52 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 RSION) > 86 || $
84a0: 28 44 45 42 55 47 29 20 26 26 20 24 28 55 4e 43 (DEBUG) && $(UNC
84b0: 48 45 43 4b 45 44 29 0a 53 55 46 58 09 20 20 20 HECKED).SUFX.
84c0: 20 3d 20 24 28 53 55 46 58 3a 67 3d 29 0a 21 65 = $(SUFX:g=).!e
84d0: 6e 64 69 66 0a 0a 54 4d 50 5f 44 49 52 46 55 4c ndif..TMP_DIRFUL
84e0: 4c 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49 52 L = .\$(BUILDDIR
84f0: 54 4f 50 29 5c 24 28 50 52 4f 4a 45 43 54 29 5f TOP)\$(PROJECT)_
8500: 54 68 72 65 61 64 65 64 44 79 6e 61 6d 69 63 53 ThreadedDynamicS
8510: 74 61 74 69 63 58 0a 0a 21 69 66 20 21 24 28 53 taticX..!if !$(S
8520: 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 54 4d 50 TATIC_BUILD).TMP
8530: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 _DIRFULL = $(TMP
8540: 5f 44 49 52 46 55 4c 4c 3a 53 74 61 74 69 63 3d _DIRFULL:Static=
8550: 29 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 ).SUFX. = $(S
8560: 55 46 58 3a 73 3d 29 0a 45 58 54 09 20 20 20 20 UFX:s=).EXT.
8570: 3d 20 64 6c 6c 0a 54 4d 50 5f 44 49 52 46 55 4c = dll.TMP_DIRFUL
8580: 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c L = $(TMP_DIRFUL
8590: 4c 3a 58 3d 29 0a 53 55 46 58 09 20 20 20 20 3d L:X=).SUFX. =
85a0: 20 24 28 53 55 46 58 3a 78 3d 29 0a 21 65 6c 73 $(SUFX:x=).!els
85b0: 65 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 e.TMP_DIRFULL =
85c0: 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 44 79 $(TMP_DIRFULL:Dy
85d0: 6e 61 6d 69 63 3d 29 0a 45 58 54 09 20 20 20 20 namic=).EXT.
85e0: 3d 20 6c 69 62 0a 21 69 66 20 24 28 4d 53 56 43 = lib.!if $(MSVC
85f0: 52 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 RT) && $(TCL_VER
8600: 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 21 24 SION) > 86 || !$
8610: 28 4d 53 56 43 52 54 29 20 26 26 20 24 28 54 43 (MSVCRT) && $(TC
8620: 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a L_VERSION) < 87.
8630: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 TMP_DIRFULL = $(
8640: 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a TMP_DIRFULL:X=).
8650: 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 SUFX. = $(SUF
8660: 58 3a 78 3d 29 0a 21 65 6e 64 69 66 0a 21 65 6e X:x=).!endif.!en
8670: 64 69 66 0a 0a 21 69 66 20 21 24 28 54 43 4c 5f dif..!if !$(TCL_
8680: 54 48 52 45 41 44 53 29 20 7c 7c 20 24 28 54 43 THREADS) || $(TC
8690: 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0a L_VERSION) > 86.
86a0: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 TMP_DIRFULL = $(
86b0: 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 54 68 72 65 TMP_DIRFULL:Thre
86c0: 61 64 65 64 3d 29 0a 53 55 46 58 09 20 20 20 20 aded=).SUFX.
86d0: 3d 20 24 28 53 55 46 58 3a 74 3d 29 0a 21 65 6e = $(SUFX:t=).!en
86e0: 64 69 66 0a 0a 21 69 66 6e 64 65 66 20 54 4d 50 dif..!ifndef TMP
86f0: 5f 44 49 52 0a 54 4d 50 5f 44 49 52 09 20 20 20 _DIR.TMP_DIR.
8700: 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c = $(TMP_DIRFULL
8710: 29 0a 21 69 66 6e 64 65 66 20 4f 55 54 5f 44 49 ).!ifndef OUT_DI
8720: 52 0a 4f 55 54 5f 44 49 52 09 20 20 20 20 3d 20 R.OUT_DIR. =
8730: 2e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 .\$(BUILDDIRTOP)
8740: 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 .!endif.!else.!i
8750: 66 6e 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 fndef OUT_DIR.OU
8760: 54 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d T_DIR. = $(TM
8770: 50 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 65 P_DIR).!endif.!e
8780: 6e 64 69 66 0a 0a 23 20 52 65 6c 61 74 69 76 65 ndif..# Relative
8790: 20 70 61 74 68 73 20 2d 3e 20 61 62 73 6f 6c 75 paths -> absolu
87a0: 74 65 0a 21 69 66 20 5b 65 63 68 6f 20 4f 55 54 te.!if [echo OUT
87b0: 5f 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 _DIR = \> nmakeh
87c0: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
87d0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 51 20 22 24 28 [nmakehlp -Q "$(
87e0: 4f 55 54 5f 44 49 52 29 22 20 3e 3e 20 6e 6d 61 OUT_DIR)" >> nma
87f0: 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f kehlp.out].!erro
8800: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
8810: 66 75 6c 6c 79 20 71 75 61 6c 69 66 79 20 70 61 fully qualify pa
8820: 74 68 20 4f 55 54 5f 44 49 52 3d 24 28 4f 55 54 th OUT_DIR=$(OUT
8830: 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 69 66 _DIR).!endif.!if
8840: 20 5b 65 63 68 6f 20 54 4d 50 5f 44 49 52 20 3d [echo TMP_DIR =
8850: 20 5c 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 \>> nmakehlp.ou
8860: 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b t] \. || [nmak
8870: 65 68 6c 70 20 2d 51 20 22 24 28 54 4d 50 5f 44 ehlp -Q "$(TMP_D
8880: 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 IR)" >> nmakehlp
8890: 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a .out].!error ***
88a0: 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 Could not fully
88b0: 20 71 75 61 6c 69 66 79 20 70 61 74 68 20 54 4d qualify path TM
88c0: 50 5f 44 49 52 3d 24 28 54 4d 50 5f 44 49 52 29 P_DIR=$(TMP_DIR)
88d0: 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 .!endif.!include
88e0: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 0a 23 nmakehlp.out..#
88f0: 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 The name of the
8900: 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 stubs library f
8910: 6f 72 20 74 68 65 20 70 72 6f 6a 65 63 74 20 62 or the project b
8920: 65 69 6e 67 20 62 75 69 6c 74 0a 53 54 55 42 50 eing built.STUBP
8930: 52 45 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 REFIX = $(P
8940: 52 4f 4a 45 43 54 29 73 74 75 62 0a 0a 23 0a 23 ROJECT)stub..#.#
8950: 20 53 65 74 20 75 70 20 70 61 74 68 73 20 74 6f Set up paths to
8960: 20 76 61 72 69 6f 75 73 20 54 63 6c 20 65 78 65 various Tcl exe
8970: 63 75 74 61 62 6c 65 73 20 61 6e 64 20 6c 69 62 cutables and lib
8980: 72 61 72 69 65 73 20 6e 65 65 64 65 64 20 62 79 raries needed by
8990: 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 0a 0a 23 extensions.#..#
89a0: 20 54 49 50 20 34 33 30 2e 20 55 6e 75 73 65 64 TIP 430. Unused
89b0: 20 66 6f 72 20 38 2e 36 20 62 75 74 20 6e 6f 20 for 8.6 but no
89c0: 68 61 72 6d 20 64 65 66 69 6e 69 6e 67 20 69 74 harm defining it
89d0: 20 74 6f 20 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d to allow a comm
89e0: 6f 6e 20 72 75 6c 65 73 2e 76 63 0a 54 43 4c 5f on rules.vc.TCL_
89f0: 5a 49 50 5f 46 49 4c 45 20 3d 20 6c 69 62 74 63 ZIP_FILE = libtc
8a00: 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 l$(TCL_MAJOR_VER
8a10: 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f SION).$(TCL_MINO
8a20: 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 43 4c 5f R_VERSION)$(TCL_
8a30: 50 41 54 43 48 5f 4c 45 54 54 45 52 29 24 28 54 PATCH_LETTER)$(T
8a40: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
8a50: 4c 29 2e 7a 69 70 0a 54 4b 5f 5a 49 50 5f 46 49 L).zip.TK_ZIP_FI
8a60: 4c 45 20 3d 20 6c 69 62 74 6b 24 28 54 4b 5f 4d LE = libtk$(TK_M
8a70: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 AJOR_VERSION).$(
8a80: 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e TK_MINOR_VERSION
8a90: 29 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 )$(TK_PATCH_LETT
8aa0: 45 52 29 24 28 54 4b 5f 52 45 4c 45 41 53 45 5f ER)$(TK_RELEASE_
8ab0: 53 45 52 49 41 4c 29 2e 7a 69 70 0a 0a 21 69 66 SERIAL).zip..!if
8ac0: 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 54 43 $(DOING_TCL).TC
8ad0: 4c 53 48 4e 41 4d 45 20 20 20 20 20 20 20 3d 20 LSHNAME =
8ae0: 24 28 50 52 4f 4a 45 43 54 29 73 68 24 28 56 45 $(PROJECT)sh$(VE
8af0: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 RSION)$(SUFX).ex
8b00: 65 0a 54 43 4c 53 48 09 09 3d 20 24 28 4f 55 54 e.TCLSH..= $(OUT
8b10: 5f 44 49 52 29 5c 24 28 54 43 4c 53 48 4e 41 4d _DIR)\$(TCLSHNAM
8b20: 45 29 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 E).TCLIMPLIB.= $
8b30: 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a (OUT_DIR)\$(PROJ
8b40: 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 ECT)$(VERSION)$(
8b50: 53 55 46 58 29 2e 6c 69 62 0a 54 43 4c 4c 49 42 SUFX).lib.TCLLIB
8b60: 4e 41 4d 45 09 3d 20 24 28 50 52 4f 4a 45 43 54 NAME.= $(PROJECT
8b70: 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 )$(VERSION)$(SUF
8b80: 58 29 2e 24 28 45 58 54 29 0a 54 43 4c 4c 49 42 X).$(EXT).TCLLIB
8b90: 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 ..= $(OUT_DIR)\$
8ba0: 28 54 43 4c 4c 49 42 4e 41 4d 45 29 0a 54 43 4c (TCLLIBNAME).TCL
8bb0: 53 43 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 SCRIPTZIP = $
8bc0: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 5f (OUT_DIR)\$(TCL_
8bd0: 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 69 66 20 24 ZIP_FILE)..!if $
8be0: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
8bf0: 4f 4e 29 20 3d 3d 20 38 0a 54 43 4c 53 54 55 42 ON) == 8.TCLSTUB
8c00: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 LIBNAME.= $(STUB
8c10: 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e PREFIX)$(VERSION
8c20: 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 ).lib.!else.TCLS
8c30: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 TUBLIBNAME.= $(S
8c40: 54 55 42 50 52 45 46 49 58 29 2e 6c 69 62 0a 21 TUBPREFIX).lib.!
8c50: 65 6e 64 69 66 0a 54 43 4c 53 54 55 42 4c 49 42 endif.TCLSTUBLIB
8c60: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
8c70: 54 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a TCLSTUBLIBNAME).
8c80: 54 43 4c 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 TCL_INCLUDES
8c90: 3d 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 = -I"$(WIN_DIR)"
8ca0: 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 -I"$(GENERICDIR
8cb0: 29 22 0a 0a 21 65 6c 73 65 20 23 20 21 24 28 44 )"..!else # !$(D
8cc0: 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 69 66 20 24 OING_TCL)..!if $
8cd0: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 (TCLINSTALL) # B
8ce0: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
8cf0: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
8d00: 0a 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e ..# When buildin
8d10: 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 77 65 g extensions, we
8d20: 20 6e 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 need to locate
8d30: 74 63 6c 73 68 2e 20 44 65 70 65 6e 64 69 6e 67 tclsh. Depending
8d40: 20 6f 6e 20 76 65 72 73 69 6f 6e 0a 23 20 6f 66 on version.# of
8d50: 20 54 63 6c 20 77 65 20 61 72 65 20 62 75 69 6c Tcl we are buil
8d60: 64 69 6e 67 20 61 67 61 69 6e 73 74 2c 20 74 68 ding against, th
8d70: 69 73 20 6d 61 79 20 6f 72 20 6d 61 79 20 6e 6f is may or may no
8d80: 74 20 68 61 76 65 20 61 20 22 74 22 20 73 75 66 t have a "t" suf
8d90: 66 69 78 2e 0a 23 20 54 72 79 20 76 61 72 69 6f fix..# Try vario
8da0: 75 73 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 us possibilities
8db0: 20 69 6e 20 74 75 72 6e 2e 0a 54 43 4c 53 48 09 in turn..TCLSH.
8dc0: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 .= $(_TCLDIR)\bi
8dd0: 6e 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 n\tclsh$(TCL_VER
8de0: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
8df0: 65 78 65 0a 21 69 66 20 21 65 78 69 73 74 28 22 exe.!if !exist("
8e00: 24 28 54 43 4c 53 48 29 22 29 0a 54 43 4c 53 48 $(TCLSH)").TCLSH
8e10: 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f = $(_
8e20: 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c 73 TCLDIR)\bin\tcls
8e30: 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 h$(TCL_VERSION)t
8e40: 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 $(SUFX:t=).exe.!
8e50: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c endif..!if $(TCL
8e60: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
8e70: 3d 3d 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 09 == 8.TCLSTUBLIB.
8e80: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 = $(_TCLDIR)\lib
8e90: 5c 74 63 6c 73 74 75 62 24 28 54 43 4c 5f 56 45 \tclstub$(TCL_VE
8ea0: 52 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 RSION).lib.!else
8eb0: 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 .TCLSTUBLIB.= $(
8ec0: 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c _TCLDIR)\lib\tcl
8ed0: 73 74 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a stub.lib.!endif.
8ee0: 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 TCLIMPLIB.= $(_T
8ef0: 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 CLDIR)\lib\tcl$(
8f00: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 TCL_VERSION)$(SU
8f10: 46 58 3a 74 3d 29 2e 6c 69 62 0a 23 20 57 68 65 FX:t=).lib.# Whe
8f20: 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e n building exten
8f30: 73 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 sions, may be li
8f40: 6e 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 nking against Tc
8f50: 6c 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 l that does not
8f60: 61 64 64 0a 23 20 22 74 22 20 73 75 66 66 69 78 add.# "t" suffix
8f70: 20 28 65 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 (e.g. 8.6). If
8f80: 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 lib not found ch
8f90: 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 eck for that pos
8fa0: 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 sibility..!if !e
8fb0: 78 69 73 74 28 22 24 28 54 43 4c 49 4d 50 4c 49 xist("$(TCLIMPLI
8fc0: 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 42 09 3d B)").TCLIMPLIB.=
8fd0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
8fe0: 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e tcl$(TCL_VERSION
8ff0: 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 )t$(SUFX:t=).lib
9000: 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 42 52 .!endif.TCL_LIBR
9010: 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 ARY.= $(_TCLDIR)
9020: 5c 6c 69 62 0a 54 43 4c 52 45 47 4c 49 42 09 3d \lib.TCLREGLIB.=
9030: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
9040: 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 3a 74 tclreg13$(SUFX:t
9050: 3d 29 2e 6c 69 62 0a 54 43 4c 44 44 45 4c 49 42 =).lib.TCLDDELIB
9060: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 .= $(_TCLDIR)\li
9070: 62 5c 74 63 6c 64 64 65 31 34 24 28 53 55 46 58 b\tcldde14$(SUFX
9080: 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 43 52 49 :t=).lib.TCLSCRI
9090: 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 49 PTZIP.= $(_TCLDI
90a0: 52 29 5c 6c 69 62 5c 24 28 54 43 4c 5f 5a 49 50 R)\lib\$(TCL_ZIP
90b0: 5f 46 49 4c 45 29 0a 54 43 4c 54 4f 4f 4c 53 44 _FILE).TCLTOOLSD
90c0: 49 52 09 3d 20 5c 6d 75 73 74 5c 68 61 76 65 5c IR.= \must\have\
90d0: 74 63 6c 5c 73 6f 75 72 63 65 73 5c 74 6f 5c 62 tcl\sources\to\b
90e0: 75 69 6c 64 5c 74 68 69 73 5c 74 61 72 67 65 74 uild\this\target
90f0: 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 53 20 20 20 .TCL_INCLUDES
9100: 20 3d 20 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 = -I"$(_TCLDIR)
9110: 5c 69 6e 63 6c 75 64 65 22 0a 0a 21 65 6c 73 65 \include"..!else
9120: 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 # Building agai
9130: 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 73 0a nst Tcl sources.
9140: 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 4c .TCLSH..= $(_TCL
9150: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
9160: 44 49 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 54 DIRTOP)\tclsh$(T
9170: 43 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 CL_VERSION)$(SUF
9180: 58 3a 74 3d 29 2e 65 78 65 0a 21 69 66 20 21 65 X:t=).exe.!if !e
9190: 78 69 73 74 28 24 28 54 43 4c 53 48 29 29 0a 54 xist($(TCLSH)).T
91a0: 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 4c 44 49 CLSH..= $(_TCLDI
91b0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
91c0: 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 54 43 4c RTOP)\tclsh$(TCL
91d0: 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 _VERSION)t$(SUFX
91e0: 3a 74 3d 29 2e 65 78 65 0a 21 65 6e 64 69 66 0a :t=).exe.!endif.
91f0: 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f !if $(TCL_MAJOR_
9200: 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 43 VERSION) == 8.TC
9210: 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 LSTUBLIB.= $(_TC
9220: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
9230: 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 DDIRTOP)\tclstub
9240: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c $(TCL_VERSION).l
9250: 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 54 55 42 ib.!else.TCLSTUB
9260: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
9270: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
9280: 4f 50 29 5c 74 63 6c 73 74 75 62 2e 6c 69 62 0a OP)\tclstub.lib.
9290: 21 65 6e 64 69 66 0a 54 43 4c 49 4d 50 4c 49 42 !endif.TCLIMPLIB
92a0: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 .= $(_TCLDIR)\wi
92b0: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
92c0: 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f \tcl$(TCL_VERSIO
92d0: 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 N)$(SUFX:t=).lib
92e0: 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 .# When building
92f0: 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 79 extensions, may
9300: 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 69 be linking agai
9310: 6e 73 74 20 54 63 6c 20 74 68 61 74 20 64 6f 65 nst Tcl that doe
9320: 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 22 20 s not add.# "t"
9330: 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 36 suffix (e.g. 8.6
9340: 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f ). If lib not fo
9350: 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74 68 und check for th
9360: 61 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a at possibility..
9370: 21 69 66 20 21 65 78 69 73 74 28 22 24 28 54 43 !if !exist("$(TC
9380: 4c 49 4d 50 4c 49 42 29 22 29 0a 54 43 4c 49 4d LIMPLIB)").TCLIM
9390: 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 PLIB.= $(_TCLDIR
93a0: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
93b0: 54 4f 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 TOP)\tcl$(TCL_VE
93c0: 52 53 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d RSION)t$(SUFX:t=
93d0: 29 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c ).lib.!endif.TCL
93e0: 5f 4c 49 42 52 41 52 59 09 3d 20 24 28 5f 54 43 _LIBRARY.= $(_TC
93f0: 4c 44 49 52 29 5c 6c 69 62 72 61 72 79 0a 54 43 LDIR)\library.TC
9400: 4c 52 45 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c LREGLIB.= $(_TCL
9410: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
9420: 44 49 52 54 4f 50 29 5c 74 63 6c 72 65 67 31 33 DIRTOP)\tclreg13
9430: 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 $(SUFX:t=).lib.T
9440: 43 4c 44 44 45 4c 49 42 09 3d 20 24 28 5f 54 43 CLDDELIB.= $(_TC
9450: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
9460: 44 44 49 52 54 4f 50 29 5c 74 63 6c 64 64 65 31 DDIRTOP)\tcldde1
9470: 34 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 4$(SUFX:t=).lib.
9480: 54 43 4c 53 43 52 49 50 54 5a 49 50 09 3d 20 24 TCLSCRIPTZIP.= $
9490: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 (_TCLDIR)\win\$(
94a0: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 BUILDDIRTOP)\$(T
94b0: 43 4c 5f 5a 49 50 5f 46 49 4c 45 29 0a 54 43 4c CL_ZIP_FILE).TCL
94c0: 54 4f 4f 4c 53 44 49 52 09 3d 20 24 28 5f 54 43 TOOLSDIR.= $(_TC
94d0: 4c 44 49 52 29 5c 74 6f 6f 6c 73 0a 54 43 4c 5f LDIR)\tools.TCL_
94e0: 49 4e 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 28 INCLUDES.= -I"$(
94f0: 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 _TCLDIR)\generic
9500: 22 20 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c " -I"$(_TCLDIR)\
9510: 77 69 6e 22 0a 0a 21 65 6e 64 69 66 20 23 20 54 win"..!endif # T
9520: 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 21 CLINSTALL..!if !
9530: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 $(STATIC_BUILD)
9540: 26 26 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f && "$(TCL_BUILD_
9550: 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a 74 63 6c FOR)" == "8".tcl
9560: 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 libs = "$(TCLSTU
9570: 42 4c 49 42 29 22 0a 21 65 6c 73 65 0a 74 63 6c BLIB)".!else.tcl
9580: 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 libs = "$(TCLSTU
9590: 42 4c 49 42 29 22 20 22 24 28 54 43 4c 49 4d 50 BLIB)" "$(TCLIMP
95a0: 4c 49 42 29 22 0a 21 65 6e 64 69 66 0a 0a 21 65 LIB)".!endif..!e
95b0: 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 ndif # $(DOING_T
95c0: 43 4c 29 0a 0a 23 20 57 65 20 6e 65 65 64 20 61 CL)..# We need a
95d0: 20 74 63 6c 73 68 20 74 68 61 74 20 77 69 6c 6c tclsh that will
95e0: 20 72 75 6e 20 6f 6e 20 74 68 65 20 68 6f 73 74 run on the host
95f0: 20 6d 61 63 68 69 6e 65 20 61 73 20 70 61 72 74 machine as part
9600: 20 6f 66 20 74 68 65 20 62 75 69 6c 64 2e 0a 23 of the build..#
9610: 20 49 58 38 36 20 72 75 6e 73 20 6f 6e 20 61 6c IX86 runs on al
9620: 6c 20 61 72 63 68 69 74 65 63 74 75 72 65 73 2e l architectures.
9630: 0a 21 69 66 6e 64 65 66 20 54 43 4c 53 48 5f 4e .!ifndef TCLSH_N
9640: 41 54 49 56 45 0a 21 69 66 20 22 24 28 4d 41 43 ATIVE.!if "$(MAC
9650: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 HINE)" == "IX86"
9660: 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 || "$(MACHINE)"
9670: 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 == "$(NATIVE_AR
9680: 43 48 29 22 0a 54 43 4c 53 48 5f 4e 41 54 49 56 CH)".TCLSH_NATIV
9690: 45 09 3d 20 24 28 54 43 4c 53 48 29 0a 21 65 6c E.= $(TCLSH).!el
96a0: 73 65 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 se.!error You mu
96b0: 73 74 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 st explicitly se
96c0: 74 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 t TCLSH_NATIVE f
96d0: 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 or cross-compila
96e0: 74 69 6f 6e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 tion.!endif.!end
96f0: 69 66 0a 0a 23 20 44 6f 20 74 68 65 20 73 61 6d if..# Do the sam
9700: 65 20 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20 e for Tk and Tk
9710: 65 78 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 20 extensions that
9720: 72 65 71 75 69 72 65 20 74 68 65 20 54 6b 20 6c require the Tk l
9730: 69 62 72 61 72 69 65 73 0a 21 69 66 20 24 28 44 ibraries.!if $(D
9740: 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45 OING_TK) || $(NE
9750: 45 44 5f 54 4b 29 0a 57 49 53 48 4e 41 4d 45 50 ED_TK).WISHNAMEP
9760: 52 45 46 49 58 20 3d 20 77 69 73 68 0a 57 49 53 REFIX = wish.WIS
9770: 48 4e 41 4d 45 20 3d 20 24 28 57 49 53 48 4e 41 HNAME = $(WISHNA
9780: 4d 45 50 52 45 46 49 58 29 24 28 54 4b 5f 56 45 MEPREFIX)$(TK_VE
9790: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 RSION)$(SUFX).ex
97a0: 65 0a 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 74 e.TKLIBNAME8.= t
97b0: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
97c0: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 4c SUFX).$(EXT).TKL
97d0: 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c 39 74 6b IBNAME9.= tcl9tk
97e0: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
97f0: 55 46 58 29 2e 24 28 45 58 54 29 0a 21 69 66 20 UFX).$(EXT).!if
9800: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
9810: 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 ION) == 8 || "$(
9820: 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 TCL_BUILD_FOR)"
9830: 3d 3d 20 22 38 22 0a 54 4b 4c 49 42 4e 41 4d 45 == "8".TKLIBNAME
9840: 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f .= tk$(TK_VERSIO
9850: 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 N)$(SUFX).$(EXT)
9860: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 .TKIMPLIBNAME.=
9870: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9880: 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6c 73 65 (SUFX).lib.!else
9890: 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c .TKLIBNAME.= tcl
98a0: 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 9tk$(TK_VERSION)
98b0: 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 $(SUFX).$(EXT).T
98c0: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 KIMPLIBNAME.= tc
98d0: 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e l9tk$(TK_VERSION
98e0: 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6e )$(SUFX).lib.!en
98f0: 64 69 66 0a 21 69 66 20 24 28 54 4b 5f 4d 41 4a dif.!if $(TK_MAJ
9900: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 OR_VERSION) == 8
9910: 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d .TKSTUBLIBNAME.=
9920: 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 53 tkstub$(TK_VERS
9930: 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 ION).lib.!else.T
9940: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 KSTUBLIBNAME.= t
9950: 6b 73 74 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 kstub.lib.!endif
9960: 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b ..!if $(DOING_TK
9970: 29 0a 57 49 53 48 09 09 3d 20 24 28 4f 55 54 5f ).WISH..= $(OUT_
9980: 44 49 52 29 5c 24 28 57 49 53 48 4e 41 4d 45 29 DIR)\$(WISHNAME)
9990: 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 4f .TKSTUBLIB.= $(O
99a0: 55 54 5f 44 49 52 29 5c 24 28 54 4b 53 54 55 42 UT_DIR)\$(TKSTUB
99b0: 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 LIBNAME).TKIMPLI
99c0: 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 B.= $(OUT_DIR)\$
99d0: 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 54 (TKIMPLIBNAME).T
99e0: 4b 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 KLIB..= $(OUT_DI
99f0: 52 29 5c 24 28 54 4b 4c 49 42 4e 41 4d 45 29 0a R)\$(TKLIBNAME).
9a00: 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 TK_INCLUDES
9a10: 3d 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 = -I"$(WIN_DIR)"
9a20: 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 -I"$(GENERICDIR
9a30: 29 22 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 )".TKSCRIPTZIP
9a40: 20 20 20 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c = $(OUT_DIR)\
9a50: 24 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0a 0a $(TK_ZIP_FILE)..
9a60: 21 65 6c 73 65 20 23 20 65 66 66 65 63 74 69 76 !else # effectiv
9a70: 65 6c 79 20 4e 45 45 44 5f 54 4b 0a 0a 21 69 66 ely NEED_TK..!if
9a80: 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 $(TKINSTALL) #
9a90: 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 Building against
9aa0: 20 69 6e 73 74 61 6c 6c 65 64 20 54 6b 0a 57 49 installed Tk.WI
9ab0: 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c SH..= $(_TKDIR)\
9ac0: 62 69 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a bin\$(WISHNAME).
9ad0: 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 TKSTUBLIB.= $(_T
9ae0: 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 54 KDIR)\lib\$(TKST
9af0: 55 42 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 UBLIBNAME).TKIMP
9b00: 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c LIB.= $(_TKDIR)\
9b10: 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 lib\$(TKIMPLIBNA
9b20: 4d 45 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 ME).# When build
9b30: 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 ing extensions,
9b40: 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 may be linking a
9b50: 67 61 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 gainst Tk that d
9b60: 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 oes not add.# "t
9b70: 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 " suffix (e.g. 8
9b80: 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 .6). If lib not
9b90: 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 found check for
9ba0: 74 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 79 that possibility
9bb0: 2e 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 28 ..!if !exist("$(
9bc0: 54 4b 49 4d 50 4c 49 42 29 22 29 0a 54 4b 49 4d TKIMPLIB)").TKIM
9bd0: 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 PLIBNAME.= tk$(T
9be0: 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 K_VERSION)$(SUFX
9bf0: 3a 74 3d 29 2e 6c 69 62 0a 54 4b 49 4d 50 4c 49 :t=).lib.TKIMPLI
9c00: 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 B.= $(_TKDIR)\li
9c10: 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 b\$(TKIMPLIBNAME
9c20: 29 0a 21 65 6e 64 69 66 0a 54 4b 5f 49 4e 43 4c ).!endif.TK_INCL
9c30: 55 44 45 53 20 20 20 20 20 3d 20 2d 49 22 24 28 UDES = -I"$(
9c40: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 _TKDIR)\include"
9c50: 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 .TKSCRIPTZIP
9c60: 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 = $(_TKDIR)\lib
9c70: 5c 24 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0a \$(TK_ZIP_FILE).
9c80: 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e .!else # Buildin
9c90: 67 20 61 67 61 69 6e 73 74 20 54 6b 20 73 6f 75 g against Tk sou
9ca0: 72 63 65 73 0a 0a 57 49 53 48 09 09 3d 20 24 28 rces..WISH..= $(
9cb0: 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 _TKDIR)\win\$(BU
9cc0: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 57 49 53 ILDDIRTOP)\$(WIS
9cd0: 48 4e 41 4d 45 29 0a 54 4b 53 54 55 42 4c 49 42 HNAME).TKSTUBLIB
9ce0: 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e .= $(_TKDIR)\win
9cf0: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
9d00: 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 $(TKSTUBLIBNAME)
9d10: 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 .TKIMPLIB.= $(_T
9d20: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
9d30: 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 DDIRTOP)\$(TKIMP
9d40: 4c 49 42 4e 41 4d 45 29 0a 23 20 57 68 65 6e 20 LIBNAME).# When
9d50: 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 building extensi
9d60: 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b ons, may be link
9d70: 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 74 ing against Tk t
9d80: 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 hat does not add
9d90: 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 65 .# "t" suffix (e
9da0: 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 .g. 8.6). If lib
9db0: 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b not found check
9dc0: 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 for that possib
9dd0: 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 69 73 ility..!if !exis
9de0: 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 t("$(TKIMPLIB)")
9df0: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 .TKIMPLIBNAME.=
9e00: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9e10: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b (SUFX:t=).lib.TK
9e20: 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 IMPLIB.= $(_TKDI
9e30: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
9e40: 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49 42 RTOP)\$(TKIMPLIB
9e50: 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a 54 4b 5f NAME).!endif.TK_
9e60: 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 2d INCLUDES = -
9e70: 49 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 I"$(_TKDIR)\gene
9e80: 72 69 63 22 20 2d 49 22 24 28 5f 54 4b 44 49 52 ric" -I"$(_TKDIR
9e90: 29 5c 77 69 6e 22 20 2d 49 22 24 28 5f 54 4b 44 )\win" -I"$(_TKD
9ea0: 49 52 29 5c 78 6c 69 62 22 0a 54 4b 53 43 52 49 IR)\xlib".TKSCRI
9eb0: 50 54 5a 49 50 20 20 20 20 20 3d 20 24 28 5f 54 PTZIP = $(_T
9ec0: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
9ed0: 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 5f 5a 49 DDIRTOP)\$(TK_ZI
9ee0: 50 5f 46 49 4c 45 29 0a 0a 21 65 6e 64 69 66 20 P_FILE)..!endif
9ef0: 23 20 54 4b 49 4e 53 54 41 4c 4c 0a 0a 74 6b 6c # TKINSTALL..tkl
9f00: 69 62 73 20 3d 20 22 24 28 54 4b 53 54 55 42 4c ibs = "$(TKSTUBL
9f10: 49 42 29 22 20 22 24 28 54 4b 49 4d 50 4c 49 42 IB)" "$(TKIMPLIB
9f20: 29 22 0a 0a 21 65 6e 64 69 66 20 23 20 24 28 44 )"..!endif # $(D
9f30: 4f 49 4e 47 5f 54 4b 29 0a 21 65 6e 64 69 66 20 OING_TK).!endif
9f40: 23 20 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c # $(DOING_TK) ||
9f50: 20 24 28 4e 45 45 44 5f 54 4b 29 0a 0a 23 20 56 $(NEED_TK)..# V
9f60: 61 72 69 6f 75 73 20 6f 75 74 70 75 74 20 70 61 arious output pa
9f70: 74 68 73 0a 50 52 4a 49 4d 50 4c 49 42 09 3d 20 ths.PRJIMPLIB.=
9f80: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4f $(OUT_DIR)\$(PRO
9f90: 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 JECT)$(VERSION)$
9fa0: 28 53 55 46 58 29 2e 6c 69 62 0a 23 20 45 76 65 (SUFX).lib.# Eve
9fb0: 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 n when building
9fc0: 61 67 61 69 6e 73 74 20 54 63 6c 20 39 2c 20 50 against Tcl 9, P
9fd0: 52 4a 4c 49 42 4e 41 4d 45 38 20 6d 75 73 74 20 RJLIBNAME8 must
9fe0: 68 61 76 65 20 22 74 22 0a 50 52 4a 4c 49 42 4e have "t".PRJLIBN
9ff0: 41 4d 45 38 09 3d 20 24 28 50 52 4f 4a 45 43 54 AME8.= $(PROJECT
a000: 29 24 28 56 45 52 53 49 4f 4e 29 74 24 28 53 55 )$(VERSION)t$(SU
a010: 46 58 3a 74 3d 29 2e 24 28 45 58 54 29 0a 23 20 FX:t=).$(EXT).#
a020: 45 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 Even when buildi
a030: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 38 ng against Tcl 8
a040: 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 39 20 6d 75 , PRJLIBNAME9 mu
a050: 73 74 20 6e 6f 74 20 68 61 76 65 20 22 74 22 0a st not have "t".
a060: 50 52 4a 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 PRJLIBNAME9.= tc
a070: 6c 39 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 l9$(PROJECT)$(VE
a080: 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 RSION)$(SUFX:t=)
a090: 2e 24 28 45 58 54 29 0a 21 69 66 20 24 28 54 43 .$(EXT).!if $(TC
a0a0: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
a0b0: 20 3d 3d 20 38 20 7c 7c 20 22 24 28 54 43 4c 5f == 8 || "$(TCL_
a0c0: 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 BUILD_FOR)" == "
a0d0: 38 22 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 8".PRJLIBNAME.=
a0e0: 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 21 $(PRJLIBNAME8).!
a0f0: 65 6c 73 65 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 else.PRJLIBNAME.
a100: 3d 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 = $(PRJLIBNAME9)
a110: 0a 21 65 6e 64 69 66 0a 50 52 4a 4c 49 42 09 09 .!endif.PRJLIB..
a120: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 = $(OUT_DIR)\$(P
a130: 52 4a 4c 49 42 4e 41 4d 45 29 0a 0a 21 69 66 20 RJLIBNAME)..!if
a140: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
a150: 49 4f 4e 29 20 3d 3d 20 38 0a 50 52 4a 53 54 55 ION) == 8.PRJSTU
a160: 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 BLIBNAME.= $(STU
a170: 42 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f BPREFIX)$(VERSIO
a180: 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 50 52 4a N).lib.!else.PRJ
a190: 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 STUBLIBNAME.= $(
a1a0: 53 54 55 42 50 52 45 46 49 58 29 2e 6c 69 62 0a STUBPREFIX).lib.
a1b0: 21 65 6e 64 69 66 0a 50 52 4a 53 54 55 42 4c 49 !endif.PRJSTUBLI
a1c0: 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 B.= $(OUT_DIR)\$
a1d0: 28 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 29 (PRJSTUBLIBNAME)
a1e0: 0a 0a 23 20 49 66 20 65 78 74 65 6e 73 69 6f 6e ..# If extension
a1f0: 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 parent makefile
a200: 20 68 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 has not defined
a210: 20 61 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 a resource defi
a220: 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 nition file,.# w
a230: 65 20 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 e will generate
a240: 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 one from standar
a250: 64 20 74 65 6d 70 6c 61 74 65 2e 0a 21 69 66 20 d template..!if
a260: 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 !$(DOING_TCL) &&
a270: 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26 !$(DOING_TK) &&
a280: 20 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 !$(STATIC_BUILD
a290: 29 0a 21 69 66 64 65 66 20 52 43 46 49 4c 45 0a ).!ifdef RCFILE.
a2a0: 52 45 53 46 49 4c 45 20 3d 20 24 28 54 4d 50 5f RESFILE = $(TMP_
a2b0: 44 49 52 29 5c 24 28 52 43 46 49 4c 45 3a 2e 72 DIR)\$(RCFILE:.r
a2c0: 63 3d 2e 72 65 73 29 0a 21 65 6c 73 65 0a 52 45 c=.res).!else.RE
a2d0: 53 46 49 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 SFILE = $(TMP_DI
a2e0: 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 R)\$(PROJECT).re
a2f0: 73 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a s.!endif.!endif.
a300: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
a310: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a320: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a330: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a340: 23 23 23 23 0a 23 20 31 31 2e 20 43 6f 6e 73 74 ####.# 11. Const
a350: 72 75 63 74 20 74 68 65 20 70 61 74 68 73 20 66 ruct the paths f
a360: 6f 72 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 or the installat
a370: 69 6f 6e 20 64 69 72 65 63 74 6f 72 69 65 73 0a ion directories.
a380: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
a390: 6d 61 63 72 6f 73 20 67 65 74 20 64 65 66 69 6e macros get defin
a3a0: 65 64 20 69 6e 20 74 68 69 73 20 73 65 63 74 69 ed in this secti
a3b0: 6f 6e 3a 0a 23 20 4c 49 42 5f 49 4e 53 54 41 4c on:.# LIB_INSTAL
a3c0: 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 6c 69 L_DIR - where li
a3d0: 62 72 61 72 69 65 73 20 73 68 6f 75 6c 64 20 62 braries should b
a3e0: 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 42 49 e installed.# BI
a3f0: 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 N_INSTALL_DIR -
a400: 77 68 65 72 65 20 74 68 65 20 65 78 65 63 75 74 where the execut
a410: 61 62 6c 65 73 20 73 68 6f 75 6c 64 20 62 65 20 ables should be
a420: 69 6e 73 74 61 6c 6c 65 64 0a 23 20 44 4f 43 5f installed.# DOC_
a430: 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 INSTALL_DIR - wh
a440: 65 72 65 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f ere documentatio
a450: 6e 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 n should be inst
a460: 61 6c 6c 65 64 0a 23 20 53 43 52 49 50 54 5f 49 alled.# SCRIPT_I
a470: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
a480: 72 65 20 73 63 72 69 70 74 73 20 73 68 6f 75 6c re scripts shoul
a490: 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 d be installed.#
a4a0: 20 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c INCLUDE_INSTALL
a4b0: 5f 44 49 52 20 2d 20 77 68 65 72 65 20 43 20 69 _DIR - where C i
a4c0: 6e 63 6c 75 64 65 20 66 69 6c 65 73 20 73 68 6f nclude files sho
a4d0: 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 uld be installed
a4e0: 0a 23 20 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f .# DEMO_INSTALL_
a4f0: 44 49 52 20 2d 20 77 68 65 72 65 20 64 65 6d 6f DIR - where demo
a500: 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 s should be inst
a510: 61 6c 6c 65 64 0a 23 20 50 52 4a 5f 49 4e 53 54 alled.# PRJ_INST
a520: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a530: 70 61 63 6b 61 67 65 20 77 69 6c 6c 20 62 65 20 package will be
a540: 69 6e 73 74 61 6c 6c 65 64 20 28 6e 6f 74 20 73 installed (not s
a550: 65 74 20 66 6f 72 20 54 63 6c 20 61 6e 64 20 54 et for Tcl and T
a560: 6b 29 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f k)..!if $(DOING_
a570: 54 43 4c 29 20 7c 7c 20 24 28 44 4f 49 4e 47 5f TCL) || $(DOING_
a580: 54 4b 29 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f TK).LIB_INSTALL_
a590: 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c DIR..= $(_INSTAL
a5a0: 4c 44 49 52 29 5c 6c 69 62 0a 42 49 4e 5f 49 4e LDIR)\lib.BIN_IN
a5b0: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f STALL_DIR..= $(_
a5c0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 62 69 6e 0a INSTALLDIR)\bin.
a5d0: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 DOC_INSTALL_DIR.
a5e0: 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 .= $(_INSTALLDIR
a5f0: 29 5c 64 6f 63 0a 21 69 66 20 24 28 44 4f 49 4e )\doc.!if $(DOIN
a600: 47 5f 54 43 4c 29 0a 53 43 52 49 50 54 5f 49 4e G_TCL).SCRIPT_IN
a610: 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 STALL_DIR.= $(_I
a620: 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 NSTALLDIR)\lib\$
a630: 28 50 52 4f 4a 45 43 54 29 24 28 54 43 4c 5f 4d (PROJECT)$(TCL_M
a640: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 AJOR_VERSION).$(
a650: 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f TCL_MINOR_VERSIO
a660: 4e 29 0a 4d 4f 44 55 4c 45 5f 49 4e 53 54 41 4c N).MODULE_INSTAL
a670: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 L_DIR.= $(_INSTA
a680: 4c 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 LLDIR)\lib\tcl$(
a690: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
a6a0: 4e 29 0a 21 65 6c 73 65 20 23 20 44 4f 49 4e 47 N).!else # DOING
a6b0: 5f 54 4b 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 _TK.SCRIPT_INSTA
a6c0: 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 LL_DIR.= $(_INST
a6d0: 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 ALLDIR)\lib\$(PR
a6e0: 4f 4a 45 43 54 29 24 28 54 4b 5f 4d 41 4a 4f 52 OJECT)$(TK_MAJOR
a6f0: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d _VERSION).$(TK_M
a700: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 21 65 INOR_VERSION).!e
a710: 6e 64 69 66 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c ndif.DEMO_INSTAL
a720: 4c 5f 44 49 52 09 3d 20 24 28 53 43 52 49 50 54 L_DIR.= $(SCRIPT
a730: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 64 65 _INSTALL_DIR)\de
a740: 6d 6f 73 0a 49 4e 43 4c 55 44 45 5f 49 4e 53 54 mos.INCLUDE_INST
a750: 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 ALL_DIR.= $(_INS
a760: 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 TALLDIR)\include
a770: 0a 0a 21 65 6c 73 65 20 23 20 65 78 74 65 6e 73 ..!else # extens
a780: 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 ion other than T
a790: 6b 0a 0a 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 k..PRJ_INSTALL_D
a7a0: 49 52 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f IR = $(_
a7b0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 24 28 50 52 INSTALLDIR)\$(PR
a7c0: 4f 4a 45 43 54 29 24 28 44 4f 54 56 45 52 53 49 OJECT)$(DOTVERSI
a7d0: 4f 4e 29 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 ON).!if $(MULTIP
a7e0: 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 LATFORM_INSTALL)
a7f0: 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 .LIB_INSTALL_DIR
a800: 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c ..= $(PRJ_INSTAL
a810: 4c 5f 44 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 L_DIR)\$(PLATFOR
a820: 4d 5f 49 44 45 4e 54 49 46 59 29 0a 42 49 4e 5f M_IDENTIFY).BIN_
a830: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 INSTALL_DIR..= $
a840: 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (PRJ_INSTALL_DIR
a850: 29 5c 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 )\$(PLATFORM_IDE
a860: 4e 54 49 46 59 29 0a 21 65 6c 73 65 0a 4c 49 42 NTIFY).!else.LIB
a870: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _INSTALL_DIR..=
a880: 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(PRJ_INSTALL_DI
a890: 52 29 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 R).BIN_INSTALL_D
a8a0: 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 IR..= $(PRJ_INST
a8b0: 41 4c 4c 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a ALL_DIR).!endif.
a8c0: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 DOC_INSTALL_DIR.
a8d0: 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c .= $(PRJ_INSTALL
a8e0: 5f 44 49 52 29 0a 53 43 52 49 50 54 5f 49 4e 53 _DIR).SCRIPT_INS
a8f0: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 50 52 4a TALL_DIR.= $(PRJ
a900: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 44 45 _INSTALL_DIR).DE
a910: 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d MO_INSTALL_DIR.=
a920: 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 $(PRJ_INSTALL_D
a930: 49 52 29 5c 64 65 6d 6f 73 0a 49 4e 43 4c 55 44 IR)\demos.INCLUD
a940: 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 E_INSTALL_DIR.=
a950: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e $(_INSTALLDIR)\.
a960: 2e 5c 69 6e 63 6c 75 64 65 0a 0a 21 65 6e 64 69 .\include..!endi
a970: 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 f..#############
a980: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a990: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a9a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a9b0: 23 23 23 23 23 23 0a 23 20 31 32 2e 20 53 65 74 ######.# 12. Set
a9c0: 20 75 70 20 61 63 74 75 61 6c 20 6f 70 74 69 6f up actual optio
a9d0: 6e 73 20 74 6f 20 62 65 20 70 61 73 73 65 64 20 ns to be passed
a9e0: 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 to the compiler
a9f0: 61 6e 64 20 6c 69 6e 6b 65 72 0a 23 20 4e 6f 77 and linker.# Now
aa00: 20 77 65 20 68 61 76 65 20 61 6c 6c 20 74 68 65 we have all the
aa10: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 77 65 20 information we
aa20: 6e 65 65 64 2c 20 73 65 74 20 75 70 20 74 68 65 need, set up the
aa30: 20 61 63 74 75 61 6c 20 66 6c 61 67 73 20 61 6e actual flags an
aa40: 64 0a 23 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 d.# options that
aa50: 20 77 65 20 77 69 6c 6c 20 70 61 73 73 20 74 6f we will pass to
aa60: 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e the compiler an
aa70: 64 20 6c 69 6e 6b 65 72 2e 20 54 68 65 20 6d 61 d linker. The ma
aa80: 69 6e 0a 23 20 6d 61 6b 65 66 69 6c 65 20 73 68 in.# makefile sh
aa90: 6f 75 6c 64 20 75 73 65 20 74 68 65 73 65 20 69 ould use these i
aaa0: 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 n combination wi
aab0: 74 68 20 77 68 61 74 65 76 65 72 20 6f 74 68 65 th whatever othe
aac0: 72 20 66 6c 61 67 73 0a 23 20 61 6e 64 20 73 77 r flags.# and sw
aad0: 69 74 63 68 65 73 20 61 72 65 20 73 70 65 63 69 itches are speci
aae0: 66 69 63 20 74 6f 20 69 74 2e 0a 23 20 54 68 65 fic to it..# The
aaf0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
ab00: 73 20 61 72 65 20 64 65 66 69 6e 65 64 2c 20 6e s are defined, n
ab10: 61 6d 65 73 20 61 72 65 20 66 6f 72 20 68 69 73 ames are for his
ab20: 74 6f 72 69 63 61 6c 20 63 6f 6d 70 61 74 69 62 torical compatib
ab30: 69 6c 69 74 79 3a 0a 23 20 4f 50 54 44 45 46 49 ility:.# OPTDEFI
ab40: 4e 45 53 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 NES - /Dxxx C ma
ab50: 63 72 6f 20 66 6c 61 67 73 20 62 61 73 65 64 20 cro flags based
ab60: 6f 6e 20 75 73 65 72 2d 73 70 65 63 69 66 69 65 on user-specifie
ab70: 64 20 4f 50 54 53 0a 23 20 43 4f 4d 50 49 4c 45 d OPTS.# COMPILE
ab80: 52 46 4c 41 47 53 20 2d 20 2f 44 78 78 78 20 43 RFLAGS - /Dxxx C
ab90: 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 69 6e 64 macro flags ind
aba0: 65 70 65 6e 64 65 6e 74 20 6f 66 20 61 6e 79 20 ependent of any
abb0: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 configuration op
abc0: 74 69 6f 6e 73 0a 23 20 63 72 74 20 2d 20 43 6f tions.# crt - Co
abd0: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 20 74 68 mpiler switch th
abe0: 61 74 20 73 65 6c 65 63 74 73 20 74 68 65 20 61 at selects the a
abf0: 70 70 72 6f 70 72 69 61 74 65 20 43 20 72 75 6e ppropriate C run
ac00: 74 69 6d 65 0a 23 20 63 64 65 62 75 67 20 2d 20 time.# cdebug -
ac10: 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 Compiler switche
ac20: 73 20 72 65 6c 61 74 65 64 20 74 6f 20 64 65 62 s related to deb
ac30: 75 67 20 41 4e 44 20 6f 70 74 69 6d 69 7a 61 74 ug AND optimizat
ac40: 69 6f 6e 73 0a 23 20 63 77 61 72 6e 20 2d 20 43 ions.# cwarn - C
ac50: 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 ompiler switches
ac60: 20 74 68 61 74 20 73 65 74 20 77 61 72 6e 69 6e that set warnin
ac70: 67 20 6c 65 76 65 6c 73 0a 23 20 63 66 6c 61 67 g levels.# cflag
ac80: 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 63 6f 6d s - complete com
ac90: 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 28 piler switches (
aca0: 73 75 62 73 75 6d 65 73 20 63 64 65 62 75 67 20 subsumes cdebug
acb0: 61 6e 64 20 63 77 61 72 6e 29 0a 23 20 6c 64 65 and cwarn).# lde
acc0: 62 75 67 20 2d 20 4c 69 6e 6b 65 72 20 73 77 69 bug - Linker swi
acd0: 74 63 68 65 73 20 63 6f 6e 74 72 6f 6c 6c 69 6e tches controllin
ace0: 67 20 64 65 62 75 67 20 69 6e 66 6f 72 6d 61 74 g debug informat
acf0: 69 6f 6e 20 61 6e 64 20 6f 70 74 69 6d 69 7a 61 ion and optimiza
ad00: 74 69 6f 6e 0a 23 20 6c 66 6c 61 67 73 20 2d 20 tion.# lflags -
ad10: 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 complete linker
ad20: 73 77 69 74 63 68 65 73 20 28 73 75 62 73 75 6d switches (subsum
ad30: 65 73 20 6c 64 65 62 75 67 29 20 65 78 63 65 70 es ldebug) excep
ad40: 74 20 73 75 62 73 79 73 74 65 6d 20 74 79 70 65 t subsystem type
ad50: 0a 23 20 64 6c 6c 6c 66 6c 61 67 73 20 2d 20 63 .# dlllflags - c
ad60: 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 omplete linker s
ad70: 77 69 74 63 68 65 73 20 74 6f 20 62 75 69 6c 64 witches to build
ad80: 20 44 4c 4c 73 20 28 73 75 62 73 75 6d 65 73 20 DLLs (subsumes
ad90: 6c 66 6c 61 67 73 29 0a 23 20 63 6f 6e 6c 66 6c lflags).# conlfl
ada0: 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c ags - complete l
adb0: 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 66 inker switches f
adc0: 6f 72 20 63 6f 6e 73 6f 6c 65 20 70 72 6f 67 72 or console progr
add0: 61 6d 20 28 73 75 62 73 75 6d 65 73 20 6c 66 6c am (subsumes lfl
ade0: 61 67 73 29 0a 23 20 67 75 69 6c 66 6c 61 67 73 ags).# guilflags
adf0: 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b - complete link
ae00: 65 72 20 73 77 69 74 63 68 65 73 20 66 6f 72 20 er switches for
ae10: 47 55 49 20 70 72 6f 67 72 61 6d 20 28 73 75 62 GUI program (sub
ae20: 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 0a 23 20 sumes lflags).#
ae30: 62 61 73 65 6c 69 62 73 20 2d 20 6d 69 6e 69 6d baselibs - minim
ae40: 75 6d 20 57 69 6e 64 6f 77 73 20 6c 69 62 72 61 um Windows libra
ae50: 72 69 65 73 20 72 65 71 75 69 72 65 64 2e 20 50 ries required. P
ae60: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 63 arent makefile c
ae70: 61 6e 0a 23 20 20 20 20 64 65 66 69 6e 65 20 50 an.# define P
ae80: 52 4a 5f 4c 49 42 53 20 62 65 66 6f 72 65 20 69 RJ_LIBS before i
ae90: 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 72 ncluding rules.r
aea0: 63 20 69 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 c if additional
aeb0: 6c 69 62 73 20 61 72 65 20 6e 65 65 64 65 64 0a libs are needed.
aec0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 2f 44 .OPTDEFINES.= /D
aed0: 53 54 44 43 5f 48 45 41 44 45 52 53 20 2f 44 55 STDC_HEADERS /DU
aee0: 53 45 5f 4e 4d 41 4b 45 3d 31 0a 21 69 66 20 24 SE_NMAKE=1.!if $
aef0: 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 36 (VCVERSION) > 16
af00: 30 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 00.OPTDEFINES.=
af10: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
af20: 48 41 56 45 5f 53 54 44 49 4e 54 5f 48 3d 31 0a HAVE_STDINT_H=1.
af30: 21 65 6c 73 65 0a 4f 50 54 44 45 46 49 4e 45 53 !else.OPTDEFINES
af40: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
af50: 20 2f 44 4d 50 5f 4e 4f 5f 53 54 44 49 4e 54 3d /DMP_NO_STDINT=
af60: 31 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 56 1.!endif.!if $(V
af70: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 38 30 CVERSION) >= 180
af80: 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 0.OPTDEFINES.= $
af90: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 48 (OPTDEFINES) /DH
afa0: 41 56 45 5f 49 4e 54 54 59 50 45 53 5f 48 3d 31 AVE_INTTYPES_H=1
afb0: 20 2f 44 48 41 56 45 5f 53 54 44 42 4f 4f 4c 5f /DHAVE_STDBOOL_
afc0: 48 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 H=1.!endif..!if
afd0: 24 28 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 29 $(TCL_MEM_DEBUG)
afe0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
aff0: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 OPTDEFINES) /DTC
b000: 4c 5f 4d 45 4d 5f 44 45 42 55 47 0a 21 65 6e 64 L_MEM_DEBUG.!end
b010: 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 43 4f 4d if.!if $(TCL_COM
b020: 50 49 4c 45 5f 44 45 42 55 47 29 0a 4f 50 54 44 PILE_DEBUG).OPTD
b030: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b040: 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 4f 4d FINES) /DTCL_COM
b050: 50 49 4c 45 5f 44 45 42 55 47 20 2f 44 54 43 4c PILE_DEBUG /DTCL
b060: 5f 43 4f 4d 50 49 4c 45 5f 53 54 41 54 53 0a 21 _COMPILE_STATS.!
b070: 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f endif.!if $(TCL_
b080: 54 48 52 45 41 44 53 29 20 26 26 20 24 28 54 43 THREADS) && $(TC
b090: 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a L_VERSION) < 87.
b0a0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b0b0: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
b0c0: 5f 54 48 52 45 41 44 53 3d 31 0a 21 69 66 20 24 _THREADS=1.!if $
b0d0: 28 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f (USE_THREAD_ALLO
b0e0: 43 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 C) && $(TCL_VERS
b0f0: 49 4f 4e 29 20 3c 20 38 37 0a 4f 50 54 44 45 46 ION) < 87.OPTDEF
b100: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b110: 4e 45 53 29 20 2f 44 55 53 45 5f 54 48 52 45 41 NES) /DUSE_THREA
b120: 44 5f 41 4c 4c 4f 43 3d 31 0a 21 65 6e 64 69 66 D_ALLOC=1.!endif
b130: 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 53 54 .!endif.!if $(ST
b140: 41 54 49 43 5f 42 55 49 4c 44 29 0a 4f 50 54 44 ATIC_BUILD).OPTD
b150: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b160: 46 49 4e 45 53 29 20 2f 44 53 54 41 54 49 43 5f FINES) /DSTATIC_
b170: 42 55 49 4c 44 0a 21 65 6c 73 65 69 66 20 24 28 BUILD.!elseif $(
b180: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 TCL_VERSION) > 8
b190: 36 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 6.OPTDEFINES.= $
b1a0: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b1b0: 43 4c 5f 57 49 54 48 5f 45 58 54 45 52 4e 41 4c CL_WITH_EXTERNAL
b1c0: 5f 54 4f 4d 4d 41 54 48 0a 21 69 66 20 22 24 28 _TOMMATH.!if "$(
b1d0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d MACHINE)" == "AM
b1e0: 44 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 D64" || "$(MACHI
b1f0: 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a NE)" == "ARM64".
b200: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b210: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4d 50 5f PTDEFINES) /DMP_
b220: 36 34 42 49 54 0a 21 65 6e 64 69 66 0a 21 65 6e 64BIT.!endif.!en
b230: 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 4e 4f dif.!if $(TCL_NO
b240: 5f 44 45 50 52 45 43 41 54 45 44 29 0a 4f 50 54 _DEPRECATED).OPT
b250: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b260: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4e 4f EFINES) /DTCL_NO
b270: 5f 44 45 50 52 45 43 41 54 45 44 0a 21 65 6e 64 _DEPRECATED.!end
b280: 69 66 0a 0a 21 69 66 20 24 28 55 53 45 5f 53 54 if..!if $(USE_ST
b290: 55 42 53 29 0a 23 20 4e 6f 74 65 20 77 65 20 64 UBS).# Note we d
b2a0: 6f 20 6e 6f 74 20 64 65 66 69 6e 65 20 55 53 45 o not define USE
b2b0: 5f 54 43 4c 5f 53 54 55 42 53 20 65 76 65 6e 20 _TCL_STUBS even
b2c0: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 74 6b when building tk
b2d0: 20 73 69 6e 63 65 20 73 6f 6d 65 0a 23 20 74 65 since some.# te
b2e0: 73 74 20 74 61 72 67 65 74 73 20 69 6e 20 74 6b st targets in tk
b2f0: 20 64 6f 20 6e 6f 74 20 75 73 65 20 73 74 75 62 do not use stub
b300: 73 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 s.!if !$(DOING_T
b310: 43 4c 29 0a 55 53 45 5f 53 54 55 42 53 5f 44 45 CL).USE_STUBS_DE
b320: 46 53 20 20 3d 20 2f 44 55 53 45 5f 54 43 4c 5f FS = /DUSE_TCL_
b330: 53 54 55 42 53 20 2f 44 55 53 45 5f 54 43 4c 4f STUBS /DUSE_TCLO
b340: 4f 5f 53 54 55 42 53 0a 21 69 66 20 24 28 4e 45 O_STUBS.!if $(NE
b350: 45 44 5f 54 4b 29 0a 55 53 45 5f 53 54 55 42 53 ED_TK).USE_STUBS
b360: 5f 44 45 46 53 20 20 3d 20 24 28 55 53 45 5f 53 _DEFS = $(USE_S
b370: 54 55 42 53 5f 44 45 46 53 29 20 2f 44 55 53 45 TUBS_DEFS) /DUSE
b380: 5f 54 4b 5f 53 54 55 42 53 0a 21 65 6e 64 69 66 _TK_STUBS.!endif
b390: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
b3a0: 20 55 53 45 5f 53 54 55 42 53 0a 0a 21 69 66 20 USE_STUBS..!if
b3b0: 21 24 28 44 45 42 55 47 29 0a 4f 50 54 44 45 46 !$(DEBUG).OPTDEF
b3c0: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b3d0: 4e 45 53 29 20 2f 44 4e 44 45 42 55 47 0a 21 69 NES) /DNDEBUG.!i
b3e0: 66 20 24 28 4f 50 54 49 4d 49 5a 49 4e 47 29 0a f $(OPTIMIZING).
b3f0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b400: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
b410: 5f 43 46 47 5f 4f 50 54 49 4d 49 5a 45 44 0a 21 _CFG_OPTIMIZED.!
b420: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 endif.!endif.!if
b430: 20 24 28 50 52 4f 46 49 4c 45 29 0a 4f 50 54 44 $(PROFILE).OPTD
b440: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b450: 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 FINES) /DTCL_CFG
b460: 5f 50 52 4f 46 49 4c 45 44 0a 21 65 6e 64 69 66 _PROFILED.!endif
b470: 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 .!if "$(MACHINE)
b480: 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 " == "AMD64" ||
b490: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
b4a0: 22 41 52 4d 36 34 22 0a 4f 50 54 44 45 46 49 4e "ARM64".OPTDEFIN
b4b0: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b4c0: 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 44 4f 36 S) /DTCL_CFG_DO6
b4d0: 34 42 49 54 0a 21 65 6e 64 69 66 0a 21 69 66 20 4BIT.!endif.!if
b4e0: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 $(VCVERSION) < 1
b4f0: 33 30 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 300.OPTDEFINES.=
b500: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b510: 44 4e 4f 5f 53 54 52 54 4f 49 36 34 3d 31 0a 21 DNO_STRTOI64=1.!
b520: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c endif..!if $(TCL
b530: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
b540: 3d 3d 20 38 0a 21 69 66 20 22 24 28 5f 55 53 45 == 8.!if "$(_USE
b550: 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 29 22 20 _64BIT_TIME_T)"
b560: 3d 3d 20 22 31 22 0a 4f 50 54 44 45 46 49 4e 45 == "1".OPTDEFINE
b570: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b580: 29 20 2f 44 5f 55 53 45 5f 36 34 42 49 54 5f 54 ) /D_USE_64BIT_T
b590: 49 4d 45 5f 54 3d 31 0a 21 65 6e 64 69 66 0a 21 IME_T=1.!endif.!
b5a0: 65 6e 64 69 66 0a 21 69 66 20 22 24 28 54 43 4c endif.!if "$(TCL
b5b0: 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 _BUILD_FOR)" ==
b5c0: 22 38 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d "8".OPTDEFINES.=
b5d0: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b5e0: 44 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 DTCL_MAJOR_VERSI
b5f0: 4f 4e 3d 38 20 2f 44 54 4b 5f 4d 41 4a 4f 52 5f ON=8 /DTK_MAJOR_
b600: 56 45 52 53 49 4f 4e 3d 38 0a 21 65 6e 64 69 66 VERSION=8.!endif
b610: 0a 0a 23 20 4c 69 6b 65 20 74 68 65 20 54 45 41 ..# Like the TEA
b620: 20 73 79 73 74 65 6d 20 6f 6e 6c 79 20 73 65 74 system only set
b630: 20 74 68 69 73 20 6e 6f 6e 20 65 6d 70 74 79 20 this non empty
b640: 66 6f 72 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 6e for non-Tk exten
b650: 73 69 6f 6e 73 0a 23 20 4e 6f 74 65 3a 20 73 6f sions.# Note: so
b660: 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 75 73 me extensions us
b670: 65 20 50 41 43 4b 41 47 45 5f 4e 41 4d 45 20 61 e PACKAGE_NAME a
b680: 6e 64 20 6f 74 68 65 72 73 20 75 73 65 20 50 41 nd others use PA
b690: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 0a 23 20 CKAGE_TCLNAME.#
b6a0: 73 6f 20 77 65 20 70 61 73 73 20 62 6f 74 68 0a so we pass both.
b6b0: 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c !if !$(DOING_TCL
b6c0: 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 4b ) && !$(DOING_TK
b6d0: 29 0a 50 4b 47 4e 41 4d 45 46 4c 41 47 53 20 3d ).PKGNAMEFLAGS =
b6e0: 20 2f 44 50 41 43 4b 41 47 45 5f 4e 41 4d 45 3d /DPACKAGE_NAME=
b6f0: 22 5c 22 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 "\"$(PRJ_PACKAGE
b700: 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 20 5c 0a 09 _TCLNAME)\"" \..
b710: 2f 44 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d /DPACKAGE_TCLNAM
b720: 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 43 4b 41 E="\"$(PRJ_PACKA
b730: 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 20 5c GE_TCLNAME)\"" \
b740: 0a 09 2f 44 50 41 43 4b 41 47 45 5f 56 45 52 53 ../DPACKAGE_VERS
b750: 49 4f 4e 3d 22 5c 22 24 28 44 4f 54 56 45 52 53 ION="\"$(DOTVERS
b760: 49 4f 4e 29 5c 22 22 20 5c 0a 09 2f 44 4d 4f 44 ION)\"" \../DMOD
b770: 55 4c 45 5f 53 43 4f 50 45 3d 65 78 74 65 72 6e ULE_SCOPE=extern
b780: 0a 21 65 6e 64 69 66 0a 0a 23 20 63 72 74 20 70 .!endif..# crt p
b790: 69 63 6b 73 20 74 68 65 20 43 20 72 75 6e 20 74 icks the C run t
b7a0: 69 6d 65 20 62 61 73 65 64 20 6f 6e 20 73 65 6c ime based on sel
b7b0: 65 63 74 65 64 20 4f 50 54 53 0a 21 69 66 20 24 ected OPTS.!if $
b7c0: 28 4d 53 56 43 52 54 29 0a 21 69 66 20 24 28 44 (MSVCRT).!if $(D
b7d0: 45 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 EBUG) && !$(UNCH
b7e0: 45 43 4b 45 44 29 0a 63 72 74 20 3d 20 2d 4d 44 ECKED).crt = -MD
b7f0: 64 0a 21 65 6c 73 65 0a 63 72 74 20 3d 20 2d 4d d.!else.crt = -M
b800: 44 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 D.!endif.!else.!
b810: 69 66 20 24 28 44 45 42 55 47 29 20 26 26 20 21 if $(DEBUG) && !
b820: 24 28 55 4e 43 48 45 43 4b 45 44 29 0a 63 72 74 $(UNCHECKED).crt
b830: 20 3d 20 2d 4d 54 64 0a 21 65 6c 73 65 0a 63 72 = -MTd.!else.cr
b840: 74 20 3d 20 2d 4d 54 0a 21 65 6e 64 69 66 0a 21 t = -MT.!endif.!
b850: 65 6e 64 69 66 0a 0a 23 20 63 64 65 62 75 67 20 endif..# cdebug
b860: 69 6e 63 6c 75 64 65 73 20 63 6f 6d 70 69 6c 65 includes compile
b870: 72 20 6f 70 74 69 6f 6e 73 20 66 6f 72 20 64 65 r options for de
b880: 62 75 67 67 69 6e 67 20 61 73 20 77 65 6c 6c 20 bugging as well
b890: 61 73 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e as optimization.
b8a0: 0a 21 69 66 20 24 28 44 45 42 55 47 29 0a 0a 23 .!if $(DEBUG)..#
b8b0: 20 49 6e 20 64 65 62 75 67 67 69 6e 67 20 6d 6f In debugging mo
b8c0: 64 65 2c 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e de, optimization
b8d0: 73 20 6e 65 65 64 20 74 6f 20 62 65 20 64 69 73 s need to be dis
b8e0: 61 62 6c 65 64 0a 63 64 65 62 75 67 20 3d 20 2d abled.cdebug = -
b8f0: 5a 69 20 2d 4f 64 20 24 28 44 45 42 55 47 46 4c Zi -Od $(DEBUGFL
b900: 41 47 53 29 0a 0a 21 65 6c 73 65 0a 0a 63 64 65 AGS)..!else..cde
b910: 62 75 67 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 bug = $(OPTIMIZA
b920: 54 49 4f 4e 53 29 0a 21 69 66 20 24 28 53 59 4d TIONS).!if $(SYM
b930: 42 4f 4c 53 29 0a 63 64 65 62 75 67 20 3d 20 24 BOLS).cdebug = $
b940: 28 63 64 65 62 75 67 29 20 2d 5a 69 0a 21 65 6e (cdebug) -Zi.!en
b950: 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 24 28 dif..!endif # $(
b960: 44 45 42 55 47 29 0a 0a 23 20 63 77 61 72 6e 20 DEBUG)..# cwarn
b970: 69 6e 63 6c 75 64 65 73 20 64 65 66 61 75 6c 74 includes default
b980: 20 77 61 72 6e 69 6e 67 20 6c 65 76 65 6c 73 2c warning levels,
b990: 20 61 6c 73 6f 20 43 34 30 39 30 20 28 62 75 67 also C4090 (bug
b9a0: 67 79 29 20 61 6e 64 20 43 34 31 34 36 20 69 73 gy) and C4146 is
b9b0: 20 75 73 65 6c 65 73 73 2e 0a 63 77 61 72 6e 20 useless..cwarn
b9c0: 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 20 2d 77 = $(WARNINGS) -w
b9d0: 64 34 30 39 30 20 2d 77 64 34 31 34 36 0a 0a 21 d4090 -wd4146..!
b9e0: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
b9f0: 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 == "AMD64" || "$
ba00: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 (MACHINE)" == "A
ba10: 52 4d 36 34 22 0a 23 20 44 69 73 61 62 6c 65 20 RM64".# Disable
ba20: 70 6f 69 6e 74 65 72 3c 2d 3e 69 6e 74 20 77 61 pointer<->int wa
ba30: 72 6e 69 6e 67 73 20 72 65 6c 61 74 65 64 20 74 rnings related t
ba40: 6f 20 63 61 73 74 20 62 65 74 77 65 65 6e 20 64 o cast between d
ba50: 69 66 66 65 72 65 6e 74 20 73 69 7a 65 73 0a 23 ifferent sizes.#
ba60: 20 54 68 65 72 65 20 61 72 65 20 61 20 67 61 64 There are a gad
ba70: 7a 69 6c 6c 69 6f 6e 20 6f 66 20 74 68 65 73 65 zillion of these
ba80: 20 64 75 65 20 74 6f 20 75 73 65 20 6f 66 20 43 due to use of C
ba90: 6c 69 65 6e 74 44 61 74 61 20 61 6e 64 0a 23 20 lientData and.#
baa0: 63 6c 75 74 74 65 72 20 75 70 20 63 6f 6d 70 69 clutter up compi
bab0: 6c 65 72 0a 23 20 6f 75 74 70 75 74 20 69 6e 63 ler.# output inc
bac0: 72 65 61 73 69 6e 67 20 63 68 61 6e 63 65 20 6f reasing chance o
bad0: 66 20 61 20 72 65 61 6c 20 77 61 72 6e 69 6e 67 f a real warning
bae0: 20 67 65 74 74 69 6e 67 20 6c 6f 73 74 2e 20 53 getting lost. S
baf0: 6f 20 64 69 73 61 62 6c 65 20 74 68 65 6d 2e 0a o disable them..
bb00: 23 20 45 76 65 6e 74 75 61 6c 6c 79 20 73 6f 6d # Eventually som
bb10: 65 20 64 61 79 2c 20 54 63 6c 20 77 69 6c 6c 20 e day, Tcl will
bb20: 62 65 20 36 34 2d 62 69 74 20 63 6c 65 61 6e 2e be 64-bit clean.
bb30: 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 61 72 6e .cwarn = $(cwarn
bb40: 29 20 2d 77 64 34 33 31 31 20 2d 77 64 34 33 31 ) -wd4311 -wd431
bb50: 32 0a 21 65 6e 64 69 66 0a 0a 23 23 23 20 43 6f 2.!endif..### Co
bb60: 6d 6d 6f 6e 20 63 6f 6d 70 69 6c 65 72 20 6f 70 mmon compiler op
bb70: 74 69 6f 6e 73 20 74 68 61 74 20 61 72 65 20 61 tions that are a
bb80: 72 63 68 69 74 65 63 74 75 72 65 20 73 70 65 63 rchitecture spec
bb90: 69 66 69 63 0a 21 69 66 20 22 24 28 4d 41 43 48 ific.!if "$(MACH
bba0: 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d 22 0a 63 INE)" == "ARM".c
bbb0: 61 72 63 68 20 3d 20 2f 44 5f 41 52 4d 5f 57 49 arch = /D_ARM_WI
bbc0: 4e 41 50 49 5f 50 41 52 54 49 54 49 4f 4e 5f 44 NAPI_PARTITION_D
bbd0: 45 53 4b 54 4f 50 5f 53 44 4b 5f 41 56 41 49 4c ESKTOP_SDK_AVAIL
bbe0: 41 42 4c 45 0a 21 65 6c 73 65 0a 63 61 72 63 68 ABLE.!else.carch
bbf0: 20 3d 0a 21 65 6e 64 69 66 0a 0a 23 20 63 70 75 =.!endif..# cpu
bc00: 69 64 20 69 73 20 6f 6e 6c 79 20 61 76 61 69 6c id is only avail
bc10: 61 62 6c 65 20 6f 6e 20 69 6e 74 65 6c 20 6d 61 able on intel ma
bc20: 63 68 69 6e 65 73 0a 21 69 66 20 22 24 28 4d 41 chines.!if "$(MA
bc30: 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 CHINE)" == "IX86
bc40: 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 " || "$(MACHINE)
bc50: 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a 63 61 72 " == "AMD64".car
bc60: 63 68 20 3d 20 24 28 63 61 72 63 68 29 20 2f 44 ch = $(carch) /D
bc70: 48 41 56 45 5f 43 50 55 49 44 3d 31 0a 21 65 6e HAVE_CPUID=1.!en
bc80: 64 69 66 0a 0a 21 69 66 20 24 28 44 45 42 55 47 dif..!if $(DEBUG
bc90: 29 0a 23 20 54 75 72 6e 20 77 61 72 6e 69 6e 67 ).# Turn warning
bca0: 73 20 69 6e 74 6f 20 65 72 72 6f 72 73 0a 63 77 s into errors.cw
bcb0: 61 72 6e 20 3d 20 24 28 63 77 61 72 6e 29 20 2d arn = $(cwarn) -
bcc0: 57 58 0a 21 65 6e 64 69 66 0a 0a 49 4e 43 4c 55 WX.!endif..INCLU
bcd0: 44 45 53 20 3d 20 24 28 54 43 4c 5f 49 4e 43 4c DES = $(TCL_INCL
bce0: 55 44 45 53 29 20 24 28 54 4b 5f 49 4e 43 4c 55 UDES) $(TK_INCLU
bcf0: 44 45 53 29 20 24 28 50 52 4a 5f 49 4e 43 4c 55 DES) $(PRJ_INCLU
bd00: 44 45 53 29 0a 21 69 66 20 21 24 28 44 4f 49 4e DES).!if !$(DOIN
bd10: 47 5f 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 G_TCL) && !$(DOI
bd20: 4e 47 5f 54 4b 29 0a 49 4e 43 4c 55 44 45 53 20 NG_TK).INCLUDES
bd30: 3d 20 24 28 49 4e 43 4c 55 44 45 53 29 20 2d 49 = $(INCLUDES) -I
bd40: 22 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 20 "$(GENERICDIR)"
bd50: 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 20 2d -I"$(WIN_DIR)" -
bd60: 49 22 24 28 43 4f 4d 50 41 54 44 49 52 29 22 0a I"$(COMPATDIR)".
bd70: 21 65 6e 64 69 66 0a 0a 23 20 54 68 65 73 65 20 !endif..# These
bd80: 66 6c 61 67 73 20 61 72 65 20 64 65 66 69 6e 65 flags are define
bd90: 64 20 72 6f 75 67 68 6c 79 20 69 6e 20 74 68 65 d roughly in the
bda0: 20 6f 72 64 65 72 20 6f 66 20 74 68 65 20 70 72 order of the pr
bdb0: 65 2d 72 65 66 6f 72 6d 0a 23 20 72 75 6c 65 73 e-reform.# rules
bdc0: 2e 76 63 2f 6d 61 6b 65 66 69 6c 65 2e 76 63 20 .vc/makefile.vc
bdd0: 74 6f 20 68 65 6c 70 20 76 69 73 75 61 6c 6c 79 to help visually
bde0: 20 63 6f 6d 70 61 72 65 20 74 68 61 74 20 74 68 compare that th
bdf0: 65 20 70 72 65 2d 20 61 6e 64 0a 23 20 70 6f 73 e pre- and.# pos
be00: 74 2d 72 65 66 6f 72 6d 20 62 75 69 6c 64 20 6c t-reform build l
be10: 6f 67 73 0a 0a 23 20 63 66 6c 61 67 73 20 63 6f ogs..# cflags co
be20: 6e 74 61 69 6e 73 20 67 65 6e 65 72 69 63 20 66 ntains generic f
be30: 6c 61 67 73 20 75 73 65 64 20 66 6f 72 20 62 75 lags used for bu
be40: 69 6c 64 69 6e 67 20 70 72 61 63 74 69 63 61 6c ilding practical
be50: 6c 79 20 61 6c 6c 20 6f 62 6a 65 63 74 20 66 69 ly all object fi
be60: 6c 65 73 0a 63 66 6c 61 67 73 20 3d 20 2d 6e 6f les.cflags = -no
be70: 6c 6f 67 6f 20 2d 63 20 24 28 43 4f 4d 50 49 4c logo -c $(COMPIL
be80: 45 52 46 4c 41 47 53 29 20 24 28 63 61 72 63 68 ERFLAGS) $(carch
be90: 29 20 24 28 63 77 61 72 6e 29 20 2d 46 70 24 28 ) $(cwarn) -Fp$(
bea0: 54 4d 50 5f 44 49 52 29 5e 5c 20 24 28 63 64 65 TMP_DIR)^\ $(cde
beb0: 62 75 67 29 0a 0a 21 69 66 20 24 28 54 43 4c 5f bug)..!if $(TCL_
bec0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
bed0: 3d 20 38 20 26 26 20 24 28 54 43 4c 5f 4d 49 4e = 8 && $(TCL_MIN
bee0: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3c 20 37 0a OR_VERSION) < 7.
bef0: 63 66 6c 61 67 73 20 3d 20 24 28 63 66 6c 61 67 cflags = $(cflag
bf00: 73 29 20 2d 44 54 63 6c 5f 53 69 7a 65 3d 69 6e s) -DTcl_Size=in
bf10: 74 0a 21 65 6e 64 69 66 0a 0a 23 20 61 70 70 63 t.!endif..# appc
bf20: 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 flags contains $
bf30: 28 63 66 6c 61 67 73 29 20 61 6e 64 20 66 6c 61 (cflags) and fla
bf40: 67 73 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 gs for building
bf50: 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 0a the application.
bf60: 23 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 28 # object files (
bf70: 65 2e 67 2e 20 74 63 6c 73 68 2c 20 6f 72 20 77 e.g. tclsh, or w
bf80: 69 73 68 29 20 70 6b 67 63 66 6c 61 67 73 20 63 ish) pkgcflags c
bf90: 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 ontains $(cflags
bfa0: 29 20 70 6c 75 73 0a 23 20 66 6c 61 67 73 20 75 ) plus.# flags u
bfb0: 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 sed for building
bfc0: 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74 20 66 shared object f
bfd0: 69 6c 65 73 20 54 68 65 20 74 77 6f 20 64 69 66 iles The two dif
bfe0: 66 65 72 20 69 6e 20 74 68 65 0a 23 20 42 55 49 fer in the.# BUI
bff0: 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 20 6d 61 LD_$(PROJECT) ma
c000: 63 72 6f 20 77 68 69 63 68 20 73 68 6f 75 6c 64 cro which should
c010: 20 62 65 20 64 65 66 69 6e 65 64 20 6f 6e 6c 79 be defined only
c020: 20 66 6f 72 20 74 68 65 20 73 68 61 72 65 64 0a for the shared.
c030: 23 20 6c 69 62 72 61 72 79 20 2a 69 6d 70 6c 65 # library *imple
c040: 6d 65 6e 74 61 74 69 6f 6e 2a 20 61 6e 64 20 6e mentation* and n
c050: 6f 74 20 66 6f 72 20 69 74 73 20 63 61 6c 6c 65 ot for its calle
c060: 72 20 69 6e 74 65 72 66 61 63 65 0a 0a 61 70 70 r interface..app
c070: 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d cflags_nostubs =
c080: 20 24 28 63 66 6c 61 67 73 29 20 24 28 63 72 74 $(cflags) $(crt
c090: 29 20 24 28 49 4e 43 4c 55 44 45 53 29 20 24 28 ) $(INCLUDES) $(
c0a0: 54 43 4c 5f 44 45 46 49 4e 45 53 29 20 24 28 50 TCL_DEFINES) $(P
c0b0: 52 4a 5f 44 45 46 49 4e 45 53 29 20 24 28 4f 50 RJ_DEFINES) $(OP
c0c0: 54 44 45 46 49 4e 45 53 29 0a 61 70 70 63 66 6c TDEFINES).appcfl
c0d0: 61 67 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 ags = $(appcflag
c0e0: 73 5f 6e 6f 73 74 75 62 73 29 20 24 28 55 53 45 s_nostubs) $(USE
c0f0: 5f 53 54 55 42 53 5f 44 45 46 53 29 0a 70 6b 67 _STUBS_DEFS).pkg
c100: 63 66 6c 61 67 73 20 3d 20 24 28 61 70 70 63 66 cflags = $(appcf
c110: 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 lags) $(PKGNAMEF
c120: 4c 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 LAGS) /DBUILD_$(
c130: 50 52 4f 4a 45 43 54 29 0a 70 6b 67 63 66 6c 61 PROJECT).pkgcfla
c140: 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 24 28 61 gs_nostubs = $(a
c150: 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 ppcflags_nostubs
c160: 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 ) $(PKGNAMEFLAGS
c170: 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 52 4f 4a ) /DBUILD_$(PROJ
c180: 45 43 54 29 0a 0a 23 20 73 74 75 62 73 63 66 6c ECT)..# stubscfl
c190: 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 ags contains $(c
c1a0: 66 6c 61 67 73 29 20 70 6c 75 73 20 66 6c 61 67 flags) plus flag
c1b0: 73 20 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 s used for build
c1c0: 69 6e 67 20 61 20 73 74 75 62 73 0a 23 20 6c 69 ing a stubs.# li
c1d0: 62 72 61 72 79 20 66 6f 72 20 74 68 65 20 70 61 brary for the pa
c1e0: 63 6b 61 67 65 2e 20 20 4e 6f 74 65 3a 20 2f 44 ckage. Note: /D
c1f0: 53 54 41 54 49 43 5f 42 55 49 4c 44 20 69 73 20 STATIC_BUILD is
c200: 64 65 66 69 6e 65 64 20 69 6e 0a 23 20 24 28 4f defined in.# $(O
c210: 50 54 44 45 46 49 4e 45 53 29 20 6f 6e 6c 79 20 PTDEFINES) only
c220: 69 66 20 74 68 65 20 4f 50 54 53 20 63 6f 6e 66 if the OPTS conf
c230: 69 67 75 72 61 74 69 6f 6e 20 69 6e 64 69 63 61 iguration indica
c240: 74 65 73 20 61 20 73 74 61 74 69 63 0a 23 20 6c tes a static.# l
c250: 69 62 72 61 72 79 2e 20 48 6f 77 65 76 65 72 20 ibrary. However
c260: 74 68 65 20 73 74 75 62 73 20 6c 69 62 72 61 72 the stubs librar
c270: 79 20 69 73 20 41 4c 57 41 59 53 20 73 74 61 74 y is ALWAYS stat
c280: 69 63 20 68 65 6e 63 65 20 69 6e 63 6c 75 64 65 ic hence include
c290: 64 0a 23 20 68 65 72 65 20 69 72 72 65 73 70 65 d.# here irrespe
c2a0: 63 74 69 76 65 20 6f 66 20 74 68 65 20 4f 50 54 ctive of the OPT
c2b0: 53 20 73 65 74 74 69 6e 67 2e 0a 23 0a 23 20 54 S setting..#.# T
c2c0: 42 44 20 2d 20 74 63 6c 76 66 73 20 68 61 73 20 BD - tclvfs has
c2d0: 61 20 63 6f 6d 6d 65 6e 74 20 74 68 61 74 20 73 a comment that s
c2e0: 74 75 62 73 20 6c 69 62 73 20 73 68 6f 75 6c 64 tubs libs should
c2f0: 20 6e 6f 74 20 62 65 20 63 6f 6d 70 69 6c 65 64 not be compiled
c300: 20 77 69 74 68 20 2d 47 4c 0a 23 20 77 69 74 68 with -GL.# with
c310: 6f 75 74 20 73 74 61 74 69 6e 67 20 77 68 79 2e out stating why.
c320: 20 54 63 6c 20 69 74 73 65 6c 66 20 63 6f 6d 70 Tcl itself comp
c330: 69 6c 65 64 20 73 74 75 62 73 20 6c 69 62 73 20 iled stubs libs
c340: 77 69 74 68 20 74 68 69 73 20 66 6c 61 67 2e 0a with this flag..
c350: 23 20 73 6f 20 77 65 20 64 6f 20 6e 6f 74 20 72 # so we do not r
c360: 65 6d 6f 76 65 20 69 74 20 66 72 6f 6d 20 63 66 emove it from cf
c370: 6c 61 67 73 2e 20 2d 47 4c 20 6d 61 79 20 70 72 lags. -GL may pr
c380: 65 76 65 6e 74 20 65 78 74 65 6e 73 69 6f 6e 73 event extensions
c390: 0a 23 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 .# compiled with
c3a0: 20 6f 6e 65 20 56 43 20 76 65 72 73 69 6f 6e 20 one VC version
c3b0: 74 6f 20 66 61 69 6c 20 74 6f 20 6c 69 6e 6b 20 to fail to link
c3c0: 61 67 61 69 6e 73 74 20 73 74 75 62 73 20 6c 69 against stubs li
c3d0: 62 72 61 72 79 0a 23 20 63 6f 6d 70 69 6c 65 64 brary.# compiled
c3e0: 20 77 69 74 68 20 61 6e 6f 74 68 65 72 20 56 43 with another VC
c3f0: 20 76 65 72 73 69 6f 6e 2e 20 43 68 65 63 6b 20 version. Check
c400: 66 6f 72 20 74 68 69 73 20 61 6e 64 20 66 69 78 for this and fix
c410: 20 61 63 63 6f 72 64 69 6e 67 6c 79 2e 0a 73 74 accordingly..st
c420: 75 62 73 63 66 6c 61 67 73 20 3d 20 24 28 63 66 ubscflags = $(cf
c430: 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 lags) $(PKGNAMEF
c440: 4c 41 47 53 29 20 24 28 50 52 4a 5f 44 45 46 49 LAGS) $(PRJ_DEFI
c450: 4e 45 53 29 20 24 28 4f 50 54 44 45 46 49 4e 45 NES) $(OPTDEFINE
c460: 53 29 20 2f 5a 6c 20 2f 47 4c 2d 20 2f 44 53 54 S) /Zl /GL- /DST
c470: 41 54 49 43 5f 42 55 49 4c 44 20 24 28 49 4e 43 ATIC_BUILD $(INC
c480: 4c 55 44 45 53 29 20 24 28 55 53 45 5f 53 54 55 LUDES) $(USE_STU
c490: 42 53 5f 44 45 46 53 29 0a 0a 23 20 4c 69 6e 6b BS_DEFS)..# Link
c4a0: 20 66 6c 61 67 73 0a 0a 21 69 66 20 24 28 44 45 flags..!if $(DE
c4b0: 42 55 47 29 0a 6c 64 65 62 75 67 09 3d 20 2d 64 BUG).ldebug.= -d
c4c0: 65 62 75 67 20 2d 64 65 62 75 67 74 79 70 65 3a ebug -debugtype:
c4d0: 63 76 0a 21 65 6c 73 65 0a 6c 64 65 62 75 67 09 cv.!else.ldebug.
c4e0: 3d 20 2d 72 65 6c 65 61 73 65 20 2d 6f 70 74 3a = -release -opt:
c4f0: 72 65 66 20 2d 6f 70 74 3a 69 63 66 2c 33 0a 21 ref -opt:icf,3.!
c500: 69 66 20 24 28 53 59 4d 42 4f 4c 53 29 0a 6c 64 if $(SYMBOLS).ld
c510: 65 62 75 67 09 3d 20 24 28 6c 64 65 62 75 67 29 ebug.= $(ldebug)
c520: 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67 74 79 -debug -debugty
c530: 70 65 3a 63 76 0a 21 65 6e 64 69 66 0a 21 65 6e pe:cv.!endif.!en
c540: 64 69 66 0a 0a 23 20 4e 6f 74 65 3a 20 50 72 6f dif..# Note: Pro
c550: 66 69 6c 69 6e 67 20 69 73 20 63 75 72 72 65 6e filing is curren
c560: 74 6c 79 20 6f 6e 6c 79 20 70 6f 73 73 69 62 6c tly only possibl
c570: 65 20 77 69 74 68 20 74 68 65 20 56 69 73 75 61 e with the Visua
c580: 6c 20 53 74 75 64 69 6f 20 45 6e 74 65 72 70 72 l Studio Enterpr
c590: 69 73 65 0a 21 69 66 20 24 28 50 52 4f 46 49 4c ise.!if $(PROFIL
c5a0: 45 29 0a 6c 64 65 62 75 67 3d 20 24 28 6c 64 65 E).ldebug= $(lde
c5b0: 62 75 67 29 20 2d 70 72 6f 66 69 6c 65 0a 21 65 bug) -profile.!e
c5c0: 6e 64 69 66 0a 0a 23 23 23 20 44 65 63 6c 61 72 ndif..### Declar
c5d0: 61 74 69 6f 6e 73 20 63 6f 6d 6d 6f 6e 20 74 6f ations common to
c5e0: 20 61 6c 6c 20 6c 69 6e 6b 65 72 20 76 65 72 73 all linker vers
c5f0: 69 6f 6e 73 0a 6c 66 6c 61 67 73 09 3d 20 2d 6e ions.lflags.= -n
c600: 6f 6c 6f 67 6f 20 2d 6d 61 63 68 69 6e 65 3a 24 ologo -machine:$
c610: 28 4d 41 43 48 49 4e 45 29 20 24 28 4c 49 4e 4b (MACHINE) $(LINK
c620: 45 52 46 4c 41 47 53 29 20 24 28 6c 64 65 62 75 ERFLAGS) $(ldebu
c630: 67 29 0a 0a 21 69 66 20 24 28 4d 53 56 43 52 54 g)..!if $(MSVCRT
c640: 29 20 26 26 20 21 28 24 28 44 45 42 55 47 29 20 ) && !($(DEBUG)
c650: 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 && !$(UNCHECKED)
c660: 29 20 26 26 20 24 28 56 43 56 45 52 53 49 4f 4e ) && $(VCVERSION
c670: 29 20 3e 3d 20 31 39 30 30 0a 6c 66 6c 61 67 73 ) >= 1900.lflags
c680: 09 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 6e 6f .= $(lflags) -no
c690: 64 65 66 61 75 6c 74 6c 69 62 3a 75 63 72 74 2e defaultlib:ucrt.
c6a0: 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 64 6c 6c 6c lib.!endif..dlll
c6b0: 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 flags = $(lflags
c6c0: 29 20 2d 64 6c 6c 0a 63 6f 6e 6c 66 6c 61 67 73 ) -dll.conlflags
c6d0: 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 73 75 = $(lflags) -su
c6e0: 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f 6c 65 0a bsystem:console.
c6f0: 67 75 69 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 guilflags = $(lf
c700: 6c 61 67 73 29 20 2d 73 75 62 73 79 73 74 65 6d lags) -subsystem
c710: 3a 77 69 6e 64 6f 77 73 0a 0a 23 20 4c 69 62 72 :windows..# Libr
c720: 61 72 69 65 73 20 74 68 61 74 20 61 72 65 20 72 aries that are r
c730: 65 71 75 69 72 65 64 20 66 6f 72 20 65 76 65 72 equired for ever
c740: 79 20 69 6d 61 67 65 2e 0a 23 20 45 78 74 65 6e y image..# Exten
c750: 73 69 6f 6e 73 20 73 68 6f 75 6c 64 20 64 65 66 sions should def
c760: 69 6e 65 20 61 6e 79 20 61 64 64 69 74 69 6f 6e ine any addition
c770: 61 6c 20 6c 69 62 72 61 72 69 65 73 20 77 69 74 al libraries wit
c780: 68 20 24 28 50 52 4a 5f 4c 49 42 53 29 0a 77 69 h $(PRJ_LIBS).wi
c790: 6e 6c 69 62 73 20 20 20 3d 20 6b 65 72 6e 65 6c nlibs = kernel
c7a0: 33 32 2e 6c 69 62 20 61 64 76 61 70 69 33 32 2e 32.lib advapi32.
c7b0: 6c 69 62 0a 0a 21 69 66 20 24 28 4e 45 45 44 5f lib..!if $(NEED_
c7c0: 54 4b 29 0a 77 69 6e 6c 69 62 73 20 3d 20 24 28 TK).winlibs = $(
c7d0: 77 69 6e 6c 69 62 73 29 20 67 64 69 33 32 2e 6c winlibs) gdi32.l
c7e0: 69 62 20 75 73 65 72 33 32 2e 6c 69 62 20 75 78 ib user32.lib ux
c7f0: 74 68 65 6d 65 2e 6c 69 62 0a 21 65 6e 64 69 66 theme.lib.!endif
c800: 0a 0a 23 20 41 76 6f 69 64 20 27 75 6e 72 65 73 ..# Avoid 'unres
c810: 6f 6c 76 65 64 20 65 78 74 65 72 6e 61 6c 20 73 olved external s
c820: 79 6d 62 6f 6c 20 5f 5f 73 65 63 75 72 69 74 79 ymbol __security
c830: 5f 63 6f 6f 6b 69 65 27 20 65 72 72 6f 72 73 2e _cookie' errors.
c840: 0a 23 20 63 2e 66 2e 20 68 74 74 70 3a 2f 2f 73 .# c.f. http://s
c850: 75 70 70 6f 72 74 2e 6d 69 63 72 6f 73 6f 66 74 upport.microsoft
c860: 2e 63 6f 6d 2f 3f 69 64 3d 38 39 34 35 37 33 0a .com/?id=894573.
c870: 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 !if "$(MACHINE)"
c880: 20 3d 3d 20 22 41 4d 44 36 34 22 0a 21 69 66 20 == "AMD64".!if
c890: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 $(VCVERSION) > 1
c8a0: 33 39 39 20 26 26 20 24 28 56 43 56 45 52 53 49 399 && $(VCVERSI
c8b0: 4f 4e 29 20 3c 20 31 35 30 30 0a 77 69 6e 6c 69 ON) < 1500.winli
c8c0: 62 73 20 20 20 3d 20 24 28 77 69 6e 6c 69 62 73 bs = $(winlibs
c8d0: 29 20 62 75 66 66 65 72 6f 76 65 72 66 6c 6f 77 ) bufferoverflow
c8e0: 55 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 21 65 6e U.lib.!endif.!en
c8f0: 64 69 66 0a 0a 62 61 73 65 6c 69 62 73 20 3d 20 dif..baselibs =
c900: 24 28 77 69 6e 6c 69 62 73 29 20 24 28 50 52 4a $(winlibs) $(PRJ
c910: 5f 4c 49 42 53 29 0a 0a 21 69 66 20 24 28 4d 53 _LIBS)..!if $(MS
c920: 56 43 52 54 29 20 26 26 20 21 28 24 28 44 45 42 VCRT) && !($(DEB
c930: 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 UG) && !$(UNCHEC
c940: 4b 45 44 29 29 20 26 26 20 24 28 56 43 56 45 52 KED)) && $(VCVER
c950: 53 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0a 62 61 SION) >= 1900.ba
c960: 73 65 6c 69 62 73 20 20 20 3d 20 24 28 62 61 73 selibs = $(bas
c970: 65 6c 69 62 73 29 20 75 63 72 74 2e 6c 69 62 0a elibs) ucrt.lib.
c980: 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 !endif..########
c990: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c9a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c9b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c9c0: 23 23 23 23 23 23 23 23 0a 23 20 31 33 2e 20 44 ########.# 13. D
c9d0: 65 66 69 6e 65 20 73 74 61 6e 64 61 72 64 20 63 efine standard c
c9e0: 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d 6d 6f 6e 20 ommands, common
c9f0: 6d 61 6b 65 20 74 61 72 67 65 74 73 20 61 6e 64 make targets and
ca00: 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 0a implicit rules.
ca10: 0a 43 43 50 4b 47 43 4d 44 20 3d 20 24 28 63 63 .CCPKGCMD = $(cc
ca20: 33 32 29 20 24 28 70 6b 67 63 66 6c 61 67 73 29 32) $(pkgcflags)
ca30: 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c -Fo$(TMP_DIR)^\
ca40: 0a 43 43 41 50 50 43 4d 44 20 3d 20 24 28 63 63 .CCAPPCMD = $(cc
ca50: 33 32 29 20 24 28 61 70 70 63 66 6c 61 67 73 29 32) $(appcflags)
ca60: 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c -Fo$(TMP_DIR)^\
ca70: 0a 43 43 53 54 55 42 53 43 4d 44 20 3d 20 24 28 .CCSTUBSCMD = $(
ca80: 63 63 33 32 29 20 24 28 73 74 75 62 73 63 66 6c cc32) $(stubscfl
ca90: 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 ags) -Fo$(TMP_DI
caa0: 52 29 5e 5c 0a 0a 4c 49 42 43 4d 44 20 3d 20 24 R)^\..LIBCMD = $
cab0: 28 6c 69 62 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 (lib32) -nologo
cac0: 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d $(LINKERFLAGS) -
cad0: 6f 75 74 3a 24 40 0a 44 4c 4c 43 4d 44 20 3d 20 out:$@.DLLCMD =
cae0: 24 28 6c 69 6e 6b 33 32 29 20 24 28 64 6c 6c 6c $(link32) $(dlll
caf0: 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 flags) -out:$@ $
cb00: 28 62 61 73 65 6c 69 62 73 29 20 24 28 74 63 6c (baselibs) $(tcl
cb10: 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 73 29 0a libs) $(tklibs).
cb20: 0a 43 4f 4e 45 58 45 43 4d 44 20 3d 20 24 28 6c .CONEXECMD = $(l
cb30: 69 6e 6b 33 32 29 20 24 28 63 6f 6e 6c 66 6c 61 ink32) $(conlfla
cb40: 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 gs) -out:$@ $(ba
cb50: 73 65 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 selibs) $(tcllib
cb60: 73 29 20 24 28 74 6b 6c 69 62 73 29 0a 47 55 49 s) $(tklibs).GUI
cb70: 45 58 45 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 EXECMD = $(link3
cb80: 32 29 20 24 28 67 75 69 6c 66 6c 61 67 73 29 20 2) $(guilflags)
cb90: 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 -out:$@ $(baseli
cba0: 62 73 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 bs) $(tcllibs) $
cbb0: 28 74 6b 6c 69 62 73 29 0a 52 45 53 43 4d 44 20 (tklibs).RESCMD
cbc0: 20 3d 20 24 28 72 63 33 32 29 20 2d 66 6f 20 24 = $(rc32) -fo $
cbd0: 40 20 2d 72 20 2d 69 20 22 24 28 47 45 4e 45 52 @ -r -i "$(GENER
cbe0: 49 43 44 49 52 29 22 20 2d 69 20 22 24 28 54 4d ICDIR)" -i "$(TM
cbf0: 50 5f 44 49 52 29 22 20 5c 0a 09 20 20 20 20 24 P_DIR)" \.. $
cc00: 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 2f (TCL_INCLUDES) /
cc10: 44 53 54 41 54 49 43 5f 42 55 49 4c 44 3d 24 28 DSTATIC_BUILD=$(
cc20: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 5c 0a STATIC_BUILD) \.
cc30: 09 20 20 20 20 2f 44 44 45 42 55 47 3d 24 28 44 . /DDEBUG=$(D
cc40: 45 42 55 47 29 20 2d 64 20 55 4e 43 48 45 43 4b EBUG) -d UNCHECK
cc50: 45 44 3d 24 28 55 4e 43 48 45 43 4b 45 44 29 20 ED=$(UNCHECKED)
cc60: 5c 0a 09 20 20 20 20 2f 44 43 4f 4d 4d 41 56 45 \.. /DCOMMAVE
cc70: 52 53 49 4f 4e 3d 24 28 52 43 43 4f 4d 4d 41 56 RSION=$(RCCOMMAV
cc80: 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 2f ERSION) \.. /
cc90: 44 44 4f 54 56 45 52 53 49 4f 4e 3d 5c 22 24 28 DDOTVERSION=\"$(
cca0: 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 20 5c 0a DOTVERSION)\" \.
ccb0: 09 20 20 20 20 2f 44 56 45 52 53 49 4f 4e 3d 5c . /DVERSION=\
ccc0: 22 24 28 56 45 52 53 49 4f 4e 29 5c 22 20 5c 0a "$(VERSION)\" \.
ccd0: 09 20 20 20 20 2f 44 53 55 46 58 3d 5c 22 24 28 . /DSUFX=\"$(
cce0: 53 55 46 58 29 5c 22 20 5c 0a 09 20 20 20 20 2f SUFX)\" \.. /
ccf0: 44 50 52 4f 4a 45 43 54 3d 5c 22 24 28 50 52 4f DPROJECT=\"$(PRO
cd00: 4a 45 43 54 29 5c 22 20 5c 0a 09 20 20 20 20 2f JECT)\" \.. /
cd10: 44 50 52 4a 4c 49 42 4e 41 4d 45 3d 5c 22 24 28 DPRJLIBNAME=\"$(
cd20: 50 52 4a 4c 49 42 4e 41 4d 45 29 5c 22 0a 0a 21 PRJLIBNAME)\"..!
cd30: 69 66 6e 64 65 66 20 44 45 46 41 55 4c 54 5f 42 ifndef DEFAULT_B
cd40: 55 49 4c 44 5f 54 41 52 47 45 54 0a 44 45 46 41 UILD_TARGET.DEFA
cd50: 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 ULT_BUILD_TARGET
cd60: 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 0a 21 65 = $(PROJECT).!e
cd70: 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 2d 74 61 ndif..default-ta
cd80: 72 67 65 74 3a 20 24 28 44 45 46 41 55 4c 54 5f rget: $(DEFAULT_
cd90: 42 55 49 4c 44 5f 54 41 52 47 45 54 29 0a 0a 21 BUILD_TARGET)..!
cda0: 69 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 46 4f if $(MULTIPLATFO
cdb0: 52 4d 5f 49 4e 53 54 41 4c 4c 29 0a 64 65 66 61 RM_INSTALL).defa
cdc0: 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a 0a 09 40 ult-pkgindex:..@
cdd0: 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 echo if {[packag
cde0: 65 20 76 73 61 74 69 73 66 69 65 73 20 5b 70 61 e vsatisfies [pa
cdf0: 63 6b 61 67 65 20 70 72 6f 76 69 64 65 20 54 63 ckage provide Tc
ce00: 6c 5d 20 39 2e 30 5d 7d 20 7b 20 3e 20 24 28 4f l] 9.0]} { > $(O
ce10: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
ce20: 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b .tcl..@echo pack
ce30: 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 age ifneeded $(P
ce40: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
ce50: 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e ME) $(DOTVERSION
ce60: 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c ) \.. [list l
ce70: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 oad [file join $
ce80: 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f $dir $(PLATFORM_
ce90: 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c IDENTIFY) $(PRJL
cea0: 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 IBNAME9)]] >> $(
ceb0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
cec0: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 65 x.tcl..@echo } e
ced0: 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 lse { >> $(OUT_D
cee0: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
cef0: 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 ..@echo package
cf00: 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 ifneeded $(PRJ_P
cf10: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 ACKAGE_TCLNAME)
cf20: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0a $(DOTVERSION) \.
cf30: 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 . [list load
cf40: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 [file join $$dir
cf50: 20 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e $(PLATFORM_IDEN
cf60: 54 49 46 59 29 20 24 28 50 52 4a 4c 49 42 4e 41 TIFY) $(PRJLIBNA
cf70: 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f ME8)]] >> $(OUT_
cf80: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 DIR)\pkgIndex.tc
cf90: 6c 0a 09 40 65 63 68 6f 20 7d 20 3e 3e 20 24 28 l..@echo } >> $(
cfa0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
cfb0: 78 2e 74 63 6c 0a 21 65 6c 73 65 0a 64 65 66 61 x.tcl.!else.defa
cfc0: 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a 0a 09 40 ult-pkgindex:..@
cfd0: 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 echo if {[packag
cfe0: 65 20 76 73 61 74 69 73 66 69 65 73 20 5b 70 61 e vsatisfies [pa
cff0: 63 6b 61 67 65 20 70 72 6f 76 69 64 65 20 54 63 ckage provide Tc
d000: 6c 5d 20 39 2e 30 5d 7d 20 7b 20 3e 20 24 28 4f l] 9.0]} { > $(O
d010: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d020: 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b .tcl..@echo pack
d030: 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 age ifneeded $(P
d040: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
d050: 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e ME) $(DOTVERSION
d060: 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c ) \.. [list l
d070: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 oad [file join $
d080: 24 64 69 72 20 24 28 50 52 4a 4c 49 42 4e 41 4d $dir $(PRJLIBNAM
d090: 45 39 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 E9)]] >> $(OUT_D
d0a0: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d0b0: 0a 09 40 65 63 68 6f 20 7d 20 65 6c 73 65 20 7b ..@echo } else {
d0c0: 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 >> $(OUT_DIR)\p
d0d0: 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 kgIndex.tcl..@ec
d0e0: 68 6f 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 ho package ifnee
d0f0: 64 65 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 ded $(PRJ_PACKAG
d100: 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 E_TCLNAME) $(DOT
d110: 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 VERSION) \..
d120: 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 [list load [file
d130: 20 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 join $$dir $(PR
d140: 4a 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 JLIBNAME8)]] >>
d150: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
d160: 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d dex.tcl..@echo }
d170: 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 >> $(OUT_DIR)\p
d180: 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 21 65 6e 64 kgIndex.tcl.!end
d190: 69 66 0a 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 if..default-pkgi
d1a0: 6e 64 65 78 2d 74 65 61 3a 0a 09 40 69 66 20 65 ndex-tea:..@if e
d1b0: 78 69 73 74 20 24 28 52 4f 4f 54 29 5c 70 6b 67 xist $(ROOT)\pkg
d1c0: 49 6e 64 65 78 2e 74 63 6c 2e 69 6e 20 6e 6d 61 Index.tcl.in nma
d1d0: 6b 65 68 6c 70 20 2d 73 20 3c 3c 20 24 28 52 4f kehlp -s << $(RO
d1e0: 4f 54 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c OT)\pkgIndex.tcl
d1f0: 2e 69 6e 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 .in > $(OUT_DIR)
d200: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 40 50 \pkgIndex.tcl.@P
d210: 41 43 4b 41 47 45 5f 56 45 52 53 49 4f 4e 40 20 ACKAGE_VERSION@
d220: 20 20 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 $(DOTVERSION)
d230: 0a 40 50 41 43 4b 41 47 45 5f 4e 41 4d 45 40 20 .@PACKAGE_NAME@
d240: 20 20 20 20 20 20 24 28 50 52 4a 5f 50 41 43 4b $(PRJ_PACK
d250: 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 41 AGE_TCLNAME).@PA
d260: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 40 20 20 CKAGE_TCLNAME@
d270: 20 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f $(PRJ_PACKAGE_
d280: 54 43 4c 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c 49 TCLNAME).@PKG_LI
d290: 42 5f 46 49 4c 45 40 20 20 20 20 20 20 20 24 28 B_FILE@ $(
d2a0: 50 52 4a 4c 49 42 4e 41 4d 45 29 0a 40 50 4b 47 PRJLIBNAME).@PKG
d2b0: 5f 4c 49 42 5f 46 49 4c 45 38 40 20 20 20 20 20 _LIB_FILE8@
d2c0: 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a $(PRJLIBNAME8).
d2d0: 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 39 40 20 @PKG_LIB_FILE9@
d2e0: 20 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d $(PRJLIBNAM
d2f0: 45 39 29 0a 3c 3c 0a 0a 64 65 66 61 75 6c 74 2d E9).<<..default-
d300: 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 install: default
d310: 2d 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 -install-binarie
d320: 73 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c s default-instal
d330: 6c 2d 6c 69 62 72 61 72 69 65 73 0a 21 69 66 20 l-libraries.!if
d340: 24 28 53 59 4d 42 4f 4c 53 29 0a 64 65 66 61 75 $(SYMBOLS).defau
d350: 6c 74 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 lt-install: defa
d360: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 ult-install-pdbs
d370: 0a 21 65 6e 64 69 66 0a 0a 23 20 41 67 61 69 6e .!endif..# Again
d380: 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 68 69 to deal with hi
d390: 73 74 6f 72 69 63 61 6c 20 62 72 6f 6b 65 6e 6e storical brokenn
d3a0: 65 73 73 2c 20 74 68 65 72 65 20 69 73 20 73 6f ess, there is so
d3b0: 6d 65 20 63 6f 6e 66 75 73 69 6f 6e 0a 23 20 69 me confusion.# i
d3c0: 6e 20 74 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 6f n terminlogy. Fo
d3d0: 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 74 68 r extensions, th
d3e0: 65 20 22 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 e "install-binar
d3f0: 69 65 73 22 20 77 61 73 20 75 73 65 64 20 74 6f ies" was used to
d400: 0a 23 20 6c 6f 63 61 74 65 20 74 61 72 67 65 74 .# locate target
d410: 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 2a directory for *
d420: 62 69 6e 61 72 79 20 73 68 61 72 65 64 20 6c 69 binary shared li
d430: 62 72 61 72 69 65 73 2a 20 61 6e 64 20 74 68 75 braries* and thu
d440: 73 0a 23 20 74 68 65 20 61 70 70 72 6f 70 72 69 s.# the appropri
d450: 61 74 65 20 6d 61 63 72 6f 20 69 73 20 4c 49 42 ate macro is LIB
d460: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 73 69 6e _INSTALL_DIR sin
d470: 63 65 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 ce BIN_INSTALL_D
d480: 49 52 20 69 73 0a 23 20 66 6f 72 20 65 78 65 63 IR is.# for exec
d490: 75 74 61 62 6c 65 73 20 28 65 78 65 73 29 2e 20 utables (exes).
d4a0: 4f 6e 20 74 68 65 20 6f 74 68 65 72 20 68 61 6e On the other han
d4b0: 64 20 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d 6c d the "install-l
d4c0: 69 62 72 61 72 69 65 73 22 0a 23 20 74 61 72 67 ibraries".# targ
d4d0: 65 74 20 69 73 20 66 6f 72 20 2a 73 63 72 69 70 et is for *scrip
d4e0: 74 73 2a 20 61 6e 64 20 73 68 6f 75 6c 64 20 68 ts* and should h
d4f0: 61 76 65 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 ave been called
d500: 22 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 "install-scripts
d510: 22 2e 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 "..default-insta
d520: 6c 6c 2d 62 69 6e 61 72 69 65 73 3a 20 24 28 50 ll-binaries: $(P
d530: 52 4a 4c 49 42 29 0a 09 40 65 63 68 6f 20 49 6e RJLIB)..@echo In
d540: 73 74 61 6c 6c 69 6e 67 20 62 69 6e 61 72 69 65 stalling binarie
d550: 73 20 74 6f 20 27 24 28 4c 49 42 5f 49 4e 53 54 s to '$(LIB_INST
d560: 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 66 20 6e ALL_DIR)'..@if n
d570: 6f 74 20 65 78 69 73 74 20 22 24 28 4c 49 42 5f ot exist "$(LIB_
d580: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b INSTALL_DIR)" mk
d590: 64 69 72 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 dir "$(LIB_INSTA
d5a0: 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 43 50 59 LL_DIR)"..@$(CPY
d5b0: 29 20 24 28 50 52 4a 4c 49 42 29 20 22 24 28 4c ) $(PRJLIB) "$(L
d5c0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 IB_INSTALL_DIR)"
d5d0: 20 3e 4e 55 4c 0a 0a 23 20 41 6c 69 61 73 20 66 >NUL..# Alias f
d5e0: 6f 72 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 or default-insta
d5f0: 6c 6c 2d 73 63 72 69 70 74 73 0a 64 65 66 61 75 ll-scripts.defau
d600: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 lt-install-libra
d610: 72 69 65 73 3a 20 64 65 66 61 75 6c 74 2d 69 6e ries: default-in
d620: 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 0a 0a 64 stall-scripts..d
d630: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 efault-install-s
d640: 63 72 69 70 74 73 3a 20 24 28 4f 55 54 5f 44 49 cripts: $(OUT_DI
d650: 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a R)\pkgIndex.tcl.
d660: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
d670: 67 20 6c 69 62 72 61 72 69 65 73 20 74 6f 20 27 g libraries to '
d680: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
d690: 5f 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 _DIR)'..@if not
d6a0: 65 78 69 73 74 20 22 24 28 53 43 52 49 50 54 5f exist "$(SCRIPT_
d6b0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b INSTALL_DIR)" mk
d6c0: 64 69 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e dir "$(SCRIPT_IN
d6d0: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 69 66 STALL_DIR)"..@if
d6e0: 20 65 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 exist $(LIBDIR)
d6f0: 20 24 28 43 50 59 29 20 24 28 4c 49 42 44 49 52 $(CPY) $(LIBDIR
d700: 29 5c 2a 2e 74 63 6c 20 22 24 28 53 43 52 49 50 )\*.tcl "$(SCRIP
d710: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a T_INSTALL_DIR)".
d720: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
d730: 67 20 70 61 63 6b 61 67 65 20 69 6e 64 65 78 20 g package index
d740: 69 6e 20 27 24 28 53 43 52 49 50 54 5f 49 4e 53 in '$(SCRIPT_INS
d750: 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 24 28 43 TALL_DIR)'..@$(C
d760: 50 59 29 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 PY) $(OUT_DIR)\p
d770: 6b 67 49 6e 64 65 78 2e 74 63 6c 20 24 28 53 43 kgIndex.tcl $(SC
d780: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
d790: 29 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 )..default-insta
d7a0: 6c 6c 2d 73 74 75 62 73 3a 0a 09 40 65 63 68 6f ll-stubs:..@echo
d7b0: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 73 74 75 62 Installing stub
d7c0: 73 20 6c 69 62 72 61 72 79 20 74 6f 20 27 24 28 s library to '$(
d7d0: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
d7e0: 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 IR)'..@if not ex
d7f0: 69 73 74 20 22 24 28 53 43 52 49 50 54 5f 49 4e ist "$(SCRIPT_IN
d800: 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 STALL_DIR)" mkdi
d810: 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 r "$(SCRIPT_INST
d820: 41 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 43 50 ALL_DIR)"..@$(CP
d830: 59 29 20 24 28 50 52 4a 53 54 55 42 4c 49 42 29 Y) $(PRJSTUBLIB)
d840: 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 "$(SCRIPT_INSTA
d850: 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0a 0a 64 LL_DIR)" >NUL..d
d860: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 efault-install-p
d870: 64 62 73 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 dbs:..@echo Inst
d880: 61 6c 6c 69 6e 67 20 50 44 42 73 20 74 6f 20 27 alling PDBs to '
d890: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
d8a0: 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 R)'..@if not exi
d8b0: 73 74 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c st "$(LIB_INSTAL
d8c0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
d8d0: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
d8e0: 29 22 0a 09 40 24 28 43 50 59 29 20 22 24 28 4f )"..@$(CPY) "$(O
d8f0: 55 54 5f 44 49 52 29 5c 2a 2e 70 64 62 22 20 22 UT_DIR)\*.pdb" "
d900: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
d910: 52 29 5c 22 0a 0a 23 20 22 65 6d 61 63 73 20 66 R)\"..# "emacs f
d920: 6f 6e 74 2d 6c 6f 63 6b 20 68 69 67 68 6c 69 67 ont-lock highlig
d930: 68 74 69 6e 67 20 66 69 78 0a 0a 64 65 66 61 75 hting fix..defau
d940: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d lt-install-docs-
d950: 68 74 6d 6c 3a 0a 09 40 65 63 68 6f 20 49 6e 73 html:..@echo Ins
d960: 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 talling document
d970: 61 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 ation files to '
d980: 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(DOC_INSTALL_DI
d990: 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 R)'..@if not exi
d9a0: 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c st "$(DOC_INSTAL
d9b0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
d9c0: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
d9d0: 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 )"..@if exist $(
d9e0: 44 4f 43 44 49 52 29 20 66 6f 72 20 25 66 20 69 DOCDIR) for %f i
d9f0: 6e 20 28 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e n ("$(DOCDIR)\*.
da00: 68 74 6d 6c 22 20 22 24 28 44 4f 43 44 49 52 29 html" "$(DOCDIR)
da10: 5c 2a 2e 63 73 73 22 20 22 24 28 44 4f 43 44 49 \*.css" "$(DOCDI
da20: 52 29 5c 2a 2e 70 6e 67 22 29 20 64 6f 20 40 24 R)\*.png") do @$
da30: 28 43 4f 50 59 29 20 25 66 20 22 24 28 44 4f 43 (COPY) %f "$(DOC
da40: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 0a _INSTALL_DIR)"..
da50: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
da60: 64 6f 63 73 2d 6e 3a 0a 09 40 65 63 68 6f 20 49 docs-n:..@echo I
da70: 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 nstalling docume
da80: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f ntation files to
da90: 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f '$(DOC_INSTALL_
daa0: 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 DIR)'..@if not e
dab0: 78 69 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 xist "$(DOC_INST
dac0: 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 ALL_DIR)" mkdir
dad0: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 "$(DOC_INSTALL_D
dae0: 49 52 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 IR)"..@if exist
daf0: 24 28 44 4f 43 44 49 52 29 20 66 6f 72 20 25 66 $(DOCDIR) for %f
db00: 20 69 6e 20 28 22 24 28 44 4f 43 44 49 52 29 5c in ("$(DOCDIR)\
db10: 2a 2e 6e 22 29 20 64 6f 20 40 24 28 43 4f 50 59 *.n") do @$(COPY
db20: 29 20 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 ) %f "$(DOC_INST
db30: 41 4c 4c 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 ALL_DIR)"..defau
db40: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 65 6d 6f 73 lt-install-demos
db50: 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c :..@echo Install
db60: 69 6e 67 20 64 65 6d 6f 73 20 74 6f 20 27 24 28 ing demos to '$(
db70: 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DEMO_INSTALL_DIR
db80: 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 )'..@if not exis
db90: 74 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c t "$(DEMO_INSTAL
dba0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
dbb0: 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 (DEMO_INSTALL_DI
dbc0: 52 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 24 R)"..@if exist $
dbd0: 28 44 45 4d 4f 44 49 52 29 20 24 28 43 50 59 44 (DEMODIR) $(CPYD
dbe0: 49 52 29 20 22 24 28 44 45 4d 4f 44 49 52 29 22 IR) "$(DEMODIR)"
dbf0: 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c "$(DEMO_INSTALL
dc00: 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d _DIR)"..default-
dc10: 63 6c 65 61 6e 3a 0a 09 40 65 63 68 6f 20 43 6c clean:..@echo Cl
dc20: 65 61 6e 69 6e 67 20 24 28 54 4d 50 5f 44 49 52 eaning $(TMP_DIR
dc30: 29 5c 2a 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 )\* .....@if exi
dc40: 73 74 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 st $(TMP_DIR)\nu
dc50: 6c 20 24 28 52 4d 44 49 52 29 20 24 28 54 4d 50 l $(RMDIR) $(TMP
dc60: 5f 44 49 52 29 0a 09 40 65 63 68 6f 20 43 6c 65 _DIR)..@echo Cle
dc70: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
dc80: 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 2c 20 6e \nmakehlp.obj, n
dc90: 6d 61 6b 65 68 6c 70 2e 65 78 65 20 2e 2e 2e 0a makehlp.exe ....
dca0: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
dcb0: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
dcc0: 62 6a 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 bj del $(WIN_DIR
dcd0: 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 0a 09 )\nmakehlp.obj..
dce0: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
dcf0: 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 DIR)\nmakehlp.ex
dd00: 65 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 e del $(WIN_DIR)
dd10: 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 0a 09 40 \nmakehlp.exe..@
dd20: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 if exist $(WIN_D
dd30: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 IR)\nmakehlp.out
dd40: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c del $(WIN_DIR)\
dd50: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 09 40 65 nmakehlp.out..@e
dd60: 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 cho Cleaning $(W
dd70: 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 IN_DIR)\nmhlp-ou
dd80: 74 2e 74 78 74 20 2e 2e 2e 0a 09 40 69 66 20 65 t.txt .....@if e
dd90: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
dda0: 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 64 65 nmhlp-out.txt de
ddb0: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 l $(WIN_DIR)\nmh
ddc0: 6c 70 2d 6f 75 74 2e 74 78 74 0a 09 40 65 63 68 lp-out.txt..@ech
ddd0: 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e o Cleaning $(WIN
dde0: 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 _DIR)\_junk.pch
ddf0: 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
de00: 28 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e (WIN_DIR)\_junk.
de10: 70 63 68 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 pch del $(WIN_DI
de20: 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 0a 09 40 65 R)\_junk.pch..@e
de30: 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 cho Cleaning $(W
de40: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 2c IN_DIR)\vercl.x,
de50: 20 76 65 72 63 6c 2e 69 20 2e 2e 2e 0a 09 40 69 vercl.i .....@i
de60: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
de70: 52 29 5c 76 65 72 63 6c 2e 78 20 64 65 6c 20 24 R)\vercl.x del $
de80: 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e (WIN_DIR)\vercl.
de90: 78 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 x..@if exist $(W
dea0: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 69 20 IN_DIR)\vercl.i
deb0: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 del $(WIN_DIR)\v
dec0: 65 72 63 6c 2e 69 0a 09 40 65 63 68 6f 20 43 6c ercl.i..@echo Cl
ded0: 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 eaning $(WIN_DIR
dee0: 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 2c 20 76 )\versions.vc, v
def0: 65 72 73 69 6f 6e 2e 76 63 20 2e 2e 2e 0a 09 40 ersion.vc .....@
df00: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 if exist $(WIN_D
df10: 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 20 IR)\versions.vc
df20: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 del $(WIN_DIR)\v
df30: 65 72 73 69 6f 6e 73 2e 76 63 0a 09 40 69 66 20 ersions.vc..@if
df40: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
df50: 5c 76 65 72 73 69 6f 6e 2e 76 63 20 64 65 6c 20 \version.vc del
df60: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 $(WIN_DIR)\versi
df70: 6f 6e 2e 76 63 0a 0a 64 65 66 61 75 6c 74 2d 68 on.vc..default-h
df80: 6f 73 65 3a 20 64 65 66 61 75 6c 74 2d 63 6c 65 ose: default-cle
df90: 61 6e 0a 09 40 65 63 68 6f 20 48 6f 73 69 6e 67 an..@echo Hosing
dfa0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 2a 20 2e 2e $(OUT_DIR)\* ..
dfb0: 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 4f ...@if exist $(O
dfc0: 55 54 5f 44 49 52 29 5c 6e 75 6c 20 24 28 52 4d UT_DIR)\nul $(RM
dfd0: 44 49 52 29 20 24 28 4f 55 54 5f 44 49 52 29 0a DIR) $(OUT_DIR).
dfe0: 0a 23 20 4f 6e 6c 79 20 66 6f 72 20 62 61 63 6b .# Only for back
dff0: 77 61 72 64 20 63 6f 6d 70 61 74 69 62 69 6c 69 ward compatibili
e000: 74 79 0a 64 65 66 61 75 6c 74 2d 64 69 73 74 63 ty.default-distc
e010: 6c 65 61 6e 3a 20 64 65 66 61 75 6c 74 2d 68 6f lean: default-ho
e020: 73 65 0a 0a 64 65 66 61 75 6c 74 2d 73 65 74 75 se..default-setu
e030: 70 3a 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 p:..@if not exis
e040: 74 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e 75 6c t $(OUT_DIR)\nul
e050: 20 6d 6b 64 69 72 20 24 28 4f 55 54 5f 44 49 52 mkdir $(OUT_DIR
e060: 29 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 )..@if not exist
e070: 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 $(TMP_DIR)\nul
e080: 6d 6b 64 69 72 20 24 28 54 4d 50 5f 44 49 52 29 mkdir $(TMP_DIR)
e090: 0a 0a 21 69 66 20 22 24 28 54 45 53 54 50 41 54 ..!if "$(TESTPAT
e0a0: 29 22 20 21 3d 20 22 22 0a 54 45 53 54 46 4c 41 )" != "".TESTFLA
e0b0: 47 53 20 3d 20 24 28 54 45 53 54 46 4c 41 47 53 GS = $(TESTFLAGS
e0c0: 29 20 2d 66 69 6c 65 20 24 28 54 45 53 54 50 41 ) -file $(TESTPA
e0d0: 54 29 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 T).!endif..defau
e0e0: 6c 74 2d 74 65 73 74 3a 20 64 65 66 61 75 6c 74 lt-test: default
e0f0: 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 43 54 -setup $(PROJECT
e100: 29 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 50 41 )..@set TCLLIBPA
e110: 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f TH=$(OUT_DIR:\=/
e120: 29 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 4c )..@if exist $(L
e130: 49 42 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e IBDIR) for %f in
e140: 20 28 22 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 ("$(LIBDIR)\*.t
e150: 63 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 cl") do @$(COPY)
e160: 20 25 66 20 22 24 28 4f 55 54 5f 44 49 52 29 22 %f "$(OUT_DIR)"
e170: 0a 09 63 64 20 22 24 28 54 45 53 54 44 49 52 29 ..cd "$(TESTDIR)
e180: 22 20 26 26 20 24 28 44 45 42 55 47 47 45 52 29 " && $(DEBUGGER)
e190: 20 24 28 54 43 4c 53 48 29 20 61 6c 6c 2e 74 63 $(TCLSH) all.tc
e1a0: 6c 20 24 28 54 45 53 54 46 4c 41 47 53 29 0a 0a l $(TESTFLAGS)..
e1b0: 64 65 66 61 75 6c 74 2d 73 68 65 6c 6c 3a 20 64 default-shell: d
e1c0: 65 66 61 75 6c 74 2d 73 65 74 75 70 20 24 28 50 efault-setup $(P
e1d0: 52 4f 4a 45 43 54 29 0a 09 40 73 65 74 20 54 43 ROJECT)..@set TC
e1e0: 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 54 5f 44 LLIBPATH=$(OUT_D
e1f0: 49 52 3a 5c 3d 2f 29 0a 09 40 69 66 20 65 78 69 IR:\=/)..@if exi
e200: 73 74 20 24 28 4c 49 42 44 49 52 29 20 66 6f 72 st $(LIBDIR) for
e210: 20 25 66 20 69 6e 20 28 22 24 28 4c 49 42 44 49 %f in ("$(LIBDI
e220: 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f 20 40 24 R)\*.tcl") do @$
e230: 28 43 4f 50 59 29 20 25 66 20 22 24 28 4f 55 54 (COPY) %f "$(OUT
e240: 5f 44 49 52 29 22 0a 09 24 28 44 45 42 55 47 47 _DIR)"..$(DEBUGG
e250: 45 52 29 20 24 28 54 43 4c 53 48 29 0a 0a 23 20 ER) $(TCLSH)..#
e260: 47 65 6e 65 72 61 74 69 6f 6e 20 6f 66 20 57 69 Generation of Wi
e270: 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 20 72 65 ndows version re
e280: 73 6f 75 72 63 65 0a 21 69 66 64 65 66 20 52 43 source.!ifdef RC
e290: 46 49 4c 45 0a 0a 23 20 4e 6f 74 65 3a 20 64 6f FILE..# Note: do
e2a0: 6e 27 74 20 75 73 65 20 24 2a 2a 20 69 6e 20 62 n't use $** in b
e2b0: 65 6c 6f 77 20 72 75 6c 65 20 62 65 63 61 75 73 elow rule becaus
e2c0: 65 20 74 68 65 72 65 20 6d 61 79 20 62 65 20 6f e there may be o
e2d0: 74 68 65 72 20 64 65 70 65 6e 64 65 6e 63 69 65 ther dependencie
e2e0: 73 0a 23 20 61 6e 64 20 6f 6e 6c 79 20 74 68 65 s.# and only the
e2f0: 20 22 6d 61 69 6e 22 20 72 63 20 6d 75 73 74 20 "main" rc must
e300: 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 be passed to the
e310: 20 72 65 73 6f 75 72 63 65 20 63 6f 6d 70 69 6c resource compil
e320: 65 72 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 er.$(TMP_DIR)\$(
e330: 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 PROJECT).res: $(
e340: 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 RCDIR)\$(PROJECT
e350: 29 2e 72 63 0a 09 24 28 52 45 53 43 4d 44 29 20 ).rc..$(RESCMD)
e360: 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 $(RCDIR)\$(PROJE
e370: 43 54 29 2e 72 63 0a 0a 21 65 6c 73 65 0a 0a 23 CT).rc..!else..#
e380: 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 If parent makef
e390: 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 ile has not defi
e3a0: 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 20 64 ned a resource d
e3b0: 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0a efinition file,.
e3c0: 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 72 61 # we will genera
e3d0: 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e te one from stan
e3e0: 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e 0a 24 dard template..$
e3f0: 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a (TMP_DIR)\$(PROJ
e400: 45 43 54 29 2e 72 65 73 3a 20 24 28 54 4d 50 5f ECT).res: $(TMP_
e410: 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e DIR)\$(PROJECT).
e420: 72 63 0a 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 rc..$(TMP_DIR)\$
e430: 28 50 52 4f 4a 45 43 54 29 2e 72 63 3a 0a 09 40 (PROJECT).rc:..@
e440: 24 28 43 4f 50 59 29 20 3c 3c 20 24 28 54 4d 50 $(COPY) << $(TMP
e450: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
e460: 2e 72 63 0a 23 69 6e 63 6c 75 64 65 20 3c 77 69 .rc.#include <wi
e470: 6e 76 65 72 2e 68 3e 0a 0a 56 53 5f 56 45 52 53 nver.h>..VS_VERS
e480: 49 4f 4e 5f 49 4e 46 4f 20 56 45 52 53 49 4f 4e ION_INFO VERSION
e490: 49 4e 46 4f 0a 20 46 49 4c 45 56 45 52 53 49 4f INFO. FILEVERSIO
e4a0: 4e 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 N.COMMAVERSION.
e4b0: 50 52 4f 44 55 43 54 56 45 52 53 49 4f 4e 09 43 PRODUCTVERSION.C
e4c0: 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 46 49 4c OMMAVERSION. FIL
e4d0: 45 46 4c 41 47 53 4d 41 53 4b 09 30 78 33 66 4c EFLAGSMASK.0x3fL
e4e0: 0a 23 69 66 64 65 66 20 44 45 42 55 47 0a 20 46 .#ifdef DEBUG. F
e4f0: 49 4c 45 46 4c 41 47 53 09 56 53 5f 46 46 5f 44 ILEFLAGS.VS_FF_D
e500: 45 42 55 47 0a 23 65 6c 73 65 0a 20 46 49 4c 45 EBUG.#else. FILE
e510: 46 4c 41 47 53 09 30 78 30 4c 0a 23 65 6e 64 69 FLAGS.0x0L.#endi
e520: 66 0a 20 46 49 4c 45 4f 53 09 09 56 4f 53 5f 4e f. FILEOS..VOS_N
e530: 54 5f 57 49 4e 44 4f 57 53 33 32 0a 20 46 49 4c T_WINDOWS32. FIL
e540: 45 54 59 50 45 09 56 46 54 5f 44 4c 4c 0a 20 46 ETYPE.VFT_DLL. F
e550: 49 4c 45 53 55 42 54 59 50 45 09 30 78 30 4c 0a ILESUBTYPE.0x0L.
e560: 42 45 47 49 4e 0a 20 20 20 20 42 4c 4f 43 4b 20 BEGIN. BLOCK
e570: 22 53 74 72 69 6e 67 46 69 6c 65 49 6e 66 6f 22 "StringFileInfo"
e580: 0a 20 20 20 20 42 45 47 49 4e 0a 09 42 4c 4f 43 . BEGIN..BLOC
e590: 4b 20 22 30 34 30 39 30 34 62 30 22 0a 09 42 45 K "040904b0"..BE
e5a0: 47 49 4e 0a 09 20 20 20 20 56 41 4c 55 45 20 22 GIN.. VALUE "
e5b0: 46 69 6c 65 44 65 73 63 72 69 70 74 69 6f 6e 22 FileDescription"
e5c0: 2c 20 20 22 54 63 6c 20 65 78 74 65 6e 73 69 6f , "Tcl extensio
e5d0: 6e 20 22 20 50 52 4f 4a 45 43 54 0a 09 20 20 20 n " PROJECT..
e5e0: 20 56 41 4c 55 45 20 22 4f 72 69 67 69 6e 61 6c VALUE "Original
e5f0: 46 69 6c 65 6e 61 6d 65 22 2c 20 50 52 4a 4c 49 Filename", PRJLI
e600: 42 4e 41 4d 45 0a 09 20 20 20 20 56 41 4c 55 45 BNAME.. VALUE
e610: 20 22 46 69 6c 65 56 65 72 73 69 6f 6e 22 2c 20 "FileVersion",
e620: 20 20 20 20 20 44 4f 54 56 45 52 53 49 4f 4e 0a DOTVERSION.
e630: 09 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f 64 . VALUE "Prod
e640: 75 63 74 4e 61 6d 65 22 2c 20 20 20 20 20 20 22 uctName", "
e650: 50 61 63 6b 61 67 65 20 22 20 50 52 4f 4a 45 43 Package " PROJEC
e660: 54 20 22 20 66 6f 72 20 54 63 6c 22 0a 09 20 20 T " for Tcl"..
e670: 20 20 56 41 4c 55 45 20 22 50 72 6f 64 75 63 74 VALUE "Product
e680: 56 65 72 73 69 6f 6e 22 2c 20 20 20 44 4f 54 56 Version", DOTV
e690: 45 52 53 49 4f 4e 0a 09 45 4e 44 0a 20 20 20 20 ERSION..END.
e6a0: 45 4e 44 0a 20 20 20 20 42 4c 4f 43 4b 20 22 56 END. BLOCK "V
e6b0: 61 72 46 69 6c 65 49 6e 66 6f 22 0a 20 20 20 20 arFileInfo".
e6c0: 42 45 47 49 4e 0a 09 56 41 4c 55 45 20 22 54 72 BEGIN..VALUE "Tr
e6d0: 61 6e 73 6c 61 74 69 6f 6e 22 2c 20 30 78 34 30 anslation", 0x40
e6e0: 39 2c 20 31 32 30 30 0a 20 20 20 20 45 4e 44 0a 9, 1200. END.
e6f0: 45 4e 44 0a 0a 3c 3c 0a 0a 21 65 6e 64 69 66 20 END..<<..!endif
e700: 23 20 69 66 64 65 66 20 52 43 46 49 4c 45 0a 0a # ifdef RCFILE..
e710: 21 69 66 6e 64 65 66 20 44 49 53 41 42 4c 45 5f !ifndef DISABLE_
e720: 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 0a 44 IMPLICIT_RULES.D
e730: 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f ISABLE_IMPLICIT_
e740: 52 55 4c 45 53 20 3d 20 30 0a 21 65 6e 64 69 66 RULES = 0.!endif
e750: 0a 0a 21 69 66 20 21 24 28 44 49 53 41 42 4c 45 ..!if !$(DISABLE
e760: 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 29 _IMPLICIT_RULES)
e770: 0a 23 20 49 6d 70 6c 69 63 69 74 20 72 75 6c 65 .# Implicit rule
e780: 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 2d 20 6f definitions - o
e790: 6e 6c 79 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 nly for building
e7a0: 20 6c 69 62 72 61 72 79 20 6f 62 6a 65 63 74 73 library objects
e7b0: 2e 20 46 6f 72 20 73 74 75 62 73 20 61 6e 64 0a . For stubs and.
e7c0: 23 20 6d 61 69 6e 20 61 70 70 6c 69 63 61 74 69 # main applicati
e7d0: 6f 6e 2c 20 74 68 65 20 6d 61 6b 65 66 69 6c 65 on, the makefile
e7e0: 20 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 65 should define e
e7f0: 78 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0a 0a xplicit rules...
e800: 7b 24 28 52 4f 4f 54 29 7d 2e 63 7b 24 28 54 4d {$(ROOT)}.c{$(TM
e810: 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 P_DIR)}.obj::..$
e820: 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 (CCPKGCMD) @<<.$
e830: 3c 0a 3c 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 <.<<..{$(WIN_DIR
e840: 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d )}.c{$(TMP_DIR)}
e850: 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 .obj::..$(CCPKGC
e860: 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b MD) @<<.$<.<<..{
e870: 24 28 47 45 4e 45 52 49 43 44 49 52 29 7d 2e 63 $(GENERICDIR)}.c
e880: 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a {$(TMP_DIR)}.obj
e890: 3a 3a 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 20 ::..$(CCPKGCMD)
e8a0: 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 43 4f @<<.$<.<<..{$(CO
e8b0: 4d 50 41 54 44 49 52 29 7d 2e 63 7b 24 28 54 4d MPATDIR)}.c{$(TM
e8c0: 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 P_DIR)}.obj::..$
e8d0: 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 (CCPKGCMD) @<<.$
e8e0: 3c 0a 3c 3c 0a 0a 7b 24 28 52 43 44 49 52 29 7d <.<<..{$(RCDIR)}
e8f0: 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e .rc{$(TMP_DIR)}.
e900: 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 res:..$(RESCMD)
e910: 24 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d $<..{$(WIN_DIR)}
e920: 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e .rc{$(TMP_DIR)}.
e930: 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 res:..$(RESCMD)
e940: 24 3c 0a 0a 7b 24 28 54 4d 50 5f 44 49 52 29 7d $<..{$(TMP_DIR)}
e950: 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e .rc{$(TMP_DIR)}.
e960: 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 res:..$(RESCMD)
e970: 24 3c 0a 0a 2e 53 55 46 46 49 58 45 53 3a 0a 2e $<...SUFFIXES:..
e980: 53 55 46 46 49 58 45 53 3a 2e 63 20 2e 72 63 0a SUFFIXES:.c .rc.
e990: 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 .!endif..#######
e9a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e9b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e9c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e9d0: 23 23 23 23 23 23 23 23 23 0a 23 20 31 34 2e 20 #########.# 14.
e9e0: 53 61 6e 69 74 79 20 63 68 65 63 6b 20 73 65 6c Sanity check sel
e9f0: 65 63 74 65 64 20 6f 70 74 69 6f 6e 73 20 61 67 ected options ag
ea00: 61 69 6e 73 74 20 54 63 6c 20 62 75 69 6c 64 20 ainst Tcl build
ea10: 6f 70 74 69 6f 6e 73 0a 23 20 57 68 65 6e 20 62 options.# When b
ea20: 75 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e uilding an exten
ea30: 73 69 6f 6e 2c 20 63 65 72 74 61 69 6e 20 63 6f sion, certain co
ea40: 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 nfiguration opti
ea50: 6f 6e 73 20 73 68 6f 75 6c 64 0a 23 20 6d 61 74 ons should.# mat
ea60: 63 68 20 74 68 65 20 6f 6e 65 73 20 75 73 65 64 ch the ones used
ea70: 20 77 68 65 6e 20 54 63 6c 20 77 61 73 20 62 75 when Tcl was bu
ea80: 69 6c 74 2e 20 48 65 72 65 20 77 65 20 63 68 65 ilt. Here we che
ea90: 63 6b 20 61 6e 64 0a 23 20 77 61 72 6e 20 6f 6e ck and.# warn on
eaa0: 20 61 20 6d 69 73 6d 61 74 63 68 2e 0a 21 69 66 a mismatch..!if
eab0: 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a !$(DOING_TCL)..
eac0: 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c !if $(TCLINSTALL
ead0: 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 ) # Building aga
eae0: 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 inst an installe
eaf0: 64 20 54 63 6c 0a 21 69 66 20 65 78 69 73 74 28 d Tcl.!if exist(
eb00: 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c "$(_TCLDIR)\lib\
eb10: 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 nmake\tcl.nmake"
eb20: 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 ).TCLNMAKECONFIG
eb30: 20 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c = "$(_TCLDIR)\l
eb40: 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 ib\nmake\tcl.nma
eb50: 6b 65 22 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 ke".!endif.!else
eb60: 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c # !$(TCLINSTALL
eb70: 29 20 2d 20 62 75 69 6c 64 69 6e 67 20 61 67 61 ) - building aga
eb80: 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 0a inst Tcl source.
eb90: 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 !if exist("$(_TC
eba0: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
ebb0: 44 44 49 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 DDIRTOP)\tcl.nma
ebc0: 6b 65 22 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e ke").TCLNMAKECON
ebd0: 46 49 47 09 3d 20 22 24 28 5f 54 43 4c 44 49 52 FIG.= "$(_TCLDIR
ebe0: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
ebf0: 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0a TOP)\tcl.nmake".
ec00: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 !endif.!endif #
ec10: 54 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 TCLINSTALL..!if
ec20: 24 28 43 4f 4e 46 49 47 5f 43 48 45 43 4b 29 0a $(CONFIG_CHECK).
ec30: 21 69 66 64 65 66 20 54 43 4c 4e 4d 41 4b 45 43 !ifdef TCLNMAKEC
ec40: 4f 4e 46 49 47 0a 21 69 6e 63 6c 75 64 65 20 24 ONFIG.!include $
ec50: 28 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 29 (TCLNMAKECONFIG)
ec60: 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f ..!if defined(CO
ec70: 52 45 5f 4d 41 43 48 49 4e 45 29 20 26 26 20 22 RE_MACHINE) && "
ec80: 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 22 $(CORE_MACHINE)"
ec90: 20 21 3d 20 22 24 28 4d 41 43 48 49 4e 45 29 22 != "$(MACHINE)"
eca0: 0a 21 65 72 72 6f 72 20 45 52 52 4f 52 3a 20 42 .!error ERROR: B
ecb0: 75 69 6c 64 20 74 61 72 67 65 74 20 28 24 28 4d uild target ($(M
ecc0: 41 43 48 49 4e 45 29 29 20 64 6f 65 73 20 6e 6f ACHINE)) does no
ecd0: 74 20 6d 61 74 63 68 20 74 68 65 20 54 63 6c 20 t match the Tcl
ece0: 6c 69 62 72 61 72 79 20 61 72 63 68 69 74 65 63 library architec
ecf0: 74 75 72 65 20 28 24 28 43 4f 52 45 5f 4d 41 43 ture ($(CORE_MAC
ed00: 48 49 4e 45 29 29 2e 0a 21 65 6e 64 69 66 0a 21 HINE))..!endif.!
ed10: 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e if $(TCL_VERSION
ed20: 29 20 3c 20 38 37 20 26 26 20 64 65 66 69 6e 65 ) < 87 && define
ed30: 64 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 d(CORE_USE_THREA
ed40: 44 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 43 4f D_ALLOC) && $(CO
ed50: 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 4c RE_USE_THREAD_AL
ed60: 4c 4f 43 29 20 21 3d 20 24 28 55 53 45 5f 54 48 LOC) != $(USE_TH
ed70: 52 45 41 44 5f 41 4c 4c 4f 43 29 0a 21 6d 65 73 READ_ALLOC).!mes
ed80: 73 61 67 65 20 57 41 52 4e 49 4e 47 3a 20 56 61 sage WARNING: Va
ed90: 6c 75 65 20 6f 66 20 55 53 45 5f 54 48 52 45 41 lue of USE_THREA
eda0: 44 5f 41 4c 4c 4f 43 20 28 24 28 55 53 45 5f 54 D_ALLOC ($(USE_T
edb0: 48 52 45 41 44 5f 41 4c 4c 4f 43 29 29 20 64 6f HREAD_ALLOC)) do
edc0: 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 73 es not match its
edd0: 20 54 63 6c 20 63 6f 72 65 20 76 61 6c 75 65 20 Tcl core value
ede0: 28 24 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 ($(CORE_USE_THRE
edf0: 41 44 5f 41 4c 4c 4f 43 29 29 2e 0a 21 65 6e 64 AD_ALLOC))..!end
ee00: 69 66 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 if.!if defined(C
ee10: 4f 52 45 5f 44 45 42 55 47 29 20 26 26 20 24 28 ORE_DEBUG) && $(
ee20: 43 4f 52 45 5f 44 45 42 55 47 29 20 21 3d 20 24 CORE_DEBUG) != $
ee30: 28 44 45 42 55 47 29 0a 21 6d 65 73 73 61 67 65 (DEBUG).!message
ee40: 20 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20 WARNING: Value
ee50: 6f 66 20 44 45 42 55 47 20 28 24 28 44 45 42 55 of DEBUG ($(DEBU
ee60: 47 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 G)) does not mat
ee70: 63 68 20 69 74 73 20 54 63 6c 20 6c 69 62 72 61 ch its Tcl libra
ee80: 72 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e ry configuration
ee90: 20 28 24 28 44 45 42 55 47 29 29 2e 0a 21 65 6e ($(DEBUG))..!en
eea0: 64 69 66 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 dif.!endif..!end
eeb0: 69 66 20 23 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e if # TCLNMAKECON
eec0: 46 49 47 0a 0a 21 65 6e 64 69 66 20 23 20 21 24 FIG..!endif # !$
eed0: 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 0a 23 2d (DOING_TCL)...#-
eee0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
eef0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ef00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ef10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 44 69 73 70 ---------.# Disp
ef20: 6c 61 79 20 73 74 61 74 73 20 62 65 69 6e 67 20 lay stats being
ef30: 75 73 65 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d used..#---------
ef40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ef50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ef60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ef70: 2d 0a 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f -..!if !$(DOING_
ef80: 54 43 4c 29 0a 21 6d 65 73 73 61 67 65 20 2a 2a TCL).!message **
ef90: 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e * Building again
efa0: 73 74 20 54 63 6c 20 61 74 20 27 24 28 5f 54 43 st Tcl at '$(_TC
efb0: 4c 44 49 52 29 27 0a 21 65 6e 64 69 66 0a 21 69 LDIR)'.!endif.!i
efc0: 66 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 f !$(DOING_TK) &
efd0: 26 20 24 28 4e 45 45 44 5f 54 4b 29 0a 21 6d 65 & $(NEED_TK).!me
efe0: 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69 ssage *** Buildi
eff0: 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 61 74 ng against Tk at
f000: 20 27 24 28 5f 54 4b 44 49 52 29 27 0a 21 65 6e '$(_TKDIR)'.!en
f010: 64 69 66 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a dif.!message ***
f020: 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 64 69 Intermediate di
f030: 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 rectory will be
f040: 27 24 28 54 4d 50 5f 44 49 52 29 27 0a 21 6d 65 '$(TMP_DIR)'.!me
f050: 73 73 61 67 65 20 2a 2a 2a 20 4f 75 74 70 75 74 ssage *** Output
f060: 20 64 69 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 directory will
f070: 62 65 20 27 24 28 4f 55 54 5f 44 49 52 29 27 0a be '$(OUT_DIR)'.
f080: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e 73 !message *** Ins
f090: 74 61 6c 6c 61 74 69 6f 6e 2c 20 69 66 20 73 65 tallation, if se
f0a0: 6c 65 63 74 65 64 2c 20 77 69 6c 6c 20 62 65 20 lected, will be
f0b0: 69 6e 20 27 24 28 5f 49 4e 53 54 41 4c 4c 44 49 in '$(_INSTALLDI
f0c0: 52 29 27 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a R)'.!message ***
f0d0: 20 53 75 66 66 69 78 20 66 6f 72 20 62 69 6e 61 Suffix for bina
f0e0: 72 69 65 73 20 77 69 6c 6c 20 62 65 20 27 24 28 ries will be '$(
f0f0: 53 55 46 58 29 27 0a 21 6d 65 73 73 61 67 65 20 SUFX)'.!message
f100: 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 76 65 72 *** Compiler ver
f110: 73 69 6f 6e 20 24 28 56 43 56 45 52 29 2e 20 54 sion $(VCVER). T
f120: 61 72 67 65 74 20 24 28 4d 41 43 48 49 4e 45 29 arget $(MACHINE)
f130: 2c 20 68 6f 73 74 20 24 28 4e 41 54 49 56 45 5f , host $(NATIVE_
f140: 41 52 43 48 29 2e 0a 0a 21 65 6e 64 69 66 20 23 ARCH)...!endif #
f150: 20 69 66 64 65 66 20 5f 52 55 4c 45 53 5f 56 43 ifdef _RULES_VC
f160: 0a .