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 31 0a 0a ION_MINOR = 11..
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 0a 52 4d 44 49 52 09 3d 20 ------..RMDIR.=
1370: 72 6d 64 69 72 20 2f 53 20 2f 51 0a 43 50 59 09 rmdir /S /Q.CPY.
1380: 3d 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e = xcopy /i /y >N
1390: 55 4c 0a 43 50 59 44 49 52 20 20 3d 20 78 63 6f UL.CPYDIR = xco
13a0: 70 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e 55 4c py /e /i /y >NUL
13b0: 0a 43 4f 50 59 09 3d 20 63 6f 70 79 20 2f 79 20 .COPY.= copy /y
13c0: 3e 4e 55 4c 0a 4d 4b 44 49 52 20 20 20 3d 20 6d >NUL.MKDIR = m
13d0: 6b 64 69 72 0a 0a 23 23 23 23 23 23 23 23 23 23 kdir..##########
13e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
13f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1400: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1410: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 32 ############.# 2
1420: 2e 20 46 69 67 75 72 65 20 6f 75 74 20 6f 75 72 . Figure out our
1430: 20 62 75 69 6c 64 20 65 6e 76 69 72 6f 6e 6d 65 build environme
1440: 6e 74 20 69 6e 20 74 65 72 6d 73 20 6f 66 20 77 nt in terms of w
1450: 68 61 74 20 77 65 27 72 65 20 62 75 69 6c 64 69 hat we're buildi
1460: 6e 67 2e 0a 23 0a 23 20 28 61 29 20 54 63 6c 20 ng..#.# (a) Tcl
1470: 69 74 73 65 6c 66 0a 23 20 28 62 29 20 54 6b 0a itself.# (b) Tk.
1480: 23 20 28 63 29 20 61 20 54 63 6c 20 65 78 74 65 # (c) a Tcl exte
1490: 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 62 72 nsion using libr
14a0: 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 20 66 aries/includes f
14b0: 72 6f 6d 20 61 6e 20 2a 69 6e 73 74 61 6c 6c 65 rom an *installe
14c0: 64 2a 20 54 63 6c 0a 23 20 28 64 29 20 61 20 54 d* Tcl.# (d) a T
14d0: 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 69 cl extension usi
14e0: 6e 67 20 6c 69 62 72 61 72 69 65 73 2f 69 6e 63 ng libraries/inc
14f0: 6c 75 64 65 73 20 66 72 6f 6d 20 54 63 6c 20 73 ludes from Tcl s
1500: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 0a ource directory.
1510: 23 0a 23 20 54 68 69 73 20 6c 61 73 74 20 69 73 #.# This last is
1520: 20 6e 65 65 64 65 64 20 62 65 63 61 75 73 65 20 needed because
1530: 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 some extensions
1540: 73 74 69 6c 6c 20 6e 65 65 64 0a 23 20 73 6f 6d still need.# som
1550: 65 20 54 63 6c 20 69 6e 74 65 72 66 61 63 65 73 e Tcl interfaces
1560: 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 70 75 that are not pu
1570: 62 6c 69 63 6c 79 20 65 78 70 6f 73 65 64 2e 0a blicly exposed..
1580: 23 0a 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74 #.# The fragment
1590: 20 77 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f will set the fo
15a0: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a llowing macros:.
15b0: 23 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f 66 # ROOT - root of
15c0: 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f 75 this module sou
15d0: 72 63 65 73 0a 23 20 43 4f 4d 50 41 54 44 49 52 rces.# COMPATDIR
15e0: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 - source direct
15f0: 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 73 20 63 ory that holds c
1600: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 73 6f 75 ompatibility sou
1610: 72 63 65 73 0a 23 20 44 4f 43 44 49 52 20 2d 20 rces.# DOCDIR -
1620: 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 source directory
1630: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64 6f 63 75 containing docu
1640: 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 0a mentation files.
1650: 23 20 47 45 4e 45 52 49 43 44 49 52 20 2d 20 70 # GENERICDIR - p
1660: 6c 61 74 66 6f 72 6d 2d 69 6e 64 65 70 65 6e 64 latform-independ
1670: 65 6e 74 20 73 6f 75 72 63 65 20 64 69 72 65 63 ent source direc
1680: 74 6f 72 79 0a 23 20 57 49 4e 5f 44 49 52 20 2d tory.# WIN_DIR -
1690: 20 57 69 6e 64 6f 77 73 2d 73 70 65 63 69 66 69 Windows-specifi
16a0: 63 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f c source directo
16b0: 72 79 0a 23 20 54 45 53 54 44 49 52 20 2d 20 64 ry.# TESTDIR - d
16c0: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e irectory contain
16d0: 69 6e 67 20 74 65 73 74 20 66 69 6c 65 73 0a 23 ing test files.#
16e0: 20 54 4f 4f 4c 53 44 49 52 20 2d 20 64 69 72 65 TOOLSDIR - dire
16f0: 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 ctory containing
1700: 20 62 75 69 6c 64 20 74 6f 6f 6c 73 0a 23 20 5f build tools.# _
1710: 54 43 4c 44 49 52 20 2d 20 72 6f 6f 74 20 6f 66 TCLDIR - root of
1720: 20 74 68 65 20 54 63 6c 20 69 6e 73 74 61 6c 6c the Tcl install
1730: 61 74 69 6f 6e 20 4f 52 20 74 68 65 20 54 63 6c ation OR the Tcl
1740: 20 73 6f 75 72 63 65 73 2e 20 4e 6f 74 20 73 65 sources. Not se
1750: 74 0a 23 20 20 20 20 77 68 65 6e 20 62 75 69 6c t.# when buil
1760: 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e ding Tcl itself.
1770: 0a 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 2d .# _INSTALLDIR -
1780: 20 6e 61 74 69 76 65 20 66 6f 72 6d 20 6f 66 20 native form of
1790: 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e the installation
17a0: 20 70 61 74 68 2e 20 46 6f 72 20 54 63 6c 0a 23 path. For Tcl.#
17b0: 20 20 20 20 74 68 69 73 20 77 69 6c 6c 20 62 65 this will be
17c0: 20 74 68 65 20 72 6f 6f 74 20 6f 66 20 74 68 65 the root of the
17d0: 20 54 63 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f Tcl installatio
17e0: 6e 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e n. For extension
17f0: 73 0a 23 20 20 20 20 74 68 69 73 20 77 69 6c 6c s.# this will
1800: 20 62 65 20 74 68 65 20 6c 69 62 20 64 69 72 65 be the lib dire
1810: 63 74 6f 72 79 20 75 6e 64 65 72 20 74 68 65 20 ctory under the
1820: 72 6f 6f 74 2e 0a 23 20 54 43 4c 49 4e 53 54 41 root..# TCLINSTA
1830: 4c 4c 20 20 2d 20 73 65 74 20 74 6f 20 31 20 69 LL - set to 1 i
1840: 66 20 5f 54 43 4c 44 49 52 20 72 65 66 65 72 73 f _TCLDIR refers
1850: 20 74 6f 0a 23 20 20 20 20 68 65 61 64 65 72 73 to.# headers
1860: 20 61 6e 64 20 6c 69 62 72 61 72 69 65 73 20 66 and libraries f
1870: 72 6f 6d 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 rom an installed
1880: 20 54 63 6c 2c 20 61 6e 64 20 30 20 69 66 20 62 Tcl, and 0 if b
1890: 75 69 6c 74 20 61 67 61 69 6e 73 74 0a 23 20 20 uilt against.#
18a0: 20 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e Tcl sources. N
18b0: 6f 74 20 73 65 74 20 77 68 65 6e 20 62 75 69 6c ot set when buil
18c0: 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e ding Tcl itself.
18d0: 20 59 65 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 Yes, not very w
18e0: 65 6c 6c 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0a ell.# named..
18f0: 23 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69 76 # _TCL_H - nativ
1900: 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 63 e path to the tc
1910: 6c 2e 68 20 66 69 6c 65 0a 23 0a 23 20 49 66 20 l.h file.#.# If
1920: 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65 64 2c 20 Tk is involved,
1930: 61 6c 73 6f 20 73 65 74 73 20 74 68 65 20 66 6f also sets the fo
1940: 6c 6c 6f 77 69 6e 67 0a 23 20 5f 54 4b 44 49 52 llowing.# _TKDIR
1950: 20 2d 20 6e 61 74 69 76 65 20 66 6f 72 6d 20 54 - native form T
1960: 6b 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f k installation O
1970: 52 20 54 6b 20 73 6f 75 72 63 65 2e 20 4e 6f 74 R Tk source. Not
1980: 20 73 65 74 20 69 66 20 62 75 69 6c 64 69 6e 67 set if building
1990: 0a 23 20 20 20 20 54 6b 20 69 74 73 65 6c 66 2e .# Tk itself.
19a0: 0a 23 20 54 4b 49 4e 53 54 41 4c 4c 20 2d 20 73 .# TKINSTALL - s
19b0: 65 74 20 31 20 69 66 20 5f 54 4b 44 49 52 20 72 et 1 if _TKDIR r
19c0: 65 66 65 72 73 20 74 6f 20 69 6e 73 74 61 6c 6c efers to install
19d0: 65 64 20 54 6b 20 61 6e 64 20 30 20 69 66 20 54 ed Tk and 0 if T
19e0: 6b 20 73 6f 75 72 63 65 73 0a 23 20 5f 54 4b 5f k sources.# _TK_
19f0: 48 20 2d 20 6e 61 74 69 76 65 20 70 61 74 68 20 H - native path
1a00: 74 6f 20 74 68 65 20 74 6b 2e 68 20 66 69 6c 65 to the tk.h file
1a10: 0a 0a 23 20 52 6f 6f 74 20 64 69 72 65 63 74 6f ..# Root directo
1a20: 72 79 20 66 6f 72 20 73 6f 75 72 63 65 73 20 61 ry for sources a
1a30: 6e 64 20 61 73 73 75 6d 65 64 20 73 75 62 64 69 nd assumed subdi
1a40: 72 65 63 74 6f 72 69 65 73 0a 52 4f 4f 54 20 3d rectories.ROOT =
1a50: 20 24 28 4d 41 4b 45 44 49 52 29 5c 2e 2e 0a 23 $(MAKEDIR)\...#
1a60: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 The following p
1a70: 61 74 68 73 20 43 41 4e 4e 4f 54 20 68 61 76 65 aths CANNOT have
1a80: 20 73 70 61 63 65 73 20 69 6e 20 74 68 65 6d 20 spaces in them
1a90: 61 73 20 74 68 65 79 20 61 70 70 65 61 72 20 6f as they appear o
1aa0: 6e 20 74 68 65 0a 23 20 6c 65 66 74 20 73 69 64 n the.# left sid
1ab0: 65 20 6f 66 20 69 6d 70 6c 69 63 69 74 20 72 75 e of implicit ru
1ac0: 6c 65 73 2e 0a 21 69 66 6e 64 65 66 20 43 4f 4d les..!ifndef COM
1ad0: 50 41 54 44 49 52 0a 43 4f 4d 50 41 54 44 49 52 PATDIR.COMPATDIR
1ae0: 09 3d 20 24 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 .= $(ROOT)\compa
1af0: 74 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 t.!endif.!ifndef
1b00: 20 44 4f 43 44 49 52 0a 44 4f 43 44 49 52 09 09 DOCDIR.DOCDIR..
1b10: 3d 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0a 21 65 = $(ROOT)\doc.!e
1b20: 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 47 45 4e ndif.!ifndef GEN
1b30: 45 52 49 43 44 49 52 0a 47 45 4e 45 52 49 43 44 ERICDIR.GENERICD
1b40: 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 67 65 6e IR.= $(ROOT)\gen
1b50: 65 72 69 63 0a 21 65 6e 64 69 66 0a 21 69 66 6e eric.!endif.!ifn
1b60: 64 65 66 20 54 4f 4f 4c 53 44 49 52 0a 54 4f 4f def TOOLSDIR.TOO
1b70: 4c 53 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c LSDIR.= $(ROOT)\
1b80: 74 6f 6f 6c 73 0a 21 65 6e 64 69 66 0a 21 69 66 tools.!endif.!if
1b90: 6e 64 65 66 20 54 45 53 54 44 49 52 0a 54 45 53 ndef TESTDIR.TES
1ba0: 54 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 74 TDIR.= $(ROOT)\t
1bb0: 65 73 74 73 0a 21 65 6e 64 69 66 0a 21 69 66 6e ests.!endif.!ifn
1bc0: 64 65 66 20 4c 49 42 44 49 52 0a 21 69 66 20 65 def LIBDIR.!if e
1bd0: 78 69 73 74 28 22 24 28 52 4f 4f 54 29 5c 6c 69 xist("$(ROOT)\li
1be0: 62 72 61 72 79 22 29 0a 4c 49 42 44 49 52 20 20 brary").LIBDIR
1bf0: 20 20 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 = $(ROOT
1c00: 29 5c 6c 69 62 72 61 72 79 0a 21 65 6c 73 65 0a )\library.!else.
1c10: 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20 LIBDIR
1c20: 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 0a 21 65 = $(ROOT)\lib.!e
1c30: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 6e ndif.!endif.!ifn
1c40: 64 65 66 20 44 45 4d 4f 44 49 52 0a 21 69 66 20 def DEMODIR.!if
1c50: 65 78 69 73 74 28 22 24 28 4c 49 42 44 49 52 29 exist("$(LIBDIR)
1c60: 5c 64 65 6d 6f 73 22 29 0a 44 45 4d 4f 44 49 52 \demos").DEMODIR
1c70: 09 09 3d 20 24 28 4c 49 42 44 49 52 29 5c 64 65 ..= $(LIBDIR)\de
1c80: 6d 6f 73 0a 21 65 6c 73 65 0a 44 45 4d 4f 44 49 mos.!else.DEMODI
1c90: 52 09 09 3d 20 24 28 52 4f 4f 54 29 5c 64 65 6d R..= $(ROOT)\dem
1ca0: 6f 73 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 os.!endif.!endif
1cb0: 20 23 20 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 # ifndef DEMODI
1cc0: 52 0a 23 20 44 6f 20 4e 4f 54 20 75 73 65 20 57 R.# Do NOT use W
1cd0: 49 4e 44 49 52 20 62 65 63 61 75 73 65 20 69 74 INDIR because it
1ce0: 20 69 73 20 57 69 6e 64 6f 77 73 20 69 6e 74 65 is Windows inte
1cf0: 72 6e 61 6c 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 rnal environment
1d00: 0a 23 20 76 61 72 69 61 62 6c 65 20 74 6f 20 70 .# variable to p
1d10: 6f 69 6e 74 20 74 6f 20 63 3a 5c 77 69 6e 64 6f oint to c:\windo
1d20: 77 73 21 0a 57 49 4e 5f 44 49 52 09 09 3d 20 24 ws!.WIN_DIR..= $
1d30: 28 52 4f 4f 54 29 5c 77 69 6e 0a 0a 21 69 66 6e (ROOT)\win..!ifn
1d40: 64 65 66 20 52 43 44 49 52 0a 21 69 66 20 65 78 def RCDIR.!if ex
1d50: 69 73 74 28 22 24 28 57 49 4e 5f 44 49 52 29 5c ist("$(WIN_DIR)\
1d60: 72 63 22 29 0a 52 43 44 49 52 20 20 20 20 20 20 rc").RCDIR
1d70: 20 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 = $(WIN_DIR
1d80: 29 5c 72 63 0a 21 65 6c 73 65 0a 52 43 44 49 52 )\rc.!else.RCDIR
1d90: 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 57 = $(W
1da0: 49 4e 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 IN_DIR).!endif.!
1db0: 65 6e 64 69 66 0a 52 43 44 49 52 20 3d 20 24 28 endif.RCDIR = $(
1dc0: 52 43 44 49 52 3a 2f 3d 5c 29 0a 0a 23 20 54 68 RCDIR:/=\)..# Th
1dd0: 65 20 74 61 72 67 65 74 20 64 69 72 65 63 74 6f e target directo
1de0: 72 79 20 77 68 65 72 65 20 74 68 65 20 62 75 69 ry where the bui
1df0: 6c 74 20 70 61 63 6b 61 67 65 73 20 61 6e 64 20 lt packages and
1e00: 62 69 6e 61 72 69 65 73 20 77 69 6c 6c 20 62 65 binaries will be
1e10: 20 69 6e 73 74 61 6c 6c 65 64 2e 0a 23 20 49 4e installed..# IN
1e20: 53 54 41 4c 4c 44 49 52 20 69 73 20 74 68 65 20 STALLDIR is the
1e30: 28 6f 70 74 69 6f 6e 61 6c 29 20 70 61 74 68 20 (optional) path
1e40: 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 specified by the
1e50: 20 75 73 65 72 2e 0a 23 20 5f 49 4e 53 54 41 4c user..# _INSTAL
1e60: 4c 44 49 52 20 69 73 20 49 4e 53 54 41 4c 4c 44 LDIR is INSTALLD
1e70: 49 52 20 75 73 69 6e 67 20 74 68 65 20 62 61 63 IR using the bac
1e80: 6b 73 6c 61 73 68 20 73 65 70 61 72 61 74 6f 72 kslash separator
1e90: 20 73 79 6e 74 61 78 0a 21 69 66 64 65 66 20 49 syntax.!ifdef I
1ea0: 4e 53 54 41 4c 4c 44 49 52 0a 23 23 23 20 46 69 NSTALLDIR.### Fi
1eb0: 78 20 74 68 65 20 70 61 74 68 20 73 65 70 61 72 x the path separ
1ec0: 61 74 6f 72 73 2e 0a 5f 49 4e 53 54 41 4c 4c 44 ators.._INSTALLD
1ed0: 49 52 09 3d 20 24 28 49 4e 53 54 41 4c 4c 44 49 IR.= $(INSTALLDI
1ee0: 52 3a 2f 3d 5c 29 0a 21 65 6c 73 65 0a 23 23 23 R:/=\).!else.###
1ef0: 20 41 73 73 75 6d 65 20 74 68 65 20 6e 6f 72 6d Assume the norm
1f00: 61 6c 20 64 65 66 61 75 6c 74 2e 0a 5f 49 4e 53 al default.._INS
1f10: 54 41 4c 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 TALLDIR.= $(HOME
1f20: 44 52 49 56 45 29 5c 54 63 6c 0a 21 65 6e 64 69 DRIVE)\Tcl.!endi
1f30: 66 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 f..!if $(DOING_T
1f40: 43 4c 29 0a 0a 23 20 42 45 47 49 4e 20 43 61 73 CL)..# BEGIN Cas
1f50: 65 20 32 28 61 29 20 2d 20 42 75 69 6c 64 69 6e e 2(a) - Buildin
1f60: 67 20 54 63 6c 20 69 74 73 65 6c 66 0a 0a 23 20 g Tcl itself..#
1f70: 4f 6e 6c 79 20 6e 65 65 64 20 74 6f 20 64 65 66 Only need to def
1f80: 69 6e 65 20 5f 54 43 4c 5f 48 0a 5f 54 43 4c 5f ine _TCL_H._TCL_
1f90: 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 5c 74 H = ..\generic\t
1fa0: 63 6c 2e 68 0a 0a 23 20 45 4e 44 20 43 61 73 65 cl.h..# END Case
1fb0: 20 32 28 61 29 20 2d 20 42 75 69 6c 64 69 6e 67 2(a) - Building
1fc0: 20 54 63 6c 20 69 74 73 65 6c 66 0a 0a 21 65 6c Tcl itself..!el
1fd0: 73 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 seif $(DOING_TK)
1fe0: 0a 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 32 ..# BEGIN Case 2
1ff0: 28 62 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 (b) - Building T
2000: 6b 0a 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 k..TCLINSTALL =
2010: 30 20 23 20 54 6b 20 61 6c 77 61 79 73 20 62 75 0 # Tk always bu
2020: 69 6c 64 73 20 61 67 61 69 6e 73 74 20 54 63 6c ilds against Tcl
2030: 20 73 6f 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 source, not an
2040: 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0a 21 69 installed Tcl.!i
2050: 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d f "$(TCLDIR)" ==
2060: 20 22 22 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 "".!if [echo TC
2070: 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 LDIR = \> nmakeh
2080: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
2090: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e [nmakehlp -L gen
20a0: 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d eric\tcl.h >> nm
20b0: 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 akehlp.out].!err
20c0: 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 or *** Could not
20d0: 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f 75 72 locate Tcl sour
20e0: 63 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 ce directory..!e
20f0: 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d ndif.!include nm
2100: 61 6b 65 68 6c 70 2e 6f 75 74 0a 21 65 6e 64 69 akehlp.out.!endi
2110: 66 20 23 20 54 43 4c 44 49 52 20 3d 3d 20 22 22 f # TCLDIR == ""
2120: 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 43 .._TCLDIR.= $(TC
2130: 4c 44 49 52 3a 2f 3d 5c 29 0a 5f 54 43 4c 5f 48 LDIR:/=\)._TCL_H
2140: 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 67 = $(_TCLDIR)\g
2150: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 69 66 eneric\tcl.h.!if
2160: 20 21 65 78 69 73 74 28 22 24 28 5f 54 43 4c 5f !exist("$(_TCL_
2170: 48 29 22 29 0a 21 65 72 72 6f 72 20 43 6f 75 6c H)").!error Coul
2180: 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 74 63 6c d not locate tcl
2190: 2e 68 2e 20 50 6c 65 61 73 65 20 73 65 74 20 74 .h. Please set t
21a0: 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 he TCLDIR macro
21b0: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 to point to the
21c0: 54 63 6c 20 2a 73 6f 75 72 63 65 2a 20 64 69 72 Tcl *source* dir
21d0: 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 0a ectory..!endif..
21e0: 5f 54 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 _TK_H = ..\gener
21f0: 69 63 5c 74 6b 2e 68 0a 0a 23 20 45 4e 44 20 43 ic\tk.h..# END C
2200: 61 73 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 ase 2(b) - Build
2210: 69 6e 67 20 54 6b 0a 0a 21 65 6c 73 65 0a 0a 23 ing Tk..!else..#
2220: 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 63 29 BEGIN Case 2(c)
2230: 20 6f 72 20 28 64 29 20 2d 20 42 75 69 6c 64 69 or (d) - Buildi
2240: 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 ng an extension
2250: 6f 74 68 65 72 20 74 68 61 6e 20 54 6b 0a 0a 23 other than Tk..#
2260: 20 49 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 If command line
2270: 20 68 61 73 20 73 70 65 63 69 66 69 65 64 20 54 has specified T
2280: 63 6c 20 6c 6f 63 61 74 69 6f 6e 20 74 68 72 6f cl location thro
2290: 75 67 68 20 54 43 4c 44 49 52 2c 20 75 73 65 20 ugh TCLDIR, use
22a0: 69 74 0a 23 20 65 6c 73 65 20 64 65 66 61 75 6c it.# else defaul
22b0: 74 20 74 6f 20 74 68 65 20 49 4e 53 54 41 4c 4c t to the INSTALL
22c0: 44 49 52 20 73 65 74 74 69 6e 67 0a 21 69 66 20 DIR setting.!if
22d0: 22 24 28 54 43 4c 44 49 52 29 22 20 21 3d 20 22 "$(TCLDIR)" != "
22e0: 22 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 ".._TCLDIR.= $(T
22f0: 43 4c 44 49 52 3a 2f 3d 5c 29 0a 21 69 66 20 65 CLDIR:/=\).!if e
2300: 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 xist("$(_TCLDIR)
2310: 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 \include\tcl.h")
2320: 20 23 20 43 61 73 65 20 32 28 63 29 20 77 69 74 # Case 2(c) wit
2330: 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e 65 64 h TCLDIR defined
2340: 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 31 0a .TCLINSTALL.= 1.
2350: 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 _TCL_H
2360: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 = $(_TCLDIR)\inc
2370: 6c 75 64 65 5c 74 63 6c 2e 68 0a 21 65 6c 73 65 lude\tcl.h.!else
2380: 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c if exist("$(_TCL
2390: 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c DIR)\generic\tcl
23a0: 2e 68 22 29 20 23 20 43 61 73 65 20 32 28 64 29 .h") # Case 2(d)
23b0: 20 77 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 with TCLDIR def
23c0: 69 6e 65 64 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 ined.TCLINSTALL.
23d0: 3d 20 30 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 = 0._TCL_H
23e0: 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 = $(_TCLDIR)
23f0: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 \generic\tcl.h.!
2400: 65 6e 64 69 66 0a 0a 21 65 6c 73 65 20 20 23 20 endif..!else #
2410: 20 23 20 43 61 73 65 20 32 28 63 29 20 66 6f 72 # Case 2(c) for
2420: 20 65 78 74 65 6e 73 69 6f 6e 73 20 77 69 74 68 extensions with
2430: 20 54 43 4c 44 49 52 20 75 6e 64 65 66 69 6e 65 TCLDIR undefine
2440: 64 0a 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 d..# Need to loc
2450: 61 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e ate Tcl dependin
2460: 67 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 g on whether it
2470: 6e 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 needs Tcl source
2480: 20 6f 72 20 6e 6f 74 2e 0a 23 20 49 66 20 77 65 or not..# If we
2490: 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 don't, check th
24a0: 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 e INSTALLDIR for
24b0: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
24c0: 6c 20 66 69 72 73 74 0a 0a 21 69 66 20 65 78 69 l first..!if exi
24d0: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 st("$(_INSTALLDI
24e0: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 R)\include\tcl.h
24f0: 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 43 ") && !$(NEED_TC
2500: 4c 5f 53 4f 55 52 43 45 29 0a 0a 54 43 4c 49 4e L_SOURCE)..TCLIN
2510: 53 54 41 4c 4c 09 3d 20 31 0a 54 43 4c 44 49 52 STALL.= 1.TCLDIR
2520: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 = $(_I
2530: 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 23 20 NSTALLDIR)\...#
2540: 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c 20 62 65 NOTE: we will be
2550: 20 72 65 73 65 74 74 69 6e 67 20 5f 49 4e 53 54 resetting _INST
2560: 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e 53 54 41 ALLDIR to _INSTA
2570: 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 20 65 78 LLDIR/lib for ex
2580: 74 65 6e 73 69 6f 6e 73 0a 23 20 6c 61 74 65 72 tensions.# later
2590: 20 73 6f 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f so the \.. acco
25a0: 75 6e 74 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 unts for the /li
25b0: 62 0a 5f 54 43 4c 44 49 52 09 09 3d 20 24 28 5f b._TCLDIR..= $(_
25c0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f INSTALLDIR)\..._
25d0: 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d TCL_H =
25e0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c $(_TCLDIR)\incl
25f0: 75 64 65 5c 74 63 6c 2e 68 0a 0a 21 65 6c 73 65 ude\tcl.h..!else
2600: 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 # exist(...) &&
2610: 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 !$(NEED_TCL_SOU
2620: 52 43 45 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 RCE)..!if [echo
2630: 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 _TCLDIR = \> nma
2640: 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 kehlp.out] \.
2650: 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 || [nmakehlp -L
2660: 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e generic\tcl.h >>
2670: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 nmakehlp.out].!
2680: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
2690: 6e 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 not locate Tcl s
26a0: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e ource directory.
26b0: 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 .!endif.!include
26c0: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 54 43 nmakehlp.out.TC
26d0: 4c 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 LINSTALL =
26e0: 30 0a 54 43 4c 44 49 52 20 20 20 20 20 20 20 20 0.TCLDIR
26f0: 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 0a 5f 54 = $(_TCLDIR)._T
2700: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 CL_H =
2710: 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 $(_TCLDIR)\gener
2720: 69 63 5c 74 63 6c 2e 68 0a 0a 21 65 6e 64 69 66 ic\tcl.h..!endif
2730: 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 # exist(...) &&
2740: 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 !$(NEED_TCL_SOU
2750: 52 43 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 RCE)..!endif # T
2760: 43 4c 44 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f CLDIR..!ifndef _
2770: 54 43 4c 5f 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 TCL_H.MSG =^.Fai
2780: 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 63 6c 2e led to find tcl.
2790: 68 2e 20 54 68 65 20 54 43 4c 44 49 52 20 6d 61 h. The TCLDIR ma
27a0: 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 cro is set incor
27b0: 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 rectly or is not
27c0: 20 73 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 set and default
27d0: 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 path does not c
27e0: 6f 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0a 21 65 ontain tcl.h..!e
27f0: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
2800: 69 66 0a 0a 23 20 4e 6f 77 20 64 6f 20 74 68 65 if..# Now do the
2810: 20 73 61 6d 65 20 74 6f 20 6c 6f 63 61 74 65 20 same to locate
2820: 54 6b 20 68 65 61 64 65 72 73 20 61 6e 64 20 6c Tk headers and l
2830: 69 62 73 20 69 66 20 70 72 6f 6a 65 63 74 20 72 ibs if project r
2840: 65 71 75 69 72 65 73 20 54 6b 0a 21 69 66 20 24 equires Tk.!if $
2850: 28 4e 45 45 44 5f 54 4b 29 0a 0a 21 69 66 20 22 (NEED_TK)..!if "
2860: 24 28 54 4b 44 49 52 29 22 20 21 3d 20 22 22 0a $(TKDIR)" != "".
2870: 0a 5f 54 4b 44 49 52 20 3d 20 24 28 54 4b 44 49 ._TKDIR = $(TKDI
2880: 52 3a 2f 3d 5c 29 0a 21 69 66 20 65 78 69 73 74 R:/=\).!if exist
2890: 28 22 24 28 5f 54 4b 44 49 52 29 5c 69 6e 63 6c ("$(_TKDIR)\incl
28a0: 75 64 65 5c 74 6b 2e 68 22 29 0a 54 4b 49 4e 53 ude\tk.h").TKINS
28b0: 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0a 5f 54 TALL = 1._T
28c0: 4b 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 K_H = $
28d0: 28 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 (_TKDIR)\include
28e0: 5c 74 6b 2e 68 0a 21 65 6c 73 65 69 66 20 65 78 \tk.h.!elseif ex
28f0: 69 73 74 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 ist("$(_TKDIR)\g
2900: 65 6e 65 72 69 63 5c 74 6b 2e 68 22 29 0a 54 4b eneric\tk.h").TK
2910: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 INSTALL = 0
2920: 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 20 ._TK_H
2930: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 = $(_TKDIR)\gene
2940: 72 69 63 5c 74 6b 2e 68 0a 21 65 6e 64 69 66 0a ric\tk.h.!endif.
2950: 0a 21 65 6c 73 65 20 23 20 54 4b 44 49 52 20 6e .!else # TKDIR n
2960: 6f 74 20 64 65 66 69 6e 65 64 0a 0a 23 20 4e 65 ot defined..# Ne
2970: 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 54 63 6c ed to locate Tcl
2980: 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77 68 depending on wh
2990: 65 74 68 65 72 20 69 74 20 6e 65 65 64 73 20 54 ether it needs T
29a0: 63 6c 20 73 6f 75 72 63 65 20 6f 72 20 6e 6f 74 cl source or not
29b0: 2e 0a 23 20 49 66 20 77 65 20 64 6f 6e 27 74 2c ..# If we don't,
29c0: 20 63 68 65 63 6b 20 74 68 65 20 49 4e 53 54 41 check the INSTA
29d0: 4c 4c 44 49 52 20 66 6f 72 20 61 6e 20 69 6e 73 LLDIR for an ins
29e0: 74 61 6c 6c 65 64 20 54 63 6c 20 66 69 72 73 74 talled Tcl first
29f0: 0a 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f ..!if exist("$(_
2a00: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c INSTALLDIR)\incl
2a10: 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 ude\tk.h") && !$
2a20: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 (NEED_TK_SOURCE)
2a30: 0a 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 ..TKINSTALL
2a40: 20 3d 20 31 0a 23 20 4e 4f 54 45 3a 20 77 65 20 = 1.# NOTE: we
2a50: 77 69 6c 6c 20 62 65 20 72 65 73 65 74 74 69 6e will be resettin
2a60: 67 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 74 6f g _INSTALLDIR to
2a70: 20 5f 49 4e 53 54 41 4c 4c 44 49 52 2f 6c 69 62 _INSTALLDIR/lib
2a80: 20 66 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 0a for extensions.
2a90: 23 20 6c 61 74 65 72 20 73 6f 20 74 68 65 20 5c # later so the \
2aa0: 2e 2e 20 61 63 63 6f 75 6e 74 73 20 66 6f 72 20 .. accounts for
2ab0: 74 68 65 20 2f 6c 69 62 0a 5f 54 4b 44 49 52 20 the /lib._TKDIR
2ac0: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 = $(_INS
2ad0: 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f 54 4b 5f TALLDIR)\..._TK_
2ae0: 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f H = $(_
2af0: 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 TKDIR)\include\t
2b00: 6b 2e 68 0a 54 4b 44 49 52 20 20 20 20 20 20 20 k.h.TKDIR
2b10: 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0a 0a = $(_TKDIR)..
2b20: 21 65 6c 73 65 20 23 20 65 78 69 73 74 28 22 24 !else # exist("$
2b30: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e (_INSTALLDIR)\in
2b40: 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 clude\tk.h") &&
2b50: 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 !$(NEED_TK_SOURC
2b60: 45 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 5f 54 E)..!if [echo _T
2b70: 4b 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 KDIR = \> nmakeh
2b80: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
2b90: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e [nmakehlp -L gen
2ba0: 65 72 69 63 5c 74 6b 2e 68 20 3e 3e 20 6e 6d 61 eric\tk.h >> nma
2bb0: 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f kehlp.out].!erro
2bc0: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
2bd0: 6c 6f 63 61 74 65 20 54 6b 20 73 6f 75 72 63 65 locate Tk source
2be0: 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e 64 directory..!end
2bf0: 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b if.!include nmak
2c00: 65 68 6c 70 2e 6f 75 74 0a 54 4b 49 4e 53 54 41 ehlp.out.TKINSTA
2c10: 4c 4c 20 20 20 20 20 20 3d 20 30 0a 54 4b 44 49 LL = 0.TKDI
2c20: 52 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f R = $(_
2c30: 54 4b 44 49 52 29 0a 5f 54 4b 5f 48 20 20 20 20 TKDIR)._TK_H
2c40: 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 = $(_TKDIR
2c50: 29 5c 67 65 6e 65 72 69 63 5c 74 6b 2e 68 0a 0a )\generic\tk.h..
2c60: 21 65 6e 64 69 66 20 23 20 65 78 69 73 74 28 22 !endif # exist("
2c70: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 $(_INSTALLDIR)\i
2c80: 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 nclude\tk.h") &&
2c90: 20 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 !$(NEED_TK_SOUR
2ca0: 43 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 4b CE)..!endif # TK
2cb0: 44 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f 54 4b DIR..!ifndef _TK
2cc0: 5f 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 6c 65 64 _H.MSG =^.Failed
2cd0: 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68 2e 20 54 to find tk.h. T
2ce0: 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 69 he TKDIR macro i
2cf0: 73 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 6c s set incorrectl
2d00: 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 20 y or is not set
2d10: 61 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 68 and default path
2d20: 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 does not contai
2d30: 6e 20 74 6b 2e 68 2e 0a 21 65 72 72 6f 72 20 24 n tk.h..!error $
2d40: 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a 21 65 (MSG).!endif..!e
2d50: 6e 64 69 66 20 23 20 4e 45 45 44 5f 54 4b 0a 0a ndif # NEED_TK..
2d60: 21 69 66 20 24 28 4e 45 45 44 5f 54 43 4c 5f 53 !if $(NEED_TCL_S
2d70: 4f 55 52 43 45 29 20 26 26 20 24 28 54 43 4c 49 OURCE) && $(TCLI
2d80: 4e 53 54 41 4c 4c 29 0a 4d 53 47 20 3d 20 5e 0a NSTALL).MSG = ^.
2d90: 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 54 68 69 *** Warning: Thi
2da0: 73 20 65 78 74 65 6e 73 69 6f 6e 20 72 65 71 75 s extension requ
2db0: 69 72 65 73 20 74 68 65 20 73 6f 75 72 63 65 20 ires the source
2dc0: 64 69 73 74 72 69 62 75 74 69 6f 6e 20 6f 66 20 distribution of
2dd0: 54 63 6c 2e 5e 0a 2a 2a 2a 20 50 6c 65 61 73 65 Tcl.^.*** Please
2de0: 20 73 65 74 20 74 68 65 20 54 43 4c 44 49 52 20 set the TCLDIR
2df0: 6d 61 63 72 6f 20 74 6f 20 70 6f 69 6e 74 20 74 macro to point t
2e00: 6f 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 o the Tcl source
2e10: 73 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 s..!error $(MSG)
2e20: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 4e .!endif..!if $(N
2e30: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 21 EED_TK_SOURCE).!
2e40: 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 0a if $(TKINSTALL).
2e50: 4d 53 47 20 3d 20 5e 0a 2a 2a 2a 20 57 61 72 6e MSG = ^.*** Warn
2e60: 69 6e 67 3a 20 54 68 69 73 20 65 78 74 65 6e 73 ing: This extens
2e70: 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 68 65 ion requires the
2e80: 20 73 6f 75 72 63 65 20 64 69 73 74 72 69 62 75 source distribu
2e90: 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0a 2a 2a 2a tion of Tk.^.***
2ea0: 20 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 Please set the
2eb0: 54 4b 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 TKDIR macro to p
2ec0: 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 6b 20 73 oint to the Tk s
2ed0: 6f 75 72 63 65 73 2e 0a 21 65 72 72 6f 72 20 24 ources..!error $
2ee0: 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 6e (MSG).!endif.!en
2ef0: 64 69 66 0a 0a 0a 23 20 49 66 20 49 4e 53 54 41 dif...# If INSTA
2f00: 4c 4c 44 49 52 20 73 65 74 20 74 6f 20 54 63 6c LLDIR set to Tcl
2f10: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 72 6f installation ro
2f20: 6f 74 20 64 69 72 20 74 68 65 6e 20 72 65 73 65 ot dir then rese
2f30: 74 20 74 6f 20 74 68 65 0a 23 20 6c 69 62 20 64 t to the.# lib d
2f40: 69 72 20 66 6f 72 20 69 6e 73 74 61 6c 6c 69 6e ir for installin
2f50: 67 20 65 78 74 65 6e 73 69 6f 6e 73 0a 21 69 66 g extensions.!if
2f60: 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 exist("$(_INSTA
2f70: 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 LLDIR)\include\t
2f80: 63 6c 2e 68 22 29 0a 5f 49 4e 53 54 41 4c 4c 44 cl.h")._INSTALLD
2f90: 49 52 3d 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 IR=$(_INSTALLDIR
2fa0: 29 5c 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 20 )\lib.!endif..#
2fb0: 45 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f 72 END Case 2(c) or
2fc0: 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 (d) - Building
2fd0: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 0a 21 65 6e an extension.!en
2fe0: 64 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e 47 dif # if $(DOING
2ff0: 5f 54 43 4c 29 0a 0a 23 23 23 23 23 23 23 23 23 _TCL)..#########
3000: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3010: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3020: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3030: 23 23 23 23 23 23 23 0a 23 20 33 2e 20 44 65 74 #######.# 3. Det
3040: 65 72 6d 69 6e 65 20 63 6f 6d 70 69 6c 65 72 20 ermine compiler
3050: 76 65 72 73 69 6f 6e 20 61 6e 64 20 61 72 63 68 version and arch
3060: 69 74 65 63 74 75 72 65 0a 23 20 49 6e 20 74 68 itecture.# In th
3070: 69 73 20 73 65 63 74 69 6f 6e 2c 20 77 65 20 66 is section, we f
3080: 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 63 6f igure out the co
3090: 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 mpiler version a
30a0: 6e 64 20 74 68 65 0a 23 20 61 72 63 68 69 74 65 nd the.# archite
30b0: 63 74 75 72 65 20 66 6f 72 20 77 68 69 63 68 20 cture for which
30c0: 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 2e we are building.
30d0: 20 54 68 69 73 20 73 65 74 73 20 74 68 65 0a 23 This sets the.#
30e0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
30f0: 73 3a 0a 23 20 56 43 56 45 52 53 49 4f 4e 20 2d s:.# VCVERSION -
3100: 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 63 6f the internal co
3110: 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 mpiler version a
3120: 73 20 31 32 30 30 2c 20 31 34 30 30 2c 20 31 39 s 1200, 1400, 19
3130: 31 30 20 65 74 63 2e 0a 23 20 20 20 20 20 54 68 10 etc..# Th
3140: 69 73 20 69 73 20 61 6c 73 6f 20 70 72 69 6e 74 is is also print
3150: 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 69 6c ed by the compil
3160: 65 72 20 69 6e 20 64 6f 74 74 65 64 20 66 6f 72 er in dotted for
3170: 6d 20 31 39 2e 31 30 20 65 74 63 2e 0a 23 20 56 m 19.10 etc..# V
3180: 43 56 45 52 20 2d 20 74 68 65 20 22 6d 61 72 6b CVER - the "mark
3190: 65 74 69 6e 67 20 76 65 72 73 69 6f 6e 22 2c 20 eting version",
31a0: 66 6f 72 20 65 78 61 6d 70 6c 65 20 56 69 73 75 for example Visu
31b0: 61 6c 20 43 2b 2b 20 36 20 66 6f 72 20 69 6e 74 al C++ 6 for int
31c0: 65 72 6e 61 6c 0a 23 20 20 20 20 20 63 6f 6d 70 ernal.# comp
31d0: 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 31 32 30 iler version 120
31e0: 30 2e 20 54 68 69 73 20 69 73 20 6b 65 70 74 20 0. This is kept
31f0: 6f 6e 6c 79 20 66 6f 72 20 6c 65 67 61 63 79 20 only for legacy
3200: 72 65 61 73 6f 6e 73 20 61 73 20 69 74 0a 23 20 reasons as it.#
3210: 20 20 20 20 64 6f 65 73 20 6e 6f 74 20 6d 61 6b does not mak
3220: 65 20 73 65 6e 73 65 20 66 6f 72 20 72 65 63 65 e sense for rece
3230: 6e 74 20 4d 69 63 72 6f 73 6f 66 74 20 63 6f 6d nt Microsoft com
3240: 70 69 6c 65 72 73 2e 20 4f 6e 6c 79 20 75 73 65 pilers. Only use
3250: 64 20 66 6f 72 0a 23 20 20 20 20 20 6f 75 74 70 d for.# outp
3260: 75 74 20 64 69 72 65 63 74 6f 72 79 20 6e 61 6d ut directory nam
3270: 65 73 2e 0a 23 20 41 52 43 48 20 2d 20 73 65 74 es..# ARCH - set
3280: 20 74 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 to IX86, ARM64
3290: 6f 72 20 41 4d 44 36 34 20 64 65 70 65 6e 64 69 or AMD64 dependi
32a0: 6e 67 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 2d ng on 32- or 64-
32b0: 62 69 74 20 74 61 72 67 65 74 0a 23 20 4e 41 54 bit target.# NAT
32c0: 49 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 74 IVE_ARCH - set t
32d0: 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 o IX86, ARM64 or
32e0: 20 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 68 AMD64 for the h
32f0: 6f 73 74 20 6d 61 63 68 69 6e 65 0a 23 20 4d 41 ost machine.# MA
3300: 43 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20 CHINE - same as
3310: 24 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79 $(ARCH) - legacy
3320: 0a 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f .# _VC_MANIFEST_
3330: 45 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d 20 EMBED_{DLL,EXE}
3340: 2d 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 65 - commands for e
3350: 6d 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 66 mbedding a manif
3360: 65 73 74 20 69 66 20 6e 65 65 64 65 64 0a 0a 63 est if needed..c
3370: 63 33 32 09 09 3d 20 24 28 43 43 29 20 20 20 23 c32..= $(CC) #
3380: 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c built-in defaul
3390: 74 2e 0a 6c 69 6e 6b 33 32 09 09 3d 20 6c 69 6e t..link32..= lin
33a0: 6b 0a 6c 69 62 33 32 09 09 3d 20 6c 69 62 0a 72 k.lib32..= lib.r
33b0: 63 33 32 09 09 3d 20 24 28 52 43 29 20 20 20 23 c32..= $(RC) #
33c0: 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c built-in defaul
33d0: 74 2e 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d t...#-----------
33e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
33f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3400: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3410: 2d 2d 2d 2d 2d 0a 23 20 46 69 67 75 72 65 20 6f -----.# Figure o
3420: 75 74 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 ut the compiler
3430: 61 72 63 68 69 74 65 63 74 75 72 65 20 61 6e 64 architecture and
3440: 20 76 65 72 73 69 6f 6e 20 62 79 20 77 72 69 74 version by writ
3450: 69 6e 67 0a 23 20 74 68 65 20 43 20 6d 61 63 72 ing.# the C macr
3460: 6f 73 20 74 6f 20 61 20 66 69 6c 65 2c 20 70 72 os to a file, pr
3470: 65 70 72 6f 63 65 73 73 69 6e 67 20 74 68 65 6d eprocessing them
3480: 20 77 69 74 68 20 74 68 65 20 43 0a 23 20 70 72 with the C.# pr
3490: 65 70 72 6f 63 65 73 73 6f 72 20 61 6e 64 20 72 eprocessor and r
34a0: 65 61 64 69 6e 67 20 62 61 63 6b 20 74 68 65 20 eading back the
34b0: 63 72 65 61 74 65 64 20 66 69 6c 65 0a 0a 5f 48 created file.._H
34c0: 41 53 48 3d 5e 23 0a 5f 56 43 5f 4d 41 4e 49 46 ASH=^#._VC_MANIF
34d0: 45 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0a 5f EST_EMBED_EXE=._
34e0: 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 VC_MANIFEST_EMBE
34f0: 44 5f 44 4c 4c 3d 0a 56 43 56 45 52 3d 30 0a 21 D_DLL=.VCVER=0.!
3500: 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 53 if ![echo VCVERS
3510: 49 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 76 ION=_MSC_VER > v
3520: 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 ercl.x] \. &&
3530: 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 ![echo $(_HASH)
3540: 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 49 58 if defined(_M_IX
3550: 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 86) >> vercl.x]
3560: 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 \. && ![echo
3570: 41 52 43 48 3d 49 58 38 36 20 3e 3e 20 76 65 72 ARCH=IX86 >> ver
3580: 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 cl.x] \. && !
3590: 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 65 6c [echo $(_HASH)el
35a0: 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 41 4d if defined(_M_AM
35b0: 44 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d D64) >> vercl.x]
35c0: 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f \. && ![echo
35d0: 20 41 52 43 48 3d 41 4d 44 36 34 20 3e 3e 20 76 ARCH=AMD64 >> v
35e0: 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 ercl.x] \. &&
35f0: 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 ![echo $(_HASH)
3600: 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f elif defined(_M_
3610: 41 52 4d 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e ARM64) >> vercl.
3620: 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 x] \. && ![ec
3630: 68 6f 20 41 52 43 48 3d 41 52 4d 36 34 20 3e 3e ho ARCH=ARM64 >>
3640: 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 vercl.x] \.
3650: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 && ![echo $(_HAS
3660: 48 29 65 6e 64 69 66 20 3e 3e 20 76 65 72 63 6c H)endif >> vercl
3670: 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 24 .x] \. && ![$
3680: 28 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 2d (cc32) -nologo -
3690: 54 43 20 2d 50 20 76 65 72 63 6c 2e 78 20 32 3e TC -P vercl.x 2>
36a0: 4e 55 4c 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 NUL].!include ve
36b0: 72 63 6c 2e 69 0a 21 69 66 20 24 28 56 43 56 45 rcl.i.!if $(VCVE
36c0: 52 53 49 4f 4e 29 20 3c 20 31 39 30 30 0a 21 69 RSION) < 1900.!i
36d0: 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 3d 20 f ![echo VCVER=
36e0: 5e 5c 3e 20 76 65 72 63 6c 2e 76 63 5d 20 5c 0a ^\> vercl.vc] \.
36f0: 20 20 20 20 26 26 20 21 5b 73 65 74 20 2f 61 20 && ![set /a
3700: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 2f 20 31 $(VCVERSION) / 1
3710: 30 30 20 2d 20 36 20 3e 3e 20 76 65 72 63 6c 2e 00 - 6 >> vercl.
3720: 76 63 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 vc].!include ver
3730: 63 6c 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 6c cl.vc.!endif.!el
3740: 73 65 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 20 se.# The simple
3750: 63 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f 76 calculation abov
3760: 65 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c 79 e does not apply
3770: 20 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 53 to new Visual S
3780: 74 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0a 23 tudio releases.#
3790: 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 69 6c Keep the compil
37a0: 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 69 74 er version in it
37b0: 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e 0a 56 s native form..V
37c0: 43 56 45 52 20 3d 20 24 28 56 43 56 45 52 53 49 CVER = $(VCVERSI
37d0: 4f 4e 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 ON).!endif.!endi
37e0: 66 0a 0a 21 69 66 20 21 5b 64 65 6c 20 32 3e 4e f..!if ![del 2>N
37f0: 55 4c 20 2f 71 2f 66 20 76 65 72 63 6c 2e 78 20 UL /q/f vercl.x
3800: 76 65 72 63 6c 2e 69 20 76 65 72 63 6c 2e 76 63 vercl.i vercl.vc
3810: 5d 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d ].!endif..#-----
3820: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3830: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3840: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3850: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 -----------.# Th
3860: 65 20 4d 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 e MACHINE macro
3870: 69 73 20 75 73 65 64 20 62 79 20 6c 65 67 61 63 is used by legac
3880: 79 20 6d 61 6b 65 66 69 6c 65 73 20 73 6f 20 73 y makefiles so s
3890: 65 74 20 69 74 20 61 73 20 77 65 6c 6c 0a 21 69 et it as well.!i
38a0: 66 64 65 66 20 4d 41 43 48 49 4e 45 0a 21 69 66 fdef MACHINE.!if
38b0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
38c0: 20 22 78 38 36 22 0a 21 75 6e 64 65 66 20 4d 41 "x86".!undef MA
38d0: 43 48 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 CHINE.MACHINE =
38e0: 49 58 38 36 0a 21 65 6c 73 65 69 66 20 22 24 28 IX86.!elseif "$(
38f0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72 MACHINE)" == "ar
3900: 6d 36 34 22 0a 21 75 6e 64 65 66 20 4d 41 43 48 m64".!undef MACH
3910: 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 41 52 INE.MACHINE = AR
3920: 4d 36 34 0a 21 65 6c 73 65 69 66 20 22 24 28 4d M64.!elseif "$(M
3930: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 36 34 ACHINE)" == "x64
3940: 22 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4e 45 ".!undef MACHINE
3950: 0a 4d 41 43 48 49 4e 45 20 3d 20 41 4d 44 36 34 .MACHINE = AMD64
3960: 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 24 28 4d .!endif.!if "$(M
3970: 41 43 48 49 4e 45 29 22 20 21 3d 20 22 24 28 41 ACHINE)" != "$(A
3980: 52 43 48 29 22 0a 21 65 72 72 6f 72 20 53 70 65 RCH)".!error Spe
3990: 63 69 66 69 65 64 20 4d 41 43 48 49 4e 45 20 6d cified MACHINE m
39a0: 61 63 72 6f 20 24 28 4d 41 43 48 49 4e 45 29 20 acro $(MACHINE)
39b0: 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 64 does not match d
39c0: 65 74 65 63 74 65 64 20 74 61 72 67 65 74 20 61 etected target a
39d0: 72 63 68 69 74 65 63 74 75 72 65 20 24 28 41 52 rchitecture $(AR
39e0: 43 48 29 2e 0a 21 65 6e 64 69 66 0a 21 65 6c 73 CH)..!endif.!els
39f0: 65 0a 4d 41 43 48 49 4e 45 3d 24 28 41 52 43 48 e.MACHINE=$(ARCH
3a00: 29 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d ).!endif..#-----
3a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 65 ----------.# The
3a50: 20 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 PLATFORM_IDENTI
3a60: 46 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 FY macro matches
3a70: 20 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 75 the values retu
3a80: 72 6e 65 64 20 62 79 0a 23 20 74 68 65 20 54 63 rned by.# the Tc
3a90: 6c 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e l platform::iden
3aa0: 74 69 66 79 20 63 6f 6d 6d 61 6e 64 0a 21 69 66 tify command.!if
3ab0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
3ac0: 20 22 41 4d 44 36 34 22 0a 50 4c 41 54 46 4f 52 "AMD64".PLATFOR
3ad0: 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 6e M_IDENTIFY = win
3ae0: 33 32 2d 78 38 36 5f 36 34 0a 21 65 6c 73 65 69 32-x86_64.!elsei
3af0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3b00: 3d 20 22 41 52 4d 36 34 22 0a 50 4c 41 54 46 4f = "ARM64".PLATFO
3b10: 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 RM_IDENTIFY = wi
3b20: 6e 33 32 2d 61 72 6d 0a 21 65 6c 73 65 0a 50 4c n32-arm.!else.PL
3b30: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 ATFORM_IDENTIFY
3b40: 3d 20 77 69 6e 33 32 2d 69 78 38 36 0a 21 65 6e = win32-ix86.!en
3b50: 64 69 66 0a 0a 23 20 54 68 65 20 4d 55 4c 54 49 dif..# The MULTI
3b60: 50 4c 41 54 46 4f 52 4d 20 6d 61 63 72 6f 20 63 PLATFORM macro c
3b70: 6f 6e 74 72 6f 6c 73 20 77 68 65 74 68 65 72 20 ontrols whether
3b80: 62 69 6e 61 72 79 20 65 78 74 65 6e 73 69 6f 6e binary extension
3b90: 73 20 61 72 65 20 69 6e 73 74 61 6c 6c 65 64 0a s are installed.
3ba0: 23 20 69 6e 20 70 6c 61 74 66 6f 72 6d 2d 73 70 # in platform-sp
3bb0: 65 63 69 66 69 63 20 64 69 72 65 63 74 6f 72 69 ecific directori
3bc0: 65 73 2e 20 49 6e 74 65 6e 64 65 64 20 74 6f 20 es. Intended to
3bd0: 62 65 20 73 65 74 2f 75 73 65 64 20 62 79 20 65 be set/used by e
3be0: 78 74 65 6e 73 69 6f 6e 73 2e 0a 21 69 66 6e 64 xtensions..!ifnd
3bf0: 65 66 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d ef MULTIPLATFORM
3c00: 5f 49 4e 53 54 41 4c 4c 0a 4d 55 4c 54 49 50 4c _INSTALL.MULTIPL
3c10: 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 20 3d ATFORM_INSTALL =
3c20: 20 30 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 0.!endif..#----
3c30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c60: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 46 69 67 75 72 --------.# Figur
3c70: 65 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a e out the *host*
3c80: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 62 79 architecture by
3c90: 20 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 67 reading the reg
3ca0: 69 73 74 72 79 0a 0a 21 69 66 20 21 5b 72 65 67 istry..!if ![reg
3cb0: 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 query HKLM\Hard
3cc0: 77 61 72 65 5c 44 65 73 63 72 69 70 74 69 6f 6e ware\Description
3cd0: 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 \System\CentralP
3ce0: 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 rocessor\0 /v Id
3cf0: 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e 64 73 entifier | finds
3d00: 74 72 20 2f 69 20 78 38 36 5d 0a 4e 41 54 49 56 tr /i x86].NATIV
3d10: 45 5f 41 52 43 48 3d 49 58 38 36 0a 21 65 6c 73 E_ARCH=IX86.!els
3d20: 65 69 66 20 21 5b 72 65 67 20 71 75 65 72 79 20 eif ![reg query
3d30: 48 4b 4c 4d 5c 48 61 72 64 77 61 72 65 5c 44 65 HKLM\Hardware\De
3d40: 73 63 72 69 70 74 69 6f 6e 5c 53 79 73 74 65 6d scription\System
3d50: 5c 43 65 6e 74 72 61 6c 50 72 6f 63 65 73 73 6f \CentralProcesso
3d60: 72 5c 30 20 2f 76 20 49 64 65 6e 74 69 66 69 65 r\0 /v Identifie
3d70: 72 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 41 r | findstr /i A
3d80: 52 4d 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 RM | findstr /i
3d90: 36 34 2d 62 69 74 5d 0a 4e 41 54 49 56 45 5f 41 64-bit].NATIVE_A
3da0: 52 43 48 3d 41 52 4d 36 34 0a 21 65 6c 73 65 0a RCH=ARM64.!else.
3db0: 4e 41 54 49 56 45 5f 41 52 43 48 3d 41 4d 44 36 NATIVE_ARCH=AMD6
3dc0: 34 0a 21 65 6e 64 69 66 0a 0a 23 20 53 69 6e 63 4.!endif..# Sinc
3dd0: 65 20 4d 53 56 43 38 20 77 65 20 6d 75 73 74 20 e MSVC8 we must
3de0: 64 65 61 6c 20 77 69 74 68 20 6d 61 6e 69 66 65 deal with manife
3df0: 73 74 20 72 65 73 6f 75 72 63 65 73 2e 0a 21 69 st resources..!i
3e00: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
3e10: 3d 20 31 34 30 30 0a 5f 56 43 5f 4d 41 4e 49 46 = 1400._VC_MANIF
3e20: 45 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 69 66 EST_EMBED_EXE=if
3e30: 20 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 exist $@.manife
3e40: 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d st mt -nologo -m
3e50: 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 anifest $@.manif
3e60: 65 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 est -outputresou
3e70: 72 63 65 3a 24 40 3b 31 0a 5f 56 43 5f 4d 41 4e rce:$@;1._VC_MAN
3e80: 49 46 45 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d IFEST_EMBED_DLL=
3e90: 69 66 20 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 if exist $@.mani
3ea0: 66 65 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 fest mt -nologo
3eb0: 2d 6d 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e -manifest $@.man
3ec0: 69 66 65 73 74 20 2d 6f 75 74 70 75 74 72 65 73 ifest -outputres
3ed0: 6f 75 72 63 65 3a 24 40 3b 32 0a 21 65 6e 64 69 ource:$@;2.!endi
3ee0: 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 f..#############
3ef0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3f00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3f10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3f20: 23 23 23 0a 23 20 34 2e 20 42 75 69 6c 64 20 74 ###.# 4. Build t
3f30: 68 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f 67 he nmakehlp prog
3f40: 72 61 6d 0a 23 20 54 68 69 73 20 69 73 20 61 20 ram.# This is a
3f50: 68 65 6c 70 65 72 20 61 70 70 20 77 65 20 6e 65 helper app we ne
3f60: 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 6e ed to overcome n
3f70: 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e 67 0a make's limiting.
3f80: 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 20 57 # environment. W
3f90: 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f 75 74 20 e will call out
3fa0: 74 6f 20 69 74 20 74 6f 20 67 65 74 20 76 61 72 to it to get var
3fb0: 69 6f 75 73 20 62 69 74 73 20 6f 66 0a 23 20 69 ious bits of.# i
3fc0: 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 nformation about
3fd0: 20 73 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 supported compi
3fe0: 6c 65 72 20 6f 70 74 69 6f 6e 73 20 65 74 63 2e ler options etc.
3ff0: 0a 23 0a 23 20 54 63 6c 20 69 74 73 65 6c 66 20 .#.# Tcl itself
4000: 77 69 6c 6c 20 61 6c 77 61 79 73 20 75 73 65 20 will always use
4010: 74 68 65 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 70 the nmakehlp.c p
4020: 72 6f 67 72 61 6d 20 77 68 69 63 68 20 69 73 0a rogram which is.
4030: 23 20 69 6e 20 69 74 73 20 6f 77 6e 20 73 6f 75 # in its own sou
4040: 72 63 65 2e 20 49 74 20 77 69 6c 6c 20 62 65 20 rce. It will be
4050: 6b 65 70 74 20 75 70 64 61 74 65 64 20 74 68 65 kept updated the
4060: 72 65 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f re..#.# Extensio
4070: 6e 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 ns built against
4080: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
4090: 6c 20 77 69 6c 6c 20 75 73 65 20 74 68 65 20 69 l will use the i
40a0: 6e 73 74 61 6c 6c 65 64 0a 23 20 63 6f 70 79 20 nstalled.# copy
40b0: 6f 66 20 54 63 6c 27 73 20 6e 6d 61 6b 65 68 6c of Tcl's nmakehl
40c0: 70 2e 63 20 69 66 20 74 68 65 72 65 20 69 73 20 p.c if there is
40d0: 6f 6e 65 20 61 6e 64 20 74 68 65 69 72 20 6f 77 one and their ow
40e0: 6e 20 76 65 72 73 69 6f 6e 0a 23 20 6f 74 68 65 n version.# othe
40f0: 72 77 69 73 65 2e 20 49 6e 20 74 68 65 20 6c 61 rwise. In the la
4100: 74 74 65 72 20 63 61 73 65 2c 20 74 68 65 79 20 tter case, they
4110: 77 6f 75 6c 64 20 61 6c 73 6f 20 62 65 20 75 73 would also be us
4120: 69 6e 67 20 74 68 65 69 72 20 6f 77 6e 0a 23 20 ing their own.#
4130: 72 75 6c 65 73 2e 76 63 2e 20 4e 6f 74 65 20 74 rules.vc. Note t
4140: 68 61 74 20 6f 6c 64 65 72 20 76 65 72 73 69 6f hat older versio
4150: 6e 73 20 6f 66 20 54 63 6c 20 64 6f 20 6e 6f 74 ns of Tcl do not
4160: 20 69 6e 73 74 61 6c 6c 20 6e 6d 61 6b 65 68 6c install nmakehl
4170: 70 2e 63 0a 23 20 6f 72 20 72 75 6c 65 73 2e 76 p.c.# or rules.v
4180: 63 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f 6e c..#.# Extension
4190: 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 s built against
41a0: 54 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c 6c Tcl sources will
41b0: 20 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 6f use the one fro
41c0: 6d 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 m the Tcl source
41d0: 2e 0a 23 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 ..#.# When build
41e0: 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e ing an extension
41f0: 20 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 69 using a suffici
4200: 65 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 6f ently new versio
4210: 6e 20 6f 66 20 54 63 6c 2c 0a 23 20 72 75 6c 65 n of Tcl,.# rule
4220: 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 64 65 s-ext.vc will de
4230: 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 20 61 fine NMAKEHLPC a
4240: 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74 6f 20 ppropriately to
4250: 70 6f 69 6e 74 20 74 6f 20 74 68 65 0a 23 20 63 point to the.# c
4260: 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 6c 70 2e opy of nmakehlp.
4270: 63 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 0a 21 c to be used...!
4280: 69 66 6e 64 65 66 20 4e 4d 41 4b 45 48 4c 50 43 ifndef NMAKEHLPC
4290: 0a 23 20 44 65 66 61 75 6c 74 20 74 6f 20 74 68 .# Default to th
42a0: 65 20 6f 6e 65 20 69 6e 20 74 68 65 20 63 75 72 e one in the cur
42b0: 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 28 rent directory (
42c0: 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 27 73 20 the extension's
42d0: 6f 77 6e 20 6e 6d 61 6b 65 68 6c 70 2e 63 29 0a own nmakehlp.c).
42e0: 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 6e 6d 61 6b NMAKEHLPC = nmak
42f0: 65 68 6c 70 2e 63 0a 0a 21 69 66 20 21 24 28 44 ehlp.c..!if !$(D
4300: 4f 49 4e 47 5f 54 43 4c 29 0a 21 69 66 20 24 28 OING_TCL).!if $(
4310: 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 69 66 20 TCLINSTALL).!if
4320: 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 exist("$(_TCLDIR
4330: 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b )\lib\nmake\nmak
4340: 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 4c ehlp.c").NMAKEHL
4350: 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c PC = $(_TCLDIR)\
4360: 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 lib\nmake\nmakeh
4370: 6c 70 2e 63 0a 21 65 6e 64 69 66 0a 21 65 6c 73 lp.c.!endif.!els
4380: 65 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c e # !$(TCLINSTAL
4390: 4c 29 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 L).!if exist("$(
43a0: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 _TCLDIR)\win\nma
43b0: 6b 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 kehlp.c").NMAKEH
43c0: 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 LPC = $(_TCLDIR)
43d0: 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0a \win\nmakehlp.c.
43e0: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 !endif.!endif #
43f0: 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 65 $(TCLINSTALL).!e
4400: 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e 47 5f ndif # !$(DOING_
4410: 54 43 4c 29 0a 0a 21 65 6e 64 69 66 20 23 20 4e TCL)..!endif # N
4420: 4d 41 4b 45 48 4c 50 43 0a 0a 23 20 57 65 20 61 MAKEHLPC..# We a
4430: 6c 77 61 79 73 20 62 75 69 6c 64 20 6e 6d 61 6b lways build nmak
4440: 65 68 6c 70 20 65 76 65 6e 20 69 66 20 69 74 20 ehlp even if it
4450: 65 78 69 73 74 73 20 73 69 6e 63 65 20 77 65 20 exists since we
4460: 64 6f 20 6e 6f 74 20 6b 6e 6f 77 0a 23 20 77 68 do not know.# wh
4470: 61 74 20 73 6f 75 72 63 65 20 69 74 20 77 61 73 at source it was
4480: 20 62 75 69 6c 74 20 66 72 6f 6d 2e 0a 21 69 66 built from..!if
4490: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
44a0: 20 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 "IX86" || "$(MA
44b0: 43 48 49 4e 45 29 22 20 3d 3d 20 22 24 28 4e 41 CHINE)" == "$(NA
44c0: 54 49 56 45 5f 41 52 43 48 29 22 0a 21 69 66 20 TIVE_ARCH)".!if
44d0: 5b 24 28 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f [$(cc32) -nologo
44e0: 20 22 24 28 4e 4d 41 4b 45 48 4c 50 43 29 22 20 "$(NMAKEHLPC)"
44f0: 2d 6c 69 6e 6b 20 2d 73 75 62 73 79 73 74 65 6d -link -subsystem
4500: 3a 63 6f 6e 73 6f 6c 65 20 3e 20 6e 75 6c 5d 0a :console > nul].
4510: 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 !endif.!else.!if
4520: 20 5b 63 6f 70 79 20 24 28 4e 4d 41 4b 45 48 4c [copy $(NMAKEHL
4530: 50 43 3a 6e 6d 61 6b 65 68 6c 70 2e 63 3d 78 38 PC:nmakehlp.c=x8
4540: 36 5f 36 34 2d 77 36 34 2d 6d 69 6e 67 77 33 32 6_64-w64-mingw32
4550: 2d 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 29 20 6e -nmakehlp.exe) n
4560: 6d 61 6b 65 68 6c 70 2e 65 78 65 20 3e 4e 55 4c makehlp.exe >NUL
4570: 5d 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a ].!endif.!endif.
4580: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
4590: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
45a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
45b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
45c0: 23 0a 23 20 35 2e 20 54 65 73 74 20 66 6f 72 20 #.# 5. Test for
45d0: 63 6f 6d 70 69 6c 65 72 20 66 65 61 74 75 72 65 compiler feature
45e0: 73 0a 23 20 56 69 73 75 61 6c 20 43 2b 2b 20 63 s.# Visual C++ c
45f0: 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 ompiler options
4600: 68 61 76 65 20 63 68 61 6e 67 65 64 20 6f 76 65 have changed ove
4610: 72 20 74 68 65 20 79 65 61 72 73 2e 20 43 68 65 r the years. Che
4620: 63 6b 0a 23 20 77 68 69 63 68 20 6f 70 74 69 6f ck.# which optio
4630: 6e 73 20 61 72 65 20 73 75 70 70 6f 72 74 65 64 ns are supported
4640: 20 62 79 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 by the compiler
4650: 20 69 6e 20 75 73 65 2e 0a 23 0a 23 20 54 68 65 in use..#.# The
4660: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
4670: 73 20 61 72 65 20 73 65 74 3a 0a 23 20 4f 50 54 s are set:.# OPT
4680: 49 4d 49 5a 41 54 49 4f 4e 53 20 2d 20 74 68 65 IMIZATIONS - the
4690: 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 73 20 compiler flags
46a0: 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72 20 6f to be used for o
46b0: 70 74 69 6d 69 7a 65 64 20 62 75 69 6c 64 73 0a ptimized builds.
46c0: 23 20 44 45 42 55 47 46 4c 41 47 53 20 2d 20 74 # DEBUGFLAGS - t
46d0: 68 65 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 he compiler flag
46e0: 73 20 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72 s to be used for
46f0: 20 64 65 62 75 67 20 62 75 69 6c 64 73 0a 23 20 debug builds.#
4700: 4c 49 4e 4b 45 52 46 4c 41 47 53 20 2d 20 46 6c LINKERFLAGS - Fl
4710: 61 67 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 ags passed to th
4720: 65 20 6c 69 6e 6b 65 72 0a 23 0a 23 20 4e 6f 74 e linker.#.# Not
4730: 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 e that these are
4740: 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 73 65 the compiler se
4750: 74 74 69 6e 67 73 20 2a 61 76 61 69 6c 61 62 6c ttings *availabl
4760: 65 2a 2c 20 6e 6f 74 20 74 68 6f 73 65 0a 23 20 e*, not those.#
4770: 74 68 61 74 20 77 69 6c 6c 20 62 65 20 2a 75 73 that will be *us
4780: 65 64 2a 2e 20 54 68 65 20 6c 61 74 74 65 72 20 ed*. The latter
4790: 64 65 70 65 6e 64 73 20 6f 6e 20 74 68 65 20 4f depends on the O
47a0: 50 54 53 20 6d 61 63 72 6f 20 73 65 74 74 69 6e PTS macro settin
47b0: 67 73 0a 23 20 77 68 69 63 68 20 77 65 20 68 61 gs.# which we ha
47c0: 76 65 20 6e 6f 74 20 79 65 74 20 70 61 72 73 65 ve not yet parse
47d0: 64 2e 0a 23 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 d..#.# Also note
47e0: 20 74 68 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 that some of th
47f0: 65 20 66 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d e flags in OPTIM
4800: 49 5a 41 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 IZATIONS are not
4810: 20 72 65 61 6c 6c 79 0a 23 20 72 65 6c 61 74 65 really.# relate
4820: 64 20 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f d to optimizatio
4830: 6e 2e 20 54 68 65 79 20 61 72 65 20 70 6c 61 63 n. They are plac
4840: 65 64 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f ed there only fo
4850: 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 r legacy reasons
4860: 0a 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65 6e .# as some exten
4870: 73 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68 65 sions expect the
4880: 6d 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65 64 m to be included
4890: 20 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e 0a in that macro..
48a0: 0a 23 20 2d 4f 70 20 69 6d 70 72 6f 76 65 73 20 .# -Op improves
48b0: 66 6c 6f 61 74 20 63 6f 6e 73 69 73 74 65 6e 63 float consistenc
48c0: 79 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20 6e 65 65 y. Note only nee
48d0: 64 65 64 20 66 6f 72 20 6f 6c 64 65 72 20 63 6f ded for older co
48e0: 6d 70 69 6c 65 72 73 0a 23 20 4e 65 77 65 72 20 mpilers.# Newer
48f0: 63 6f 6d 70 69 6c 65 72 73 20 64 6f 20 6e 6f 74 compilers do not
4900: 20 6e 65 65 64 20 6f 72 20 73 75 70 70 6f 72 74 need or support
4910: 20 74 68 69 73 20 6f 70 74 69 6f 6e 2e 0a 21 69 this option..!i
4920: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d f [nmakehlp -c -
4930: 4f 70 5d 0a 46 50 4f 50 54 53 20 20 3d 20 2d 4f Op].FPOPTS = -O
4940: 70 0a 21 65 6e 64 69 66 0a 0a 23 20 53 74 72 69 p.!endif..# Stri
4950: 63 74 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e ct floating poin
4960: 74 20 73 65 6d 61 6e 74 69 63 73 20 2d 20 70 72 t semantics - pr
4970: 65 73 65 6e 74 20 69 6e 20 6e 65 77 65 72 20 63 esent in newer c
4980: 6f 6d 70 69 6c 65 72 73 20 69 6e 20 6c 69 65 75 ompilers in lieu
4990: 20 6f 66 20 2d 4f 70 0a 21 69 66 20 5b 6e 6d 61 of -Op.!if [nma
49a0: 6b 65 68 6c 70 20 2d 63 20 2d 66 70 3a 73 74 72 kehlp -c -fp:str
49b0: 69 63 74 5d 0a 46 50 4f 50 54 53 20 20 3d 20 24 ict].FPOPTS = $
49c0: 28 46 50 4f 50 54 53 29 20 2d 66 70 3a 73 74 72 (FPOPTS) -fp:str
49d0: 69 63 74 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 ict.!endif..!if
49e0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
49f0: 22 49 58 38 36 22 0a 23 23 23 20 74 65 73 74 20 "IX86".### test
4a00: 66 6f 72 20 70 65 6e 74 69 75 6d 20 65 72 72 61 for pentium erra
4a10: 74 61 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ta.!if [nmakehlp
4a20: 20 2d 63 20 2d 51 49 30 66 5d 0a 21 6d 65 73 73 -c -QI0f].!mess
4a30: 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 age *** Compiler
4a40: 20 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30 78 has 'Pentium 0x
4a50: 30 66 20 66 69 78 27 0a 46 50 4f 50 54 53 20 20 0f fix'.FPOPTS
4a60: 3d 20 24 28 46 50 4f 50 54 53 29 20 2d 51 49 30 = $(FPOPTS) -QI0
4a70: 66 0a 21 65 6c 73 65 0a 21 6d 65 73 73 61 67 65 f.!else.!message
4a80: 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f *** Compiler do
4a90: 65 73 20 6e 6f 74 20 68 61 76 65 20 27 50 65 6e es not have 'Pen
4aa0: 74 69 75 6d 20 30 78 30 66 20 66 69 78 27 0a 21 tium 0x0f fix'.!
4ab0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 endif.!endif..##
4ac0: 23 20 74 65 73 74 20 66 6f 72 20 6f 70 74 69 6d # test for optim
4ad0: 69 7a 61 74 69 6f 6e 73 0a 23 20 2f 4f 32 20 6f izations.# /O2 o
4ae0: 70 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 63 6c ptimization incl
4af0: 75 64 65 73 20 2f 4f 67 20 2f 4f 69 20 2f 4f 74 udes /Og /Oi /Ot
4b00: 20 2f 4f 79 20 2f 4f 62 32 20 2f 47 73 20 2f 47 /Oy /Ob2 /Gs /G
4b10: 46 20 2f 47 79 20 61 73 20 70 65 72 0a 23 20 64 F /Gy as per.# d
4b20: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 20 4e 6f ocumentation. No
4b30: 74 65 20 77 65 20 64 6f 20 4e 4f 54 20 77 61 6e te we do NOT wan
4b40: 74 20 2f 47 73 20 61 73 20 74 68 61 74 20 69 6e t /Gs as that in
4b50: 73 65 72 74 73 20 61 20 5f 63 68 6b 73 74 6b 0a serts a _chkstk.
4b60: 23 20 73 74 61 63 6b 20 70 72 6f 62 65 20 61 74 # stack probe at
4b70: 20 2a 65 76 65 72 79 2a 20 66 75 6e 63 74 69 6f *every* functio
4b80: 6e 20 65 6e 74 72 79 2c 20 6e 6f 74 20 6a 75 73 n entry, not jus
4b90: 74 20 74 68 6f 73 65 20 77 69 74 68 20 6d 6f 72 t those with mor
4ba0: 65 20 74 68 61 6e 0a 23 20 61 20 70 61 67 65 20 e than.# a page
4bb0: 6f 66 20 73 74 61 63 6b 20 61 6c 6c 6f 63 61 74 of stack allocat
4bc0: 69 6f 6e 20 72 65 73 75 6c 74 69 6e 67 20 69 6e ion resulting in
4bd0: 20 61 20 70 65 72 66 6f 72 6d 61 6e 63 65 20 68 a performance h
4be0: 69 74 2e 20 20 48 6f 77 65 76 65 72 2c 0a 23 20 it. However,.#
4bf0: 2f 4f 32 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f /O2 documentatio
4c00: 6e 20 69 73 20 6d 69 73 6c 65 61 64 69 6e 67 20 n is misleading
4c10: 61 73 20 69 74 73 20 73 74 61 63 6b 20 70 72 6f as its stack pro
4c20: 62 65 73 20 61 72 65 20 73 69 6d 70 6c 79 20 74 bes are simply t
4c30: 68 65 0a 23 20 64 65 66 61 75 6c 74 20 70 61 67 he.# default pag
4c40: 65 20 73 69 7a 65 20 6c 6f 63 61 6c 73 20 61 6c e size locals al
4c50: 6c 6f 63 61 74 69 6f 6e 20 70 72 6f 62 65 73 20 location probes
4c60: 61 6e 64 20 6e 6f 74 20 77 68 61 74 20 69 73 20 and not what is
4c70: 69 6d 70 6c 69 65 64 0a 23 20 62 79 20 61 6e 20 implied.# by an
4c80: 65 78 70 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 explicit /Gs opt
4c90: 69 6f 6e 2e 0a 0a 4f 50 54 49 4d 49 5a 41 54 49 ion...OPTIMIZATI
4ca0: 4f 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29 0a ONS = $(FPOPTS).
4cb0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
4cc0: 63 20 2d 4f 32 5d 0a 4f 50 54 49 4d 49 5a 49 4e c -O2].OPTIMIZIN
4cd0: 47 20 3d 20 31 0a 4f 50 54 49 4d 49 5a 41 54 49 G = 1.OPTIMIZATI
4ce0: 4f 4e 53 20 20 20 3d 20 24 28 4f 50 54 49 4d 49 ONS = $(OPTIMI
4cf0: 5a 41 54 49 4f 4e 53 29 20 2d 4f 32 0a 21 65 6c ZATIONS) -O2.!el
4d00: 73 65 0a 23 20 4c 65 67 61 63 79 2c 20 72 65 61 se.# Legacy, rea
4d10: 6c 6c 79 2e 20 41 6c 6c 20 6d 6f 64 65 72 6e 20 lly. All modern
4d20: 63 6f 6d 70 69 6c 65 72 73 20 73 75 70 70 6f 72 compilers suppor
4d30: 74 20 74 68 69 73 0a 21 6d 65 73 73 61 67 65 20 t this.!message
4d40: 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f 65 *** Compiler doe
4d50: 73 20 6e 6f 74 20 68 61 76 65 20 27 4f 70 74 69 s not have 'Opti
4d60: 6d 69 7a 61 74 69 6f 6e 73 27 0a 4f 50 54 49 4d mizations'.OPTIM
4d70: 49 5a 49 4e 47 20 3d 20 30 0a 21 65 6e 64 69 66 IZING = 0.!endif
4d80: 0a 0a 23 20 43 68 65 63 6b 73 20 66 6f 72 20 62 ..# Checks for b
4d90: 75 66 66 65 72 20 6f 76 65 72 66 6c 6f 77 73 20 uffer overflows
4da0: 69 6e 20 6c 6f 63 61 6c 20 61 72 72 61 79 73 0a in local arrays.
4db0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 !if [nmakehlp -c
4dc0: 20 2d 47 53 5d 0a 4f 50 54 49 4d 49 5a 41 54 49 -GS].OPTIMIZATI
4dd0: 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a ONS = $(OPTIMIZ
4de0: 41 54 49 4f 4e 53 29 20 2d 47 53 0a 21 65 6e 64 ATIONS) -GS.!end
4df0: 69 66 0a 0a 23 20 4c 69 6e 6b 20 74 69 6d 65 20 if..# Link time
4e00: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e 6f optimization. No
4e10: 74 65 20 74 68 61 74 20 74 68 69 73 20 6f 70 74 te that this opt
4e20: 69 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c 79 ion (potentially
4e30: 29 20 6d 61 6b 65 73 0a 23 20 67 65 6e 65 72 61 ) makes.# genera
4e40: 74 65 64 20 6c 69 62 72 61 72 69 65 73 20 6f 6e ted libraries on
4e50: 6c 79 20 75 73 61 62 6c 65 20 62 79 20 74 68 65 ly usable by the
4e60: 20 73 70 65 63 69 66 69 63 20 56 43 2b 2b 20 76 specific VC++ v
4e70: 65 72 73 69 6f 6e 20 74 68 61 74 0a 23 20 63 72 ersion that.# cr
4e80: 65 61 74 65 64 20 69 74 2e 20 52 65 71 75 69 72 eated it. Requir
4e90: 65 73 20 2f 4c 54 43 47 20 6c 69 6e 6b 65 72 20 es /LTCG linker
4ea0: 6f 70 74 69 6f 6e 0a 21 69 66 20 5b 6e 6d 61 6b option.!if [nmak
4eb0: 65 68 6c 70 20 2d 63 20 2d 47 4c 5d 0a 4f 50 54 ehlp -c -GL].OPT
4ec0: 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d 20 24 28 IMIZATIONS = $(
4ed0: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d OPTIMIZATIONS) -
4ee0: 47 4c 0a 43 43 5f 47 4c 5f 4f 50 54 5f 45 4e 41 GL.CC_GL_OPT_ENA
4ef0: 42 4c 45 44 20 3d 20 31 0a 21 65 6c 73 65 0a 23 BLED = 1.!else.#
4f00: 20 49 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c In newer compil
4f10: 65 72 73 20 2d 47 4c 20 61 6e 64 20 2d 59 58 20 ers -GL and -YX
4f20: 61 72 65 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 are incompatible
4f30: 2e 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
4f40: 2d 63 20 2d 59 58 5d 0a 4f 50 54 49 4d 49 5a 41 -c -YX].OPTIMIZA
4f50: 54 49 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d TIONS = $(OPTIM
4f60: 49 5a 41 54 49 4f 4e 53 29 20 2d 59 58 0a 21 65 IZATIONS) -YX.!e
4f70: 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 5b 6e ndif.!endif # [n
4f80: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d 0a makehlp -c -GL].
4f90: 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 .DEBUGFLAGS
4fa0: 3d 20 24 28 46 50 4f 50 54 53 29 0a 0a 23 20 52 = $(FPOPTS)..# R
4fb0: 75 6e 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68 un time error ch
4fc0: 65 63 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61 ecks. Not availa
4fd0: 62 6c 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20 ble or valid in
4fe0: 61 20 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64 a release, non-d
4ff0: 65 62 75 67 20 62 75 69 6c 64 0a 23 20 52 54 43 ebug build.# RTC
5000: 20 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20 63 is for modern c
5010: 6f 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69 73 ompilers, -GZ is
5020: 20 6c 65 67 61 63 79 0a 21 69 66 20 5b 6e 6d 61 legacy.!if [nma
5030: 6b 65 68 6c 70 20 2d 63 20 2d 52 54 43 31 5d 0a kehlp -c -RTC1].
5040: 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d DEBUGFLAGS =
5050: 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 2d $(DEBUGFLAGS) -
5060: 52 54 43 31 0a 21 65 6c 73 65 69 66 20 5b 6e 6d RTC1.!elseif [nm
5070: 61 6b 65 68 6c 70 20 2d 63 20 2d 47 5a 5d 0a 44 akehlp -c -GZ].D
5080: 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 EBUGFLAGS =
5090: 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 2d 47 $(DEBUGFLAGS) -G
50a0: 5a 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d Z.!endif..#-----
50b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
50c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
50d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
50e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 4c 69 -----------.# Li
50f0: 6e 6b 65 72 20 66 6c 61 67 73 0a 0a 23 20 4c 49 nker flags..# LI
5100: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 20 61 NKER_TESTFLAGS a
5110: 72 65 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20 re for internal
5120: 75 73 65 20 77 68 65 6e 20 77 65 20 63 61 6c 6c use when we call
5130: 20 6e 6d 61 6b 65 68 6c 70 20 74 6f 20 74 65 73 nmakehlp to tes
5140: 74 0a 23 20 69 66 20 74 68 65 20 6c 69 6e 6b 65 t.# if the linke
5150: 72 20 73 75 70 70 6f 72 74 73 20 61 20 73 70 65 r supports a spe
5160: 63 69 66 69 63 20 6f 70 74 69 6f 6e 2e 20 57 69 cific option. Wi
5170: 74 68 6f 75 74 20 74 68 65 73 65 20 66 6c 61 67 thout these flag
5180: 73 20 6c 69 6e 6b 20 77 69 6c 6c 0a 23 20 72 65 s link will.# re
5190: 74 75 72 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 turn "LNK1561: e
51a0: 6e 74 72 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 ntry point must
51b0: 62 65 20 64 65 66 69 6e 65 64 22 20 65 72 72 6f be defined" erro
51c0: 72 20 63 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d r compiling from
51d0: 20 56 53 2d 49 44 45 3a 0a 23 20 54 68 65 79 20 VS-IDE:.# They
51e0: 61 72 65 20 6e 6f 74 20 70 61 73 73 65 64 20 74 are not passed t
51f0: 68 72 6f 75 67 68 20 74 6f 20 74 68 65 20 61 63 hrough to the ac
5200: 74 75 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e tual application
5210: 20 2f 20 65 78 74 65 6e 73 69 6f 6e 0a 23 20 6c / extension.# l
5220: 69 6e 6b 20 72 75 6c 65 73 2e 0a 21 69 66 6e 64 ink rules..!ifnd
5230: 65 66 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c ef LINKER_TESTFL
5240: 41 47 53 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 46 AGS.LINKER_TESTF
5250: 4c 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f 45 LAGS = /DLL /NOE
5260: 4e 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 68 NTRY /OUT:nmakeh
5270: 6c 70 2e 6f 75 74 0a 21 65 6e 64 69 66 0a 0a 4c lp.out.!endif..L
5280: 49 4e 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d INKERFLAGS =
5290: 0a 0a 23 20 49 66 20 63 6f 6d 70 69 6c 65 72 20 ..# If compiler
52a0: 68 61 73 20 65 6e 61 62 6c 65 64 20 6c 69 6e 6b has enabled link
52b0: 20 74 69 6d 65 20 6f 70 74 69 6d 69 7a 61 74 69 time optimizati
52c0: 6f 6e 2c 20 6c 69 6e 6b 65 72 20 6d 75 73 74 20 on, linker must
52d0: 74 6f 6f 20 77 69 74 68 20 2d 6c 74 63 67 0a 21 too with -ltcg.!
52e0: 69 66 64 65 66 20 43 43 5f 47 4c 5f 4f 50 54 5f ifdef CC_GL_OPT_
52f0: 45 4e 41 42 4c 45 44 0a 21 69 66 20 5b 6e 6d 61 ENABLED.!if [nma
5300: 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 20 24 kehlp -l -ltcg $
5310: 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 (LINKER_TESTFLAG
5320: 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 S)].LINKERFLAGS
5330: 20 20 20 20 3d 20 24 28 4c 49 4e 4b 45 52 46 4c = $(LINKERFL
5340: 41 47 53 29 20 2d 6c 74 63 67 0a 21 65 6e 64 69 AGS) -ltcg.!endi
5350: 66 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 f.!endif...#####
5360: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5370: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5380: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5390: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 36 2e ###########.# 6.
53a0: 20 45 78 74 72 61 63 74 20 76 61 72 69 6f 75 73 Extract various
53b0: 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 version numbers
53c0: 20 66 72 6f 6d 20 68 65 61 64 65 72 73 0a 23 20 from headers.#
53d0: 46 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20 For Tcl and Tk,
53e0: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
53f0: 61 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72 are extracted fr
5400: 6f 6d 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e om tcl.h and tk.
5410: 68 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c 79 h.# respectively
5420: 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 . For extensions
5430: 2c 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20 65 , versions are e
5440: 78 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 68 xtracted from th
5450: 65 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e e.# configure.in
5460: 20 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 or configure.ac
5470: 20 66 72 6f 6d 20 74 68 65 20 54 45 41 20 63 6f from the TEA co
5480: 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 66 20 69 nfiguration if i
5490: 74 0a 23 20 65 78 69 73 74 73 2c 20 61 6e 64 20 t.# exists, and
54a0: 75 6e 73 65 74 20 6f 74 68 65 72 77 69 73 65 2e unset otherwise.
54b0: 0a 23 20 53 65 74 73 20 74 68 65 20 66 6f 6c 6c .# Sets the foll
54c0: 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a 23 20 owing macros:.#
54d0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
54e0: 4e 0a 23 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 N.# TCL_MINOR_VE
54f0: 52 53 49 4f 4e 0a 23 20 54 43 4c 5f 52 45 4c 45 RSION.# TCL_RELE
5500: 41 53 45 5f 53 45 52 49 41 4c 0a 23 20 54 43 4c ASE_SERIAL.# TCL
5510: 5f 50 41 54 43 48 5f 4c 45 56 45 4c 0a 23 20 54 _PATCH_LEVEL.# T
5520: 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 0a CL_PATCH_LETTER.
5530: 23 20 54 43 4c 5f 56 45 52 53 49 4f 4e 0a 23 20 # TCL_VERSION.#
5540: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
5550: 0a 23 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 .# TK_MINOR_VERS
5560: 49 4f 4e 0a 23 20 54 4b 5f 52 45 4c 45 41 53 45 ION.# TK_RELEASE
5570: 5f 53 45 52 49 41 4c 0a 23 20 54 4b 5f 50 41 54 _SERIAL.# TK_PAT
5580: 43 48 5f 4c 45 56 45 4c 0a 23 20 54 4b 5f 50 41 CH_LEVEL.# TK_PA
5590: 54 43 48 5f 4c 45 54 54 45 52 0a 23 20 54 4b 5f TCH_LETTER.# TK_
55a0: 56 45 52 53 49 4f 4e 0a 23 20 44 4f 54 56 45 52 VERSION.# DOTVER
55b0: 53 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 66 SION - set as (f
55c0: 6f 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35 0a or example) 2.5.
55d0: 23 20 56 45 52 53 49 4f 4e 20 2d 20 73 65 74 20 # VERSION - set
55e0: 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c 65 20 as (for example
55f0: 32 35 29 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 25).#-----------
5600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5630: 2d 2d 2d 0a 0a 21 69 66 20 5b 65 63 68 6f 20 52 ---..!if [echo R
5640: 45 4d 20 3d 20 54 68 69 73 20 66 69 6c 65 20 69 EM = This file i
5650: 73 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d s generated from
5660: 20 72 75 6c 65 73 2e 76 63 20 3e 20 76 65 72 73 rules.vc > vers
5670: 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a ions.vc].!endif.
5680: 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 4d 41 !if [echo TCL_MA
5690: 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e JOR_VERSION = \>
56a0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
56b0: 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 . && [nmakehlp
56c0: 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 -V "$(_TCL_H)"
56d0: 22 64 65 66 69 6e 65 20 54 43 4c 5f 4d 41 4a 4f "define TCL_MAJO
56e0: 52 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 R_VERSION" >> ve
56f0: 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 rsions.vc].!endi
5700: 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f f.!if [echo TCL_
5710: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 MINOR_VERSION =
5720: 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d \>> versions.vc]
5730: 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 \. && [nmakeh
5740: 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 lp -V "$(_TCL_H)
5750: 22 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 " TCL_MINOR_VERS
5760: 49 4f 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e ION >> versions.
5770: 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b vc].!endif.!if [
5780: 65 63 68 6f 20 54 43 4c 5f 52 45 4c 45 41 53 45 echo TCL_RELEASE
5790: 5f 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 _SERIAL = \>> ve
57a0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 rsions.vc] \.
57b0: 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 && [nmakehlp -V
57c0: 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f "$(_TCL_H)" TCL_
57d0: 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e RELEASE_SERIAL >
57e0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
57f0: 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 endif.!if [echo
5800: 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 TCL_PATCH_LEVEL
5810: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \>> versions.v
5820: 63 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b c] \. && [nmak
5830: 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f ehlp -V "$(_TCL_
5840: 48 29 22 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 H)" TCL_PATCH_LE
5850: 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e VEL >> versions.
5860: 76 63 5d 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 vc].!endif..!if
5870: 64 65 66 69 6e 65 64 28 5f 54 4b 5f 48 29 0a 21 defined(_TK_H).!
5880: 69 66 20 5b 65 63 68 6f 20 54 4b 5f 4d 41 4a 4f if [echo TK_MAJO
5890: 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 R_VERSION = \>>
58a0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 versions.vc] \.
58b0: 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d && [nmakehlp -
58c0: 56 20 24 28 5f 54 4b 5f 48 29 20 22 64 65 66 69 V $(_TK_H) "defi
58d0: 6e 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 ne TK_MAJOR_VERS
58e0: 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 ION" >> versions
58f0: 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 .vc].!endif.!if
5900: 5b 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 5f 56 [echo TK_MINOR_V
5910: 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 ERSION = \>> ver
5920: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 sions.vc] \. &
5930: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 & [nmakehlp -V $
5940: 28 5f 54 4b 5f 48 29 20 54 4b 5f 4d 49 4e 4f 52 (_TK_H) TK_MINOR
5950: 5f 56 45 52 53 49 4f 4e 20 3e 3e 20 76 65 72 73 _VERSION >> vers
5960: 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a ions.vc].!endif.
5970: 21 69 66 20 5b 65 63 68 6f 20 54 4b 5f 52 45 4c !if [echo TK_REL
5980: 45 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e EASE_SERIAL = \>
5990: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
59a0: 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 . && [nmakehlp
59b0: 20 2d 56 20 22 24 28 5f 54 4b 5f 48 29 22 20 54 -V "$(_TK_H)" T
59c0: 4b 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c K_RELEASE_SERIAL
59d0: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
59e0: 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 .!endif.!if [ech
59f0: 6f 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c o TK_PATCH_LEVEL
5a00: 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e = \>> versions.
5a10: 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 vc] \. && [nma
5a20: 6b 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 kehlp -V $(_TK_H
5a30: 29 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c ) TK_PATCH_LEVEL
5a40: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
5a50: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
5a60: 20 5f 54 4b 5f 48 0a 0a 21 69 6e 63 6c 75 64 65 _TK_H..!include
5a70: 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 54 43 versions.vc..TC
5a80: 4c 5f 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 L_VERSION.= $(TC
5a90: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
5aa0: 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 $(TCL_MINOR_VERS
5ab0: 49 4f 4e 29 0a 54 43 4c 5f 44 4f 54 56 45 52 53 ION).TCL_DOTVERS
5ac0: 49 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f ION.= $(TCL_MAJO
5ad0: 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c R_VERSION).$(TCL
5ae0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a _MINOR_VERSION).
5af0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
5b00: 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 $(TCL_PATCH_LEV
5b10: 45 4c 29 20 22 61 22 5d 0a 54 43 4c 5f 50 41 54 EL) "a"].TCL_PAT
5b20: 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 65 CH_LETTER = a.!e
5b30: 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 lseif [nmakehlp
5b40: 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c -f $(TCL_PATCH_L
5b50: 45 56 45 4c 29 20 22 62 22 5d 0a 54 43 4c 5f 50 EVEL) "b"].TCL_P
5b60: 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0a ATCH_LETTER = b.
5b70: 21 65 6c 73 65 0a 54 43 4c 5f 50 41 54 43 48 5f !else.TCL_PATCH_
5b80: 4c 45 54 54 45 52 20 3d 20 2e 0a 21 65 6e 64 69 LETTER = ..!endi
5b90: 66 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 5f f..!if defined(_
5ba0: 54 4b 5f 48 29 0a 0a 54 4b 5f 56 45 52 53 49 4f TK_H)..TK_VERSIO
5bb0: 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 N.= $(TK_MAJOR_V
5bc0: 45 52 53 49 4f 4e 29 24 28 54 4b 5f 4d 49 4e 4f ERSION)$(TK_MINO
5bd0: 52 5f 56 45 52 53 49 4f 4e 29 0a 54 4b 5f 44 4f R_VERSION).TK_DO
5be0: 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 4b 5f TVERSION.= $(TK_
5bf0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 MAJOR_VERSION).$
5c00: 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f (TK_MINOR_VERSIO
5c10: 4e 29 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 N).!if [nmakehlp
5c20: 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c -f $(TK_PATCH_L
5c30: 45 56 45 4c 29 20 22 61 22 5d 0a 54 4b 5f 50 41 EVEL) "a"].TK_PA
5c40: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 TCH_LETTER = a.!
5c50: 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 elseif [nmakehlp
5c60: 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c -f $(TK_PATCH_L
5c70: 45 56 45 4c 29 20 22 62 22 5d 0a 54 4b 5f 50 41 EVEL) "b"].TK_PA
5c80: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0a 21 TCH_LETTER = b.!
5c90: 65 6c 73 65 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 else.TK_PATCH_LE
5ca0: 54 54 45 52 20 3d 20 2e 0a 21 65 6e 64 69 66 0a TTER = ..!endif.
5cb0: 0a 21 65 6e 64 69 66 0a 0a 23 20 53 65 74 20 44 .!endif..# Set D
5cc0: 4f 54 56 45 52 53 49 4f 4e 20 61 6e 64 20 56 45 OTVERSION and VE
5cd0: 52 53 49 4f 4e 0a 21 69 66 20 24 28 44 4f 49 4e RSION.!if $(DOIN
5ce0: 47 5f 54 43 4c 29 0a 0a 44 4f 54 56 45 52 53 49 G_TCL)..DOTVERSI
5cf0: 4f 4e 20 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 ON = $(TCL_MAJOR
5d00: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f _VERSION).$(TCL_
5d10: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 56 MINOR_VERSION).V
5d20: 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c 5f 56 ERSION = $(TCL_V
5d30: 45 52 53 49 4f 4e 29 0a 0a 21 65 6c 73 65 69 66 ERSION)..!elseif
5d40: 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 0a 44 4f $(DOING_TK)..DO
5d50: 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b 5f TVERSION = $(TK_
5d60: 44 4f 54 56 45 52 53 49 4f 4e 29 0a 56 45 52 53 DOTVERSION).VERS
5d70: 49 4f 4e 20 3d 20 24 28 54 4b 5f 56 45 52 53 49 ION = $(TK_VERSI
5d80: 4f 4e 29 0a 0a 21 65 6c 73 65 20 23 20 44 6f 69 ON)..!else # Doi
5d90: 6e 67 20 61 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 ng a non-Tk exte
5da0: 6e 73 69 6f 6e 0a 0a 23 20 49 66 20 70 61 72 65 nsion..# If pare
5db0: 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 nt makefile has
5dc0: 6e 6f 74 20 64 65 66 69 6e 65 64 20 44 4f 54 56 not defined DOTV
5dd0: 45 52 53 49 4f 4e 2c 20 74 72 79 20 74 6f 20 67 ERSION, try to g
5de0: 65 74 20 69 74 20 66 72 6f 6d 20 54 45 41 0a 23 et it from TEA.#
5df0: 20 66 69 72 73 74 20 66 72 6f 6d 20 61 20 63 6f first from a co
5e00: 6e 66 69 67 75 72 65 2e 69 6e 20 66 69 6c 65 2c nfigure.in file,
5e10: 20 61 6e 64 20 74 68 65 6e 20 66 72 6f 6d 20 63 and then from c
5e20: 6f 6e 66 69 67 75 72 65 2e 61 63 0a 21 69 66 6e onfigure.ac.!ifn
5e30: 64 65 66 20 44 4f 54 56 45 52 53 49 4f 4e 0a 21 def DOTVERSION.!
5e40: 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 if [echo DOTVERS
5e50: 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e ION = \> version
5e60: 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e s.vc] \. || [n
5e70: 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f makehlp -V $(ROO
5e80: 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 T)\configure.in
5e90: 41 43 5f 49 4e 49 54 20 3e 3e 20 76 65 72 73 69 AC_INIT >> versi
5ea0: 6f 6e 73 2e 76 63 5d 0a 21 69 66 20 5b 65 63 68 ons.vc].!if [ech
5eb0: 6f 20 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c o DOTVERSION = \
5ec0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
5ed0: 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 . || [nmakehlp
5ee0: 20 2d 56 20 24 28 52 4f 4f 54 29 5c 63 6f 6e 66 -V $(ROOT)\conf
5ef0: 69 67 75 72 65 2e 61 63 20 41 43 5f 49 4e 49 54 igure.ac AC_INIT
5f00: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
5f10: 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c .!error *** Coul
5f20: 64 20 6e 6f 74 20 66 69 67 75 72 65 20 6f 75 74 d not figure out
5f30: 20 65 78 74 65 6e 73 69 6f 6e 20 76 65 72 73 69 extension versi
5f40: 6f 6e 2e 20 50 6c 65 61 73 65 20 64 65 66 69 6e on. Please defin
5f50: 65 20 44 4f 54 56 45 52 53 49 4f 4e 20 69 6e 20 e DOTVERSION in
5f60: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 parent makefile
5f70: 62 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 before including
5f80: 20 72 75 6c 65 73 2e 76 63 2e 0a 21 65 6e 64 69 rules.vc..!endi
5f90: 66 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 f.!endif.!includ
5fa0: 65 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a 21 65 e versions.vc.!e
5fb0: 6e 64 69 66 20 23 20 44 4f 54 56 45 52 53 49 4f ndif # DOTVERSIO
5fc0: 4e 0a 56 45 52 53 49 4f 4e 20 20 20 20 20 20 20 N.VERSION
5fd0: 20 20 3d 20 24 28 44 4f 54 56 45 52 53 49 4f 4e = $(DOTVERSION
5fe0: 3a 2e 3d 29 0a 0a 21 65 6e 64 69 66 20 23 20 24 :.=)..!endif # $
5ff0: 28 44 4f 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e 20 (DOING_TCL) ...
6000: 65 74 63 2e 0a 0a 23 20 57 69 6e 64 6f 77 73 20 etc...# Windows
6010: 52 43 20 66 69 6c 65 73 20 68 61 76 65 20 33 20 RC files have 3
6020: 76 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e version componen
6030: 74 73 2e 20 45 6e 73 75 72 65 20 74 68 69 73 20 ts. Ensure this
6040: 69 72 72 65 73 70 65 63 74 69 76 65 0a 23 20 6f irrespective.# o
6050: 66 20 68 6f 77 20 6d 61 6e 79 20 63 6f 6d 70 6f f how many compo
6060: 6e 65 6e 74 73 20 74 68 65 20 70 61 63 6b 61 67 nents the packag
6070: 65 20 68 61 73 20 73 70 65 63 69 66 69 65 64 2e e has specified.
6080: 20 42 61 73 69 63 61 6c 6c 79 2c 20 65 6e 73 75 Basically, ensu
6090: 72 65 0a 23 20 6d 69 6e 69 6d 75 6d 20 34 20 63 re.# minimum 4 c
60a0: 6f 6d 70 6f 6e 65 6e 74 73 20 62 79 20 61 70 70 omponents by app
60b0: 65 6e 64 69 6e 67 20 34 20 30 27 73 20 61 6e 64 ending 4 0's and
60c0: 20 74 68 65 6e 20 70 69 63 6b 20 6f 75 74 20 74 then pick out t
60d0: 68 65 20 66 69 72 73 74 20 34 2e 0a 23 20 41 6c he first 4..# Al
60e0: 73 6f 20 74 61 6b 65 20 63 61 72 65 20 6f 66 20 so take care of
60f0: 74 68 65 20 66 61 63 74 20 74 68 61 74 20 44 4f the fact that DO
6100: 54 56 45 52 53 49 4f 4e 20 6d 61 79 20 68 61 76 TVERSION may hav
6110: 65 20 22 61 22 20 6f 72 20 22 62 22 20 69 6e 73 e "a" or "b" ins
6120: 74 65 61 64 0a 23 20 6f 66 20 22 2e 22 20 73 65 tead.# of "." se
6130: 70 61 72 61 74 69 6e 67 20 74 68 65 20 76 65 72 parating the ver
6140: 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e sion components.
6150: 0a 44 4f 54 53 45 50 41 52 41 54 45 44 3d 24 28 .DOTSEPARATED=$(
6160: 44 4f 54 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 0a DOTVERSION:a=.).
6170: 44 4f 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 DOTSEPARATED=$(D
6180: 4f 54 53 45 50 41 52 41 54 45 44 3a 62 3d 2e 29 OTSEPARATED:b=.)
6190: 0a 21 69 66 20 5b 65 63 68 6f 20 52 43 43 4f 4d .!if [echo RCCOM
61a0: 4d 41 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 MAVERSION = \> v
61b0: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 ersions.vc] \.
61c0: 7c 7c 20 5b 66 6f 72 20 2f 66 20 22 74 6f 6b 65 || [for /f "toke
61d0: 6e 73 3d 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 65 ns=1,2,3,4,5* de
61e0: 6c 69 6d 73 3d 2e 22 20 25 61 20 69 6e 20 28 22 lims=." %a in ("
61f0: 24 28 44 4f 54 53 45 50 41 52 41 54 45 44 29 2e $(DOTSEPARATED).
6200: 30 2e 30 2e 30 2e 30 22 29 20 64 6f 20 65 63 68 0.0.0.0") do ech
6210: 6f 20 25 61 2c 25 62 2c 25 63 2c 25 64 20 3e 3e o %a,%b,%c,%d >>
6220: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 versions.vc].!e
6230: 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e rror *** Could n
6240: 6f 74 20 67 65 6e 65 72 61 74 65 20 52 43 43 4f ot generate RCCO
6250: 4d 4d 41 56 45 52 53 49 4f 4e 20 2a 2a 2a 0a 21 MMAVERSION ***.!
6260: 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 76 endif.!include v
6270: 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 23 23 23 23 ersions.vc..####
6280: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62c0: 23 23 23 23 0a 23 20 37 2e 20 50 61 72 73 65 20 ####.# 7. Parse
62d0: 74 68 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 74 the OPTS macro t
62e0: 6f 20 77 6f 72 6b 20 6f 75 74 20 74 68 65 20 72 o work out the r
62f0: 65 71 75 65 73 74 65 64 20 62 75 69 6c 64 20 63 equested build c
6300: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 0a 23 20 onfiguration..#
6310: 42 61 73 65 64 20 6f 6e 20 74 68 69 73 2c 20 77 Based on this, w
6320: 65 20 77 69 6c 6c 20 63 6f 6e 73 74 72 75 63 74 e will construct
6330: 20 74 68 65 20 61 63 74 75 61 6c 20 73 77 69 74 the actual swit
6340: 63 68 65 73 20 74 6f 20 62 65 20 70 61 73 73 65 ches to be passe
6350: 64 20 74 6f 20 74 68 65 0a 23 20 63 6f 6d 70 69 d to the.# compi
6360: 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 75 ler and linker u
6370: 73 69 6e 67 20 74 68 65 20 6d 61 63 72 6f 73 20 sing the macros
6380: 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 70 defined in the p
6390: 72 65 76 69 6f 75 73 20 73 65 63 74 69 6f 6e 2e revious section.
63a0: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 .# The following
63b0: 20 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66 69 macros are defi
63c0: 6e 65 64 20 62 79 20 74 68 69 73 20 73 65 63 74 ned by this sect
63d0: 69 6f 6e 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 ion based on OPT
63e0: 53 0a 23 20 53 54 41 54 49 43 5f 42 55 49 4c 44 S.# STATIC_BUILD
63f0: 20 2d 20 30 20 2d 3e 20 54 63 6c 20 69 73 20 74 - 0 -> Tcl is t
6400: 6f 20 62 65 20 62 75 69 6c 74 20 61 73 20 61 20 o be built as a
6410: 73 68 61 72 65 64 20 6c 69 62 72 61 72 79 0a 23 shared library.#
6420: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
6430: 31 20 2d 3e 20 62 75 69 6c 64 20 61 73 20 61 20 1 -> build as a
6440: 73 74 61 74 69 63 20 6c 69 62 72 61 72 79 20 61 static library a
6450: 6e 64 20 73 68 65 6c 6c 0a 23 20 54 43 4c 5f 54 nd shell.# TCL_T
6460: 48 52 45 41 44 53 20 2d 20 6c 65 67 61 63 79 20 HREADS - legacy
6470: 62 75 74 20 61 6c 77 61 79 73 20 31 20 6f 6e 20 but always 1 on
6480: 57 69 6e 64 6f 77 73 20 73 69 6e 63 65 20 77 69 Windows since wi
6490: 6e 73 6f 63 6b 20 72 65 71 75 69 72 65 73 20 69 nsock requires i
64a0: 74 2e 0a 23 20 44 45 42 55 47 20 2d 20 31 20 2d t..# DEBUG - 1 -
64b0: 3e 20 64 65 62 75 67 20 62 75 69 6c 64 2c 20 30 > debug build, 0
64c0: 20 2d 3e 20 72 65 6c 65 61 73 65 20 62 75 69 6c -> release buil
64d0: 64 73 0a 23 20 53 59 4d 42 4f 4c 53 20 2d 20 31 ds.# SYMBOLS - 1
64e0: 20 2d 3e 20 67 65 6e 65 72 61 74 65 20 50 44 42 -> generate PDB
64f0: 27 73 2c 20 30 20 2d 3e 20 6e 6f 20 50 44 42 27 's, 0 -> no PDB'
6500: 73 0a 23 20 50 52 4f 46 49 4c 45 20 2d 20 31 20 s.# PROFILE - 1
6510: 2d 3e 20 67 65 6e 65 72 61 74 65 20 70 72 6f 66 -> generate prof
6520: 69 6c 69 6e 67 20 69 6e 66 6f 2c 20 30 20 2d 3e iling info, 0 ->
6530: 20 6e 6f 20 70 72 6f 66 69 6c 69 6e 67 0a 23 20 no profiling.#
6540: 50 47 4f 20 20 20 20 20 2d 20 31 20 2d 3e 20 70 PGO - 1 -> p
6550: 72 6f 66 69 6c 65 20 62 61 73 65 64 20 6f 70 74 rofile based opt
6560: 69 6d 69 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e 20 imization, 0 ->
6570: 6e 6f 0a 23 20 4d 53 56 43 52 54 20 20 2d 20 31 no.# MSVCRT - 1
6580: 20 2d 3e 20 6c 69 6e 6b 20 74 6f 20 64 79 6e 61 -> link to dyna
6590: 6d 69 63 20 43 20 72 75 6e 74 69 6d 65 20 65 76 mic C runtime ev
65a0: 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 en when building
65b0: 20 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 6c static Tcl buil
65c0: 64 0a 23 20 20 20 20 20 20 20 20 20 20 20 30 20 d.# 0
65d0: 2d 3e 20 6c 69 6e 6b 20 74 6f 20 73 74 61 74 69 -> link to stati
65e0: 63 20 43 20 72 75 6e 74 69 6d 65 20 66 6f 72 20 c C runtime for
65f0: 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 6c 64 static Tcl build
6600: 2e 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 6f ..# Do
6610: 65 73 20 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 es not impact sh
6620: 61 72 65 64 20 54 63 6c 20 62 75 69 6c 64 73 20 ared Tcl builds
6630: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 20 3d 3d (STATIC_BUILD ==
6640: 20 30 29 0a 23 20 20 20 20 20 20 20 20 20 20 20 0).#
6650: 44 65 66 61 75 6c 74 3a 20 31 20 66 6f 72 20 54 Default: 1 for T
6660: 63 6c 20 38 2e 37 20 61 6e 64 20 75 70 2c 20 30 cl 8.7 and up, 0
6670: 20 6f 74 68 65 72 77 69 73 65 2e 0a 23 20 54 43 otherwise..# TC
6680: 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 L_USE_STATIC_PAC
6690: 4b 41 47 45 53 20 2d 20 31 20 2d 3e 20 73 74 61 KAGES - 1 -> sta
66a0: 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 68 65 tically link the
66b0: 20 72 65 67 69 73 74 72 79 20 61 6e 64 20 64 64 registry and dd
66c0: 65 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 20 e extensions.#
66d0: 20 20 20 20 20 20 20 20 20 69 6e 20 74 68 65 20 in the
66e0: 54 63 6c 20 61 6e 64 20 57 69 73 68 20 73 68 65 Tcl and Wish she
66f0: 6c 6c 2e 20 30 20 2d 3e 20 6b 65 65 70 20 74 68 ll. 0 -> keep th
6700: 65 6d 20 61 73 20 73 68 61 72 65 64 20 6c 69 62 em as shared lib
6710: 72 61 72 69 65 73 2e 20 44 6f 65 73 0a 23 20 20 raries. Does.#
6720: 20 20 20 20 20 20 20 20 20 6e 6f 74 20 69 6d 70 not imp
6730: 61 63 74 20 73 68 61 72 65 64 20 54 63 6c 20 62 act shared Tcl b
6740: 75 69 6c 64 73 2e 20 49 6d 70 6c 69 65 64 20 62 uilds. Implied b
6750: 79 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 73 y STATIC_BUILD s
6760: 69 6e 63 65 20 54 63 6c 20 38 2e 37 2e 0a 23 20 ince Tcl 8.7..#
6770: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
6780: 20 2d 20 31 20 2d 3e 20 55 73 65 20 61 20 73 68 - 1 -> Use a sh
6790: 61 72 65 64 20 67 6c 6f 62 61 6c 20 66 72 65 65 ared global free
67a0: 20 70 6f 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 61 pool for alloca
67b0: 74 69 6f 6e 2e 0a 23 20 20 20 20 20 20 20 20 20 tion..#
67c0: 20 20 30 20 2d 3e 20 55 73 65 20 74 68 65 20 6e 0 -> Use the n
67d0: 6f 6e 2d 74 68 72 65 61 64 20 61 6c 6c 6f 63 61 on-thread alloca
67e0: 74 6f 72 2e 0a 23 20 55 4e 43 48 45 43 4b 45 44 tor..# UNCHECKED
67f0: 20 2d 20 31 20 2d 3e 20 77 68 65 6e 20 64 6f 69 - 1 -> when doi
6800: 6e 67 20 61 20 64 65 62 75 67 20 62 75 69 6c 64 ng a debug build
6810: 20 77 69 74 68 20 73 79 6d 62 6f 6c 73 2c 20 75 with symbols, u
6820: 73 65 20 74 68 65 20 72 65 6c 65 61 73 65 0a 23 se the release.#
6830: 20 20 20 20 20 20 20 20 20 20 20 43 20 72 75 6e C run
6840: 74 69 6d 65 2c 20 30 20 2d 3e 20 75 73 65 20 74 time, 0 -> use t
6850: 68 65 20 64 65 62 75 67 20 43 20 72 75 6e 74 69 he debug C runti
6860: 6d 65 2e 0a 23 20 55 53 45 5f 53 54 55 42 53 20 me..# USE_STUBS
6870: 2d 20 31 20 2d 3e 20 63 6f 6d 70 69 6c 65 20 74 - 1 -> compile t
6880: 6f 20 75 73 65 20 73 74 75 62 73 20 69 6e 74 65 o use stubs inte
6890: 72 66 61 63 65 73 2c 20 30 20 2d 3e 20 64 69 72 rfaces, 0 -> dir
68a0: 65 63 74 20 6c 69 6e 6b 69 6e 67 0a 23 20 43 4f ect linking.# CO
68b0: 4e 46 49 47 5f 43 48 45 43 4b 20 2d 20 31 20 2d NFIG_CHECK - 1 -
68c0: 3e 20 63 68 65 63 6b 20 63 75 72 72 65 6e 74 20 > check current
68d0: 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 build configurat
68e0: 69 6f 6e 20 61 67 61 69 6e 73 74 20 54 63 6c 0a ion against Tcl.
68f0: 23 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 66 # conf
6900: 69 67 75 72 61 74 69 6f 6e 20 28 69 67 6e 6f 72 iguration (ignor
6910: 65 64 20 66 6f 72 20 54 63 6c 20 69 74 73 65 6c ed for Tcl itsel
6920: 66 29 0a 23 20 5f 55 53 45 5f 36 34 42 49 54 5f f).# _USE_64BIT_
6930: 54 49 4d 45 5f 54 20 2d 20 66 6f 72 63 65 73 20 TIME_T - forces
6940: 61 20 62 75 69 6c 64 20 75 73 69 6e 67 20 36 34 a build using 64
6950: 2d 62 69 74 20 74 69 6d 65 5f 74 20 66 6f 72 20 -bit time_t for
6960: 33 32 2d 62 69 74 20 62 75 69 6c 64 0a 23 20 20 32-bit build.#
6970: 20 20 20 20 20 20 20 20 20 28 43 52 54 20 6c 69 (CRT li
6980: 62 72 61 72 79 20 73 68 6f 75 6c 64 20 73 75 70 brary should sup
6990: 70 6f 72 74 20 74 68 69 73 2c 20 6e 6f 74 20 6e port this, not n
69a0: 65 65 64 65 64 20 66 6f 72 20 54 63 6c 20 39 2e eeded for Tcl 9.
69b0: 78 29 0a 23 20 46 75 72 74 68 65 72 2c 20 4c 49 x).# Further, LI
69c0: 4e 4b 45 52 46 4c 41 47 53 20 61 72 65 20 6d 6f NKERFLAGS are mo
69d0: 64 69 66 69 65 64 20 62 61 73 65 64 20 6f 6e 20 dified based on
69e0: 61 62 6f 76 65 2e 0a 0a 23 20 44 65 66 61 75 6c above...# Defaul
69f0: 74 20 76 61 6c 75 65 73 20 66 6f 72 20 61 6c 6c t values for all
6a00: 20 74 68 65 20 61 62 6f 76 65 0a 53 54 41 54 49 the above.STATI
6a10: 43 5f 42 55 49 4c 44 09 3d 20 30 0a 54 43 4c 5f C_BUILD.= 0.TCL_
6a20: 54 48 52 45 41 44 53 09 3d 20 31 0a 44 45 42 55 THREADS.= 1.DEBU
6a30: 47 09 09 3d 20 30 0a 53 59 4d 42 4f 4c 53 09 09 G..= 0.SYMBOLS..
6a40: 3d 20 30 0a 50 52 4f 46 49 4c 45 09 09 3d 20 30 = 0.PROFILE..= 0
6a50: 0a 50 47 4f 09 09 3d 20 30 0a 4d 53 56 43 52 54 .PGO..= 0.MSVCRT
6a60: 09 09 3d 20 31 0a 54 43 4c 5f 55 53 45 5f 53 54 ..= 1.TCL_USE_ST
6a70: 41 54 49 43 5f 50 41 43 4b 41 47 45 53 09 3d 20 ATIC_PACKAGES.=
6a80: 30 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 0.USE_THREAD_ALL
6a90: 4f 43 20 3d 20 31 0a 55 4e 43 48 45 43 4b 45 44 OC = 1.UNCHECKED
6aa0: 09 3d 20 30 0a 43 4f 4e 46 49 47 5f 43 48 45 43 .= 0.CONFIG_CHEC
6ab0: 4b 20 20 20 20 3d 20 31 0a 21 69 66 20 24 28 44 K = 1.!if $(D
6ac0: 4f 49 4e 47 5f 54 43 4c 29 0a 55 53 45 5f 53 54 OING_TCL).USE_ST
6ad0: 55 42 53 20 20 20 20 20 20 20 3d 20 30 0a 21 65 UBS = 0.!e
6ae0: 6c 73 65 0a 55 53 45 5f 53 54 55 42 53 20 20 20 lse.USE_STUBS
6af0: 20 20 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a = 1.!endif..
6b00: 23 20 49 66 20 4f 50 54 53 20 69 73 20 6e 6f 74 # If OPTS is not
6b10: 20 65 6d 70 74 79 20 41 4e 44 20 64 6f 65 73 20 empty AND does
6b20: 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 22 6e 6f 6e not contain "non
6b30: 65 22 20 77 68 69 63 68 20 74 75 72 6e 73 20 6f e" which turns o
6b40: 66 66 20 61 6c 6c 20 4f 50 54 53 0a 23 20 73 65 ff all OPTS.# se
6b50: 74 20 74 68 65 20 61 62 6f 76 65 20 6d 61 63 72 t the above macr
6b60: 6f 73 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 os based on OPTS
6b70: 20 63 6f 6e 74 65 6e 74 0a 21 69 66 20 22 24 28 content.!if "$(
6b80: 4f 50 54 53 29 22 20 21 3d 20 22 22 20 26 26 20 OPTS)" != "" &&
6b90: 21 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 ![nmakehlp -f "$
6ba0: 28 4f 50 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0a (OPTS)" "none"].
6bb0: 0a 23 20 4f 50 54 53 20 61 72 65 20 73 70 65 63 .# OPTS are spec
6bc0: 69 66 69 65 64 2c 20 70 61 72 73 65 20 74 68 65 ified, parse the
6bd0: 6d 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 m..!if [nmakehlp
6be0: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 -f $(OPTS) "sta
6bf0: 74 69 63 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a tic"].!message *
6c00: 2a 2a 20 44 6f 69 6e 67 20 73 74 61 74 69 63 0a ** Doing static.
6c10: 53 54 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 31 STATIC_BUILD.= 1
6c20: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
6c30: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
6c40: 29 20 22 6e 6f 73 74 75 62 73 22 5d 0a 21 6d 65 ) "nostubs"].!me
6c50: 73 73 61 67 65 20 2a 2a 2a 20 4e 6f 74 20 75 73 ssage *** Not us
6c60: 69 6e 67 20 73 74 75 62 73 0a 55 53 45 5f 53 54 ing stubs.USE_ST
6c70: 55 42 53 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a UBS.= 0.!endif..
6c80: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
6c90: 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73 76 63 $(OPTS) "nomsvc
6ca0: 72 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a rt"].!message **
6cb0: 2a 20 44 6f 69 6e 67 20 6e 6f 6d 73 76 63 72 74 * Doing nomsvcrt
6cc0: 0a 4d 53 56 43 52 54 09 09 3d 20 30 0a 21 65 6c .MSVCRT..= 0.!el
6cd0: 73 65 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 se.!if [nmakehlp
6ce0: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6d 73 76 -f $(OPTS) "msv
6cf0: 63 72 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a crt"].!message *
6d00: 2a 2a 20 44 6f 69 6e 67 20 6d 73 76 63 72 74 0a ** Doing msvcrt.
6d10: 21 65 6c 73 65 0a 21 69 66 20 24 28 54 43 4c 5f !else.!if $(TCL_
6d20: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
6d30: 3d 20 38 20 26 26 20 24 28 54 43 4c 5f 4d 49 4e = 8 && $(TCL_MIN
6d40: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3c 20 37 20 OR_VERSION) < 7
6d50: 26 26 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c && $(STATIC_BUIL
6d60: 44 29 0a 4d 53 56 43 52 54 09 09 3d 20 30 0a 21 D).MSVCRT..= 0.!
6d70: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e endif.!endif.!en
6d80: 64 69 66 20 23 20 5b 6e 6d 61 6b 65 68 6c 70 20 dif # [nmakehlp
6d90: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73 -f $(OPTS) "noms
6da0: 76 63 72 74 22 5d 0a 0a 21 69 66 20 5b 6e 6d 61 vcrt"]..!if [nma
6db0: 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 kehlp -f $(OPTS)
6dc0: 20 22 73 74 61 74 69 63 70 6b 67 22 5d 20 26 26 "staticpkg"] &&
6dd0: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
6de0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f .!message *** Do
6df0: 69 6e 67 20 73 74 61 74 69 63 70 6b 67 0a 54 43 ing staticpkg.TC
6e00: 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 L_USE_STATIC_PAC
6e10: 4b 41 47 45 53 09 3d 20 31 0a 21 65 6e 64 69 66 KAGES.= 1.!endif
6e20: 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
6e30: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 74 68 -f $(OPTS) "noth
6e40: 72 65 61 64 73 22 5d 0a 21 6d 65 73 73 61 67 65 reads"].!message
6e50: 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 20 65 78 70 *** Compile exp
6e60: 6c 69 63 69 74 6c 79 20 66 6f 72 20 6e 6f 6e 2d licitly for non-
6e70: 74 68 72 65 61 64 65 64 20 74 63 6c 0a 54 43 4c threaded tcl.TCL
6e80: 5f 54 48 52 45 41 44 53 20 3d 20 30 0a 55 53 45 _THREADS = 0.USE
6e90: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 3d 20 30 _THREAD_ALLOC= 0
6ea0: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
6eb0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
6ec0: 29 20 22 74 63 6c 38 22 5d 0a 21 6d 65 73 73 61 ) "tcl8"].!messa
6ed0: 67 65 20 2a 2a 2a 20 42 75 69 6c 64 20 66 6f 72 ge *** Build for
6ee0: 20 54 63 6c 38 0a 54 43 4c 5f 42 55 49 4c 44 5f Tcl8.TCL_BUILD_
6ef0: 46 4f 52 20 3d 20 38 0a 21 65 6e 64 69 66 0a 0a FOR = 8.!endif..
6f00: 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f !if $(TCL_MAJOR_
6f10: 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 21 69 VERSION) == 8.!i
6f20: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
6f30: 28 4f 50 54 53 29 20 22 74 69 6d 65 36 34 62 69 (OPTS) "time64bi
6f40: 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a t"].!message ***
6f50: 20 46 6f 72 63 65 20 36 34 2d 62 69 74 20 74 69 Force 64-bit ti
6f60: 6d 65 5f 74 0a 5f 55 53 45 5f 36 34 42 49 54 5f me_t._USE_64BIT_
6f70: 54 49 4d 45 5f 54 20 3d 20 31 0a 21 65 6e 64 69 TIME_T = 1.!endi
6f80: 66 0a 21 65 6e 64 69 66 0a 0a 23 20 59 65 73 2c f.!endif..# Yes,
6f90: 20 69 74 27 73 20 77 65 69 72 64 20 74 68 61 74 it's weird that
6fa0: 20 74 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 6f the "symbols" o
6fb0: 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 44 ption controls D
6fc0: 45 42 55 47 20 61 6e 64 0a 23 20 74 68 65 20 22 EBUG and.# the "
6fd0: 70 64 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f 6e pdbs" option con
6fe0: 74 72 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20 54 trols SYMBOLS. T
6ff0: 68 61 74 27 73 20 68 69 73 74 6f 72 69 63 61 6c hat's historical
7000: 2e 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
7010: 2d 66 20 24 28 4f 50 54 53 29 20 22 73 79 6d 62 -f $(OPTS) "symb
7020: 6f 6c 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a ols"].!message *
7030: 2a 2a 20 44 6f 69 6e 67 20 73 79 6d 62 6f 6c 73 ** Doing symbols
7040: 0a 44 45 42 55 47 09 09 3d 20 31 0a 21 65 6c 73 .DEBUG..= 1.!els
7050: 65 0a 44 45 42 55 47 09 09 3d 20 30 0a 21 65 6e e.DEBUG..= 0.!en
7060: 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 dif..!if [nmakeh
7070: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 lp -f $(OPTS) "p
7080: 64 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a dbs"].!message *
7090: 2a 2a 20 44 6f 69 6e 67 20 70 64 62 73 0a 53 59 ** Doing pdbs.SY
70a0: 4d 42 4f 4c 53 09 09 3d 20 31 0a 21 65 6c 73 65 MBOLS..= 1.!else
70b0: 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 21 65 .SYMBOLS..= 0.!e
70c0: 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 ndif..!if [nmake
70d0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
70e0: 70 72 6f 66 69 6c 65 22 5d 0a 21 6d 65 73 73 61 profile"].!messa
70f0: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f ge *** Doing pro
7100: 66 69 6c 65 0a 50 52 4f 46 49 4c 45 09 09 3d 20 file.PROFILE..=
7110: 31 0a 21 65 6c 73 65 0a 50 52 4f 46 49 4c 45 09 1.!else.PROFILE.
7120: 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 .= 0.!endif..!if
7130: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
7140: 4f 50 54 53 29 20 22 70 67 69 22 5d 0a 21 6d 65 OPTS) "pgi"].!me
7150: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7160: 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 6f profile guided o
7170: 70 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 73 74 ptimization inst
7180: 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 50 47 4f 09 rumentation.PGO.
7190: 09 3d 20 31 0a 21 65 6c 73 65 69 66 20 5b 6e 6d .= 1.!elseif [nm
71a0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
71b0: 29 20 22 70 67 6f 22 5d 0a 21 6d 65 73 73 61 67 ) "pgo"].!messag
71c0: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f 66 e *** Doing prof
71d0: 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d ile guided optim
71e0: 69 7a 61 74 69 6f 6e 0a 50 47 4f 09 09 3d 20 32 ization.PGO..= 2
71f0: 0a 21 65 6c 73 65 0a 50 47 4f 09 09 3d 20 30 0a .!else.PGO..= 0.
7200: 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 !endif..!if [nma
7210: 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 kehlp -f $(OPTS)
7220: 20 22 6c 6f 69 6d 70 61 63 74 22 5d 0a 21 6d 65 "loimpact"].!me
7230: 73 73 61 67 65 20 2a 2a 2a 20 57 61 72 6e 69 6e ssage *** Warnin
7240: 67 3a 20 69 67 6e 6f 72 69 6e 67 20 6f 70 74 69 g: ignoring opti
7250: 6f 6e 20 22 6c 6f 69 6d 70 61 63 74 22 20 2d 20 on "loimpact" -
7260: 64 65 70 72 65 63 61 74 65 64 20 6f 6e 20 6d 6f deprecated on mo
7270: 64 65 72 6e 20 57 69 6e 64 6f 77 73 2e 0a 21 65 dern Windows..!e
7280: 6e 64 69 66 0a 0a 23 20 54 42 44 20 2d 20 73 68 ndif..# TBD - sh
7290: 6f 75 6c 64 20 67 65 74 20 72 69 64 20 6f 66 20 ould get rid of
72a0: 74 68 69 73 20 6f 70 74 69 6f 6e 0a 21 69 66 20 this option.!if
72b0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
72c0: 50 54 53 29 20 22 74 68 72 64 61 6c 6c 6f 63 22 PTS) "thrdalloc"
72d0: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ].!message *** D
72e0: 6f 69 6e 67 20 74 68 72 64 61 6c 6c 6f 63 0a 55 oing thrdalloc.U
72f0: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 SE_THREAD_ALLOC
7300: 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 = 1.!endif..!if
7310: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
7320: 50 54 53 29 20 22 74 63 6c 61 6c 6c 6f 63 22 5d PTS) "tclalloc"]
7330: 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f .USE_THREAD_ALLO
7340: 43 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 C = 0.!endif..!i
7350: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
7360: 28 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b 65 (OPTS) "unchecke
7370: 64 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a d"].!message ***
7380: 20 44 6f 69 6e 67 20 75 6e 63 68 65 63 6b 65 64 Doing unchecked
7390: 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 31 0a 21 .UNCHECKED = 1.!
73a0: 65 6c 73 65 0a 55 4e 43 48 45 43 4b 45 44 20 3d else.UNCHECKED =
73b0: 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 0.!endif..!if [
73c0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
73d0: 54 53 29 20 22 6e 6f 63 6f 6e 66 69 67 63 68 65 TS) "noconfigche
73e0: 63 6b 22 5d 0a 43 4f 4e 46 49 47 5f 43 48 45 43 ck"].CONFIG_CHEC
73f0: 4b 20 3d 20 31 0a 21 65 6c 73 65 0a 43 4f 4e 46 K = 1.!else.CONF
7400: 49 47 5f 43 48 45 43 4b 20 3d 20 30 0a 21 65 6e IG_CHECK = 0.!en
7410: 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 22 24 dif..!endif # "$
7420: 28 4f 50 54 53 29 22 20 21 3d 20 22 22 20 20 26 (OPTS)" != "" &
7430: 26 20 2e 2e 2e 20 70 61 72 73 69 6e 67 20 6f 66 & ... parsing of
7440: 20 4f 50 54 53 0a 0a 23 20 53 65 74 20 6c 69 6e OPTS..# Set lin
7450: 6b 65 72 20 66 6c 61 67 73 20 62 61 73 65 64 20 ker flags based
7460: 6f 6e 20 61 62 6f 76 65 0a 0a 21 69 66 20 24 28 on above..!if $(
7470: 50 47 4f 29 20 3e 20 31 0a 21 69 66 20 5b 6e 6d PGO) > 1.!if [nm
7480: 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 3a akehlp -l -ltcg:
7490: 70 67 6f 70 74 69 6d 69 7a 65 20 24 28 4c 49 4e pgoptimize $(LIN
74a0: 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a KER_TESTFLAGS)].
74b0: 4c 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 28 LINKERFLAGS.= $(
74c0: 4c 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 63 LINKERFLAGS:-ltc
74d0: 67 3d 29 20 2d 6c 74 63 67 3a 70 67 6f 70 74 69 g=) -ltcg:pgopti
74e0: 6d 69 7a 65 0a 21 65 6c 73 65 0a 4d 53 47 3d 5e mize.!else.MSG=^
74f0: 0a 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 .This compiler d
7500: 6f 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 oes not support
7510: 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 6f profile guided o
7520: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 72 ptimization..!er
7530: 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 ror $(MSG).!endi
7540: 66 0a 21 65 6c 73 65 69 66 20 24 28 50 47 4f 29 f.!elseif $(PGO)
7550: 20 3e 20 30 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 > 0.!if [nmakeh
7560: 6c 70 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 69 6e lp -l -ltcg:pgin
7570: 73 74 72 75 6d 65 6e 74 20 24 28 4c 49 4e 4b 45 strument $(LINKE
7580: 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 R_TESTFLAGS)].LI
7590: 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 28 4c 49 NKERFLAGS.= $(LI
75a0: 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 63 67 3d NKERFLAGS:-ltcg=
75b0: 29 20 2d 6c 74 63 67 3a 70 67 69 6e 73 74 72 75 ) -ltcg:pginstru
75c0: 6d 65 6e 74 0a 21 65 6c 73 65 0a 4d 53 47 3d 5e ment.!else.MSG=^
75d0: 0a 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 .This compiler d
75e0: 6f 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 oes not support
75f0: 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 6f profile guided o
7600: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 72 ptimization..!er
7610: 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 ror $(MSG).!endi
7620: 66 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 f.!endif..######
7630: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7660: 23 23 23 23 23 23 23 23 23 23 0a 23 20 38 2e 20 ##########.# 8.
7670: 50 61 72 73 65 20 74 68 65 20 53 54 41 54 53 20 Parse the STATS
7680: 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 75 macro to configu
7690: 72 65 20 63 6f 64 65 20 69 6e 73 74 72 75 6d 65 re code instrume
76a0: 6e 74 61 74 69 6f 6e 0a 23 20 54 68 65 20 66 6f ntation.# The fo
76b0: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 llowing macros a
76c0: 72 65 20 73 65 74 20 62 79 20 74 68 69 73 20 73 re set by this s
76d0: 65 63 74 69 6f 6e 3a 0a 23 20 54 43 4c 5f 4d 45 ection:.# TCL_ME
76e0: 4d 5f 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 65 M_DEBUG - 1 -> e
76f0: 6e 61 62 6c 65 73 20 6d 65 6d 6f 72 79 20 61 6c nables memory al
7700: 6c 6f 63 61 74 69 6f 6e 20 69 6e 73 74 72 75 6d location instrum
7710: 65 6e 74 61 74 69 6f 6e 0a 23 20 20 20 20 20 20 entation.#
7720: 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 0 ->
7730: 64 69 73 61 62 6c 65 73 0a 23 20 54 43 4c 5f 43 disables.# TCL_C
7740: 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 2d 20 31 OMPILE_DEBUG - 1
7750: 20 2d 3e 20 65 6e 61 62 6c 65 73 20 62 79 74 65 -> enables byte
7760: 20 63 6f 6d 70 69 6c 65 72 20 6c 6f 67 67 69 6e compiler loggin
7770: 67 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 g.#
7780: 20 20 20 20 20 20 20 20 30 20 2d 3e 20 64 69 73 0 -> dis
7790: 61 62 6c 65 73 0a 0a 23 20 44 65 66 61 75 6c 74 ables..# Default
77a0: 20 62 6f 74 68 20 61 72 65 20 6f 66 66 0a 54 43 both are off.TC
77b0: 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 20 L_MEM_DEBUG.
77c0: 3d 20 30 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f = 0.TCL_COMPILE_
77d0: 44 45 42 55 47 20 20 20 3d 20 30 0a 0a 21 69 66 DEBUG = 0..!if
77e0: 20 22 24 28 53 54 41 54 53 29 22 20 21 3d 20 22 "$(STATS)" != "
77f0: 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 20 " && ![nmakehlp
7800: 2d 66 20 22 24 28 53 54 41 54 53 29 22 20 22 6e -f "$(STATS)" "n
7810: 6f 6e 65 22 5d 0a 0a 21 69 66 20 5b 6e 6d 61 6b one"]..!if [nmak
7820: 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 29 ehlp -f $(STATS)
7830: 20 22 6d 65 6d 64 62 67 22 5d 0a 21 6d 65 73 73 "memdbg"].!mess
7840: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6d 65 age *** Doing me
7850: 6d 64 62 67 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 mdbg.TCL_MEM_DEB
7860: 55 47 09 20 20 20 20 3d 20 31 0a 21 65 6c 73 65 UG. = 1.!else
7870: 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 .TCL_MEM_DEBUG.
7880: 20 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 = 0.!endif..!
7890: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
78a0: 24 28 53 54 41 54 53 29 20 22 63 6f 6d 70 64 62 $(STATS) "compdb
78b0: 67 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a g"].!message ***
78c0: 20 44 6f 69 6e 67 20 63 6f 6d 70 64 62 67 0a 54 Doing compdbg.T
78d0: 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 CL_COMPILE_DEBUG
78e0: 20 20 20 3d 20 31 0a 21 65 6c 73 65 0a 54 43 4c = 1.!else.TCL
78f0: 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 20 _COMPILE_DEBUG
7900: 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 65 6e = 0.!endif..!en
7910: 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 dif..###########
7920: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7930: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7940: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7950: 23 23 23 23 23 23 23 23 23 0a 23 20 39 2e 20 50 #########.# 9. P
7960: 61 72 73 65 20 74 68 65 20 43 48 45 43 4b 53 20 arse the CHECKS
7970: 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 75 macro to configu
7980: 72 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f re additional co
7990: 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 0a 23 20 mpiler checks.#
79a0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
79b0: 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 79 20 cros are set by
79c0: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 this section:.#
79d0: 57 41 52 4e 49 4e 47 53 20 2d 20 63 6f 6d 70 69 WARNINGS - compi
79e0: 6c 65 72 20 73 77 69 74 63 68 65 73 20 74 68 61 ler switches tha
79f0: 74 20 63 6f 6e 74 72 6f 6c 20 74 68 65 20 77 61 t control the wa
7a00: 72 6e 69 6e 67 73 20 6c 65 76 65 6c 0a 23 20 54 rnings level.# T
7a10: 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 CL_NO_DEPRECATED
7a20: 20 2d 20 31 20 2d 3e 20 64 69 73 61 62 6c 65 20 - 1 -> disable
7a30: 73 75 70 70 6f 72 74 20 66 6f 72 20 64 65 70 72 support for depr
7a40: 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e 73 ecated functions
7a50: 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .#
7a60: 20 20 20 20 20 20 20 30 20 2d 3e 20 65 6e 61 62 0 -> enab
7a70: 6c 65 20 64 65 70 72 65 63 61 74 65 64 20 66 75 le deprecated fu
7a80: 6e 63 74 69 6f 6e 73 0a 0a 23 20 44 65 66 61 75 nctions..# Defau
7a90: 6c 74 73 20 2d 20 50 65 72 6d 69 74 20 64 65 70 lts - Permit dep
7aa0: 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e recated function
7ab0: 73 20 61 6e 64 20 77 61 72 6e 69 6e 67 20 6c 65 s and warning le
7ac0: 76 65 6c 20 33 0a 54 43 4c 5f 4e 4f 5f 44 45 50 vel 3.TCL_NO_DEP
7ad0: 52 45 43 41 54 45 44 09 20 20 20 20 3d 20 30 0a RECATED. = 0.
7ae0: 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 3d 20 WARNINGS.. =
7af0: 2d 57 33 0a 0a 21 69 66 20 22 24 28 43 48 45 43 -W3..!if "$(CHEC
7b00: 4b 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 5b KS)" != "" && ![
7b10: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 43 nmakehlp -f "$(C
7b20: 48 45 43 4b 53 29 22 20 22 6e 6f 6e 65 22 5d 0a HECKS)" "none"].
7b30: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
7b40: 66 20 24 28 43 48 45 43 4b 53 29 20 22 6e 6f 64 f $(CHECKS) "nod
7b50: 65 70 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a ep"].!message **
7b60: 2a 20 44 6f 69 6e 67 20 6e 6f 64 65 70 20 63 68 * Doing nodep ch
7b70: 65 63 6b 0a 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 eck.TCL_NO_DEPRE
7b80: 43 41 54 45 44 09 20 20 20 20 3d 20 31 0a 21 65 CATED. = 1.!e
7b90: 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 ndif..!if [nmake
7ba0: 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b 53 29 hlp -f $(CHECKS)
7bb0: 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0a 21 6d 65 "fullwarn"].!me
7bc0: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7bd0: 66 75 6c 6c 20 77 61 72 6e 69 6e 67 73 20 63 68 full warnings ch
7be0: 65 63 6b 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 eck.WARNINGS..
7bf0: 20 20 3d 20 2d 57 34 0a 21 69 66 20 5b 6e 6d 61 = -W4.!if [nma
7c00: 6b 65 68 6c 70 20 2d 6c 20 2d 77 61 72 6e 3a 33 kehlp -l -warn:3
7c10: 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c $(LINKER_TESTFL
7c20: 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 AGS)].LINKERFLAG
7c30: 53 09 09 20 20 20 20 3d 20 24 28 4c 49 4e 4b 45 S.. = $(LINKE
7c40: 52 46 4c 41 47 53 29 20 2d 77 61 72 6e 3a 33 0a RFLAGS) -warn:3.
7c50: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 21 !endif.!endif..!
7c60: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7c70: 24 28 43 48 45 43 4b 53 29 20 22 36 34 62 69 74 $(CHECKS) "64bit
7c80: 22 5d 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 "] && [nmakehlp
7c90: 2d 63 20 2d 57 70 36 34 5d 0a 21 6d 65 73 73 61 -c -Wp64].!messa
7ca0: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 36 34 62 ge *** Doing 64b
7cb0: 69 74 20 70 6f 72 74 61 62 69 6c 69 74 79 20 77 it portability w
7cc0: 61 72 6e 69 6e 67 73 0a 57 41 52 4e 49 4e 47 53 arnings.WARNINGS
7cd0: 09 09 20 20 20 20 3d 20 24 28 57 41 52 4e 49 4e .. = $(WARNIN
7ce0: 47 53 29 20 2d 57 70 36 34 0a 21 65 6e 64 69 66 GS) -Wp64.!endif
7cf0: 0a 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 ..!endif...#####
7d00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d30: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 30 ###########.# 10
7d40: 2e 20 43 6f 6e 73 74 72 75 63 74 20 6f 75 74 70 . Construct outp
7d50: 75 74 20 64 69 72 65 63 74 6f 72 79 20 61 6e 64 ut directory and
7d60: 20 66 69 6c 65 20 70 61 74 68 73 0a 23 20 46 69 file paths.# Fi
7d70: 67 75 72 65 2d 6f 75 74 20 68 6f 77 20 74 6f 20 gure-out how to
7d80: 6e 61 6d 65 20 6f 75 72 20 69 6e 74 65 72 6d 65 name our interme
7d90: 64 69 61 74 65 20 61 6e 64 20 6f 75 74 70 75 74 diate and output
7da0: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 0a 23 20 directories..#
7db0: 49 6e 20 6f 72 64 65 72 20 74 6f 20 61 76 6f 69 In order to avoi
7dc0: 64 20 69 6e 61 64 76 65 72 74 65 6e 74 20 6d 69 d inadvertent mi
7dd0: 78 69 6e 67 20 6f 66 20 6f 62 6a 65 63 74 20 66 xing of object f
7de0: 69 6c 65 73 20 62 75 69 6c 74 20 75 73 69 6e 67 iles built using
7df0: 0a 23 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6d .# different com
7e00: 70 69 6c 65 72 73 2c 20 62 75 69 6c 64 20 63 6f pilers, build co
7e10: 6e 66 69 67 75 72 61 74 69 6f 6e 73 20 65 74 63 nfigurations etc
7e20: 2e 2c 0a 23 0a 23 20 4e 61 6d 69 6e 67 20 63 6f .,.#.# Naming co
7e30: 6e 76 65 6e 74 69 6f 6e 20 28 73 75 66 66 69 78 nvention (suffix
7e40: 65 73 29 3a 0a 23 20 20 20 74 20 3d 20 66 75 6c es):.# t = ful
7e50: 6c 20 74 68 72 65 61 64 20 73 75 70 70 6f 72 74 l thread support
7e60: 2e 20 28 4e 6f 74 20 75 73 65 64 20 66 6f 72 20 . (Not used for
7e70: 54 63 6c 20 3e 3d 20 38 2e 37 29 0a 23 20 20 20 Tcl >= 8.7).#
7e80: 73 20 3d 20 73 74 61 74 69 63 20 6c 69 62 72 61 s = static libra
7e90: 72 79 20 28 61 73 20 6f 70 70 6f 73 65 64 20 74 ry (as opposed t
7ea0: 6f 20 61 6e 20 69 6d 70 6f 72 74 20 6c 69 62 72 o an import libr
7eb0: 61 72 79 29 0a 23 20 20 20 67 20 3d 20 6c 69 6e ary).# g = lin
7ec0: 6b 65 64 20 74 6f 20 74 68 65 20 64 65 62 75 67 ked to the debug
7ed0: 20 65 6e 61 62 6c 65 64 20 43 20 72 75 6e 2d 74 enabled C run-t
7ee0: 69 6d 65 2e 0a 23 20 20 20 78 20 3d 20 73 70 65 ime..# x = spe
7ef0: 63 69 61 6c 20 73 74 61 74 69 63 20 62 75 69 6c cial static buil
7f00: 64 20 77 68 65 6e 20 69 74 20 6c 69 6e 6b 73 20 d when it links
7f10: 74 6f 20 74 68 65 20 64 79 6e 61 6d 69 63 20 43 to the dynamic C
7f20: 20 72 75 6e 2d 74 69 6d 65 2e 0a 23 0a 23 20 54 run-time..#.# T
7f30: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 he following mac
7f40: 72 6f 73 20 61 72 65 20 73 65 74 20 69 6e 20 74 ros are set in t
7f50: 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 53 his section:.# S
7f60: 55 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 78 UFX - the suffix
7f70: 20 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e 61 to use for bina
7f80: 72 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 62 ries based on ab
7f90: 6f 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 65 ove naming conve
7fa0: 6e 74 69 6f 6e 0a 23 20 42 55 49 4c 44 44 49 52 ntion.# BUILDDIR
7fb0: 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c 65 76 TOP - the toplev
7fc0: 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 70 75 el default outpu
7fd0: 74 20 64 69 72 65 63 74 6f 72 79 0a 23 20 20 20 t directory.#
7fe0: 20 20 20 69 73 20 6f 66 20 74 68 65 20 66 6f 72 is of the for
7ff0: 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 62 75 67 m {Release,Debug
8000: 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f 4d 50 49 }[_AMD64][_COMPI
8010: 4c 45 52 56 45 52 53 49 4f 4e 5d 0a 23 20 54 4d LERVERSION].# TM
8020: 50 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f 72 P_DIR - director
8030: 79 20 77 68 65 72 65 20 6f 62 6a 65 63 74 20 66 y where object f
8040: 69 6c 65 73 20 61 72 65 20 63 72 65 61 74 65 64 iles are created
8050: 0a 23 20 4f 55 54 5f 44 49 52 20 2d 20 64 69 72 .# OUT_DIR - dir
8060: 65 63 74 6f 72 79 20 77 68 65 72 65 20 6f 75 74 ectory where out
8070: 70 75 74 20 65 78 65 63 75 74 61 62 6c 65 73 20 put executables
8080: 61 72 65 20 63 72 65 61 74 65 64 0a 23 20 42 6f are created.# Bo
8090: 74 68 20 54 4d 50 5f 44 49 52 20 61 6e 64 20 4f th TMP_DIR and O
80a0: 55 54 5f 44 49 52 20 61 72 65 20 64 65 66 61 75 UT_DIR are defau
80b0: 6c 74 65 64 20 6f 6e 6c 79 20 69 66 20 6e 6f 74 lted only if not
80c0: 20 64 65 66 69 6e 65 64 20 62 79 20 74 68 65 0a defined by the.
80d0: 23 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c # parent makefil
80e0: 65 20 28 6f 72 20 63 6f 6d 6d 61 6e 64 20 6c 69 e (or command li
80f0: 6e 65 29 2e 20 54 68 65 20 64 65 66 61 75 6c 74 ne). The default
8100: 20 76 61 6c 75 65 73 20 61 72 65 0a 23 20 62 61 values are.# ba
8110: 73 65 64 20 6f 6e 20 42 55 49 4c 44 44 49 52 54 sed on BUILDDIRT
8120: 4f 50 2e 0a 23 20 53 54 55 42 50 52 45 46 49 58 OP..# STUBPREFIX
8130: 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 - name of the s
8140: 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 tubs library for
8150: 20 74 68 69 73 20 70 72 6f 6a 65 63 74 0a 23 20 this project.#
8160: 50 52 4a 49 4d 50 4c 49 42 20 2d 20 6f 75 74 70 PRJIMPLIB - outp
8170: 75 74 20 70 61 74 68 20 6f 66 20 74 68 65 20 67 ut path of the g
8180: 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 74 enerated project
8190: 20 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 0a import library.
81a0: 23 20 50 52 4a 4c 49 42 4e 41 4d 45 20 2d 20 6e # PRJLIBNAME - n
81b0: 61 6d 65 20 6f 66 20 67 65 6e 65 72 61 74 65 64 ame of generated
81c0: 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 72 79 project library
81d0: 0a 23 20 50 52 4a 4c 49 42 20 20 20 20 20 2d 20 .# PRJLIB -
81e0: 6f 75 74 70 75 74 20 70 61 74 68 20 6f 66 20 67 output path of g
81f0: 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 74 enerated project
8200: 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 54 library.# PRJST
8210: 55 42 4c 49 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 UBLIBNAME - name
8220: 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 of the generate
8230: 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 73 20 d project stubs
8240: 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 54 55 library.# PRJSTU
8250: 42 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 61 BLIB - output pa
8260: 74 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 th of the genera
8270: 74 65 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 ted project stub
8280: 73 20 6c 69 62 72 61 72 79 0a 23 20 52 45 53 46 s library.# RESF
8290: 49 4c 45 20 2d 20 6f 75 74 70 75 74 20 72 65 73 ILE - output res
82a0: 6f 75 72 63 65 20 66 69 6c 65 20 28 6f 6e 6c 79 ource file (only
82b0: 20 69 66 20 6e 6f 74 20 73 74 61 74 69 63 20 62 if not static b
82c0: 75 69 6c 64 29 0a 0a 53 55 46 58 09 20 20 20 20 uild)..SUFX.
82d0: 3d 20 74 73 67 78 0a 0a 21 69 66 20 24 28 44 45 = tsgx..!if $(DE
82e0: 42 55 47 29 0a 42 55 49 4c 44 44 49 52 54 4f 50 BUG).BUILDDIRTOP
82f0: 20 3d 20 44 65 62 75 67 0a 21 65 6c 73 65 0a 42 = Debug.!else.B
8300: 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 52 65 6c UILDDIRTOP = Rel
8310: 65 61 73 65 0a 21 65 6e 64 69 66 0a 0a 21 69 66 ease.!endif..!if
8320: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 3d "$(MACHINE)" !=
8330: 20 22 49 58 38 36 22 0a 42 55 49 4c 44 44 49 52 "IX86".BUILDDIR
8340: 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 54 TOP =$(BUILDDIRT
8350: 4f 50 29 5f 24 28 4d 41 43 48 49 4e 45 29 0a 21 OP)_$(MACHINE).!
8360: 65 6e 64 69 66 0a 21 69 66 20 24 28 56 43 56 45 endif.!if $(VCVE
8370: 52 29 20 3e 20 36 0a 42 55 49 4c 44 44 49 52 54 R) > 6.BUILDDIRT
8380: 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 54 4f OP =$(BUILDDIRTO
8390: 50 29 5f 56 43 24 28 56 43 56 45 52 29 0a 21 65 P)_VC$(VCVER).!e
83a0: 6e 64 69 66 0a 0a 21 69 66 20 21 24 28 44 45 42 ndif..!if !$(DEB
83b0: 55 47 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 UG) || $(TCL_VER
83c0: 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 28 SION) > 86 || $(
83d0: 44 45 42 55 47 29 20 26 26 20 24 28 55 4e 43 48 DEBUG) && $(UNCH
83e0: 45 43 4b 45 44 29 0a 53 55 46 58 09 20 20 20 20 ECKED).SUFX.
83f0: 3d 20 24 28 53 55 46 58 3a 67 3d 29 0a 21 65 6e = $(SUFX:g=).!en
8400: 64 69 66 0a 0a 54 4d 50 5f 44 49 52 46 55 4c 4c dif..TMP_DIRFULL
8410: 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49 52 54 = .\$(BUILDDIRT
8420: 4f 50 29 5c 24 28 50 52 4f 4a 45 43 54 29 5f 54 OP)\$(PROJECT)_T
8430: 68 72 65 61 64 65 64 44 79 6e 61 6d 69 63 53 74 hreadedDynamicSt
8440: 61 74 69 63 58 0a 0a 21 69 66 20 21 24 28 53 54 aticX..!if !$(ST
8450: 41 54 49 43 5f 42 55 49 4c 44 29 0a 54 4d 50 5f ATIC_BUILD).TMP_
8460: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
8470: 44 49 52 46 55 4c 4c 3a 53 74 61 74 69 63 3d 29 DIRFULL:Static=)
8480: 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 .SUFX. = $(SU
8490: 46 58 3a 73 3d 29 0a 45 58 54 09 20 20 20 20 3d FX:s=).EXT. =
84a0: 20 64 6c 6c 0a 54 4d 50 5f 44 49 52 46 55 4c 4c dll.TMP_DIRFULL
84b0: 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c = $(TMP_DIRFULL
84c0: 3a 58 3d 29 0a 53 55 46 58 09 20 20 20 20 3d 20 :X=).SUFX. =
84d0: 24 28 53 55 46 58 3a 78 3d 29 0a 21 65 6c 73 65 $(SUFX:x=).!else
84e0: 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 .TMP_DIRFULL = $
84f0: 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 44 79 6e (TMP_DIRFULL:Dyn
8500: 61 6d 69 63 3d 29 0a 45 58 54 09 20 20 20 20 3d amic=).EXT. =
8510: 20 6c 69 62 0a 21 69 66 20 24 28 4d 53 56 43 52 lib.!if $(MSVCR
8520: 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 T) && $(TCL_VERS
8530: 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 21 24 28 ION) > 86 || !$(
8540: 4d 53 56 43 52 54 29 20 26 26 20 24 28 54 43 4c MSVCRT) && $(TCL
8550: 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a 54 _VERSION) < 87.T
8560: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
8570: 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a 53 MP_DIRFULL:X=).S
8580: 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 UFX. = $(SUFX
8590: 3a 78 3d 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 :x=).!endif.!end
85a0: 69 66 0a 0a 21 69 66 20 21 24 28 54 43 4c 5f 54 if..!if !$(TCL_T
85b0: 48 52 45 41 44 53 29 20 7c 7c 20 24 28 54 43 4c HREADS) || $(TCL
85c0: 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0a 54 _VERSION) > 86.T
85d0: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
85e0: 4d 50 5f 44 49 52 46 55 4c 4c 3a 54 68 72 65 61 MP_DIRFULL:Threa
85f0: 64 65 64 3d 29 0a 53 55 46 58 09 20 20 20 20 3d ded=).SUFX. =
8600: 20 24 28 53 55 46 58 3a 74 3d 29 0a 21 65 6e 64 $(SUFX:t=).!end
8610: 69 66 0a 0a 21 69 66 6e 64 65 66 20 54 4d 50 5f if..!ifndef TMP_
8620: 44 49 52 0a 54 4d 50 5f 44 49 52 09 20 20 20 20 DIR.TMP_DIR.
8630: 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 29 = $(TMP_DIRFULL)
8640: 0a 21 69 66 6e 64 65 66 20 4f 55 54 5f 44 49 52 .!ifndef OUT_DIR
8650: 0a 4f 55 54 5f 44 49 52 09 20 20 20 20 3d 20 2e .OUT_DIR. = .
8660: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 0a \$(BUILDDIRTOP).
8670: 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 !endif.!else.!if
8680: 6e 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 54 ndef OUT_DIR.OUT
8690: 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50 _DIR. = $(TMP
86a0: 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 65 6e _DIR).!endif.!en
86b0: 64 69 66 0a 0a 23 20 52 65 6c 61 74 69 76 65 20 dif..# Relative
86c0: 70 61 74 68 73 20 2d 3e 20 61 62 73 6f 6c 75 74 paths -> absolut
86d0: 65 0a 21 69 66 20 5b 65 63 68 6f 20 4f 55 54 5f e.!if [echo OUT_
86e0: 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c DIR = \> nmakehl
86f0: 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b p.out] \. || [
8700: 6e 6d 61 6b 65 68 6c 70 20 2d 51 20 22 24 28 4f nmakehlp -Q "$(O
8710: 55 54 5f 44 49 52 29 22 20 3e 3e 20 6e 6d 61 6b UT_DIR)" >> nmak
8720: 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 ehlp.out].!error
8730: 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 *** Could not f
8740: 75 6c 6c 79 20 71 75 61 6c 69 66 79 20 70 61 74 ully qualify pat
8750: 68 20 4f 55 54 5f 44 49 52 3d 24 28 4f 55 54 5f h OUT_DIR=$(OUT_
8760: 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 69 66 20 DIR).!endif.!if
8770: 5b 65 63 68 6f 20 54 4d 50 5f 44 49 52 20 3d 20 [echo TMP_DIR =
8780: 5c 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 \>> nmakehlp.out
8790: 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 ] \. || [nmake
87a0: 68 6c 70 20 2d 51 20 22 24 28 54 4d 50 5f 44 49 hlp -Q "$(TMP_DI
87b0: 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e R)" >> nmakehlp.
87c0: 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 out].!error ***
87d0: 43 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 20 Could not fully
87e0: 71 75 61 6c 69 66 79 20 70 61 74 68 20 54 4d 50 qualify path TMP
87f0: 5f 44 49 52 3d 24 28 54 4d 50 5f 44 49 52 29 0a _DIR=$(TMP_DIR).
8800: 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 !endif.!include
8810: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 0a 23 20 nmakehlp.out..#
8820: 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 The name of the
8830: 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f stubs library fo
8840: 72 20 74 68 65 20 70 72 6f 6a 65 63 74 20 62 65 r the project be
8850: 69 6e 67 20 62 75 69 6c 74 0a 53 54 55 42 50 52 ing built.STUBPR
8860: 45 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 52 EFIX = $(PR
8870: 4f 4a 45 43 54 29 73 74 75 62 0a 0a 23 0a 23 20 OJECT)stub..#.#
8880: 53 65 74 20 75 70 20 70 61 74 68 73 20 74 6f 20 Set up paths to
8890: 76 61 72 69 6f 75 73 20 54 63 6c 20 65 78 65 63 various Tcl exec
88a0: 75 74 61 62 6c 65 73 20 61 6e 64 20 6c 69 62 72 utables and libr
88b0: 61 72 69 65 73 20 6e 65 65 64 65 64 20 62 79 20 aries needed by
88c0: 65 78 74 65 6e 73 69 6f 6e 73 0a 23 0a 0a 23 20 extensions.#..#
88d0: 54 49 50 20 34 33 30 2e 20 55 6e 75 73 65 64 20 TIP 430. Unused
88e0: 66 6f 72 20 38 2e 36 20 62 75 74 20 6e 6f 20 68 for 8.6 but no h
88f0: 61 72 6d 20 64 65 66 69 6e 69 6e 67 20 69 74 20 arm defining it
8900: 74 6f 20 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d 6f to allow a commo
8910: 6e 20 72 75 6c 65 73 2e 76 63 0a 54 43 4c 53 43 n rules.vc.TCLSC
8920: 52 49 50 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 RIPTZIPNAME = li
8930: 62 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f btcl$(TCL_MAJOR_
8940: 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d VERSION).$(TCL_M
8950: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 INOR_VERSION)$(T
8960: 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 29 CL_PATCH_LETTER)
8970: 24 28 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 $(TCL_RELEASE_SE
8980: 52 49 41 4c 29 2e 7a 69 70 0a 54 4b 53 43 52 49 RIAL).zip.TKSCRI
8990: 50 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 62 74 PTZIPNAME = libt
89a0: 6b 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 k$(TK_MAJOR_VERS
89b0: 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f ION).$(TK_MINOR_
89c0: 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 50 41 54 VERSION)$(TK_PAT
89d0: 43 48 5f 4c 45 54 54 45 52 29 24 28 54 4b 5f 52 CH_LETTER)$(TK_R
89e0: 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 2e 7a ELEASE_SERIAL).z
89f0: 69 70 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f ip..!if $(DOING_
8a00: 54 43 4c 29 0a 54 43 4c 53 48 4e 41 4d 45 20 20 TCL).TCLSHNAME
8a10: 20 20 20 20 20 3d 20 24 28 50 52 4f 4a 45 43 54 = $(PROJECT
8a20: 29 73 68 24 28 56 45 52 53 49 4f 4e 29 24 28 53 )sh$(VERSION)$(S
8a30: 55 46 58 29 2e 65 78 65 0a 54 43 4c 53 48 09 09 UFX).exe.TCLSH..
8a40: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
8a50: 43 4c 53 48 4e 41 4d 45 29 0a 54 43 4c 49 4d 50 CLSHNAME).TCLIMP
8a60: 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 LIB.= $(OUT_DIR)
8a70: 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 \$(PROJECT)$(VER
8a80: 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 SION)$(SUFX).lib
8a90: 0a 54 43 4c 4c 49 42 4e 41 4d 45 09 3d 20 24 28 .TCLLIBNAME.= $(
8aa0: 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f PROJECT)$(VERSIO
8ab0: 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 N)$(SUFX).$(EXT)
8ac0: 0a 54 43 4c 4c 49 42 09 09 3d 20 24 28 4f 55 54 .TCLLIB..= $(OUT
8ad0: 5f 44 49 52 29 5c 24 28 54 43 4c 4c 49 42 4e 41 _DIR)\$(TCLLIBNA
8ae0: 4d 45 29 0a 54 43 4c 53 43 52 49 50 54 5a 49 50 ME).TCLSCRIPTZIP
8af0: 20 20 20 20 3d 20 24 28 4f 55 54 5f 44 49 52 29 = $(OUT_DIR)
8b00: 5c 24 28 54 43 4c 53 43 52 49 50 54 5a 49 50 4e \$(TCLSCRIPTZIPN
8b10: 41 4d 45 29 0a 0a 21 69 66 20 24 28 54 43 4c 5f AME)..!if $(TCL_
8b20: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
8b30: 3d 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 4e 41 = 8.TCLSTUBLIBNA
8b40: 4d 45 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 ME.= $(STUBPREFI
8b50: 58 29 24 28 56 45 52 53 49 4f 4e 29 2e 6c 69 62 X)$(VERSION).lib
8b60: 0a 21 65 6c 73 65 0a 54 43 4c 53 54 55 42 4c 49 .!else.TCLSTUBLI
8b70: 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52 BNAME.= $(STUBPR
8b80: 45 46 49 58 29 2e 6c 69 62 0a 21 65 6e 64 69 66 EFIX).lib.!endif
8b90: 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 .TCLSTUBLIB.= $(
8ba0: 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 53 54 OUT_DIR)\$(TCLST
8bb0: 55 42 4c 49 42 4e 41 4d 45 29 0a 54 43 4c 5f 49 UBLIBNAME).TCL_I
8bc0: 4e 43 4c 55 44 45 53 20 20 20 20 3d 20 2d 49 22 NCLUDES = -I"
8bd0: 24 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 $(WIN_DIR)" -I"$
8be0: 28 47 45 4e 45 52 49 43 44 49 52 29 22 0a 0a 21 (GENERICDIR)"..!
8bf0: 65 6c 73 65 20 23 20 21 24 28 44 4f 49 4e 47 5f else # !$(DOING_
8c00: 54 43 4c 29 0a 0a 21 69 66 20 24 28 54 43 4c 49 TCL)..!if $(TCLI
8c10: 4e 53 54 41 4c 4c 29 20 23 20 42 75 69 6c 64 69 NSTALL) # Buildi
8c20: 6e 67 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e ng against an in
8c30: 73 74 61 6c 6c 65 64 20 54 63 6c 0a 0a 23 20 57 stalled Tcl..# W
8c40: 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 74 hen building ext
8c50: 65 6e 73 69 6f 6e 73 2c 20 77 65 20 6e 65 65 64 ensions, we need
8c60: 20 74 6f 20 6c 6f 63 61 74 65 20 74 63 6c 73 68 to locate tclsh
8c70: 2e 20 44 65 70 65 6e 64 69 6e 67 20 6f 6e 20 76 . Depending on v
8c80: 65 72 73 69 6f 6e 0a 23 20 6f 66 20 54 63 6c 20 ersion.# of Tcl
8c90: 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 20 we are building
8ca0: 61 67 61 69 6e 73 74 2c 20 74 68 69 73 20 6d 61 against, this ma
8cb0: 79 20 6f 72 20 6d 61 79 20 6e 6f 74 20 68 61 76 y or may not hav
8cc0: 65 20 61 20 22 74 22 20 73 75 66 66 69 78 2e 0a e a "t" suffix..
8cd0: 23 20 54 72 79 20 76 61 72 69 6f 75 73 20 70 6f # Try various po
8ce0: 73 73 69 62 69 6c 69 74 69 65 73 20 69 6e 20 74 ssibilities in t
8cf0: 75 72 6e 2e 0a 54 43 4c 53 48 09 09 3d 20 24 28 urn..TCLSH..= $(
8d00: 5f 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c _TCLDIR)\bin\tcl
8d10: 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 sh$(TCL_VERSION)
8d20: 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 $(SUFX:t=).exe.!
8d30: 69 66 20 21 65 78 69 73 74 28 22 24 28 54 43 4c if !exist("$(TCL
8d40: 53 48 29 22 29 0a 54 43 4c 53 48 20 20 20 20 20 SH)").TCLSH
8d50: 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 = $(_TCLDI
8d60: 52 29 5c 62 69 6e 5c 74 63 6c 73 68 24 28 54 43 R)\bin\tclsh$(TC
8d70: 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 L_VERSION)t$(SUF
8d80: 58 3a 74 3d 29 2e 65 78 65 0a 21 65 6e 64 69 66 X:t=).exe.!endif
8d90: 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f ..!if $(TCL_MAJO
8da0: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a R_VERSION) == 8.
8db0: 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f TCLSTUBLIB.= $(_
8dc0: 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 73 TCLDIR)\lib\tcls
8dd0: 74 75 62 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e tub$(TCL_VERSION
8de0: 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 ).lib.!else.TCLS
8df0: 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 TUBLIB.= $(_TCLD
8e00: 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 2e IR)\lib\tclstub.
8e10: 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 49 4d lib.!endif.TCLIM
8e20: 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 PLIB.= $(_TCLDIR
8e30: 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 )\lib\tcl$(TCL_V
8e40: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d ERSION)$(SUFX:t=
8e50: 29 2e 6c 69 62 0a 23 20 57 68 65 6e 20 62 75 69 ).lib.# When bui
8e60: 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 lding extensions
8e70: 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 , may be linking
8e80: 20 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 against Tcl tha
8e90: 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 t does not add.#
8ea0: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 "t" suffix (e.g
8eb0: 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 . 8.5 or 8.7). I
8ec0: 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 f lib not found
8ed0: 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 check for that p
8ee0: 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 ossibility..!if
8ef0: 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d 50 !exist("$(TCLIMP
8f00: 4c 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 42 LIB)").TCLIMPLIB
8f10: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 .= $(_TCLDIR)\li
8f20: 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 b\tcl$(TCL_VERSI
8f30: 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c ON)t$(SUFX:t=).l
8f40: 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 ib.!endif.TCL_LI
8f50: 42 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 BRARY.= $(_TCLDI
8f60: 52 29 5c 6c 69 62 0a 54 43 4c 52 45 47 4c 49 42 R)\lib.TCLREGLIB
8f70: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 .= $(_TCLDIR)\li
8f80: 62 5c 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 b\tclreg13$(SUFX
8f90: 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 44 44 45 4c :t=).lib.TCLDDEL
8fa0: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
8fb0: 6c 69 62 5c 74 63 6c 64 64 65 31 34 24 28 53 55 lib\tcldde14$(SU
8fc0: 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 43 FX:t=).lib.TCLSC
8fd0: 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c RIPTZIP.= $(_TCL
8fe0: 44 49 52 29 5c 6c 69 62 5c 24 28 54 43 4c 53 43 DIR)\lib\$(TCLSC
8ff0: 52 49 50 54 5a 49 50 4e 41 4d 45 29 0a 54 43 4c RIPTZIPNAME).TCL
9000: 54 4f 4f 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 TOOLSDIR.= \must
9010: 5c 68 61 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 \have\tcl\source
9020: 73 5c 74 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c s\to\build\this\
9030: 74 61 72 67 65 74 0a 54 43 4c 5f 49 4e 43 4c 55 target.TCL_INCLU
9040: 44 45 53 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 DES = -I"$(_T
9050: 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0a CLDIR)\include".
9060: 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e .!else # Buildin
9070: 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f g against Tcl so
9080: 75 72 63 65 73 0a 0a 54 43 4c 53 48 09 09 3d 20 urces..TCLSH..=
9090: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 $(_TCLDIR)\win\$
90a0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 (BUILDDIRTOP)\tc
90b0: 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e lsh$(TCL_VERSION
90c0: 29 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a )$(SUFX:t=).exe.
90d0: 21 69 66 20 21 65 78 69 73 74 28 24 28 54 43 4c !if !exist($(TCL
90e0: 53 48 29 29 0a 54 43 4c 53 48 09 09 3d 20 24 28 SH)).TCLSH..= $(
90f0: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 _TCLDIR)\win\$(B
9100: 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 UILDDIRTOP)\tcls
9110: 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 h$(TCL_VERSION)t
9120: 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 $(SUFX:t=).exe.!
9130: 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f endif.!if $(TCL_
9140: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
9150: 3d 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d = 8.TCLSTUBLIB.=
9160: 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c $(_TCLDIR)\win\
9170: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 $(BUILDDIRTOP)\t
9180: 63 6c 73 74 75 62 24 28 54 43 4c 5f 56 45 52 53 clstub$(TCL_VERS
9190: 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 ION).lib.!else.T
91a0: 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 CLSTUBLIB.= $(_T
91b0: 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 CLDIR)\win\$(BUI
91c0: 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 LDDIRTOP)\tclstu
91d0: 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c b.lib.!endif.TCL
91e0: 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 IMPLIB.= $(_TCLD
91f0: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9200: 49 52 54 4f 50 29 5c 74 63 6c 24 28 54 43 4c 5f IRTOP)\tcl$(TCL_
9210: 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 VERSION)$(SUFX:t
9220: 3d 29 2e 6c 69 62 0a 23 20 57 68 65 6e 20 62 75 =).lib.# When bu
9230: 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e ilding extension
9240: 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e s, may be linkin
9250: 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 g against Tcl th
9260: 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a at does not add.
9270: 23 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e # "t" suffix (e.
9280: 67 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 g. 8.5 or 8.7).
9290: 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 If lib not found
92a0: 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 check for that
92b0: 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 possibility..!if
92c0: 20 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d !exist("$(TCLIM
92d0: 50 4c 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 PLIB)").TCLIMPLI
92e0: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
92f0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9300: 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 )\tcl$(TCL_VERSI
9310: 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c ON)t$(SUFX:t=).l
9320: 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 ib.!endif.TCL_LI
9330: 42 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 BRARY.= $(_TCLDI
9340: 52 29 5c 6c 69 62 72 61 72 79 0a 54 43 4c 52 45 R)\library.TCLRE
9350: 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 GLIB.= $(_TCLDIR
9360: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
9370: 54 4f 50 29 5c 74 63 6c 72 65 67 31 33 24 28 53 TOP)\tclreg13$(S
9380: 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 44 UFX:t=).lib.TCLD
9390: 44 45 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 DELIB.= $(_TCLDI
93a0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
93b0: 52 54 4f 50 29 5c 74 63 6c 64 64 65 31 34 24 28 RTOP)\tcldde14$(
93c0: 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c SUFX:t=).lib.TCL
93d0: 53 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 SCRIPTZIP.= $(_T
93e0: 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 CLDIR)\win\$(BUI
93f0: 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 43 4c 53 LDDIRTOP)\$(TCLS
9400: 43 52 49 50 54 5a 49 50 4e 41 4d 45 29 0a 54 43 CRIPTZIPNAME).TC
9410: 4c 54 4f 4f 4c 53 44 49 52 09 3d 20 24 28 5f 54 LTOOLSDIR.= $(_T
9420: 43 4c 44 49 52 29 5c 74 6f 6f 6c 73 0a 54 43 4c CLDIR)\tools.TCL
9430: 5f 49 4e 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 _INCLUDES.= -I"$
9440: 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 (_TCLDIR)\generi
9450: 63 22 20 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 c" -I"$(_TCLDIR)
9460: 5c 77 69 6e 22 0a 0a 21 65 6e 64 69 66 20 23 20 \win"..!endif #
9470: 54 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 TCLINSTALL..!if
9480: 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 !$(STATIC_BUILD)
9490: 20 26 26 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 && "$(TCL_BUILD
94a0: 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a 74 63 _FOR)" == "8".tc
94b0: 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 llibs = "$(TCLST
94c0: 55 42 4c 49 42 29 22 0a 21 65 6c 73 65 0a 74 63 UBLIB)".!else.tc
94d0: 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 llibs = "$(TCLST
94e0: 55 42 4c 49 42 29 22 20 22 24 28 54 43 4c 49 4d UBLIB)" "$(TCLIM
94f0: 50 4c 49 42 29 22 0a 21 65 6e 64 69 66 0a 0a 21 PLIB)".!endif..!
9500: 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f endif # $(DOING_
9510: 54 43 4c 29 0a 0a 23 20 57 65 20 6e 65 65 64 20 TCL)..# We need
9520: 61 20 74 63 6c 73 68 20 74 68 61 74 20 77 69 6c a tclsh that wil
9530: 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 68 6f 73 l run on the hos
9540: 74 20 6d 61 63 68 69 6e 65 20 61 73 20 70 61 72 t machine as par
9550: 74 20 6f 66 20 74 68 65 20 62 75 69 6c 64 2e 0a t of the build..
9560: 23 20 49 58 38 36 20 72 75 6e 73 20 6f 6e 20 61 # IX86 runs on a
9570: 6c 6c 20 61 72 63 68 69 74 65 63 74 75 72 65 73 ll architectures
9580: 2e 0a 21 69 66 6e 64 65 66 20 54 43 4c 53 48 5f ..!ifndef TCLSH_
9590: 4e 41 54 49 56 45 0a 21 69 66 20 22 24 28 4d 41 NATIVE.!if "$(MA
95a0: 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 CHINE)" == "IX86
95b0: 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 " || "$(MACHINE)
95c0: 22 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 " == "$(NATIVE_A
95d0: 52 43 48 29 22 0a 54 43 4c 53 48 5f 4e 41 54 49 RCH)".TCLSH_NATI
95e0: 56 45 09 3d 20 24 28 54 43 4c 53 48 29 0a 21 65 VE.= $(TCLSH).!e
95f0: 6c 73 65 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d lse.!error You m
9600: 75 73 74 20 65 78 70 6c 69 63 69 74 6c 79 20 73 ust explicitly s
9610: 65 74 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 et TCLSH_NATIVE
9620: 66 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c for cross-compil
9630: 61 74 69 6f 6e 0a 21 65 6e 64 69 66 0a 21 65 6e ation.!endif.!en
9640: 64 69 66 0a 0a 23 20 44 6f 20 74 68 65 20 73 61 dif..# Do the sa
9650: 6d 65 20 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b me for Tk and Tk
9660: 20 65 78 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 extensions that
9670: 20 72 65 71 75 69 72 65 20 74 68 65 20 54 6b 20 require the Tk
9680: 6c 69 62 72 61 72 69 65 73 0a 21 69 66 20 24 28 libraries.!if $(
9690: 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e DOING_TK) || $(N
96a0: 45 45 44 5f 54 4b 29 0a 57 49 53 48 4e 41 4d 45 EED_TK).WISHNAME
96b0: 50 52 45 46 49 58 20 3d 20 77 69 73 68 0a 57 49 PREFIX = wish.WI
96c0: 53 48 4e 41 4d 45 20 3d 20 24 28 57 49 53 48 4e SHNAME = $(WISHN
96d0: 41 4d 45 50 52 45 46 49 58 29 24 28 54 4b 5f 56 AMEPREFIX)$(TK_V
96e0: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 ERSION)$(SUFX).e
96f0: 78 65 0a 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 xe.TKLIBNAME8.=
9700: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9710: 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 4b (SUFX).$(EXT).TK
9720: 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c 39 74 LIBNAME9.= tcl9t
9730: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9740: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 21 69 66 SUFX).$(EXT).!if
9750: 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 $(TCL_MAJOR_VER
9760: 53 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 SION) == 8 || "$
9770: 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 (TCL_BUILD_FOR)"
9780: 20 3d 3d 20 22 38 22 0a 54 4b 4c 49 42 4e 41 4d == "8".TKLIBNAM
9790: 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 E.= tk$(TK_VERSI
97a0: 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 ON)$(SUFX).$(EXT
97b0: 29 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d ).TKIMPLIBNAME.=
97c0: 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 tk$(TK_VERSION)
97d0: 24 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6c 73 $(SUFX).lib.!els
97e0: 65 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 e.TKLIBNAME.= tc
97f0: 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e l9tk$(TK_VERSION
9800: 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a )$(SUFX).$(EXT).
9810: 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 TKIMPLIBNAME.= t
9820: 63 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f cl9tk$(TK_VERSIO
9830: 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 N)$(SUFX).lib.!e
9840: 6e 64 69 66 0a 21 69 66 20 24 28 54 4b 5f 4d 41 ndif.!if $(TK_MA
9850: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 JOR_VERSION) ==
9860: 38 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 8.TKSTUBLIBNAME.
9870: 3d 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 = tkstub$(TK_VER
9880: 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a SION).lib.!else.
9890: 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 TKSTUBLIBNAME.=
98a0: 74 6b 73 74 75 62 2e 6c 69 62 0a 21 65 6e 64 69 tkstub.lib.!endi
98b0: 66 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 f..!if $(DOING_T
98c0: 4b 29 0a 57 49 53 48 20 09 09 3d 20 24 28 4f 55 K).WISH ..= $(OU
98d0: 54 5f 44 49 52 29 5c 24 28 57 49 53 48 4e 41 4d T_DIR)\$(WISHNAM
98e0: 45 29 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 E).TKSTUBLIB.= $
98f0: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 53 54 (OUT_DIR)\$(TKST
9900: 55 42 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 UBLIBNAME).TKIMP
9910: 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 LIB.= $(OUT_DIR)
9920: 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 \$(TKIMPLIBNAME)
9930: 0a 54 4b 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f .TKLIB..= $(OUT_
9940: 44 49 52 29 5c 24 28 54 4b 4c 49 42 4e 41 4d 45 DIR)\$(TKLIBNAME
9950: 29 0a 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 ).TK_INCLUDES
9960: 20 20 3d 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 = -I"$(WIN_DIR
9970: 29 22 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 )" -I"$(GENERICD
9980: 49 52 29 22 0a 54 4b 53 43 52 49 50 54 5a 49 50 IR)".TKSCRIPTZIP
9990: 20 20 20 20 20 3d 20 24 28 4f 55 54 5f 44 49 52 = $(OUT_DIR
99a0: 29 5c 24 28 54 4b 53 43 52 49 50 54 5a 49 50 4e )\$(TKSCRIPTZIPN
99b0: 41 4d 45 29 0a 0a 21 65 6c 73 65 20 23 20 65 66 AME)..!else # ef
99c0: 66 65 63 74 69 76 65 6c 79 20 4e 45 45 44 5f 54 fectively NEED_T
99d0: 4b 0a 0a 21 69 66 20 24 28 54 4b 49 4e 53 54 41 K..!if $(TKINSTA
99e0: 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 LL) # Building a
99f0: 67 61 69 6e 73 74 20 69 6e 73 74 61 6c 6c 65 64 gainst installed
9a00: 20 54 6b 0a 57 49 53 48 09 09 3d 20 24 28 5f 54 Tk.WISH..= $(_T
9a10: 4b 44 49 52 29 5c 62 69 6e 5c 24 28 57 49 53 48 KDIR)\bin\$(WISH
9a20: 4e 41 4d 45 29 0a 54 4b 53 54 55 42 4c 49 42 09 NAME).TKSTUBLIB.
9a30: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c = $(_TKDIR)\lib\
9a40: 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 $(TKSTUBLIBNAME)
9a50: 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 .TKIMPLIB.= $(_T
9a60: 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d KDIR)\lib\$(TKIM
9a70: 50 4c 49 42 4e 41 4d 45 29 0a 23 20 57 68 65 6e PLIBNAME).# When
9a80: 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 building extens
9a90: 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e ions, may be lin
9aa0: 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 king against Tk
9ab0: 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 that does not ad
9ac0: 64 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 d.# "t" suffix (
9ad0: 65 2e 67 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 e.g. 8.5 or 8.7)
9ae0: 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 . If lib not fou
9af0: 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 nd check for tha
9b00: 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 t possibility..!
9b10: 69 66 20 21 65 78 69 73 74 28 22 24 28 54 4b 49 if !exist("$(TKI
9b20: 4d 50 4c 49 42 29 22 29 0a 54 4b 49 4d 50 4c 49 MPLIB)").TKIMPLI
9b30: 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 BNAME.= tk$(TK_V
9b40: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d ERSION)$(SUFX:t=
9b50: 29 2e 6c 69 62 0a 54 4b 49 4d 50 4c 49 42 09 3d ).lib.TKIMPLIB.=
9b60: 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 $(_TKDIR)\lib\$
9b70: 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 21 (TKIMPLIBNAME).!
9b80: 65 6e 64 69 66 0a 54 4b 5f 49 4e 43 4c 55 44 45 endif.TK_INCLUDE
9b90: 53 20 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 4b S = -I"$(_TK
9ba0: 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0a 54 4b DIR)\include".TK
9bb0: 53 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 SCRIPTZIP =
9bc0: 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 $(_TKDIR)\lib\$(
9bd0: 54 4b 53 43 52 49 50 54 5a 49 50 4e 41 4d 45 29 TKSCRIPTZIPNAME)
9be0: 0a 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 ..!else # Buildi
9bf0: 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 73 6f ng against Tk so
9c00: 75 72 63 65 73 0a 0a 57 49 53 48 09 09 3d 20 24 urces..WISH..= $
9c10: 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 (_TKDIR)\win\$(B
9c20: 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 57 49 UILDDIRTOP)\$(WI
9c30: 53 48 4e 41 4d 45 29 0a 54 4b 53 54 55 42 4c 49 SHNAME).TKSTUBLI
9c40: 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 B.= $(_TKDIR)\wi
9c50: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
9c60: 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 \$(TKSTUBLIBNAME
9c70: 29 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f ).TKIMPLIB.= $(_
9c80: 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 TKDIR)\win\$(BUI
9c90: 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d LDDIRTOP)\$(TKIM
9ca0: 50 4c 49 42 4e 41 4d 45 29 0a 23 20 57 68 65 6e PLIBNAME).# When
9cb0: 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 building extens
9cc0: 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e ions, may be lin
9cd0: 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 king against Tk
9ce0: 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 that does not ad
9cf0: 64 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 d.# "t" suffix (
9d00: 65 2e 67 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 e.g. 8.5 or 8.7)
9d10: 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 . If lib not fou
9d20: 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 nd check for tha
9d30: 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 t possibility..!
9d40: 69 66 20 21 65 78 69 73 74 28 22 24 28 54 4b 49 if !exist("$(TKI
9d50: 4d 50 4c 49 42 29 22 29 0a 54 4b 49 4d 50 4c 49 MPLIB)").TKIMPLI
9d60: 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 BNAME.= tk$(TK_V
9d70: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d ERSION)$(SUFX:t=
9d80: 29 2e 6c 69 62 0a 54 4b 49 4d 50 4c 49 42 09 3d ).lib.TKIMPLIB.=
9d90: 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 $(_TKDIR)\win\$
9da0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 (BUILDDIRTOP)\$(
9db0: 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 21 65 TKIMPLIBNAME).!e
9dc0: 6e 64 69 66 0a 54 4b 5f 49 4e 43 4c 55 44 45 53 ndif.TK_INCLUDES
9dd0: 20 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 4b 44 = -I"$(_TKD
9de0: 49 52 29 5c 67 65 6e 65 72 69 63 22 20 2d 49 22 IR)\generic" -I"
9df0: 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 22 20 2d $(_TKDIR)\win" -
9e00: 49 22 24 28 5f 54 4b 44 49 52 29 5c 78 6c 69 62 I"$(_TKDIR)\xlib
9e10: 22 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 ".TKSCRIPTZIP
9e20: 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 = $(_TKDIR)\wi
9e30: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
9e40: 5c 24 28 54 4b 53 43 52 49 50 54 5a 49 50 4e 41 \$(TKSCRIPTZIPNA
9e50: 4d 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 4b ME)..!endif # TK
9e60: 49 4e 53 54 41 4c 4c 0a 0a 74 6b 6c 69 62 73 20 INSTALL..tklibs
9e70: 3d 20 22 24 28 54 4b 53 54 55 42 4c 49 42 29 22 = "$(TKSTUBLIB)"
9e80: 20 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 0a 0a "$(TKIMPLIB)"..
9e90: 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 !endif # $(DOING
9ea0: 5f 54 4b 29 0a 21 65 6e 64 69 66 20 23 20 24 28 _TK).!endif # $(
9eb0: 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e DOING_TK) || $(N
9ec0: 45 45 44 5f 54 4b 29 0a 0a 23 20 56 61 72 69 6f EED_TK)..# Vario
9ed0: 75 73 20 6f 75 74 70 75 74 20 70 61 74 68 73 0a us output paths.
9ee0: 50 52 4a 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 PRJIMPLIB.= $(OU
9ef0: 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 T_DIR)\$(PROJECT
9f00: 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 )$(VERSION)$(SUF
9f10: 58 29 2e 6c 69 62 0a 50 52 4a 4c 49 42 4e 41 4d X).lib.PRJLIBNAM
9f20: 45 38 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 E8.= $(PROJECT)$
9f30: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 (VERSION)$(SUFX)
9f40: 2e 24 28 45 58 54 29 0a 50 52 4a 4c 49 42 4e 41 .$(EXT).PRJLIBNA
9f50: 4d 45 39 09 3d 20 74 63 6c 39 24 28 50 52 4f 4a ME9.= tcl9$(PROJ
9f60: 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 ECT)$(VERSION)$(
9f70: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 21 69 66 SUFX).$(EXT).!if
9f80: 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 $(TCL_MAJOR_VER
9f90: 53 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 SION) == 8 || "$
9fa0: 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 (TCL_BUILD_FOR)"
9fb0: 20 3d 3d 20 22 38 22 0a 50 52 4a 4c 49 42 4e 41 == "8".PRJLIBNA
9fc0: 4d 45 09 3d 20 24 28 50 52 4a 4c 49 42 4e 41 4d ME.= $(PRJLIBNAM
9fd0: 45 38 29 0a 21 65 6c 73 65 0a 50 52 4a 4c 49 42 E8).!else.PRJLIB
9fe0: 4e 41 4d 45 09 3d 20 24 28 50 52 4a 4c 49 42 4e NAME.= $(PRJLIBN
9ff0: 41 4d 45 39 29 0a 21 65 6e 64 69 66 0a 50 52 4a AME9).!endif.PRJ
a000: 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 LIB..= $(OUT_DIR
a010: 29 5c 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 0a )\$(PRJLIBNAME).
a020: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
a030: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 50 _VERSION) == 8.P
a040: 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 RJSTUBLIBNAME.=
a050: 24 28 53 54 55 42 50 52 45 46 49 58 29 24 28 56 $(STUBPREFIX)$(V
a060: 45 52 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 ERSION).lib.!els
a070: 65 0a 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 e.PRJSTUBLIBNAME
a080: 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 58 29 .= $(STUBPREFIX)
a090: 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 50 52 4a 53 .lib.!endif.PRJS
a0a0: 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 TUBLIB.= $(OUT_D
a0b0: 49 52 29 5c 24 28 50 52 4a 53 54 55 42 4c 49 42 IR)\$(PRJSTUBLIB
a0c0: 4e 41 4d 45 29 0a 0a 23 20 49 66 20 65 78 74 65 NAME)..# If exte
a0d0: 6e 73 69 6f 6e 20 70 61 72 65 6e 74 20 6d 61 6b nsion parent mak
a0e0: 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 efile has not de
a0f0: 66 69 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 fined a resource
a100: 20 64 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 definition file
a110: 2c 0a 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 ,.# we will gene
a120: 72 61 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 rate one from st
a130: 61 6e 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e andard template.
a140: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 .!if !$(DOING_TC
a150: 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 L) && !$(DOING_T
a160: 4b 29 20 26 26 20 21 24 28 53 54 41 54 49 43 5f K) && !$(STATIC_
a170: 42 55 49 4c 44 29 0a 21 69 66 64 65 66 20 52 43 BUILD).!ifdef RC
a180: 46 49 4c 45 0a 52 45 53 46 49 4c 45 20 3d 20 24 FILE.RESFILE = $
a190: 28 54 4d 50 5f 44 49 52 29 5c 24 28 52 43 46 49 (TMP_DIR)\$(RCFI
a1a0: 4c 45 3a 2e 72 63 3d 2e 72 65 73 29 0a 21 65 6c LE:.rc=.res).!el
a1b0: 73 65 0a 52 45 53 46 49 4c 45 20 3d 20 24 28 54 se.RESFILE = $(T
a1c0: 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 MP_DIR)\$(PROJEC
a1d0: 54 29 2e 72 65 73 0a 21 65 6e 64 69 66 0a 21 65 T).res.!endif.!e
a1e0: 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 ndif..##########
a1f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a210: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a220: 23 23 23 23 23 23 23 23 23 0a 23 20 31 31 2e 20 #########.# 11.
a230: 43 6f 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 Construct the pa
a240: 74 68 73 20 66 6f 72 20 74 68 65 20 69 6e 73 74 ths for the inst
a250: 61 6c 6c 61 74 69 6f 6e 20 64 69 72 65 63 74 6f allation directo
a260: 72 69 65 73 0a 23 20 54 68 65 20 66 6f 6c 6c 6f ries.# The follo
a270: 77 69 6e 67 20 6d 61 63 72 6f 73 20 67 65 74 20 wing macros get
a280: 64 65 66 69 6e 65 64 20 69 6e 20 74 68 69 73 20 defined in this
a290: 73 65 63 74 69 6f 6e 3a 0a 23 20 4c 49 42 5f 49 section:.# LIB_I
a2a0: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
a2b0: 72 65 20 6c 69 62 72 61 72 69 65 73 20 73 68 6f re libraries sho
a2c0: 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 uld be installed
a2d0: 0a 23 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 .# BIN_INSTALL_D
a2e0: 49 52 20 2d 20 77 68 65 72 65 20 74 68 65 20 65 IR - where the e
a2f0: 78 65 63 75 74 61 62 6c 65 73 20 73 68 6f 75 6c xecutables shoul
a300: 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 d be installed.#
a310: 20 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DOC_INSTALL_DIR
a320: 20 2d 20 77 68 65 72 65 20 64 6f 63 75 6d 65 6e - where documen
a330: 74 61 74 69 6f 6e 20 73 68 6f 75 6c 64 20 62 65 tation should be
a340: 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 53 43 52 installed.# SCR
a350: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 IPT_INSTALL_DIR
a360: 2d 20 77 68 65 72 65 20 73 63 72 69 70 74 73 20 - where scripts
a370: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a380: 6c 65 64 0a 23 20 49 4e 43 4c 55 44 45 5f 49 4e led.# INCLUDE_IN
a390: 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 STALL_DIR - wher
a3a0: 65 20 43 20 69 6e 63 6c 75 64 65 20 66 69 6c 65 e C include file
a3b0: 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 s should be inst
a3c0: 61 6c 6c 65 64 0a 23 20 44 45 4d 4f 5f 49 4e 53 alled.# DEMO_INS
a3d0: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 TALL_DIR - where
a3e0: 20 64 65 6d 6f 73 20 73 68 6f 75 6c 64 20 62 65 demos should be
a3f0: 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 50 52 4a installed.# PRJ
a400: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a410: 68 65 72 65 20 70 61 63 6b 61 67 65 20 77 69 6c here package wil
a420: 6c 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 28 l be installed (
a430: 6e 6f 74 20 73 65 74 20 66 6f 72 20 54 63 6c 20 not set for Tcl
a440: 61 6e 64 20 54 6b 29 0a 0a 21 69 66 20 24 28 44 and Tk)..!if $(D
a450: 4f 49 4e 47 5f 54 43 4c 29 20 7c 7c 20 24 28 44 OING_TCL) || $(D
a460: 4f 49 4e 47 5f 54 4b 29 0a 4c 49 42 5f 49 4e 53 OING_TK).LIB_INS
a470: 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 TALL_DIR..= $(_I
a480: 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 0a 42 NSTALLDIR)\lib.B
a490: 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 IN_INSTALL_DIR..
a4a0: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 = $(_INSTALLDIR)
a4b0: 5c 62 69 6e 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c \bin.DOC_INSTALL
a4c0: 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 _DIR..= $(_INSTA
a4d0: 4c 4c 44 49 52 29 5c 64 6f 63 0a 21 69 66 20 24 LLDIR)\doc.!if $
a4e0: 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 53 43 52 49 (DOING_TCL).SCRI
a4f0: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d PT_INSTALL_DIR.=
a500: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c $(_INSTALLDIR)\
a510: 6c 69 62 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 lib\$(PROJECT)$(
a520: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
a530: 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 N).$(TCL_MINOR_V
a540: 45 52 53 49 4f 4e 29 0a 4d 4f 44 55 4c 45 5f 49 ERSION).MODULE_I
a550: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f NSTALL_DIR.= $(_
a560: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c INSTALLDIR)\lib\
a570: 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 tcl$(TCL_MAJOR_V
a580: 45 52 53 49 4f 4e 29 0a 21 65 6c 73 65 20 23 20 ERSION).!else #
a590: 44 4f 49 4e 47 5f 54 4b 0a 53 43 52 49 50 54 5f DOING_TK.SCRIPT_
a5a0: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 INSTALL_DIR.= $(
a5b0: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 _INSTALLDIR)\lib
a5c0: 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 54 4b 5f \$(PROJECT)$(TK_
a5d0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 MAJOR_VERSION).$
a5e0: 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f (TK_MINOR_VERSIO
a5f0: 4e 29 0a 21 65 6e 64 69 66 0a 44 45 4d 4f 5f 49 N).!endif.DEMO_I
a600: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 53 NSTALL_DIR.= $(S
a610: 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 CRIPT_INSTALL_DI
a620: 52 29 5c 64 65 6d 6f 73 0a 49 4e 43 4c 55 44 45 R)\demos.INCLUDE
a630: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 _INSTALL_DIR.= $
a640: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e (_INSTALLDIR)\in
a650: 63 6c 75 64 65 0a 0a 21 65 6c 73 65 20 23 20 65 clude..!else # e
a660: 78 74 65 6e 73 69 6f 6e 20 6f 74 68 65 72 20 74 xtension other t
a670: 68 61 6e 20 54 6b 0a 0a 50 52 4a 5f 49 4e 53 54 han Tk..PRJ_INST
a680: 41 4c 4c 5f 44 49 52 20 20 20 20 20 20 20 20 20 ALL_DIR
a690: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 = $(_INSTALLDIR)
a6a0: 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 44 4f 54 \$(PROJECT)$(DOT
a6b0: 56 45 52 53 49 4f 4e 29 0a 21 69 66 20 24 28 4d VERSION).!if $(M
a6c0: 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 ULTIPLATFORM_INS
a6d0: 54 41 4c 4c 29 0a 4c 49 42 5f 49 4e 53 54 41 4c TALL).LIB_INSTAL
a6e0: 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 L_DIR..= $(PRJ_I
a6f0: 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 24 28 50 4c NSTALL_DIR)\$(PL
a700: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 ATFORM_IDENTIFY)
a710: 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 .BIN_INSTALL_DIR
a720: 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c ..= $(PRJ_INSTAL
a730: 4c 5f 44 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 L_DIR)\$(PLATFOR
a740: 4d 5f 49 44 45 4e 54 49 46 59 29 0a 21 65 6c 73 M_IDENTIFY).!els
a750: 65 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 e.LIB_INSTALL_DI
a760: 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 R..= $(PRJ_INSTA
a770: 4c 4c 5f 44 49 52 29 0a 42 49 4e 5f 49 4e 53 54 LL_DIR).BIN_INST
a780: 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a ALL_DIR..= $(PRJ
a790: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 21 65 _INSTALL_DIR).!e
a7a0: 6e 64 69 66 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c ndif.DOC_INSTALL
a7b0: 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e _DIR..= $(PRJ_IN
a7c0: 53 54 41 4c 4c 5f 44 49 52 29 0a 53 43 52 49 50 STALL_DIR).SCRIP
a7d0: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 T_INSTALL_DIR.=
a7e0: 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(PRJ_INSTALL_DI
a7f0: 52 29 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f R).DEMO_INSTALL_
a800: 44 49 52 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 DIR.= $(PRJ_INST
a810: 41 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 0a 49 ALL_DIR)\demos.I
a820: 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 NCLUDE_INSTALL_D
a830: 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 IR.= $(_INSTALLD
a840: 49 52 29 5c 2e 2e 5c 69 6e 63 6c 75 64 65 0a 0a IR)\..\include..
a850: 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 !endif..########
a860: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a870: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a880: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a890: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 32 ###########.# 12
a8a0: 2e 20 53 65 74 20 75 70 20 61 63 74 75 61 6c 20 . Set up actual
a8b0: 6f 70 74 69 6f 6e 73 20 74 6f 20 62 65 20 70 61 options to be pa
a8c0: 73 73 65 64 20 74 6f 20 74 68 65 20 63 6f 6d 70 ssed to the comp
a8d0: 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 0a iler and linker.
a8e0: 23 20 4e 6f 77 20 77 65 20 68 61 76 65 20 61 6c # Now we have al
a8f0: 6c 20 74 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f l the informatio
a900: 6e 20 77 65 20 6e 65 65 64 2c 20 73 65 74 20 75 n we need, set u
a910: 70 20 74 68 65 20 61 63 74 75 61 6c 20 66 6c 61 p the actual fla
a920: 67 73 20 61 6e 64 0a 23 20 6f 70 74 69 6f 6e 73 gs and.# options
a930: 20 74 68 61 74 20 77 65 20 77 69 6c 6c 20 70 61 that we will pa
a940: 73 73 20 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c ss to the compil
a950: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 2e 20 54 er and linker. T
a960: 68 65 20 6d 61 69 6e 0a 23 20 6d 61 6b 65 66 69 he main.# makefi
a970: 6c 65 20 73 68 6f 75 6c 64 20 75 73 65 20 74 68 le should use th
a980: 65 73 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 ese in combinati
a990: 6f 6e 20 77 69 74 68 20 77 68 61 74 65 76 65 72 on with whatever
a9a0: 20 6f 74 68 65 72 20 66 6c 61 67 73 0a 23 20 61 other flags.# a
a9b0: 6e 64 20 73 77 69 74 63 68 65 73 20 61 72 65 20 nd switches are
a9c0: 73 70 65 63 69 66 69 63 20 74 6f 20 69 74 2e 0a specific to it..
a9d0: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
a9e0: 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66 69 6e macros are defin
a9f0: 65 64 2c 20 6e 61 6d 65 73 20 61 72 65 20 66 6f ed, names are fo
aa00: 72 20 68 69 73 74 6f 72 69 63 61 6c 20 63 6f 6d r historical com
aa10: 70 61 74 69 62 69 6c 69 74 79 3a 0a 23 20 4f 50 patibility:.# OP
aa20: 54 44 45 46 49 4e 45 53 20 2d 20 2f 44 78 78 78 TDEFINES - /Dxxx
aa30: 20 43 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 62 C macro flags b
aa40: 61 73 65 64 20 6f 6e 20 75 73 65 72 2d 73 70 65 ased on user-spe
aa50: 63 69 66 69 65 64 20 4f 50 54 53 0a 23 20 43 4f cified OPTS.# CO
aa60: 4d 50 49 4c 45 52 46 4c 41 47 53 20 2d 20 2f 44 MPILERFLAGS - /D
aa70: 78 78 78 20 43 20 6d 61 63 72 6f 20 66 6c 61 67 xxx C macro flag
aa80: 73 20 69 6e 64 65 70 65 6e 64 65 6e 74 20 6f 66 s independent of
aa90: 20 61 6e 79 20 63 6f 6e 66 69 67 75 72 61 74 69 any configurati
aaa0: 6f 6e 20 6f 70 74 69 6f 6e 73 0a 23 20 63 72 74 on options.# crt
aab0: 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 - Compiler swit
aac0: 63 68 20 74 68 61 74 20 73 65 6c 65 63 74 73 20 ch that selects
aad0: 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 the appropriate
aae0: 43 20 72 75 6e 74 69 6d 65 0a 23 20 63 64 65 62 C runtime.# cdeb
aaf0: 75 67 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 ug - Compiler sw
ab00: 69 74 63 68 65 73 20 72 65 6c 61 74 65 64 20 74 itches related t
ab10: 6f 20 64 65 62 75 67 20 41 4e 44 20 6f 70 74 69 o debug AND opti
ab20: 6d 69 7a 61 74 69 6f 6e 73 0a 23 20 63 77 61 72 mizations.# cwar
ab30: 6e 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 n - Compiler swi
ab40: 74 63 68 65 73 20 74 68 61 74 20 73 65 74 20 77 tches that set w
ab50: 61 72 6e 69 6e 67 20 6c 65 76 65 6c 73 0a 23 20 arning levels.#
ab60: 63 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 cflags - complet
ab70: 65 20 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 e compiler switc
ab80: 68 65 73 20 28 73 75 62 73 75 6d 65 73 20 63 64 hes (subsumes cd
ab90: 65 62 75 67 20 61 6e 64 20 63 77 61 72 6e 29 0a ebug and cwarn).
aba0: 23 20 6c 64 65 62 75 67 20 2d 20 4c 69 6e 6b 65 # ldebug - Linke
abb0: 72 20 73 77 69 74 63 68 65 73 20 63 6f 6e 74 72 r switches contr
abc0: 6f 6c 6c 69 6e 67 20 64 65 62 75 67 20 69 6e 66 olling debug inf
abd0: 6f 72 6d 61 74 69 6f 6e 20 61 6e 64 20 6f 70 74 ormation and opt
abe0: 69 6d 69 7a 61 74 69 6f 6e 0a 23 20 6c 66 6c 61 imization.# lfla
abf0: 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 gs - complete li
ac00: 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 28 73 nker switches (s
ac10: 75 62 73 75 6d 65 73 20 6c 64 65 62 75 67 29 20 ubsumes ldebug)
ac20: 65 78 63 65 70 74 20 73 75 62 73 79 73 74 65 6d except subsystem
ac30: 20 74 79 70 65 0a 23 20 64 6c 6c 6c 66 6c 61 67 type.# dlllflag
ac40: 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e s - complete lin
ac50: 6b 65 72 20 73 77 69 74 63 68 65 73 20 74 6f 20 ker switches to
ac60: 62 75 69 6c 64 20 44 4c 4c 73 20 28 73 75 62 73 build DLLs (subs
ac70: 75 6d 65 73 20 6c 66 6c 61 67 73 29 0a 23 20 63 umes lflags).# c
ac80: 6f 6e 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c onlflags - compl
ac90: 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 ete linker switc
aca0: 68 65 73 20 66 6f 72 20 63 6f 6e 73 6f 6c 65 20 hes for console
acb0: 70 72 6f 67 72 61 6d 20 28 73 75 62 73 75 6d 65 program (subsume
acc0: 73 20 6c 66 6c 61 67 73 29 0a 23 20 67 75 69 6c s lflags).# guil
acd0: 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 flags - complete
ace0: 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 linker switches
acf0: 20 66 6f 72 20 47 55 49 20 70 72 6f 67 72 61 6d for GUI program
ad00: 20 28 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 (subsumes lflag
ad10: 73 29 0a 23 20 62 61 73 65 6c 69 62 73 20 2d 20 s).# baselibs -
ad20: 6d 69 6e 69 6d 75 6d 20 57 69 6e 64 6f 77 73 20 minimum Windows
ad30: 6c 69 62 72 61 72 69 65 73 20 72 65 71 75 69 72 libraries requir
ad40: 65 64 2e 20 50 61 72 65 6e 74 20 6d 61 6b 65 66 ed. Parent makef
ad50: 69 6c 65 20 63 61 6e 0a 23 20 20 20 20 64 65 66 ile can.# def
ad60: 69 6e 65 20 50 52 4a 5f 4c 49 42 53 20 62 65 66 ine PRJ_LIBS bef
ad70: 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 ore including ru
ad80: 6c 65 73 2e 72 63 20 69 66 20 61 64 64 69 74 69 les.rc if additi
ad90: 6f 6e 61 6c 20 6c 69 62 73 20 61 72 65 20 6e 65 onal libs are ne
ada0: 65 64 65 64 0a 0a 4f 50 54 44 45 46 49 4e 45 53 eded..OPTDEFINES
adb0: 09 3d 20 2f 44 53 54 44 43 5f 48 45 41 44 45 52 .= /DSTDC_HEADER
adc0: 53 20 2f 44 55 53 45 5f 4e 4d 41 4b 45 3d 31 0a S /DUSE_NMAKE=1.
add0: 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 !if $(VCVERSION)
ade0: 20 3e 20 31 36 30 30 0a 4f 50 54 44 45 46 49 4e > 1600.OPTDEFIN
adf0: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
ae00: 53 29 20 2f 44 48 41 56 45 5f 53 54 44 49 4e 54 S) /DHAVE_STDINT
ae10: 5f 48 3d 31 0a 21 65 6c 73 65 0a 4f 50 54 44 45 _H=1.!else.OPTDE
ae20: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
ae30: 49 4e 45 53 29 20 2f 44 4d 50 5f 4e 4f 5f 53 54 INES) /DMP_NO_ST
ae40: 44 49 4e 54 3d 31 0a 21 65 6e 64 69 66 0a 21 69 DINT=1.!endif.!i
ae50: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
ae60: 3d 20 31 38 30 30 0a 4f 50 54 44 45 46 49 4e 45 = 1800.OPTDEFINE
ae70: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
ae80: 29 20 2f 44 48 41 56 45 5f 49 4e 54 54 59 50 45 ) /DHAVE_INTTYPE
ae90: 53 5f 48 3d 31 20 2f 44 48 41 56 45 5f 53 54 44 S_H=1 /DHAVE_STD
aea0: 42 4f 4f 4c 5f 48 3d 31 0a 21 65 6e 64 69 66 0a BOOL_H=1.!endif.
aeb0: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 45 4d 5f 44 .!if $(TCL_MEM_D
aec0: 45 42 55 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 EBUG).OPTDEFINES
aed0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
aee0: 20 2f 44 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 /DTCL_MEM_DEBUG
aef0: 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 .!endif.!if $(TC
af00: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 29 L_COMPILE_DEBUG)
af10: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
af20: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 OPTDEFINES) /DTC
af30: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 L_COMPILE_DEBUG
af40: 2f 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 53 54 /DTCL_COMPILE_ST
af50: 41 54 53 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 ATS.!endif.!if $
af60: 28 54 43 4c 5f 54 48 52 45 41 44 53 29 20 26 26 (TCL_THREADS) &&
af70: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 $(TCL_VERSION)
af80: 3c 20 38 37 0a 4f 50 54 44 45 46 49 4e 45 53 09 < 87.OPTDEFINES.
af90: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
afa0: 2f 44 54 43 4c 5f 54 48 52 45 41 44 53 3d 31 0a /DTCL_THREADS=1.
afb0: 21 69 66 20 24 28 55 53 45 5f 54 48 52 45 41 44 !if $(USE_THREAD
afc0: 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 54 43 4c _ALLOC) && $(TCL
afd0: 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a 4f _VERSION) < 87.O
afe0: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
aff0: 54 44 45 46 49 4e 45 53 29 20 2f 44 55 53 45 5f TDEFINES) /DUSE_
b000: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 3d 31 0a 21 THREAD_ALLOC=1.!
b010: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 endif.!endif.!if
b020: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
b030: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
b040: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 53 54 OPTDEFINES) /DST
b050: 41 54 49 43 5f 42 55 49 4c 44 0a 21 65 6c 73 65 ATIC_BUILD.!else
b060: 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e if $(TCL_VERSION
b070: 29 20 3e 20 38 36 0a 4f 50 54 44 45 46 49 4e 45 ) > 86.OPTDEFINE
b080: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b090: 29 20 2f 44 54 43 4c 5f 57 49 54 48 5f 45 58 54 ) /DTCL_WITH_EXT
b0a0: 45 52 4e 41 4c 5f 54 4f 4d 4d 41 54 48 0a 21 69 ERNAL_TOMMATH.!i
b0b0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
b0c0: 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 = "AMD64" || "$(
b0d0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 MACHINE)" == "AR
b0e0: 4d 36 34 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 M64".OPTDEFINES.
b0f0: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b100: 2f 44 4d 50 5f 36 34 42 49 54 0a 21 65 6e 64 69 /DMP_64BIT.!endi
b110: 66 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 f.!endif.!if $(T
b120: 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 CL_NO_DEPRECATED
b130: 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ).OPTDEFINES.= $
b140: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b150: 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 CL_NO_DEPRECATED
b160: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 55 .!endif..!if $(U
b170: 53 45 5f 53 54 55 42 53 29 0a 23 20 4e 6f 74 65 SE_STUBS).# Note
b180: 20 77 65 20 64 6f 20 6e 6f 74 20 64 65 66 69 6e we do not defin
b190: 65 20 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 20 e USE_TCL_STUBS
b1a0: 65 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 even when buildi
b1b0: 6e 67 20 74 6b 20 73 69 6e 63 65 20 73 6f 6d 65 ng tk since some
b1c0: 0a 23 20 74 65 73 74 20 74 61 72 67 65 74 73 20 .# test targets
b1d0: 69 6e 20 74 6b 20 64 6f 20 6e 6f 74 20 75 73 65 in tk do not use
b1e0: 20 73 74 75 62 73 0a 21 69 66 20 21 24 28 44 4f stubs.!if !$(DO
b1f0: 49 4e 47 5f 54 43 4c 29 0a 55 53 45 5f 53 54 55 ING_TCL).USE_STU
b200: 42 53 5f 44 45 46 53 20 20 3d 20 2f 44 55 53 45 BS_DEFS = /DUSE
b210: 5f 54 43 4c 5f 53 54 55 42 53 20 2f 44 55 53 45 _TCL_STUBS /DUSE
b220: 5f 54 43 4c 4f 4f 5f 53 54 55 42 53 0a 21 69 66 _TCLOO_STUBS.!if
b230: 20 24 28 4e 45 45 44 5f 54 4b 29 0a 55 53 45 5f $(NEED_TK).USE_
b240: 53 54 55 42 53 5f 44 45 46 53 20 20 3d 20 24 28 STUBS_DEFS = $(
b250: 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 29 20 USE_STUBS_DEFS)
b260: 2f 44 55 53 45 5f 54 4b 5f 53 54 55 42 53 0a 21 /DUSE_TK_STUBS.!
b270: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e endif.!endif.!en
b280: 64 69 66 20 23 20 55 53 45 5f 53 54 55 42 53 0a dif # USE_STUBS.
b290: 0a 21 69 66 20 21 24 28 44 45 42 55 47 29 0a 4f .!if !$(DEBUG).O
b2a0: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b2b0: 54 44 45 46 49 4e 45 53 29 20 2f 44 4e 44 45 42 TDEFINES) /DNDEB
b2c0: 55 47 0a 21 69 66 20 24 28 4f 50 54 49 4d 49 5a UG.!if $(OPTIMIZ
b2d0: 49 4e 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 ING).OPTDEFINES.
b2e0: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b2f0: 2f 44 54 43 4c 5f 43 46 47 5f 4f 50 54 49 4d 49 /DTCL_CFG_OPTIMI
b300: 5a 45 44 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 ZED.!endif.!endi
b310: 66 0a 21 69 66 20 24 28 50 52 4f 46 49 4c 45 29 f.!if $(PROFILE)
b320: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
b330: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 OPTDEFINES) /DTC
b340: 4c 5f 43 46 47 5f 50 52 4f 46 49 4c 45 44 0a 21 L_CFG_PROFILED.!
b350: 65 6e 64 69 66 0a 21 69 66 20 22 24 28 4d 41 43 endif.!if "$(MAC
b360: 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 HINE)" == "AMD64
b370: 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 " || "$(MACHINE)
b380: 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a 4f 50 54 " == "ARM64".OPT
b390: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b3a0: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 EFINES) /DTCL_CF
b3b0: 47 5f 44 4f 36 34 42 49 54 0a 21 65 6e 64 69 66 G_DO64BIT.!endif
b3c0: 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e .!if $(VCVERSION
b3d0: 29 20 3c 20 31 33 30 30 0a 4f 50 54 44 45 46 49 ) < 1300.OPTDEFI
b3e0: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b3f0: 45 53 29 20 2f 44 4e 4f 5f 53 54 52 54 4f 49 36 ES) /DNO_STRTOI6
b400: 34 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 4=1.!endif..!if
b410: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
b420: 49 4f 4e 29 20 3d 3d 20 38 0a 21 69 66 20 22 24 ION) == 8.!if "$
b430: 28 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 (_USE_64BIT_TIME
b440: 5f 54 29 22 20 3d 3d 20 22 31 22 0a 4f 50 54 44 _T)" == "1".OPTD
b450: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b460: 46 49 4e 45 53 29 20 2f 44 5f 55 53 45 5f 36 34 FINES) /D_USE_64
b470: 42 49 54 5f 54 49 4d 45 5f 54 3d 31 0a 21 65 6e BIT_TIME_T=1.!en
b480: 64 69 66 0a 0a 23 20 5f 41 54 4c 5f 58 50 5f 54 dif..# _ATL_XP_T
b490: 41 52 47 45 54 49 4e 47 20 2d 20 4e 65 77 65 72 ARGETING - Newer
b4a0: 20 53 44 4b 27 73 20 6e 65 65 64 20 74 68 69 73 SDK's need this
b4b0: 20 74 6f 20 62 75 69 6c 64 20 66 6f 72 20 58 50 to build for XP
b4c0: 0a 43 4f 4d 50 49 4c 45 52 46 4c 41 47 53 20 20 .COMPILERFLAGS
b4d0: 3d 20 2f 44 5f 41 54 4c 5f 58 50 5f 54 41 52 47 = /D_ATL_XP_TARG
b4e0: 45 54 49 4e 47 0a 21 65 6e 64 69 66 0a 21 69 66 ETING.!endif.!if
b4f0: 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f "$(TCL_BUILD_FO
b500: 52 29 22 20 3d 3d 20 22 38 22 0a 4f 50 54 44 45 R)" == "8".OPTDE
b510: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b520: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4d 41 4a 4f INES) /DTCL_MAJO
b530: 52 5f 56 45 52 53 49 4f 4e 3d 38 0a 21 65 6e 64 R_VERSION=8.!end
b540: 69 66 0a 0a 23 20 4c 69 6b 65 20 74 68 65 20 54 if..# Like the T
b550: 45 41 20 73 79 73 74 65 6d 20 6f 6e 6c 79 20 73 EA system only s
b560: 65 74 20 74 68 69 73 20 6e 6f 6e 20 65 6d 70 74 et this non empt
b570: 79 20 66 6f 72 20 6e 6f 6e 2d 54 6b 20 65 78 74 y for non-Tk ext
b580: 65 6e 73 69 6f 6e 73 0a 23 20 4e 6f 74 65 3a 20 ensions.# Note:
b590: 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 some extensions
b5a0: 75 73 65 20 50 41 43 4b 41 47 45 5f 4e 41 4d 45 use PACKAGE_NAME
b5b0: 20 61 6e 64 20 6f 74 68 65 72 73 20 75 73 65 20 and others use
b5c0: 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 0a PACKAGE_TCLNAME.
b5d0: 23 20 73 6f 20 77 65 20 70 61 73 73 20 62 6f 74 # so we pass bot
b5e0: 68 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 h.!if !$(DOING_T
b5f0: 43 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f CL) && !$(DOING_
b600: 54 4b 29 0a 50 4b 47 4e 41 4d 45 46 4c 41 47 53 TK).PKGNAMEFLAGS
b610: 20 3d 20 2f 44 50 41 43 4b 41 47 45 5f 4e 41 4d = /DPACKAGE_NAM
b620: 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 43 4b 41 E="\"$(PRJ_PACKA
b630: 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 20 5c GE_TCLNAME)\"" \
b640: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
b650: 2f 44 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d /DPACKAGE_TCLNAM
b660: 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 43 4b 41 E="\"$(PRJ_PACKA
b670: 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 20 5c GE_TCLNAME)\"" \
b680: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
b690: 2f 44 50 41 43 4b 41 47 45 5f 56 45 52 53 49 4f /DPACKAGE_VERSIO
b6a0: 4e 3d 22 5c 22 24 28 44 4f 54 56 45 52 53 49 4f N="\"$(DOTVERSIO
b6b0: 4e 29 5c 22 22 20 5c 0a 20 20 20 20 20 20 20 20 N)\"" \.
b6c0: 20 20 20 20 20 20 20 2f 44 4d 4f 44 55 4c 45 5f /DMODULE_
b6d0: 53 43 4f 50 45 3d 65 78 74 65 72 6e 0a 21 65 6e SCOPE=extern.!en
b6e0: 64 69 66 0a 0a 23 20 63 72 74 20 70 69 63 6b 73 dif..# crt picks
b6f0: 20 74 68 65 20 43 20 72 75 6e 20 74 69 6d 65 20 the C run time
b700: 62 61 73 65 64 20 6f 6e 20 73 65 6c 65 63 74 65 based on selecte
b710: 64 20 4f 50 54 53 0a 21 69 66 20 24 28 4d 53 56 d OPTS.!if $(MSV
b720: 43 52 54 29 0a 21 69 66 20 24 28 44 45 42 55 47 CRT).!if $(DEBUG
b730: 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 ) && !$(UNCHECKE
b740: 44 29 0a 63 72 74 20 3d 20 2d 4d 44 64 0a 21 65 D).crt = -MDd.!e
b750: 6c 73 65 0a 63 72 74 20 3d 20 2d 4d 44 0a 21 65 lse.crt = -MD.!e
b760: 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 20 24 ndif.!else.!if $
b770: 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 4e (DEBUG) && !$(UN
b780: 43 48 45 43 4b 45 44 29 0a 63 72 74 20 3d 20 2d CHECKED).crt = -
b790: 4d 54 64 0a 21 65 6c 73 65 0a 63 72 74 20 3d 20 MTd.!else.crt =
b7a0: 2d 4d 54 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 -MT.!endif.!endi
b7b0: 66 0a 0a 23 20 63 64 65 62 75 67 20 69 6e 63 6c f..# cdebug incl
b7c0: 75 64 65 73 20 63 6f 6d 70 69 6c 65 72 20 6f 70 udes compiler op
b7d0: 74 69 6f 6e 73 20 66 6f 72 20 64 65 62 75 67 67 tions for debugg
b7e0: 69 6e 67 20 61 73 20 77 65 6c 6c 20 61 73 20 6f ing as well as o
b7f0: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 69 66 ptimization..!if
b800: 20 24 28 44 45 42 55 47 29 0a 0a 23 20 49 6e 20 $(DEBUG)..# In
b810: 64 65 62 75 67 67 69 6e 67 20 6d 6f 64 65 2c 20 debugging mode,
b820: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 20 6e 65 optimizations ne
b830: 65 64 20 74 6f 20 62 65 20 64 69 73 61 62 6c 65 ed to be disable
b840: 64 0a 63 64 65 62 75 67 20 3d 20 2d 5a 69 20 2d d.cdebug = -Zi -
b850: 4f 64 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 Od $(DEBUGFLAGS)
b860: 0a 0a 21 65 6c 73 65 0a 0a 63 64 65 62 75 67 20 ..!else..cdebug
b870: 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e = $(OPTIMIZATION
b880: 53 29 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 S).!if $(SYMBOLS
b890: 29 0a 63 64 65 62 75 67 20 3d 20 24 28 63 64 65 ).cdebug = $(cde
b8a0: 62 75 67 29 20 2d 5a 69 0a 21 65 6e 64 69 66 0a bug) -Zi.!endif.
b8b0: 0a 21 65 6e 64 69 66 20 23 20 24 28 44 45 42 55 .!endif # $(DEBU
b8c0: 47 29 0a 0a 23 20 63 77 61 72 6e 20 69 6e 63 6c G)..# cwarn incl
b8d0: 75 64 65 73 20 64 65 66 61 75 6c 74 20 77 61 72 udes default war
b8e0: 6e 69 6e 67 20 6c 65 76 65 6c 73 2c 20 61 6c 73 ning levels, als
b8f0: 6f 20 43 34 30 39 30 20 28 62 75 67 67 79 29 20 o C4090 (buggy)
b900: 61 6e 64 20 43 34 31 34 36 20 69 73 20 75 73 65 and C4146 is use
b910: 6c 65 73 73 2e 0a 63 77 61 72 6e 20 3d 20 24 28 less..cwarn = $(
b920: 57 41 52 4e 49 4e 47 53 29 20 2d 77 64 34 30 39 WARNINGS) -wd409
b930: 30 20 2d 77 64 34 31 34 36 0a 0a 21 69 66 20 22 0 -wd4146..!if "
b940: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
b950: 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 AMD64" || "$(MAC
b960: 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 HINE)" == "ARM64
b970: 22 0a 23 20 44 69 73 61 62 6c 65 20 70 6f 69 6e ".# Disable poin
b980: 74 65 72 3c 2d 3e 69 6e 74 20 77 61 72 6e 69 6e ter<->int warnin
b990: 67 73 20 72 65 6c 61 74 65 64 20 74 6f 20 63 61 gs related to ca
b9a0: 73 74 20 62 65 74 77 65 65 6e 20 64 69 66 66 65 st between diffe
b9b0: 72 65 6e 74 20 73 69 7a 65 73 0a 23 20 54 68 65 rent sizes.# The
b9c0: 72 65 20 61 72 65 20 61 20 67 61 64 7a 69 6c 6c re are a gadzill
b9d0: 69 6f 6e 20 6f 66 20 74 68 65 73 65 20 64 75 65 ion of these due
b9e0: 20 74 6f 20 75 73 65 20 6f 66 20 43 6c 69 65 6e to use of Clien
b9f0: 74 44 61 74 61 20 61 6e 64 0a 23 20 63 6c 75 74 tData and.# clut
ba00: 74 65 72 20 75 70 20 63 6f 6d 70 69 6c 65 72 0a ter up compiler.
ba10: 23 20 6f 75 74 70 75 74 20 69 6e 63 72 65 61 73 # output increas
ba20: 69 6e 67 20 63 68 61 6e 63 65 20 6f 66 20 61 20 ing chance of a
ba30: 72 65 61 6c 20 77 61 72 6e 69 6e 67 20 67 65 74 real warning get
ba40: 74 69 6e 67 20 6c 6f 73 74 2e 20 53 6f 20 64 69 ting lost. So di
ba50: 73 61 62 6c 65 20 74 68 65 6d 2e 0a 23 20 45 76 sable them..# Ev
ba60: 65 6e 74 75 61 6c 6c 79 20 73 6f 6d 65 20 64 61 entually some da
ba70: 79 2c 20 54 63 6c 20 77 69 6c 6c 20 62 65 20 36 y, Tcl will be 6
ba80: 34 2d 62 69 74 20 63 6c 65 61 6e 2e 0a 63 77 61 4-bit clean..cwa
ba90: 72 6e 20 3d 20 24 28 63 77 61 72 6e 29 20 2d 77 rn = $(cwarn) -w
baa0: 64 34 33 31 31 20 2d 77 64 34 33 31 32 0a 21 65 d4311 -wd4312.!e
bab0: 6e 64 69 66 0a 0a 23 23 23 20 43 6f 6d 6d 6f 6e ndif..### Common
bac0: 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e compiler option
bad0: 73 20 74 68 61 74 20 61 72 65 20 61 72 63 68 69 s that are archi
bae0: 74 65 63 74 75 72 65 20 73 70 65 63 69 66 69 63 tecture specific
baf0: 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 .!if "$(MACHINE)
bb00: 22 20 3d 3d 20 22 41 52 4d 22 0a 63 61 72 63 68 " == "ARM".carch
bb10: 20 3d 20 2f 44 5f 41 52 4d 5f 57 49 4e 41 50 49 = /D_ARM_WINAPI
bb20: 5f 50 41 52 54 49 54 49 4f 4e 5f 44 45 53 4b 54 _PARTITION_DESKT
bb30: 4f 50 5f 53 44 4b 5f 41 56 41 49 4c 41 42 4c 45 OP_SDK_AVAILABLE
bb40: 0a 21 65 6c 73 65 0a 63 61 72 63 68 20 3d 0a 21 .!else.carch =.!
bb50: 65 6e 64 69 66 0a 0a 23 20 63 70 75 69 64 20 69 endif..# cpuid i
bb60: 73 20 6f 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 s only available
bb70: 20 6f 6e 20 69 6e 74 65 6c 20 6d 61 63 68 69 6e on intel machin
bb80: 65 73 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e es.!if "$(MACHIN
bb90: 45 29 22 20 3d 3d 20 22 49 58 38 36 22 20 7c 7c E)" == "IX86" ||
bba0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
bbb0: 20 22 41 4d 44 36 34 22 0a 63 61 72 63 68 20 3d "AMD64".carch =
bbc0: 20 24 28 63 61 72 63 68 29 20 2f 44 48 41 56 45 $(carch) /DHAVE
bbd0: 5f 43 50 55 49 44 3d 31 0a 21 65 6e 64 69 66 0a _CPUID=1.!endif.
bbe0: 0a 21 69 66 20 24 28 44 45 42 55 47 29 0a 23 20 .!if $(DEBUG).#
bbf0: 54 75 72 6e 20 77 61 72 6e 69 6e 67 73 20 69 6e Turn warnings in
bc00: 74 6f 20 65 72 72 6f 72 73 0a 63 77 61 72 6e 20 to errors.cwarn
bc10: 3d 20 24 28 63 77 61 72 6e 29 20 2d 57 58 0a 21 = $(cwarn) -WX.!
bc20: 65 6e 64 69 66 0a 0a 49 4e 43 4c 55 44 45 53 20 endif..INCLUDES
bc30: 3d 20 24 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 = $(TCL_INCLUDES
bc40: 29 20 24 28 54 4b 5f 49 4e 43 4c 55 44 45 53 29 ) $(TK_INCLUDES)
bc50: 20 24 28 50 52 4a 5f 49 4e 43 4c 55 44 45 53 29 $(PRJ_INCLUDES)
bc60: 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 .!if !$(DOING_TC
bc70: 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 L) && !$(DOING_T
bc80: 4b 29 0a 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 K).INCLUDES = $(
bc90: 49 4e 43 4c 55 44 45 53 29 20 2d 49 22 24 28 47 INCLUDES) -I"$(G
bca0: 45 4e 45 52 49 43 44 49 52 29 22 20 2d 49 22 24 ENERICDIR)" -I"$
bcb0: 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 (WIN_DIR)" -I"$(
bcc0: 43 4f 4d 50 41 54 44 49 52 29 22 0a 21 65 6e 64 COMPATDIR)".!end
bcd0: 69 66 0a 0a 23 20 54 68 65 73 65 20 66 6c 61 67 if..# These flag
bce0: 73 20 61 72 65 20 64 65 66 69 6e 65 64 20 72 6f s are defined ro
bcf0: 75 67 68 6c 79 20 69 6e 20 74 68 65 20 6f 72 64 ughly in the ord
bd00: 65 72 20 6f 66 20 74 68 65 20 70 72 65 2d 72 65 er of the pre-re
bd10: 66 6f 72 6d 0a 23 20 72 75 6c 65 73 2e 76 63 2f form.# rules.vc/
bd20: 6d 61 6b 65 66 69 6c 65 2e 76 63 20 74 6f 20 68 makefile.vc to h
bd30: 65 6c 70 20 76 69 73 75 61 6c 6c 79 20 63 6f 6d elp visually com
bd40: 70 61 72 65 20 74 68 61 74 20 74 68 65 20 70 72 pare that the pr
bd50: 65 2d 20 61 6e 64 0a 23 20 70 6f 73 74 2d 72 65 e- and.# post-re
bd60: 66 6f 72 6d 20 62 75 69 6c 64 20 6c 6f 67 73 0a form build logs.
bd70: 0a 23 20 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 .# cflags contai
bd80: 6e 73 20 67 65 6e 65 72 69 63 20 66 6c 61 67 73 ns generic flags
bd90: 20 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69 used for buildi
bda0: 6e 67 20 70 72 61 63 74 69 63 61 6c 6c 79 20 61 ng practically a
bdb0: 6c 6c 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 0a ll object files.
bdc0: 63 66 6c 61 67 73 20 3d 20 2d 6e 6f 6c 6f 67 6f cflags = -nologo
bdd0: 20 2d 63 20 24 28 43 4f 4d 50 49 4c 45 52 46 4c -c $(COMPILERFL
bde0: 41 47 53 29 20 24 28 63 61 72 63 68 29 20 24 28 AGS) $(carch) $(
bdf0: 63 77 61 72 6e 29 20 2d 46 70 24 28 54 4d 50 5f cwarn) -Fp$(TMP_
be00: 44 49 52 29 5e 5c 20 24 28 63 64 65 62 75 67 29 DIR)^\ $(cdebug)
be10: 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f ..!if $(TCL_MAJO
be20: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 R_VERSION) == 8
be30: 26 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 && $(TCL_MINOR_V
be40: 45 52 53 49 4f 4e 29 20 3c 20 37 0a 63 66 6c 61 ERSION) < 7.cfla
be50: 67 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 2d gs = $(cflags) -
be60: 44 54 63 6c 5f 53 69 7a 65 3d 69 6e 74 0a 21 65 DTcl_Size=int.!e
be70: 6e 64 69 66 0a 0a 23 20 61 70 70 63 66 6c 61 67 ndif..# appcflag
be80: 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c s contains $(cfl
be90: 61 67 73 29 20 61 6e 64 20 66 6c 61 67 73 20 66 ags) and flags f
bea0: 6f 72 20 62 75 69 6c 64 69 6e 67 20 74 68 65 20 or building the
beb0: 61 70 70 6c 69 63 61 74 69 6f 6e 0a 23 20 6f 62 application.# ob
bec0: 6a 65 63 74 20 66 69 6c 65 73 20 28 65 2e 67 2e ject files (e.g.
bed0: 20 74 63 6c 73 68 2c 20 6f 72 20 77 69 73 68 29 tclsh, or wish)
bee0: 20 70 6b 67 63 66 6c 61 67 73 20 63 6f 6e 74 61 pkgcflags conta
bef0: 69 6e 73 20 24 28 63 66 6c 61 67 73 29 20 70 6c ins $(cflags) pl
bf00: 75 73 0a 23 20 66 6c 61 67 73 20 75 73 65 64 20 us.# flags used
bf10: 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 73 68 61 for building sha
bf20: 72 65 64 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 red object files
bf30: 20 54 68 65 20 74 77 6f 20 64 69 66 66 65 72 20 The two differ
bf40: 69 6e 20 74 68 65 0a 23 20 42 55 49 4c 44 5f 24 in the.# BUILD_$
bf50: 28 50 52 4f 4a 45 43 54 29 20 6d 61 63 72 6f 20 (PROJECT) macro
bf60: 77 68 69 63 68 20 73 68 6f 75 6c 64 20 62 65 20 which should be
bf70: 64 65 66 69 6e 65 64 20 6f 6e 6c 79 20 66 6f 72 defined only for
bf80: 20 74 68 65 20 73 68 61 72 65 64 0a 23 20 6c 69 the shared.# li
bf90: 62 72 61 72 79 20 2a 69 6d 70 6c 65 6d 65 6e 74 brary *implement
bfa0: 61 74 69 6f 6e 2a 20 61 6e 64 20 6e 6f 74 20 66 ation* and not f
bfb0: 6f 72 20 69 74 73 20 63 61 6c 6c 65 72 20 69 6e or its caller in
bfc0: 74 65 72 66 61 63 65 0a 0a 61 70 70 63 66 6c 61 terface..appcfla
bfd0: 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 24 28 63 gs_nostubs = $(c
bfe0: 66 6c 61 67 73 29 20 24 28 63 72 74 29 20 24 28 flags) $(crt) $(
bff0: 49 4e 43 4c 55 44 45 53 29 20 24 28 54 43 4c 5f INCLUDES) $(TCL_
c000: 44 45 46 49 4e 45 53 29 20 24 28 50 52 4a 5f 44 DEFINES) $(PRJ_D
c010: 45 46 49 4e 45 53 29 20 24 28 4f 50 54 44 45 46 EFINES) $(OPTDEF
c020: 49 4e 45 53 29 0a 61 70 70 63 66 6c 61 67 73 20 INES).appcflags
c030: 3d 20 24 28 61 70 70 63 66 6c 61 67 73 5f 6e 6f = $(appcflags_no
c040: 73 74 75 62 73 29 20 24 28 55 53 45 5f 53 54 55 stubs) $(USE_STU
c050: 42 53 5f 44 45 46 53 29 0a 70 6b 67 63 66 6c 61 BS_DEFS).pkgcfla
c060: 67 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 73 gs = $(appcflags
c070: 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 ) $(PKGNAMEFLAGS
c080: 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 52 4f 4a ) /DBUILD_$(PROJ
c090: 45 43 54 29 0a 70 6b 67 63 66 6c 61 67 73 5f 6e ECT).pkgcflags_n
c0a0: 6f 73 74 75 62 73 20 3d 20 24 28 61 70 70 63 66 ostubs = $(appcf
c0b0: 6c 61 67 73 5f 6e 6f 73 74 75 62 73 29 20 24 28 lags_nostubs) $(
c0c0: 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29 20 2f 44 PKGNAMEFLAGS) /D
c0d0: 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 BUILD_$(PROJECT)
c0e0: 0a 0a 23 20 73 74 75 62 73 63 66 6c 61 67 73 20 ..# stubscflags
c0f0: 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 contains $(cflag
c100: 73 29 20 70 6c 75 73 20 66 6c 61 67 73 20 75 73 s) plus flags us
c110: 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 ed for building
c120: 61 20 73 74 75 62 73 0a 23 20 6c 69 62 72 61 72 a stubs.# librar
c130: 79 20 66 6f 72 20 74 68 65 20 70 61 63 6b 61 67 y for the packag
c140: 65 2e 20 20 4e 6f 74 65 3a 20 2f 44 53 54 41 54 e. Note: /DSTAT
c150: 49 43 5f 42 55 49 4c 44 20 69 73 20 64 65 66 69 IC_BUILD is defi
c160: 6e 65 64 20 69 6e 0a 23 20 24 28 4f 50 54 44 45 ned in.# $(OPTDE
c170: 46 49 4e 45 53 29 20 6f 6e 6c 79 20 69 66 20 74 FINES) only if t
c180: 68 65 20 4f 50 54 53 20 63 6f 6e 66 69 67 75 72 he OPTS configur
c190: 61 74 69 6f 6e 20 69 6e 64 69 63 61 74 65 73 20 ation indicates
c1a0: 61 20 73 74 61 74 69 63 0a 23 20 6c 69 62 72 61 a static.# libra
c1b0: 72 79 2e 20 48 6f 77 65 76 65 72 20 74 68 65 20 ry. However the
c1c0: 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 69 73 stubs library is
c1d0: 20 41 4c 57 41 59 53 20 73 74 61 74 69 63 20 68 ALWAYS static h
c1e0: 65 6e 63 65 20 69 6e 63 6c 75 64 65 64 0a 23 20 ence included.#
c1f0: 68 65 72 65 20 69 72 72 65 73 70 65 63 74 69 76 here irrespectiv
c200: 65 20 6f 66 20 74 68 65 20 4f 50 54 53 20 73 65 e of the OPTS se
c210: 74 74 69 6e 67 2e 0a 23 0a 23 20 54 42 44 20 2d tting..#.# TBD -
c220: 20 74 63 6c 76 66 73 20 68 61 73 20 61 20 63 6f tclvfs has a co
c230: 6d 6d 65 6e 74 20 74 68 61 74 20 73 74 75 62 73 mment that stubs
c240: 20 6c 69 62 73 20 73 68 6f 75 6c 64 20 6e 6f 74 libs should not
c250: 20 62 65 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 be compiled wit
c260: 68 20 2d 47 4c 0a 23 20 77 69 74 68 6f 75 74 20 h -GL.# without
c270: 73 74 61 74 69 6e 67 20 77 68 79 2e 20 54 63 6c stating why. Tcl
c280: 20 69 74 73 65 6c 66 20 63 6f 6d 70 69 6c 65 64 itself compiled
c290: 20 73 74 75 62 73 20 6c 69 62 73 20 77 69 74 68 stubs libs with
c2a0: 20 74 68 69 73 20 66 6c 61 67 2e 0a 23 20 73 6f this flag..# so
c2b0: 20 77 65 20 64 6f 20 6e 6f 74 20 72 65 6d 6f 76 we do not remov
c2c0: 65 20 69 74 20 66 72 6f 6d 20 63 66 6c 61 67 73 e it from cflags
c2d0: 2e 20 2d 47 4c 20 6d 61 79 20 70 72 65 76 65 6e . -GL may preven
c2e0: 74 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 63 t extensions.# c
c2f0: 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 6f 6e 65 ompiled with one
c300: 20 56 43 20 76 65 72 73 69 6f 6e 20 74 6f 20 66 VC version to f
c310: 61 69 6c 20 74 6f 20 6c 69 6e 6b 20 61 67 61 69 ail to link agai
c320: 6e 73 74 20 73 74 75 62 73 20 6c 69 62 72 61 72 nst stubs librar
c330: 79 0a 23 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 y.# compiled wit
c340: 68 20 61 6e 6f 74 68 65 72 20 56 43 20 76 65 72 h another VC ver
c350: 73 69 6f 6e 2e 20 43 68 65 63 6b 20 66 6f 72 20 sion. Check for
c360: 74 68 69 73 20 61 6e 64 20 66 69 78 20 61 63 63 this and fix acc
c370: 6f 72 64 69 6e 67 6c 79 2e 0a 73 74 75 62 73 63 ordingly..stubsc
c380: 66 6c 61 67 73 20 3d 20 24 28 63 66 6c 61 67 73 flags = $(cflags
c390: 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 ) $(PKGNAMEFLAGS
c3a0: 29 20 24 28 50 52 4a 5f 44 45 46 49 4e 45 53 29 ) $(PRJ_DEFINES)
c3b0: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
c3c0: 5a 6c 20 2f 47 4c 2d 20 2f 44 53 54 41 54 49 43 Zl /GL- /DSTATIC
c3d0: 5f 42 55 49 4c 44 20 24 28 49 4e 43 4c 55 44 45 _BUILD $(INCLUDE
c3e0: 53 29 20 24 28 55 53 45 5f 53 54 55 42 53 5f 44 S) $(USE_STUBS_D
c3f0: 45 46 53 29 0a 0a 23 20 4c 69 6e 6b 20 66 6c 61 EFS)..# Link fla
c400: 67 73 0a 0a 21 69 66 20 24 28 44 45 42 55 47 29 gs..!if $(DEBUG)
c410: 0a 6c 64 65 62 75 67 09 3d 20 2d 64 65 62 75 67 .ldebug.= -debug
c420: 20 2d 64 65 62 75 67 74 79 70 65 3a 63 76 0a 21 -debugtype:cv.!
c430: 65 6c 73 65 0a 6c 64 65 62 75 67 09 3d 20 2d 72 else.ldebug.= -r
c440: 65 6c 65 61 73 65 20 2d 6f 70 74 3a 72 65 66 20 elease -opt:ref
c450: 2d 6f 70 74 3a 69 63 66 2c 33 0a 21 69 66 20 24 -opt:icf,3.!if $
c460: 28 53 59 4d 42 4f 4c 53 29 0a 6c 64 65 62 75 67 (SYMBOLS).ldebug
c470: 09 3d 20 24 28 6c 64 65 62 75 67 29 20 2d 64 65 .= $(ldebug) -de
c480: 62 75 67 20 2d 64 65 62 75 67 74 79 70 65 3a 63 bug -debugtype:c
c490: 76 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a v.!endif.!endif.
c4a0: 0a 23 20 4e 6f 74 65 3a 20 50 72 6f 66 69 6c 69 .# Note: Profili
c4b0: 6e 67 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 ng is currently
c4c0: 6f 6e 6c 79 20 70 6f 73 73 69 62 6c 65 20 77 69 only possible wi
c4d0: 74 68 20 74 68 65 20 56 69 73 75 61 6c 20 53 74 th the Visual St
c4e0: 75 64 69 6f 20 45 6e 74 65 72 70 72 69 73 65 0a udio Enterprise.
c4f0: 21 69 66 20 24 28 50 52 4f 46 49 4c 45 29 0a 6c !if $(PROFILE).l
c500: 64 65 62 75 67 3d 20 24 28 6c 64 65 62 75 67 29 debug= $(ldebug)
c510: 20 2d 70 72 6f 66 69 6c 65 0a 21 65 6e 64 69 66 -profile.!endif
c520: 0a 0a 23 23 23 20 44 65 63 6c 61 72 61 74 69 6f ..### Declaratio
c530: 6e 73 20 63 6f 6d 6d 6f 6e 20 74 6f 20 61 6c 6c ns common to all
c540: 20 6c 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 linker versions
c550: 0a 6c 66 6c 61 67 73 09 3d 20 2d 6e 6f 6c 6f 67 .lflags.= -nolog
c560: 6f 20 2d 6d 61 63 68 69 6e 65 3a 24 28 4d 41 43 o -machine:$(MAC
c570: 48 49 4e 45 29 20 24 28 4c 49 4e 4b 45 52 46 4c HINE) $(LINKERFL
c580: 41 47 53 29 20 24 28 6c 64 65 62 75 67 29 0a 0a AGS) $(ldebug)..
c590: 21 69 66 20 24 28 4d 53 56 43 52 54 29 20 26 26 !if $(MSVCRT) &&
c5a0: 20 21 28 24 28 44 45 42 55 47 29 20 26 26 20 21 !($(DEBUG) && !
c5b0: 24 28 55 4e 43 48 45 43 4b 45 44 29 29 20 26 26 $(UNCHECKED)) &&
c5c0: 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d $(VCVERSION) >=
c5d0: 20 31 39 30 30 0a 6c 66 6c 61 67 73 09 3d 20 24 1900.lflags.= $
c5e0: 28 6c 66 6c 61 67 73 29 20 2d 6e 6f 64 65 66 61 (lflags) -nodefa
c5f0: 75 6c 74 6c 69 62 3a 6c 69 62 75 63 72 74 2e 6c ultlib:libucrt.l
c600: 69 62 0a 21 65 6e 64 69 66 0a 0a 64 6c 6c 6c 66 ib.!endif..dlllf
c610: 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 lags = $(lflags)
c620: 20 2d 64 6c 6c 0a 63 6f 6e 6c 66 6c 61 67 73 20 -dll.conlflags
c630: 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 73 75 62 = $(lflags) -sub
c640: 73 79 73 74 65 6d 3a 63 6f 6e 73 6f 6c 65 0a 67 system:console.g
c650: 75 69 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c uilflags = $(lfl
c660: 61 67 73 29 20 2d 73 75 62 73 79 73 74 65 6d 3a ags) -subsystem:
c670: 77 69 6e 64 6f 77 73 0a 0a 23 20 4c 69 62 72 61 windows..# Libra
c680: 72 69 65 73 20 74 68 61 74 20 61 72 65 20 72 65 ries that are re
c690: 71 75 69 72 65 64 20 66 6f 72 20 65 76 65 72 79 quired for every
c6a0: 20 69 6d 61 67 65 2e 0a 23 20 45 78 74 65 6e 73 image..# Extens
c6b0: 69 6f 6e 73 20 73 68 6f 75 6c 64 20 64 65 66 69 ions should defi
c6c0: 6e 65 20 61 6e 79 20 61 64 64 69 74 69 6f 6e 61 ne any additiona
c6d0: 6c 20 6c 69 62 72 61 72 69 65 73 20 77 69 74 68 l libraries with
c6e0: 20 24 28 50 52 4a 5f 4c 49 42 53 29 0a 77 69 6e $(PRJ_LIBS).win
c6f0: 6c 69 62 73 20 20 20 3d 20 6b 65 72 6e 65 6c 33 libs = kernel3
c700: 32 2e 6c 69 62 20 61 64 76 61 70 69 33 32 2e 6c 2.lib advapi32.l
c710: 69 62 0a 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 ib..!if $(NEED_T
c720: 4b 29 0a 77 69 6e 6c 69 62 73 20 3d 20 24 28 77 K).winlibs = $(w
c730: 69 6e 6c 69 62 73 29 20 67 64 69 33 32 2e 6c 69 inlibs) gdi32.li
c740: 62 20 75 73 65 72 33 32 2e 6c 69 62 20 75 78 74 b user32.lib uxt
c750: 68 65 6d 65 2e 6c 69 62 0a 21 65 6e 64 69 66 0a heme.lib.!endif.
c760: 0a 23 20 41 76 6f 69 64 20 27 75 6e 72 65 73 6f .# Avoid 'unreso
c770: 6c 76 65 64 20 65 78 74 65 72 6e 61 6c 20 73 79 lved external sy
c780: 6d 62 6f 6c 20 5f 5f 73 65 63 75 72 69 74 79 5f mbol __security_
c790: 63 6f 6f 6b 69 65 27 20 65 72 72 6f 72 73 2e 0a cookie' errors..
c7a0: 23 20 63 2e 66 2e 20 68 74 74 70 3a 2f 2f 73 75 # c.f. http://su
c7b0: 70 70 6f 72 74 2e 6d 69 63 72 6f 73 6f 66 74 2e pport.microsoft.
c7c0: 63 6f 6d 2f 3f 69 64 3d 38 39 34 35 37 33 0a 21 com/?id=894573.!
c7d0: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
c7e0: 3d 3d 20 22 41 4d 44 36 34 22 0a 21 69 66 20 24 == "AMD64".!if $
c7f0: 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 33 (VCVERSION) > 13
c800: 39 39 20 26 26 20 24 28 56 43 56 45 52 53 49 4f 99 && $(VCVERSIO
c810: 4e 29 20 3c 20 31 35 30 30 0a 77 69 6e 6c 69 62 N) < 1500.winlib
c820: 73 20 20 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 s = $(winlibs)
c830: 20 62 75 66 66 65 72 6f 76 65 72 66 6c 6f 77 55 bufferoverflowU
c840: 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 21 65 6e 64 .lib.!endif.!end
c850: 69 66 0a 0a 62 61 73 65 6c 69 62 73 20 3d 20 24 if..baselibs = $
c860: 28 77 69 6e 6c 69 62 73 29 20 24 28 50 52 4a 5f (winlibs) $(PRJ_
c870: 4c 49 42 53 29 0a 0a 21 69 66 20 24 28 4d 53 56 LIBS)..!if $(MSV
c880: 43 52 54 29 20 26 26 20 21 28 24 28 44 45 42 55 CRT) && !($(DEBU
c890: 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b G) && !$(UNCHECK
c8a0: 45 44 29 29 20 26 26 20 24 28 56 43 56 45 52 53 ED)) && $(VCVERS
c8b0: 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0a 62 61 73 ION) >= 1900.bas
c8c0: 65 6c 69 62 73 20 20 20 3d 20 24 28 62 61 73 65 elibs = $(base
c8d0: 6c 69 62 73 29 20 75 63 72 74 2e 6c 69 62 0a 21 libs) ucrt.lib.!
c8e0: 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 endif..#########
c8f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c900: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c910: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c920: 23 23 23 23 23 23 23 0a 23 20 31 33 2e 20 44 65 #######.# 13. De
c930: 66 69 6e 65 20 73 74 61 6e 64 61 72 64 20 63 6f fine standard co
c940: 6d 6d 61 6e 64 73 2c 20 63 6f 6d 6d 6f 6e 20 6d mmands, common m
c950: 61 6b 65 20 74 61 72 67 65 74 73 20 61 6e 64 20 ake targets and
c960: 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 0a 0a implicit rules..
c970: 43 43 50 4b 47 43 4d 44 20 3d 20 24 28 63 63 33 CCPKGCMD = $(cc3
c980: 32 29 20 24 28 70 6b 67 63 66 6c 61 67 73 29 20 2) $(pkgcflags)
c990: 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0a -Fo$(TMP_DIR)^\.
c9a0: 43 43 41 50 50 43 4d 44 20 3d 20 24 28 63 63 33 CCAPPCMD = $(cc3
c9b0: 32 29 20 24 28 61 70 70 63 66 6c 61 67 73 29 20 2) $(appcflags)
c9c0: 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0a -Fo$(TMP_DIR)^\.
c9d0: 43 43 53 54 55 42 53 43 4d 44 20 3d 20 24 28 63 CCSTUBSCMD = $(c
c9e0: 63 33 32 29 20 24 28 73 74 75 62 73 63 66 6c 61 c32) $(stubscfla
c9f0: 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 gs) -Fo$(TMP_DIR
ca00: 29 5e 5c 0a 0a 4c 49 42 43 4d 44 20 3d 20 24 28 )^\..LIBCMD = $(
ca10: 6c 69 62 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 24 lib32) -nologo $
ca20: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6f (LINKERFLAGS) -o
ca30: 75 74 3a 24 40 0a 44 4c 4c 43 4d 44 20 3d 20 24 ut:$@.DLLCMD = $
ca40: 28 6c 69 6e 6b 33 32 29 20 24 28 64 6c 6c 6c 66 (link32) $(dlllf
ca50: 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 lags) -out:$@ $(
ca60: 62 61 73 65 6c 69 62 73 29 20 24 28 74 63 6c 6c baselibs) $(tcll
ca70: 69 62 73 29 20 24 28 74 6b 6c 69 62 73 29 0a 0a ibs) $(tklibs)..
ca80: 43 4f 4e 45 58 45 43 4d 44 20 3d 20 24 28 6c 69 CONEXECMD = $(li
ca90: 6e 6b 33 32 29 20 24 28 63 6f 6e 6c 66 6c 61 67 nk32) $(conlflag
caa0: 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 s) -out:$@ $(bas
cab0: 65 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 73 elibs) $(tcllibs
cac0: 29 20 24 28 74 6b 6c 69 62 73 29 0a 47 55 49 45 ) $(tklibs).GUIE
cad0: 58 45 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 XECMD = $(link32
cae0: 29 20 24 28 67 75 69 6c 66 6c 61 67 73 29 20 2d ) $(guilflags) -
caf0: 6f 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 62 out:$@ $(baselib
cb00: 73 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 28 s) $(tcllibs) $(
cb10: 74 6b 6c 69 62 73 29 0a 52 45 53 43 4d 44 20 20 tklibs).RESCMD
cb20: 3d 20 24 28 72 63 33 32 29 20 2d 66 6f 20 24 40 = $(rc32) -fo $@
cb30: 20 2d 72 20 2d 69 20 22 24 28 47 45 4e 45 52 49 -r -i "$(GENERI
cb40: 43 44 49 52 29 22 20 2d 69 20 22 24 28 54 4d 50 CDIR)" -i "$(TMP
cb50: 5f 44 49 52 29 22 20 5c 0a 09 20 20 20 20 24 28 _DIR)" \.. $(
cb60: 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 2f 44 TCL_INCLUDES) /D
cb70: 53 54 41 54 49 43 5f 42 55 49 4c 44 3d 24 28 53 STATIC_BUILD=$(S
cb80: 54 41 54 49 43 5f 42 55 49 4c 44 29 20 5c 0a 09 TATIC_BUILD) \..
cb90: 20 20 20 20 2f 44 44 45 42 55 47 3d 24 28 44 45 /DDEBUG=$(DE
cba0: 42 55 47 29 20 2d 64 20 55 4e 43 48 45 43 4b 45 BUG) -d UNCHECKE
cbb0: 44 3d 24 28 55 4e 43 48 45 43 4b 45 44 29 20 5c D=$(UNCHECKED) \
cbc0: 0a 09 20 20 20 20 2f 44 43 4f 4d 4d 41 56 45 52 .. /DCOMMAVER
cbd0: 53 49 4f 4e 3d 24 28 52 43 43 4f 4d 4d 41 56 45 SION=$(RCCOMMAVE
cbe0: 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 2f 44 RSION) \.. /D
cbf0: 44 4f 54 56 45 52 53 49 4f 4e 3d 5c 22 24 28 44 DOTVERSION=\"$(D
cc00: 4f 54 56 45 52 53 49 4f 4e 29 5c 22 20 5c 0a 09 OTVERSION)\" \..
cc10: 20 20 20 20 2f 44 56 45 52 53 49 4f 4e 3d 5c 22 /DVERSION=\"
cc20: 24 28 56 45 52 53 49 4f 4e 29 5c 22 20 5c 0a 09 $(VERSION)\" \..
cc30: 20 20 20 20 2f 44 53 55 46 58 3d 5c 22 24 28 53 /DSUFX=\"$(S
cc40: 55 46 58 29 5c 22 20 5c 0a 09 20 20 20 20 2f 44 UFX)\" \.. /D
cc50: 50 52 4f 4a 45 43 54 3d 5c 22 24 28 50 52 4f 4a PROJECT=\"$(PROJ
cc60: 45 43 54 29 5c 22 20 5c 0a 09 20 20 20 20 2f 44 ECT)\" \.. /D
cc70: 50 52 4a 4c 49 42 4e 41 4d 45 3d 5c 22 24 28 50 PRJLIBNAME=\"$(P
cc80: 52 4a 4c 49 42 4e 41 4d 45 29 5c 22 0a 0a 21 69 RJLIBNAME)\"..!i
cc90: 66 6e 64 65 66 20 44 45 46 41 55 4c 54 5f 42 55 fndef DEFAULT_BU
cca0: 49 4c 44 5f 54 41 52 47 45 54 0a 44 45 46 41 55 ILD_TARGET.DEFAU
ccb0: 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 20 LT_BUILD_TARGET
ccc0: 3d 20 24 28 50 52 4f 4a 45 43 54 29 0a 21 65 6e = $(PROJECT).!en
ccd0: 64 69 66 0a 0a 64 65 66 61 75 6c 74 2d 74 61 72 dif..default-tar
cce0: 67 65 74 3a 20 24 28 44 45 46 41 55 4c 54 5f 42 get: $(DEFAULT_B
ccf0: 55 49 4c 44 5f 54 41 52 47 45 54 29 0a 0a 21 69 UILD_TARGET)..!i
cd00: 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 f $(MULTIPLATFOR
cd10: 4d 5f 49 4e 53 54 41 4c 4c 29 0a 64 65 66 61 75 M_INSTALL).defau
cd20: 6c 74 2d 70 6b 67 69 6e 64 65 78 3a 0a 09 40 65 lt-pkgindex:..@e
cd30: 63 68 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 65 cho if {[package
cd40: 20 76 73 61 74 69 73 66 69 65 73 20 5b 70 61 63 vsatisfies [pac
cd50: 6b 61 67 65 20 70 72 6f 76 69 64 65 20 54 63 6c kage provide Tcl
cd60: 5d 20 39 2e 30 2d 5d 7d 20 7b 20 3e 20 24 28 4f ] 9.0-]} { > $(O
cd70: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
cd80: 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b .tcl..@echo pack
cd90: 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 age ifneeded $(P
cda0: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
cdb0: 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e ME) $(DOTVERSION
cdc0: 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c ) \.. [list l
cdd0: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 oad [file join $
cde0: 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f $dir $(PLATFORM_
cdf0: 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c IDENTIFY) $(PRJL
ce00: 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 IBNAME9)]] >> $(
ce10: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
ce20: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 65 x.tcl..@echo } e
ce30: 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 lse { >> $(OUT_D
ce40: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
ce50: 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 ..@echo package
ce60: 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 ifneeded $(PRJ_P
ce70: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 ACKAGE_TCLNAME)
ce80: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0a $(DOTVERSION) \.
ce90: 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 . [list load
cea0: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 [file join $$dir
ceb0: 20 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e $(PLATFORM_IDEN
cec0: 54 49 46 59 29 20 24 28 50 52 4a 4c 49 42 4e 41 TIFY) $(PRJLIBNA
ced0: 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f ME8)]] >> $(OUT_
cee0: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 DIR)\pkgIndex.tc
cef0: 6c 0a 09 40 65 63 68 6f 20 7d 20 3e 3e 20 24 28 l..@echo } >> $(
cf00: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
cf10: 78 2e 74 63 6c 0a 21 65 6c 73 65 0a 64 65 66 61 x.tcl.!else.defa
cf20: 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a 0a 09 40 ult-pkgindex:..@
cf30: 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 echo if {[packag
cf40: 65 20 76 73 61 74 69 73 66 69 65 73 20 5b 70 61 e vsatisfies [pa
cf50: 63 6b 61 67 65 20 70 72 6f 76 69 64 65 20 54 63 ckage provide Tc
cf60: 6c 5d 20 39 2e 30 2d 5d 7d 20 7b 20 3e 20 24 28 l] 9.0-]} { > $(
cf70: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
cf80: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 x.tcl..@echo pac
cf90: 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 kage ifneeded $(
cfa0: 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e PRJ_PACKAGE_TCLN
cfb0: 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f AME) $(DOTVERSIO
cfc0: 4e 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 N) \.. [list
cfd0: 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 load [file join
cfe0: 24 24 64 69 72 20 24 28 50 52 4a 4c 49 42 4e 41 $$dir $(PRJLIBNA
cff0: 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f ME9)]] >> $(OUT_
d000: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 DIR)\pkgIndex.tc
d010: 6c 0a 09 40 65 63 68 6f 20 7d 20 65 6c 73 65 20 l..@echo } else
d020: 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c { >> $(OUT_DIR)\
d030: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 pkgIndex.tcl..@e
d040: 63 68 6f 20 70 61 63 6b 61 67 65 20 69 66 6e 65 cho package ifne
d050: 65 64 65 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 eded $(PRJ_PACKA
d060: 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f GE_TCLNAME) $(DO
d070: 54 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 TVERSION) \..
d080: 20 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c [list load [fil
d090: 65 20 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 50 e join $$dir $(P
d0a0: 52 4a 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e RJLIBNAME8)]] >>
d0b0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
d0c0: 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 ndex.tcl..@echo
d0d0: 7d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c } >> $(OUT_DIR)\
d0e0: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 21 65 6e pkgIndex.tcl.!en
d0f0: 64 69 66 0a 0a 64 65 66 61 75 6c 74 2d 70 6b 67 dif..default-pkg
d100: 69 6e 64 65 78 2d 74 65 61 3a 0a 09 40 69 66 20 index-tea:..@if
d110: 65 78 69 73 74 20 24 28 52 4f 4f 54 29 5c 70 6b exist $(ROOT)\pk
d120: 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e 20 6e 6d gIndex.tcl.in nm
d130: 61 6b 65 68 6c 70 20 2d 73 20 3c 3c 20 24 28 52 akehlp -s << $(R
d140: 4f 4f 54 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 OOT)\pkgIndex.tc
d150: 6c 2e 69 6e 20 3e 20 24 28 4f 55 54 5f 44 49 52 l.in > $(OUT_DIR
d160: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 40 )\pkgIndex.tcl.@
d170: 50 41 43 4b 41 47 45 5f 56 45 52 53 49 4f 4e 40 PACKAGE_VERSION@
d180: 20 20 20 20 24 28 44 4f 54 56 45 52 53 49 4f 4e $(DOTVERSION
d190: 29 0a 40 50 41 43 4b 41 47 45 5f 4e 41 4d 45 40 ).@PACKAGE_NAME@
d1a0: 20 20 20 20 20 20 20 24 28 50 52 4a 5f 50 41 43 $(PRJ_PAC
d1b0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 KAGE_TCLNAME).@P
d1c0: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 40 20 ACKAGE_TCLNAME@
d1d0: 20 20 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 $(PRJ_PACKAGE
d1e0: 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c _TCLNAME).@PKG_L
d1f0: 49 42 5f 46 49 4c 45 40 20 20 20 20 20 20 20 24 IB_FILE@ $
d200: 28 50 52 4a 4c 49 42 4e 41 4d 45 29 0a 40 50 4b (PRJLIBNAME).@PK
d210: 47 5f 4c 49 42 5f 46 49 4c 45 38 40 20 20 20 20 G_LIB_FILE8@
d220: 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 $(PRJLIBNAME8)
d230: 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 39 40 .@PKG_LIB_FILE9@
d240: 20 20 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 $(PRJLIBNA
d250: 4d 45 39 29 0a 3c 3c 0a 0a 64 65 66 61 75 6c 74 ME9).<<..default
d260: 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c -install: defaul
d270: 74 2d 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 t-install-binari
d280: 65 73 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 es default-insta
d290: 6c 6c 2d 6c 69 62 72 61 72 69 65 73 0a 21 69 66 ll-libraries.!if
d2a0: 20 24 28 53 59 4d 42 4f 4c 53 29 0a 64 65 66 61 $(SYMBOLS).defa
d2b0: 75 6c 74 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 66 ult-install: def
d2c0: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 ault-install-pdb
d2d0: 73 0a 21 65 6e 64 69 66 0a 0a 23 20 41 67 61 69 s.!endif..# Agai
d2e0: 6e 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 68 n to deal with h
d2f0: 69 73 74 6f 72 69 63 61 6c 20 62 72 6f 6b 65 6e istorical broken
d300: 6e 65 73 73 2c 20 74 68 65 72 65 20 69 73 20 73 ness, there is s
d310: 6f 6d 65 20 63 6f 6e 66 75 73 69 6f 6e 0a 23 20 ome confusion.#
d320: 69 6e 20 74 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 in terminlogy. F
d330: 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 74 or extensions, t
d340: 68 65 20 22 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 he "install-bina
d350: 72 69 65 73 22 20 77 61 73 20 75 73 65 64 20 74 ries" was used t
d360: 6f 0a 23 20 6c 6f 63 61 74 65 20 74 61 72 67 65 o.# locate targe
d370: 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 t directory for
d380: 2a 62 69 6e 61 72 79 20 73 68 61 72 65 64 20 6c *binary shared l
d390: 69 62 72 61 72 69 65 73 2a 20 61 6e 64 20 74 68 ibraries* and th
d3a0: 75 73 0a 23 20 74 68 65 20 61 70 70 72 6f 70 72 us.# the appropr
d3b0: 69 61 74 65 20 6d 61 63 72 6f 20 69 73 20 4c 49 iate macro is LI
d3c0: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 73 69 B_INSTALL_DIR si
d3d0: 6e 63 65 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f nce BIN_INSTALL_
d3e0: 44 49 52 20 69 73 0a 23 20 66 6f 72 20 65 78 65 DIR is.# for exe
d3f0: 63 75 74 61 62 6c 65 73 20 28 65 78 65 73 29 2e cutables (exes).
d400: 20 4f 6e 20 74 68 65 20 6f 74 68 65 72 20 68 61 On the other ha
d410: 6e 64 20 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d nd the "install-
d420: 6c 69 62 72 61 72 69 65 73 22 0a 23 20 74 61 72 libraries".# tar
d430: 67 65 74 20 69 73 20 66 6f 72 20 2a 73 63 72 69 get is for *scri
d440: 70 74 73 2a 20 61 6e 64 20 73 68 6f 75 6c 64 20 pts* and should
d450: 68 61 76 65 20 62 65 65 6e 20 63 61 6c 6c 65 64 have been called
d460: 20 22 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 "install-script
d470: 73 22 2e 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 s"..default-inst
d480: 61 6c 6c 2d 62 69 6e 61 72 69 65 73 3a 20 24 28 all-binaries: $(
d490: 50 52 4a 4c 49 42 29 0a 09 40 65 63 68 6f 20 49 PRJLIB)..@echo I
d4a0: 6e 73 74 61 6c 6c 69 6e 67 20 62 69 6e 61 72 69 nstalling binari
d4b0: 65 73 20 74 6f 20 27 24 28 4c 49 42 5f 49 4e 53 es to '$(LIB_INS
d4c0: 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 66 20 TALL_DIR)'..@if
d4d0: 6e 6f 74 20 65 78 69 73 74 20 22 24 28 4c 49 42 not exist "$(LIB
d4e0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d _INSTALL_DIR)" m
d4f0: 6b 64 69 72 20 22 24 28 4c 49 42 5f 49 4e 53 54 kdir "$(LIB_INST
d500: 41 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 43 50 ALL_DIR)"..@$(CP
d510: 59 29 20 24 28 50 52 4a 4c 49 42 29 20 22 24 28 Y) $(PRJLIB) "$(
d520: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 LIB_INSTALL_DIR)
d530: 22 20 3e 4e 55 4c 0a 0a 23 20 41 6c 69 61 73 20 " >NUL..# Alias
d540: 66 6f 72 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 for default-inst
d550: 61 6c 6c 2d 73 63 72 69 70 74 73 0a 64 65 66 61 all-scripts.defa
d560: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 ult-install-libr
d570: 61 72 69 65 73 3a 20 64 65 66 61 75 6c 74 2d 69 aries: default-i
d580: 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 0a 0a nstall-scripts..
d590: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d5a0: 73 63 72 69 70 74 73 3a 20 24 28 4f 55 54 5f 44 scripts: $(OUT_D
d5b0: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d5c0: 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 ..@echo Installi
d5d0: 6e 67 20 6c 69 62 72 61 72 69 65 73 20 74 6f 20 ng libraries to
d5e0: 27 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c '$(SCRIPT_INSTAL
d5f0: 4c 5f 44 49 52 29 27 0a 09 40 69 66 20 65 78 69 L_DIR)'..@if exi
d600: 73 74 20 24 28 4c 49 42 44 49 52 29 20 24 28 43 st $(LIBDIR) $(C
d610: 50 59 29 20 24 28 4c 49 42 44 49 52 29 5c 2a 2e PY) $(LIBDIR)\*.
d620: 74 63 6c 20 22 24 28 53 43 52 49 50 54 5f 49 4e tcl "$(SCRIPT_IN
d630: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 65 63 STALL_DIR)"..@ec
d640: 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 70 61 ho Installing pa
d650: 63 6b 61 67 65 20 69 6e 64 65 78 20 69 6e 20 27 ckage index in '
d660: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
d670: 5f 44 49 52 29 27 0a 09 40 24 28 43 50 59 29 20 _DIR)'..@$(CPY)
d680: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
d690: 64 65 78 2e 74 63 6c 20 24 28 53 43 52 49 50 54 dex.tcl $(SCRIPT
d6a0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 0a 64 _INSTALL_DIR)..d
d6b0: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 efault-install-s
d6c0: 74 75 62 73 3a 0a 09 40 65 63 68 6f 20 49 6e 73 tubs:..@echo Ins
d6d0: 74 61 6c 6c 69 6e 67 20 73 74 75 62 73 20 6c 69 talling stubs li
d6e0: 62 72 61 72 79 20 74 6f 20 27 24 28 53 43 52 49 brary to '$(SCRI
d6f0: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 PT_INSTALL_DIR)'
d700: 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 ..@if not exist
d710: 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c "$(SCRIPT_INSTAL
d720: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
d730: 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f (SCRIPT_INSTALL_
d740: 44 49 52 29 22 0a 09 40 24 28 43 50 59 29 20 24 DIR)"..@$(CPY) $
d750: 28 50 52 4a 53 54 55 42 4c 49 42 29 20 22 24 28 (PRJSTUBLIB) "$(
d760: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
d770: 49 52 29 22 20 3e 4e 55 4c 0a 0a 64 65 66 61 75 IR)" >NUL..defau
d780: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 3a lt-install-pdbs:
d790: 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 ..@echo Installi
d7a0: 6e 67 20 50 44 42 73 20 74 6f 20 27 24 28 4c 49 ng PDBs to '$(LI
d7b0: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a B_INSTALL_DIR)'.
d7c0: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 .@if not exist "
d7d0: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
d7e0: 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c 49 42 R)" mkdir "$(LIB
d7f0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 _INSTALL_DIR)"..
d800: 40 24 28 43 50 59 29 20 22 24 28 4f 55 54 5f 44 @$(CPY) "$(OUT_D
d810: 49 52 29 5c 2a 2e 70 64 62 22 20 22 24 28 4c 49 IR)\*.pdb" "$(LI
d820: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 22 B_INSTALL_DIR)\"
d830: 0a 0a 23 20 22 65 6d 61 63 73 20 66 6f 6e 74 2d ..# "emacs font-
d840: 6c 6f 63 6b 20 68 69 67 68 6c 69 67 68 74 69 6e lock highlightin
d850: 67 20 66 69 78 0a 0a 64 65 66 61 75 6c 74 2d 69 g fix..default-i
d860: 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d 68 74 6d 6c nstall-docs-html
d870: 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c :..@echo Install
d880: 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f ing documentatio
d890: 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 28 44 4f n files to '$(DO
d8a0: 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a C_INSTALL_DIR)'.
d8b0: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 .@if not exist "
d8c0: 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(DOC_INSTALL_DI
d8d0: 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 R)" mkdir "$(DOC
d8e0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 _INSTALL_DIR)"..
d8f0: 40 69 66 20 65 78 69 73 74 20 24 28 44 4f 43 44 @if exist $(DOCD
d900: 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22 IR) for %f in ("
d910: 24 28 44 4f 43 44 49 52 29 5c 2a 2e 68 74 6d 6c $(DOCDIR)\*.html
d920: 22 20 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 63 " "$(DOCDIR)\*.c
d930: 73 73 22 20 22 24 28 44 4f 43 44 49 52 29 5c 2a ss" "$(DOCDIR)\*
d940: 2e 70 6e 67 22 29 20 64 6f 20 40 24 28 43 4f 50 .png") do @$(COP
d950: 59 29 20 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 Y) %f "$(DOC_INS
d960: 54 41 4c 4c 5f 44 49 52 29 22 0a 0a 64 65 66 61 TALL_DIR)"..defa
d970: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 ult-install-docs
d980: 2d 6e 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 -n:..@echo Insta
d990: 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 lling documentat
d9a0: 69 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 28 ion files to '$(
d9b0: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 DOC_INSTALL_DIR)
d9c0: 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 '..@if not exist
d9d0: 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f "$(DOC_INSTALL_
d9e0: 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 DIR)" mkdir "$(D
d9f0: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 OC_INSTALL_DIR)"
da00: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 44 4f ..@if exist $(DO
da10: 43 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 CDIR) for %f in
da20: 28 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 6e 22 ("$(DOCDIR)\*.n"
da30: 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66 ) do @$(COPY) %f
da40: 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f "$(DOC_INSTALL_
da50: 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d 69 DIR)"..default-i
da60: 6e 73 74 61 6c 6c 2d 64 65 6d 6f 73 3a 0a 09 40 nstall-demos:..@
da70: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
da80: 64 65 6d 6f 73 20 74 6f 20 27 24 28 44 45 4d 4f demos to '$(DEMO
da90: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 _INSTALL_DIR)'..
daa0: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 @if not exist "$
dab0: 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 (DEMO_INSTALL_DI
dac0: 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 45 4d R)" mkdir "$(DEM
dad0: 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a O_INSTALL_DIR)".
dae0: 09 40 69 66 20 65 78 69 73 74 20 24 28 44 45 4d .@if exist $(DEM
daf0: 4f 44 49 52 29 20 24 28 43 50 59 44 49 52 29 20 ODIR) $(CPYDIR)
db00: 22 24 28 44 45 4d 4f 44 49 52 29 22 20 22 24 28 "$(DEMODIR)" "$(
db10: 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DEMO_INSTALL_DIR
db20: 29 22 0a 0a 64 65 66 61 75 6c 74 2d 63 6c 65 61 )"..default-clea
db30: 6e 3a 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 n:..@echo Cleani
db40: 6e 67 20 24 28 54 4d 50 5f 44 49 52 29 5c 2a 20 ng $(TMP_DIR)\*
db50: 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
db60: 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 24 28 (TMP_DIR)\nul $(
db70: 52 4d 44 49 52 29 20 24 28 54 4d 50 5f 44 49 52 RMDIR) $(TMP_DIR
db80: 29 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e )..@echo Cleanin
db90: 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 g $(WIN_DIR)\nma
dba0: 6b 65 68 6c 70 2e 6f 62 6a 2c 20 6e 6d 61 6b 65 kehlp.obj, nmake
dbb0: 68 6c 70 2e 65 78 65 20 2e 2e 2e 0a 09 40 69 66 hlp.exe .....@if
dbc0: 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 exist $(WIN_DIR
dbd0: 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 20 64 )\nmakehlp.obj d
dbe0: 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d el $(WIN_DIR)\nm
dbf0: 61 6b 65 68 6c 70 2e 6f 62 6a 0a 09 40 69 66 20 akehlp.obj..@if
dc00: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
dc10: 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 20 64 65 \nmakehlp.exe de
dc20: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 l $(WIN_DIR)\nma
dc30: 6b 65 68 6c 70 2e 65 78 65 0a 09 40 69 66 20 65 kehlp.exe..@if e
dc40: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
dc50: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 20 64 65 6c nmakehlp.out del
dc60: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b $(WIN_DIR)\nmak
dc70: 65 68 6c 70 2e 6f 75 74 0a 09 40 65 63 68 6f 20 ehlp.out..@echo
dc80: 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 Cleaning $(WIN_D
dc90: 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 IR)\nmhlp-out.tx
dca0: 74 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 t .....@if exist
dcb0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c $(WIN_DIR)\nmhl
dcc0: 70 2d 6f 75 74 2e 74 78 74 20 64 65 6c 20 24 28 p-out.txt del $(
dcd0: 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f WIN_DIR)\nmhlp-o
dce0: 75 74 2e 74 78 74 0a 09 40 65 63 68 6f 20 43 6c ut.txt..@echo Cl
dcf0: 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 eaning $(WIN_DIR
dd00: 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 2e 2e 2e 0a )\_junk.pch ....
dd10: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
dd20: 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 _DIR)\_junk.pch
dd30: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f del $(WIN_DIR)\_
dd40: 6a 75 6e 6b 2e 70 63 68 0a 09 40 65 63 68 6f 20 junk.pch..@echo
dd50: 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 Cleaning $(WIN_D
dd60: 49 52 29 5c 76 65 72 63 6c 2e 78 2c 20 76 65 72 IR)\vercl.x, ver
dd70: 63 6c 2e 69 20 2e 2e 2e 0a 09 40 69 66 20 65 78 cl.i .....@if ex
dd80: 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 ist $(WIN_DIR)\v
dd90: 65 72 63 6c 2e 78 20 64 65 6c 20 24 28 57 49 4e ercl.x del $(WIN
dda0: 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 0a 09 40 _DIR)\vercl.x..@
ddb0: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 if exist $(WIN_D
ddc0: 49 52 29 5c 76 65 72 63 6c 2e 69 20 64 65 6c 20 IR)\vercl.i del
ddd0: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c $(WIN_DIR)\vercl
dde0: 2e 69 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 .i..@echo Cleani
ddf0: 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 ng $(WIN_DIR)\ve
de00: 72 73 69 6f 6e 73 2e 76 63 2c 20 76 65 72 73 69 rsions.vc, versi
de10: 6f 6e 2e 76 63 20 2e 2e 2e 0a 09 40 69 66 20 65 on.vc .....@if e
de20: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
de30: 76 65 72 73 69 6f 6e 73 2e 76 63 20 64 65 6c 20 versions.vc del
de40: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 $(WIN_DIR)\versi
de50: 6f 6e 73 2e 76 63 0a 09 40 69 66 20 65 78 69 73 ons.vc..@if exis
de60: 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 t $(WIN_DIR)\ver
de70: 73 69 6f 6e 2e 76 63 20 64 65 6c 20 24 28 57 49 sion.vc del $(WI
de80: 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 2e 76 N_DIR)\version.v
de90: 63 0a 0a 64 65 66 61 75 6c 74 2d 68 6f 73 65 3a c..default-hose:
dea0: 20 64 65 66 61 75 6c 74 2d 63 6c 65 61 6e 0a 09 default-clean..
deb0: 40 65 63 68 6f 20 48 6f 73 69 6e 67 20 24 28 4f @echo Hosing $(O
dec0: 55 54 5f 44 49 52 29 5c 2a 20 2e 2e 2e 0a 09 40 UT_DIR)\* .....@
ded0: 69 66 20 65 78 69 73 74 20 24 28 4f 55 54 5f 44 if exist $(OUT_D
dee0: 49 52 29 5c 6e 75 6c 20 24 28 52 4d 44 49 52 29 IR)\nul $(RMDIR)
def0: 20 24 28 4f 55 54 5f 44 49 52 29 0a 0a 23 20 4f $(OUT_DIR)..# O
df00: 6e 6c 79 20 66 6f 72 20 62 61 63 6b 77 61 72 64 nly for backward
df10: 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 0a 64 compatibility.d
df20: 65 66 61 75 6c 74 2d 64 69 73 74 63 6c 65 61 6e efault-distclean
df30: 3a 20 64 65 66 61 75 6c 74 2d 68 6f 73 65 0a 0a : default-hose..
df40: 64 65 66 61 75 6c 74 2d 73 65 74 75 70 3a 0a 09 default-setup:..
df50: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 @if not exist $(
df60: 4f 55 54 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 OUT_DIR)\nul mkd
df70: 69 72 20 24 28 4f 55 54 5f 44 49 52 29 0a 09 40 ir $(OUT_DIR)..@
df80: 69 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 54 if not exist $(T
df90: 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 69 MP_DIR)\nul mkdi
dfa0: 72 20 24 28 54 4d 50 5f 44 49 52 29 0a 0a 21 69 r $(TMP_DIR)..!i
dfb0: 66 20 22 24 28 54 45 53 54 50 41 54 29 22 20 21 f "$(TESTPAT)" !
dfc0: 3d 20 22 22 0a 54 45 53 54 46 4c 41 47 53 20 3d = "".TESTFLAGS =
dfd0: 20 24 28 54 45 53 54 46 4c 41 47 53 29 20 2d 66 $(TESTFLAGS) -f
dfe0: 69 6c 65 20 24 28 54 45 53 54 50 41 54 29 0a 21 ile $(TESTPAT).!
dff0: 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 2d 74 endif..default-t
e000: 65 73 74 3a 20 64 65 66 61 75 6c 74 2d 73 65 74 est: default-set
e010: 75 70 20 24 28 50 52 4f 4a 45 43 54 29 0a 09 40 up $(PROJECT)..@
e020: 73 65 74 20 54 43 4c 4c 49 42 50 41 54 48 3d 24 set TCLLIBPATH=$
e030: 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f 29 0a 09 40 (OUT_DIR:\=/)..@
e040: 69 66 20 65 78 69 73 74 20 24 28 4c 49 42 44 49 if exist $(LIBDI
e050: 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22 24 R) for %f in ("$
e060: 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 6c 22 29 (LIBDIR)\*.tcl")
e070: 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66 20 do @$(COPY) %f
e080: 22 24 28 4f 55 54 5f 44 49 52 29 22 0a 09 63 64 "$(OUT_DIR)"..cd
e090: 20 22 24 28 54 45 53 54 44 49 52 29 22 20 26 26 "$(TESTDIR)" &&
e0a0: 20 24 28 44 45 42 55 47 47 45 52 29 20 24 28 54 $(DEBUGGER) $(T
e0b0: 43 4c 53 48 29 20 61 6c 6c 2e 74 63 6c 20 24 28 CLSH) all.tcl $(
e0c0: 54 45 53 54 46 4c 41 47 53 29 0a 0a 64 65 66 61 TESTFLAGS)..defa
e0d0: 75 6c 74 2d 73 68 65 6c 6c 3a 20 64 65 66 61 75 ult-shell: defau
e0e0: 6c 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 lt-setup $(PROJE
e0f0: 43 54 29 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 CT)..@set TCLLIB
e100: 50 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c PATH=$(OUT_DIR:\
e110: 3d 2f 29 0a 09 40 69 66 20 65 78 69 73 74 20 24 =/)..@if exist $
e120: 28 4c 49 42 44 49 52 29 20 66 6f 72 20 25 66 20 (LIBDIR) for %f
e130: 69 6e 20 28 22 24 28 4c 49 42 44 49 52 29 5c 2a in ("$(LIBDIR)\*
e140: 2e 74 63 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 .tcl") do @$(COP
e150: 59 29 20 25 66 20 22 24 28 4f 55 54 5f 44 49 52 Y) %f "$(OUT_DIR
e160: 29 22 0a 09 24 28 44 45 42 55 47 47 45 52 29 20 )"..$(DEBUGGER)
e170: 24 28 54 43 4c 53 48 29 0a 0a 23 20 47 65 6e 65 $(TCLSH)..# Gene
e180: 72 61 74 69 6f 6e 20 6f 66 20 57 69 6e 64 6f 77 ration of Window
e190: 73 20 76 65 72 73 69 6f 6e 20 72 65 73 6f 75 72 s version resour
e1a0: 63 65 0a 21 69 66 64 65 66 20 52 43 46 49 4c 45 ce.!ifdef RCFILE
e1b0: 0a 0a 23 20 4e 6f 74 65 3a 20 64 6f 6e 27 74 20 ..# Note: don't
e1c0: 75 73 65 20 24 2a 2a 20 69 6e 20 62 65 6c 6f 77 use $** in below
e1d0: 20 72 75 6c 65 20 62 65 63 61 75 73 65 20 74 68 rule because th
e1e0: 65 72 65 20 6d 61 79 20 62 65 20 6f 74 68 65 72 ere may be other
e1f0: 20 64 65 70 65 6e 64 65 6e 63 69 65 73 0a 23 20 dependencies.#
e200: 61 6e 64 20 6f 6e 6c 79 20 74 68 65 20 22 6d 61 and only the "ma
e210: 69 6e 22 20 72 63 20 6d 75 73 74 20 62 65 20 70 in" rc must be p
e220: 61 73 73 65 64 20 74 6f 20 74 68 65 20 72 65 73 assed to the res
e230: 6f 75 72 63 65 20 63 6f 6d 70 69 6c 65 72 0a 24 ource compiler.$
e240: 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a (TMP_DIR)\$(PROJ
e250: 45 43 54 29 2e 72 65 73 3a 20 24 28 52 43 44 49 ECT).res: $(RCDI
e260: 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 R)\$(PROJECT).rc
e270: 0a 09 24 28 52 45 53 43 4d 44 29 20 24 28 52 43 ..$(RESCMD) $(RC
e280: 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e DIR)\$(PROJECT).
e290: 72 63 0a 0a 21 65 6c 73 65 0a 0a 23 20 49 66 20 rc..!else..# If
e2a0: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 parent makefile
e2b0: 68 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 has not defined
e2c0: 61 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 6e a resource defin
e2d0: 69 74 69 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 65 ition file,.# we
e2e0: 20 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f will generate o
e2f0: 6e 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 64 ne from standard
e300: 20 74 65 6d 70 6c 61 74 65 2e 0a 24 28 54 4d 50 template..$(TMP
e310: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
e320: 2e 72 65 73 3a 20 24 28 54 4d 50 5f 44 49 52 29 .res: $(TMP_DIR)
e330: 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0a 0a \$(PROJECT).rc..
e340: 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f $(TMP_DIR)\$(PRO
e350: 4a 45 43 54 29 2e 72 63 3a 0a 09 40 24 28 43 4f JECT).rc:..@$(CO
e360: 50 59 29 20 3c 3c 20 24 28 54 4d 50 5f 44 49 52 PY) << $(TMP_DIR
e370: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0a )\$(PROJECT).rc.
e380: 23 69 6e 63 6c 75 64 65 20 3c 77 69 6e 76 65 72 #include <winver
e390: 2e 68 3e 0a 0a 56 53 5f 56 45 52 53 49 4f 4e 5f .h>..VS_VERSION_
e3a0: 49 4e 46 4f 20 56 45 52 53 49 4f 4e 49 4e 46 4f INFO VERSIONINFO
e3b0: 0a 20 46 49 4c 45 56 45 52 53 49 4f 4e 09 43 4f . FILEVERSION.CO
e3c0: 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 50 52 4f 44 MMAVERSION. PROD
e3d0: 55 43 54 56 45 52 53 49 4f 4e 09 43 4f 4d 4d 41 UCTVERSION.COMMA
e3e0: 56 45 52 53 49 4f 4e 0a 20 46 49 4c 45 46 4c 41 VERSION. FILEFLA
e3f0: 47 53 4d 41 53 4b 09 30 78 33 66 4c 0a 23 69 66 GSMASK.0x3fL.#if
e400: 64 65 66 20 44 45 42 55 47 0a 20 46 49 4c 45 46 def DEBUG. FILEF
e410: 4c 41 47 53 09 56 53 5f 46 46 5f 44 45 42 55 47 LAGS.VS_FF_DEBUG
e420: 0a 23 65 6c 73 65 0a 20 46 49 4c 45 46 4c 41 47 .#else. FILEFLAG
e430: 53 09 30 78 30 4c 0a 23 65 6e 64 69 66 0a 20 46 S.0x0L.#endif. F
e440: 49 4c 45 4f 53 09 09 56 4f 53 5f 4e 54 5f 57 49 ILEOS..VOS_NT_WI
e450: 4e 44 4f 57 53 33 32 0a 20 46 49 4c 45 54 59 50 NDOWS32. FILETYP
e460: 45 09 56 46 54 5f 44 4c 4c 0a 20 46 49 4c 45 53 E.VFT_DLL. FILES
e470: 55 42 54 59 50 45 09 30 78 30 4c 0a 42 45 47 49 UBTYPE.0x0L.BEGI
e480: 4e 0a 20 20 20 20 42 4c 4f 43 4b 20 22 53 74 72 N. BLOCK "Str
e490: 69 6e 67 46 69 6c 65 49 6e 66 6f 22 0a 20 20 20 ingFileInfo".
e4a0: 20 42 45 47 49 4e 0a 20 20 20 20 20 20 20 20 42 BEGIN. B
e4b0: 4c 4f 43 4b 20 22 30 34 30 39 30 34 62 30 22 0a LOCK "040904b0".
e4c0: 20 20 20 20 20 20 20 20 42 45 47 49 4e 0a 20 20 BEGIN.
e4d0: 20 20 20 20 20 20 20 20 20 20 56 41 4c 55 45 20 VALUE
e4e0: 22 46 69 6c 65 44 65 73 63 72 69 70 74 69 6f 6e "FileDescription
e4f0: 22 2c 20 20 22 54 63 6c 20 65 78 74 65 6e 73 69 ", "Tcl extensi
e500: 6f 6e 20 22 20 50 52 4f 4a 45 43 54 0a 20 20 20 on " PROJECT.
e510: 20 20 20 20 20 20 20 20 20 56 41 4c 55 45 20 22 VALUE "
e520: 4f 72 69 67 69 6e 61 6c 46 69 6c 65 6e 61 6d 65 OriginalFilename
e530: 22 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 0a 20 20 ", PRJLIBNAME.
e540: 20 20 20 20 20 20 20 20 20 20 56 41 4c 55 45 20 VALUE
e550: 22 46 69 6c 65 56 65 72 73 69 6f 6e 22 2c 20 20 "FileVersion",
e560: 20 20 20 20 44 4f 54 56 45 52 53 49 4f 4e 0a 20 DOTVERSION.
e570: 20 20 20 20 20 20 20 20 20 20 20 56 41 4c 55 45 VALUE
e580: 20 22 50 72 6f 64 75 63 74 4e 61 6d 65 22 2c 20 "ProductName",
e590: 20 20 20 20 20 22 50 61 63 6b 61 67 65 20 22 20 "Package "
e5a0: 50 52 4f 4a 45 43 54 20 22 20 66 6f 72 20 54 63 PROJECT " for Tc
e5b0: 6c 22 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 l". V
e5c0: 41 4c 55 45 20 22 50 72 6f 64 75 63 74 56 65 72 ALUE "ProductVer
e5d0: 73 69 6f 6e 22 2c 20 20 20 44 4f 54 56 45 52 53 sion", DOTVERS
e5e0: 49 4f 4e 0a 20 20 20 20 20 20 20 20 45 4e 44 0a ION. END.
e5f0: 20 20 20 20 45 4e 44 0a 20 20 20 20 42 4c 4f 43 END. BLOC
e600: 4b 20 22 56 61 72 46 69 6c 65 49 6e 66 6f 22 0a K "VarFileInfo".
e610: 20 20 20 20 42 45 47 49 4e 0a 20 20 20 20 20 20 BEGIN.
e620: 20 20 56 41 4c 55 45 20 22 54 72 61 6e 73 6c 61 VALUE "Transla
e630: 74 69 6f 6e 22 2c 20 30 78 34 30 39 2c 20 31 32 tion", 0x409, 12
e640: 30 30 0a 20 20 20 20 45 4e 44 0a 45 4e 44 0a 0a 00. END.END..
e650: 3c 3c 0a 0a 21 65 6e 64 69 66 20 23 20 69 66 64 <<..!endif # ifd
e660: 65 66 20 52 43 46 49 4c 45 0a 0a 21 69 66 6e 64 ef RCFILE..!ifnd
e670: 65 66 20 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 ef DISABLE_IMPLI
e680: 43 49 54 5f 52 55 4c 45 53 0a 44 49 53 41 42 4c CIT_RULES.DISABL
e690: 45 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 E_IMPLICIT_RULES
e6a0: 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 = 0.!endif..!if
e6b0: 20 21 24 28 44 49 53 41 42 4c 45 5f 49 4d 50 4c !$(DISABLE_IMPL
e6c0: 49 43 49 54 5f 52 55 4c 45 53 29 0a 23 20 49 6d ICIT_RULES).# Im
e6d0: 70 6c 69 63 69 74 20 72 75 6c 65 20 64 65 66 69 plicit rule defi
e6e0: 6e 69 74 69 6f 6e 73 20 2d 20 6f 6e 6c 79 20 66 nitions - only f
e6f0: 6f 72 20 62 75 69 6c 64 69 6e 67 20 6c 69 62 72 or building libr
e700: 61 72 79 20 6f 62 6a 65 63 74 73 2e 20 46 6f 72 ary objects. For
e710: 20 73 74 75 62 73 20 61 6e 64 0a 23 20 6d 61 69 stubs and.# mai
e720: 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 2c 20 74 n application, t
e730: 68 65 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f 75 he makefile shou
e740: 6c 64 20 64 65 66 69 6e 65 20 65 78 70 6c 69 63 ld define explic
e750: 69 74 20 72 75 6c 65 73 2e 0a 0a 7b 24 28 52 4f it rules...{$(RO
e760: 4f 54 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 OT)}.c{$(TMP_DIR
e770: 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b )}.obj::..$(CCPK
e780: 47 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a GCMD) @<<.$<.<<.
e790: 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d 2e 63 7b .{$(WIN_DIR)}.c{
e7a0: 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a $(TMP_DIR)}.obj:
e7b0: 3a 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 20 40 :..$(CCPKGCMD) @
e7c0: 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 47 45 4e <<.$<.<<..{$(GEN
e7d0: 45 52 49 43 44 49 52 29 7d 2e 63 7b 24 28 54 4d ERICDIR)}.c{$(TM
e7e0: 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 P_DIR)}.obj::..$
e7f0: 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 (CCPKGCMD) @<<.$
e800: 3c 0a 3c 3c 0a 0a 7b 24 28 43 4f 4d 50 41 54 44 <.<<..{$(COMPATD
e810: 49 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 IR)}.c{$(TMP_DIR
e820: 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b )}.obj::..$(CCPK
e830: 47 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a GCMD) @<<.$<.<<.
e840: 0a 7b 24 28 52 43 44 49 52 29 7d 2e 72 63 7b 24 .{$(RCDIR)}.rc{$
e850: 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0a (TMP_DIR)}.res:.
e860: 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0a 0a 7b .$(RESCMD) $<..{
e870: 24 28 57 49 4e 5f 44 49 52 29 7d 2e 72 63 7b 24 $(WIN_DIR)}.rc{$
e880: 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0a (TMP_DIR)}.res:.
e890: 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0a 0a 7b .$(RESCMD) $<..{
e8a0: 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 63 7b 24 $(TMP_DIR)}.rc{$
e8b0: 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0a (TMP_DIR)}.res:.
e8c0: 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0a 0a 2e .$(RESCMD) $<...
e8d0: 53 55 46 46 49 58 45 53 3a 0a 2e 53 55 46 46 49 SUFFIXES:..SUFFI
e8e0: 58 45 53 3a 2e 63 20 2e 72 63 0a 0a 21 65 6e 64 XES:.c .rc..!end
e8f0: 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 if..############
e900: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e910: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e920: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e930: 23 23 23 23 0a 23 20 31 34 2e 20 53 61 6e 69 74 ####.# 14. Sanit
e940: 79 20 63 68 65 63 6b 20 73 65 6c 65 63 74 65 64 y check selected
e950: 20 6f 70 74 69 6f 6e 73 20 61 67 61 69 6e 73 74 options against
e960: 20 54 63 6c 20 62 75 69 6c 64 20 6f 70 74 69 6f Tcl build optio
e970: 6e 73 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 ns.# When buildi
e980: 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 2c ng an extension,
e990: 20 63 65 72 74 61 69 6e 20 63 6f 6e 66 69 67 75 certain configu
e9a0: 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 20 73 ration options s
e9b0: 68 6f 75 6c 64 0a 23 20 6d 61 74 63 68 20 74 68 hould.# match th
e9c0: 65 20 6f 6e 65 73 20 75 73 65 64 20 77 68 65 6e e ones used when
e9d0: 20 54 63 6c 20 77 61 73 20 62 75 69 6c 74 2e 20 Tcl was built.
e9e0: 48 65 72 65 20 77 65 20 63 68 65 63 6b 20 61 6e Here we check an
e9f0: 64 0a 23 20 77 61 72 6e 20 6f 6e 20 61 20 6d 69 d.# warn on a mi
ea00: 73 6d 61 74 63 68 2e 0a 21 69 66 20 21 24 28 44 smatch..!if !$(D
ea10: 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 69 66 20 24 OING_TCL)..!if $
ea20: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 (TCLINSTALL) # B
ea30: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
ea40: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
ea50: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 .!if exist("$(_T
ea60: 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65 CLDIR)\lib\nmake
ea70: 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 0a 54 43 4c \tcl.nmake").TCL
ea80: 4e 4d 41 4b 45 43 4f 4e 46 49 47 20 3d 20 22 24 NMAKECONFIG = "$
ea90: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d (_TCLDIR)\lib\nm
eaa0: 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0a 21 ake\tcl.nmake".!
eab0: 65 6e 64 69 66 0a 21 65 6c 73 65 20 23 20 21 24 endif.!else # !$
eac0: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 2d 20 62 (TCLINSTALL) - b
ead0: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
eae0: 54 63 6c 20 73 6f 75 72 63 65 0a 21 69 66 20 65 Tcl source.!if e
eaf0: 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 xist("$(_TCLDIR)
eb00: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
eb10: 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 0a OP)\tcl.nmake").
eb20: 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 09 3d TCLNMAKECONFIG.=
eb30: 20 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e "$(_TCLDIR)\win
eb40: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
eb50: 74 63 6c 2e 6e 6d 61 6b 65 22 0a 21 65 6e 64 69 tcl.nmake".!endi
eb60: 66 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 49 4e f.!endif # TCLIN
eb70: 53 54 41 4c 4c 0a 0a 21 69 66 20 24 28 43 4f 4e STALL..!if $(CON
eb80: 46 49 47 5f 43 48 45 43 4b 29 0a 21 69 66 64 65 FIG_CHECK).!ifde
eb90: 66 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 f TCLNMAKECONFIG
eba0: 0a 21 69 6e 63 6c 75 64 65 20 24 28 54 43 4c 4e .!include $(TCLN
ebb0: 4d 41 4b 45 43 4f 4e 46 49 47 29 0a 0a 21 69 66 MAKECONFIG)..!if
ebc0: 20 64 65 66 69 6e 65 64 28 43 4f 52 45 5f 4d 41 defined(CORE_MA
ebd0: 43 48 49 4e 45 29 20 26 26 20 22 24 28 43 4f 52 CHINE) && "$(COR
ebe0: 45 5f 4d 41 43 48 49 4e 45 29 22 20 21 3d 20 22 E_MACHINE)" != "
ebf0: 24 28 4d 41 43 48 49 4e 45 29 22 0a 21 65 72 72 $(MACHINE)".!err
ec00: 6f 72 20 45 52 52 4f 52 3a 20 42 75 69 6c 64 20 or ERROR: Build
ec10: 74 61 72 67 65 74 20 28 24 28 4d 41 43 48 49 4e target ($(MACHIN
ec20: 45 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 E)) does not mat
ec30: 63 68 20 74 68 65 20 54 63 6c 20 6c 69 62 72 61 ch the Tcl libra
ec40: 72 79 20 61 72 63 68 69 74 65 63 74 75 72 65 20 ry architecture
ec50: 28 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 ($(CORE_MACHINE)
ec60: 29 2e 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 )..!endif.!if $(
ec70: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 TCL_VERSION) < 8
ec80: 37 20 26 26 20 64 65 66 69 6e 65 64 28 43 4f 52 7 && defined(COR
ec90: 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c E_USE_THREAD_ALL
eca0: 4f 43 29 20 26 26 20 24 28 43 4f 52 45 5f 55 53 OC) && $(CORE_US
ecb0: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 20 E_THREAD_ALLOC)
ecc0: 21 3d 20 24 28 55 53 45 5f 54 48 52 45 41 44 5f != $(USE_THREAD_
ecd0: 41 4c 4c 4f 43 29 0a 21 6d 65 73 73 61 67 65 20 ALLOC).!message
ece0: 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20 6f WARNING: Value o
ecf0: 66 20 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c f USE_THREAD_ALL
ed00: 4f 43 20 28 24 28 55 53 45 5f 54 48 52 45 41 44 OC ($(USE_THREAD
ed10: 5f 41 4c 4c 4f 43 29 29 20 64 6f 65 73 20 6e 6f _ALLOC)) does no
ed20: 74 20 6d 61 74 63 68 20 69 74 73 20 54 63 6c 20 t match its Tcl
ed30: 63 6f 72 65 20 76 61 6c 75 65 20 28 24 28 43 4f core value ($(CO
ed40: 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 4c RE_USE_THREAD_AL
ed50: 4c 4f 43 29 29 2e 0a 21 65 6e 64 69 66 0a 21 69 LOC))..!endif.!i
ed60: 66 20 64 65 66 69 6e 65 64 28 43 4f 52 45 5f 44 f defined(CORE_D
ed70: 45 42 55 47 29 20 26 26 20 24 28 43 4f 52 45 5f EBUG) && $(CORE_
ed80: 44 45 42 55 47 29 20 21 3d 20 24 28 44 45 42 55 DEBUG) != $(DEBU
ed90: 47 29 0a 21 6d 65 73 73 61 67 65 20 57 41 52 4e G).!message WARN
eda0: 49 4e 47 3a 20 56 61 6c 75 65 20 6f 66 20 44 45 ING: Value of DE
edb0: 42 55 47 20 28 24 28 44 45 42 55 47 29 29 20 64 BUG ($(DEBUG)) d
edc0: 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 oes not match it
edd0: 73 20 54 63 6c 20 6c 69 62 72 61 72 79 20 63 6f s Tcl library co
ede0: 6e 66 69 67 75 72 61 74 69 6f 6e 20 28 24 28 44 nfiguration ($(D
edf0: 45 42 55 47 29 29 2e 0a 21 65 6e 64 69 66 0a 21 EBUG))..!endif.!
ee00: 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 endif..!endif #
ee10: 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 0a 0a TCLNMAKECONFIG..
ee20: 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e !endif # !$(DOIN
ee30: 47 5f 54 43 4c 29 0a 0a 0a 23 2d 2d 2d 2d 2d 2d G_TCL)...#------
ee40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ee50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ee60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ee70: 2d 2d 2d 2d 0a 23 20 44 69 73 70 6c 61 79 20 73 ----.# Display s
ee80: 74 61 74 73 20 62 65 69 6e 67 20 75 73 65 64 2e tats being used.
ee90: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d .#--------------
eea0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
eeb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
eec0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 21 69 ------------..!i
eed0: 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a f !$(DOING_TCL).
eee0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 !message *** Bui
eef0: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 lding against Tc
ef00: 6c 20 61 74 20 27 24 28 5f 54 43 4c 44 49 52 29 l at '$(_TCLDIR)
ef10: 27 0a 21 65 6e 64 69 66 0a 21 69 66 20 21 24 28 '.!endif.!if !$(
ef20: 44 4f 49 4e 47 5f 54 4b 29 20 26 26 20 24 28 4e DOING_TK) && $(N
ef30: 45 45 44 5f 54 4b 29 0a 21 6d 65 73 73 61 67 65 EED_TK).!message
ef40: 20 2a 2a 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 *** Building ag
ef50: 61 69 6e 73 74 20 54 6b 20 61 74 20 27 24 28 5f ainst Tk at '$(_
ef60: 54 4b 44 49 52 29 27 0a 21 65 6e 64 69 66 0a 21 TKDIR)'.!endif.!
ef70: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e 74 65 message *** Inte
ef80: 72 6d 65 64 69 61 74 65 20 64 69 72 65 63 74 6f rmediate directo
ef90: 72 79 20 77 69 6c 6c 20 62 65 20 27 24 28 54 4d ry will be '$(TM
efa0: 50 5f 44 49 52 29 27 0a 21 6d 65 73 73 61 67 65 P_DIR)'.!message
efb0: 20 2a 2a 2a 20 4f 75 74 70 75 74 20 64 69 72 65 *** Output dire
efc0: 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 24 ctory will be '$
efd0: 28 4f 55 54 5f 44 49 52 29 27 0a 21 6d 65 73 73 (OUT_DIR)'.!mess
efe0: 61 67 65 20 2a 2a 2a 20 49 6e 73 74 61 6c 6c 61 age *** Installa
eff0: 74 69 6f 6e 2c 20 69 66 20 73 65 6c 65 63 74 65 tion, if selecte
f000: 64 2c 20 77 69 6c 6c 20 62 65 20 69 6e 20 27 24 d, will be in '$
f010: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 27 0a 21 (_INSTALLDIR)'.!
f020: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 53 75 66 66 message *** Suff
f030: 69 78 20 66 6f 72 20 62 69 6e 61 72 69 65 73 20 ix for binaries
f040: 77 69 6c 6c 20 62 65 20 27 24 28 53 55 46 58 29 will be '$(SUFX)
f050: 27 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 '.!message *** C
f060: 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 ompiler version
f070: 24 28 56 43 56 45 52 29 2e 20 54 61 72 67 65 74 $(VCVER). Target
f080: 20 24 28 4d 41 43 48 49 4e 45 29 2c 20 68 6f 73 $(MACHINE), hos
f090: 74 20 24 28 4e 41 54 49 56 45 5f 41 52 43 48 29 t $(NATIVE_ARCH)
f0a0: 2e 0a 0a 21 65 6e 64 69 66 20 23 20 69 66 64 65 ...!endif # ifde
f0b0: 66 20 5f 52 55 4c 45 53 5f 56 43 0a f _RULES_VC.