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 50 61 72 73 atures.# 6. Pars
09d0: 65 20 74 68 65 20 4f 50 54 53 20 6d 61 63 72 6f e the OPTS macro
09e0: 20 76 61 6c 75 65 20 66 6f 72 20 75 73 65 72 2d value for user-
09f0: 73 70 65 63 69 66 69 65 64 20 62 75 69 6c 64 20 specified build
0a00: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0a 23 20 configuration.#
0a10: 37 2e 20 50 61 72 73 65 20 74 68 65 20 53 54 41 7. Parse the STA
0a20: 54 53 20 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 TS macro value f
0a30: 6f 72 20 73 74 61 74 69 73 74 69 63 73 20 69 6e or statistics in
0a40: 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 23 20 strumentation.#
0a50: 38 2e 20 50 61 72 73 65 20 74 68 65 20 43 48 45 8. Parse the CHE
0a60: 43 4b 53 20 6d 61 63 72 6f 20 66 6f 72 20 61 64 CKS macro for ad
0a70: 64 69 74 69 6f 6e 61 6c 20 63 6f 6d 70 69 6c 61 ditional compila
0a80: 74 69 6f 6e 20 63 68 65 63 6b 73 0a 23 20 39 2e tion checks.# 9.
0a90: 20 45 78 74 72 61 63 74 20 54 63 6c 2c 20 61 6e Extract Tcl, an
0aa0: 64 20 70 6f 73 73 69 62 6c 79 20 54 6b 2c 20 76 d possibly Tk, v
0ab0: 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 66 ersion numbers f
0ac0: 72 6f 6d 20 74 68 65 20 68 65 61 64 65 72 73 0a rom the headers.
0ad0: 23 20 31 30 2e 20 42 61 73 65 64 20 6f 6e 20 74 # 10. Based on t
0ae0: 68 69 73 20 73 65 6c 65 63 74 65 64 20 63 6f 6e his selected con
0af0: 66 69 67 75 72 61 74 69 6f 6e 2c 20 63 6f 6e 73 figuration, cons
0b00: 74 72 75 63 74 20 74 68 65 20 6f 75 74 70 75 74 truct the output
0b10: 0a 23 20 20 20 20 20 64 69 72 65 63 74 6f 72 79 .# directory
0b20: 20 61 6e 64 20 66 69 6c 65 20 70 61 74 68 73 0a and file paths.
0b30: 23 20 31 31 2e 20 43 6f 6e 73 74 72 75 63 74 20 # 11. Construct
0b40: 74 68 65 20 70 61 74 68 73 20 77 68 65 72 65 20 the paths where
0b50: 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 74 the package is t
0b60: 6f 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 o be installed.#
0b70: 20 31 32 2e 20 53 65 74 20 75 70 20 74 68 65 20 12. Set up the
0b80: 61 63 74 75 61 6c 20 6f 70 74 69 6f 6e 73 20 70 actual options p
0b90: 61 73 73 65 64 20 74 6f 20 63 6f 6d 70 69 6c 65 assed to compile
0ba0: 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 62 61 73 r and linker bas
0bb0: 65 64 0a 23 20 20 20 20 20 6f 6e 20 74 68 65 20 ed.# on the
0bc0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 67 61 74 68 information gath
0bd0: 65 72 65 64 20 61 62 6f 76 65 2e 0a 23 20 31 33 ered above..# 13
0be0: 2e 20 44 65 66 69 6e 65 20 73 6f 6d 65 20 73 74 . Define some st
0bf0: 61 6e 64 61 72 64 20 62 75 69 6c 64 20 74 61 72 andard build tar
0c00: 67 65 74 73 20 61 6e 64 20 69 6d 70 6c 69 63 69 gets and implici
0c10: 74 20 72 75 6c 65 73 2e 20 54 68 65 73 65 20 6d t rules. These m
0c20: 61 79 0a 23 20 20 20 20 20 62 65 20 6f 70 74 69 ay.# be opti
0c30: 6f 6e 61 6c 6c 79 20 64 69 73 61 62 6c 65 64 20 onally disabled
0c40: 62 79 20 74 68 65 20 70 61 72 65 6e 74 20 6d 61 by the parent ma
0c50: 6b 65 66 69 6c 65 2e 0a 23 20 31 34 2e 20 28 46 kefile..# 14. (F
0c60: 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 6f 6e or extensions on
0c70: 6c 79 2e 29 20 43 6f 6d 70 61 72 65 20 74 68 65 ly.) Compare the
0c80: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f configuration o
0c90: 66 20 74 68 65 20 74 61 72 67 65 74 0a 23 20 20 f the target.#
0ca0: 20 20 20 54 63 6c 20 61 6e 64 20 74 68 65 20 65 Tcl and the e
0cb0: 78 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 77 61 xtensions and wa
0cc0: 72 6e 20 61 67 61 69 6e 73 74 20 64 69 73 63 72 rn against discr
0cd0: 65 70 61 6e 63 69 65 73 2e 0a 23 0a 23 20 4f 6e epancies..#.# On
0ce0: 65 20 66 69 6e 61 6c 20 6e 6f 74 65 20 61 62 6f e final note abo
0cf0: 75 74 20 74 68 65 20 6d 61 63 72 6f 20 6e 61 6d ut the macro nam
0d00: 65 73 20 75 73 65 64 2e 20 54 68 65 79 20 61 72 es used. They ar
0d10: 65 20 61 73 20 74 68 65 79 20 61 72 65 0a 23 20 e as they are.#
0d20: 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c 20 72 for historical r
0d30: 65 61 73 6f 6e 73 2e 20 57 65 20 77 6f 75 6c 64 easons. We would
0d40: 20 6c 69 6b 65 20 6c 65 67 61 63 79 20 65 78 74 like legacy ext
0d50: 65 6e 73 69 6f 6e 73 20 74 6f 0a 23 20 63 6f 6e ensions to.# con
0d60: 74 69 6e 75 65 20 74 6f 20 77 6f 72 6b 20 77 69 tinue to work wi
0d70: 74 68 20 74 68 69 73 20 6d 61 6b 65 20 69 6e 63 th this make inc
0d80: 6c 75 64 65 20 66 69 6c 65 20 73 6f 20 62 65 20 lude file so be
0d90: 77 61 72 79 20 6f 66 0a 23 20 63 68 61 6e 67 69 wary of.# changi
0da0: 6e 67 20 74 68 65 6d 20 66 6f 72 20 63 6f 6e 73 ng them for cons
0db0: 69 73 74 65 6e 63 79 20 6f 72 20 63 6c 61 72 69 istency or clari
0dc0: 74 79 2e 0a 0a 23 20 30 2e 20 53 61 6e 69 74 79 ty...# 0. Sanity
0dd0: 20 63 68 65 63 6b 20 63 6f 6d 70 69 6c 65 72 20 check compiler
0de0: 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 0a 23 20 43 environment..# C
0df0: 68 65 63 6b 20 74 6f 20 73 65 65 20 77 65 20 61 heck to see we a
0e00: 72 65 20 63 6f 6e 66 69 67 75 72 65 64 20 74 6f re configured to
0e10: 20 62 75 69 6c 64 20 77 69 74 68 20 4d 53 56 43 build with MSVC
0e20: 20 28 4d 53 44 45 56 44 49 52 2c 20 4d 53 56 43 (MSDEVDIR, MSVC
0e30: 44 49 52 20 6f 72 0a 23 20 56 43 49 4e 53 54 41 DIR or.# VCINSTA
0e40: 4c 4c 44 49 52 29 20 6f 72 20 77 69 74 68 20 74 LLDIR) or with t
0e50: 68 65 20 4d 53 20 50 6c 61 74 66 6f 72 6d 20 53 he MS Platform S
0e60: 44 4b 20 28 4d 53 53 44 4b 20 6f 72 20 57 69 6e DK (MSSDK or Win
0e70: 64 6f 77 73 53 44 4b 44 69 72 29 0a 0a 21 69 66 dowsSDKDir)..!if
0e80: 20 21 64 65 66 69 6e 65 64 28 4d 53 44 45 56 44 !defined(MSDEVD
0e90: 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 IR) && !defined(
0ea0: 4d 53 56 43 44 49 52 29 20 26 26 20 21 64 65 66 MSVCDIR) && !def
0eb0: 69 6e 65 64 28 56 43 49 4e 53 54 41 4c 4c 44 49 ined(VCINSTALLDI
0ec0: 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 4d R) && !defined(M
0ed0: 53 53 44 4b 29 20 26 26 20 21 64 65 66 69 6e 65 SSDK) && !define
0ee0: 64 28 57 49 4e 44 4f 57 53 53 44 4b 44 49 52 29 d(WINDOWSSDKDIR)
0ef0: 0a 4d 53 47 20 3d 20 5e 0a 56 69 73 75 61 6c 20 .MSG = ^.Visual
0f00: 43 2b 2b 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 C++ compiler env
0f10: 69 72 6f 6e 6d 65 6e 74 20 6e 6f 74 20 69 6e 69 ironment not ini
0f20: 74 69 61 6c 69 7a 65 64 2e 0a 21 65 72 72 6f 72 tialized..!error
0f30: 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a $(MSG).!endif..
0f40: 23 20 57 65 20 6e 65 65 64 20 74 6f 20 72 75 6e # We need to run
0f50: 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 63 74 from the direct
0f60: 6f 72 79 20 74 68 65 20 70 61 72 65 6e 74 20 6d ory the parent m
0f70: 61 6b 65 66 69 6c 65 20 69 73 20 6c 6f 63 61 74 akefile is locat
0f80: 65 64 20 69 6e 2e 0a 23 20 6e 6d 61 6b 65 20 64 ed in..# nmake d
0f90: 6f 65 73 20 6e 6f 74 20 74 65 6c 6c 20 75 73 20 oes not tell us
0fa0: 77 68 61 74 20 6d 61 6b 65 66 69 6c 65 20 77 61 what makefile wa
0fb0: 73 20 75 73 65 64 20 74 6f 20 69 6e 76 6f 6b 65 s used to invoke
0fc0: 20 69 74 20 73 6f 20 70 61 72 65 6e 74 0a 23 20 it so parent.#
0fd0: 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 74 6f 20 makefile has to
0fe0: 73 65 74 20 74 68 65 20 4d 41 4b 45 46 49 4c 45 set the MAKEFILE
0ff0: 56 43 20 6d 61 63 72 6f 20 6f 72 20 77 65 20 6a VC macro or we j
1000: 75 73 74 20 6d 61 6b 65 20 61 20 67 75 65 73 73 ust make a guess
1010: 20 61 6e 64 0a 23 20 77 61 72 6e 20 69 66 20 77 and.# warn if w
1020: 65 20 74 68 69 6e 6b 20 74 68 61 74 20 69 73 20 e think that is
1030: 6e 6f 74 20 74 68 65 20 63 61 73 65 2e 0a 21 69 not the case..!i
1040: 66 20 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 f "$(MAKEFILEVC)
1050: 22 20 3d 3d 20 22 22 0a 0a 21 69 66 20 65 78 69 " == ""..!if exi
1060: 73 74 28 22 24 28 50 52 4f 4a 45 43 54 29 2e 76 st("$(PROJECT).v
1070: 63 22 29 0a 4d 41 4b 45 46 49 4c 45 56 43 20 3d c").MAKEFILEVC =
1080: 20 24 28 50 52 4f 4a 45 43 54 29 2e 76 63 0a 21 $(PROJECT).vc.!
1090: 65 6c 73 65 69 66 20 65 78 69 73 74 28 22 6d 61 elseif exist("ma
10a0: 6b 65 66 69 6c 65 2e 76 63 22 29 0a 4d 41 4b 45 kefile.vc").MAKE
10b0: 46 49 4c 45 56 43 20 3d 20 6d 61 6b 65 66 69 6c FILEVC = makefil
10c0: 65 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 6e 64 e.vc.!endif.!end
10d0: 69 66 20 23 20 22 24 28 4d 41 4b 45 46 49 4c 45 if # "$(MAKEFILE
10e0: 56 43 29 22 20 3d 3d 20 22 22 0a 0a 21 69 66 20 VC)" == ""..!if
10f0: 21 65 78 69 73 74 28 22 24 28 4d 41 4b 45 46 49 !exist("$(MAKEFI
1100: 4c 45 56 43 29 22 29 0a 4d 53 47 20 3d 20 5e 0a LEVC)").MSG = ^.
1110: 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 6e 6d 61 You must run nma
1120: 6b 65 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 ke from the dire
1130: 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 ctory containing
1140: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 6b the project mak
1150: 65 66 69 6c 65 2e 5e 0a 49 66 20 79 6f 75 20 61 efile.^.If you a
1160: 72 65 20 64 6f 69 6e 67 20 74 68 61 74 20 61 6e re doing that an
1170: 64 20 67 65 74 74 69 6e 67 20 74 68 69 73 20 6d d getting this m
1180: 65 73 73 61 67 65 2c 20 73 65 74 20 74 68 65 20 essage, set the
1190: 4d 41 4b 45 46 49 4c 45 56 43 5e 0a 6d 61 63 72 MAKEFILEVC^.macr
11a0: 6f 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f 66 o to the name of
11b0: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 6b the project mak
11c0: 65 66 69 6c 65 2e 0a 21 6d 65 73 73 61 67 65 20 efile..!message
11d0: 57 41 52 4e 49 4e 47 3a 20 24 28 4d 53 47 29 0a WARNING: $(MSG).
11e0: 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 23 23 !endif...#######
11f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 31 2e 20 44 #########.# 1. D
1230: 65 66 69 6e 65 20 65 78 74 65 72 6e 61 6c 20 70 efine external p
1240: 72 6f 67 72 61 6d 73 20 62 65 69 6e 67 20 75 73 rograms being us
1250: 65 64 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ed..#-----------
1260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a ---------------.
1290: 23 20 53 65 74 20 74 68 65 20 70 72 6f 70 65 72 # Set the proper
12a0: 20 63 6f 70 79 20 6d 65 74 68 6f 64 20 74 6f 20 copy method to
12b0: 61 76 6f 69 64 20 6f 76 65 72 77 72 69 74 65 20 avoid overwrite
12c0: 71 75 65 73 74 69 6f 6e 73 0a 23 20 74 6f 20 74 questions.# to t
12d0: 68 65 20 75 73 65 72 20 77 68 65 6e 20 63 6f 70 he user when cop
12e0: 79 69 6e 67 20 66 69 6c 65 73 20 61 6e 64 20 73 ying files and s
12f0: 65 6c 65 63 74 69 6e 67 20 74 68 65 20 72 69 67 electing the rig
1300: 68 74 0a 23 20 22 64 65 6c 65 74 65 20 61 6c 6c ht.# "delete all
1310: 22 20 6d 65 74 68 6f 64 2e 0a 23 2d 2d 2d 2d 2d " method..#-----
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 0a 52 4d 44 49 52 09 3d 20 72 -----..RMDIR.= r
1360: 6d 64 69 72 20 2f 53 20 2f 51 0a 43 50 59 09 3d mdir /S /Q.CPY.=
1370: 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e 55 xcopy /i /y >NU
1380: 4c 0a 43 50 59 44 49 52 20 20 3d 20 78 63 6f 70 L.CPYDIR = xcop
1390: 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e 55 4c 0a y /e /i /y >NUL.
13a0: 43 4f 50 59 09 3d 20 63 6f 70 79 20 2f 79 20 3e COPY.= copy /y >
13b0: 4e 55 4c 0a 4d 4b 44 49 52 20 20 20 3d 20 6d 6b NUL.MKDIR = mk
13c0: 64 69 72 0a 0a 23 23 23 23 23 23 23 23 23 23 23 dir..###########
13d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 32 2e ###########.# 2.
1410: 20 46 69 67 75 72 65 20 6f 75 74 20 6f 75 72 20 Figure out our
1420: 62 75 69 6c 64 20 65 6e 76 69 72 6f 6e 6d 65 6e build environmen
1430: 74 20 69 6e 20 74 65 72 6d 73 20 6f 66 20 77 68 t in terms of wh
1440: 61 74 20 77 65 27 72 65 20 62 75 69 6c 64 69 6e at we're buildin
1450: 67 2e 0a 23 0a 23 20 28 61 29 20 54 63 6c 20 69 g..#.# (a) Tcl i
1460: 74 73 65 6c 66 0a 23 20 28 62 29 20 54 6b 0a 23 tself.# (b) Tk.#
1470: 20 28 63 29 20 61 20 54 63 6c 20 65 78 74 65 6e (c) a Tcl exten
1480: 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 62 72 61 sion using libra
1490: 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 20 66 72 ries/includes fr
14a0: 6f 6d 20 61 6e 20 2a 69 6e 73 74 61 6c 6c 65 64 om an *installed
14b0: 2a 20 54 63 6c 0a 23 20 28 64 29 20 61 20 54 63 * Tcl.# (d) a Tc
14c0: 6c 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 69 6e l extension usin
14d0: 67 20 6c 69 62 72 61 72 69 65 73 2f 69 6e 63 6c g libraries/incl
14e0: 75 64 65 73 20 66 72 6f 6d 20 54 63 6c 20 73 6f udes from Tcl so
14f0: 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 0a 23 urce directory.#
1500: 0a 23 20 54 68 69 73 20 6c 61 73 74 20 69 73 20 .# This last is
1510: 6e 65 65 64 65 64 20 62 65 63 61 75 73 65 20 73 needed because s
1520: 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 73 ome extensions s
1530: 74 69 6c 6c 20 6e 65 65 64 0a 23 20 73 6f 6d 65 till need.# some
1540: 20 54 63 6c 20 69 6e 74 65 72 66 61 63 65 73 20 Tcl interfaces
1550: 74 68 61 74 20 61 72 65 20 6e 6f 74 20 70 75 62 that are not pub
1560: 6c 69 63 6c 79 20 65 78 70 6f 73 65 64 2e 0a 23 licly exposed..#
1570: 0a 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74 20 .# The fragment
1580: 77 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f 6c will set the fol
1590: 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a 23 lowing macros:.#
15a0: 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f 66 20 ROOT - root of
15b0: 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f 75 72 this module sour
15c0: 63 65 73 0a 23 20 43 4f 4d 50 41 54 44 49 52 20 ces.# COMPATDIR
15d0: 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f - source directo
15e0: 72 79 20 74 68 61 74 20 68 6f 6c 64 73 20 63 6f ry that holds co
15f0: 6d 70 61 74 69 62 69 6c 69 74 79 20 73 6f 75 72 mpatibility sour
1600: 63 65 73 0a 23 20 44 4f 43 44 49 52 20 2d 20 73 ces.# DOCDIR - s
1610: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 20 ource directory
1620: 63 6f 6e 74 61 69 6e 69 6e 67 20 64 6f 63 75 6d containing docum
1630: 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 0a 23 entation files.#
1640: 20 47 45 4e 45 52 49 43 44 49 52 20 2d 20 70 6c GENERICDIR - pl
1650: 61 74 66 6f 72 6d 2d 69 6e 64 65 70 65 6e 64 65 atform-independe
1660: 6e 74 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 nt source direct
1670: 6f 72 79 0a 23 20 57 49 4e 5f 44 49 52 20 2d 20 ory.# WIN_DIR -
1680: 57 69 6e 64 6f 77 73 2d 73 70 65 63 69 66 69 63 Windows-specific
1690: 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 source director
16a0: 79 0a 23 20 54 45 53 54 44 49 52 20 2d 20 64 69 y.# TESTDIR - di
16b0: 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 rectory containi
16c0: 6e 67 20 74 65 73 74 20 66 69 6c 65 73 0a 23 20 ng test files.#
16d0: 54 4f 4f 4c 53 44 49 52 20 2d 20 64 69 72 65 63 TOOLSDIR - direc
16e0: 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 tory containing
16f0: 62 75 69 6c 64 20 74 6f 6f 6c 73 0a 23 20 5f 54 build tools.# _T
1700: 43 4c 44 49 52 20 2d 20 72 6f 6f 74 20 6f 66 20 CLDIR - root of
1710: 74 68 65 20 54 63 6c 20 69 6e 73 74 61 6c 6c 61 the Tcl installa
1720: 74 69 6f 6e 20 4f 52 20 74 68 65 20 54 63 6c 20 tion OR the Tcl
1730: 73 6f 75 72 63 65 73 2e 20 4e 6f 74 20 73 65 74 sources. Not set
1740: 0a 23 20 20 20 20 77 68 65 6e 20 62 75 69 6c 64 .# when build
1750: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e 0a ing Tcl itself..
1760: 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 2d 20 # _INSTALLDIR -
1770: 6e 61 74 69 76 65 20 66 6f 72 6d 20 6f 66 20 74 native form of t
1780: 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 he installation
1790: 70 61 74 68 2e 20 46 6f 72 20 54 63 6c 0a 23 20 path. For Tcl.#
17a0: 20 20 20 74 68 69 73 20 77 69 6c 6c 20 62 65 20 this will be
17b0: 74 68 65 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 the root of the
17c0: 54 63 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e Tcl installation
17d0: 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 . For extensions
17e0: 0a 23 20 20 20 20 74 68 69 73 20 77 69 6c 6c 20 .# this will
17f0: 62 65 20 74 68 65 20 6c 69 62 20 64 69 72 65 63 be the lib direc
1800: 74 6f 72 79 20 75 6e 64 65 72 20 74 68 65 20 72 tory under the r
1810: 6f 6f 74 2e 0a 23 20 54 43 4c 49 4e 53 54 41 4c oot..# TCLINSTAL
1820: 4c 20 20 2d 20 73 65 74 20 74 6f 20 31 20 69 66 L - set to 1 if
1830: 20 5f 54 43 4c 44 49 52 20 72 65 66 65 72 73 20 _TCLDIR refers
1840: 74 6f 0a 23 20 20 20 20 68 65 61 64 65 72 73 20 to.# headers
1850: 61 6e 64 20 6c 69 62 72 61 72 69 65 73 20 66 72 and libraries fr
1860: 6f 6d 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 om an installed
1870: 54 63 6c 2c 20 61 6e 64 20 30 20 69 66 20 62 75 Tcl, and 0 if bu
1880: 69 6c 74 20 61 67 61 69 6e 73 74 0a 23 20 20 20 ilt against.#
1890: 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e 6f Tcl sources. No
18a0: 74 20 73 65 74 20 77 68 65 6e 20 62 75 69 6c 64 t set when build
18b0: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e 20 ing Tcl itself.
18c0: 59 65 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 65 Yes, not very we
18d0: 6c 6c 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0a 23 ll.# named..#
18e0: 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69 76 65 _TCL_H - native
18f0: 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 63 6c path to the tcl
1900: 2e 68 20 66 69 6c 65 0a 23 0a 23 20 49 66 20 54 .h file.#.# If T
1910: 6b 20 69 73 20 69 6e 76 6f 6c 76 65 64 2c 20 61 k is involved, a
1920: 6c 73 6f 20 73 65 74 73 20 74 68 65 20 66 6f 6c lso sets the fol
1930: 6c 6f 77 69 6e 67 0a 23 20 5f 54 4b 44 49 52 20 lowing.# _TKDIR
1940: 2d 20 6e 61 74 69 76 65 20 66 6f 72 6d 20 54 6b - native form Tk
1950: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f 52 installation OR
1960: 20 54 6b 20 73 6f 75 72 63 65 2e 20 4e 6f 74 20 Tk source. Not
1970: 73 65 74 20 69 66 20 62 75 69 6c 64 69 6e 67 0a set if building.
1980: 23 20 20 20 20 54 6b 20 69 74 73 65 6c 66 2e 0a # Tk itself..
1990: 23 20 54 4b 49 4e 53 54 41 4c 4c 20 2d 20 73 65 # TKINSTALL - se
19a0: 74 20 31 20 69 66 20 5f 54 4b 44 49 52 20 72 65 t 1 if _TKDIR re
19b0: 66 65 72 73 20 74 6f 20 69 6e 73 74 61 6c 6c 65 fers to installe
19c0: 64 20 54 6b 20 61 6e 64 20 30 20 69 66 20 54 6b d Tk and 0 if Tk
19d0: 20 73 6f 75 72 63 65 73 0a 23 20 5f 54 4b 5f 48 sources.# _TK_H
19e0: 20 2d 20 6e 61 74 69 76 65 20 70 61 74 68 20 74 - native path t
19f0: 6f 20 74 68 65 20 74 6b 2e 68 20 66 69 6c 65 0a o the tk.h file.
1a00: 0a 23 20 52 6f 6f 74 20 64 69 72 65 63 74 6f 72 .# Root director
1a10: 79 20 66 6f 72 20 73 6f 75 72 63 65 73 20 61 6e y for sources an
1a20: 64 20 61 73 73 75 6d 65 64 20 73 75 62 64 69 72 d assumed subdir
1a30: 65 63 74 6f 72 69 65 73 0a 52 4f 4f 54 20 3d 20 ectories.ROOT =
1a40: 24 28 4d 41 4b 45 44 49 52 29 5c 2e 2e 0a 23 20 $(MAKEDIR)\...#
1a50: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 The following pa
1a60: 74 68 73 20 43 41 4e 4e 4f 54 20 68 61 76 65 20 ths CANNOT have
1a70: 73 70 61 63 65 73 20 69 6e 20 74 68 65 6d 20 61 spaces in them a
1a80: 73 20 74 68 65 79 20 61 70 70 65 61 72 20 6f 6e s they appear on
1a90: 20 74 68 65 0a 23 20 6c 65 66 74 20 73 69 64 65 the.# left side
1aa0: 20 6f 66 20 69 6d 70 6c 69 63 69 74 20 72 75 6c of implicit rul
1ab0: 65 73 2e 0a 21 69 66 6e 64 65 66 20 43 4f 4d 50 es..!ifndef COMP
1ac0: 41 54 44 49 52 0a 43 4f 4d 50 41 54 44 49 52 09 ATDIR.COMPATDIR.
1ad0: 3d 20 24 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 74 = $(ROOT)\compat
1ae0: 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 .!endif.!ifndef
1af0: 44 4f 43 44 49 52 0a 44 4f 43 44 49 52 09 09 3d DOCDIR.DOCDIR..=
1b00: 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0a 21 65 6e $(ROOT)\doc.!en
1b10: 64 69 66 0a 21 69 66 6e 64 65 66 20 47 45 4e 45 dif.!ifndef GENE
1b20: 52 49 43 44 49 52 0a 47 45 4e 45 52 49 43 44 49 RICDIR.GENERICDI
1b30: 52 09 3d 20 24 28 52 4f 4f 54 29 5c 67 65 6e 65 R.= $(ROOT)\gene
1b40: 72 69 63 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 ric.!endif.!ifnd
1b50: 65 66 20 54 4f 4f 4c 53 44 49 52 0a 54 4f 4f 4c ef TOOLSDIR.TOOL
1b60: 53 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 74 SDIR.= $(ROOT)\t
1b70: 6f 6f 6c 73 0a 21 65 6e 64 69 66 0a 21 69 66 6e ools.!endif.!ifn
1b80: 64 65 66 20 54 45 53 54 44 49 52 0a 54 45 53 54 def TESTDIR.TEST
1b90: 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 74 65 DIR.= $(ROOT)\te
1ba0: 73 74 73 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 sts.!endif.!ifnd
1bb0: 65 66 20 4c 49 42 44 49 52 0a 21 69 66 20 65 78 ef LIBDIR.!if ex
1bc0: 69 73 74 28 22 24 28 52 4f 4f 54 29 5c 6c 69 62 ist("$(ROOT)\lib
1bd0: 72 61 72 79 22 29 0a 4c 49 42 44 49 52 20 20 20 rary").LIBDIR
1be0: 20 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 29 = $(ROOT)
1bf0: 5c 6c 69 62 72 61 72 79 0a 21 65 6c 73 65 0a 4c \library.!else.L
1c00: 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20 3d IBDIR =
1c10: 20 24 28 52 4f 4f 54 29 5c 6c 69 62 0a 21 65 6e $(ROOT)\lib.!en
1c20: 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 dif.!endif.!ifnd
1c30: 65 66 20 44 45 4d 4f 44 49 52 0a 21 69 66 20 65 ef DEMODIR.!if e
1c40: 78 69 73 74 28 22 24 28 4c 49 42 44 49 52 29 5c xist("$(LIBDIR)\
1c50: 64 65 6d 6f 73 22 29 0a 44 45 4d 4f 44 49 52 09 demos").DEMODIR.
1c60: 09 3d 20 24 28 4c 49 42 44 49 52 29 5c 64 65 6d .= $(LIBDIR)\dem
1c70: 6f 73 0a 21 65 6c 73 65 0a 44 45 4d 4f 44 49 52 os.!else.DEMODIR
1c80: 09 09 3d 20 24 28 52 4f 4f 54 29 5c 64 65 6d 6f ..= $(ROOT)\demo
1c90: 73 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 s.!endif.!endif
1ca0: 23 20 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 52 # ifndef DEMODIR
1cb0: 0a 23 20 44 6f 20 4e 4f 54 20 75 73 65 20 57 49 .# Do NOT use WI
1cc0: 4e 44 49 52 20 62 65 63 61 75 73 65 20 69 74 20 NDIR because it
1cd0: 69 73 20 57 69 6e 64 6f 77 73 20 69 6e 74 65 72 is Windows inter
1ce0: 6e 61 6c 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a nal environment.
1cf0: 23 20 76 61 72 69 61 62 6c 65 20 74 6f 20 70 6f # variable to po
1d00: 69 6e 74 20 74 6f 20 63 3a 5c 77 69 6e 64 6f 77 int to c:\window
1d10: 73 21 0a 57 49 4e 5f 44 49 52 09 09 3d 20 24 28 s!.WIN_DIR..= $(
1d20: 52 4f 4f 54 29 5c 77 69 6e 0a 0a 21 69 66 6e 64 ROOT)\win..!ifnd
1d30: 65 66 20 52 43 44 49 52 0a 21 69 66 20 65 78 69 ef RCDIR.!if exi
1d40: 73 74 28 22 24 28 57 49 4e 5f 44 49 52 29 5c 72 st("$(WIN_DIR)\r
1d50: 63 22 29 0a 52 43 44 49 52 20 20 20 20 20 20 20 c").RCDIR
1d60: 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 29 = $(WIN_DIR)
1d70: 5c 72 63 0a 21 65 6c 73 65 0a 52 43 44 49 52 20 \rc.!else.RCDIR
1d80: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 57 49 = $(WI
1d90: 4e 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 65 N_DIR).!endif.!e
1da0: 6e 64 69 66 0a 52 43 44 49 52 20 3d 20 24 28 52 ndif.RCDIR = $(R
1db0: 43 44 49 52 3a 2f 3d 5c 29 0a 0a 23 20 54 68 65 CDIR:/=\)..# The
1dc0: 20 74 61 72 67 65 74 20 64 69 72 65 63 74 6f 72 target director
1dd0: 79 20 77 68 65 72 65 20 74 68 65 20 62 75 69 6c y where the buil
1de0: 74 20 70 61 63 6b 61 67 65 73 20 61 6e 64 20 62 t packages and b
1df0: 69 6e 61 72 69 65 73 20 77 69 6c 6c 20 62 65 20 inaries will be
1e00: 69 6e 73 74 61 6c 6c 65 64 2e 0a 23 20 49 4e 53 installed..# INS
1e10: 54 41 4c 4c 44 49 52 20 69 73 20 74 68 65 20 28 TALLDIR is the (
1e20: 6f 70 74 69 6f 6e 61 6c 29 20 70 61 74 68 20 73 optional) path s
1e30: 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 20 pecified by the
1e40: 75 73 65 72 2e 0a 23 20 5f 49 4e 53 54 41 4c 4c user..# _INSTALL
1e50: 44 49 52 20 69 73 20 49 4e 53 54 41 4c 4c 44 49 DIR is INSTALLDI
1e60: 52 20 75 73 69 6e 67 20 74 68 65 20 62 61 63 6b R using the back
1e70: 73 6c 61 73 68 20 73 65 70 61 72 61 74 6f 72 20 slash separator
1e80: 73 79 6e 74 61 78 0a 21 69 66 64 65 66 20 49 4e syntax.!ifdef IN
1e90: 53 54 41 4c 4c 44 49 52 0a 23 23 23 20 46 69 78 STALLDIR.### Fix
1ea0: 20 74 68 65 20 70 61 74 68 20 73 65 70 61 72 61 the path separa
1eb0: 74 6f 72 73 2e 0a 5f 49 4e 53 54 41 4c 4c 44 49 tors.._INSTALLDI
1ec0: 52 09 3d 20 24 28 49 4e 53 54 41 4c 4c 44 49 52 R.= $(INSTALLDIR
1ed0: 3a 2f 3d 5c 29 0a 21 65 6c 73 65 0a 23 23 23 20 :/=\).!else.###
1ee0: 41 73 73 75 6d 65 20 74 68 65 20 6e 6f 72 6d 61 Assume the norma
1ef0: 6c 20 64 65 66 61 75 6c 74 2e 0a 5f 49 4e 53 54 l default.._INST
1f00: 41 4c 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 44 ALLDIR.= $(HOMED
1f10: 52 49 56 45 29 5c 54 63 6c 0a 21 65 6e 64 69 66 RIVE)\Tcl.!endif
1f20: 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 ..!if $(DOING_TC
1f30: 4c 29 0a 0a 23 20 42 45 47 49 4e 20 43 61 73 65 L)..# BEGIN Case
1f40: 20 32 28 61 29 20 2d 20 42 75 69 6c 64 69 6e 67 2(a) - Building
1f50: 20 54 63 6c 20 69 74 73 65 6c 66 0a 0a 23 20 4f Tcl itself..# O
1f60: 6e 6c 79 20 6e 65 65 64 20 74 6f 20 64 65 66 69 nly need to defi
1f70: 6e 65 20 5f 54 43 4c 5f 48 0a 5f 54 43 4c 5f 48 ne _TCL_H._TCL_H
1f80: 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 5c 74 63 = ..\generic\tc
1f90: 6c 2e 68 0a 0a 23 20 45 4e 44 20 43 61 73 65 20 l.h..# END Case
1fa0: 32 28 61 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 2(a) - Building
1fb0: 54 63 6c 20 69 74 73 65 6c 66 0a 0a 21 65 6c 73 Tcl itself..!els
1fc0: 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a eif $(DOING_TK).
1fd0: 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 .# BEGIN Case 2(
1fe0: 62 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 6b b) - Building Tk
1ff0: 0a 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 30 ..TCLINSTALL = 0
2000: 20 23 20 54 6b 20 61 6c 77 61 79 73 20 62 75 69 # Tk always bui
2010: 6c 64 73 20 61 67 61 69 6e 73 74 20 54 63 6c 20 lds against Tcl
2020: 73 6f 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 69 source, not an i
2030: 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0a 21 69 66 nstalled Tcl.!if
2040: 20 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d 20 "$(TCLDIR)" ==
2050: 22 22 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c "".!if [echo TCL
2060: 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c DIR = \> nmakehl
2070: 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b p.out] \. || [
2080: 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e 65 nmakehlp -L gene
2090: 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d 61 ric\tcl.h >> nma
20a0: 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f kehlp.out].!erro
20b0: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
20c0: 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f 75 72 63 locate Tcl sourc
20d0: 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e e directory..!en
20e0: 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 dif.!include nma
20f0: 6b 65 68 6c 70 2e 6f 75 74 0a 21 65 6e 64 69 66 kehlp.out.!endif
2100: 20 23 20 54 43 4c 44 49 52 20 3d 3d 20 22 22 0a # TCLDIR == "".
2110: 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 43 4c ._TCLDIR.= $(TCL
2120: 44 49 52 3a 2f 3d 5c 29 0a 5f 54 43 4c 5f 48 20 DIR:/=\)._TCL_H
2130: 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 = $(_TCLDIR)\ge
2140: 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 69 66 20 neric\tcl.h.!if
2150: 21 65 78 69 73 74 28 22 24 28 5f 54 43 4c 5f 48 !exist("$(_TCL_H
2160: 29 22 29 0a 21 65 72 72 6f 72 20 43 6f 75 6c 64 )").!error Could
2170: 20 6e 6f 74 20 6c 6f 63 61 74 65 20 74 63 6c 2e not locate tcl.
2180: 68 2e 20 50 6c 65 61 73 65 20 73 65 74 20 74 68 h. Please set th
2190: 65 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 74 e TCLDIR macro t
21a0: 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 o point to the T
21b0: 63 6c 20 2a 73 6f 75 72 63 65 2a 20 64 69 72 65 cl *source* dire
21c0: 63 74 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 0a 5f ctory..!endif.._
21d0: 54 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 TK_H = ..\generi
21e0: 63 5c 74 6b 2e 68 0a 0a 23 20 45 4e 44 20 43 61 c\tk.h..# END Ca
21f0: 73 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 69 se 2(b) - Buildi
2200: 6e 67 20 54 6b 0a 0a 21 65 6c 73 65 0a 0a 23 20 ng Tk..!else..#
2210: 42 45 47 49 4e 20 43 61 73 65 20 32 28 63 29 20 BEGIN Case 2(c)
2220: 6f 72 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e or (d) - Buildin
2230: 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 6f g an extension o
2240: 74 68 65 72 20 74 68 61 6e 20 54 6b 0a 0a 23 20 ther than Tk..#
2250: 49 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 If command line
2260: 68 61 73 20 73 70 65 63 69 66 69 65 64 20 54 63 has specified Tc
2270: 6c 20 6c 6f 63 61 74 69 6f 6e 20 74 68 72 6f 75 l location throu
2280: 67 68 20 54 43 4c 44 49 52 2c 20 75 73 65 20 69 gh TCLDIR, use i
2290: 74 0a 23 20 65 6c 73 65 20 64 65 66 61 75 6c 74 t.# else default
22a0: 20 74 6f 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 to the INSTALLD
22b0: 49 52 20 73 65 74 74 69 6e 67 0a 21 69 66 20 22 IR setting.!if "
22c0: 24 28 54 43 4c 44 49 52 29 22 20 21 3d 20 22 22 $(TCLDIR)" != ""
22d0: 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 43 .._TCLDIR.= $(TC
22e0: 4c 44 49 52 3a 2f 3d 5c 29 0a 21 69 66 20 65 78 LDIR:/=\).!if ex
22f0: 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c ist("$(_TCLDIR)\
2300: 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 20 include\tcl.h")
2310: 23 20 43 61 73 65 20 32 28 63 29 20 77 69 74 68 # Case 2(c) with
2320: 20 54 43 4c 44 49 52 20 64 65 66 69 6e 65 64 0a TCLDIR defined.
2330: 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 31 0a 5f TCLINSTALL.= 1._
2340: 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d TCL_H =
2350: 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c $(_TCLDIR)\incl
2360: 75 64 65 5c 74 63 6c 2e 68 0a 21 65 6c 73 65 69 ude\tcl.h.!elsei
2370: 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 f exist("$(_TCLD
2380: 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e IR)\generic\tcl.
2390: 68 22 29 20 23 20 43 61 73 65 20 32 28 64 29 20 h") # Case 2(d)
23a0: 77 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 69 with TCLDIR defi
23b0: 6e 65 64 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d ned.TCLINSTALL.=
23c0: 20 30 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 0._TCL_H
23d0: 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c = $(_TCLDIR)\
23e0: 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 65 generic\tcl.h.!e
23f0: 6e 64 69 66 0a 0a 21 65 6c 73 65 20 20 23 20 20 ndif..!else #
2400: 23 20 43 61 73 65 20 32 28 63 29 20 66 6f 72 20 # Case 2(c) for
2410: 65 78 74 65 6e 73 69 6f 6e 73 20 77 69 74 68 20 extensions with
2420: 54 43 4c 44 49 52 20 75 6e 64 65 66 69 6e 65 64 TCLDIR undefined
2430: 0a 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 61 ..# Need to loca
2440: 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e 67 te Tcl depending
2450: 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 6e on whether it n
2460: 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 20 eeds Tcl source
2470: 6f 72 20 6e 6f 74 2e 0a 23 20 49 66 20 77 65 20 or not..# If we
2480: 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 65 don't, check the
2490: 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 20 INSTALLDIR for
24a0: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
24b0: 20 66 69 72 73 74 0a 0a 21 69 66 20 65 78 69 73 first..!if exis
24c0: 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 t("$(_INSTALLDIR
24d0: 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 )\include\tcl.h"
24e0: 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 43 4c ) && !$(NEED_TCL
24f0: 5f 53 4f 55 52 43 45 29 0a 0a 54 43 4c 49 4e 53 _SOURCE)..TCLINS
2500: 54 41 4c 4c 09 3d 20 31 0a 54 43 4c 44 49 52 20 TALL.= 1.TCLDIR
2510: 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e = $(_IN
2520: 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 23 20 4e STALLDIR)\...# N
2530: 4f 54 45 3a 20 77 65 20 77 69 6c 6c 20 62 65 20 OTE: we will be
2540: 72 65 73 65 74 74 69 6e 67 20 5f 49 4e 53 54 41 resetting _INSTA
2550: 4c 4c 44 49 52 20 74 6f 20 5f 49 4e 53 54 41 4c LLDIR to _INSTAL
2560: 4c 44 49 52 2f 6c 69 62 20 66 6f 72 20 65 78 74 LDIR/lib for ext
2570: 65 6e 73 69 6f 6e 73 0a 23 20 6c 61 74 65 72 20 ensions.# later
2580: 73 6f 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f 75 so the \.. accou
2590: 6e 74 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 62 nts for the /lib
25a0: 0a 5f 54 43 4c 44 49 52 09 09 3d 20 24 28 5f 49 ._TCLDIR..= $(_I
25b0: 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f 54 NSTALLDIR)\..._T
25c0: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 CL_H =
25d0: 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 $(_TCLDIR)\inclu
25e0: 64 65 5c 74 63 6c 2e 68 0a 0a 21 65 6c 73 65 20 de\tcl.h..!else
25f0: 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 # exist(...) &&
2600: 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 !$(NEED_TCL_SOUR
2610: 43 45 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 5f CE)..!if [echo _
2620: 54 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b TCLDIR = \> nmak
2630: 65 68 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c ehlp.out] \. |
2640: 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 | [nmakehlp -L g
2650: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 eneric\tcl.h >>
2660: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 nmakehlp.out].!e
2670: 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e rror *** Could n
2680: 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f ot locate Tcl so
2690: 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e 0a urce directory..
26a0: 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 !endif.!include
26b0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 54 43 4c nmakehlp.out.TCL
26c0: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 INSTALL = 0
26d0: 0a 54 43 4c 44 49 52 20 20 20 20 20 20 20 20 20 .TCLDIR
26e0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 0a 5f 54 43 = $(_TCLDIR)._TC
26f0: 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 L_H = $
2700: 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 (_TCLDIR)\generi
2710: 63 5c 74 63 6c 2e 68 0a 0a 21 65 6e 64 69 66 20 c\tcl.h..!endif
2720: 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 # exist(...) &&
2730: 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 !$(NEED_TCL_SOUR
2740: 43 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 43 CE)..!endif # TC
2750: 4c 44 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f 54 LDIR..!ifndef _T
2760: 43 4c 5f 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 6c CL_H.MSG =^.Fail
2770: 65 64 20 74 6f 20 66 69 6e 64 20 74 63 6c 2e 68 ed to find tcl.h
2780: 2e 20 54 68 65 20 54 43 4c 44 49 52 20 6d 61 63 . The TCLDIR mac
2790: 72 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 72 ro is set incorr
27a0: 65 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 ectly or is not
27b0: 73 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 20 set and default
27c0: 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f path does not co
27d0: 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0a 21 65 72 ntain tcl.h..!er
27e0: 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 ror $(MSG).!endi
27f0: 66 0a 0a 23 20 4e 6f 77 20 64 6f 20 74 68 65 20 f..# Now do the
2800: 73 61 6d 65 20 74 6f 20 6c 6f 63 61 74 65 20 54 same to locate T
2810: 6b 20 68 65 61 64 65 72 73 20 61 6e 64 20 6c 69 k headers and li
2820: 62 73 20 69 66 20 70 72 6f 6a 65 63 74 20 72 65 bs if project re
2830: 71 75 69 72 65 73 20 54 6b 0a 21 69 66 20 24 28 quires Tk.!if $(
2840: 4e 45 45 44 5f 54 4b 29 0a 0a 21 69 66 20 22 24 NEED_TK)..!if "$
2850: 28 54 4b 44 49 52 29 22 20 21 3d 20 22 22 0a 0a (TKDIR)" != ""..
2860: 5f 54 4b 44 49 52 20 3d 20 24 28 54 4b 44 49 52 _TKDIR = $(TKDIR
2870: 3a 2f 3d 5c 29 0a 21 69 66 20 65 78 69 73 74 28 :/=\).!if exist(
2880: 22 24 28 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 "$(_TKDIR)\inclu
2890: 64 65 5c 74 6b 2e 68 22 29 0a 54 4b 49 4e 53 54 de\tk.h").TKINST
28a0: 41 4c 4c 20 20 20 20 20 20 3d 20 31 0a 5f 54 4b ALL = 1._TK
28b0: 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 _H = $(
28c0: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c _TKDIR)\include\
28d0: 74 6b 2e 68 0a 21 65 6c 73 65 69 66 20 65 78 69 tk.h.!elseif exi
28e0: 73 74 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 st("$(_TKDIR)\ge
28f0: 6e 65 72 69 63 5c 74 6b 2e 68 22 29 0a 54 4b 49 neric\tk.h").TKI
2900: 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 0a NSTALL = 0.
2910: 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 20 3d _TK_H =
2920: 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 $(_TKDIR)\gener
2930: 69 63 5c 74 6b 2e 68 0a 21 65 6e 64 69 66 0a 0a ic\tk.h.!endif..
2940: 21 65 6c 73 65 20 23 20 54 4b 44 49 52 20 6e 6f !else # TKDIR no
2950: 74 20 64 65 66 69 6e 65 64 0a 0a 23 20 4e 65 65 t defined..# Nee
2960: 64 20 74 6f 20 6c 6f 63 61 74 65 20 54 63 6c 20 d to locate Tcl
2970: 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77 68 65 depending on whe
2980: 74 68 65 72 20 69 74 20 6e 65 65 64 73 20 54 63 ther it needs Tc
2990: 6c 20 73 6f 75 72 63 65 20 6f 72 20 6e 6f 74 2e l source or not.
29a0: 0a 23 20 49 66 20 77 65 20 64 6f 6e 27 74 2c 20 .# If we don't,
29b0: 63 68 65 63 6b 20 74 68 65 20 49 4e 53 54 41 4c check the INSTAL
29c0: 4c 44 49 52 20 66 6f 72 20 61 6e 20 69 6e 73 74 LDIR for an inst
29d0: 61 6c 6c 65 64 20 54 63 6c 20 66 69 72 73 74 0a alled Tcl first.
29e0: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 49 .!if exist("$(_I
29f0: 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 NSTALLDIR)\inclu
2a00: 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 28 de\tk.h") && !$(
2a10: 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a NEED_TK_SOURCE).
2a20: 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 .TKINSTALL
2a30: 3d 20 31 0a 23 20 4e 4f 54 45 3a 20 77 65 20 77 = 1.# NOTE: we w
2a40: 69 6c 6c 20 62 65 20 72 65 73 65 74 74 69 6e 67 ill be resetting
2a50: 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 74 6f 20 _INSTALLDIR to
2a60: 5f 49 4e 53 54 41 4c 4c 44 49 52 2f 6c 69 62 20 _INSTALLDIR/lib
2a70: 66 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 for extensions.#
2a80: 20 6c 61 74 65 72 20 73 6f 20 74 68 65 20 5c 2e later so the \.
2a90: 2e 20 61 63 63 6f 75 6e 74 73 20 66 6f 72 20 74 . accounts for t
2aa0: 68 65 20 2f 6c 69 62 0a 5f 54 4b 44 49 52 20 20 he /lib._TKDIR
2ab0: 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 = $(_INST
2ac0: 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f 54 4b 5f 48 ALLDIR)\..._TK_H
2ad0: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2ae0: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b KDIR)\include\tk
2af0: 2e 68 0a 54 4b 44 49 52 20 20 20 20 20 20 20 20 .h.TKDIR
2b00: 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0a 0a 21 = $(_TKDIR)..!
2b10: 65 6c 73 65 20 23 20 65 78 69 73 74 28 22 24 28 else # exist("$(
2b20: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 _INSTALLDIR)\inc
2b30: 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 lude\tk.h") && !
2b40: 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 $(NEED_TK_SOURCE
2b50: 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 5f 54 4b )..!if [echo _TK
2b60: 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c DIR = \> nmakehl
2b70: 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b p.out] \. || [
2b80: 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e 65 nmakehlp -L gene
2b90: 72 69 63 5c 74 6b 2e 68 20 3e 3e 20 6e 6d 61 6b ric\tk.h >> nmak
2ba0: 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 ehlp.out].!error
2bb0: 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 6c *** Could not l
2bc0: 6f 63 61 74 65 20 54 6b 20 73 6f 75 72 63 65 20 ocate Tk source
2bd0: 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 directory..!endi
2be0: 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 f.!include nmake
2bf0: 68 6c 70 2e 6f 75 74 0a 54 4b 49 4e 53 54 41 4c hlp.out.TKINSTAL
2c00: 4c 20 20 20 20 20 20 3d 20 30 0a 54 4b 44 49 52 L = 0.TKDIR
2c10: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2c20: 4b 44 49 52 29 0a 5f 54 4b 5f 48 20 20 20 20 20 KDIR)._TK_H
2c30: 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 = $(_TKDIR)
2c40: 5c 67 65 6e 65 72 69 63 5c 74 6b 2e 68 0a 0a 21 \generic\tk.h..!
2c50: 65 6e 64 69 66 20 23 20 65 78 69 73 74 28 22 24 endif # exist("$
2c60: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e (_INSTALLDIR)\in
2c70: 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 clude\tk.h") &&
2c80: 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 !$(NEED_TK_SOURC
2c90: 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 4b 44 E)..!endif # TKD
2ca0: 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f 54 4b 5f IR..!ifndef _TK_
2cb0: 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 6c 65 64 20 H.MSG =^.Failed
2cc0: 74 6f 20 66 69 6e 64 20 74 6b 2e 68 2e 20 54 68 to find tk.h. Th
2cd0: 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 69 73 e TKDIR macro is
2ce0: 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 6c 79 set incorrectly
2cf0: 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 20 61 or is not set a
2d00: 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 68 20 nd default path
2d10: 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e does not contain
2d20: 20 74 6b 2e 68 2e 0a 21 65 72 72 6f 72 20 24 28 tk.h..!error $(
2d30: 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a 21 65 6e MSG).!endif..!en
2d40: 64 69 66 20 23 20 4e 45 45 44 5f 54 4b 0a 0a 21 dif # NEED_TK..!
2d50: 69 66 20 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f if $(NEED_TCL_SO
2d60: 55 52 43 45 29 20 26 26 20 24 28 54 43 4c 49 4e URCE) && $(TCLIN
2d70: 53 54 41 4c 4c 29 0a 4d 53 47 20 3d 20 5e 0a 2a STALL).MSG = ^.*
2d80: 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 54 68 69 73 ** Warning: This
2d90: 20 65 78 74 65 6e 73 69 6f 6e 20 72 65 71 75 69 extension requi
2da0: 72 65 73 20 74 68 65 20 73 6f 75 72 63 65 20 64 res the source d
2db0: 69 73 74 72 69 62 75 74 69 6f 6e 20 6f 66 20 54 istribution of T
2dc0: 63 6c 2e 5e 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 cl.^.*** Please
2dd0: 73 65 74 20 74 68 65 20 54 43 4c 44 49 52 20 6d set the TCLDIR m
2de0: 61 63 72 6f 20 74 6f 20 70 6f 69 6e 74 20 74 6f acro to point to
2df0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 73 the Tcl sources
2e00: 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 0a ..!error $(MSG).
2e10: 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 4e 45 !endif..!if $(NE
2e20: 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 21 69 ED_TK_SOURCE).!i
2e30: 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 0a 4d f $(TKINSTALL).M
2e40: 53 47 20 3d 20 5e 0a 2a 2a 2a 20 57 61 72 6e 69 SG = ^.*** Warni
2e50: 6e 67 3a 20 54 68 69 73 20 65 78 74 65 6e 73 69 ng: This extensi
2e60: 6f 6e 20 72 65 71 75 69 72 65 73 20 74 68 65 20 on requires the
2e70: 73 6f 75 72 63 65 20 64 69 73 74 72 69 62 75 74 source distribut
2e80: 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0a 2a 2a 2a 20 ion of Tk.^.***
2e90: 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 54 Please set the T
2ea0: 4b 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 6f KDIR macro to po
2eb0: 69 6e 74 20 74 6f 20 74 68 65 20 54 6b 20 73 6f int to the Tk so
2ec0: 75 72 63 65 73 2e 0a 21 65 72 72 6f 72 20 24 28 urces..!error $(
2ed0: 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 MSG).!endif.!end
2ee0: 69 66 0a 0a 0a 23 20 49 66 20 49 4e 53 54 41 4c if...# If INSTAL
2ef0: 4c 44 49 52 20 73 65 74 20 74 6f 20 54 63 6c 20 LDIR set to Tcl
2f00: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 72 6f 6f installation roo
2f10: 74 20 64 69 72 20 74 68 65 6e 20 72 65 73 65 74 t dir then reset
2f20: 20 74 6f 20 74 68 65 0a 23 20 6c 69 62 20 64 69 to the.# lib di
2f30: 72 20 66 6f 72 20 69 6e 73 74 61 6c 6c 69 6e 67 r for installing
2f40: 20 65 78 74 65 6e 73 69 6f 6e 73 0a 21 69 66 20 extensions.!if
2f50: 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c exist("$(_INSTAL
2f60: 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 LDIR)\include\tc
2f70: 6c 2e 68 22 29 0a 5f 49 4e 53 54 41 4c 4c 44 49 l.h")._INSTALLDI
2f80: 52 3d 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 R=$(_INSTALLDIR)
2f90: 5c 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 20 45 \lib.!endif..# E
2fa0: 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f 72 20 ND Case 2(c) or
2fb0: 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 61 (d) - Building a
2fc0: 6e 20 65 78 74 65 6e 73 69 6f 6e 0a 21 65 6e 64 n extension.!end
2fd0: 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e 47 5f if # if $(DOING_
2fe0: 54 43 4c 29 0a 0a 23 23 23 23 23 23 23 23 23 23 TCL)..##########
2ff0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 33 2e 20 44 65 74 65 ######.# 3. Dete
3030: 72 6d 69 6e 65 20 63 6f 6d 70 69 6c 65 72 20 76 rmine compiler v
3040: 65 72 73 69 6f 6e 20 61 6e 64 20 61 72 63 68 69 ersion and archi
3050: 74 65 63 74 75 72 65 0a 23 20 49 6e 20 74 68 69 tecture.# In thi
3060: 73 20 73 65 63 74 69 6f 6e 2c 20 77 65 20 66 69 s section, we fi
3070: 67 75 72 65 20 6f 75 74 20 74 68 65 20 63 6f 6d gure out the com
3080: 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 6e piler version an
3090: 64 20 74 68 65 0a 23 20 61 72 63 68 69 74 65 63 d the.# architec
30a0: 74 75 72 65 20 66 6f 72 20 77 68 69 63 68 20 77 ture for which w
30b0: 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 2e 20 e are building.
30c0: 54 68 69 73 20 73 65 74 73 20 74 68 65 0a 23 20 This sets the.#
30d0: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
30e0: 3a 0a 23 20 56 43 56 45 52 53 49 4f 4e 20 2d 20 :.# VCVERSION -
30f0: 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 63 6f 6d the internal com
3100: 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 73 piler version as
3110: 20 31 32 30 30 2c 20 31 34 30 30 2c 20 31 39 31 1200, 1400, 191
3120: 30 20 65 74 63 2e 0a 23 20 20 20 20 20 54 68 69 0 etc..# Thi
3130: 73 20 69 73 20 61 6c 73 6f 20 70 72 69 6e 74 65 s is also printe
3140: 64 20 62 79 20 74 68 65 20 63 6f 6d 70 69 6c 65 d by the compile
3150: 72 20 69 6e 20 64 6f 74 74 65 64 20 66 6f 72 6d r in dotted form
3160: 20 31 39 2e 31 30 20 65 74 63 2e 0a 23 20 56 43 19.10 etc..# VC
3170: 56 45 52 20 2d 20 74 68 65 20 22 6d 61 72 6b 65 VER - the "marke
3180: 74 69 6e 67 20 76 65 72 73 69 6f 6e 22 2c 20 66 ting version", f
3190: 6f 72 20 65 78 61 6d 70 6c 65 20 56 69 73 75 61 or example Visua
31a0: 6c 20 43 2b 2b 20 36 20 66 6f 72 20 69 6e 74 65 l C++ 6 for inte
31b0: 72 6e 61 6c 0a 23 20 20 20 20 20 63 6f 6d 70 69 rnal.# compi
31c0: 6c 65 72 20 76 65 72 73 69 6f 6e 20 31 32 30 30 ler version 1200
31d0: 2e 20 54 68 69 73 20 69 73 20 6b 65 70 74 20 6f . This is kept o
31e0: 6e 6c 79 20 66 6f 72 20 6c 65 67 61 63 79 20 72 nly for legacy r
31f0: 65 61 73 6f 6e 73 20 61 73 20 69 74 0a 23 20 20 easons as it.#
3200: 20 20 20 64 6f 65 73 20 6e 6f 74 20 6d 61 6b 65 does not make
3210: 20 73 65 6e 73 65 20 66 6f 72 20 72 65 63 65 6e sense for recen
3220: 74 20 4d 69 63 72 6f 73 6f 66 74 20 63 6f 6d 70 t Microsoft comp
3230: 69 6c 65 72 73 2e 20 4f 6e 6c 79 20 75 73 65 64 ilers. Only used
3240: 20 66 6f 72 0a 23 20 20 20 20 20 6f 75 74 70 75 for.# outpu
3250: 74 20 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 t directory name
3260: 73 2e 0a 23 20 41 52 43 48 20 2d 20 73 65 74 20 s..# ARCH - set
3270: 74 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f to IX86, ARM64 o
3280: 72 20 41 4d 44 36 34 20 64 65 70 65 6e 64 69 6e r AMD64 dependin
3290: 67 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 2d 62 g on 32- or 64-b
32a0: 69 74 20 74 61 72 67 65 74 0a 23 20 4e 41 54 49 it target.# NATI
32b0: 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 74 6f VE_ARCH - set to
32c0: 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 20 IX86, ARM64 or
32d0: 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 68 6f AMD64 for the ho
32e0: 73 74 20 6d 61 63 68 69 6e 65 0a 23 20 4d 41 43 st machine.# MAC
32f0: 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20 24 HINE - same as $
3300: 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79 0a (ARCH) - legacy.
3310: 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 # _VC_MANIFEST_E
3320: 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d 20 2d MBED_{DLL,EXE} -
3330: 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 65 6d commands for em
3340: 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 66 65 bedding a manife
3350: 73 74 20 69 66 20 6e 65 65 64 65 64 0a 0a 63 63 st if needed..cc
3360: 33 32 09 09 3d 20 24 28 43 43 29 20 20 20 23 20 32..= $(CC) #
3370: 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c 74 built-in default
3380: 2e 0a 6c 69 6e 6b 33 32 09 09 3d 20 6c 69 6e 6b ..link32..= link
3390: 0a 6c 69 62 33 32 09 09 3d 20 6c 69 62 0a 72 63 .lib32..= lib.rc
33a0: 33 32 09 09 3d 20 24 28 52 43 29 20 20 20 23 20 32..= $(RC) #
33b0: 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c 74 built-in default
33c0: 2e 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ...#------------
33d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 23 20 46 69 67 75 72 65 20 6f 75 ----.# Figure ou
3410: 74 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 t the compiler a
3420: 72 63 68 69 74 65 63 74 75 72 65 20 61 6e 64 20 rchitecture and
3430: 76 65 72 73 69 6f 6e 20 62 79 20 77 72 69 74 69 version by writi
3440: 6e 67 0a 23 20 74 68 65 20 43 20 6d 61 63 72 6f ng.# the C macro
3450: 73 20 74 6f 20 61 20 66 69 6c 65 2c 20 70 72 65 s to a file, pre
3460: 70 72 6f 63 65 73 73 69 6e 67 20 74 68 65 6d 20 processing them
3470: 77 69 74 68 20 74 68 65 20 43 0a 23 20 70 72 65 with the C.# pre
3480: 70 72 6f 63 65 73 73 6f 72 20 61 6e 64 20 72 65 processor and re
3490: 61 64 69 6e 67 20 62 61 63 6b 20 74 68 65 20 63 ading back the c
34a0: 72 65 61 74 65 64 20 66 69 6c 65 0a 0a 5f 48 41 reated file.._HA
34b0: 53 48 3d 5e 23 0a 5f 56 43 5f 4d 41 4e 49 46 45 SH=^#._VC_MANIFE
34c0: 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0a 5f 56 ST_EMBED_EXE=._V
34d0: 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 C_MANIFEST_EMBED
34e0: 5f 44 4c 4c 3d 0a 56 43 56 45 52 3d 30 0a 21 69 _DLL=.VCVER=0.!i
34f0: 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 53 49 f ![echo VCVERSI
3500: 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 76 65 ON=_MSC_VER > ve
3510: 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 rcl.x] \. &&
3520: 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 69 ![echo $(_HASH)i
3530: 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 49 58 38 f defined(_M_IX8
3540: 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 6) >> vercl.x] \
3550: 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 41 . && ![echo A
3560: 52 43 48 3d 49 58 38 36 20 3e 3e 20 76 65 72 63 RCH=IX86 >> verc
3570: 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b l.x] \. && ![
3580: 65 63 68 6f 20 24 28 5f 48 41 53 48 29 65 6c 69 echo $(_HASH)eli
3590: 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 41 4d 44 f defined(_M_AMD
35a0: 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 64) >> vercl.x]
35b0: 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 \. && ![echo
35c0: 41 52 43 48 3d 41 4d 44 36 34 20 3e 3e 20 76 65 ARCH=AMD64 >> ve
35d0: 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 rcl.x] \. &&
35e0: 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 65 ![echo $(_HASH)e
35f0: 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 41 lif defined(_M_A
3600: 52 4d 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e 78 RM64) >> vercl.x
3610: 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 ] \. && ![ech
3620: 6f 20 41 52 43 48 3d 41 52 4d 36 34 20 3e 3e 20 o ARCH=ARM64 >>
3630: 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 vercl.x] \. &
3640: 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 & ![echo $(_HASH
3650: 29 65 6e 64 69 66 20 3e 3e 20 76 65 72 63 6c 2e )endif >> vercl.
3660: 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 24 28 x] \. && ![$(
3670: 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 2d 54 cc32) -nologo -T
3680: 43 20 2d 50 20 76 65 72 63 6c 2e 78 20 32 3e 4e C -P vercl.x 2>N
3690: 55 4c 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 UL].!include ver
36a0: 63 6c 2e 69 0a 21 69 66 20 24 28 56 43 56 45 52 cl.i.!if $(VCVER
36b0: 53 49 4f 4e 29 20 3c 20 31 39 30 30 0a 21 69 66 SION) < 1900.!if
36c0: 20 21 5b 65 63 68 6f 20 56 43 56 45 52 3d 20 5e ![echo VCVER= ^
36d0: 5c 3e 20 76 65 72 63 6c 2e 76 63 5d 20 5c 0a 20 \> vercl.vc] \.
36e0: 20 20 20 26 26 20 21 5b 73 65 74 20 2f 61 20 24 && ![set /a $
36f0: 28 56 43 56 45 52 53 49 4f 4e 29 20 2f 20 31 30 (VCVERSION) / 10
3700: 30 20 2d 20 36 20 3e 3e 20 76 65 72 63 6c 2e 76 0 - 6 >> vercl.v
3710: 63 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 63 c].!include verc
3720: 6c 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 6c 73 l.vc.!endif.!els
3730: 65 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 20 63 e.# The simple c
3740: 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f 76 65 alculation above
3750: 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c 79 20 does not apply
3760: 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 53 74 to new Visual St
3770: 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0a 23 20 udio releases.#
3780: 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 69 6c 65 Keep the compile
3790: 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 69 74 73 r version in its
37a0: 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e 0a 56 43 native form..VC
37b0: 56 45 52 20 3d 20 24 28 56 43 56 45 52 53 49 4f VER = $(VCVERSIO
37c0: 4e 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 N).!endif.!endif
37d0: 0a 0a 21 69 66 20 21 5b 64 65 6c 20 32 3e 4e 55 ..!if ![del 2>NU
37e0: 4c 20 2f 71 2f 66 20 76 65 72 63 6c 2e 78 20 76 L /q/f vercl.x v
37f0: 65 72 63 6c 2e 69 20 76 65 72 63 6c 2e 76 63 5d ercl.i vercl.vc]
3800: 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d .!endif..#------
3810: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 23 20 54 68 65 ----------.# The
3850: 20 4d 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 69 MACHINE macro i
3860: 73 20 75 73 65 64 20 62 79 20 6c 65 67 61 63 79 s used by legacy
3870: 20 6d 61 6b 65 66 69 6c 65 73 20 73 6f 20 73 65 makefiles so se
3880: 74 20 69 74 20 61 73 20 77 65 6c 6c 0a 21 69 66 t it as well.!if
3890: 64 65 66 20 4d 41 43 48 49 4e 45 0a 21 69 66 20 def MACHINE.!if
38a0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
38b0: 22 78 38 36 22 0a 21 75 6e 64 65 66 20 4d 41 43 "x86".!undef MAC
38c0: 48 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 49 HINE.MACHINE = I
38d0: 58 38 36 0a 21 65 6c 73 65 69 66 20 22 24 28 4d X86.!elseif "$(M
38e0: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72 6d ACHINE)" == "arm
38f0: 36 34 22 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 64".!undef MACHI
3900: 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 41 52 4d NE.MACHINE = ARM
3910: 36 34 0a 21 65 6c 73 65 69 66 20 22 24 28 4d 41 64.!elseif "$(MA
3920: 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 36 34 22 CHINE)" == "x64"
3930: 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4e 45 0a .!undef MACHINE.
3940: 4d 41 43 48 49 4e 45 20 3d 20 41 4d 44 36 34 0a MACHINE = AMD64.
3950: 21 65 6e 64 69 66 0a 21 69 66 20 22 24 28 4d 41 !endif.!if "$(MA
3960: 43 48 49 4e 45 29 22 20 21 3d 20 22 24 28 41 52 CHINE)" != "$(AR
3970: 43 48 29 22 0a 21 65 72 72 6f 72 20 53 70 65 63 CH)".!error Spec
3980: 69 66 69 65 64 20 4d 41 43 48 49 4e 45 20 6d 61 ified MACHINE ma
3990: 63 72 6f 20 24 28 4d 41 43 48 49 4e 45 29 20 64 cro $(MACHINE) d
39a0: 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 64 65 oes not match de
39b0: 74 65 63 74 65 64 20 74 61 72 67 65 74 20 61 72 tected target ar
39c0: 63 68 69 74 65 63 74 75 72 65 20 24 28 41 52 43 chitecture $(ARC
39d0: 48 29 2e 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 H)..!endif.!else
39e0: 0a 4d 41 43 48 49 4e 45 3d 24 28 41 52 43 48 29 .MACHINE=$(ARCH)
39f0: 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d .!endif..#------
3a00: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 65 20 ---------.# The
3a40: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 PLATFORM_IDENTIF
3a50: 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 20 Y macro matches
3a60: 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 75 72 the values retur
3a70: 6e 65 64 20 62 79 0a 23 20 74 68 65 20 54 63 6c ned by.# the Tcl
3a80: 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e 74 platform::ident
3a90: 69 66 79 20 63 6f 6d 6d 61 6e 64 0a 21 69 66 20 ify command.!if
3aa0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
3ab0: 22 41 4d 44 36 34 22 0a 50 4c 41 54 46 4f 52 4d "AMD64".PLATFORM
3ac0: 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 6e 33 _IDENTIFY = win3
3ad0: 32 2d 78 38 36 5f 36 34 0a 21 65 6c 73 65 69 66 2-x86_64.!elseif
3ae0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
3af0: 20 22 41 52 4d 36 34 22 0a 50 4c 41 54 46 4f 52 "ARM64".PLATFOR
3b00: 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 6e M_IDENTIFY = win
3b10: 33 32 2d 61 72 6d 0a 21 65 6c 73 65 0a 50 4c 41 32-arm.!else.PLA
3b20: 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d TFORM_IDENTIFY =
3b30: 20 77 69 6e 33 32 2d 69 78 38 36 0a 21 65 6e 64 win32-ix86.!end
3b40: 69 66 0a 0a 23 20 54 68 65 20 4d 55 4c 54 49 50 if..# The MULTIP
3b50: 4c 41 54 46 4f 52 4d 20 6d 61 63 72 6f 20 63 6f LATFORM macro co
3b60: 6e 74 72 6f 6c 73 20 77 68 65 74 68 65 72 20 62 ntrols whether b
3b70: 69 6e 61 72 79 20 65 78 74 65 6e 73 69 6f 6e 73 inary extensions
3b80: 20 61 72 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 are installed.#
3b90: 20 69 6e 20 70 6c 61 74 66 6f 72 6d 2d 73 70 65 in platform-spe
3ba0: 63 69 66 69 63 20 64 69 72 65 63 74 6f 72 69 65 cific directorie
3bb0: 73 2e 20 49 6e 74 65 6e 64 65 64 20 74 6f 20 62 s. Intended to b
3bc0: 65 20 73 65 74 2f 75 73 65 64 20 62 79 20 65 78 e set/used by ex
3bd0: 74 65 6e 73 69 6f 6e 73 2e 0a 21 69 66 6e 64 65 tensions..!ifnde
3be0: 66 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f f MULTIPLATFORM_
3bf0: 49 4e 53 54 41 4c 4c 0a 4d 55 4c 54 49 50 4c 41 INSTALL.MULTIPLA
3c00: 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 20 3d 20 TFORM_INSTALL =
3c10: 30 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 0.!endif..#-----
3c20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 23 20 46 69 67 75 72 65 -------.# Figure
3c60: 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a 20 out the *host*
3c70: 61 72 63 68 69 74 65 63 74 75 72 65 20 62 79 20 architecture by
3c80: 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 67 69 reading the regi
3c90: 73 74 72 79 0a 0a 21 69 66 20 21 5b 72 65 67 20 stry..!if ![reg
3ca0: 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 77 query HKLM\Hardw
3cb0: 61 72 65 5c 44 65 73 63 72 69 70 74 69 6f 6e 5c are\Description\
3cc0: 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 72 System\CentralPr
3cd0: 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 65 ocessor\0 /v Ide
3ce0: 6e 74 69 66 69 65 72 20 7c 20 66 69 6e 64 73 74 ntifier | findst
3cf0: 72 20 2f 69 20 78 38 36 5d 0a 4e 41 54 49 56 45 r /i x86].NATIVE
3d00: 5f 41 52 43 48 3d 49 58 38 36 0a 21 65 6c 73 65 _ARCH=IX86.!else
3d10: 69 66 20 21 5b 72 65 67 20 71 75 65 72 79 20 48 if ![reg query H
3d20: 4b 4c 4d 5c 48 61 72 64 77 61 72 65 5c 44 65 73 KLM\Hardware\Des
3d30: 63 72 69 70 74 69 6f 6e 5c 53 79 73 74 65 6d 5c cription\System\
3d40: 43 65 6e 74 72 61 6c 50 72 6f 63 65 73 73 6f 72 CentralProcessor
3d50: 5c 30 20 2f 76 20 49 64 65 6e 74 69 66 69 65 72 \0 /v Identifier
3d60: 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 41 52 | findstr /i AR
3d70: 4d 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 36 M | findstr /i 6
3d80: 34 2d 62 69 74 5d 0a 4e 41 54 49 56 45 5f 41 52 4-bit].NATIVE_AR
3d90: 43 48 3d 41 52 4d 36 34 0a 21 65 6c 73 65 0a 4e CH=ARM64.!else.N
3da0: 41 54 49 56 45 5f 41 52 43 48 3d 41 4d 44 36 34 ATIVE_ARCH=AMD64
3db0: 0a 21 65 6e 64 69 66 0a 0a 23 20 53 69 6e 63 65 .!endif..# Since
3dc0: 20 4d 53 56 43 38 20 77 65 20 6d 75 73 74 20 64 MSVC8 we must d
3dd0: 65 61 6c 20 77 69 74 68 20 6d 61 6e 69 66 65 73 eal with manifes
3de0: 74 20 72 65 73 6f 75 72 63 65 73 2e 0a 21 69 66 t resources..!if
3df0: 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d $(VCVERSION) >=
3e00: 20 31 34 30 30 0a 5f 56 43 5f 4d 41 4e 49 46 45 1400._VC_MANIFE
3e10: 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 69 66 20 ST_EMBED_EXE=if
3e20: 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 73 exist $@.manifes
3e30: 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 t mt -nologo -ma
3e40: 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 65 nifest $@.manife
3e50: 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 72 st -outputresour
3e60: 63 65 3a 24 40 3b 31 0a 5f 56 43 5f 4d 41 4e 49 ce:$@;1._VC_MANI
3e70: 46 45 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d 69 FEST_EMBED_DLL=i
3e80: 66 20 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 f exist $@.manif
3e90: 65 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d est mt -nologo -
3ea0: 6d 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 manifest $@.mani
3eb0: 66 65 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f fest -outputreso
3ec0: 75 72 63 65 3a 24 40 3b 32 0a 21 65 6e 64 69 66 urce:$@;2.!endif
3ed0: 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
3ee0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 34 2e 20 42 75 69 6c 64 20 74 68 ##.# 4. Build th
3f20: 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f 67 72 e nmakehlp progr
3f30: 61 6d 0a 23 20 54 68 69 73 20 69 73 20 61 20 68 am.# This is a h
3f40: 65 6c 70 65 72 20 61 70 70 20 77 65 20 6e 65 65 elper app we nee
3f50: 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 6e 6d d to overcome nm
3f60: 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e 67 0a 23 ake's limiting.#
3f70: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 20 57 65 environment. We
3f80: 20 77 69 6c 6c 20 63 61 6c 6c 20 6f 75 74 20 74 will call out t
3f90: 6f 20 69 74 20 74 6f 20 67 65 74 20 76 61 72 69 o it to get vari
3fa0: 6f 75 73 20 62 69 74 73 20 6f 66 0a 23 20 69 6e ous bits of.# in
3fb0: 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 formation about
3fc0: 73 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 6c supported compil
3fd0: 65 72 20 6f 70 74 69 6f 6e 73 20 65 74 63 2e 0a er options etc..
3fe0: 23 0a 23 20 54 63 6c 20 69 74 73 65 6c 66 20 77 #.# Tcl itself w
3ff0: 69 6c 6c 20 61 6c 77 61 79 73 20 75 73 65 20 74 ill always use t
4000: 68 65 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 70 72 he nmakehlp.c pr
4010: 6f 67 72 61 6d 20 77 68 69 63 68 20 69 73 0a 23 ogram which is.#
4020: 20 69 6e 20 69 74 73 20 6f 77 6e 20 73 6f 75 72 in its own sour
4030: 63 65 2e 20 49 74 20 77 69 6c 6c 20 62 65 20 6b ce. It will be k
4040: 65 70 74 20 75 70 64 61 74 65 64 20 74 68 65 72 ept updated ther
4050: 65 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f 6e e..#.# Extension
4060: 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 s built against
4070: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
4080: 20 77 69 6c 6c 20 75 73 65 20 74 68 65 20 69 6e will use the in
4090: 73 74 61 6c 6c 65 64 0a 23 20 63 6f 70 79 20 6f stalled.# copy o
40a0: 66 20 54 63 6c 27 73 20 6e 6d 61 6b 65 68 6c 70 f Tcl's nmakehlp
40b0: 2e 63 20 69 66 20 74 68 65 72 65 20 69 73 20 6f .c if there is o
40c0: 6e 65 20 61 6e 64 20 74 68 65 69 72 20 6f 77 6e ne and their own
40d0: 20 76 65 72 73 69 6f 6e 0a 23 20 6f 74 68 65 72 version.# other
40e0: 77 69 73 65 2e 20 49 6e 20 74 68 65 20 6c 61 74 wise. In the lat
40f0: 74 65 72 20 63 61 73 65 2c 20 74 68 65 79 20 77 ter case, they w
4100: 6f 75 6c 64 20 61 6c 73 6f 20 62 65 20 75 73 69 ould also be usi
4110: 6e 67 20 74 68 65 69 72 20 6f 77 6e 0a 23 20 72 ng their own.# r
4120: 75 6c 65 73 2e 76 63 2e 20 4e 6f 74 65 20 74 68 ules.vc. Note th
4130: 61 74 20 6f 6c 64 65 72 20 76 65 72 73 69 6f 6e at older version
4140: 73 20 6f 66 20 54 63 6c 20 64 6f 20 6e 6f 74 20 s of Tcl do not
4150: 69 6e 73 74 61 6c 6c 20 6e 6d 61 6b 65 68 6c 70 install nmakehlp
4160: 2e 63 0a 23 20 6f 72 20 72 75 6c 65 73 2e 76 63 .c.# or rules.vc
4170: 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f 6e 73 ..#.# Extensions
4180: 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 54 built against T
4190: 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c 6c 20 cl sources will
41a0: 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 6f 6d use the one from
41b0: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 2e the Tcl source.
41c0: 0a 23 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 .#.# When buildi
41d0: 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 ng an extension
41e0: 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 69 65 using a sufficie
41f0: 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 6f 6e ntly new version
4200: 20 6f 66 20 54 63 6c 2c 0a 23 20 72 75 6c 65 73 of Tcl,.# rules
4210: 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 64 65 66 -ext.vc will def
4220: 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 20 61 70 ine NMAKEHLPC ap
4230: 70 72 6f 70 72 69 61 74 65 6c 79 20 74 6f 20 70 propriately to p
4240: 6f 69 6e 74 20 74 6f 20 74 68 65 0a 23 20 63 6f oint to the.# co
4250: 70 79 20 6f 66 20 6e 6d 61 6b 65 68 6c 70 2e 63 py of nmakehlp.c
4260: 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 0a 21 69 to be used...!i
4270: 66 6e 64 65 66 20 4e 4d 41 4b 45 48 4c 50 43 0a fndef NMAKEHLPC.
4280: 23 20 44 65 66 61 75 6c 74 20 74 6f 20 74 68 65 # Default to the
4290: 20 6f 6e 65 20 69 6e 20 74 68 65 20 63 75 72 72 one in the curr
42a0: 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 28 74 ent directory (t
42b0: 68 65 20 65 78 74 65 6e 73 69 6f 6e 27 73 20 6f he extension's o
42c0: 77 6e 20 6e 6d 61 6b 65 68 6c 70 2e 63 29 0a 4e wn nmakehlp.c).N
42d0: 4d 41 4b 45 48 4c 50 43 20 3d 20 6e 6d 61 6b 65 MAKEHLPC = nmake
42e0: 68 6c 70 2e 63 0a 0a 21 69 66 20 21 24 28 44 4f hlp.c..!if !$(DO
42f0: 49 4e 47 5f 54 43 4c 29 0a 21 69 66 20 24 28 54 ING_TCL).!if $(T
4300: 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 69 66 20 65 CLINSTALL).!if e
4310: 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 xist("$(_TCLDIR)
4320: 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 \lib\nmake\nmake
4330: 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 4c 50 hlp.c").NMAKEHLP
4340: 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c C = $(_TCLDIR)\l
4350: 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 6c ib\nmake\nmakehl
4360: 70 2e 63 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 p.c.!endif.!else
4370: 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c # !$(TCLINSTALL
4380: 29 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f ).!if exist("$(_
4390: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 6b TCLDIR)\win\nmak
43a0: 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 4c ehlp.c").NMAKEHL
43b0: 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c PC = $(_TCLDIR)\
43c0: 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0a 21 win\nmakehlp.c.!
43d0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 24 endif.!endif # $
43e0: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 65 6e (TCLINSTALL).!en
43f0: 64 69 66 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 dif # !$(DOING_T
4400: 43 4c 29 0a 0a 21 65 6e 64 69 66 20 23 20 4e 4d CL)..!endif # NM
4410: 41 4b 45 48 4c 50 43 0a 0a 23 20 57 65 20 61 6c AKEHLPC..# We al
4420: 77 61 79 73 20 62 75 69 6c 64 20 6e 6d 61 6b 65 ways build nmake
4430: 68 6c 70 20 65 76 65 6e 20 69 66 20 69 74 20 65 hlp even if it e
4440: 78 69 73 74 73 20 73 69 6e 63 65 20 77 65 20 64 xists since we d
4450: 6f 20 6e 6f 74 20 6b 6e 6f 77 0a 23 20 77 68 61 o not know.# wha
4460: 74 20 73 6f 75 72 63 65 20 69 74 20 77 61 73 20 t source it was
4470: 62 75 69 6c 74 20 66 72 6f 6d 2e 0a 21 69 66 20 built from..!if
4480: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
4490: 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 "IX86" || "$(MAC
44a0: 48 49 4e 45 29 22 20 3d 3d 20 22 24 28 4e 41 54 HINE)" == "$(NAT
44b0: 49 56 45 5f 41 52 43 48 29 22 0a 21 69 66 20 5b IVE_ARCH)".!if [
44c0: 24 28 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 $(cc32) -nologo
44d0: 22 24 28 4e 4d 41 4b 45 48 4c 50 43 29 22 20 2d "$(NMAKEHLPC)" -
44e0: 6c 69 6e 6b 20 2d 73 75 62 73 79 73 74 65 6d 3a link -subsystem:
44f0: 63 6f 6e 73 6f 6c 65 20 3e 20 6e 75 6c 5d 0a 21 console > nul].!
4500: 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 20 endif.!else.!if
4510: 5b 63 6f 70 79 20 24 28 4e 4d 41 4b 45 48 4c 50 [copy $(NMAKEHLP
4520: 43 3a 6e 6d 61 6b 65 68 6c 70 2e 63 3d 78 38 36 C:nmakehlp.c=x86
4530: 5f 36 34 2d 77 36 34 2d 6d 69 6e 67 77 33 32 2d _64-w64-mingw32-
4540: 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 29 20 6e 6d nmakehlp.exe) nm
4550: 61 6b 65 68 6c 70 2e 65 78 65 20 3e 4e 55 4c 5d akehlp.exe >NUL]
4560: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
4570: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4580: 23 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: 0a 23 20 35 2e 20 54 65 73 74 20 66 6f 72 20 63 .# 5. Test for c
45c0: 6f 6d 70 69 6c 65 72 20 66 65 61 74 75 72 65 73 ompiler features
45d0: 0a 23 20 56 69 73 75 61 6c 20 43 2b 2b 20 63 6f .# Visual C++ co
45e0: 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 68 mpiler options h
45f0: 61 76 65 20 63 68 61 6e 67 65 64 20 6f 76 65 72 ave changed over
4600: 20 74 68 65 20 79 65 61 72 73 2e 20 43 68 65 63 the years. Chec
4610: 6b 0a 23 20 77 68 69 63 68 20 6f 70 74 69 6f 6e k.# which option
4620: 73 20 61 72 65 20 73 75 70 70 6f 72 74 65 64 20 s are supported
4630: 62 79 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 by the compiler
4640: 69 6e 20 75 73 65 2e 0a 23 0a 23 20 54 68 65 20 in use..#.# The
4650: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
4660: 20 61 72 65 20 73 65 74 3a 0a 23 20 4f 50 54 49 are set:.# OPTI
4670: 4d 49 5a 41 54 49 4f 4e 53 20 2d 20 74 68 65 20 MIZATIONS - the
4680: 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 73 20 74 compiler flags t
4690: 6f 20 62 65 20 75 73 65 64 20 66 6f 72 20 6f 70 o be used for op
46a0: 74 69 6d 69 7a 65 64 20 62 75 69 6c 64 73 0a 23 timized builds.#
46b0: 20 44 45 42 55 47 46 4c 41 47 53 20 2d 20 74 68 DEBUGFLAGS - th
46c0: 65 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 73 e compiler flags
46d0: 20 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72 20 to be used for
46e0: 64 65 62 75 67 20 62 75 69 6c 64 73 0a 23 20 4c debug builds.# L
46f0: 49 4e 4b 45 52 46 4c 41 47 53 20 2d 20 46 6c 61 INKERFLAGS - Fla
4700: 67 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 gs passed to the
4710: 20 6c 69 6e 6b 65 72 0a 23 0a 23 20 4e 6f 74 65 linker.#.# Note
4720: 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 20 that these are
4730: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 73 65 74 the compiler set
4740: 74 69 6e 67 73 20 2a 61 76 61 69 6c 61 62 6c 65 tings *available
4750: 2a 2c 20 6e 6f 74 20 74 68 6f 73 65 0a 23 20 74 *, not those.# t
4760: 68 61 74 20 77 69 6c 6c 20 62 65 20 2a 75 73 65 hat will be *use
4770: 64 2a 2e 20 54 68 65 20 6c 61 74 74 65 72 20 64 d*. The latter d
4780: 65 70 65 6e 64 73 20 6f 6e 20 74 68 65 20 4f 50 epends on the OP
4790: 54 53 20 6d 61 63 72 6f 20 73 65 74 74 69 6e 67 TS macro setting
47a0: 73 0a 23 20 77 68 69 63 68 20 77 65 20 68 61 76 s.# which we hav
47b0: 65 20 6e 6f 74 20 79 65 74 20 70 61 72 73 65 64 e not yet parsed
47c0: 2e 0a 23 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 20 ..#.# Also note
47d0: 74 68 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 65 that some of the
47e0: 20 66 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d 49 flags in OPTIMI
47f0: 5a 41 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 20 ZATIONS are not
4800: 72 65 61 6c 6c 79 0a 23 20 72 65 6c 61 74 65 64 really.# related
4810: 20 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e to optimization
4820: 2e 20 54 68 65 79 20 61 72 65 20 70 6c 61 63 65 . They are place
4830: 64 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f 72 d there only for
4840: 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 0a legacy reasons.
4850: 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65 6e 73 # as some extens
4860: 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68 65 6d ions expect them
4870: 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65 64 20 to be included
4880: 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e 0a 0a in that macro...
4890: 23 20 2d 4f 70 20 69 6d 70 72 6f 76 65 73 20 66 # -Op improves f
48a0: 6c 6f 61 74 20 63 6f 6e 73 69 73 74 65 6e 63 79 loat consistency
48b0: 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20 6e 65 65 64 . Note only need
48c0: 65 64 20 66 6f 72 20 6f 6c 64 65 72 20 63 6f 6d ed for older com
48d0: 70 69 6c 65 72 73 0a 23 20 4e 65 77 65 72 20 63 pilers.# Newer c
48e0: 6f 6d 70 69 6c 65 72 73 20 64 6f 20 6e 6f 74 20 ompilers do not
48f0: 6e 65 65 64 20 6f 72 20 73 75 70 70 6f 72 74 20 need or support
4900: 74 68 69 73 20 6f 70 74 69 6f 6e 2e 0a 21 69 66 this option..!if
4910: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 4f [nmakehlp -c -O
4920: 70 5d 0a 46 50 4f 50 54 53 20 20 3d 20 2d 4f 70 p].FPOPTS = -Op
4930: 0a 21 65 6e 64 69 66 0a 0a 23 20 53 74 72 69 63 .!endif..# Stric
4940: 74 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e 74 t floating point
4950: 20 73 65 6d 61 6e 74 69 63 73 20 2d 20 70 72 65 semantics - pre
4960: 73 65 6e 74 20 69 6e 20 6e 65 77 65 72 20 63 6f sent in newer co
4970: 6d 70 69 6c 65 72 73 20 69 6e 20 6c 69 65 75 20 mpilers in lieu
4980: 6f 66 20 2d 4f 70 0a 21 69 66 20 5b 6e 6d 61 6b of -Op.!if [nmak
4990: 65 68 6c 70 20 2d 63 20 2d 66 70 3a 73 74 72 69 ehlp -c -fp:stri
49a0: 63 74 5d 0a 46 50 4f 50 54 53 20 20 3d 20 24 28 ct].FPOPTS = $(
49b0: 46 50 4f 50 54 53 29 20 2d 66 70 3a 73 74 72 69 FPOPTS) -fp:stri
49c0: 63 74 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 22 ct.!endif..!if "
49d0: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
49e0: 49 58 38 36 22 0a 23 23 23 20 74 65 73 74 20 66 IX86".### test f
49f0: 6f 72 20 70 65 6e 74 69 75 6d 20 65 72 72 61 74 or pentium errat
4a00: 61 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 a.!if [nmakehlp
4a10: 2d 63 20 2d 51 49 30 66 5d 0a 21 6d 65 73 73 61 -c -QI0f].!messa
4a20: 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 ge *** Compiler
4a30: 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30 78 30 has 'Pentium 0x0
4a40: 66 20 66 69 78 27 0a 46 50 4f 50 54 53 20 20 3d f fix'.FPOPTS =
4a50: 20 24 28 46 50 4f 50 54 53 29 20 2d 51 49 30 66 $(FPOPTS) -QI0f
4a60: 0a 21 65 6c 73 65 0a 21 6d 65 73 73 61 67 65 20 .!else.!message
4a70: 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f 65 *** Compiler doe
4a80: 73 20 6e 6f 74 20 68 61 76 65 20 27 50 65 6e 74 s not have 'Pent
4a90: 69 75 6d 20 30 78 30 66 20 66 69 78 27 0a 21 65 ium 0x0f fix'.!e
4aa0: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 23 ndif.!endif..###
4ab0: 20 74 65 73 74 20 66 6f 72 20 6f 70 74 69 6d 69 test for optimi
4ac0: 7a 61 74 69 6f 6e 73 0a 23 20 2f 4f 32 20 6f 70 zations.# /O2 op
4ad0: 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 63 6c 75 timization inclu
4ae0: 64 65 73 20 2f 4f 67 20 2f 4f 69 20 2f 4f 74 20 des /Og /Oi /Ot
4af0: 2f 4f 79 20 2f 4f 62 32 20 2f 47 73 20 2f 47 46 /Oy /Ob2 /Gs /GF
4b00: 20 2f 47 79 20 61 73 20 70 65 72 0a 23 20 64 6f /Gy as per.# do
4b10: 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 20 4e 6f 74 cumentation. Not
4b20: 65 20 77 65 20 64 6f 20 4e 4f 54 20 77 61 6e 74 e we do NOT want
4b30: 20 2f 47 73 20 61 73 20 74 68 61 74 20 69 6e 73 /Gs as that ins
4b40: 65 72 74 73 20 61 20 5f 63 68 6b 73 74 6b 0a 23 erts a _chkstk.#
4b50: 20 73 74 61 63 6b 20 70 72 6f 62 65 20 61 74 20 stack probe at
4b60: 2a 65 76 65 72 79 2a 20 66 75 6e 63 74 69 6f 6e *every* function
4b70: 20 65 6e 74 72 79 2c 20 6e 6f 74 20 6a 75 73 74 entry, not just
4b80: 20 74 68 6f 73 65 20 77 69 74 68 20 6d 6f 72 65 those with more
4b90: 20 74 68 61 6e 0a 23 20 61 20 70 61 67 65 20 6f than.# a page o
4ba0: 66 20 73 74 61 63 6b 20 61 6c 6c 6f 63 61 74 69 f stack allocati
4bb0: 6f 6e 20 72 65 73 75 6c 74 69 6e 67 20 69 6e 20 on resulting in
4bc0: 61 20 70 65 72 66 6f 72 6d 61 6e 63 65 20 68 69 a performance hi
4bd0: 74 2e 20 20 48 6f 77 65 76 65 72 2c 0a 23 20 2f t. However,.# /
4be0: 4f 32 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e O2 documentation
4bf0: 20 69 73 20 6d 69 73 6c 65 61 64 69 6e 67 20 61 is misleading a
4c00: 73 20 69 74 73 20 73 74 61 63 6b 20 70 72 6f 62 s its stack prob
4c10: 65 73 20 61 72 65 20 73 69 6d 70 6c 79 20 74 68 es are simply th
4c20: 65 0a 23 20 64 65 66 61 75 6c 74 20 70 61 67 65 e.# default page
4c30: 20 73 69 7a 65 20 6c 6f 63 61 6c 73 20 61 6c 6c size locals all
4c40: 6f 63 61 74 69 6f 6e 20 70 72 6f 62 65 73 20 61 ocation probes a
4c50: 6e 64 20 6e 6f 74 20 77 68 61 74 20 69 73 20 69 nd not what is i
4c60: 6d 70 6c 69 65 64 0a 23 20 62 79 20 61 6e 20 65 mplied.# by an e
4c70: 78 70 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 69 xplicit /Gs opti
4c80: 6f 6e 2e 0a 0a 4f 50 54 49 4d 49 5a 41 54 49 4f on...OPTIMIZATIO
4c90: 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29 0a 0a NS = $(FPOPTS)..
4ca0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 !if [nmakehlp -c
4cb0: 20 2d 4f 32 5d 0a 4f 50 54 49 4d 49 5a 49 4e 47 -O2].OPTIMIZING
4cc0: 20 3d 20 31 0a 4f 50 54 49 4d 49 5a 41 54 49 4f = 1.OPTIMIZATIO
4cd0: 4e 53 20 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a NS = $(OPTIMIZ
4ce0: 41 54 49 4f 4e 53 29 20 2d 4f 32 0a 21 65 6c 73 ATIONS) -O2.!els
4cf0: 65 0a 23 20 4c 65 67 61 63 79 2c 20 72 65 61 6c e.# Legacy, real
4d00: 6c 79 2e 20 41 6c 6c 20 6d 6f 64 65 72 6e 20 63 ly. All modern c
4d10: 6f 6d 70 69 6c 65 72 73 20 73 75 70 70 6f 72 74 ompilers support
4d20: 20 74 68 69 73 0a 21 6d 65 73 73 61 67 65 20 2a this.!message *
4d30: 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f 65 73 ** Compiler does
4d40: 20 6e 6f 74 20 68 61 76 65 20 27 4f 70 74 69 6d not have 'Optim
4d50: 69 7a 61 74 69 6f 6e 73 27 0a 4f 50 54 49 4d 49 izations'.OPTIMI
4d60: 5a 49 4e 47 20 3d 20 30 0a 21 65 6e 64 69 66 0a ZING = 0.!endif.
4d70: 0a 23 20 43 68 65 63 6b 73 20 66 6f 72 20 62 75 .# Checks for bu
4d80: 66 66 65 72 20 6f 76 65 72 66 6c 6f 77 73 20 69 ffer overflows i
4d90: 6e 20 6c 6f 63 61 6c 20 61 72 72 61 79 73 0a 21 n local arrays.!
4da0: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 if [nmakehlp -c
4db0: 2d 47 53 5d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f -GS].OPTIMIZATIO
4dc0: 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 NS = $(OPTIMIZA
4dd0: 54 49 4f 4e 53 29 20 2d 47 53 0a 21 65 6e 64 69 TIONS) -GS.!endi
4de0: 66 0a 0a 23 20 4c 69 6e 6b 20 74 69 6d 65 20 6f f..# Link time o
4df0: 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e 6f 74 ptimization. Not
4e00: 65 20 74 68 61 74 20 74 68 69 73 20 6f 70 74 69 e that this opti
4e10: 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c 79 29 on (potentially)
4e20: 20 6d 61 6b 65 73 0a 23 20 67 65 6e 65 72 61 74 makes.# generat
4e30: 65 64 20 6c 69 62 72 61 72 69 65 73 20 6f 6e 6c ed libraries onl
4e40: 79 20 75 73 61 62 6c 65 20 62 79 20 74 68 65 20 y usable by the
4e50: 73 70 65 63 69 66 69 63 20 56 43 2b 2b 20 76 65 specific VC++ ve
4e60: 72 73 69 6f 6e 20 74 68 61 74 0a 23 20 63 72 65 rsion that.# cre
4e70: 61 74 65 64 20 69 74 2e 20 52 65 71 75 69 72 65 ated it. Require
4e80: 73 20 2f 4c 54 43 47 20 6c 69 6e 6b 65 72 20 6f s /LTCG linker o
4e90: 70 74 69 6f 6e 0a 21 69 66 20 5b 6e 6d 61 6b 65 ption.!if [nmake
4ea0: 68 6c 70 20 2d 63 20 2d 47 4c 5d 0a 4f 50 54 49 hlp -c -GL].OPTI
4eb0: 4d 49 5a 41 54 49 4f 4e 53 20 20 3d 20 24 28 4f MIZATIONS = $(O
4ec0: 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d 47 PTIMIZATIONS) -G
4ed0: 4c 0a 43 43 5f 47 4c 5f 4f 50 54 5f 45 4e 41 42 L.CC_GL_OPT_ENAB
4ee0: 4c 45 44 20 3d 20 31 0a 21 65 6c 73 65 0a 23 20 LED = 1.!else.#
4ef0: 49 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c 65 In newer compile
4f00: 72 73 20 2d 47 4c 20 61 6e 64 20 2d 59 58 20 61 rs -GL and -YX a
4f10: 72 65 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 2e re incompatible.
4f20: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
4f30: 63 20 2d 59 58 5d 0a 4f 50 54 49 4d 49 5a 41 54 c -YX].OPTIMIZAT
4f40: 49 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 IONS = $(OPTIMI
4f50: 5a 41 54 49 4f 4e 53 29 20 2d 59 58 0a 21 65 6e ZATIONS) -YX.!en
4f60: 64 69 66 0a 21 65 6e 64 69 66 20 23 20 5b 6e 6d dif.!endif # [nm
4f70: 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d 0a 0a akehlp -c -GL]..
4f80: 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d DEBUGFLAGS =
4f90: 20 24 28 46 50 4f 50 54 53 29 0a 0a 23 20 52 75 $(FPOPTS)..# Ru
4fa0: 6e 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68 65 n time error che
4fb0: 63 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61 62 cks. Not availab
4fc0: 6c 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20 61 le or valid in a
4fd0: 20 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64 65 release, non-de
4fe0: 62 75 67 20 62 75 69 6c 64 0a 23 20 52 54 43 20 bug build.# RTC
4ff0: 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20 63 6f is for modern co
5000: 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69 73 20 mpilers, -GZ is
5010: 6c 65 67 61 63 79 0a 21 69 66 20 5b 6e 6d 61 6b legacy.!if [nmak
5020: 65 68 6c 70 20 2d 63 20 2d 52 54 43 31 5d 0a 44 ehlp -c -RTC1].D
5030: 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 EBUGFLAGS =
5040: 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 2d 52 $(DEBUGFLAGS) -R
5050: 54 43 31 0a 21 65 6c 73 65 69 66 20 5b 6e 6d 61 TC1.!elseif [nma
5060: 6b 65 68 6c 70 20 2d 63 20 2d 47 5a 5d 0a 44 45 kehlp -c -GZ].DE
5070: 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 24 BUGFLAGS = $
5080: 28 44 45 42 55 47 46 4c 41 47 53 29 20 2d 47 5a (DEBUGFLAGS) -GZ
5090: 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d .!endif..#------
50a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 23 20 4c 69 6e ----------.# Lin
50e0: 6b 65 72 20 66 6c 61 67 73 0a 0a 23 20 4c 49 4e ker flags..# LIN
50f0: 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 20 61 72 KER_TESTFLAGS ar
5100: 65 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20 75 e for internal u
5110: 73 65 20 77 68 65 6e 20 77 65 20 63 61 6c 6c 20 se when we call
5120: 6e 6d 61 6b 65 68 6c 70 20 74 6f 20 74 65 73 74 nmakehlp to test
5130: 0a 23 20 69 66 20 74 68 65 20 6c 69 6e 6b 65 72 .# if the linker
5140: 20 73 75 70 70 6f 72 74 73 20 61 20 73 70 65 63 supports a spec
5150: 69 66 69 63 20 6f 70 74 69 6f 6e 2e 20 57 69 74 ific option. Wit
5160: 68 6f 75 74 20 74 68 65 73 65 20 66 6c 61 67 73 hout these flags
5170: 20 6c 69 6e 6b 20 77 69 6c 6c 0a 23 20 72 65 74 link will.# ret
5180: 75 72 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 6e urn "LNK1561: en
5190: 74 72 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 62 try point must b
51a0: 65 20 64 65 66 69 6e 65 64 22 20 65 72 72 6f 72 e defined" error
51b0: 20 63 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d 20 compiling from
51c0: 56 53 2d 49 44 45 3a 0a 23 20 54 68 65 79 20 61 VS-IDE:.# They a
51d0: 72 65 20 6e 6f 74 20 70 61 73 73 65 64 20 74 68 re not passed th
51e0: 72 6f 75 67 68 20 74 6f 20 74 68 65 20 61 63 74 rough to the act
51f0: 75 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 ual application
5200: 2f 20 65 78 74 65 6e 73 69 6f 6e 0a 23 20 6c 69 / extension.# li
5210: 6e 6b 20 72 75 6c 65 73 2e 0a 21 69 66 6e 64 65 nk rules..!ifnde
5220: 66 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 f LINKER_TESTFLA
5230: 47 53 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c GS.LINKER_TESTFL
5240: 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f 45 4e AGS = /DLL /NOEN
5250: 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 68 6c TRY /OUT:nmakehl
5260: 70 2e 6f 75 74 0a 21 65 6e 64 69 66 0a 0a 4c 49 p.out.!endif..LI
5270: 4e 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d 0a NKERFLAGS =.
5280: 0a 23 20 49 66 20 63 6f 6d 70 69 6c 65 72 20 68 .# If compiler h
5290: 61 73 20 65 6e 61 62 6c 65 64 20 6c 69 6e 6b 20 as enabled link
52a0: 74 69 6d 65 20 6f 70 74 69 6d 69 7a 61 74 69 6f time optimizatio
52b0: 6e 2c 20 6c 69 6e 6b 65 72 20 6d 75 73 74 20 74 n, linker must t
52c0: 6f 6f 20 77 69 74 68 20 2d 6c 74 63 67 0a 21 69 oo with -ltcg.!i
52d0: 66 64 65 66 20 43 43 5f 47 4c 5f 4f 50 54 5f 45 fdef CC_GL_OPT_E
52e0: 4e 41 42 4c 45 44 0a 21 69 66 20 5b 6e 6d 61 6b NABLED.!if [nmak
52f0: 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 20 24 28 ehlp -l -ltcg $(
5300: 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 LINKER_TESTFLAGS
5310: 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 20 )].LINKERFLAGS
5320: 20 20 20 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 = $(LINKERFLA
5330: 47 53 29 20 2d 6c 74 63 67 0a 21 65 6e 64 69 66 GS) -ltcg.!endif
5340: 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 23 .!endif...######
5350: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 36 2e 20 ##########.# 6.
5390: 45 78 74 72 61 63 74 20 76 61 72 69 6f 75 73 20 Extract various
53a0: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
53b0: 66 72 6f 6d 20 68 65 61 64 65 72 73 0a 23 20 46 from headers.# F
53c0: 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20 76 or Tcl and Tk, v
53d0: 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 61 ersion numbers a
53e0: 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72 6f re extracted fro
53f0: 6d 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e 68 m tcl.h and tk.h
5400: 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e .# respectively.
5410: 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 2c For extensions,
5420: 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20 65 78 versions are ex
5430: 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 68 65 tracted from the
5440: 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 .# configure.in
5450: 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 20 or configure.ac
5460: 66 72 6f 6d 20 74 68 65 20 54 45 41 20 63 6f 6e from the TEA con
5470: 66 69 67 75 72 61 74 69 6f 6e 20 69 66 20 69 74 figuration if it
5480: 0a 23 20 65 78 69 73 74 73 2c 20 61 6e 64 20 75 .# exists, and u
5490: 6e 73 65 74 20 6f 74 68 65 72 77 69 73 65 2e 0a nset otherwise..
54a0: 23 20 53 65 74 73 20 74 68 65 20 66 6f 6c 6c 6f # Sets the follo
54b0: 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a 23 20 54 wing macros:.# T
54c0: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
54d0: 0a 23 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 .# TCL_MINOR_VER
54e0: 53 49 4f 4e 0a 23 20 54 43 4c 5f 52 45 4c 45 41 SION.# TCL_RELEA
54f0: 53 45 5f 53 45 52 49 41 4c 0a 23 20 54 43 4c 5f SE_SERIAL.# TCL_
5500: 50 41 54 43 48 5f 4c 45 56 45 4c 0a 23 20 54 43 PATCH_LEVEL.# TC
5510: 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 0a 23 L_PATCH_LETTER.#
5520: 20 54 43 4c 5f 56 45 52 53 49 4f 4e 0a 23 20 54 TCL_VERSION.# T
5530: 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 0a K_MAJOR_VERSION.
5540: 23 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 # TK_MINOR_VERSI
5550: 4f 4e 0a 23 20 54 4b 5f 52 45 4c 45 41 53 45 5f ON.# TK_RELEASE_
5560: 53 45 52 49 41 4c 0a 23 20 54 4b 5f 50 41 54 43 SERIAL.# TK_PATC
5570: 48 5f 4c 45 56 45 4c 0a 23 20 54 4b 5f 50 41 54 H_LEVEL.# TK_PAT
5580: 43 48 5f 4c 45 54 54 45 52 0a 23 20 54 4b 5f 56 CH_LETTER.# TK_V
5590: 45 52 53 49 4f 4e 0a 23 20 44 4f 54 56 45 52 53 ERSION.# DOTVERS
55a0: 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 66 6f ION - set as (fo
55b0: 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35 0a 23 r example) 2.5.#
55c0: 20 56 45 52 53 49 4f 4e 20 2d 20 73 65 74 20 61 VERSION - set a
55d0: 73 20 28 66 6f 72 20 65 78 61 6d 70 6c 65 20 32 s (for example 2
55e0: 35 29 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 5).#------------
55f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 0a 21 69 66 20 5b 65 63 68 6f 20 52 45 --..!if [echo RE
5630: 4d 20 3d 20 54 68 69 73 20 66 69 6c 65 20 69 73 M = This file is
5640: 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d 20 generated from
5650: 72 75 6c 65 73 2e 76 63 20 3e 20 76 65 72 73 69 rules.vc > versi
5660: 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 ons.vc].!endif.!
5670: 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 4d 41 4a if [echo TCL_MAJ
5680: 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e OR_VERSION = \>>
5690: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a versions.vc] \.
56a0: 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 && [nmakehlp
56b0: 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 22 -V "$(_TCL_H)" "
56c0: 64 65 66 69 6e 65 20 54 43 4c 5f 4d 41 4a 4f 52 define TCL_MAJOR
56d0: 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 _VERSION" >> ver
56e0: 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 sions.vc].!endif
56f0: 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 4d .!if [echo TCL_M
5700: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c INOR_VERSION = \
5710: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 >> versions.vc]
5720: 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c \. && [nmakehl
5730: 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 p -V "$(_TCL_H)"
5740: 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 TCL_MINOR_VERSI
5750: 4f 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 ON >> versions.v
5760: 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 c].!endif.!if [e
5770: 63 68 6f 20 54 43 4c 5f 52 45 4c 45 41 53 45 5f cho TCL_RELEASE_
5780: 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 72 SERIAL = \>> ver
5790: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 sions.vc] \. &
57a0: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 22 & [nmakehlp -V "
57b0: 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f 52 $(_TCL_H)" TCL_R
57c0: 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e ELEASE_SERIAL >>
57d0: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 versions.vc].!e
57e0: 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 ndif.!if [echo T
57f0: 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 3d CL_PATCH_LEVEL =
5800: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 \>> versions.vc
5810: 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 ] \. && [nmake
5820: 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 hlp -V "$(_TCL_H
5830: 29 22 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 )" TCL_PATCH_LEV
5840: 45 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 EL >> versions.v
5850: 63 5d 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 64 c].!endif..!if d
5860: 65 66 69 6e 65 64 28 5f 54 4b 5f 48 29 0a 21 69 efined(_TK_H).!i
5870: 66 20 5b 65 63 68 6f 20 54 4b 5f 4d 41 4a 4f 52 f [echo TK_MAJOR
5880: 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 _VERSION = \>> v
5890: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 ersions.vc] \.
58a0: 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 && [nmakehlp -V
58b0: 20 24 28 5f 54 4b 5f 48 29 20 22 64 65 66 69 6e $(_TK_H) "defin
58c0: 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 e TK_MAJOR_VERSI
58d0: 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e ON" >> versions.
58e0: 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b vc].!endif.!if [
58f0: 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 echo TK_MINOR_VE
5900: 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 RSION = \>> vers
5910: 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 ions.vc] \. &&
5920: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 [nmakehlp -V $(
5930: 5f 54 4b 5f 48 29 20 54 4b 5f 4d 49 4e 4f 52 5f _TK_H) TK_MINOR_
5940: 56 45 52 53 49 4f 4e 20 3e 3e 20 76 65 72 73 69 VERSION >> versi
5950: 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 ons.vc].!endif.!
5960: 69 66 20 5b 65 63 68 6f 20 54 4b 5f 52 45 4c 45 if [echo TK_RELE
5970: 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e 3e ASE_SERIAL = \>>
5980: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a versions.vc] \.
5990: 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 && [nmakehlp
59a0: 2d 56 20 22 24 28 5f 54 4b 5f 48 29 22 20 54 4b -V "$(_TK_H)" TK
59b0: 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 _RELEASE_SERIAL
59c0: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a >> versions.vc].
59d0: 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f !endif.!if [echo
59e0: 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 TK_PATCH_LEVEL
59f0: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \>> versions.v
5a00: 63 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b c] \. && [nmak
5a10: 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 29 ehlp -V $(_TK_H)
5a20: 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 TK_PATCH_LEVEL
5a30: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a >> versions.vc].
5a40: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 !endif.!endif #
5a50: 5f 54 4b 5f 48 0a 0a 21 69 6e 63 6c 75 64 65 20 _TK_H..!include
5a60: 76 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 54 43 4c versions.vc..TCL
5a70: 5f 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 4c _VERSION.= $(TCL
5a80: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 24 _MAJOR_VERSION)$
5a90: 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 (TCL_MINOR_VERSI
5aa0: 4f 4e 29 0a 54 43 4c 5f 44 4f 54 56 45 52 53 49 ON).TCL_DOTVERSI
5ab0: 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 ON.= $(TCL_MAJOR
5ac0: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f _VERSION).$(TCL_
5ad0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 21 MINOR_VERSION).!
5ae0: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
5af0: 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 $(TCL_PATCH_LEVE
5b00: 4c 29 20 22 61 22 5d 0a 54 43 4c 5f 50 41 54 43 L) "a"].TCL_PATC
5b10: 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 65 6c H_LETTER = a.!el
5b20: 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d seif [nmakehlp -
5b30: 66 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 f $(TCL_PATCH_LE
5b40: 56 45 4c 29 20 22 62 22 5d 0a 54 43 4c 5f 50 41 VEL) "b"].TCL_PA
5b50: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0a 21 TCH_LETTER = b.!
5b60: 65 6c 73 65 0a 54 43 4c 5f 50 41 54 43 48 5f 4c else.TCL_PATCH_L
5b70: 45 54 54 45 52 20 3d 20 2e 0a 21 65 6e 64 69 66 ETTER = ..!endif
5b80: 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 5f 54 ..!if defined(_T
5b90: 4b 5f 48 29 0a 0a 54 4b 5f 56 45 52 53 49 4f 4e K_H)..TK_VERSION
5ba0: 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 .= $(TK_MAJOR_VE
5bb0: 52 53 49 4f 4e 29 24 28 54 4b 5f 4d 49 4e 4f 52 RSION)$(TK_MINOR
5bc0: 5f 56 45 52 53 49 4f 4e 29 0a 54 4b 5f 44 4f 54 _VERSION).TK_DOT
5bd0: 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 4b 5f 4d VERSION.= $(TK_M
5be0: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 AJOR_VERSION).$(
5bf0: 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e TK_MINOR_VERSION
5c00: 29 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ).!if [nmakehlp
5c10: 2d 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 -f $(TK_PATCH_LE
5c20: 56 45 4c 29 20 22 61 22 5d 0a 54 4b 5f 50 41 54 VEL) "a"].TK_PAT
5c30: 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 65 CH_LETTER = a.!e
5c40: 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 lseif [nmakehlp
5c50: 2d 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 -f $(TK_PATCH_LE
5c60: 56 45 4c 29 20 22 62 22 5d 0a 54 4b 5f 50 41 54 VEL) "b"].TK_PAT
5c70: 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0a 21 65 CH_LETTER = b.!e
5c80: 6c 73 65 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 54 lse.TK_PATCH_LET
5c90: 54 45 52 20 3d 20 2e 0a 21 65 6e 64 69 66 0a 0a TER = ..!endif..
5ca0: 21 65 6e 64 69 66 0a 0a 23 20 53 65 74 20 44 4f !endif..# Set DO
5cb0: 54 56 45 52 53 49 4f 4e 20 61 6e 64 20 56 45 52 TVERSION and VER
5cc0: 53 49 4f 4e 0a 21 69 66 20 24 28 44 4f 49 4e 47 SION.!if $(DOING
5cd0: 5f 54 43 4c 29 0a 0a 44 4f 54 56 45 52 53 49 4f _TCL)..DOTVERSIO
5ce0: 4e 20 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f N = $(TCL_MAJOR_
5cf0: 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d VERSION).$(TCL_M
5d00: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 56 45 INOR_VERSION).VE
5d10: 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c 5f 56 45 RSION = $(TCL_VE
5d20: 52 53 49 4f 4e 29 0a 0a 21 65 6c 73 65 69 66 20 RSION)..!elseif
5d30: 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 0a 44 4f 54 $(DOING_TK)..DOT
5d40: 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b 5f 44 VERSION = $(TK_D
5d50: 4f 54 56 45 52 53 49 4f 4e 29 0a 56 45 52 53 49 OTVERSION).VERSI
5d60: 4f 4e 20 3d 20 24 28 54 4b 5f 56 45 52 53 49 4f ON = $(TK_VERSIO
5d70: 4e 29 0a 0a 21 65 6c 73 65 20 23 20 44 6f 69 6e N)..!else # Doin
5d80: 67 20 61 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 6e g a non-Tk exten
5d90: 73 69 6f 6e 0a 0a 23 20 49 66 20 70 61 72 65 6e sion..# If paren
5da0: 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 6e t makefile has n
5db0: 6f 74 20 64 65 66 69 6e 65 64 20 44 4f 54 56 45 ot defined DOTVE
5dc0: 52 53 49 4f 4e 2c 20 74 72 79 20 74 6f 20 67 65 RSION, try to ge
5dd0: 74 20 69 74 20 66 72 6f 6d 20 54 45 41 0a 23 20 t it from TEA.#
5de0: 66 69 72 73 74 20 66 72 6f 6d 20 61 20 63 6f 6e first from a con
5df0: 66 69 67 75 72 65 2e 69 6e 20 66 69 6c 65 2c 20 figure.in file,
5e00: 61 6e 64 20 74 68 65 6e 20 66 72 6f 6d 20 63 6f and then from co
5e10: 6e 66 69 67 75 72 65 2e 61 63 0a 21 69 66 6e 64 nfigure.ac.!ifnd
5e20: 65 66 20 44 4f 54 56 45 52 53 49 4f 4e 0a 21 69 ef DOTVERSION.!i
5e30: 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 49 f [echo DOTVERSI
5e40: 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 ON = \> versions
5e50: 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d .vc] \. || [nm
5e60: 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f 54 akehlp -V $(ROOT
5e70: 29 5c 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 5e )\configure.in ^
5e80: 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e 3e [$(PROJECT)^] >>
5e90: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 69 versions.vc].!i
5ea0: 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 49 f [echo DOTVERSI
5eb0: 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 ON = \> versions
5ec0: 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d .vc] \. || [nm
5ed0: 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f 54 akehlp -V $(ROOT
5ee0: 29 5c 63 6f 6e 66 69 67 75 72 65 2e 61 63 20 5e )\configure.ac ^
5ef0: 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e 3e [$(PROJECT)^] >>
5f00: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 versions.vc].!e
5f10: 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e rror *** Could n
5f20: 6f 74 20 66 69 67 75 72 65 20 6f 75 74 20 65 78 ot figure out ex
5f30: 74 65 6e 73 69 6f 6e 20 76 65 72 73 69 6f 6e 2e tension version.
5f40: 20 50 6c 65 61 73 65 20 64 65 66 69 6e 65 20 44 Please define D
5f50: 4f 54 56 45 52 53 49 4f 4e 20 69 6e 20 70 61 72 OTVERSION in par
5f60: 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 62 65 66 ent makefile bef
5f70: 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 ore including ru
5f80: 6c 65 73 2e 76 63 2e 0a 21 65 6e 64 69 66 0a 21 les.vc..!endif.!
5f90: 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 76 endif.!include v
5fa0: 65 72 73 69 6f 6e 73 2e 76 63 0a 21 65 6e 64 69 ersions.vc.!endi
5fb0: 66 20 23 20 44 4f 54 56 45 52 53 49 4f 4e 0a 56 f # DOTVERSION.V
5fc0: 45 52 53 49 4f 4e 20 20 20 20 20 20 20 20 20 3d ERSION =
5fd0: 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 3a 2e 3d $(DOTVERSION:.=
5fe0: 29 0a 0a 21 65 6e 64 69 66 20 23 20 24 28 44 4f )..!endif # $(DO
5ff0: 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e 20 65 74 63 ING_TCL) ... etc
6000: 2e 0a 0a 23 20 57 69 6e 64 6f 77 73 20 52 43 20 ...# Windows RC
6010: 66 69 6c 65 73 20 68 61 76 65 20 33 20 76 65 72 files have 3 ver
6020: 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e sion components.
6030: 20 45 6e 73 75 72 65 20 74 68 69 73 20 69 72 72 Ensure this irr
6040: 65 73 70 65 63 74 69 76 65 0a 23 20 6f 66 20 68 espective.# of h
6050: 6f 77 20 6d 61 6e 79 20 63 6f 6d 70 6f 6e 65 6e ow many componen
6060: 74 73 20 74 68 65 20 70 61 63 6b 61 67 65 20 68 ts the package h
6070: 61 73 20 73 70 65 63 69 66 69 65 64 2e 20 42 61 as specified. Ba
6080: 73 69 63 61 6c 6c 79 2c 20 65 6e 73 75 72 65 0a sically, ensure.
6090: 23 20 6d 69 6e 69 6d 75 6d 20 34 20 63 6f 6d 70 # minimum 4 comp
60a0: 6f 6e 65 6e 74 73 20 62 79 20 61 70 70 65 6e 64 onents by append
60b0: 69 6e 67 20 34 20 30 27 73 20 61 6e 64 20 74 68 ing 4 0's and th
60c0: 65 6e 20 70 69 63 6b 20 6f 75 74 20 74 68 65 20 en pick out the
60d0: 66 69 72 73 74 20 34 2e 0a 23 20 41 6c 73 6f 20 first 4..# Also
60e0: 74 61 6b 65 20 63 61 72 65 20 6f 66 20 74 68 65 take care of the
60f0: 20 66 61 63 74 20 74 68 61 74 20 44 4f 54 56 45 fact that DOTVE
6100: 52 53 49 4f 4e 20 6d 61 79 20 68 61 76 65 20 22 RSION may have "
6110: 61 22 20 6f 72 20 22 62 22 20 69 6e 73 74 65 61 a" or "b" instea
6120: 64 0a 23 20 6f 66 20 22 2e 22 20 73 65 70 61 72 d.# of "." separ
6130: 61 74 69 6e 67 20 74 68 65 20 76 65 72 73 69 6f ating the versio
6140: 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e 0a 44 4f n components..DO
6150: 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54 TSEPARATED=$(DOT
6160: 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 0a 44 4f 54 VERSION:a=.).DOT
6170: 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54 53 SEPARATED=$(DOTS
6180: 45 50 41 52 41 54 45 44 3a 62 3d 2e 29 0a 21 69 EPARATED:b=.).!i
6190: 66 20 5b 65 63 68 6f 20 52 43 43 4f 4d 4d 41 56 f [echo RCCOMMAV
61a0: 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 ERSION = \> vers
61b0: 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 7c 7c 20 ions.vc] \. ||
61c0: 5b 66 6f 72 20 2f 66 20 22 74 6f 6b 65 6e 73 3d [for /f "tokens=
61d0: 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 65 6c 69 6d 1,2,3,4,5* delim
61e0: 73 3d 2e 22 20 25 61 20 69 6e 20 28 22 24 28 44 s=." %a in ("$(D
61f0: 4f 54 53 45 50 41 52 41 54 45 44 29 2e 30 2e 30 OTSEPARATED).0.0
6200: 2e 30 2e 30 22 29 20 64 6f 20 65 63 68 6f 20 25 .0.0") do echo %
6210: 61 2c 25 62 2c 25 63 2c 25 64 20 3e 3e 20 76 65 a,%b,%c,%d >> ve
6220: 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 72 72 6f rsions.vc].!erro
6230: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
6240: 67 65 6e 65 72 61 74 65 20 52 43 43 4f 4d 4d 41 generate RCCOMMA
6250: 56 45 52 53 49 4f 4e 20 2a 2a 2a 0a 21 65 6e 64 VERSION ***.!end
6260: 69 66 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 73 if.!include vers
6270: 69 6f 6e 73 2e 76 63 0a 0a 23 23 23 23 23 23 23 ions.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 0a 23 20 37 2e 20 50 61 72 73 65 20 74 68 65 #.# 7. Parse the
62d0: 20 4f 50 54 53 20 6d 61 63 72 6f 20 74 6f 20 77 OPTS macro to w
62e0: 6f 72 6b 20 6f 75 74 20 74 68 65 20 72 65 71 75 ork out the requ
62f0: 65 73 74 65 64 20 62 75 69 6c 64 20 63 6f 6e 66 ested build conf
6300: 69 67 75 72 61 74 69 6f 6e 2e 0a 23 20 42 61 73 iguration..# Bas
6310: 65 64 20 6f 6e 20 74 68 69 73 2c 20 77 65 20 77 ed on this, we w
6320: 69 6c 6c 20 63 6f 6e 73 74 72 75 63 74 20 74 68 ill construct th
6330: 65 20 61 63 74 75 61 6c 20 73 77 69 74 63 68 65 e actual switche
6340: 73 20 74 6f 20 62 65 20 70 61 73 73 65 64 20 74 s to be passed t
6350: 6f 20 74 68 65 0a 23 20 63 6f 6d 70 69 6c 65 72 o the.# compiler
6360: 20 61 6e 64 20 6c 69 6e 6b 65 72 20 75 73 69 6e and linker usin
6370: 67 20 74 68 65 20 6d 61 63 72 6f 73 20 64 65 66 g the macros def
6380: 69 6e 65 64 20 69 6e 20 74 68 65 20 70 72 65 76 ined in the prev
6390: 69 6f 75 73 20 73 65 63 74 69 6f 6e 2e 0a 23 20 ious section..#
63a0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
63b0: 63 72 6f 73 20 61 72 65 20 64 65 66 69 6e 65 64 cros are defined
63c0: 20 62 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e by this section
63d0: 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 0a 23 based on OPTS.#
63e0: 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 2d 20 STATIC_BUILD -
63f0: 30 20 2d 3e 20 54 63 6c 20 69 73 20 74 6f 20 62 0 -> Tcl is to b
6400: 65 20 62 75 69 6c 74 20 61 73 20 61 20 73 68 61 e built as a sha
6410: 72 65 64 20 6c 69 62 72 61 72 79 0a 23 20 20 20 red library.#
6420: 20 20 20 20 20 20 20 20 20 20 20 20 20 31 20 2d 1 -
6430: 3e 20 62 75 69 6c 64 20 61 73 20 61 20 73 74 61 > build as a sta
6440: 74 69 63 20 6c 69 62 72 61 72 79 20 61 6e 64 20 tic library and
6450: 73 68 65 6c 6c 0a 23 20 54 43 4c 5f 54 48 52 45 shell.# TCL_THRE
6460: 41 44 53 20 2d 20 6c 65 67 61 63 79 20 62 75 74 ADS - legacy but
6470: 20 61 6c 77 61 79 73 20 31 20 6f 6e 20 57 69 6e always 1 on Win
6480: 64 6f 77 73 20 73 69 6e 63 65 20 77 69 6e 73 6f dows since winso
6490: 63 6b 20 72 65 71 75 69 72 65 73 20 69 74 2e 0a ck requires it..
64a0: 23 20 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 64 # DEBUG - 1 -> d
64b0: 65 62 75 67 20 62 75 69 6c 64 2c 20 30 20 2d 3e ebug build, 0 ->
64c0: 20 72 65 6c 65 61 73 65 20 62 75 69 6c 64 73 0a release builds.
64d0: 23 20 53 59 4d 42 4f 4c 53 20 2d 20 31 20 2d 3e # SYMBOLS - 1 ->
64e0: 20 67 65 6e 65 72 61 74 65 20 50 44 42 27 73 2c generate PDB's,
64f0: 20 30 20 2d 3e 20 6e 6f 20 50 44 42 27 73 0a 23 0 -> no PDB's.#
6500: 20 50 52 4f 46 49 4c 45 20 2d 20 31 20 2d 3e 20 PROFILE - 1 ->
6510: 67 65 6e 65 72 61 74 65 20 70 72 6f 66 69 6c 69 generate profili
6520: 6e 67 20 69 6e 66 6f 2c 20 30 20 2d 3e 20 6e 6f ng info, 0 -> no
6530: 20 70 72 6f 66 69 6c 69 6e 67 0a 23 20 50 47 4f profiling.# PGO
6540: 20 20 20 20 20 2d 20 31 20 2d 3e 20 70 72 6f 66 - 1 -> prof
6550: 69 6c 65 20 62 61 73 65 64 20 6f 70 74 69 6d 69 ile based optimi
6560: 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e 20 6e 6f 0a zation, 0 -> no.
6570: 23 20 4d 53 56 43 52 54 20 20 2d 20 31 20 2d 3e # MSVCRT - 1 ->
6580: 20 6c 69 6e 6b 20 74 6f 20 64 79 6e 61 6d 69 63 link to dynamic
6590: 20 43 20 72 75 6e 74 69 6d 65 20 65 76 65 6e 20 C runtime even
65a0: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 73 74 when building st
65b0: 61 74 69 63 20 54 63 6c 20 62 75 69 6c 64 0a 23 atic Tcl build.#
65c0: 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 0 ->
65d0: 6c 69 6e 6b 20 74 6f 20 73 74 61 74 69 63 20 43 link to static C
65e0: 20 72 75 6e 74 69 6d 65 20 66 6f 72 20 73 74 61 runtime for sta
65f0: 74 69 63 20 54 63 6c 20 62 75 69 6c 64 2e 0a 23 tic Tcl build..#
6600: 20 20 20 20 20 20 20 20 20 20 20 44 6f 65 73 20 Does
6610: 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 61 72 65 not impact share
6620: 64 20 54 63 6c 20 62 75 69 6c 64 73 20 28 53 54 d Tcl builds (ST
6630: 41 54 49 43 5f 42 55 49 4c 44 20 3d 3d 20 30 29 ATIC_BUILD == 0)
6640: 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 65 66 .# Def
6650: 61 75 6c 74 3a 20 31 20 66 6f 72 20 54 63 6c 20 ault: 1 for Tcl
6660: 38 2e 37 20 61 6e 64 20 75 70 2c 20 30 20 6f 74 8.7 and up, 0 ot
6670: 68 65 72 77 69 73 65 2e 0a 23 20 54 43 4c 5f 55 herwise..# TCL_U
6680: 53 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 47 SE_STATIC_PACKAG
6690: 45 53 20 2d 20 31 20 2d 3e 20 73 74 61 74 69 63 ES - 1 -> static
66a0: 61 6c 6c 79 20 6c 69 6e 6b 20 74 68 65 20 72 65 ally link the re
66b0: 67 69 73 74 72 79 20 61 6e 64 20 64 64 65 20 65 gistry and dde e
66c0: 78 74 65 6e 73 69 6f 6e 73 0a 23 20 20 20 20 20 xtensions.#
66d0: 20 20 20 20 20 20 69 6e 20 74 68 65 20 54 63 6c in the Tcl
66e0: 20 61 6e 64 20 57 69 73 68 20 73 68 65 6c 6c 2e and Wish shell.
66f0: 20 30 20 2d 3e 20 6b 65 65 70 20 74 68 65 6d 20 0 -> keep them
6700: 61 73 20 73 68 61 72 65 64 20 6c 69 62 72 61 72 as shared librar
6710: 69 65 73 2e 20 44 6f 65 73 0a 23 20 20 20 20 20 ies. Does.#
6720: 20 20 20 20 20 20 6e 6f 74 20 69 6d 70 61 63 74 not impact
6730: 20 73 68 61 72 65 64 20 54 63 6c 20 62 75 69 6c shared Tcl buil
6740: 64 73 2e 20 49 6d 70 6c 69 65 64 20 62 79 20 53 ds. Implied by S
6750: 54 41 54 49 43 5f 42 55 49 4c 44 20 73 69 6e 63 TATIC_BUILD sinc
6760: 65 20 54 63 6c 20 38 2e 37 2e 0a 23 20 55 53 45 e Tcl 8.7..# USE
6770: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 2d 20 _THREAD_ALLOC -
6780: 31 20 2d 3e 20 55 73 65 20 61 20 73 68 61 72 65 1 -> Use a share
6790: 64 20 67 6c 6f 62 61 6c 20 66 72 65 65 20 70 6f d global free po
67a0: 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 61 74 69 6f ol for allocatio
67b0: 6e 2e 0a 23 20 20 20 20 20 20 20 20 20 20 20 30 n..# 0
67c0: 20 2d 3e 20 55 73 65 20 74 68 65 20 6e 6f 6e 2d -> Use the non-
67d0: 74 68 72 65 61 64 20 61 6c 6c 6f 63 61 74 6f 72 thread allocator
67e0: 2e 0a 23 20 55 4e 43 48 45 43 4b 45 44 20 2d 20 ..# UNCHECKED -
67f0: 31 20 2d 3e 20 77 68 65 6e 20 64 6f 69 6e 67 20 1 -> when doing
6800: 61 20 64 65 62 75 67 20 62 75 69 6c 64 20 77 69 a debug build wi
6810: 74 68 20 73 79 6d 62 6f 6c 73 2c 20 75 73 65 20 th symbols, use
6820: 74 68 65 20 72 65 6c 65 61 73 65 0a 23 20 20 20 the release.#
6830: 20 20 20 20 20 20 20 20 43 20 72 75 6e 74 69 6d C runtim
6840: 65 2c 20 30 20 2d 3e 20 75 73 65 20 74 68 65 20 e, 0 -> use the
6850: 64 65 62 75 67 20 43 20 72 75 6e 74 69 6d 65 2e debug C runtime.
6860: 0a 23 20 55 53 45 5f 53 54 55 42 53 20 2d 20 31 .# USE_STUBS - 1
6870: 20 2d 3e 20 63 6f 6d 70 69 6c 65 20 74 6f 20 75 -> compile to u
6880: 73 65 20 73 74 75 62 73 20 69 6e 74 65 72 66 61 se stubs interfa
6890: 63 65 73 2c 20 30 20 2d 3e 20 64 69 72 65 63 74 ces, 0 -> direct
68a0: 20 6c 69 6e 6b 69 6e 67 0a 23 20 43 4f 4e 46 49 linking.# CONFI
68b0: 47 5f 43 48 45 43 4b 20 2d 20 31 20 2d 3e 20 63 G_CHECK - 1 -> c
68c0: 68 65 63 6b 20 63 75 72 72 65 6e 74 20 62 75 69 heck current bui
68d0: 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e ld configuration
68e0: 20 61 67 61 69 6e 73 74 20 54 63 6c 0a 23 20 20 against Tcl.#
68f0: 20 20 20 20 20 20 20 20 20 63 6f 6e 66 69 67 75 configu
6900: 72 61 74 69 6f 6e 20 28 69 67 6e 6f 72 65 64 20 ration (ignored
6910: 66 6f 72 20 54 63 6c 20 69 74 73 65 6c 66 29 0a for Tcl itself).
6920: 23 20 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d # _USE_64BIT_TIM
6930: 45 5f 54 20 2d 20 66 6f 72 63 65 73 20 61 20 62 E_T - forces a b
6940: 75 69 6c 64 20 75 73 69 6e 67 20 36 34 2d 62 69 uild using 64-bi
6950: 74 20 74 69 6d 65 5f 74 20 66 6f 72 20 33 32 2d t time_t for 32-
6960: 62 69 74 20 62 75 69 6c 64 0a 23 20 20 20 20 20 bit build.#
6970: 20 20 20 20 20 20 28 43 52 54 20 6c 69 62 72 61 (CRT libra
6980: 72 79 20 73 68 6f 75 6c 64 20 73 75 70 70 6f 72 ry should suppor
6990: 74 20 74 68 69 73 2c 20 6e 6f 74 20 6e 65 65 64 t this, not need
69a0: 65 64 20 66 6f 72 20 54 63 6c 20 39 2e 78 29 0a ed for Tcl 9.x).
69b0: 23 20 54 43 4c 5f 55 54 46 5f 4d 41 58 3d 33 20 # TCL_UTF_MAX=3
69c0: 2d 20 66 6f 72 63 65 73 20 61 20 62 75 69 6c 64 - forces a build
69d0: 20 75 73 69 6e 67 20 55 54 46 2d 31 36 20 69 6e using UTF-16 in
69e0: 74 65 72 6e 61 6c 6c 79 20 28 6e 6f 74 20 72 65 ternally (not re
69f0: 63 6f 6d 6d 65 6e 64 65 64 29 2e 0a 23 20 46 75 commended)..# Fu
6a00: 72 74 68 65 72 2c 20 4c 49 4e 4b 45 52 46 4c 41 rther, LINKERFLA
6a10: 47 53 20 61 72 65 20 6d 6f 64 69 66 69 65 64 20 GS are modified
6a20: 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 2e 0a based on above..
6a30: 0a 23 20 44 65 66 61 75 6c 74 20 76 61 6c 75 65 .# Default value
6a40: 73 20 66 6f 72 20 61 6c 6c 20 74 68 65 20 61 62 s for all the ab
6a50: 6f 76 65 0a 53 54 41 54 49 43 5f 42 55 49 4c 44 ove.STATIC_BUILD
6a60: 09 3d 20 30 0a 54 43 4c 5f 54 48 52 45 41 44 53 .= 0.TCL_THREADS
6a70: 09 3d 20 31 0a 44 45 42 55 47 09 09 3d 20 30 0a .= 1.DEBUG..= 0.
6a80: 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 50 52 4f SYMBOLS..= 0.PRO
6a90: 46 49 4c 45 09 09 3d 20 30 0a 50 47 4f 09 09 3d FILE..= 0.PGO..=
6aa0: 20 30 0a 4d 53 56 43 52 54 09 09 3d 20 31 0a 54 0.MSVCRT..= 1.T
6ab0: 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 CL_USE_STATIC_PA
6ac0: 43 4b 41 47 45 53 09 3d 20 30 0a 55 53 45 5f 54 CKAGES.= 0.USE_T
6ad0: 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 31 0a HREAD_ALLOC = 1.
6ae0: 55 4e 43 48 45 43 4b 45 44 09 3d 20 30 0a 43 4f UNCHECKED.= 0.CO
6af0: 4e 46 49 47 5f 43 48 45 43 4b 20 20 20 20 3d 20 NFIG_CHECK =
6b00: 31 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 1.!if $(DOING_TC
6b10: 4c 29 0a 55 53 45 5f 53 54 55 42 53 20 20 20 20 L).USE_STUBS
6b20: 20 20 20 3d 20 30 0a 21 65 6c 73 65 0a 55 53 45 = 0.!else.USE
6b30: 5f 53 54 55 42 53 20 20 20 20 20 20 20 3d 20 31 _STUBS = 1
6b40: 0a 21 65 6e 64 69 66 0a 0a 23 20 49 66 20 4f 50 .!endif..# If OP
6b50: 54 53 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 20 TS is not empty
6b60: 41 4e 44 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e AND does not con
6b70: 74 61 69 6e 20 22 6e 6f 6e 65 22 20 77 68 69 63 tain "none" whic
6b80: 68 20 74 75 72 6e 73 20 6f 66 66 20 61 6c 6c 20 h turns off all
6b90: 4f 50 54 53 0a 23 20 73 65 74 20 74 68 65 20 61 OPTS.# set the a
6ba0: 62 6f 76 65 20 6d 61 63 72 6f 73 20 62 61 73 65 bove macros base
6bb0: 64 20 6f 6e 20 4f 50 54 53 20 63 6f 6e 74 65 6e d on OPTS conten
6bc0: 74 0a 21 69 66 20 22 24 28 4f 50 54 53 29 22 20 t.!if "$(OPTS)"
6bd0: 21 3d 20 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 != "" && ![nmake
6be0: 68 6c 70 20 2d 66 20 22 24 28 4f 50 54 53 29 22 hlp -f "$(OPTS)"
6bf0: 20 22 6e 6f 6e 65 22 5d 0a 0a 23 20 4f 50 54 53 "none"]..# OPTS
6c00: 20 61 72 65 20 73 70 65 63 69 66 69 65 64 2c 20 are specified,
6c10: 70 61 72 73 65 20 74 68 65 6d 0a 0a 21 69 66 20 parse them..!if
6c20: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
6c30: 50 54 53 29 20 22 73 74 61 74 69 63 22 5d 0a 21 PTS) "static"].!
6c40: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e message *** Doin
6c50: 67 20 73 74 61 74 69 63 0a 53 54 41 54 49 43 5f g static.STATIC_
6c60: 42 55 49 4c 44 09 3d 20 31 0a 21 65 6e 64 69 66 BUILD.= 1.!endif
6c70: 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
6c80: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 73 74 -f $(OPTS) "nost
6c90: 75 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a ubs"].!message *
6ca0: 2a 2a 20 4e 6f 74 20 75 73 69 6e 67 20 73 74 75 ** Not using stu
6cb0: 62 73 0a 55 53 45 5f 53 54 55 42 53 09 3d 20 30 bs.USE_STUBS.= 0
6cc0: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
6cd0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
6ce0: 29 20 22 6e 6f 6d 73 76 63 72 74 22 5d 0a 21 6d ) "nomsvcrt"].!m
6cf0: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
6d00: 20 6e 6f 6d 73 76 63 72 74 0a 4d 53 56 43 52 54 nomsvcrt.MSVCRT
6d10: 09 09 3d 20 30 0a 21 65 6c 73 65 0a 21 69 66 20 ..= 0.!else.!if
6d20: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
6d30: 50 54 53 29 20 22 6d 73 76 63 72 74 22 5d 0a 21 PTS) "msvcrt"].!
6d40: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e message *** Doin
6d50: 67 20 6d 73 76 63 72 74 0a 21 65 6c 73 65 0a 21 g msvcrt.!else.!
6d60: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
6d70: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 26 26 20 ERSION) == 8 &&
6d80: 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 $(TCL_MINOR_VERS
6d90: 49 4f 4e 29 20 3c 20 37 20 26 26 20 24 28 53 54 ION) < 7 && $(ST
6da0: 41 54 49 43 5f 42 55 49 4c 44 29 0a 4d 53 56 43 ATIC_BUILD).MSVC
6db0: 52 54 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 21 RT..= 0.!endif.!
6dc0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 5b endif.!endif # [
6dd0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
6de0: 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 22 5d 0a TS) "nomsvcrt"].
6df0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
6e00: 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 74 69 f $(OPTS) "stati
6e10: 63 70 6b 67 22 5d 20 26 26 20 24 28 53 54 41 54 cpkg"] && $(STAT
6e20: 49 43 5f 42 55 49 4c 44 29 0a 21 6d 65 73 73 61 IC_BUILD).!messa
6e30: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 74 61 ge *** Doing sta
6e40: 74 69 63 70 6b 67 0a 54 43 4c 5f 55 53 45 5f 53 ticpkg.TCL_USE_S
6e50: 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 09 3d TATIC_PACKAGES.=
6e60: 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 1.!endif..!if [
6e70: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
6e80: 54 53 29 20 22 6e 6f 74 68 72 65 61 64 73 22 5d TS) "nothreads"]
6e90: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f .!message *** Co
6ea0: 6d 70 69 6c 65 20 65 78 70 6c 69 63 69 74 6c 79 mpile explicitly
6eb0: 20 66 6f 72 20 6e 6f 6e 2d 74 68 72 65 61 64 65 for non-threade
6ec0: 64 20 74 63 6c 0a 54 43 4c 5f 54 48 52 45 41 44 d tcl.TCL_THREAD
6ed0: 53 20 3d 20 30 0a 55 53 45 5f 54 48 52 45 41 44 S = 0.USE_THREAD
6ee0: 5f 41 4c 4c 4f 43 3d 20 30 0a 21 65 6e 64 69 66 _ALLOC= 0.!endif
6ef0: 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
6f00: 2d 66 20 24 28 4f 50 54 53 29 20 22 74 63 6c 38 -f $(OPTS) "tcl8
6f10: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
6f20: 42 75 69 6c 64 20 66 6f 72 20 54 63 6c 38 0a 54 Build for Tcl8.T
6f30: 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 20 3d 20 38 CL_BUILD_FOR = 8
6f40: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 54 .!endif..!if $(T
6f50: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
6f60: 29 20 3d 3d 20 38 0a 21 69 66 20 5b 6e 6d 61 6b ) == 8.!if [nmak
6f70: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
6f80: 22 74 69 6d 65 36 34 62 69 74 22 5d 0a 21 6d 65 "time64bit"].!me
6f90: 73 73 61 67 65 20 2a 2a 2a 20 46 6f 72 63 65 20 ssage *** Force
6fa0: 36 34 2d 62 69 74 20 74 69 6d 65 5f 74 0a 5f 55 64-bit time_t._U
6fb0: 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 20 SE_64BIT_TIME_T
6fc0: 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 = 1.!endif..!if
6fd0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
6fe0: 50 54 53 29 20 22 75 74 66 31 36 22 5d 0a 21 6d PTS) "utf16"].!m
6ff0: 65 73 73 61 67 65 20 2a 2a 2a 20 46 6f 72 63 65 essage *** Force
7000: 20 55 54 46 2d 31 36 20 69 6e 74 65 72 6e 61 6c UTF-16 internal
7010: 6c 79 0a 54 43 4c 5f 55 54 46 5f 4d 41 58 20 3d ly.TCL_UTF_MAX =
7020: 20 33 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 3.!endif.!endif
7030: 0a 0a 23 20 59 65 73 2c 20 69 74 27 73 20 77 65 ..# Yes, it's we
7040: 69 72 64 20 74 68 61 74 20 74 68 65 20 22 73 79 ird that the "sy
7050: 6d 62 6f 6c 73 22 20 6f 70 74 69 6f 6e 20 63 6f mbols" option co
7060: 6e 74 72 6f 6c 73 20 44 45 42 55 47 20 61 6e 64 ntrols DEBUG and
7070: 0a 23 20 74 68 65 20 22 70 64 62 73 22 20 6f 70 .# the "pdbs" op
7080: 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 53 59 tion controls SY
7090: 4d 42 4f 4c 53 2e 20 54 68 61 74 27 73 20 68 69 MBOLS. That's hi
70a0: 73 74 6f 72 69 63 61 6c 2e 0a 21 69 66 20 5b 6e storical..!if [n
70b0: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
70c0: 53 29 20 22 73 79 6d 62 6f 6c 73 22 5d 0a 21 6d S) "symbols"].!m
70d0: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
70e0: 20 73 79 6d 62 6f 6c 73 0a 44 45 42 55 47 09 09 symbols.DEBUG..
70f0: 3d 20 31 0a 21 65 6c 73 65 0a 44 45 42 55 47 09 = 1.!else.DEBUG.
7100: 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 .= 0.!endif..!if
7110: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
7120: 4f 50 54 53 29 20 22 70 64 62 73 22 5d 0a 21 6d OPTS) "pdbs"].!m
7130: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7140: 20 70 64 62 73 0a 53 59 4d 42 4f 4c 53 09 09 3d pdbs.SYMBOLS..=
7150: 20 31 0a 21 65 6c 73 65 0a 53 59 4d 42 4f 4c 53 1.!else.SYMBOLS
7160: 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 ..= 0.!endif..!i
7170: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
7180: 28 4f 50 54 53 29 20 22 70 72 6f 66 69 6c 65 22 (OPTS) "profile"
7190: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ].!message *** D
71a0: 6f 69 6e 67 20 70 72 6f 66 69 6c 65 0a 50 52 4f oing profile.PRO
71b0: 46 49 4c 45 09 09 3d 20 31 0a 21 65 6c 73 65 0a FILE..= 1.!else.
71c0: 50 52 4f 46 49 4c 45 09 09 3d 20 30 0a 21 65 6e PROFILE..= 0.!en
71d0: 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 dif..!if [nmakeh
71e0: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 lp -f $(OPTS) "p
71f0: 67 69 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a gi"].!message **
7200: 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20 * Doing profile
7210: 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 guided optimizat
7220: 69 6f 6e 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 ion instrumentat
7230: 69 6f 6e 0a 50 47 4f 09 09 3d 20 31 0a 21 65 6c ion.PGO..= 1.!el
7240: 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d seif [nmakehlp -
7250: 66 20 24 28 4f 50 54 53 29 20 22 70 67 6f 22 5d f $(OPTS) "pgo"]
7260: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f .!message *** Do
7270: 69 6e 67 20 70 72 6f 66 69 6c 65 20 67 75 69 64 ing profile guid
7280: 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 0a ed optimization.
7290: 50 47 4f 09 09 3d 20 32 0a 21 65 6c 73 65 0a 50 PGO..= 2.!else.P
72a0: 47 4f 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a GO..= 0.!endif..
72b0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
72c0: 20 24 28 4f 50 54 53 29 20 22 6c 6f 69 6d 70 61 $(OPTS) "loimpa
72d0: 63 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a ct"].!message **
72e0: 2a 20 57 61 72 6e 69 6e 67 3a 20 69 67 6e 6f 72 * Warning: ignor
72f0: 69 6e 67 20 6f 70 74 69 6f 6e 20 22 6c 6f 69 6d ing option "loim
7300: 70 61 63 74 22 20 2d 20 64 65 70 72 65 63 61 74 pact" - deprecat
7310: 65 64 20 6f 6e 20 6d 6f 64 65 72 6e 20 57 69 6e ed on modern Win
7320: 64 6f 77 73 2e 0a 21 65 6e 64 69 66 0a 0a 23 20 dows..!endif..#
7330: 54 42 44 20 2d 20 73 68 6f 75 6c 64 20 67 65 74 TBD - should get
7340: 20 72 69 64 20 6f 66 20 74 68 69 73 20 6f 70 74 rid of this opt
7350: 69 6f 6e 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c ion.!if [nmakehl
7360: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 74 68 p -f $(OPTS) "th
7370: 72 64 61 6c 6c 6f 63 22 5d 0a 21 6d 65 73 73 61 rdalloc"].!messa
7380: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 74 68 72 ge *** Doing thr
7390: 64 61 6c 6c 6f 63 0a 55 53 45 5f 54 48 52 45 41 dalloc.USE_THREA
73a0: 44 5f 41 4c 4c 4f 43 20 3d 20 31 0a 21 65 6e 64 D_ALLOC = 1.!end
73b0: 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c if..!if [nmakehl
73c0: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 74 63 p -f $(OPTS) "tc
73d0: 6c 61 6c 6c 6f 63 22 5d 0a 55 53 45 5f 54 48 52 lalloc"].USE_THR
73e0: 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 30 0a 21 65 EAD_ALLOC = 0.!e
73f0: 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 ndif..!if [nmake
7400: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
7410: 75 6e 63 68 65 63 6b 65 64 22 5d 0a 21 6d 65 73 unchecked"].!mes
7420: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 75 sage *** Doing u
7430: 6e 63 68 65 63 6b 65 64 0a 55 4e 43 48 45 43 4b nchecked.UNCHECK
7440: 45 44 20 3d 20 31 0a 21 65 6c 73 65 0a 55 4e 43 ED = 1.!else.UNC
7450: 48 45 43 4b 45 44 20 3d 20 30 0a 21 65 6e 64 69 HECKED = 0.!endi
7460: 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 f..!if [nmakehlp
7470: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 63 -f $(OPTS) "noc
7480: 6f 6e 66 69 67 63 68 65 63 6b 22 5d 0a 43 4f 4e onfigcheck"].CON
7490: 46 49 47 5f 43 48 45 43 4b 20 3d 20 31 0a 21 65 FIG_CHECK = 1.!e
74a0: 6c 73 65 0a 43 4f 4e 46 49 47 5f 43 48 45 43 4b lse.CONFIG_CHECK
74b0: 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 65 6e = 0.!endif..!en
74c0: 64 69 66 20 23 20 22 24 28 4f 50 54 53 29 22 20 dif # "$(OPTS)"
74d0: 21 3d 20 22 22 20 20 26 26 20 2e 2e 2e 20 70 61 != "" && ... pa
74e0: 72 73 69 6e 67 20 6f 66 20 4f 50 54 53 0a 0a 23 rsing of OPTS..#
74f0: 20 53 65 74 20 6c 69 6e 6b 65 72 20 66 6c 61 67 Set linker flag
7500: 73 20 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 s based on above
7510: 0a 0a 21 69 66 20 24 28 50 47 4f 29 20 3e 20 31 ..!if $(PGO) > 1
7520: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
7530: 6c 20 2d 6c 74 63 67 3a 70 67 6f 70 74 69 6d 69 l -ltcg:pgoptimi
7540: 7a 65 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 ze $(LINKER_TEST
7550: 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c FLAGS)].LINKERFL
7560: 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 52 46 4c AGS.= $(LINKERFL
7570: 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 AGS:-ltcg=) -ltc
7580: 67 3a 70 67 6f 70 74 69 6d 69 7a 65 0a 21 65 6c g:pgoptimize.!el
7590: 73 65 0a 4d 53 47 3d 5e 0a 54 68 69 73 20 63 6f se.MSG=^.This co
75a0: 6d 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 mpiler does not
75b0: 73 75 70 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 support profile
75c0: 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 guided optimizat
75d0: 69 6f 6e 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 ion..!error $(MS
75e0: 47 29 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 69 G).!endif.!elsei
75f0: 66 20 24 28 50 47 4f 29 20 3e 20 30 0a 21 69 66 f $(PGO) > 0.!if
7600: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c [nmakehlp -l -l
7610: 74 63 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 tcg:pginstrument
7620: 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c $(LINKER_TESTFL
7630: 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 AGS)].LINKERFLAG
7640: 53 09 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 S.= $(LINKERFLAG
7650: 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 67 3a S:-ltcg=) -ltcg:
7660: 70 67 69 6e 73 74 72 75 6d 65 6e 74 0a 21 65 6c pginstrument.!el
7670: 73 65 0a 4d 53 47 3d 5e 0a 54 68 69 73 20 63 6f se.MSG=^.This co
7680: 6d 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 mpiler does not
7690: 73 75 70 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 support profile
76a0: 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 guided optimizat
76b0: 69 6f 6e 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 ion..!error $(MS
76c0: 47 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 G).!endif.!endif
76d0: 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
76e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
76f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7710: 23 23 0a 23 20 38 2e 20 50 61 72 73 65 20 74 68 ##.# 8. Parse th
7720: 65 20 53 54 41 54 53 20 6d 61 63 72 6f 20 74 6f e STATS macro to
7730: 20 63 6f 6e 66 69 67 75 72 65 20 63 6f 64 65 20 configure code
7740: 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a instrumentation.
7750: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
7760: 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 macros are set b
7770: 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a y this section:.
7780: 23 20 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 20 # TCL_MEM_DEBUG
7790: 2d 20 31 20 2d 3e 20 65 6e 61 62 6c 65 73 20 6d - 1 -> enables m
77a0: 65 6d 6f 72 79 20 61 6c 6c 6f 63 61 74 69 6f 6e emory allocation
77b0: 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e instrumentation
77c0: 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .#
77d0: 20 20 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0 -> disables
77e0: 0a 23 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 .# TCL_COMPILE_D
77f0: 45 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 62 EBUG - 1 -> enab
7800: 6c 65 73 20 62 79 74 65 20 63 6f 6d 70 69 6c 65 les byte compile
7810: 72 20 6c 6f 67 67 69 6e 67 0a 23 20 20 20 20 20 r logging.#
7820: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7830: 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0a 0a 23 0 -> disables..#
7840: 20 44 65 66 61 75 6c 74 20 62 6f 74 68 20 61 72 Default both ar
7850: 65 20 6f 66 66 0a 54 43 4c 5f 4d 45 4d 5f 44 45 e off.TCL_MEM_DE
7860: 42 55 47 09 20 20 20 20 3d 20 30 0a 54 43 4c 5f BUG. = 0.TCL_
7870: 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 20 20 COMPILE_DEBUG
7880: 3d 20 30 0a 0a 21 69 66 20 22 24 28 53 54 41 54 = 0..!if "$(STAT
7890: 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 5b 6e S)" != "" && ![n
78a0: 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 53 54 makehlp -f "$(ST
78b0: 41 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0a 0a 21 ATS)" "none"]..!
78c0: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
78d0: 24 28 53 54 41 54 53 29 20 22 6d 65 6d 64 62 67 $(STATS) "memdbg
78e0: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
78f0: 44 6f 69 6e 67 20 6d 65 6d 64 62 67 0a 54 43 4c Doing memdbg.TCL
7900: 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 20 3d _MEM_DEBUG. =
7910: 20 31 0a 21 65 6c 73 65 0a 54 43 4c 5f 4d 45 4d 1.!else.TCL_MEM
7920: 5f 44 45 42 55 47 09 20 20 20 20 3d 20 30 0a 21 _DEBUG. = 0.!
7930: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
7940: 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 29 ehlp -f $(STATS)
7950: 20 22 63 6f 6d 70 64 62 67 22 5d 0a 21 6d 65 73 "compdbg"].!mes
7960: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 63 sage *** Doing c
7970: 6f 6d 70 64 62 67 0a 54 43 4c 5f 43 4f 4d 50 49 ompdbg.TCL_COMPI
7980: 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 31 0a 21 LE_DEBUG = 1.!
7990: 65 6c 73 65 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 else.TCL_COMPILE
79a0: 5f 44 45 42 55 47 20 20 20 3d 20 30 0a 21 65 6e _DEBUG = 0.!en
79b0: 64 69 66 0a 0a 21 65 6e 64 69 66 0a 0a 23 23 23 dif..!endif..###
79c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
79d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
79e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
79f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a00: 23 0a 23 20 39 2e 20 50 61 72 73 65 20 74 68 65 #.# 9. Parse the
7a10: 20 43 48 45 43 4b 53 20 6d 61 63 72 6f 20 74 6f CHECKS macro to
7a20: 20 63 6f 6e 66 69 67 75 72 65 20 61 64 64 69 74 configure addit
7a30: 69 6f 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 63 ional compiler c
7a40: 68 65 63 6b 73 0a 23 20 54 68 65 20 66 6f 6c 6c hecks.# The foll
7a50: 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 owing macros are
7a60: 20 73 65 74 20 62 79 20 74 68 69 73 20 73 65 63 set by this sec
7a70: 74 69 6f 6e 3a 0a 23 20 57 41 52 4e 49 4e 47 53 tion:.# WARNINGS
7a80: 20 2d 20 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 - compiler swit
7a90: 63 68 65 73 20 74 68 61 74 20 63 6f 6e 74 72 6f ches that contro
7aa0: 6c 20 74 68 65 20 77 61 72 6e 69 6e 67 73 20 6c l the warnings l
7ab0: 65 76 65 6c 0a 23 20 54 43 4c 5f 4e 4f 5f 44 45 evel.# TCL_NO_DE
7ac0: 50 52 45 43 41 54 45 44 20 2d 20 31 20 2d 3e 20 PRECATED - 1 ->
7ad0: 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 74 20 disable support
7ae0: 66 6f 72 20 64 65 70 72 65 63 61 74 65 64 20 66 for deprecated f
7af0: 75 6e 63 74 69 6f 6e 73 0a 23 20 20 20 20 20 20 unctions.#
7b00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 0
7b10: 20 2d 3e 20 65 6e 61 62 6c 65 20 64 65 70 72 65 -> enable depre
7b20: 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e 73 0a cated functions.
7b30: 0a 23 20 44 65 66 61 75 6c 74 73 20 2d 20 50 65 .# Defaults - Pe
7b40: 72 6d 69 74 20 64 65 70 72 65 63 61 74 65 64 20 rmit deprecated
7b50: 66 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 77 61 functions and wa
7b60: 72 6e 69 6e 67 20 6c 65 76 65 6c 20 33 0a 54 43 rning level 3.TC
7b70: 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 L_NO_DEPRECATED.
7b80: 20 20 20 20 3d 20 30 0a 57 41 52 4e 49 4e 47 53 = 0.WARNINGS
7b90: 09 09 20 20 20 20 3d 20 2d 57 33 0a 0a 21 69 66 .. = -W3..!if
7ba0: 20 22 24 28 43 48 45 43 4b 53 29 22 20 21 3d 20 "$(CHECKS)" !=
7bb0: 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 "" && ![nmakehlp
7bc0: 20 2d 66 20 22 24 28 43 48 45 43 4b 53 29 22 20 -f "$(CHECKS)"
7bd0: 22 6e 6f 6e 65 22 5d 0a 0a 21 69 66 20 5b 6e 6d "none"]..!if [nm
7be0: 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 akehlp -f $(CHEC
7bf0: 4b 53 29 20 22 6e 6f 64 65 70 22 5d 0a 21 6d 65 KS) "nodep"].!me
7c00: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7c10: 6e 6f 64 65 70 20 63 68 65 63 6b 0a 54 43 4c 5f nodep check.TCL_
7c20: 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 20 20 NO_DEPRECATED.
7c30: 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 = 1.!endif..!i
7c40: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
7c50: 28 43 48 45 43 4b 53 29 20 22 66 75 6c 6c 77 61 (CHECKS) "fullwa
7c60: 72 6e 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a rn"].!message **
7c70: 2a 20 44 6f 69 6e 67 20 66 75 6c 6c 20 77 61 72 * Doing full war
7c80: 6e 69 6e 67 73 20 63 68 65 63 6b 0a 57 41 52 4e nings check.WARN
7c90: 49 4e 47 53 09 09 20 20 20 20 3d 20 2d 57 34 0a INGS.. = -W4.
7ca0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c !if [nmakehlp -l
7cb0: 20 2d 77 61 72 6e 3a 33 20 24 28 4c 49 4e 4b 45 -warn:3 $(LINKE
7cc0: 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 R_TESTFLAGS)].LI
7cd0: 4e 4b 45 52 46 4c 41 47 53 09 09 20 20 20 20 3d NKERFLAGS.. =
7ce0: 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 $(LINKERFLAGS)
7cf0: 2d 77 61 72 6e 3a 33 0a 21 65 6e 64 69 66 0a 21 -warn:3.!endif.!
7d00: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
7d10: 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b 53 ehlp -f $(CHECKS
7d20: 29 20 22 36 34 62 69 74 22 5d 20 26 26 20 5b 6e ) "64bit"] && [n
7d30: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 57 70 36 34 makehlp -c -Wp64
7d40: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ].!message *** D
7d50: 6f 69 6e 67 20 36 34 62 69 74 20 70 6f 72 74 61 oing 64bit porta
7d60: 62 69 6c 69 74 79 20 77 61 72 6e 69 6e 67 73 0a bility warnings.
7d70: 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 3d 20 WARNINGS.. =
7d80: 24 28 57 41 52 4e 49 4e 47 53 29 20 2d 57 70 36 $(WARNINGS) -Wp6
7d90: 34 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 4.!endif..!endif
7da0: 0a 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
7db0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7dc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7dd0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7de0: 23 23 23 0a 23 20 31 30 2e 20 43 6f 6e 73 74 72 ###.# 10. Constr
7df0: 75 63 74 20 6f 75 74 70 75 74 20 64 69 72 65 63 uct output direc
7e00: 74 6f 72 79 20 61 6e 64 20 66 69 6c 65 20 70 61 tory and file pa
7e10: 74 68 73 0a 23 20 46 69 67 75 72 65 2d 6f 75 74 ths.# Figure-out
7e20: 20 68 6f 77 20 74 6f 20 6e 61 6d 65 20 6f 75 72 how to name our
7e30: 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 61 6e intermediate an
7e40: 64 20 6f 75 74 70 75 74 20 64 69 72 65 63 74 6f d output directo
7e50: 72 69 65 73 2e 0a 23 20 49 6e 20 6f 72 64 65 72 ries..# In order
7e60: 20 74 6f 20 61 76 6f 69 64 20 69 6e 61 64 76 65 to avoid inadve
7e70: 72 74 65 6e 74 20 6d 69 78 69 6e 67 20 6f 66 20 rtent mixing of
7e80: 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 62 75 69 object files bui
7e90: 6c 74 20 75 73 69 6e 67 0a 23 20 64 69 66 66 65 lt using.# diffe
7ea0: 72 65 6e 74 20 63 6f 6d 70 69 6c 65 72 73 2c 20 rent compilers,
7eb0: 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 build configurat
7ec0: 69 6f 6e 73 20 65 74 63 2e 2c 0a 23 0a 23 20 4e ions etc.,.#.# N
7ed0: 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e aming convention
7ee0: 20 28 73 75 66 66 69 78 65 73 29 3a 0a 23 20 20 (suffixes):.#
7ef0: 20 74 20 3d 20 66 75 6c 6c 20 74 68 72 65 61 64 t = full thread
7f00: 20 73 75 70 70 6f 72 74 2e 20 28 4e 6f 74 20 75 support. (Not u
7f10: 73 65 64 20 66 6f 72 20 54 63 6c 20 3e 3d 20 38 sed for Tcl >= 8
7f20: 2e 37 29 0a 23 20 20 20 73 20 3d 20 73 74 61 74 .7).# s = stat
7f30: 69 63 20 6c 69 62 72 61 72 79 20 28 61 73 20 6f ic library (as o
7f40: 70 70 6f 73 65 64 20 74 6f 20 61 6e 20 69 6d 70 pposed to an imp
7f50: 6f 72 74 20 6c 69 62 72 61 72 79 29 0a 23 20 20 ort library).#
7f60: 20 67 20 3d 20 6c 69 6e 6b 65 64 20 74 6f 20 74 g = linked to t
7f70: 68 65 20 64 65 62 75 67 20 65 6e 61 62 6c 65 64 he debug enabled
7f80: 20 43 20 72 75 6e 2d 74 69 6d 65 2e 0a 23 20 20 C run-time..#
7f90: 20 78 20 3d 20 73 70 65 63 69 61 6c 20 73 74 61 x = special sta
7fa0: 74 69 63 20 62 75 69 6c 64 20 77 68 65 6e 20 69 tic build when i
7fb0: 74 20 6c 69 6e 6b 73 20 74 6f 20 74 68 65 20 64 t links to the d
7fc0: 79 6e 61 6d 69 63 20 43 20 72 75 6e 2d 74 69 6d ynamic C run-tim
7fd0: 65 2e 0a 23 0a 23 20 54 68 65 20 66 6f 6c 6c 6f e..#.# The follo
7fe0: 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 wing macros are
7ff0: 73 65 74 20 69 6e 20 74 68 69 73 20 73 65 63 74 set in this sect
8000: 69 6f 6e 3a 0a 23 20 53 55 46 58 20 2d 20 74 68 ion:.# SUFX - th
8010: 65 20 73 75 66 66 69 78 20 74 6f 20 75 73 65 20 e suffix to use
8020: 66 6f 72 20 62 69 6e 61 72 69 65 73 20 62 61 73 for binaries bas
8030: 65 64 20 6f 6e 20 61 62 6f 76 65 20 6e 61 6d 69 ed on above nami
8040: 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 0a 23 20 ng convention.#
8050: 42 55 49 4c 44 44 49 52 54 4f 50 20 2d 20 74 68 BUILDDIRTOP - th
8060: 65 20 74 6f 70 6c 65 76 65 6c 20 64 65 66 61 75 e toplevel defau
8070: 6c 74 20 6f 75 74 70 75 74 20 64 69 72 65 63 74 lt output direct
8080: 6f 72 79 0a 23 20 20 20 20 20 20 69 73 20 6f 66 ory.# is of
8090: 20 74 68 65 20 66 6f 72 6d 20 7b 52 65 6c 65 61 the form {Relea
80a0: 73 65 2c 44 65 62 75 67 7d 5b 5f 41 4d 44 36 34 se,Debug}[_AMD64
80b0: 5d 5b 5f 43 4f 4d 50 49 4c 45 52 56 45 52 53 49 ][_COMPILERVERSI
80c0: 4f 4e 5d 0a 23 20 54 4d 50 5f 44 49 52 20 2d 20 ON].# TMP_DIR -
80d0: 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 directory where
80e0: 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 61 72 65 object files are
80f0: 20 63 72 65 61 74 65 64 0a 23 20 4f 55 54 5f 44 created.# OUT_D
8100: 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 20 77 IR - directory w
8110: 68 65 72 65 20 6f 75 74 70 75 74 20 65 78 65 63 here output exec
8120: 75 74 61 62 6c 65 73 20 61 72 65 20 63 72 65 61 utables are crea
8130: 74 65 64 0a 23 20 42 6f 74 68 20 54 4d 50 5f 44 ted.# Both TMP_D
8140: 49 52 20 61 6e 64 20 4f 55 54 5f 44 49 52 20 61 IR and OUT_DIR a
8150: 72 65 20 64 65 66 61 75 6c 74 65 64 20 6f 6e 6c re defaulted onl
8160: 79 20 69 66 20 6e 6f 74 20 64 65 66 69 6e 65 64 y if not defined
8170: 20 62 79 20 74 68 65 0a 23 20 70 61 72 65 6e 74 by the.# parent
8180: 20 6d 61 6b 65 66 69 6c 65 20 28 6f 72 20 63 6f makefile (or co
8190: 6d 6d 61 6e 64 20 6c 69 6e 65 29 2e 20 54 68 65 mmand line). The
81a0: 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 73 20 default values
81b0: 61 72 65 0a 23 20 62 61 73 65 64 20 6f 6e 20 42 are.# based on B
81c0: 55 49 4c 44 44 49 52 54 4f 50 2e 0a 23 20 53 54 UILDDIRTOP..# ST
81d0: 55 42 50 52 45 46 49 58 20 2d 20 6e 61 6d 65 20 UBPREFIX - name
81e0: 6f 66 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 of the stubs lib
81f0: 72 61 72 79 20 66 6f 72 20 74 68 69 73 20 70 72 rary for this pr
8200: 6f 6a 65 63 74 0a 23 20 50 52 4a 49 4d 50 4c 49 oject.# PRJIMPLI
8210: 42 20 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20 B - output path
8220: 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 of the generated
8230: 20 70 72 6f 6a 65 63 74 20 69 6d 70 6f 72 74 20 project import
8240: 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 4c 49 42 library.# PRJLIB
8250: 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20 67 NAME - name of g
8260: 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 74 enerated project
8270: 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 4c 49 library.# PRJLI
8280: 42 20 20 20 20 20 2d 20 6f 75 74 70 75 74 20 70 B - output p
8290: 61 74 68 20 6f 66 20 67 65 6e 65 72 61 74 65 64 ath of generated
82a0: 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 72 79 project library
82b0: 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d .# PRJSTUBLIBNAM
82c0: 45 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 E - name of the
82d0: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
82e0: 74 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 0a t stubs library.
82f0: 23 20 50 52 4a 53 54 55 42 4c 49 42 20 2d 20 6f # PRJSTUBLIB - o
8300: 75 74 70 75 74 20 70 61 74 68 20 6f 66 20 74 68 utput path of th
8310: 65 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a e generated proj
8320: 65 63 74 20 73 74 75 62 73 20 6c 69 62 72 61 72 ect stubs librar
8330: 79 0a 23 20 52 45 53 46 49 4c 45 20 2d 20 6f 75 y.# RESFILE - ou
8340: 74 70 75 74 20 72 65 73 6f 75 72 63 65 20 66 69 tput resource fi
8350: 6c 65 20 28 6f 6e 6c 79 20 69 66 20 6e 6f 74 20 le (only if not
8360: 73 74 61 74 69 63 20 62 75 69 6c 64 29 0a 0a 53 static build)..S
8370: 55 46 58 09 20 20 20 20 3d 20 74 73 67 78 0a 0a UFX. = tsgx..
8380: 21 69 66 20 24 28 44 45 42 55 47 29 0a 42 55 49 !if $(DEBUG).BUI
8390: 4c 44 44 49 52 54 4f 50 20 3d 20 44 65 62 75 67 LDDIRTOP = Debug
83a0: 0a 21 65 6c 73 65 0a 42 55 49 4c 44 44 49 52 54 .!else.BUILDDIRT
83b0: 4f 50 20 3d 20 52 65 6c 65 61 73 65 0a 21 65 6e OP = Release.!en
83c0: 64 69 66 0a 0a 21 69 66 20 22 24 28 4d 41 43 48 dif..!if "$(MACH
83d0: 49 4e 45 29 22 20 21 3d 20 22 49 58 38 36 22 0a INE)" != "IX86".
83e0: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 28 42 BUILDDIRTOP =$(B
83f0: 55 49 4c 44 44 49 52 54 4f 50 29 5f 24 28 4d 41 UILDDIRTOP)_$(MA
8400: 43 48 49 4e 45 29 0a 21 65 6e 64 69 66 0a 21 69 CHINE).!endif.!i
8410: 66 20 24 28 56 43 56 45 52 29 20 3e 20 36 0a 42 f $(VCVER) > 6.B
8420: 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 28 42 55 UILDDIRTOP =$(BU
8430: 49 4c 44 44 49 52 54 4f 50 29 5f 56 43 24 28 56 ILDDIRTOP)_VC$(V
8440: 43 56 45 52 29 0a 21 65 6e 64 69 66 0a 0a 21 69 CVER).!endif..!i
8450: 66 20 21 24 28 44 45 42 55 47 29 20 7c 7c 20 24 f !$(DEBUG) || $
8460: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 (TCL_VERSION) >
8470: 38 36 20 7c 7c 20 24 28 44 45 42 55 47 29 20 26 86 || $(DEBUG) &
8480: 26 20 24 28 55 4e 43 48 45 43 4b 45 44 29 0a 53 & $(UNCHECKED).S
8490: 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 UFX. = $(SUFX
84a0: 3a 67 3d 29 0a 21 65 6e 64 69 66 0a 0a 54 4d 50 :g=).!endif..TMP
84b0: 5f 44 49 52 46 55 4c 4c 20 3d 20 2e 5c 24 28 42 _DIRFULL = .\$(B
84c0: 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 50 52 UILDDIRTOP)\$(PR
84d0: 4f 4a 45 43 54 29 5f 54 68 72 65 61 64 65 64 44 OJECT)_ThreadedD
84e0: 79 6e 61 6d 69 63 53 74 61 74 69 63 58 0a 0a 21 ynamicStaticX..!
84f0: 69 66 20 21 24 28 53 54 41 54 49 43 5f 42 55 49 if !$(STATIC_BUI
8500: 4c 44 29 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 LD).TMP_DIRFULL
8510: 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a = $(TMP_DIRFULL:
8520: 53 74 61 74 69 63 3d 29 0a 53 55 46 58 09 20 20 Static=).SUFX.
8530: 20 20 3d 20 24 28 53 55 46 58 3a 73 3d 29 0a 45 = $(SUFX:s=).E
8540: 58 54 09 20 20 20 20 3d 20 64 6c 6c 0a 54 4d 50 XT. = dll.TMP
8550: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 _DIRFULL = $(TMP
8560: 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a 53 55 46 _DIRFULL:X=).SUF
8570: 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a 78 X. = $(SUFX:x
8580: 3d 29 0a 21 65 6c 73 65 0a 54 4d 50 5f 44 49 52 =).!else.TMP_DIR
8590: 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 FULL = $(TMP_DIR
85a0: 46 55 4c 4c 3a 44 79 6e 61 6d 69 63 3d 29 0a 45 FULL:Dynamic=).E
85b0: 58 54 09 20 20 20 20 3d 20 6c 69 62 0a 21 69 66 XT. = lib.!if
85c0: 20 21 24 28 4d 53 56 43 52 54 29 0a 54 4d 50 5f !$(MSVCRT).TMP_
85d0: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
85e0: 44 49 52 46 55 4c 4c 3a 58 3d 29 0a 53 55 46 58 DIRFULL:X=).SUFX
85f0: 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a 78 3d . = $(SUFX:x=
8600: 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a ).!endif.!endif.
8610: 0a 21 69 66 20 21 24 28 54 43 4c 5f 54 48 52 45 .!if !$(TCL_THRE
8620: 41 44 53 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 ADS) || $(TCL_VE
8630: 52 53 49 4f 4e 29 20 3e 20 38 36 0a 54 4d 50 5f RSION) > 86.TMP_
8640: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
8650: 44 49 52 46 55 4c 4c 3a 54 68 72 65 61 64 65 64 DIRFULL:Threaded
8660: 3d 29 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 =).SUFX. = $(
8670: 53 55 46 58 3a 74 3d 29 0a 21 65 6e 64 69 66 0a SUFX:t=).!endif.
8680: 0a 21 69 66 6e 64 65 66 20 54 4d 50 5f 44 49 52 .!ifndef TMP_DIR
8690: 0a 54 4d 50 5f 44 49 52 09 20 20 20 20 3d 20 24 .TMP_DIR. = $
86a0: 28 54 4d 50 5f 44 49 52 46 55 4c 4c 29 0a 21 69 (TMP_DIRFULL).!i
86b0: 66 6e 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 fndef OUT_DIR.OU
86c0: 54 5f 44 49 52 09 20 20 20 20 3d 20 2e 5c 24 28 T_DIR. = .\$(
86d0: 42 55 49 4c 44 44 49 52 54 4f 50 29 0a 21 65 6e BUILDDIRTOP).!en
86e0: 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 6e 64 65 dif.!else.!ifnde
86f0: 66 20 4f 55 54 5f 44 49 52 0a 4f 55 54 5f 44 49 f OUT_DIR.OUT_DI
8700: 52 09 20 20 20 20 3d 20 24 28 54 4d 50 5f 44 49 R. = $(TMP_DI
8710: 52 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 R).!endif.!endif
8720: 0a 0a 23 20 52 65 6c 61 74 69 76 65 20 70 61 74 ..# Relative pat
8730: 68 73 20 2d 3e 20 61 62 73 6f 6c 75 74 65 0a 21 hs -> absolute.!
8740: 69 66 20 5b 65 63 68 6f 20 4f 55 54 5f 44 49 52 if [echo OUT_DIR
8750: 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f = \> nmakehlp.o
8760: 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 ut] \. || [nma
8770: 6b 65 68 6c 70 20 2d 51 20 22 24 28 4f 55 54 5f kehlp -Q "$(OUT_
8780: 44 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c DIR)" >> nmakehl
8790: 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a p.out].!error **
87a0: 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c * Could not full
87b0: 79 20 71 75 61 6c 69 66 79 20 70 61 74 68 20 4f y qualify path O
87c0: 55 54 5f 44 49 52 3d 24 28 4f 55 54 5f 44 49 52 UT_DIR=$(OUT_DIR
87d0: 29 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 ).!endif.!if [ec
87e0: 68 6f 20 54 4d 50 5f 44 49 52 20 3d 20 5c 3e 3e ho TMP_DIR = \>>
87f0: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c nmakehlp.out] \
8800: 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 . || [nmakehlp
8810: 20 2d 51 20 22 24 28 54 4d 50 5f 44 49 52 29 22 -Q "$(TMP_DIR)"
8820: 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 >> nmakehlp.out
8830: 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 ].!error *** Cou
8840: 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 ld not fully qua
8850: 6c 69 66 79 20 70 61 74 68 20 54 4d 50 5f 44 49 lify path TMP_DI
8860: 52 3d 24 28 54 4d 50 5f 44 49 52 29 0a 21 65 6e R=$(TMP_DIR).!en
8870: 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 dif.!include nma
8880: 6b 65 68 6c 70 2e 6f 75 74 0a 0a 23 20 54 68 65 kehlp.out..# The
8890: 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 74 75 name of the stu
88a0: 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 20 74 bs library for t
88b0: 68 65 20 70 72 6f 6a 65 63 74 20 62 65 69 6e 67 he project being
88c0: 20 62 75 69 6c 74 0a 53 54 55 42 50 52 45 46 49 built.STUBPREFI
88d0: 58 20 20 20 20 20 20 3d 20 24 28 50 52 4f 4a 45 X = $(PROJE
88e0: 43 54 29 73 74 75 62 0a 0a 23 0a 23 20 53 65 74 CT)stub..#.# Set
88f0: 20 75 70 20 70 61 74 68 73 20 74 6f 20 76 61 72 up paths to var
8900: 69 6f 75 73 20 54 63 6c 20 65 78 65 63 75 74 61 ious Tcl executa
8910: 62 6c 65 73 20 61 6e 64 20 6c 69 62 72 61 72 69 bles and librari
8920: 65 73 20 6e 65 65 64 65 64 20 62 79 20 65 78 74 es needed by ext
8930: 65 6e 73 69 6f 6e 73 0a 23 0a 0a 23 20 54 49 50 ensions.#..# TIP
8940: 20 34 33 30 2e 20 55 6e 75 73 65 64 20 66 6f 72 430. Unused for
8950: 20 38 2e 36 20 62 75 74 20 6e 6f 20 68 61 72 6d 8.6 but no harm
8960: 20 64 65 66 69 6e 69 6e 67 20 69 74 20 74 6f 20 defining it to
8970: 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d 6f 6e 20 72 allow a common r
8980: 75 6c 65 73 2e 76 63 0a 54 43 4c 53 43 52 49 50 ules.vc.TCLSCRIP
8990: 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 62 74 63 TZIPNAME = libtc
89a0: 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 l$(TCL_MAJOR_VER
89b0: 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f SION).$(TCL_MINO
89c0: 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 43 4c 5f R_VERSION)$(TCL_
89d0: 50 41 54 43 48 5f 4c 45 54 54 45 52 29 24 28 54 PATCH_LETTER)$(T
89e0: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
89f0: 4c 29 2e 7a 69 70 0a 54 4b 53 43 52 49 50 54 5a L).zip.TKSCRIPTZ
8a00: 49 50 4e 41 4d 45 20 3d 20 6c 69 62 74 6b 24 28 IPNAME = libtk$(
8a10: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
8a20: 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 ).$(TK_MINOR_VER
8a30: 53 49 4f 4e 29 24 28 54 4b 5f 50 41 54 43 48 5f SION)$(TK_PATCH_
8a40: 4c 45 54 54 45 52 29 24 28 54 4b 5f 52 45 4c 45 LETTER)$(TK_RELE
8a50: 41 53 45 5f 53 45 52 49 41 4c 29 2e 7a 69 70 0a ASE_SERIAL).zip.
8a60: 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c .!if $(DOING_TCL
8a70: 29 0a 54 43 4c 53 48 4e 41 4d 45 20 20 20 20 20 ).TCLSHNAME
8a80: 20 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 73 68 = $(PROJECT)sh
8a90: 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 $(VERSION)$(SUFX
8aa0: 29 2e 65 78 65 0a 54 43 4c 53 48 09 09 3d 20 24 ).exe.TCLSH..= $
8ab0: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 53 (OUT_DIR)\$(TCLS
8ac0: 48 4e 41 4d 45 29 0a 54 43 4c 49 4d 50 4c 49 42 HNAME).TCLIMPLIB
8ad0: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
8ae0: 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f PROJECT)$(VERSIO
8af0: 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 54 43 N)$(SUFX).lib.TC
8b00: 4c 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 4f LLIBNAME.= $(PRO
8b10: 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 JECT)$(VERSION)$
8b20: 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 43 (SUFX).$(EXT).TC
8b30: 4c 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 LLIB..= $(OUT_DI
8b40: 52 29 5c 24 28 54 43 4c 4c 49 42 4e 41 4d 45 29 R)\$(TCLLIBNAME)
8b50: 0a 54 43 4c 53 43 52 49 50 54 5a 49 50 20 20 20 .TCLSCRIPTZIP
8b60: 20 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 = $(OUT_DIR)\$(
8b70: 54 43 4c 53 43 52 49 50 54 5a 49 50 4e 41 4d 45 TCLSCRIPTZIPNAME
8b80: 29 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a )..!if $(TCL_MAJ
8b90: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 OR_VERSION) == 8
8ba0: 0a 54 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 09 .TCLSTUBLIBNAME.
8bb0: 3d 20 24 28 53 54 55 42 50 52 45 46 49 58 29 24 = $(STUBPREFIX)$
8bc0: 28 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 (VERSION).lib.!e
8bd0: 6c 73 65 0a 54 43 4c 53 54 55 42 4c 49 42 4e 41 lse.TCLSTUBLIBNA
8be0: 4d 45 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 ME.= $(STUBPREFI
8bf0: 58 29 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 X).lib.!endif.TC
8c00: 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 LSTUBLIB.= $(OUT
8c10: 5f 44 49 52 29 5c 24 28 54 43 4c 53 54 55 42 4c _DIR)\$(TCLSTUBL
8c20: 49 42 4e 41 4d 45 29 0a 54 43 4c 5f 49 4e 43 4c IBNAME).TCL_INCL
8c30: 55 44 45 53 20 20 20 20 3d 20 2d 49 22 24 28 57 UDES = -I"$(W
8c40: 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 47 45 IN_DIR)" -I"$(GE
8c50: 4e 45 52 49 43 44 49 52 29 22 0a 0a 21 65 6c 73 NERICDIR)"..!els
8c60: 65 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c e # !$(DOING_TCL
8c70: 29 0a 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 54 )..!if $(TCLINST
8c80: 41 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e 67 20 ALL) # Building
8c90: 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 against an insta
8ca0: 6c 6c 65 64 20 54 63 6c 0a 0a 23 20 57 68 65 6e lled Tcl..# When
8cb0: 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 building extens
8cc0: 69 6f 6e 73 2c 20 77 65 20 6e 65 65 64 20 74 6f ions, we need to
8cd0: 20 6c 6f 63 61 74 65 20 74 63 6c 73 68 2e 20 44 locate tclsh. D
8ce0: 65 70 65 6e 64 69 6e 67 20 6f 6e 20 76 65 72 73 epending on vers
8cf0: 69 6f 6e 0a 23 20 6f 66 20 54 63 6c 20 77 65 20 ion.# of Tcl we
8d00: 61 72 65 20 62 75 69 6c 64 69 6e 67 20 61 67 61 are building aga
8d10: 69 6e 73 74 2c 20 74 68 69 73 20 6d 61 79 20 6f inst, this may o
8d20: 72 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 20 61 r may not have a
8d30: 20 22 74 22 20 73 75 66 66 69 78 2e 0a 23 20 54 "t" suffix..# T
8d40: 72 79 20 76 61 72 69 6f 75 73 20 70 6f 73 73 69 ry various possi
8d50: 62 69 6c 69 74 69 65 73 20 69 6e 20 74 75 72 6e bilities in turn
8d60: 2e 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 ..TCLSH..= $(_TC
8d70: 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c 73 68 24 LDIR)\bin\tclsh$
8d80: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 (TCL_VERSION)$(S
8d90: 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 69 66 20 UFX:t=).exe.!if
8da0: 21 65 78 69 73 74 28 22 24 28 54 43 4c 53 48 29 !exist("$(TCLSH)
8db0: 22 29 0a 54 43 4c 53 48 20 20 20 20 20 20 20 20 ").TCLSH
8dc0: 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c = $(_TCLDIR)\
8dd0: 62 69 6e 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 bin\tclsh$(TCL_V
8de0: 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 ERSION)t$(SUFX:t
8df0: 3d 29 2e 65 78 65 0a 21 65 6e 64 69 66 0a 0a 21 =).exe.!endif..!
8e00: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
8e10: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 43 4c ERSION) == 8.TCL
8e20: 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c STUBLIB.= $(_TCL
8e30: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 DIR)\lib\tclstub
8e40: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c $(TCL_VERSION).l
8e50: 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 54 55 42 ib.!else.TCLSTUB
8e60: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
8e70: 5c 6c 69 62 5c 74 63 6c 73 74 75 62 2e 6c 69 62 \lib\tclstub.lib
8e80: 0a 21 65 6e 64 69 66 0a 54 43 4c 49 4d 50 4c 49 .!endif.TCLIMPLI
8e90: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c B.= $(_TCLDIR)\l
8ea0: 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 ib\tcl$(TCL_VERS
8eb0: 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c ION)$(SUFX:t=).l
8ec0: 69 62 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 ib.# When buildi
8ed0: 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d ng extensions, m
8ee0: 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 ay be linking ag
8ef0: 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 20 64 ainst Tcl that d
8f00: 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 oes not add.# "t
8f10: 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 " suffix (e.g. 8
8f20: 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 6c .5 or 8.7). If l
8f30: 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 ib not found che
8f40: 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 ck for that poss
8f50: 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 ibility..!if !ex
8f60: 69 73 74 28 22 24 28 54 43 4c 49 4d 50 4c 49 42 ist("$(TCLIMPLIB
8f70: 29 22 29 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 )").TCLIMPLIB.=
8f80: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 $(_TCLDIR)\lib\t
8f90: 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 cl$(TCL_VERSION)
8fa0: 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a t$(SUFX:t=).lib.
8fb0: 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 42 52 41 !endif.TCL_LIBRA
8fc0: 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c RY.= $(_TCLDIR)\
8fd0: 6c 69 62 0a 54 43 4c 52 45 47 4c 49 42 09 3d 20 lib.TCLREGLIB.=
8fe0: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 $(_TCLDIR)\lib\t
8ff0: 63 6c 72 65 67 31 33 24 28 53 55 46 58 3a 74 3d clreg13$(SUFX:t=
9000: 29 2e 6c 69 62 0a 54 43 4c 44 44 45 4c 49 42 09 ).lib.TCLDDELIB.
9010: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 = $(_TCLDIR)\lib
9020: 5c 74 63 6c 64 64 65 31 34 24 28 53 55 46 58 3a \tcldde14$(SUFX:
9030: 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 43 52 49 50 t=).lib.TCLSCRIP
9040: 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 49 52 TZIP.= $(_TCLDIR
9050: 29 5c 6c 69 62 5c 24 28 54 43 4c 53 43 52 49 50 )\lib\$(TCLSCRIP
9060: 54 5a 49 50 4e 41 4d 45 29 0a 54 43 4c 54 4f 4f TZIPNAME).TCLTOO
9070: 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 5c 68 61 LSDIR.= \must\ha
9080: 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 73 5c 74 ve\tcl\sources\t
9090: 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c 74 61 72 o\build\this\tar
90a0: 67 65 74 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 53 get.TCL_INCLUDES
90b0: 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 43 4c 44 = -I"$(_TCLD
90c0: 49 52 29 5c 69 6e 63 6c 75 64 65 22 0a 0a 21 65 IR)\include"..!e
90d0: 6c 73 65 20 23 20 42 75 69 6c 64 69 6e 67 20 61 lse # Building a
90e0: 67 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 gainst Tcl sourc
90f0: 65 73 0a 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f es..TCLSH..= $(_
9100: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
9110: 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 68 ILDDIRTOP)\tclsh
9120: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 28 $(TCL_VERSION)$(
9130: 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 69 66 SUFX:t=).exe.!if
9140: 20 21 65 78 69 73 74 28 24 28 54 43 4c 53 48 29 !exist($(TCLSH)
9150: 29 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 ).TCLSH..= $(_TC
9160: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
9170: 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 DDIRTOP)\tclsh$(
9180: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 TCL_VERSION)t$(S
9190: 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 65 6e 64 UFX:t=).exe.!end
91a0: 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a if.!if $(TCL_MAJ
91b0: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 OR_VERSION) == 8
91c0: 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 .TCLSTUBLIB.= $(
91d0: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 _TCLDIR)\win\$(B
91e0: 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 UILDDIRTOP)\tcls
91f0: 74 75 62 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e tub$(TCL_VERSION
9200: 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 ).lib.!else.TCLS
9210: 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 TUBLIB.= $(_TCLD
9220: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9230: 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 2e 6c IRTOP)\tclstub.l
9240: 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 49 4d 50 ib.!endif.TCLIMP
9250: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
9260: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
9270: 4f 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 OP)\tcl$(TCL_VER
9280: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
9290: 6c 69 62 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 lib.# When build
92a0: 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 ing extensions,
92b0: 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 may be linking a
92c0: 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 20 gainst Tcl that
92d0: 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 does not add.# "
92e0: 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 t" suffix (e.g.
92f0: 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 8.5 or 8.7). If
9300: 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 lib not found ch
9310: 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 eck for that pos
9320: 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 sibility..!if !e
9330: 78 69 73 74 28 22 24 28 54 43 4c 49 4d 50 4c 49 xist("$(TCLIMPLI
9340: 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 42 09 3d B)").TCLIMPLIB.=
9350: 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c $(_TCLDIR)\win\
9360: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 $(BUILDDIRTOP)\t
9370: 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 cl$(TCL_VERSION)
9380: 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a t$(SUFX:t=).lib.
9390: 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 42 52 41 !endif.TCL_LIBRA
93a0: 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c RY.= $(_TCLDIR)\
93b0: 6c 69 62 72 61 72 79 0a 54 43 4c 52 45 47 4c 49 library.TCLREGLI
93c0: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
93d0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
93e0: 29 5c 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 )\tclreg13$(SUFX
93f0: 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 44 44 45 4c :t=).lib.TCLDDEL
9400: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9410: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
9420: 50 29 5c 74 63 6c 64 64 65 31 34 24 28 53 55 46 P)\tcldde14$(SUF
9430: 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 43 52 X:t=).lib.TCLSCR
9440: 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 IPTZIP.= $(_TCLD
9450: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9460: 49 52 54 4f 50 29 5c 24 28 54 43 4c 53 43 52 49 IRTOP)\$(TCLSCRI
9470: 50 54 5a 49 50 4e 41 4d 45 29 0a 54 43 4c 54 4f PTZIPNAME).TCLTO
9480: 4f 4c 53 44 49 52 09 3d 20 24 28 5f 54 43 4c 44 OLSDIR.= $(_TCLD
9490: 49 52 29 5c 74 6f 6f 6c 73 0a 54 43 4c 5f 49 4e IR)\tools.TCL_IN
94a0: 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 28 5f 54 CLUDES.= -I"$(_T
94b0: 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 CLDIR)\generic"
94c0: 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 -I"$(_TCLDIR)\wi
94d0: 6e 22 0a 0a 21 65 6e 64 69 66 20 23 20 54 43 4c n"..!endif # TCL
94e0: 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 21 24 28 INSTALL..!if !$(
94f0: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 26 26 STATIC_BUILD) &&
9500: 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f "$(TCL_BUILD_FO
9510: 52 29 22 20 3d 3d 20 22 38 22 0a 74 63 6c 6c 69 R)" == "8".tclli
9520: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
9530: 49 42 29 22 0a 21 65 6c 73 65 0a 74 63 6c 6c 69 IB)".!else.tclli
9540: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
9550: 49 42 29 22 20 22 24 28 54 43 4c 49 4d 50 4c 49 IB)" "$(TCLIMPLI
9560: 42 29 22 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 B)".!endif..!end
9570: 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 43 4c if # $(DOING_TCL
9580: 29 0a 0a 23 20 57 65 20 6e 65 65 64 20 61 20 74 )..# We need a t
9590: 63 6c 73 68 20 74 68 61 74 20 77 69 6c 6c 20 72 clsh that will r
95a0: 75 6e 20 6f 6e 20 74 68 65 20 68 6f 73 74 20 6d un on the host m
95b0: 61 63 68 69 6e 65 20 61 73 20 70 61 72 74 20 6f achine as part o
95c0: 66 20 74 68 65 20 62 75 69 6c 64 2e 0a 23 20 49 f the build..# I
95d0: 58 38 36 20 72 75 6e 73 20 6f 6e 20 61 6c 6c 20 X86 runs on all
95e0: 61 72 63 68 69 74 65 63 74 75 72 65 73 2e 0a 21 architectures..!
95f0: 69 66 6e 64 65 66 20 54 43 4c 53 48 5f 4e 41 54 ifndef TCLSH_NAT
9600: 49 56 45 0a 21 69 66 20 22 24 28 4d 41 43 48 49 IVE.!if "$(MACHI
9610: 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 20 7c NE)" == "IX86" |
9620: 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d | "$(MACHINE)" =
9630: 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 43 48 = "$(NATIVE_ARCH
9640: 29 22 0a 54 43 4c 53 48 5f 4e 41 54 49 56 45 09 )".TCLSH_NATIVE.
9650: 3d 20 24 28 54 43 4c 53 48 29 0a 21 65 6c 73 65 = $(TCLSH).!else
9660: 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 73 74 .!error You must
9670: 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 explicitly set
9680: 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 6f 72 TCLSH_NATIVE for
9690: 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 cross-compilati
96a0: 6f 6e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 on.!endif.!endif
96b0: 0a 0a 23 20 44 6f 20 74 68 65 20 73 61 6d 65 20 ..# Do the same
96c0: 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20 65 78 for Tk and Tk ex
96d0: 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 20 72 65 tensions that re
96e0: 71 75 69 72 65 20 74 68 65 20 54 6b 20 6c 69 62 quire the Tk lib
96f0: 72 61 72 69 65 73 0a 21 69 66 20 24 28 44 4f 49 raries.!if $(DOI
9700: 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45 45 44 NG_TK) || $(NEED
9710: 5f 54 4b 29 0a 57 49 53 48 4e 41 4d 45 50 52 45 _TK).WISHNAMEPRE
9720: 46 49 58 20 3d 20 77 69 73 68 0a 57 49 53 48 4e FIX = wish.WISHN
9730: 41 4d 45 20 3d 20 24 28 57 49 53 48 4e 41 4d 45 AME = $(WISHNAME
9740: 50 52 45 46 49 58 29 24 28 54 4b 5f 56 45 52 53 PREFIX)$(TK_VERS
9750: 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 65 0a ION)$(SUFX).exe.
9760: 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 74 6b 24 TKLIBNAME8.= tk$
9770: 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 (TK_VERSION)$(SU
9780: 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 4c 49 42 FX).$(EXT).TKLIB
9790: 4e 41 4d 45 39 09 3d 20 74 63 6c 39 74 6b 24 28 NAME9.= tcl9tk$(
97a0: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
97b0: 58 29 2e 24 28 45 58 54 29 0a 21 69 66 20 24 28 X).$(EXT).!if $(
97c0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
97d0: 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 54 43 N) == 8 || "$(TC
97e0: 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d L_BUILD_FOR)" ==
97f0: 20 22 38 22 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d "8".TKLIBNAME.=
9800: 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 tk$(TK_VERSION)
9810: 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 $(SUFX).$(EXT).T
9820: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b KIMPLIBNAME.= tk
9830: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
9840: 55 46 58 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 UFX).lib.!else.T
9850: 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 KLIBNAME.= tcl9t
9860: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9870: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 49 SUFX).$(EXT).TKI
9880: 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 MPLIBNAME.= tcl9
9890: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
98a0: 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6e 64 69 (SUFX).lib.!endi
98b0: 66 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 f.TKSTUBLIBNAME.
98c0: 3d 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 = tkstub$(TK_VER
98d0: 53 49 4f 4e 29 2e 6c 69 62 0a 0a 21 69 66 20 24 SION).lib..!if $
98e0: 28 44 4f 49 4e 47 5f 54 4b 29 0a 57 49 53 48 20 (DOING_TK).WISH
98f0: 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 ..= $(OUT_DIR)\$
9900: 28 57 49 53 48 4e 41 4d 45 29 0a 54 4b 53 54 55 (WISHNAME).TKSTU
9910: 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 BLIB.= $(OUT_DIR
9920: 29 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 4d )\$(TKSTUBLIBNAM
9930: 45 29 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 E).TKIMPLIB.= $(
9940: 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 49 4d 50 OUT_DIR)\$(TKIMP
9950: 4c 49 42 4e 41 4d 45 29 0a 54 4b 4c 49 42 09 09 LIBNAME).TKLIB..
9960: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
9970: 4b 4c 49 42 4e 41 4d 45 29 0a 54 4b 5f 49 4e 43 KLIBNAME).TK_INC
9980: 4c 55 44 45 53 20 20 20 20 20 3d 20 2d 49 22 24 LUDES = -I"$
9990: 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 (WIN_DIR)" -I"$(
99a0: 47 45 4e 45 52 49 43 44 49 52 29 22 0a 54 4b 53 GENERICDIR)".TKS
99b0: 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 24 CRIPTZIP = $
99c0: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 53 43 (OUT_DIR)\$(TKSC
99d0: 52 49 50 54 5a 49 50 4e 41 4d 45 29 0a 0a 21 65 RIPTZIPNAME)..!e
99e0: 6c 73 65 20 23 20 65 66 66 65 63 74 69 76 65 6c lse # effectivel
99f0: 79 20 4e 45 45 44 5f 54 4b 0a 0a 21 69 66 20 24 y NEED_TK..!if $
9a00: 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 (TKINSTALL) # Bu
9a10: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 69 ilding against i
9a20: 6e 73 74 61 6c 6c 65 64 20 54 6b 0a 57 49 53 48 nstalled Tk.WISH
9a30: 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 62 69 ..= $(_TKDIR)\bi
9a40: 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 4b n\$(WISHNAME).TK
9a50: 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 4b 44 STUBLIB.= $(_TKD
9a60: 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 54 55 42 IR)\lib\$(TKSTUB
9a70: 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 LIBNAME).TKIMPLI
9a80: 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 B.= $(_TKDIR)\li
9a90: 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 b\$(TKIMPLIBNAME
9aa0: 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e ).# When buildin
9ab0: 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 g extensions, ma
9ac0: 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 y be linking aga
9ad0: 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 6f 65 inst Tk that doe
9ae0: 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 22 20 s not add.# "t"
9af0: 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 35 suffix (e.g. 8.5
9b00: 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 6c 69 62 or 8.7). If lib
9b10: 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b not found check
9b20: 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 for that possib
9b30: 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 69 73 ility..!if !exis
9b40: 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 t("$(TKIMPLIB)")
9b50: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 .TKIMPLIBNAME.=
9b60: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9b70: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b (SUFX:t=).lib.TK
9b80: 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 IMPLIB.= $(_TKDI
9b90: 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 R)\lib\$(TKIMPLI
9ba0: 42 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a 54 4b BNAME).!endif.TK
9bb0: 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 _INCLUDES =
9bc0: 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 69 6e 63 -I"$(_TKDIR)\inc
9bd0: 6c 75 64 65 22 0a 54 4b 53 43 52 49 50 54 5a 49 lude".TKSCRIPTZI
9be0: 50 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 P = $(_TKDIR
9bf0: 29 5c 6c 69 62 5c 24 28 54 4b 53 43 52 49 50 54 )\lib\$(TKSCRIPT
9c00: 5a 49 50 4e 41 4d 45 29 0a 0a 21 65 6c 73 65 20 ZIPNAME)..!else
9c10: 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e # Building again
9c20: 73 74 20 54 6b 20 73 6f 75 72 63 65 73 0a 0a 57 st Tk sources..W
9c30: 49 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 ISH..= $(_TKDIR)
9c40: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
9c50: 4f 50 29 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a OP)\$(WISHNAME).
9c60: 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 TKSTUBLIB.= $(_T
9c70: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
9c80: 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 53 54 55 DDIRTOP)\$(TKSTU
9c90: 42 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c BLIBNAME).TKIMPL
9ca0: 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 IB.= $(_TKDIR)\w
9cb0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9cc0: 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 )\$(TKIMPLIBNAME
9cd0: 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e ).# When buildin
9ce0: 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 g extensions, ma
9cf0: 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 y be linking aga
9d00: 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 6f 65 inst Tk that doe
9d10: 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 22 20 s not add.# "t"
9d20: 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 35 suffix (e.g. 8.5
9d30: 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 6c 69 62 or 8.7). If lib
9d40: 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b not found check
9d50: 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 for that possib
9d60: 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 69 73 ility..!if !exis
9d70: 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 t("$(TKIMPLIB)")
9d80: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 .TKIMPLIBNAME.=
9d90: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9da0: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b (SUFX:t=).lib.TK
9db0: 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 IMPLIB.= $(_TKDI
9dc0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
9dd0: 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49 42 RTOP)\$(TKIMPLIB
9de0: 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a 54 4b 5f NAME).!endif.TK_
9df0: 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 2d INCLUDES = -
9e00: 49 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 I"$(_TKDIR)\gene
9e10: 72 69 63 22 20 2d 49 22 24 28 5f 54 4b 44 49 52 ric" -I"$(_TKDIR
9e20: 29 5c 77 69 6e 22 20 2d 49 22 24 28 5f 54 4b 44 )\win" -I"$(_TKD
9e30: 49 52 29 5c 78 6c 69 62 22 0a 54 4b 53 43 52 49 IR)\xlib".TKSCRI
9e40: 50 54 5a 49 50 20 20 20 20 20 3d 20 24 28 5f 54 PTZIP = $(_T
9e50: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
9e60: 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 53 43 52 DDIRTOP)\$(TKSCR
9e70: 49 50 54 5a 49 50 4e 41 4d 45 29 0a 0a 21 65 6e IPTZIPNAME)..!en
9e80: 64 69 66 20 23 20 54 4b 49 4e 53 54 41 4c 4c 0a dif # TKINSTALL.
9e90: 0a 74 6b 6c 69 62 73 20 3d 20 22 24 28 54 4b 53 .tklibs = "$(TKS
9ea0: 54 55 42 4c 49 42 29 22 20 22 24 28 54 4b 49 4d TUBLIB)" "$(TKIM
9eb0: 50 4c 49 42 29 22 0a 0a 21 65 6e 64 69 66 20 23 PLIB)"..!endif #
9ec0: 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 21 65 6e $(DOING_TK).!en
9ed0: 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 4b dif # $(DOING_TK
9ee0: 29 20 7c 7c 20 24 28 4e 45 45 44 5f 54 4b 29 0a ) || $(NEED_TK).
9ef0: 0a 23 20 56 61 72 69 6f 75 73 20 6f 75 74 70 75 .# Various outpu
9f00: 74 20 70 61 74 68 73 0a 50 52 4a 49 4d 50 4c 49 t paths.PRJIMPLI
9f10: 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 B.= $(OUT_DIR)\$
9f20: 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 (PROJECT)$(VERSI
9f30: 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 50 ON)$(SUFX).lib.P
9f40: 52 4a 4c 49 42 4e 41 4d 45 38 09 3d 20 24 28 50 RJLIBNAME8.= $(P
9f50: 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e ROJECT)$(VERSION
9f60: 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a )$(SUFX).$(EXT).
9f70: 50 52 4a 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 PRJLIBNAME9.= tc
9f80: 6c 39 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 l9$(PROJECT)$(VE
9f90: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 RSION)$(SUFX).$(
9fa0: 45 58 54 29 0a 21 69 66 20 24 28 54 43 4c 5f 4d EXT).!if $(TCL_M
9fb0: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d AJOR_VERSION) ==
9fc0: 20 38 20 7c 7c 20 22 24 28 54 43 4c 5f 42 55 49 8 || "$(TCL_BUI
9fd0: 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a LD_FOR)" == "8".
9fe0: 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 PRJLIBNAME.= $(P
9ff0: 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 21 65 6c 73 RJLIBNAME8).!els
a000: 65 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 e.PRJLIBNAME.= $
a010: 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 0a 21 65 (PRJLIBNAME9).!e
a020: 6e 64 69 66 0a 50 52 4a 4c 49 42 09 09 3d 20 24 ndif.PRJLIB..= $
a030: 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4a 4c (OUT_DIR)\$(PRJL
a040: 49 42 4e 41 4d 45 29 0a 0a 21 69 66 20 24 28 54 IBNAME)..!if $(T
a050: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
a060: 29 20 3d 3d 20 38 0a 50 52 4a 53 54 55 42 4c 49 ) == 8.PRJSTUBLI
a070: 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52 BNAME.= $(STUBPR
a080: 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e 29 2e EFIX)$(VERSION).
a090: 6c 69 62 0a 21 65 6c 73 65 0a 50 52 4a 53 54 55 lib.!else.PRJSTU
a0a0: 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 BLIBNAME.= $(STU
a0b0: 42 50 52 45 46 49 58 29 2e 6c 69 62 0a 21 65 6e BPREFIX).lib.!en
a0c0: 64 69 66 0a 50 52 4a 53 54 55 42 4c 49 42 09 3d dif.PRJSTUBLIB.=
a0d0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 $(OUT_DIR)\$(PR
a0e0: 4a 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a 0a 23 JSTUBLIBNAME)..#
a0f0: 20 49 66 20 65 78 74 65 6e 73 69 6f 6e 20 70 61 If extension pa
a100: 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 rent makefile ha
a110: 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 61 20 s not defined a
a120: 72 65 73 6f 75 72 63 65 20 64 65 66 69 6e 69 74 resource definit
a130: 69 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 65 20 77 ion file,.# we w
a140: 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f 6e 65 ill generate one
a150: 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 64 20 74 from standard t
a160: 65 6d 70 6c 61 74 65 2e 0a 21 69 66 20 21 24 28 emplate..!if !$(
a170: 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 DOING_TCL) && !$
a180: 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26 20 21 24 (DOING_TK) && !$
a190: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 21 (STATIC_BUILD).!
a1a0: 69 66 64 65 66 20 52 43 46 49 4c 45 0a 52 45 53 ifdef RCFILE.RES
a1b0: 46 49 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 FILE = $(TMP_DIR
a1c0: 29 5c 24 28 52 43 46 49 4c 45 3a 2e 72 63 3d 2e )\$(RCFILE:.rc=.
a1d0: 72 65 73 29 0a 21 65 6c 73 65 0a 52 45 53 46 49 res).!else.RESFI
a1e0: 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c LE = $(TMP_DIR)\
a1f0: 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 0a 21 $(PROJECT).res.!
a200: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 endif.!endif..##
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 23 23 23 23 23 23 23 ################
a230: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a240: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a250: 23 0a 23 20 31 31 2e 20 43 6f 6e 73 74 72 75 63 #.# 11. Construc
a260: 74 20 74 68 65 20 70 61 74 68 73 20 66 6f 72 20 t the paths for
a270: 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e the installation
a280: 20 64 69 72 65 63 74 6f 72 69 65 73 0a 23 20 54 directories.# T
a290: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 he following mac
a2a0: 72 6f 73 20 67 65 74 20 64 65 66 69 6e 65 64 20 ros get defined
a2b0: 69 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a in this section:
a2c0: 0a 23 20 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 .# LIB_INSTALL_D
a2d0: 49 52 20 2d 20 77 68 65 72 65 20 6c 69 62 72 61 IR - where libra
a2e0: 72 69 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 ries should be i
a2f0: 6e 73 74 61 6c 6c 65 64 0a 23 20 42 49 4e 5f 49 nstalled.# BIN_I
a300: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
a310: 72 65 20 74 68 65 20 65 78 65 63 75 74 61 62 6c re the executabl
a320: 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 es should be ins
a330: 74 61 6c 6c 65 64 0a 23 20 44 4f 43 5f 49 4e 53 talled.# DOC_INS
a340: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 TALL_DIR - where
a350: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 73 documentation s
a360: 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c hould be install
a370: 65 64 0a 23 20 53 43 52 49 50 54 5f 49 4e 53 54 ed.# SCRIPT_INST
a380: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a390: 73 63 72 69 70 74 73 20 73 68 6f 75 6c 64 20 62 scripts should b
a3a0: 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 49 4e e installed.# IN
a3b0: 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 CLUDE_INSTALL_DI
a3c0: 52 20 2d 20 77 68 65 72 65 20 43 20 69 6e 63 6c R - where C incl
a3d0: 75 64 65 20 66 69 6c 65 73 20 73 68 6f 75 6c 64 ude files should
a3e0: 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 be installed.#
a3f0: 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DEMO_INSTALL_DIR
a400: 20 2d 20 77 68 65 72 65 20 64 65 6d 6f 73 20 73 - where demos s
a410: 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c hould be install
a420: 65 64 0a 23 20 50 52 4a 5f 49 4e 53 54 41 4c 4c ed.# PRJ_INSTALL
a430: 5f 44 49 52 20 2d 20 77 68 65 72 65 20 70 61 63 _DIR - where pac
a440: 6b 61 67 65 20 77 69 6c 6c 20 62 65 20 69 6e 73 kage will be ins
a450: 74 61 6c 6c 65 64 20 28 6e 6f 74 20 73 65 74 20 talled (not set
a460: 66 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 29 0a for Tcl and Tk).
a470: 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c .!if $(DOING_TCL
a480: 29 20 7c 7c 20 24 28 44 4f 49 4e 47 5f 54 4b 29 ) || $(DOING_TK)
a490: 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 .LIB_INSTALL_DIR
a4a0: 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 ..= $(_INSTALLDI
a4b0: 52 29 5c 6c 69 62 0a 42 49 4e 5f 49 4e 53 54 41 R)\lib.BIN_INSTA
a4c0: 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 LL_DIR..= $(_INS
a4d0: 54 41 4c 4c 44 49 52 29 5c 62 69 6e 0a 44 4f 43 TALLDIR)\bin.DOC
a4e0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _INSTALL_DIR..=
a4f0: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 64 $(_INSTALLDIR)\d
a500: 6f 63 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 oc.!if $(DOING_T
a510: 43 4c 29 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 CL).SCRIPT_INSTA
a520: 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 LL_DIR.= $(_INST
a530: 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 ALLDIR)\lib\$(PR
a540: 4f 4a 45 43 54 29 24 28 54 43 4c 5f 4d 41 4a 4f OJECT)$(TCL_MAJO
a550: 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c R_VERSION).$(TCL
a560: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a _MINOR_VERSION).
a570: 4d 4f 44 55 4c 45 5f 49 4e 53 54 41 4c 4c 5f 44 MODULE_INSTALL_D
a580: 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 IR.= $(_INSTALLD
a590: 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c IR)\lib\tcl$(TCL
a5a0: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 0a _MAJOR_VERSION).
a5b0: 21 65 6c 73 65 20 23 20 44 4f 49 4e 47 5f 54 4b !else # DOING_TK
a5c0: 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f .SCRIPT_INSTALL_
a5d0: 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c DIR.= $(_INSTALL
a5e0: 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 4f 4a 45 DIR)\lib\$(PROJE
a5f0: 43 54 29 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 CT)$(TK_MAJOR_VE
a600: 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f RSION).$(TK_MINO
a610: 52 5f 56 45 52 53 49 4f 4e 29 0a 21 65 6e 64 69 R_VERSION).!endi
a620: 66 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 f.DEMO_INSTALL_D
a630: 49 52 09 3d 20 24 28 53 43 52 49 50 54 5f 49 4e IR.= $(SCRIPT_IN
a640: 53 54 41 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 STALL_DIR)\demos
a650: 0a 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c .INCLUDE_INSTALL
a660: 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c _DIR.= $(_INSTAL
a670: 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 0a 0a 21 LDIR)\include..!
a680: 65 6c 73 65 20 23 20 65 78 74 65 6e 73 69 6f 6e else # extension
a690: 20 6f 74 68 65 72 20 74 68 61 6e 20 54 6b 0a 0a other than Tk..
a6a0: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 PRJ_INSTALL_DIR
a6b0: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 = $(_INS
a6c0: 54 41 4c 4c 44 49 52 29 5c 24 28 50 52 4f 4a 45 TALLDIR)\$(PROJE
a6d0: 43 54 29 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 CT)$(DOTVERSION)
a6e0: 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 .!if $(MULTIPLAT
a6f0: 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 0a 4c 49 FORM_INSTALL).LI
a700: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d B_INSTALL_DIR..=
a710: 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 $(PRJ_INSTALL_D
a720: 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 4d 5f 49 IR)\$(PLATFORM_I
a730: 44 45 4e 54 49 46 59 29 0a 42 49 4e 5f 49 4e 53 DENTIFY).BIN_INS
a740: 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 TALL_DIR..= $(PR
a750: 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 24 J_INSTALL_DIR)\$
a760: 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 (PLATFORM_IDENTI
a770: 46 59 29 0a 21 65 6c 73 65 0a 4c 49 42 5f 49 4e FY).!else.LIB_IN
a780: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 STALL_DIR..= $(P
a790: 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a RJ_INSTALL_DIR).
a7a0: 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 BIN_INSTALL_DIR.
a7b0: 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c .= $(PRJ_INSTALL
a7c0: 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 44 4f 43 _DIR).!endif.DOC
a7d0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _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 53 43 52 49 50 54 5f 49 4e 53 54 41 4c R).SCRIPT_INSTAL
a800: 4c 5f 44 49 52 09 3d 20 24 28 50 52 4a 5f 49 4e L_DIR.= $(PRJ_IN
a810: 53 54 41 4c 4c 5f 44 49 52 29 0a 44 45 4d 4f 5f STALL_DIR).DEMO_
a820: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 INSTALL_DIR.= $(
a830: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 PRJ_INSTALL_DIR)
a840: 5c 64 65 6d 6f 73 0a 49 4e 43 4c 55 44 45 5f 49 \demos.INCLUDE_I
a850: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f NSTALL_DIR.= $(_
a860: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 5c 69 INSTALLDIR)\..\i
a870: 6e 63 6c 75 64 65 0a 0a 21 65 6e 64 69 66 0a 0a nclude..!endif..
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 23 23 23 23 23 ################
a8a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a8b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a8c0: 23 23 23 0a 23 20 31 32 2e 20 53 65 74 20 75 70 ###.# 12. Set up
a8d0: 20 61 63 74 75 61 6c 20 6f 70 74 69 6f 6e 73 20 actual options
a8e0: 74 6f 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 to be passed to
a8f0: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 the compiler and
a900: 20 6c 69 6e 6b 65 72 0a 23 20 4e 6f 77 20 77 65 linker.# Now we
a910: 20 68 61 76 65 20 61 6c 6c 20 74 68 65 20 69 6e have all the in
a920: 66 6f 72 6d 61 74 69 6f 6e 20 77 65 20 6e 65 65 formation we nee
a930: 64 2c 20 73 65 74 20 75 70 20 74 68 65 20 61 63 d, set up the ac
a940: 74 75 61 6c 20 66 6c 61 67 73 20 61 6e 64 0a 23 tual flags and.#
a950: 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 77 65 options that we
a960: 20 77 69 6c 6c 20 70 61 73 73 20 74 6f 20 74 68 will pass to th
a970: 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c e compiler and l
a980: 69 6e 6b 65 72 2e 20 54 68 65 20 6d 61 69 6e 0a inker. The main.
a990: 23 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f 75 6c # makefile shoul
a9a0: 64 20 75 73 65 20 74 68 65 73 65 20 69 6e 20 63 d use these in c
a9b0: 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 68 20 ombination with
a9c0: 77 68 61 74 65 76 65 72 20 6f 74 68 65 72 20 66 whatever other f
a9d0: 6c 61 67 73 0a 23 20 61 6e 64 20 73 77 69 74 63 lags.# and switc
a9e0: 68 65 73 20 61 72 65 20 73 70 65 63 69 66 69 63 hes are specific
a9f0: 20 74 6f 20 69 74 2e 0a 23 20 54 68 65 20 66 6f to it..# The fo
aa00: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 llowing macros a
aa10: 72 65 20 64 65 66 69 6e 65 64 2c 20 6e 61 6d 65 re defined, name
aa20: 73 20 61 72 65 20 66 6f 72 20 68 69 73 74 6f 72 s are for histor
aa30: 69 63 61 6c 20 63 6f 6d 70 61 74 69 62 69 6c 69 ical compatibili
aa40: 74 79 3a 0a 23 20 4f 50 54 44 45 46 49 4e 45 53 ty:.# OPTDEFINES
aa50: 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 63 72 6f - /Dxxx C macro
aa60: 20 66 6c 61 67 73 20 62 61 73 65 64 20 6f 6e 20 flags based on
aa70: 75 73 65 72 2d 73 70 65 63 69 66 69 65 64 20 4f user-specified O
aa80: 50 54 53 0a 23 20 43 4f 4d 50 49 4c 45 52 46 4c PTS.# COMPILERFL
aa90: 41 47 53 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 AGS - /Dxxx C ma
aaa0: 63 72 6f 20 66 6c 61 67 73 20 69 6e 64 65 70 65 cro flags indepe
aab0: 6e 64 65 6e 74 20 6f 66 20 61 6e 79 20 63 6f 6e ndent of any con
aac0: 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 74 69 figuration optti
aad0: 6f 6e 73 0a 23 20 63 72 74 20 2d 20 43 6f 6d 70 ons.# crt - Comp
aae0: 69 6c 65 72 20 73 77 69 74 63 68 20 74 68 61 74 iler switch that
aaf0: 20 73 65 6c 65 63 74 73 20 74 68 65 20 61 70 70 selects the app
ab00: 72 6f 70 72 69 61 74 65 20 43 20 72 75 6e 74 69 ropriate C runti
ab10: 6d 65 0a 23 20 63 64 65 62 75 67 20 2d 20 43 6f me.# cdebug - Co
ab20: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 mpiler switches
ab30: 72 65 6c 61 74 65 64 20 74 6f 20 64 65 62 75 67 related to debug
ab40: 20 41 4e 44 20 6f 70 74 69 6d 69 7a 61 74 69 6f AND optimizatio
ab50: 6e 73 0a 23 20 63 77 61 72 6e 20 2d 20 43 6f 6d ns.# cwarn - Com
ab60: 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 74 piler switches t
ab70: 68 61 74 20 73 65 74 20 77 61 72 6e 69 6e 67 20 hat set warning
ab80: 6c 65 76 65 6c 73 0a 23 20 63 66 6c 61 67 73 20 levels.# cflags
ab90: 2d 20 63 6f 6d 70 6c 65 74 65 20 63 6f 6d 70 69 - complete compi
aba0: 6c 65 72 20 73 77 69 74 63 68 65 73 20 28 73 75 ler switches (su
abb0: 62 73 75 6d 65 73 20 63 64 65 62 75 67 20 61 6e bsumes cdebug an
abc0: 64 20 63 77 61 72 6e 29 0a 23 20 6c 64 65 62 75 d cwarn).# ldebu
abd0: 67 20 2d 20 4c 69 6e 6b 65 72 20 73 77 69 74 63 g - Linker switc
abe0: 68 65 73 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 hes controlling
abf0: 64 65 62 75 67 20 69 6e 66 6f 72 6d 61 74 69 6f debug informatio
ac00: 6e 20 61 6e 64 20 6f 70 74 69 6d 69 7a 61 74 69 n and optimizati
ac10: 6f 6e 0a 23 20 6c 66 6c 61 67 73 20 2d 20 63 6f on.# lflags - co
ac20: 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 mplete linker sw
ac30: 69 74 63 68 65 73 20 28 73 75 62 73 75 6d 65 73 itches (subsumes
ac40: 20 6c 64 65 62 75 67 29 20 65 78 63 65 70 74 20 ldebug) except
ac50: 73 75 62 73 79 73 74 65 6d 20 74 79 70 65 0a 23 subsystem type.#
ac60: 20 64 6c 6c 6c 66 6c 61 67 73 20 2d 20 63 6f 6d dlllflags - com
ac70: 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 plete linker swi
ac80: 74 63 68 65 73 20 74 6f 20 62 75 69 6c 64 20 44 tches to build D
ac90: 4c 4c 73 20 28 73 75 62 73 75 6d 65 73 20 6c 66 LLs (subsumes lf
aca0: 6c 61 67 73 29 0a 23 20 63 6f 6e 6c 66 6c 61 67 lags).# conlflag
acb0: 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e s - complete lin
acc0: 6b 65 72 20 73 77 69 74 63 68 65 73 20 66 6f 72 ker switches for
acd0: 20 63 6f 6e 73 6f 6c 65 20 70 72 6f 67 72 61 6d console program
ace0: 20 28 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 (subsumes lflag
acf0: 73 29 0a 23 20 67 75 69 6c 66 6c 61 67 73 20 2d s).# guilflags -
ad00: 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 complete linker
ad10: 20 73 77 69 74 63 68 65 73 20 66 6f 72 20 47 55 switches for GU
ad20: 49 20 70 72 6f 67 72 61 6d 20 28 73 75 62 73 75 I program (subsu
ad30: 6d 65 73 20 6c 66 6c 61 67 73 29 0a 23 20 62 61 mes lflags).# ba
ad40: 73 65 6c 69 62 73 20 2d 20 6d 69 6e 69 6d 75 6d selibs - minimum
ad50: 20 57 69 6e 64 6f 77 73 20 6c 69 62 72 61 72 69 Windows librari
ad60: 65 73 20 72 65 71 75 69 72 65 64 2e 20 50 61 72 es required. Par
ad70: 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 63 61 6e ent makefile can
ad80: 0a 23 20 20 20 20 64 65 66 69 6e 65 20 50 52 4a .# define PRJ
ad90: 5f 4c 49 42 53 20 62 65 66 6f 72 65 20 69 6e 63 _LIBS before inc
ada0: 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 72 63 20 luding rules.rc
adb0: 69 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 6c 69 if additional li
adc0: 62 73 20 61 72 65 20 6e 65 65 64 65 64 0a 0a 4f bs are needed..O
add0: 50 54 44 45 46 49 4e 45 53 09 3d 20 2f 44 53 54 PTDEFINES.= /DST
ade0: 44 43 5f 48 45 41 44 45 52 53 20 2f 44 55 53 45 DC_HEADERS /DUSE
adf0: 5f 4e 4d 41 4b 45 3d 31 0a 21 69 66 20 24 28 56 _NMAKE=1.!if $(V
ae00: 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 36 30 30 CVERSION) > 1600
ae10: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
ae20: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 48 41 OPTDEFINES) /DHA
ae30: 56 45 5f 53 54 44 49 4e 54 5f 48 3d 31 0a 21 65 VE_STDINT_H=1.!e
ae40: 6c 73 65 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d lse.OPTDEFINES.=
ae50: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
ae60: 44 4d 50 5f 4e 4f 5f 53 54 44 49 4e 54 3d 31 0a DMP_NO_STDINT=1.
ae70: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 56 43 56 !endif.!if $(VCV
ae80: 45 52 53 49 4f 4e 29 20 3e 3d 20 31 38 30 30 0a ERSION) >= 1800.
ae90: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
aea0: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 48 41 56 PTDEFINES) /DHAV
aeb0: 45 5f 49 4e 54 54 59 50 45 53 5f 48 3d 31 20 2f E_INTTYPES_H=1 /
aec0: 44 48 41 56 45 5f 53 54 44 42 4f 4f 4c 5f 48 3d DHAVE_STDBOOL_H=
aed0: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 1.!endif..!if $(
aee0: 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 29 0a 4f TCL_MEM_DEBUG).O
aef0: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
af00: 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f TDEFINES) /DTCL_
af10: 4d 45 4d 5f 44 45 42 55 47 0a 21 65 6e 64 69 66 MEM_DEBUG.!endif
af20: 0a 21 69 66 20 24 28 54 43 4c 5f 43 4f 4d 50 49 .!if $(TCL_COMPI
af30: 4c 45 5f 44 45 42 55 47 29 0a 4f 50 54 44 45 46 LE_DEBUG).OPTDEF
af40: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
af50: 4e 45 53 29 20 2f 44 54 43 4c 5f 43 4f 4d 50 49 NES) /DTCL_COMPI
af60: 4c 45 5f 44 45 42 55 47 20 2f 44 54 43 4c 5f 43 LE_DEBUG /DTCL_C
af70: 4f 4d 50 49 4c 45 5f 53 54 41 54 53 0a 21 65 6e OMPILE_STATS.!en
af80: 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 54 48 dif.!if $(TCL_TH
af90: 52 45 41 44 53 29 20 26 26 20 24 28 54 43 4c 5f READS) && $(TCL_
afa0: 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a 4f 50 VERSION) < 87.OP
afb0: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
afc0: 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 54 DEFINES) /DTCL_T
afd0: 48 52 45 41 44 53 3d 31 0a 21 69 66 20 24 28 55 HREADS=1.!if $(U
afe0: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 SE_THREAD_ALLOC)
aff0: 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 49 4f && $(TCL_VERSIO
b000: 4e 29 20 3c 20 38 37 0a 4f 50 54 44 45 46 49 4e N) < 87.OPTDEFIN
b010: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b020: 53 29 20 2f 44 55 53 45 5f 54 48 52 45 41 44 5f S) /DUSE_THREAD_
b030: 41 4c 4c 4f 43 3d 31 0a 21 65 6e 64 69 66 0a 21 ALLOC=1.!endif.!
b040: 65 6e 64 69 66 0a 21 69 66 20 24 28 53 54 41 54 endif.!if $(STAT
b050: 49 43 5f 42 55 49 4c 44 29 0a 4f 50 54 44 45 46 IC_BUILD).OPTDEF
b060: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b070: 4e 45 53 29 20 2f 44 53 54 41 54 49 43 5f 42 55 NES) /DSTATIC_BU
b080: 49 4c 44 0a 21 65 6c 73 65 69 66 20 24 28 54 43 ILD.!elseif $(TC
b090: 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0a L_VERSION) > 86.
b0a0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b0b0: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
b0c0: 5f 57 49 54 48 5f 45 58 54 45 52 4e 41 4c 5f 54 _WITH_EXTERNAL_T
b0d0: 4f 4d 4d 41 54 48 0a 21 69 66 20 22 24 28 4d 41 OMMATH.!if "$(MA
b0e0: 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 CHINE)" == "AMD6
b0f0: 34 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 4" || "$(MACHINE
b100: 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a 4f 50 )" == "ARM64".OP
b110: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
b120: 44 45 46 49 4e 45 53 29 20 2f 44 4d 50 5f 36 34 DEFINES) /DMP_64
b130: 42 49 54 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 BIT.!endif.!endi
b140: 66 0a 21 69 66 20 24 28 54 43 4c 5f 4e 4f 5f 44 f.!if $(TCL_NO_D
b150: 45 50 52 45 43 41 54 45 44 29 0a 4f 50 54 44 45 EPRECATED).OPTDE
b160: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b170: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4e 4f 5f 44 INES) /DTCL_NO_D
b180: 45 50 52 45 43 41 54 45 44 0a 21 65 6e 64 69 66 EPRECATED.!endif
b190: 0a 0a 21 69 66 20 24 28 55 53 45 5f 53 54 55 42 ..!if $(USE_STUB
b1a0: 53 29 0a 23 20 4e 6f 74 65 20 77 65 20 64 6f 20 S).# Note we do
b1b0: 6e 6f 74 20 64 65 66 69 6e 65 20 55 53 45 5f 54 not define USE_T
b1c0: 43 4c 5f 53 54 55 42 53 20 65 76 65 6e 20 77 68 CL_STUBS even wh
b1d0: 65 6e 20 62 75 69 6c 64 69 6e 67 20 74 6b 20 73 en building tk s
b1e0: 69 6e 63 65 20 73 6f 6d 65 0a 23 20 74 65 73 74 ince some.# test
b1f0: 20 74 61 72 67 65 74 73 20 69 6e 20 74 6b 20 64 targets in tk d
b200: 6f 20 6e 6f 74 20 75 73 65 20 73 74 75 62 73 0a o not use stubs.
b210: 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c !if !$(DOING_TCL
b220: 29 0a 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 ).USE_STUBS_DEFS
b230: 20 20 3d 20 2f 44 55 53 45 5f 54 43 4c 5f 53 54 = /DUSE_TCL_ST
b240: 55 42 53 20 2f 44 55 53 45 5f 54 43 4c 4f 4f 5f UBS /DUSE_TCLOO_
b250: 53 54 55 42 53 0a 21 69 66 20 24 28 4e 45 45 44 STUBS.!if $(NEED
b260: 5f 54 4b 29 0a 55 53 45 5f 53 54 55 42 53 5f 44 _TK).USE_STUBS_D
b270: 45 46 53 20 20 3d 20 24 28 55 53 45 5f 53 54 55 EFS = $(USE_STU
b280: 42 53 5f 44 45 46 53 29 20 2f 44 55 53 45 5f 54 BS_DEFS) /DUSE_T
b290: 4b 5f 53 54 55 42 53 0a 21 65 6e 64 69 66 0a 21 K_STUBS.!endif.!
b2a0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 55 endif.!endif # U
b2b0: 53 45 5f 53 54 55 42 53 0a 0a 21 69 66 20 21 24 SE_STUBS..!if !$
b2c0: 28 44 45 42 55 47 29 0a 4f 50 54 44 45 46 49 4e (DEBUG).OPTDEFIN
b2d0: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b2e0: 53 29 20 2f 44 4e 44 45 42 55 47 0a 21 69 66 20 S) /DNDEBUG.!if
b2f0: 24 28 4f 50 54 49 4d 49 5a 49 4e 47 29 0a 4f 50 $(OPTIMIZING).OP
b300: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
b310: 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 DEFINES) /DTCL_C
b320: 46 47 5f 4f 50 54 49 4d 49 5a 45 44 0a 21 65 6e FG_OPTIMIZED.!en
b330: 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 dif.!endif.!if $
b340: 28 50 52 4f 46 49 4c 45 29 0a 4f 50 54 44 45 46 (PROFILE).OPTDEF
b350: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b360: 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 50 NES) /DTCL_CFG_P
b370: 52 4f 46 49 4c 45 44 0a 21 65 6e 64 69 66 0a 21 ROFILED.!endif.!
b380: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
b390: 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 == "AMD64" || "$
b3a0: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 (MACHINE)" == "A
b3b0: 52 4d 36 34 22 0a 4f 50 54 44 45 46 49 4e 45 53 RM64".OPTDEFINES
b3c0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b3d0: 20 2f 44 54 43 4c 5f 43 46 47 5f 44 4f 36 34 42 /DTCL_CFG_DO64B
b3e0: 49 54 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 IT.!endif.!if $(
b3f0: 56 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 33 30 VCVERSION) < 130
b400: 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 0.OPTDEFINES.= $
b410: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4e (OPTDEFINES) /DN
b420: 4f 5f 53 54 52 54 4f 49 36 34 3d 31 0a 21 65 6e O_STRTOI64=1.!en
b430: 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d dif..!if $(TCL_M
b440: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d AJOR_VERSION) ==
b450: 20 38 0a 21 69 66 20 22 24 28 5f 55 53 45 5f 36 8.!if "$(_USE_6
b460: 34 42 49 54 5f 54 49 4d 45 5f 54 29 22 20 3d 3d 4BIT_TIME_T)" ==
b470: 20 22 31 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 "1".OPTDEFINES.
b480: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b490: 2f 44 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d /D_USE_64BIT_TIM
b4a0: 45 5f 54 3d 31 0a 21 65 6e 64 69 66 0a 0a 23 20 E_T=1.!endif..#
b4b0: 5f 41 54 4c 5f 58 50 5f 54 41 52 47 45 54 49 4e _ATL_XP_TARGETIN
b4c0: 47 20 2d 20 4e 65 77 65 72 20 53 44 4b 27 73 20 G - Newer SDK's
b4d0: 6e 65 65 64 20 74 68 69 73 20 74 6f 20 62 75 69 need this to bui
b4e0: 6c 64 20 66 6f 72 20 58 50 0a 43 4f 4d 50 49 4c ld for XP.COMPIL
b4f0: 45 52 46 4c 41 47 53 20 20 3d 20 2f 44 5f 41 54 ERFLAGS = /D_AT
b500: 4c 5f 58 50 5f 54 41 52 47 45 54 49 4e 47 0a 21 L_XP_TARGETING.!
b510: 65 6e 64 69 66 0a 21 69 66 20 22 24 28 54 43 4c endif.!if "$(TCL
b520: 5f 55 54 46 5f 4d 41 58 29 22 20 3d 3d 20 22 33 _UTF_MAX)" == "3
b530: 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ".OPTDEFINES.= $
b540: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b550: 43 4c 5f 55 54 46 5f 4d 41 58 3d 33 0a 21 65 6e CL_UTF_MAX=3.!en
b560: 64 69 66 0a 21 69 66 20 22 24 28 54 43 4c 5f 42 dif.!if "$(TCL_B
b570: 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 UILD_FOR)" == "8
b580: 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ".OPTDEFINES.= $
b590: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b5a0: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
b5b0: 3d 38 0a 21 65 6e 64 69 66 0a 0a 23 20 4c 69 6b =8.!endif..# Lik
b5c0: 65 20 74 68 65 20 54 45 41 20 73 79 73 74 65 6d e the TEA system
b5d0: 20 6f 6e 6c 79 20 73 65 74 20 74 68 69 73 20 6e only set this n
b5e0: 6f 6e 20 65 6d 70 74 79 20 66 6f 72 20 6e 6f 6e on empty for non
b5f0: 2d 54 6b 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 -Tk extensions.#
b600: 20 4e 6f 74 65 3a 20 73 6f 6d 65 20 65 78 74 65 Note: some exte
b610: 6e 73 69 6f 6e 73 20 75 73 65 20 50 41 43 4b 41 nsions use PACKA
b620: 47 45 5f 4e 41 4d 45 20 61 6e 64 20 6f 74 68 65 GE_NAME and othe
b630: 72 73 20 75 73 65 20 50 41 43 4b 41 47 45 5f 54 rs use PACKAGE_T
b640: 43 4c 4e 41 4d 45 0a 23 20 73 6f 20 77 65 20 70 CLNAME.# so we p
b650: 61 73 73 20 62 6f 74 68 0a 21 69 66 20 21 24 28 ass both.!if !$(
b660: 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 DOING_TCL) && !$
b670: 28 44 4f 49 4e 47 5f 54 4b 29 0a 50 4b 47 4e 41 (DOING_TK).PKGNA
b680: 4d 45 46 4c 41 47 53 20 3d 20 2f 44 50 41 43 4b MEFLAGS = /DPACK
b690: 41 47 45 5f 4e 41 4d 45 3d 22 5c 22 24 28 50 52 AGE_NAME="\"$(PR
b6a0: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
b6b0: 45 29 5c 22 22 20 5c 0a 20 20 20 20 20 20 20 20 E)\"" \.
b6c0: 20 20 20 20 20 20 20 2f 44 50 41 43 4b 41 47 45 /DPACKAGE
b6d0: 5f 54 43 4c 4e 41 4d 45 3d 22 5c 22 24 28 50 52 _TCLNAME="\"$(PR
b6e0: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
b6f0: 45 29 5c 22 22 20 5c 0a 20 20 20 20 20 20 20 20 E)\"" \.
b700: 20 20 20 20 20 20 20 2f 44 50 41 43 4b 41 47 45 /DPACKAGE
b710: 5f 56 45 52 53 49 4f 4e 3d 22 5c 22 24 28 44 4f _VERSION="\"$(DO
b720: 54 56 45 52 53 49 4f 4e 29 5c 22 22 20 5c 0a 20 TVERSION)\"" \.
b730: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 44 /D
b740: 4d 4f 44 55 4c 45 5f 53 43 4f 50 45 3d 65 78 74 MODULE_SCOPE=ext
b750: 65 72 6e 0a 21 65 6e 64 69 66 0a 0a 23 20 63 72 ern.!endif..# cr
b760: 74 20 70 69 63 6b 73 20 74 68 65 20 43 20 72 75 t picks the C ru
b770: 6e 20 74 69 6d 65 20 62 61 73 65 64 20 6f 6e 20 n time based on
b780: 73 65 6c 65 63 74 65 64 20 4f 50 54 53 0a 21 69 selected OPTS.!i
b790: 66 20 24 28 4d 53 56 43 52 54 29 0a 21 69 66 20 f $(MSVCRT).!if
b7a0: 24 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 $(DEBUG) && !$(U
b7b0: 4e 43 48 45 43 4b 45 44 29 0a 63 72 74 20 3d 20 NCHECKED).crt =
b7c0: 2d 4d 44 64 0a 21 65 6c 73 65 0a 63 72 74 20 3d -MDd.!else.crt =
b7d0: 20 2d 4d 44 0a 21 65 6e 64 69 66 0a 21 65 6c 73 -MD.!endif.!els
b7e0: 65 0a 21 69 66 20 24 28 44 45 42 55 47 29 20 26 e.!if $(DEBUG) &
b7f0: 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 0a & !$(UNCHECKED).
b800: 63 72 74 20 3d 20 2d 4d 54 64 0a 21 65 6c 73 65 crt = -MTd.!else
b810: 0a 63 72 74 20 3d 20 2d 4d 54 0a 21 65 6e 64 69 .crt = -MT.!endi
b820: 66 0a 21 65 6e 64 69 66 0a 0a 23 20 63 64 65 62 f.!endif..# cdeb
b830: 75 67 20 69 6e 63 6c 75 64 65 73 20 63 6f 6d 70 ug includes comp
b840: 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 66 6f 72 iler options for
b850: 20 64 65 62 75 67 67 69 6e 67 20 61 73 20 77 65 debugging as we
b860: 6c 6c 20 61 73 20 6f 70 74 69 6d 69 7a 61 74 69 ll as optimizati
b870: 6f 6e 2e 0a 21 69 66 20 24 28 44 45 42 55 47 29 on..!if $(DEBUG)
b880: 0a 0a 23 20 49 6e 20 64 65 62 75 67 67 69 6e 67 ..# In debugging
b890: 20 6d 6f 64 65 2c 20 6f 70 74 69 6d 69 7a 61 74 mode, optimizat
b8a0: 69 6f 6e 73 20 6e 65 65 64 20 74 6f 20 62 65 20 ions need to be
b8b0: 64 69 73 61 62 6c 65 64 0a 63 64 65 62 75 67 20 disabled.cdebug
b8c0: 3d 20 2d 5a 69 20 2d 4f 64 20 24 28 44 45 42 55 = -Zi -Od $(DEBU
b8d0: 47 46 4c 41 47 53 29 0a 0a 21 65 6c 73 65 0a 0a GFLAGS)..!else..
b8e0: 63 64 65 62 75 67 20 3d 20 24 28 4f 50 54 49 4d cdebug = $(OPTIM
b8f0: 49 5a 41 54 49 4f 4e 53 29 0a 21 69 66 20 24 28 IZATIONS).!if $(
b900: 53 59 4d 42 4f 4c 53 29 0a 63 64 65 62 75 67 20 SYMBOLS).cdebug
b910: 3d 20 24 28 63 64 65 62 75 67 29 20 2d 5a 69 0a = $(cdebug) -Zi.
b920: 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 !endif..!endif #
b930: 20 24 28 44 45 42 55 47 29 0a 0a 23 20 63 77 61 $(DEBUG)..# cwa
b940: 72 6e 20 69 6e 63 6c 75 64 65 73 20 64 65 66 61 rn includes defa
b950: 75 6c 74 20 77 61 72 6e 69 6e 67 20 6c 65 76 65 ult warning leve
b960: 6c 73 2c 20 61 6c 73 6f 20 43 34 30 39 30 20 28 ls, also C4090 (
b970: 62 75 67 67 79 29 20 61 6e 64 20 43 34 31 34 36 buggy) and C4146
b980: 20 69 73 20 75 73 65 6c 65 73 73 2e 0a 63 77 61 is useless..cwa
b990: 72 6e 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 rn = $(WARNINGS)
b9a0: 20 2d 77 64 34 30 39 30 20 2d 77 64 34 31 34 36 -wd4090 -wd4146
b9b0: 0a 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 ..!if "$(MACHINE
b9c0: 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c )" == "AMD64" ||
b9d0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
b9e0: 20 22 41 52 4d 36 34 22 0a 23 20 44 69 73 61 62 "ARM64".# Disab
b9f0: 6c 65 20 70 6f 69 6e 74 65 72 3c 2d 3e 69 6e 74 le pointer<->int
ba00: 20 77 61 72 6e 69 6e 67 73 20 72 65 6c 61 74 65 warnings relate
ba10: 64 20 74 6f 20 63 61 73 74 20 62 65 74 77 65 65 d to cast betwee
ba20: 6e 20 64 69 66 66 65 72 65 6e 74 20 73 69 7a 65 n different size
ba30: 73 0a 23 20 54 68 65 72 65 20 61 72 65 20 61 20 s.# There are a
ba40: 67 61 64 7a 69 6c 6c 69 6f 6e 20 6f 66 20 74 68 gadzillion of th
ba50: 65 73 65 20 64 75 65 20 74 6f 20 75 73 65 20 6f ese due to use o
ba60: 66 20 43 6c 69 65 6e 74 44 61 74 61 20 61 6e 64 f ClientData and
ba70: 0a 23 20 63 6c 75 74 74 65 72 20 75 70 20 63 6f .# clutter up co
ba80: 6d 70 69 6c 65 72 0a 23 20 6f 75 74 70 75 74 20 mpiler.# output
ba90: 69 6e 63 72 65 61 73 69 6e 67 20 63 68 61 6e 63 increasing chanc
baa0: 65 20 6f 66 20 61 20 72 65 61 6c 20 77 61 72 6e e of a real warn
bab0: 69 6e 67 20 67 65 74 74 69 6e 67 20 6c 6f 73 74 ing getting lost
bac0: 2e 20 53 6f 20 64 69 73 61 62 6c 65 20 74 68 65 . So disable the
bad0: 6d 2e 0a 23 20 45 76 65 6e 74 75 61 6c 6c 79 20 m..# Eventually
bae0: 73 6f 6d 65 20 64 61 79 2c 20 54 63 6c 20 77 69 some day, Tcl wi
baf0: 6c 6c 20 62 65 20 36 34 2d 62 69 74 20 63 6c 65 ll be 64-bit cle
bb00: 61 6e 2e 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 an..cwarn = $(cw
bb10: 61 72 6e 29 20 2d 77 64 34 33 31 31 20 2d 77 64 arn) -wd4311 -wd
bb20: 34 33 31 32 0a 21 65 6e 64 69 66 0a 0a 23 23 23 4312.!endif..###
bb30: 20 43 6f 6d 6d 6f 6e 20 63 6f 6d 70 69 6c 65 72 Common compiler
bb40: 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 61 72 options that ar
bb50: 65 20 61 72 63 68 69 74 65 63 74 75 72 65 20 73 e architecture s
bb60: 70 65 63 69 66 69 63 0a 21 69 66 20 22 24 28 4d pecific.!if "$(M
bb70: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d ACHINE)" == "ARM
bb80: 22 0a 63 61 72 63 68 20 3d 20 2f 44 5f 41 52 4d ".carch = /D_ARM
bb90: 5f 57 49 4e 41 50 49 5f 50 41 52 54 49 54 49 4f _WINAPI_PARTITIO
bba0: 4e 5f 44 45 53 4b 54 4f 50 5f 53 44 4b 5f 41 56 N_DESKTOP_SDK_AV
bbb0: 41 49 4c 41 42 4c 45 0a 21 65 6c 73 65 0a 63 61 AILABLE.!else.ca
bbc0: 72 63 68 20 3d 0a 21 65 6e 64 69 66 0a 0a 23 20 rch =.!endif..#
bbd0: 63 70 75 69 64 20 69 73 20 6f 6e 6c 79 20 61 76 cpuid is only av
bbe0: 61 69 6c 61 62 6c 65 20 6f 6e 20 69 6e 74 65 6c ailable on intel
bbf0: 20 6d 61 63 68 69 6e 65 73 0a 21 69 66 20 22 24 machines.!if "$
bc00: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 (MACHINE)" == "I
bc10: 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 X86" || "$(MACHI
bc20: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a NE)" == "AMD64".
bc30: 63 61 72 63 68 20 3d 20 24 28 63 61 72 63 68 29 carch = $(carch)
bc40: 20 2f 44 48 41 56 45 5f 43 50 55 49 44 3d 31 0a /DHAVE_CPUID=1.
bc50: 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 44 45 !endif..!if $(DE
bc60: 42 55 47 29 0a 23 20 54 75 72 6e 20 77 61 72 6e BUG).# Turn warn
bc70: 69 6e 67 73 20 69 6e 74 6f 20 65 72 72 6f 72 73 ings into errors
bc80: 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 61 72 6e .cwarn = $(cwarn
bc90: 29 20 2d 57 58 0a 21 65 6e 64 69 66 0a 0a 49 4e ) -WX.!endif..IN
bca0: 43 4c 55 44 45 53 20 3d 20 24 28 54 43 4c 5f 49 CLUDES = $(TCL_I
bcb0: 4e 43 4c 55 44 45 53 29 20 24 28 54 4b 5f 49 4e NCLUDES) $(TK_IN
bcc0: 43 4c 55 44 45 53 29 20 24 28 50 52 4a 5f 49 4e CLUDES) $(PRJ_IN
bcd0: 43 4c 55 44 45 53 29 0a 21 69 66 20 21 24 28 44 CLUDES).!if !$(D
bce0: 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 28 OING_TCL) && !$(
bcf0: 44 4f 49 4e 47 5f 54 4b 29 0a 49 4e 43 4c 55 44 DOING_TK).INCLUD
bd00: 45 53 20 3d 20 24 28 49 4e 43 4c 55 44 45 53 29 ES = $(INCLUDES)
bd10: 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 -I"$(GENERICDIR
bd20: 29 22 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 )" -I"$(WIN_DIR)
bd30: 22 20 2d 49 22 24 28 43 4f 4d 50 41 54 44 49 52 " -I"$(COMPATDIR
bd40: 29 22 0a 21 65 6e 64 69 66 0a 0a 23 20 54 68 65 )".!endif..# The
bd50: 73 65 20 66 6c 61 67 73 20 61 72 65 20 64 65 66 se flags are def
bd60: 69 6e 65 64 20 72 6f 75 67 68 6c 79 20 69 6e 20 ined roughly in
bd70: 74 68 65 20 6f 72 64 65 72 20 6f 66 20 74 68 65 the order of the
bd80: 20 70 72 65 2d 72 65 66 6f 72 6d 0a 23 20 72 75 pre-reform.# ru
bd90: 6c 65 73 2e 76 63 2f 6d 61 6b 65 66 69 6c 65 2e les.vc/makefile.
bda0: 76 63 20 74 6f 20 68 65 6c 70 20 76 69 73 75 61 vc to help visua
bdb0: 6c 6c 79 20 63 6f 6d 70 61 72 65 20 74 68 61 74 lly compare that
bdc0: 20 74 68 65 20 70 72 65 2d 20 61 6e 64 0a 23 20 the pre- and.#
bdd0: 70 6f 73 74 2d 72 65 66 6f 72 6d 20 62 75 69 6c post-reform buil
bde0: 64 20 6c 6f 67 73 0a 0a 23 20 63 66 6c 61 67 73 d logs..# cflags
bdf0: 20 63 6f 6e 74 61 69 6e 73 20 67 65 6e 65 72 69 contains generi
be00: 63 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 c flags used for
be10: 20 62 75 69 6c 64 69 6e 67 20 70 72 61 63 74 69 building practi
be20: 63 61 6c 6c 79 20 61 6c 6c 20 6f 62 6a 65 63 74 cally all object
be30: 20 66 69 6c 65 73 0a 63 66 6c 61 67 73 20 3d 20 files.cflags =
be40: 2d 6e 6f 6c 6f 67 6f 20 2d 63 20 24 28 43 4f 4d -nologo -c $(COM
be50: 50 49 4c 45 52 46 4c 41 47 53 29 20 24 28 63 61 PILERFLAGS) $(ca
be60: 72 63 68 29 20 24 28 63 77 61 72 6e 29 20 2d 46 rch) $(cwarn) -F
be70: 70 24 28 54 4d 50 5f 44 49 52 29 5e 5c 20 24 28 p$(TMP_DIR)^\ $(
be80: 63 64 65 62 75 67 29 0a 0a 23 20 61 70 70 63 66 cdebug)..# appcf
be90: 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 lags contains $(
bea0: 63 66 6c 61 67 73 29 20 61 6e 64 20 66 6c 61 67 cflags) and flag
beb0: 73 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 74 s for building t
bec0: 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 0a 23 he application.#
bed0: 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 28 65 object files (e
bee0: 2e 67 2e 20 74 63 6c 73 68 2c 20 6f 72 20 77 69 .g. tclsh, or wi
bef0: 73 68 29 20 70 6b 67 63 66 6c 61 67 73 20 63 6f sh) pkgcflags co
bf00: 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 29 ntains $(cflags)
bf10: 20 70 6c 75 73 0a 23 20 66 6c 61 67 73 20 75 73 plus.# flags us
bf20: 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 ed for building
bf30: 73 68 61 72 65 64 20 6f 62 6a 65 63 74 20 66 69 shared object fi
bf40: 6c 65 73 20 54 68 65 20 74 77 6f 20 64 69 66 66 les The two diff
bf50: 65 72 20 69 6e 20 74 68 65 0a 23 20 42 55 49 4c er in the.# BUIL
bf60: 44 5f 24 28 50 52 4f 4a 45 43 54 29 20 6d 61 63 D_$(PROJECT) mac
bf70: 72 6f 20 77 68 69 63 68 20 73 68 6f 75 6c 64 20 ro which should
bf80: 62 65 20 64 65 66 69 6e 65 64 20 6f 6e 6c 79 20 be defined only
bf90: 66 6f 72 20 74 68 65 20 73 68 61 72 65 64 0a 23 for the shared.#
bfa0: 20 6c 69 62 72 61 72 79 20 2a 69 6d 70 6c 65 6d library *implem
bfb0: 65 6e 74 61 74 69 6f 6e 2a 20 61 6e 64 20 6e 6f entation* and no
bfc0: 74 20 66 6f 72 20 69 74 73 20 63 61 6c 6c 65 72 t for its caller
bfd0: 20 69 6e 74 65 72 66 61 63 65 0a 0a 61 70 70 63 interface..appc
bfe0: 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 flags_nostubs =
bff0: 24 28 63 66 6c 61 67 73 29 20 24 28 63 72 74 29 $(cflags) $(crt)
c000: 20 24 28 49 4e 43 4c 55 44 45 53 29 20 24 28 54 $(INCLUDES) $(T
c010: 43 4c 5f 44 45 46 49 4e 45 53 29 20 24 28 50 52 CL_DEFINES) $(PR
c020: 4a 5f 44 45 46 49 4e 45 53 29 20 24 28 4f 50 54 J_DEFINES) $(OPT
c030: 44 45 46 49 4e 45 53 29 0a 61 70 70 63 66 6c 61 DEFINES).appcfla
c040: 67 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 73 gs = $(appcflags
c050: 5f 6e 6f 73 74 75 62 73 29 20 24 28 55 53 45 5f _nostubs) $(USE_
c060: 53 54 55 42 53 5f 44 45 46 53 29 0a 70 6b 67 63 STUBS_DEFS).pkgc
c070: 66 6c 61 67 73 20 3d 20 24 28 61 70 70 63 66 6c flags = $(appcfl
c080: 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c ags) $(PKGNAMEFL
c090: 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 AGS) /DBUILD_$(P
c0a0: 52 4f 4a 45 43 54 29 0a 70 6b 67 63 66 6c 61 67 ROJECT).pkgcflag
c0b0: 73 5f 6e 6f 73 74 75 62 73 20 3d 20 24 28 61 70 s_nostubs = $(ap
c0c0: 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 29 pcflags_nostubs)
c0d0: 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29 $(PKGNAMEFLAGS)
c0e0: 20 2f 44 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45 /DBUILD_$(PROJE
c0f0: 43 54 29 0a 0a 23 20 73 74 75 62 73 63 66 6c 61 CT)..# stubscfla
c100: 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 gs contains $(cf
c110: 6c 61 67 73 29 20 70 6c 75 73 20 66 6c 61 67 73 lags) plus flags
c120: 20 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69 used for buildi
c130: 6e 67 20 61 20 73 74 75 62 73 0a 23 20 6c 69 62 ng a stubs.# lib
c140: 72 61 72 79 20 66 6f 72 20 74 68 65 20 70 61 63 rary for the pac
c150: 6b 61 67 65 2e 20 20 4e 6f 74 65 3a 20 2f 44 53 kage. Note: /DS
c160: 54 41 54 49 43 5f 42 55 49 4c 44 20 69 73 20 64 TATIC_BUILD is d
c170: 65 66 69 6e 65 64 20 69 6e 0a 23 20 24 28 4f 50 efined in.# $(OP
c180: 54 44 45 46 49 4e 45 53 29 20 6f 6e 6c 79 20 69 TDEFINES) only i
c190: 66 20 74 68 65 20 4f 50 54 53 20 63 6f 6e 66 69 f the OPTS confi
c1a0: 67 75 72 61 74 69 6f 6e 20 69 6e 64 69 63 61 74 guration indicat
c1b0: 65 73 20 61 20 73 74 61 74 69 63 0a 23 20 6c 69 es a static.# li
c1c0: 62 72 61 72 79 2e 20 48 6f 77 65 76 65 72 20 74 brary. However t
c1d0: 68 65 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 he stubs library
c1e0: 20 69 73 20 41 4c 57 41 59 53 20 73 74 61 74 69 is ALWAYS stati
c1f0: 63 20 68 65 6e 63 65 20 69 6e 63 6c 75 64 65 64 c hence included
c200: 0a 23 20 68 65 72 65 20 69 72 72 65 73 70 65 63 .# here irrespec
c210: 74 69 76 65 20 6f 66 20 74 68 65 20 4f 50 54 53 tive of the OPTS
c220: 20 73 65 74 74 69 6e 67 2e 0a 23 0a 23 20 54 42 setting..#.# TB
c230: 44 20 2d 20 74 63 6c 76 66 73 20 68 61 73 20 61 D - tclvfs has a
c240: 20 63 6f 6d 6d 65 6e 74 20 74 68 61 74 20 73 74 comment that st
c250: 75 62 73 20 6c 69 62 73 20 73 68 6f 75 6c 64 20 ubs libs should
c260: 6e 6f 74 20 62 65 20 63 6f 6d 70 69 6c 65 64 20 not be compiled
c270: 77 69 74 68 20 2d 47 4c 0a 23 20 77 69 74 68 6f with -GL.# witho
c280: 75 74 20 73 74 61 74 69 6e 67 20 77 68 79 2e 20 ut stating why.
c290: 54 63 6c 20 69 74 73 65 6c 66 20 63 6f 6d 70 69 Tcl itself compi
c2a0: 6c 65 64 20 73 74 75 62 73 20 6c 69 62 73 20 77 led stubs libs w
c2b0: 69 74 68 20 74 68 69 73 20 66 6c 61 67 2e 0a 23 ith this flag..#
c2c0: 20 73 6f 20 77 65 20 64 6f 20 6e 6f 74 20 72 65 so we do not re
c2d0: 6d 6f 76 65 20 69 74 20 66 72 6f 6d 20 63 66 6c move it from cfl
c2e0: 61 67 73 2e 20 2d 47 4c 20 6d 61 79 20 70 72 65 ags. -GL may pre
c2f0: 76 65 6e 74 20 65 78 74 65 6e 73 69 6f 6e 73 0a vent extensions.
c300: 23 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 # compiled with
c310: 6f 6e 65 20 56 43 20 76 65 72 73 69 6f 6e 20 74 one VC version t
c320: 6f 20 66 61 69 6c 20 74 6f 20 6c 69 6e 6b 20 61 o fail to link a
c330: 67 61 69 6e 73 74 20 73 74 75 62 73 20 6c 69 62 gainst stubs lib
c340: 72 61 72 79 0a 23 20 63 6f 6d 70 69 6c 65 64 20 rary.# compiled
c350: 77 69 74 68 20 61 6e 6f 74 68 65 72 20 56 43 20 with another VC
c360: 76 65 72 73 69 6f 6e 2e 20 43 68 65 63 6b 20 66 version. Check f
c370: 6f 72 20 74 68 69 73 20 61 6e 64 20 66 69 78 20 or this and fix
c380: 61 63 63 6f 72 64 69 6e 67 6c 79 2e 0a 73 74 75 accordingly..stu
c390: 62 73 63 66 6c 61 67 73 20 3d 20 24 28 63 66 6c bscflags = $(cfl
c3a0: 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c ags) $(PKGNAMEFL
c3b0: 41 47 53 29 20 24 28 50 52 4a 5f 44 45 46 49 4e AGS) $(PRJ_DEFIN
c3c0: 45 53 29 20 24 28 4f 50 54 44 45 46 49 4e 45 53 ES) $(OPTDEFINES
c3d0: 29 20 2f 5a 6c 20 2f 47 4c 2d 20 2f 44 53 54 41 ) /Zl /GL- /DSTA
c3e0: 54 49 43 5f 42 55 49 4c 44 20 24 28 49 4e 43 4c TIC_BUILD $(INCL
c3f0: 55 44 45 53 29 20 24 28 55 53 45 5f 53 54 55 42 UDES) $(USE_STUB
c400: 53 5f 44 45 46 53 29 0a 0a 23 20 4c 69 6e 6b 20 S_DEFS)..# Link
c410: 66 6c 61 67 73 0a 0a 21 69 66 20 24 28 44 45 42 flags..!if $(DEB
c420: 55 47 29 0a 6c 64 65 62 75 67 09 3d 20 2d 64 65 UG).ldebug.= -de
c430: 62 75 67 20 2d 64 65 62 75 67 74 79 70 65 3a 63 bug -debugtype:c
c440: 76 0a 21 65 6c 73 65 0a 6c 64 65 62 75 67 09 3d v.!else.ldebug.=
c450: 20 2d 72 65 6c 65 61 73 65 20 2d 6f 70 74 3a 72 -release -opt:r
c460: 65 66 20 2d 6f 70 74 3a 69 63 66 2c 33 0a 21 69 ef -opt:icf,3.!i
c470: 66 20 24 28 53 59 4d 42 4f 4c 53 29 0a 6c 64 65 f $(SYMBOLS).lde
c480: 62 75 67 09 3d 20 24 28 6c 64 65 62 75 67 29 20 bug.= $(ldebug)
c490: 2d 64 65 62 75 67 20 2d 64 65 62 75 67 74 79 70 -debug -debugtyp
c4a0: 65 3a 63 76 0a 21 65 6e 64 69 66 0a 21 65 6e 64 e:cv.!endif.!end
c4b0: 69 66 0a 0a 23 20 4e 6f 74 65 3a 20 50 72 6f 66 if..# Note: Prof
c4c0: 69 6c 69 6e 67 20 69 73 20 63 75 72 72 65 6e 74 iling is current
c4d0: 6c 79 20 6f 6e 6c 79 20 70 6f 73 73 69 62 6c 65 ly only possible
c4e0: 20 77 69 74 68 20 74 68 65 20 56 69 73 75 61 6c with the Visual
c4f0: 20 53 74 75 64 69 6f 20 45 6e 74 65 72 70 72 69 Studio Enterpri
c500: 73 65 0a 21 69 66 20 24 28 50 52 4f 46 49 4c 45 se.!if $(PROFILE
c510: 29 0a 6c 64 65 62 75 67 3d 20 24 28 6c 64 65 62 ).ldebug= $(ldeb
c520: 75 67 29 20 2d 70 72 6f 66 69 6c 65 0a 21 65 6e ug) -profile.!en
c530: 64 69 66 0a 0a 23 23 23 20 44 65 63 6c 61 72 61 dif..### Declara
c540: 74 69 6f 6e 73 20 63 6f 6d 6d 6f 6e 20 74 6f 20 tions common to
c550: 61 6c 6c 20 6c 69 6e 6b 65 72 20 76 65 72 73 69 all linker versi
c560: 6f 6e 73 0a 6c 66 6c 61 67 73 09 3d 20 2d 6e 6f ons.lflags.= -no
c570: 6c 6f 67 6f 20 2d 6d 61 63 68 69 6e 65 3a 24 28 logo -machine:$(
c580: 4d 41 43 48 49 4e 45 29 20 24 28 4c 49 4e 4b 45 MACHINE) $(LINKE
c590: 52 46 4c 41 47 53 29 20 24 28 6c 64 65 62 75 67 RFLAGS) $(ldebug
c5a0: 29 0a 0a 21 69 66 20 24 28 4d 53 56 43 52 54 29 )..!if $(MSVCRT)
c5b0: 20 26 26 20 21 28 24 28 44 45 42 55 47 29 20 26 && !($(DEBUG) &
c5c0: 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 29 & !$(UNCHECKED))
c5d0: 20 26 26 20 24 28 56 43 56 45 52 53 49 4f 4e 29 && $(VCVERSION)
c5e0: 20 3e 3d 20 31 39 30 30 0a 6c 66 6c 61 67 73 09 >= 1900.lflags.
c5f0: 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 6e 6f 64 = $(lflags) -nod
c600: 65 66 61 75 6c 74 6c 69 62 3a 6c 69 62 75 63 72 efaultlib:libucr
c610: 74 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 64 6c t.lib.!endif..dl
c620: 6c 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 llflags = $(lfla
c630: 67 73 29 20 2d 64 6c 6c 0a 63 6f 6e 6c 66 6c 61 gs) -dll.conlfla
c640: 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d gs = $(lflags) -
c650: 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f 6c subsystem:consol
c660: 65 0a 67 75 69 6c 66 6c 61 67 73 20 3d 20 24 28 e.guilflags = $(
c670: 6c 66 6c 61 67 73 29 20 2d 73 75 62 73 79 73 74 lflags) -subsyst
c680: 65 6d 3a 77 69 6e 64 6f 77 73 0a 0a 23 20 4c 69 em:windows..# Li
c690: 62 72 61 72 69 65 73 20 74 68 61 74 20 61 72 65 braries that are
c6a0: 20 72 65 71 75 69 72 65 64 20 66 6f 72 20 65 76 required for ev
c6b0: 65 72 79 20 69 6d 61 67 65 2e 0a 23 20 45 78 74 ery image..# Ext
c6c0: 65 6e 73 69 6f 6e 73 20 73 68 6f 75 6c 64 20 64 ensions should d
c6d0: 65 66 69 6e 65 20 61 6e 79 20 61 64 64 69 74 69 efine any additi
c6e0: 6f 6e 61 6c 20 6c 69 62 72 61 72 69 65 73 20 77 onal libraries w
c6f0: 69 74 68 20 24 28 50 52 4a 5f 4c 49 42 53 29 0a ith $(PRJ_LIBS).
c700: 77 69 6e 6c 69 62 73 20 20 20 3d 20 6b 65 72 6e winlibs = kern
c710: 65 6c 33 32 2e 6c 69 62 20 61 64 76 61 70 69 33 el32.lib advapi3
c720: 32 2e 6c 69 62 0a 0a 21 69 66 20 24 28 4e 45 45 2.lib..!if $(NEE
c730: 44 5f 54 4b 29 0a 77 69 6e 6c 69 62 73 20 3d 20 D_TK).winlibs =
c740: 24 28 77 69 6e 6c 69 62 73 29 20 67 64 69 33 32 $(winlibs) gdi32
c750: 2e 6c 69 62 20 75 73 65 72 33 32 2e 6c 69 62 20 .lib user32.lib
c760: 75 78 74 68 65 6d 65 2e 6c 69 62 0a 21 65 6e 64 uxtheme.lib.!end
c770: 69 66 0a 0a 23 20 41 76 6f 69 64 20 27 75 6e 72 if..# Avoid 'unr
c780: 65 73 6f 6c 76 65 64 20 65 78 74 65 72 6e 61 6c esolved external
c790: 20 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 75 72 69 symbol __securi
c7a0: 74 79 5f 63 6f 6f 6b 69 65 27 20 65 72 72 6f 72 ty_cookie' error
c7b0: 73 2e 0a 23 20 63 2e 66 2e 20 68 74 74 70 3a 2f s..# c.f. http:/
c7c0: 2f 73 75 70 70 6f 72 74 2e 6d 69 63 72 6f 73 6f /support.microso
c7d0: 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 39 34 35 37 ft.com/?id=89457
c7e0: 33 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 3.!if "$(MACHINE
c7f0: 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a 21 69 )" == "AMD64".!i
c800: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
c810: 20 31 33 39 39 20 26 26 20 24 28 56 43 56 45 52 1399 && $(VCVER
c820: 53 49 4f 4e 29 20 3c 20 31 35 30 30 0a 77 69 6e SION) < 1500.win
c830: 6c 69 62 73 20 20 20 3d 20 24 28 77 69 6e 6c 69 libs = $(winli
c840: 62 73 29 20 62 75 66 66 65 72 6f 76 65 72 66 6c bs) bufferoverfl
c850: 6f 77 55 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 21 owU.lib.!endif.!
c860: 65 6e 64 69 66 0a 0a 62 61 73 65 6c 69 62 73 20 endif..baselibs
c870: 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 24 28 50 = $(winlibs) $(P
c880: 52 4a 5f 4c 49 42 53 29 0a 0a 21 69 66 20 24 28 RJ_LIBS)..!if $(
c890: 4d 53 56 43 52 54 29 20 26 26 20 21 28 24 28 44 MSVCRT) && !($(D
c8a0: 45 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 EBUG) && !$(UNCH
c8b0: 45 43 4b 45 44 29 29 20 26 26 20 24 28 56 43 56 ECKED)) && $(VCV
c8c0: 45 52 53 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0a ERSION) >= 1900.
c8d0: 62 61 73 65 6c 69 62 73 20 20 20 3d 20 24 28 62 baselibs = $(b
c8e0: 61 73 65 6c 69 62 73 29 20 75 63 72 74 2e 6c 69 aselibs) ucrt.li
c8f0: 62 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 b.!endif..######
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 23 23 23 23 23 23 23 23 23 ################
c930: 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 33 2e ##########.# 13.
c940: 20 44 65 66 69 6e 65 20 73 74 61 6e 64 61 72 64 Define standard
c950: 20 63 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d 6d 6f commands, commo
c960: 6e 20 6d 61 6b 65 20 74 61 72 67 65 74 73 20 61 n make targets a
c970: 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 nd implicit rule
c980: 73 0a 0a 43 43 50 4b 47 43 4d 44 20 3d 20 24 28 s..CCPKGCMD = $(
c990: 63 63 33 32 29 20 24 28 70 6b 67 63 66 6c 61 67 cc32) $(pkgcflag
c9a0: 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 s) -Fo$(TMP_DIR)
c9b0: 5e 5c 0a 43 43 41 50 50 43 4d 44 20 3d 20 24 28 ^\.CCAPPCMD = $(
c9c0: 63 63 33 32 29 20 24 28 61 70 70 63 66 6c 61 67 cc32) $(appcflag
c9d0: 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 s) -Fo$(TMP_DIR)
c9e0: 5e 5c 0a 43 43 53 54 55 42 53 43 4d 44 20 3d 20 ^\.CCSTUBSCMD =
c9f0: 24 28 63 63 33 32 29 20 24 28 73 74 75 62 73 63 $(cc32) $(stubsc
ca00: 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f flags) -Fo$(TMP_
ca10: 44 49 52 29 5e 5c 0a 0a 4c 49 42 43 4d 44 20 3d DIR)^\..LIBCMD =
ca20: 20 24 28 6c 69 62 33 32 29 20 2d 6e 6f 6c 6f 67 $(lib32) -nolog
ca30: 6f 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 o $(LINKERFLAGS)
ca40: 20 2d 6f 75 74 3a 24 40 0a 44 4c 4c 43 4d 44 20 -out:$@.DLLCMD
ca50: 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 64 6c = $(link32) $(dl
ca60: 6c 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 llflags) -out:$@
ca70: 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 28 74 $(baselibs) $(t
ca80: 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 73 cllibs) $(tklibs
ca90: 29 0a 0a 43 4f 4e 45 58 45 43 4d 44 20 3d 20 24 )..CONEXECMD = $
caa0: 28 6c 69 6e 6b 33 32 29 20 24 28 63 6f 6e 6c 66 (link32) $(conlf
cab0: 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 lags) -out:$@ $(
cac0: 62 61 73 65 6c 69 62 73 29 20 24 28 74 63 6c 6c baselibs) $(tcll
cad0: 69 62 73 29 20 24 28 74 6b 6c 69 62 73 29 0a 47 ibs) $(tklibs).G
cae0: 55 49 45 58 45 43 4d 44 20 3d 20 24 28 6c 69 6e UIEXECMD = $(lin
caf0: 6b 33 32 29 20 24 28 67 75 69 6c 66 6c 61 67 73 k32) $(guilflags
cb00: 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 65 ) -out:$@ $(base
cb10: 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 73 29 libs) $(tcllibs)
cb20: 20 24 28 74 6b 6c 69 62 73 29 0a 52 45 53 43 4d $(tklibs).RESCM
cb30: 44 20 20 3d 20 24 28 72 63 33 32 29 20 2d 66 6f D = $(rc32) -fo
cb40: 20 24 40 20 2d 72 20 2d 69 20 22 24 28 47 45 4e $@ -r -i "$(GEN
cb50: 45 52 49 43 44 49 52 29 22 20 2d 69 20 22 24 28 ERICDIR)" -i "$(
cb60: 54 4d 50 5f 44 49 52 29 22 20 5c 0a 09 20 20 20 TMP_DIR)" \..
cb70: 20 24 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 $(TCL_INCLUDES)
cb80: 20 5c 0a 09 20 20 20 20 2f 44 44 45 42 55 47 3d \.. /DDEBUG=
cb90: 24 28 44 45 42 55 47 29 20 2d 64 20 55 4e 43 48 $(DEBUG) -d UNCH
cba0: 45 43 4b 45 44 3d 24 28 55 4e 43 48 45 43 4b 45 ECKED=$(UNCHECKE
cbb0: 44 29 20 5c 0a 09 20 20 20 20 2f 44 43 4f 4d 4d D) \.. /DCOMM
cbc0: 41 56 45 52 53 49 4f 4e 3d 24 28 52 43 43 4f 4d AVERSION=$(RCCOM
cbd0: 4d 41 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 MAVERSION) \..
cbe0: 20 20 2f 44 44 4f 54 56 45 52 53 49 4f 4e 3d 5c /DDOTVERSION=\
cbf0: 22 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 "$(DOTVERSION)\"
cc00: 20 5c 0a 09 20 20 20 20 2f 44 56 45 52 53 49 4f \.. /DVERSIO
cc10: 4e 3d 5c 22 24 28 56 45 52 53 49 4f 4e 29 5c 22 N=\"$(VERSION)\"
cc20: 20 5c 0a 09 20 20 20 20 2f 44 53 55 46 58 3d 5c \.. /DSUFX=\
cc30: 22 24 28 53 55 46 58 29 5c 22 20 5c 0a 09 20 20 "$(SUFX)\" \..
cc40: 20 20 2f 44 50 52 4f 4a 45 43 54 3d 5c 22 24 28 /DPROJECT=\"$(
cc50: 50 52 4f 4a 45 43 54 29 5c 22 20 5c 0a 09 20 20 PROJECT)\" \..
cc60: 20 20 2f 44 50 52 4a 4c 49 42 4e 41 4d 45 3d 5c /DPRJLIBNAME=\
cc70: 22 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 5c 22 "$(PRJLIBNAME)\"
cc80: 0a 0a 21 69 66 6e 64 65 66 20 44 45 46 41 55 4c ..!ifndef DEFAUL
cc90: 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 0a 44 T_BUILD_TARGET.D
cca0: 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 EFAULT_BUILD_TAR
ccb0: 47 45 54 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 GET = $(PROJECT)
ccc0: 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 .!endif..default
ccd0: 2d 74 61 72 67 65 74 3a 20 24 28 44 45 46 41 55 -target: $(DEFAU
cce0: 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 29 LT_BUILD_TARGET)
ccf0: 0a 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 4c 41 ..!if $(MULTIPLA
cd00: 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 0a 64 TFORM_INSTALL).d
cd10: 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a efault-pkgindex:
cd20: 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 ..@echo if {[pac
cd30: 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 73 20 kage vsatisfies
cd40: 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65 [package provide
cd50: 20 54 63 6c 5d 20 39 2e 30 2d 5d 7d 20 7b 20 3e Tcl] 9.0-]} { >
cd60: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
cd70: 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 ndex.tcl..@echo
cd80: 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 package ifneeded
cd90: 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 $(PRJ_PACKAGE_T
cda0: 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 CLNAME) $(DOTVER
cdb0: 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c 69 SION) \.. [li
cdc0: 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f st load [file jo
cdd0: 69 6e 20 24 24 64 69 72 20 24 28 50 4c 41 54 46 in $$dir $(PLATF
cde0: 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 20 24 28 ORM_IDENTIFY) $(
cdf0: 50 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 3e PRJLIBNAME9)]] >
ce00: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
ce10: 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f Index.tcl..@echo
ce20: 20 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f } else { >> $(O
ce30: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
ce40: 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b .tcl..@echo pack
ce50: 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 age ifneeded $(P
ce60: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
ce70: 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e ME) $(DOTVERSION
ce80: 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c ) \.. [list l
ce90: 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 oad [file join $
cea0: 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f $dir $(PLATFORM_
ceb0: 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c IDENTIFY) $(PRJL
cec0: 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 IBNAME8)]] >> $(
ced0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
cee0: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 3e x.tcl..@echo } >
cef0: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
cf00: 49 6e 64 65 78 2e 74 63 6c 0a 21 65 6c 73 65 0a Index.tcl.!else.
cf10: 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 default-pkgindex
cf20: 3a 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 61 :..@echo if {[pa
cf30: 63 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 73 ckage vsatisfies
cf40: 20 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64 [package provid
cf50: 65 20 54 63 6c 5d 20 39 2e 30 2d 5d 7d 20 7b 20 e Tcl] 9.0-]} {
cf60: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
cf70: 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f Index.tcl..@echo
cf80: 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 package ifneede
cf90: 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f d $(PRJ_PACKAGE_
cfa0: 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 TCLNAME) $(DOTVE
cfb0: 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c RSION) \.. [l
cfc0: 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a ist load [file j
cfd0: 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a 4c oin $$dir $(PRJL
cfe0: 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 IBNAME9)]] >> $(
cff0: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d000: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 65 x.tcl..@echo } e
d010: 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 lse { >> $(OUT_D
d020: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d030: 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 ..@echo package
d040: 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 ifneeded $(PRJ_P
d050: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 ACKAGE_TCLNAME)
d060: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0a $(DOTVERSION) \.
d070: 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 . [list load
d080: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 [file join $$dir
d090: 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 5d $(PRJLIBNAME8)]
d0a0: 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c ] >> $(OUT_DIR)\
d0b0: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 pkgIndex.tcl..@e
d0c0: 63 68 6f 20 7d 20 3e 3e 20 24 28 4f 55 54 5f 44 cho } >> $(OUT_D
d0d0: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d0e0: 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 .!endif..default
d0f0: 2d 70 6b 67 69 6e 64 65 78 2d 74 65 61 3a 0a 09 -pkgindex-tea:..
d100: 40 69 66 20 65 78 69 73 74 20 24 28 52 4f 4f 54 @if exist $(ROOT
d110: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 )\pkgIndex.tcl.i
d120: 6e 20 6e 6d 61 6b 65 68 6c 70 20 2d 73 20 3c 3c n nmakehlp -s <<
d130: 20 24 28 52 4f 4f 54 29 5c 70 6b 67 49 6e 64 65 $(ROOT)\pkgInde
d140: 78 2e 74 63 6c 2e 69 6e 20 3e 20 24 28 4f 55 54 x.tcl.in > $(OUT
d150: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
d160: 63 6c 0a 40 50 41 43 4b 41 47 45 5f 56 45 52 53 cl.@PACKAGE_VERS
d170: 49 4f 4e 40 20 20 20 20 24 28 44 4f 54 56 45 52 ION@ $(DOTVER
d180: 53 49 4f 4e 29 0a 40 50 41 43 4b 41 47 45 5f 4e SION).@PACKAGE_N
d190: 41 4d 45 40 20 20 20 20 20 20 20 24 28 50 52 4a AME@ $(PRJ
d1a0: 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 _PACKAGE_TCLNAME
d1b0: 29 0a 40 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 ).@PACKAGE_TCLNA
d1c0: 4d 45 40 20 20 20 20 24 28 50 52 4a 5f 50 41 43 ME@ $(PRJ_PAC
d1d0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 KAGE_TCLNAME).@P
d1e0: 4b 47 5f 4c 49 42 5f 46 49 4c 45 40 20 20 20 20 KG_LIB_FILE@
d1f0: 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 $(PRJLIBNAME)
d200: 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 38 40 .@PKG_LIB_FILE8@
d210: 20 20 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 $(PRJLIBNA
d220: 4d 45 38 29 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 ME8).@PKG_LIB_FI
d230: 4c 45 39 40 20 20 20 20 20 20 24 28 50 52 4a 4c LE9@ $(PRJL
d240: 49 42 4e 41 4d 45 39 29 0a 3c 3c 0a 0a 64 65 66 IBNAME9).<<..def
d250: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 ault-install: de
d260: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 62 69 fault-install-bi
d270: 6e 61 72 69 65 73 20 64 65 66 61 75 6c 74 2d 69 naries default-i
d280: 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 65 73 nstall-libraries
d290: 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 29 0a .!if $(SYMBOLS).
d2a0: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 3a default-install:
d2b0: 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c default-install
d2c0: 2d 70 64 62 73 0a 21 65 6e 64 69 66 0a 0a 23 20 -pdbs.!endif..#
d2d0: 41 67 61 69 6e 20 74 6f 20 64 65 61 6c 20 77 69 Again to deal wi
d2e0: 74 68 20 68 69 73 74 6f 72 69 63 61 6c 20 62 72 th historical br
d2f0: 6f 6b 65 6e 6e 65 73 73 2c 20 74 68 65 72 65 20 okenness, there
d300: 69 73 20 73 6f 6d 65 20 63 6f 6e 66 75 73 69 6f is some confusio
d310: 6e 0a 23 20 69 6e 20 74 65 72 6d 69 6e 6c 6f 67 n.# in terminlog
d320: 79 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e y. For extension
d330: 73 2c 20 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d s, the "install-
d340: 62 69 6e 61 72 69 65 73 22 20 77 61 73 20 75 73 binaries" was us
d350: 65 64 20 74 6f 0a 23 20 6c 6f 63 61 74 65 20 74 ed to.# locate t
d360: 61 72 67 65 74 20 64 69 72 65 63 74 6f 72 79 20 arget directory
d370: 66 6f 72 20 2a 62 69 6e 61 72 79 20 73 68 61 72 for *binary shar
d380: 65 64 20 6c 69 62 72 61 72 69 65 73 2a 20 61 6e ed libraries* an
d390: 64 20 74 68 75 73 0a 23 20 74 68 65 20 61 70 70 d thus.# the app
d3a0: 72 6f 70 72 69 61 74 65 20 6d 61 63 72 6f 20 69 ropriate macro i
d3b0: 73 20 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 s LIB_INSTALL_DI
d3c0: 52 20 73 69 6e 63 65 20 42 49 4e 5f 49 4e 53 54 R since BIN_INST
d3d0: 41 4c 4c 5f 44 49 52 20 69 73 0a 23 20 66 6f 72 ALL_DIR is.# for
d3e0: 20 65 78 65 63 75 74 61 62 6c 65 73 20 28 65 78 executables (ex
d3f0: 65 73 29 2e 20 4f 6e 20 74 68 65 20 6f 74 68 65 es). On the othe
d400: 72 20 68 61 6e 64 20 74 68 65 20 22 69 6e 73 74 r hand the "inst
d410: 61 6c 6c 2d 6c 69 62 72 61 72 69 65 73 22 0a 23 all-libraries".#
d420: 20 74 61 72 67 65 74 20 69 73 20 66 6f 72 20 2a target is for *
d430: 73 63 72 69 70 74 73 2a 20 61 6e 64 20 73 68 6f scripts* and sho
d440: 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 63 61 uld have been ca
d450: 6c 6c 65 64 20 22 69 6e 73 74 61 6c 6c 2d 73 63 lled "install-sc
d460: 72 69 70 74 73 22 2e 0a 64 65 66 61 75 6c 74 2d ripts"..default-
d470: 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 install-binaries
d480: 3a 20 24 28 50 52 4a 4c 49 42 29 0a 09 40 65 63 : $(PRJLIB)..@ec
d490: 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 62 69 ho Installing bi
d4a0: 6e 61 72 69 65 73 20 74 6f 20 27 24 28 4c 49 42 naries to '$(LIB
d4b0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 _INSTALL_DIR)'..
d4c0: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 @if not exist "$
d4d0: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
d4e0: 29 22 20 6d 6b 64 69 72 20 22 24 28 4c 49 42 5f )" mkdir "$(LIB_
d4f0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 INSTALL_DIR)"..@
d500: 24 28 43 50 59 29 20 24 28 50 52 4a 4c 49 42 29 $(CPY) $(PRJLIB)
d510: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f "$(LIB_INSTALL_
d520: 44 49 52 29 22 20 3e 4e 55 4c 0a 0a 23 20 41 6c DIR)" >NUL..# Al
d530: 69 61 73 20 66 6f 72 20 64 65 66 61 75 6c 74 2d ias for default-
d540: 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 0a install-scripts.
d550: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d560: 6c 69 62 72 61 72 69 65 73 3a 20 64 65 66 61 75 libraries: defau
d570: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 lt-install-scrip
d580: 74 73 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 ts..default-inst
d590: 61 6c 6c 2d 73 63 72 69 70 74 73 3a 20 24 28 4f all-scripts: $(O
d5a0: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d5b0: 2e 74 63 6c 0a 09 40 65 63 68 6f 20 49 6e 73 74 .tcl..@echo Inst
d5c0: 61 6c 6c 69 6e 67 20 6c 69 62 72 61 72 69 65 73 alling libraries
d5d0: 20 74 6f 20 27 24 28 53 43 52 49 50 54 5f 49 4e to '$(SCRIPT_IN
d5e0: 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 66 STALL_DIR)'..@if
d5f0: 20 65 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 exist $(LIBDIR)
d600: 20 24 28 43 50 59 29 20 24 28 4c 49 42 44 49 52 $(CPY) $(LIBDIR
d610: 29 5c 2a 2e 74 63 6c 20 22 24 28 53 43 52 49 50 )\*.tcl "$(SCRIP
d620: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a T_INSTALL_DIR)".
d630: 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e .@echo Installin
d640: 67 20 70 61 63 6b 61 67 65 20 69 6e 64 65 78 20 g package index
d650: 69 6e 20 27 24 28 53 43 52 49 50 54 5f 49 4e 53 in '$(SCRIPT_INS
d660: 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 24 28 43 TALL_DIR)'..@$(C
d670: 50 59 29 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 PY) $(OUT_DIR)\p
d680: 6b 67 49 6e 64 65 78 2e 74 63 6c 20 24 28 53 43 kgIndex.tcl $(SC
d690: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
d6a0: 29 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 )..default-insta
d6b0: 6c 6c 2d 73 74 75 62 73 3a 0a 09 40 65 63 68 6f ll-stubs:..@echo
d6c0: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 73 74 75 62 Installing stub
d6d0: 73 20 6c 69 62 72 61 72 79 20 74 6f 20 27 24 28 s library to '$(
d6e0: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
d6f0: 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 IR)'..@if not ex
d700: 69 73 74 20 22 24 28 53 43 52 49 50 54 5f 49 4e ist "$(SCRIPT_IN
d710: 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 STALL_DIR)" mkdi
d720: 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 r "$(SCRIPT_INST
d730: 41 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 43 50 ALL_DIR)"..@$(CP
d740: 59 29 20 24 28 50 52 4a 53 54 55 42 4c 49 42 29 Y) $(PRJSTUBLIB)
d750: 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 "$(SCRIPT_INSTA
d760: 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0a 0a 64 LL_DIR)" >NUL..d
d770: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 efault-install-p
d780: 64 62 73 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 dbs:..@echo Inst
d790: 61 6c 6c 69 6e 67 20 50 44 42 73 20 74 6f 20 27 alling PDBs to '
d7a0: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
d7b0: 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 R)'..@if not exi
d7c0: 73 74 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c st "$(LIB_INSTAL
d7d0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
d7e0: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
d7f0: 29 22 0a 09 40 24 28 43 50 59 29 20 22 24 28 4f )"..@$(CPY) "$(O
d800: 55 54 5f 44 49 52 29 5c 2a 2e 70 64 62 22 20 22 UT_DIR)\*.pdb" "
d810: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
d820: 52 29 5c 22 0a 0a 23 20 22 65 6d 61 63 73 20 66 R)\"..# "emacs f
d830: 6f 6e 74 2d 6c 6f 63 6b 20 68 69 67 68 6c 69 67 ont-lock highlig
d840: 68 74 69 6e 67 20 66 69 78 0a 0a 64 65 66 61 75 hting fix..defau
d850: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d lt-install-docs-
d860: 68 74 6d 6c 3a 0a 09 40 65 63 68 6f 20 49 6e 73 html:..@echo Ins
d870: 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 talling document
d880: 61 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 ation files to '
d890: 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(DOC_INSTALL_DI
d8a0: 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 R)'..@if not exi
d8b0: 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c st "$(DOC_INSTAL
d8c0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
d8d0: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
d8e0: 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 )"..@if exist $(
d8f0: 44 4f 43 44 49 52 29 20 66 6f 72 20 25 66 20 69 DOCDIR) for %f i
d900: 6e 20 28 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e n ("$(DOCDIR)\*.
d910: 68 74 6d 6c 22 20 22 24 28 44 4f 43 44 49 52 29 html" "$(DOCDIR)
d920: 5c 2a 2e 63 73 73 22 20 22 24 28 44 4f 43 44 49 \*.css" "$(DOCDI
d930: 52 29 5c 2a 2e 70 6e 67 22 29 20 64 6f 20 40 24 R)\*.png") do @$
d940: 28 43 4f 50 59 29 20 25 66 20 22 24 28 44 4f 43 (COPY) %f "$(DOC
d950: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 0a _INSTALL_DIR)"..
d960: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d970: 64 6f 63 73 2d 6e 3a 0a 09 40 65 63 68 6f 20 49 docs-n:..@echo I
d980: 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 nstalling docume
d990: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f ntation files to
d9a0: 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f '$(DOC_INSTALL_
d9b0: 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 DIR)'..@if not e
d9c0: 78 69 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 xist "$(DOC_INST
d9d0: 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 ALL_DIR)" mkdir
d9e0: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 "$(DOC_INSTALL_D
d9f0: 49 52 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 IR)"..@if exist
da00: 24 28 44 4f 43 44 49 52 29 20 66 6f 72 20 25 66 $(DOCDIR) for %f
da10: 20 69 6e 20 28 22 24 28 44 4f 43 44 49 52 29 5c in ("$(DOCDIR)\
da20: 2a 2e 6e 22 29 20 64 6f 20 40 24 28 43 4f 50 59 *.n") do @$(COPY
da30: 29 20 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 ) %f "$(DOC_INST
da40: 41 4c 4c 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 ALL_DIR)"..defau
da50: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 65 6d 6f 73 lt-install-demos
da60: 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c :..@echo Install
da70: 69 6e 67 20 64 65 6d 6f 73 20 74 6f 20 27 24 28 ing demos to '$(
da80: 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DEMO_INSTALL_DIR
da90: 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 )'..@if not exis
daa0: 74 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c t "$(DEMO_INSTAL
dab0: 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 L_DIR)" mkdir "$
dac0: 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 (DEMO_INSTALL_DI
dad0: 52 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 24 R)"..@if exist $
dae0: 28 44 45 4d 4f 44 49 52 29 20 24 28 43 50 59 44 (DEMODIR) $(CPYD
daf0: 49 52 29 20 22 24 28 44 45 4d 4f 44 49 52 29 22 IR) "$(DEMODIR)"
db00: 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c "$(DEMO_INSTALL
db10: 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d _DIR)"..default-
db20: 63 6c 65 61 6e 3a 0a 09 40 65 63 68 6f 20 43 6c clean:..@echo Cl
db30: 65 61 6e 69 6e 67 20 24 28 54 4d 50 5f 44 49 52 eaning $(TMP_DIR
db40: 29 5c 2a 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 )\* .....@if exi
db50: 73 74 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 st $(TMP_DIR)\nu
db60: 6c 20 24 28 52 4d 44 49 52 29 20 24 28 54 4d 50 l $(RMDIR) $(TMP
db70: 5f 44 49 52 29 0a 09 40 65 63 68 6f 20 43 6c 65 _DIR)..@echo Cle
db80: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
db90: 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 2c 20 6e \nmakehlp.obj, n
dba0: 6d 61 6b 65 68 6c 70 2e 65 78 65 20 2e 2e 2e 0a makehlp.exe ....
dbb0: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
dbc0: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
dbd0: 62 6a 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 bj del $(WIN_DIR
dbe0: 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 0a 09 )\nmakehlp.obj..
dbf0: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
dc00: 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 DIR)\nmakehlp.ex
dc10: 65 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 e del $(WIN_DIR)
dc20: 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 0a 09 40 \nmakehlp.exe..@
dc30: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 if exist $(WIN_D
dc40: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 IR)\nmakehlp.out
dc50: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c del $(WIN_DIR)\
dc60: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 09 40 65 nmakehlp.out..@e
dc70: 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 cho Cleaning $(W
dc80: 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 IN_DIR)\nmhlp-ou
dc90: 74 2e 74 78 74 20 2e 2e 2e 0a 09 40 69 66 20 65 t.txt .....@if e
dca0: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
dcb0: 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 64 65 nmhlp-out.txt de
dcc0: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 l $(WIN_DIR)\nmh
dcd0: 6c 70 2d 6f 75 74 2e 74 78 74 0a 09 40 65 63 68 lp-out.txt..@ech
dce0: 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e o Cleaning $(WIN
dcf0: 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 _DIR)\_junk.pch
dd00: 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
dd10: 28 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e (WIN_DIR)\_junk.
dd20: 70 63 68 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 pch del $(WIN_DI
dd30: 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 0a 09 40 65 R)\_junk.pch..@e
dd40: 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 cho Cleaning $(W
dd50: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 2c IN_DIR)\vercl.x,
dd60: 20 76 65 72 63 6c 2e 69 20 2e 2e 2e 0a 09 40 69 vercl.i .....@i
dd70: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
dd80: 52 29 5c 76 65 72 63 6c 2e 78 20 64 65 6c 20 24 R)\vercl.x del $
dd90: 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e (WIN_DIR)\vercl.
dda0: 78 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 x..@if exist $(W
ddb0: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 69 20 IN_DIR)\vercl.i
ddc0: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 del $(WIN_DIR)\v
ddd0: 65 72 63 6c 2e 69 0a 09 40 65 63 68 6f 20 43 6c ercl.i..@echo Cl
dde0: 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 eaning $(WIN_DIR
ddf0: 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 2c 20 76 )\versions.vc, v
de00: 65 72 73 69 6f 6e 2e 76 63 20 2e 2e 2e 0a 09 40 ersion.vc .....@
de10: 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 if exist $(WIN_D
de20: 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 20 IR)\versions.vc
de30: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 del $(WIN_DIR)\v
de40: 65 72 73 69 6f 6e 73 2e 76 63 0a 09 40 69 66 20 ersions.vc..@if
de50: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
de60: 5c 76 65 72 73 69 6f 6e 2e 76 63 20 64 65 6c 20 \version.vc del
de70: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 $(WIN_DIR)\versi
de80: 6f 6e 2e 76 63 0a 0a 64 65 66 61 75 6c 74 2d 68 on.vc..default-h
de90: 6f 73 65 3a 20 64 65 66 61 75 6c 74 2d 63 6c 65 ose: default-cle
dea0: 61 6e 0a 09 40 65 63 68 6f 20 48 6f 73 69 6e 67 an..@echo Hosing
deb0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 2a 20 2e 2e $(OUT_DIR)\* ..
dec0: 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 4f ...@if exist $(O
ded0: 55 54 5f 44 49 52 29 5c 6e 75 6c 20 24 28 52 4d UT_DIR)\nul $(RM
dee0: 44 49 52 29 20 24 28 4f 55 54 5f 44 49 52 29 0a DIR) $(OUT_DIR).
def0: 0a 23 20 4f 6e 6c 79 20 66 6f 72 20 62 61 63 6b .# Only for back
df00: 77 61 72 64 20 63 6f 6d 70 61 74 69 62 69 6c 69 ward compatibili
df10: 74 79 0a 64 65 66 61 75 6c 74 2d 64 69 73 74 63 ty.default-distc
df20: 6c 65 61 6e 3a 20 64 65 66 61 75 6c 74 2d 68 6f lean: default-ho
df30: 73 65 0a 0a 64 65 66 61 75 6c 74 2d 73 65 74 75 se..default-setu
df40: 70 3a 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 p:..@if not exis
df50: 74 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e 75 6c t $(OUT_DIR)\nul
df60: 20 6d 6b 64 69 72 20 24 28 4f 55 54 5f 44 49 52 mkdir $(OUT_DIR
df70: 29 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 )..@if not exist
df80: 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 $(TMP_DIR)\nul
df90: 6d 6b 64 69 72 20 24 28 54 4d 50 5f 44 49 52 29 mkdir $(TMP_DIR)
dfa0: 0a 0a 21 69 66 20 22 24 28 54 45 53 54 50 41 54 ..!if "$(TESTPAT
dfb0: 29 22 20 21 3d 20 22 22 0a 54 45 53 54 46 4c 41 )" != "".TESTFLA
dfc0: 47 53 20 3d 20 24 28 54 45 53 54 46 4c 41 47 53 GS = $(TESTFLAGS
dfd0: 29 20 2d 66 69 6c 65 20 24 28 54 45 53 54 50 41 ) -file $(TESTPA
dfe0: 54 29 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 T).!endif..defau
dff0: 6c 74 2d 74 65 73 74 3a 20 64 65 66 61 75 6c 74 lt-test: default
e000: 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 43 54 -setup $(PROJECT
e010: 29 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 50 41 )..@set TCLLIBPA
e020: 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f TH=$(OUT_DIR:\=/
e030: 29 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 4c )..@if exist $(L
e040: 49 42 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e IBDIR) for %f in
e050: 20 28 22 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 ("$(LIBDIR)\*.t
e060: 63 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 cl") do @$(COPY)
e070: 20 25 66 20 22 24 28 4f 55 54 5f 44 49 52 29 22 %f "$(OUT_DIR)"
e080: 0a 09 63 64 20 22 24 28 54 45 53 54 44 49 52 29 ..cd "$(TESTDIR)
e090: 22 20 26 26 20 24 28 44 45 42 55 47 47 45 52 29 " && $(DEBUGGER)
e0a0: 20 24 28 54 43 4c 53 48 29 20 61 6c 6c 2e 74 63 $(TCLSH) all.tc
e0b0: 6c 20 24 28 54 45 53 54 46 4c 41 47 53 29 0a 0a l $(TESTFLAGS)..
e0c0: 64 65 66 61 75 6c 74 2d 73 68 65 6c 6c 3a 20 64 default-shell: d
e0d0: 65 66 61 75 6c 74 2d 73 65 74 75 70 20 24 28 50 efault-setup $(P
e0e0: 52 4f 4a 45 43 54 29 0a 09 40 73 65 74 20 54 43 ROJECT)..@set TC
e0f0: 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 54 5f 44 LLIBPATH=$(OUT_D
e100: 49 52 3a 5c 3d 2f 29 0a 09 40 69 66 20 65 78 69 IR:\=/)..@if exi
e110: 73 74 20 24 28 4c 49 42 44 49 52 29 20 66 6f 72 st $(LIBDIR) for
e120: 20 25 66 20 69 6e 20 28 22 24 28 4c 49 42 44 49 %f in ("$(LIBDI
e130: 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f 20 40 24 R)\*.tcl") do @$
e140: 28 43 4f 50 59 29 20 25 66 20 22 24 28 4f 55 54 (COPY) %f "$(OUT
e150: 5f 44 49 52 29 22 0a 09 24 28 44 45 42 55 47 47 _DIR)"..$(DEBUGG
e160: 45 52 29 20 24 28 54 43 4c 53 48 29 0a 0a 23 20 ER) $(TCLSH)..#
e170: 47 65 6e 65 72 61 74 69 6f 6e 20 6f 66 20 57 69 Generation of Wi
e180: 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 20 72 65 ndows version re
e190: 73 6f 75 72 63 65 0a 21 69 66 64 65 66 20 52 43 source.!ifdef RC
e1a0: 46 49 4c 45 0a 0a 23 20 4e 6f 74 65 3a 20 64 6f FILE..# Note: do
e1b0: 6e 27 74 20 75 73 65 20 24 2a 2a 20 69 6e 20 62 n't use $** in b
e1c0: 65 6c 6f 77 20 72 75 6c 65 20 62 65 63 61 75 73 elow rule becaus
e1d0: 65 20 74 68 65 72 65 20 6d 61 79 20 62 65 20 6f e there may be o
e1e0: 74 68 65 72 20 64 65 70 65 6e 64 65 6e 63 69 65 ther dependencie
e1f0: 73 0a 23 20 61 6e 64 20 6f 6e 6c 79 20 74 68 65 s.# and only the
e200: 20 22 6d 61 69 6e 22 20 72 63 20 6d 75 73 74 20 "main" rc must
e210: 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 be passed to the
e220: 20 72 65 73 6f 75 72 63 65 20 63 6f 6d 70 69 6c resource compil
e230: 65 72 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 er.$(TMP_DIR)\$(
e240: 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 PROJECT).res: $(
e250: 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 RCDIR)\$(PROJECT
e260: 29 2e 72 63 0a 09 24 28 52 45 53 43 4d 44 29 20 ).rc..$(RESCMD)
e270: 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 $(RCDIR)\$(PROJE
e280: 43 54 29 2e 72 63 0a 0a 21 65 6c 73 65 0a 0a 23 CT).rc..!else..#
e290: 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 If parent makef
e2a0: 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 ile has not defi
e2b0: 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 20 64 ned a resource d
e2c0: 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0a efinition file,.
e2d0: 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 72 61 # we will genera
e2e0: 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e te one from stan
e2f0: 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e 0a 24 dard template..$
e300: 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a (TMP_DIR)\$(PROJ
e310: 45 43 54 29 2e 72 65 73 3a 20 24 28 54 4d 50 5f ECT).res: $(TMP_
e320: 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e DIR)\$(PROJECT).
e330: 72 63 0a 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 rc..$(TMP_DIR)\$
e340: 28 50 52 4f 4a 45 43 54 29 2e 72 63 3a 0a 09 40 (PROJECT).rc:..@
e350: 24 28 43 4f 50 59 29 20 3c 3c 20 24 28 54 4d 50 $(COPY) << $(TMP
e360: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
e370: 2e 72 63 0a 23 69 6e 63 6c 75 64 65 20 3c 77 69 .rc.#include <wi
e380: 6e 76 65 72 2e 68 3e 0a 0a 56 53 5f 56 45 52 53 nver.h>..VS_VERS
e390: 49 4f 4e 5f 49 4e 46 4f 20 56 45 52 53 49 4f 4e ION_INFO VERSION
e3a0: 49 4e 46 4f 0a 20 46 49 4c 45 56 45 52 53 49 4f INFO. FILEVERSIO
e3b0: 4e 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 N.COMMAVERSION.
e3c0: 50 52 4f 44 55 43 54 56 45 52 53 49 4f 4e 09 43 PRODUCTVERSION.C
e3d0: 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 46 49 4c OMMAVERSION. FIL
e3e0: 45 46 4c 41 47 53 4d 41 53 4b 09 30 78 33 66 4c EFLAGSMASK.0x3fL
e3f0: 0a 23 69 66 64 65 66 20 44 45 42 55 47 0a 20 46 .#ifdef DEBUG. F
e400: 49 4c 45 46 4c 41 47 53 09 56 53 5f 46 46 5f 44 ILEFLAGS.VS_FF_D
e410: 45 42 55 47 0a 23 65 6c 73 65 0a 20 46 49 4c 45 EBUG.#else. FILE
e420: 46 4c 41 47 53 09 30 78 30 4c 0a 23 65 6e 64 69 FLAGS.0x0L.#endi
e430: 66 0a 20 46 49 4c 45 4f 53 09 09 56 4f 53 5f 4e f. FILEOS..VOS_N
e440: 54 5f 57 49 4e 44 4f 57 53 33 32 0a 20 46 49 4c T_WINDOWS32. FIL
e450: 45 54 59 50 45 09 56 46 54 5f 44 4c 4c 0a 20 46 ETYPE.VFT_DLL. F
e460: 49 4c 45 53 55 42 54 59 50 45 09 30 78 30 4c 0a ILESUBTYPE.0x0L.
e470: 42 45 47 49 4e 0a 20 20 20 20 42 4c 4f 43 4b 20 BEGIN. BLOCK
e480: 22 53 74 72 69 6e 67 46 69 6c 65 49 6e 66 6f 22 "StringFileInfo"
e490: 0a 20 20 20 20 42 45 47 49 4e 0a 20 20 20 20 20 . BEGIN.
e4a0: 20 20 20 42 4c 4f 43 4b 20 22 30 34 30 39 30 34 BLOCK "040904
e4b0: 62 30 22 0a 20 20 20 20 20 20 20 20 42 45 47 49 b0". BEGI
e4c0: 4e 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 41 N. VA
e4d0: 4c 55 45 20 22 46 69 6c 65 44 65 73 63 72 69 70 LUE "FileDescrip
e4e0: 74 69 6f 6e 22 2c 20 20 22 54 63 6c 20 65 78 74 tion", "Tcl ext
e4f0: 65 6e 73 69 6f 6e 20 22 20 50 52 4f 4a 45 43 54 ension " PROJECT
e500: 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 41 4c . VAL
e510: 55 45 20 22 4f 72 69 67 69 6e 61 6c 46 69 6c 65 UE "OriginalFile
e520: 6e 61 6d 65 22 2c 20 50 52 4a 4c 49 42 4e 41 4d name", PRJLIBNAM
e530: 45 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 41 E. VA
e540: 4c 55 45 20 22 46 69 6c 65 56 65 72 73 69 6f 6e LUE "FileVersion
e550: 22 2c 20 20 20 20 20 20 44 4f 54 56 45 52 53 49 ", DOTVERSI
e560: 4f 4e 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 ON. V
e570: 41 4c 55 45 20 22 50 72 6f 64 75 63 74 4e 61 6d ALUE "ProductNam
e580: 65 22 2c 20 20 20 20 20 20 22 50 61 63 6b 61 67 e", "Packag
e590: 65 20 22 20 50 52 4f 4a 45 43 54 20 22 20 66 6f e " PROJECT " fo
e5a0: 72 20 54 63 6c 22 0a 20 20 20 20 20 20 20 20 20 r Tcl".
e5b0: 20 20 20 56 41 4c 55 45 20 22 50 72 6f 64 75 63 VALUE "Produc
e5c0: 74 56 65 72 73 69 6f 6e 22 2c 20 20 20 44 4f 54 tVersion", DOT
e5d0: 56 45 52 53 49 4f 4e 0a 20 20 20 20 20 20 20 20 VERSION.
e5e0: 45 4e 44 0a 20 20 20 20 45 4e 44 0a 20 20 20 20 END. END.
e5f0: 42 4c 4f 43 4b 20 22 56 61 72 46 69 6c 65 49 6e BLOCK "VarFileIn
e600: 66 6f 22 0a 20 20 20 20 42 45 47 49 4e 0a 20 20 fo". BEGIN.
e610: 20 20 20 20 20 20 56 41 4c 55 45 20 22 54 72 61 VALUE "Tra
e620: 6e 73 6c 61 74 69 6f 6e 22 2c 20 30 78 34 30 39 nslation", 0x409
e630: 2c 20 31 32 30 30 0a 20 20 20 20 45 4e 44 0a 45 , 1200. END.E
e640: 4e 44 0a 0a 3c 3c 0a 0a 21 65 6e 64 69 66 20 23 ND..<<..!endif #
e650: 20 69 66 64 65 66 20 52 43 46 49 4c 45 0a 0a 21 ifdef RCFILE..!
e660: 69 66 6e 64 65 66 20 44 49 53 41 42 4c 45 5f 49 ifndef DISABLE_I
e670: 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 0a 44 49 MPLICIT_RULES.DI
e680: 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f 52 SABLE_IMPLICIT_R
e690: 55 4c 45 53 20 3d 20 30 0a 21 65 6e 64 69 66 0a ULES = 0.!endif.
e6a0: 0a 21 69 66 20 21 24 28 44 49 53 41 42 4c 45 5f .!if !$(DISABLE_
e6b0: 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 29 0a IMPLICIT_RULES).
e6c0: 23 20 49 6d 70 6c 69 63 69 74 20 72 75 6c 65 20 # Implicit rule
e6d0: 64 65 66 69 6e 69 74 69 6f 6e 73 20 2d 20 6f 6e definitions - on
e6e0: 6c 79 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 ly for building
e6f0: 6c 69 62 72 61 72 79 20 6f 62 6a 65 63 74 73 2e library objects.
e700: 20 46 6f 72 20 73 74 75 62 73 20 61 6e 64 0a 23 For stubs and.#
e710: 20 6d 61 69 6e 20 61 70 70 6c 69 63 61 74 69 6f main applicatio
e720: 6e 2c 20 74 68 65 20 6d 61 6b 65 66 69 6c 65 20 n, the makefile
e730: 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 65 78 should define ex
e740: 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0a 0a 7b plicit rules...{
e750: 24 28 52 4f 4f 54 29 7d 2e 63 7b 24 28 54 4d 50 $(ROOT)}.c{$(TMP
e760: 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 _DIR)}.obj::..$(
e770: 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 3c CCPKGCMD) @<<.$<
e780: 0a 3c 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 29 .<<..{$(WIN_DIR)
e790: 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e }.c{$(TMP_DIR)}.
e7a0: 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 4d obj::..$(CCPKGCM
e7b0: 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 D) @<<.$<.<<..{$
e7c0: 28 47 45 4e 45 52 49 43 44 49 52 29 7d 2e 63 7b (GENERICDIR)}.c{
e7d0: 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a $(TMP_DIR)}.obj:
e7e0: 3a 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 20 40 :..$(CCPKGCMD) @
e7f0: 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 43 4f 4d <<.$<.<<..{$(COM
e800: 50 41 54 44 49 52 29 7d 2e 63 7b 24 28 54 4d 50 PATDIR)}.c{$(TMP
e810: 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 _DIR)}.obj::..$(
e820: 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 3c CCPKGCMD) @<<.$<
e830: 0a 3c 3c 0a 0a 7b 24 28 52 43 44 49 52 29 7d 2e .<<..{$(RCDIR)}.
e840: 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 rc{$(TMP_DIR)}.r
e850: 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 24 es:..$(RESCMD) $
e860: 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d 2e <..{$(WIN_DIR)}.
e870: 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 rc{$(TMP_DIR)}.r
e880: 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 24 es:..$(RESCMD) $
e890: 3c 0a 0a 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e <..{$(TMP_DIR)}.
e8a0: 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 rc{$(TMP_DIR)}.r
e8b0: 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 24 es:..$(RESCMD) $
e8c0: 3c 0a 0a 2e 53 55 46 46 49 58 45 53 3a 0a 2e 53 <...SUFFIXES:..S
e8d0: 55 46 46 49 58 45 53 3a 2e 63 20 2e 72 63 0a 0a UFFIXES:.c .rc..
e8e0: 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 !endif..########
e8f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 31 34 2e 20 53 ########.# 14. S
e930: 61 6e 69 74 79 20 63 68 65 63 6b 20 73 65 6c 65 anity check sele
e940: 63 74 65 64 20 6f 70 74 69 6f 6e 73 20 61 67 61 cted options aga
e950: 69 6e 73 74 20 54 63 6c 20 62 75 69 6c 64 20 6f inst Tcl build o
e960: 70 74 69 6f 6e 73 0a 23 20 57 68 65 6e 20 62 75 ptions.# When bu
e970: 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 ilding an extens
e980: 69 6f 6e 2c 20 63 65 72 74 61 69 6e 20 63 6f 6e ion, certain con
e990: 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f figuration optio
e9a0: 6e 73 20 73 68 6f 75 6c 64 0a 23 20 6d 61 74 63 ns should.# matc
e9b0: 68 20 74 68 65 20 6f 6e 65 73 20 75 73 65 64 20 h the ones used
e9c0: 77 68 65 6e 20 54 63 6c 20 77 61 73 20 62 75 69 when Tcl was bui
e9d0: 6c 74 2e 20 48 65 72 65 20 77 65 20 63 68 65 63 lt. Here we chec
e9e0: 6b 20 61 6e 64 0a 23 20 77 61 72 6e 20 6f 6e 20 k and.# warn on
e9f0: 61 20 6d 69 73 6d 61 74 63 68 2e 0a 21 69 66 20 a mismatch..!if
ea00: 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 !$(DOING_TCL)..!
ea10: 69 66 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 if $(TCLINSTALL)
ea20: 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 # Building agai
ea30: 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 nst an installed
ea40: 20 54 63 6c 0a 21 69 66 20 65 78 69 73 74 28 22 Tcl.!if exist("
ea50: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e $(_TCLDIR)\lib\n
ea60: 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 make\tcl.nmake")
ea70: 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 20 .TCLNMAKECONFIG
ea80: 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 = "$(_TCLDIR)\li
ea90: 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b b\nmake\tcl.nmak
eaa0: 65 22 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 20 e".!endif.!else
eab0: 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 # !$(TCLINSTALL)
eac0: 20 2d 20 62 75 69 6c 64 69 6e 67 20 61 67 61 69 - building agai
ead0: 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 0a 21 nst Tcl source.!
eae0: 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c if exist("$(_TCL
eaf0: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
eb00: 44 49 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b DIRTOP)\tcl.nmak
eb10: 65 22 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 e").TCLNMAKECONF
eb20: 49 47 09 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 IG.= "$(_TCLDIR)
eb30: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
eb40: 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0a 21 OP)\tcl.nmake".!
eb50: 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 54 endif.!endif # T
eb60: 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 24 CLINSTALL..!if $
eb70: 28 43 4f 4e 46 49 47 5f 43 48 45 43 4b 29 0a 21 (CONFIG_CHECK).!
eb80: 69 66 64 65 66 20 54 43 4c 4e 4d 41 4b 45 43 4f ifdef TCLNMAKECO
eb90: 4e 46 49 47 0a 21 69 6e 63 6c 75 64 65 20 24 28 NFIG.!include $(
eba0: 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 29 0a TCLNMAKECONFIG).
ebb0: 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f 52 .!if defined(COR
ebc0: 45 5f 4d 41 43 48 49 4e 45 29 20 26 26 20 22 24 E_MACHINE) && "$
ebd0: 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 22 20 (CORE_MACHINE)"
ebe0: 21 3d 20 22 24 28 4d 41 43 48 49 4e 45 29 22 0a != "$(MACHINE)".
ebf0: 21 65 72 72 6f 72 20 45 52 52 4f 52 3a 20 42 75 !error ERROR: Bu
ec00: 69 6c 64 20 74 61 72 67 65 74 20 28 24 28 4d 41 ild target ($(MA
ec10: 43 48 49 4e 45 29 29 20 64 6f 65 73 20 6e 6f 74 CHINE)) does not
ec20: 20 6d 61 74 63 68 20 74 68 65 20 54 63 6c 20 6c match the Tcl l
ec30: 69 62 72 61 72 79 20 61 72 63 68 69 74 65 63 74 ibrary architect
ec40: 75 72 65 20 28 24 28 43 4f 52 45 5f 4d 41 43 48 ure ($(CORE_MACH
ec50: 49 4e 45 29 29 2e 0a 21 65 6e 64 69 66 0a 21 69 INE))..!endif.!i
ec60: 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 f $(TCL_VERSION)
ec70: 20 3c 20 38 37 20 26 26 20 64 65 66 69 6e 65 64 < 87 && defined
ec80: 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 (CORE_USE_THREAD
ec90: 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 43 4f 52 _ALLOC) && $(COR
eca0: 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c E_USE_THREAD_ALL
ecb0: 4f 43 29 20 21 3d 20 24 28 55 53 45 5f 54 48 52 OC) != $(USE_THR
ecc0: 45 41 44 5f 41 4c 4c 4f 43 29 0a 21 6d 65 73 73 EAD_ALLOC).!mess
ecd0: 61 67 65 20 57 41 52 4e 49 4e 47 3a 20 56 61 6c age WARNING: Val
ece0: 75 65 20 6f 66 20 55 53 45 5f 54 48 52 45 41 44 ue of USE_THREAD
ecf0: 5f 41 4c 4c 4f 43 20 28 24 28 55 53 45 5f 54 48 _ALLOC ($(USE_TH
ed00: 52 45 41 44 5f 41 4c 4c 4f 43 29 29 20 64 6f 65 READ_ALLOC)) doe
ed10: 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 73 20 s not match its
ed20: 54 63 6c 20 63 6f 72 65 20 76 61 6c 75 65 20 28 Tcl core value (
ed30: 24 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 $(CORE_USE_THREA
ed40: 44 5f 41 4c 4c 4f 43 29 29 2e 0a 21 65 6e 64 69 D_ALLOC))..!endi
ed50: 66 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f f.!if defined(CO
ed60: 52 45 5f 44 45 42 55 47 29 20 26 26 20 24 28 43 RE_DEBUG) && $(C
ed70: 4f 52 45 5f 44 45 42 55 47 29 20 21 3d 20 24 28 ORE_DEBUG) != $(
ed80: 44 45 42 55 47 29 0a 21 6d 65 73 73 61 67 65 20 DEBUG).!message
ed90: 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20 6f WARNING: Value o
eda0: 66 20 44 45 42 55 47 20 28 24 28 44 45 42 55 47 f DEBUG ($(DEBUG
edb0: 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 )) does not matc
edc0: 68 20 69 74 73 20 54 63 6c 20 6c 69 62 72 61 72 h its Tcl librar
edd0: 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 y configuration
ede0: 28 24 28 44 45 42 55 47 29 29 2e 0a 21 65 6e 64 ($(DEBUG))..!end
edf0: 69 66 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 if.!endif..!endi
ee00: 66 20 23 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 f # TCLNMAKECONF
ee10: 49 47 0a 0a 21 65 6e 64 69 66 20 23 20 21 24 28 IG..!endif # !$(
ee20: 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 0a 23 2d 2d DOING_TCL)...#--
ee30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 23 20 44 69 73 70 6c --------.# Displ
ee70: 61 79 20 73 74 61 74 73 20 62 65 69 6e 67 20 75 ay stats being u
ee80: 73 65 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d sed..#----------
ee90: 2d 2d 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: 0a 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 ..!if !$(DOING_T
eed0: 43 4c 29 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a CL).!message ***
eee0: 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 Building agains
eef0: 74 20 54 63 6c 20 61 74 20 27 24 28 5f 54 43 4c t Tcl at '$(_TCL
ef00: 44 49 52 29 27 0a 21 65 6e 64 69 66 0a 21 69 66 DIR)'.!endif.!if
ef10: 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26 !$(DOING_TK) &&
ef20: 20 24 28 4e 45 45 44 5f 54 4b 29 0a 21 6d 65 73 $(NEED_TK).!mes
ef30: 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69 6e sage *** Buildin
ef40: 67 20 61 67 61 69 6e 73 74 20 54 6b 20 61 74 20 g against Tk at
ef50: 27 24 28 5f 54 4b 44 49 52 29 27 0a 21 65 6e 64 '$(_TKDIR)'.!end
ef60: 69 66 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 if.!message ***
ef70: 49 6e 74 65 72 6d 65 64 69 61 74 65 20 64 69 72 Intermediate dir
ef80: 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 ectory will be '
ef90: 24 28 54 4d 50 5f 44 49 52 29 27 0a 21 6d 65 73 $(TMP_DIR)'.!mes
efa0: 73 61 67 65 20 2a 2a 2a 20 4f 75 74 70 75 74 20 sage *** Output
efb0: 64 69 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 directory will b
efc0: 65 20 27 24 28 4f 55 54 5f 44 49 52 29 27 0a 21 e '$(OUT_DIR)'.!
efd0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e 73 74 message *** Inst
efe0: 61 6c 6c 61 74 69 6f 6e 2c 20 69 66 20 73 65 6c allation, if sel
eff0: 65 63 74 65 64 2c 20 77 69 6c 6c 20 62 65 20 69 ected, will be i
f000: 6e 20 27 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 n '$(_INSTALLDIR
f010: 29 27 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 )'.!message ***
f020: 53 75 66 66 69 78 20 66 6f 72 20 62 69 6e 61 72 Suffix for binar
f030: 69 65 73 20 77 69 6c 6c 20 62 65 20 27 24 28 53 ies will be '$(S
f040: 55 46 58 29 27 0a 21 6d 65 73 73 61 67 65 20 2a UFX)'.!message *
f050: 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 76 65 72 73 ** Compiler vers
f060: 69 6f 6e 20 24 28 56 43 56 45 52 29 2e 20 54 61 ion $(VCVER). Ta
f070: 72 67 65 74 20 24 28 4d 41 43 48 49 4e 45 29 2c rget $(MACHINE),
f080: 20 68 6f 73 74 20 24 28 4e 41 54 49 56 45 5f 41 host $(NATIVE_A
f090: 52 43 48 29 2e 0a 0a 21 65 6e 64 69 66 20 23 20 RCH)...!endif #
f0a0: 69 66 64 65 66 20 5f 52 55 4c 45 53 5f 56 43 0a ifdef _RULES_VC.