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 41 )\configure.in A
5e80: 43 5f 49 4e 49 54 20 3e 3e 20 76 65 72 73 69 6f C_INIT >> versio
5e90: 6e 73 2e 76 63 5d 0a 21 69 66 20 5b 65 63 68 6f ns.vc].!if [echo
5ea0: 20 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c 3e DOTVERSION = \>
5eb0: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a versions.vc] \.
5ec0: 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 || [nmakehlp
5ed0: 2d 56 20 24 28 52 4f 4f 54 29 5c 63 6f 6e 66 69 -V $(ROOT)\confi
5ee0: 67 75 72 65 2e 61 63 20 41 43 5f 49 4e 49 54 20 gure.ac AC_INIT
5ef0: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a >> versions.vc].
5f00: 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 !error *** Could
5f10: 20 6e 6f 74 20 66 69 67 75 72 65 20 6f 75 74 20 not figure out
5f20: 65 78 74 65 6e 73 69 6f 6e 20 76 65 72 73 69 6f extension versio
5f30: 6e 2e 20 50 6c 65 61 73 65 20 64 65 66 69 6e 65 n. Please define
5f40: 20 44 4f 54 56 45 52 53 49 4f 4e 20 69 6e 20 70 DOTVERSION in p
5f50: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 62 arent makefile b
5f60: 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 efore including
5f70: 72 75 6c 65 73 2e 76 63 2e 0a 21 65 6e 64 69 66 rules.vc..!endif
5f80: 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 .!endif.!include
5f90: 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a 21 65 6e versions.vc.!en
5fa0: 64 69 66 20 23 20 44 4f 54 56 45 52 53 49 4f 4e dif # DOTVERSION
5fb0: 0a 56 45 52 53 49 4f 4e 20 20 20 20 20 20 20 20 .VERSION
5fc0: 20 3d 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 3a = $(DOTVERSION:
5fd0: 2e 3d 29 0a 0a 21 65 6e 64 69 66 20 23 20 24 28 .=)..!endif # $(
5fe0: 44 4f 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e 20 65 DOING_TCL) ... e
5ff0: 74 63 2e 0a 0a 23 20 57 69 6e 64 6f 77 73 20 52 tc...# Windows R
6000: 43 20 66 69 6c 65 73 20 68 61 76 65 20 33 20 76 C files have 3 v
6010: 65 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 ersion component
6020: 73 2e 20 45 6e 73 75 72 65 20 74 68 69 73 20 69 s. Ensure this i
6030: 72 72 65 73 70 65 63 74 69 76 65 0a 23 20 6f 66 rrespective.# of
6040: 20 68 6f 77 20 6d 61 6e 79 20 63 6f 6d 70 6f 6e how many compon
6050: 65 6e 74 73 20 74 68 65 20 70 61 63 6b 61 67 65 ents the package
6060: 20 68 61 73 20 73 70 65 63 69 66 69 65 64 2e 20 has specified.
6070: 42 61 73 69 63 61 6c 6c 79 2c 20 65 6e 73 75 72 Basically, ensur
6080: 65 0a 23 20 6d 69 6e 69 6d 75 6d 20 34 20 63 6f e.# minimum 4 co
6090: 6d 70 6f 6e 65 6e 74 73 20 62 79 20 61 70 70 65 mponents by appe
60a0: 6e 64 69 6e 67 20 34 20 30 27 73 20 61 6e 64 20 nding 4 0's and
60b0: 74 68 65 6e 20 70 69 63 6b 20 6f 75 74 20 74 68 then pick out th
60c0: 65 20 66 69 72 73 74 20 34 2e 0a 23 20 41 6c 73 e first 4..# Als
60d0: 6f 20 74 61 6b 65 20 63 61 72 65 20 6f 66 20 74 o take care of t
60e0: 68 65 20 66 61 63 74 20 74 68 61 74 20 44 4f 54 he fact that DOT
60f0: 56 45 52 53 49 4f 4e 20 6d 61 79 20 68 61 76 65 VERSION may have
6100: 20 22 61 22 20 6f 72 20 22 62 22 20 69 6e 73 74 "a" or "b" inst
6110: 65 61 64 0a 23 20 6f 66 20 22 2e 22 20 73 65 70 ead.# of "." sep
6120: 61 72 61 74 69 6e 67 20 74 68 65 20 76 65 72 73 arating the vers
6130: 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e 0a ion components..
6140: 44 4f 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 DOTSEPARATED=$(D
6150: 4f 54 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 0a 44 OTVERSION:a=.).D
6160: 4f 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f OTSEPARATED=$(DO
6170: 54 53 45 50 41 52 41 54 45 44 3a 62 3d 2e 29 0a TSEPARATED:b=.).
6180: 21 69 66 20 5b 65 63 68 6f 20 52 43 43 4f 4d 4d !if [echo RCCOMM
6190: 41 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 AVERSION = \> ve
61a0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 7c rsions.vc] \. |
61b0: 7c 20 5b 66 6f 72 20 2f 66 20 22 74 6f 6b 65 6e | [for /f "token
61c0: 73 3d 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 65 6c s=1,2,3,4,5* del
61d0: 69 6d 73 3d 2e 22 20 25 61 20 69 6e 20 28 22 24 ims=." %a in ("$
61e0: 28 44 4f 54 53 45 50 41 52 41 54 45 44 29 2e 30 (DOTSEPARATED).0
61f0: 2e 30 2e 30 2e 30 22 29 20 64 6f 20 65 63 68 6f .0.0.0") do echo
6200: 20 25 61 2c 25 62 2c 25 63 2c 25 64 20 3e 3e 20 %a,%b,%c,%d >>
6210: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 72 versions.vc].!er
6220: 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f ror *** Could no
6230: 74 20 67 65 6e 65 72 61 74 65 20 52 43 43 4f 4d t generate RCCOM
6240: 4d 41 56 45 52 53 49 4f 4e 20 2a 2a 2a 0a 21 65 MAVERSION ***.!e
6250: 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 76 65 ndif.!include ve
6260: 72 73 69 6f 6e 73 2e 76 63 0a 0a 23 23 23 23 23 rsions.vc..#####
6270: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 37 2e 20 50 61 72 73 65 20 74 ###.# 7. Parse t
62c0: 68 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 74 6f he OPTS macro to
62d0: 20 77 6f 72 6b 20 6f 75 74 20 74 68 65 20 72 65 work out the re
62e0: 71 75 65 73 74 65 64 20 62 75 69 6c 64 20 63 6f quested build co
62f0: 6e 66 69 67 75 72 61 74 69 6f 6e 2e 0a 23 20 42 nfiguration..# B
6300: 61 73 65 64 20 6f 6e 20 74 68 69 73 2c 20 77 65 ased on this, we
6310: 20 77 69 6c 6c 20 63 6f 6e 73 74 72 75 63 74 20 will construct
6320: 74 68 65 20 61 63 74 75 61 6c 20 73 77 69 74 63 the actual switc
6330: 68 65 73 20 74 6f 20 62 65 20 70 61 73 73 65 64 hes to be passed
6340: 20 74 6f 20 74 68 65 0a 23 20 63 6f 6d 70 69 6c to the.# compil
6350: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 75 73 er and linker us
6360: 69 6e 67 20 74 68 65 20 6d 61 63 72 6f 73 20 64 ing the macros d
6370: 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 70 72 efined in the pr
6380: 65 76 69 6f 75 73 20 73 65 63 74 69 6f 6e 2e 0a evious section..
6390: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
63a0: 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66 69 6e macros are defin
63b0: 65 64 20 62 79 20 74 68 69 73 20 73 65 63 74 69 ed by this secti
63c0: 6f 6e 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 on based on OPTS
63d0: 0a 23 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 .# STATIC_BUILD
63e0: 2d 20 30 20 2d 3e 20 54 63 6c 20 69 73 20 74 6f - 0 -> Tcl is to
63f0: 20 62 65 20 62 75 69 6c 74 20 61 73 20 61 20 73 be built as a s
6400: 68 61 72 65 64 20 6c 69 62 72 61 72 79 0a 23 20 hared library.#
6410: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 1
6420: 20 2d 3e 20 62 75 69 6c 64 20 61 73 20 61 20 73 -> build as a s
6430: 74 61 74 69 63 20 6c 69 62 72 61 72 79 20 61 6e tatic library an
6440: 64 20 73 68 65 6c 6c 0a 23 20 54 43 4c 5f 54 48 d shell.# TCL_TH
6450: 52 45 41 44 53 20 2d 20 6c 65 67 61 63 79 20 62 READS - legacy b
6460: 75 74 20 61 6c 77 61 79 73 20 31 20 6f 6e 20 57 ut always 1 on W
6470: 69 6e 64 6f 77 73 20 73 69 6e 63 65 20 77 69 6e indows since win
6480: 73 6f 63 6b 20 72 65 71 75 69 72 65 73 20 69 74 sock requires it
6490: 2e 0a 23 20 44 45 42 55 47 20 2d 20 31 20 2d 3e ..# DEBUG - 1 ->
64a0: 20 64 65 62 75 67 20 62 75 69 6c 64 2c 20 30 20 debug build, 0
64b0: 2d 3e 20 72 65 6c 65 61 73 65 20 62 75 69 6c 64 -> release build
64c0: 73 0a 23 20 53 59 4d 42 4f 4c 53 20 2d 20 31 20 s.# SYMBOLS - 1
64d0: 2d 3e 20 67 65 6e 65 72 61 74 65 20 50 44 42 27 -> generate PDB'
64e0: 73 2c 20 30 20 2d 3e 20 6e 6f 20 50 44 42 27 73 s, 0 -> no PDB's
64f0: 0a 23 20 50 52 4f 46 49 4c 45 20 2d 20 31 20 2d .# PROFILE - 1 -
6500: 3e 20 67 65 6e 65 72 61 74 65 20 70 72 6f 66 69 > generate profi
6510: 6c 69 6e 67 20 69 6e 66 6f 2c 20 30 20 2d 3e 20 ling info, 0 ->
6520: 6e 6f 20 70 72 6f 66 69 6c 69 6e 67 0a 23 20 50 no profiling.# P
6530: 47 4f 20 20 20 20 20 2d 20 31 20 2d 3e 20 70 72 GO - 1 -> pr
6540: 6f 66 69 6c 65 20 62 61 73 65 64 20 6f 70 74 69 ofile based opti
6550: 6d 69 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e 20 6e mization, 0 -> n
6560: 6f 0a 23 20 4d 53 56 43 52 54 20 20 2d 20 31 20 o.# MSVCRT - 1
6570: 2d 3e 20 6c 69 6e 6b 20 74 6f 20 64 79 6e 61 6d -> link to dynam
6580: 69 63 20 43 20 72 75 6e 74 69 6d 65 20 65 76 65 ic C runtime eve
6590: 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 n when building
65a0: 73 74 61 74 69 63 20 54 63 6c 20 62 75 69 6c 64 static Tcl build
65b0: 0a 23 20 20 20 20 20 20 20 20 20 20 20 30 20 2d .# 0 -
65c0: 3e 20 6c 69 6e 6b 20 74 6f 20 73 74 61 74 69 63 > link to static
65d0: 20 43 20 72 75 6e 74 69 6d 65 20 66 6f 72 20 73 C runtime for s
65e0: 74 61 74 69 63 20 54 63 6c 20 62 75 69 6c 64 2e tatic Tcl build.
65f0: 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 6f 65 .# Doe
6600: 73 20 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 61 s not impact sha
6610: 72 65 64 20 54 63 6c 20 62 75 69 6c 64 73 20 28 red Tcl builds (
6620: 53 54 41 54 49 43 5f 42 55 49 4c 44 20 3d 3d 20 STATIC_BUILD ==
6630: 30 29 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 0).# D
6640: 65 66 61 75 6c 74 3a 20 31 20 66 6f 72 20 54 63 efault: 1 for Tc
6650: 6c 20 38 2e 37 20 61 6e 64 20 75 70 2c 20 30 20 l 8.7 and up, 0
6660: 6f 74 68 65 72 77 69 73 65 2e 0a 23 20 54 43 4c otherwise..# TCL
6670: 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 4b _USE_STATIC_PACK
6680: 41 47 45 53 20 2d 20 31 20 2d 3e 20 73 74 61 74 AGES - 1 -> stat
6690: 69 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 68 65 20 ically link the
66a0: 72 65 67 69 73 74 72 79 20 61 6e 64 20 64 64 65 registry and dde
66b0: 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 20 20 extensions.#
66c0: 20 20 20 20 20 20 20 20 69 6e 20 74 68 65 20 54 in the T
66d0: 63 6c 20 61 6e 64 20 57 69 73 68 20 73 68 65 6c cl and Wish shel
66e0: 6c 2e 20 30 20 2d 3e 20 6b 65 65 70 20 74 68 65 l. 0 -> keep the
66f0: 6d 20 61 73 20 73 68 61 72 65 64 20 6c 69 62 72 m as shared libr
6700: 61 72 69 65 73 2e 20 44 6f 65 73 0a 23 20 20 20 aries. Does.#
6710: 20 20 20 20 20 20 20 20 6e 6f 74 20 69 6d 70 61 not impa
6720: 63 74 20 73 68 61 72 65 64 20 54 63 6c 20 62 75 ct shared Tcl bu
6730: 69 6c 64 73 2e 20 49 6d 70 6c 69 65 64 20 62 79 ilds. Implied by
6740: 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 73 69 STATIC_BUILD si
6750: 6e 63 65 20 54 63 6c 20 38 2e 37 2e 0a 23 20 55 nce Tcl 8.7..# U
6760: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 SE_THREAD_ALLOC
6770: 2d 20 31 20 2d 3e 20 55 73 65 20 61 20 73 68 61 - 1 -> Use a sha
6780: 72 65 64 20 67 6c 6f 62 61 6c 20 66 72 65 65 20 red global free
6790: 70 6f 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 61 74 pool for allocat
67a0: 69 6f 6e 2e 0a 23 20 20 20 20 20 20 20 20 20 20 ion..#
67b0: 20 30 20 2d 3e 20 55 73 65 20 74 68 65 20 6e 6f 0 -> Use the no
67c0: 6e 2d 74 68 72 65 61 64 20 61 6c 6c 6f 63 61 74 n-thread allocat
67d0: 6f 72 2e 0a 23 20 55 4e 43 48 45 43 4b 45 44 20 or..# UNCHECKED
67e0: 2d 20 31 20 2d 3e 20 77 68 65 6e 20 64 6f 69 6e - 1 -> when doin
67f0: 67 20 61 20 64 65 62 75 67 20 62 75 69 6c 64 20 g a debug build
6800: 77 69 74 68 20 73 79 6d 62 6f 6c 73 2c 20 75 73 with symbols, us
6810: 65 20 74 68 65 20 72 65 6c 65 61 73 65 0a 23 20 e the release.#
6820: 20 20 20 20 20 20 20 20 20 20 43 20 72 75 6e 74 C runt
6830: 69 6d 65 2c 20 30 20 2d 3e 20 75 73 65 20 74 68 ime, 0 -> use th
6840: 65 20 64 65 62 75 67 20 43 20 72 75 6e 74 69 6d e debug C runtim
6850: 65 2e 0a 23 20 55 53 45 5f 53 54 55 42 53 20 2d e..# USE_STUBS -
6860: 20 31 20 2d 3e 20 63 6f 6d 70 69 6c 65 20 74 6f 1 -> compile to
6870: 20 75 73 65 20 73 74 75 62 73 20 69 6e 74 65 72 use stubs inter
6880: 66 61 63 65 73 2c 20 30 20 2d 3e 20 64 69 72 65 faces, 0 -> dire
6890: 63 74 20 6c 69 6e 6b 69 6e 67 0a 23 20 43 4f 4e ct linking.# CON
68a0: 46 49 47 5f 43 48 45 43 4b 20 2d 20 31 20 2d 3e FIG_CHECK - 1 ->
68b0: 20 63 68 65 63 6b 20 63 75 72 72 65 6e 74 20 62 check current b
68c0: 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 uild configurati
68d0: 6f 6e 20 61 67 61 69 6e 73 74 20 54 63 6c 0a 23 on against Tcl.#
68e0: 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 66 69 confi
68f0: 67 75 72 61 74 69 6f 6e 20 28 69 67 6e 6f 72 65 guration (ignore
6900: 64 20 66 6f 72 20 54 63 6c 20 69 74 73 65 6c 66 d for Tcl itself
6910: 29 0a 23 20 5f 55 53 45 5f 36 34 42 49 54 5f 54 ).# _USE_64BIT_T
6920: 49 4d 45 5f 54 20 2d 20 66 6f 72 63 65 73 20 61 IME_T - forces a
6930: 20 62 75 69 6c 64 20 75 73 69 6e 67 20 36 34 2d build using 64-
6940: 62 69 74 20 74 69 6d 65 5f 74 20 66 6f 72 20 33 bit time_t for 3
6950: 32 2d 62 69 74 20 62 75 69 6c 64 0a 23 20 20 20 2-bit build.#
6960: 20 20 20 20 20 20 20 20 28 43 52 54 20 6c 69 62 (CRT lib
6970: 72 61 72 79 20 73 68 6f 75 6c 64 20 73 75 70 70 rary should supp
6980: 6f 72 74 20 74 68 69 73 2c 20 6e 6f 74 20 6e 65 ort this, not ne
6990: 65 64 65 64 20 66 6f 72 20 54 63 6c 20 39 2e 78 eded for Tcl 9.x
69a0: 29 0a 23 20 54 43 4c 5f 55 54 46 5f 4d 41 58 3d ).# TCL_UTF_MAX=
69b0: 33 20 2d 20 66 6f 72 63 65 73 20 61 20 62 75 69 3 - forces a bui
69c0: 6c 64 20 75 73 69 6e 67 20 55 54 46 2d 31 36 20 ld using UTF-16
69d0: 69 6e 74 65 72 6e 61 6c 6c 79 20 28 6e 6f 74 20 internally (not
69e0: 72 65 63 6f 6d 6d 65 6e 64 65 64 29 2e 0a 23 20 recommended)..#
69f0: 46 75 72 74 68 65 72 2c 20 4c 49 4e 4b 45 52 46 Further, LINKERF
6a00: 4c 41 47 53 20 61 72 65 20 6d 6f 64 69 66 69 65 LAGS are modifie
6a10: 64 20 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 d based on above
6a20: 2e 0a 0a 23 20 44 65 66 61 75 6c 74 20 76 61 6c ...# Default val
6a30: 75 65 73 20 66 6f 72 20 61 6c 6c 20 74 68 65 20 ues for all the
6a40: 61 62 6f 76 65 0a 53 54 41 54 49 43 5f 42 55 49 above.STATIC_BUI
6a50: 4c 44 09 3d 20 30 0a 54 43 4c 5f 54 48 52 45 41 LD.= 0.TCL_THREA
6a60: 44 53 09 3d 20 31 0a 44 45 42 55 47 09 09 3d 20 DS.= 1.DEBUG..=
6a70: 30 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 50 0.SYMBOLS..= 0.P
6a80: 52 4f 46 49 4c 45 09 09 3d 20 30 0a 50 47 4f 09 ROFILE..= 0.PGO.
6a90: 09 3d 20 30 0a 4d 53 56 43 52 54 09 09 3d 20 31 .= 0.MSVCRT..= 1
6aa0: 0a 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f .TCL_USE_STATIC_
6ab0: 50 41 43 4b 41 47 45 53 09 3d 20 30 0a 55 53 45 PACKAGES.= 0.USE
6ac0: 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 _THREAD_ALLOC =
6ad0: 31 0a 55 4e 43 48 45 43 4b 45 44 09 3d 20 30 0a 1.UNCHECKED.= 0.
6ae0: 43 4f 4e 46 49 47 5f 43 48 45 43 4b 20 20 20 20 CONFIG_CHECK
6af0: 3d 20 31 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f = 1.!if $(DOING_
6b00: 54 43 4c 29 0a 55 53 45 5f 53 54 55 42 53 20 20 TCL).USE_STUBS
6b10: 20 20 20 20 20 3d 20 30 0a 21 65 6c 73 65 0a 55 = 0.!else.U
6b20: 53 45 5f 53 54 55 42 53 20 20 20 20 20 20 20 3d SE_STUBS =
6b30: 20 31 0a 21 65 6e 64 69 66 0a 0a 23 20 49 66 20 1.!endif..# If
6b40: 4f 50 54 53 20 69 73 20 6e 6f 74 20 65 6d 70 74 OPTS is not empt
6b50: 79 20 41 4e 44 20 64 6f 65 73 20 6e 6f 74 20 63 y AND does not c
6b60: 6f 6e 74 61 69 6e 20 22 6e 6f 6e 65 22 20 77 68 ontain "none" wh
6b70: 69 63 68 20 74 75 72 6e 73 20 6f 66 66 20 61 6c ich turns off al
6b80: 6c 20 4f 50 54 53 0a 23 20 73 65 74 20 74 68 65 l OPTS.# set the
6b90: 20 61 62 6f 76 65 20 6d 61 63 72 6f 73 20 62 61 above macros ba
6ba0: 73 65 64 20 6f 6e 20 4f 50 54 53 20 63 6f 6e 74 sed on OPTS cont
6bb0: 65 6e 74 0a 21 69 66 20 22 24 28 4f 50 54 53 29 ent.!if "$(OPTS)
6bc0: 22 20 21 3d 20 22 22 20 26 26 20 21 5b 6e 6d 61 " != "" && ![nma
6bd0: 6b 65 68 6c 70 20 2d 66 20 22 24 28 4f 50 54 53 kehlp -f "$(OPTS
6be0: 29 22 20 22 6e 6f 6e 65 22 5d 0a 0a 23 20 4f 50 )" "none"]..# OP
6bf0: 54 53 20 61 72 65 20 73 70 65 63 69 66 69 65 64 TS are specified
6c00: 2c 20 70 61 72 73 65 20 74 68 65 6d 0a 0a 21 69 , parse them..!i
6c10: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
6c20: 28 4f 50 54 53 29 20 22 73 74 61 74 69 63 22 5d (OPTS) "static"]
6c30: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f .!message *** Do
6c40: 69 6e 67 20 73 74 61 74 69 63 0a 53 54 41 54 49 ing static.STATI
6c50: 43 5f 42 55 49 4c 44 09 3d 20 31 0a 21 65 6e 64 C_BUILD.= 1.!end
6c60: 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c if..!if [nmakehl
6c70: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f p -f $(OPTS) "no
6c80: 73 74 75 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 stubs"].!message
6c90: 20 2a 2a 2a 20 4e 6f 74 20 75 73 69 6e 67 20 73 *** Not using s
6ca0: 74 75 62 73 0a 55 53 45 5f 53 54 55 42 53 09 3d tubs.USE_STUBS.=
6cb0: 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 0.!endif..!if [
6cc0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 nmakehlp -f $(OP
6cd0: 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 22 5d 0a TS) "nomsvcrt"].
6ce0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 !message *** Doi
6cf0: 6e 67 20 6e 6f 6d 73 76 63 72 74 0a 4d 53 56 43 ng nomsvcrt.MSVC
6d00: 52 54 09 09 3d 20 30 0a 21 65 6c 73 65 0a 21 69 RT..= 0.!else.!i
6d10: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
6d20: 28 4f 50 54 53 29 20 22 6d 73 76 63 72 74 22 5d (OPTS) "msvcrt"]
6d30: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f .!message *** Do
6d40: 69 6e 67 20 6d 73 76 63 72 74 0a 21 65 6c 73 65 ing msvcrt.!else
6d50: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
6d60: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 26 _VERSION) == 8 &
6d70: 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 & $(TCL_MINOR_VE
6d80: 52 53 49 4f 4e 29 20 3c 20 37 20 26 26 20 24 28 RSION) < 7 && $(
6d90: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 4d 53 STATIC_BUILD).MS
6da0: 56 43 52 54 09 09 3d 20 30 0a 21 65 6e 64 69 66 VCRT..= 0.!endif
6db0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
6dc0: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
6dd0: 4f 50 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 22 OPTS) "nomsvcrt"
6de0: 5d 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ]..!if [nmakehlp
6df0: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 -f $(OPTS) "sta
6e00: 74 69 63 70 6b 67 22 5d 20 26 26 20 24 28 53 54 ticpkg"] && $(ST
6e10: 41 54 49 43 5f 42 55 49 4c 44 29 0a 21 6d 65 73 ATIC_BUILD).!mes
6e20: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 73 sage *** Doing s
6e30: 74 61 74 69 63 70 6b 67 0a 54 43 4c 5f 55 53 45 taticpkg.TCL_USE
6e40: 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 _STATIC_PACKAGES
6e50: 09 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 .= 1.!endif..!if
6e60: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
6e70: 4f 50 54 53 29 20 22 6e 6f 74 68 72 65 61 64 73 OPTS) "nothreads
6e80: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
6e90: 43 6f 6d 70 69 6c 65 20 65 78 70 6c 69 63 69 74 Compile explicit
6ea0: 6c 79 20 66 6f 72 20 6e 6f 6e 2d 74 68 72 65 61 ly for non-threa
6eb0: 64 65 64 20 74 63 6c 0a 54 43 4c 5f 54 48 52 45 ded tcl.TCL_THRE
6ec0: 41 44 53 20 3d 20 30 0a 55 53 45 5f 54 48 52 45 ADS = 0.USE_THRE
6ed0: 41 44 5f 41 4c 4c 4f 43 3d 20 30 0a 21 65 6e 64 AD_ALLOC= 0.!end
6ee0: 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c if..!if [nmakehl
6ef0: 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 74 63 p -f $(OPTS) "tc
6f00: 6c 38 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a l8"].!message **
6f10: 2a 20 42 75 69 6c 64 20 66 6f 72 20 54 63 6c 38 * Build for Tcl8
6f20: 0a 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 20 3d .TCL_BUILD_FOR =
6f30: 20 38 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 8.!endif..!if $
6f40: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
6f50: 4f 4e 29 20 3d 3d 20 38 0a 21 69 66 20 5b 6e 6d ON) == 8.!if [nm
6f60: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
6f70: 29 20 22 74 69 6d 65 36 34 62 69 74 22 5d 0a 21 ) "time64bit"].!
6f80: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 46 6f 72 63 message *** Forc
6f90: 65 20 36 34 2d 62 69 74 20 74 69 6d 65 5f 74 0a e 64-bit time_t.
6fa0: 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f _USE_64BIT_TIME_
6fb0: 54 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 T = 1.!endif..!i
6fc0: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
6fd0: 28 4f 50 54 53 29 20 22 75 74 66 31 36 22 5d 0a (OPTS) "utf16"].
6fe0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 46 6f 72 !message *** For
6ff0: 63 65 20 55 54 46 2d 31 36 20 69 6e 74 65 72 6e ce UTF-16 intern
7000: 61 6c 6c 79 0a 54 43 4c 5f 55 54 46 5f 4d 41 58 ally.TCL_UTF_MAX
7010: 20 3d 20 33 0a 21 65 6e 64 69 66 0a 21 65 6e 64 = 3.!endif.!end
7020: 69 66 0a 0a 23 20 59 65 73 2c 20 69 74 27 73 20 if..# Yes, it's
7030: 77 65 69 72 64 20 74 68 61 74 20 74 68 65 20 22 weird that the "
7040: 73 79 6d 62 6f 6c 73 22 20 6f 70 74 69 6f 6e 20 symbols" option
7050: 63 6f 6e 74 72 6f 6c 73 20 44 45 42 55 47 20 61 controls DEBUG a
7060: 6e 64 0a 23 20 74 68 65 20 22 70 64 62 73 22 20 nd.# the "pdbs"
7070: 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 option controls
7080: 53 59 4d 42 4f 4c 53 2e 20 54 68 61 74 27 73 20 SYMBOLS. That's
7090: 68 69 73 74 6f 72 69 63 61 6c 2e 0a 21 69 66 20 historical..!if
70a0: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
70b0: 50 54 53 29 20 22 73 79 6d 62 6f 6c 73 22 5d 0a PTS) "symbols"].
70c0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 !message *** Doi
70d0: 6e 67 20 73 79 6d 62 6f 6c 73 0a 44 45 42 55 47 ng symbols.DEBUG
70e0: 09 09 3d 20 31 0a 21 65 6c 73 65 0a 44 45 42 55 ..= 1.!else.DEBU
70f0: 47 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 G..= 0.!endif..!
7100: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
7110: 24 28 4f 50 54 53 29 20 22 70 64 62 73 22 5d 0a $(OPTS) "pdbs"].
7120: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 !message *** Doi
7130: 6e 67 20 70 64 62 73 0a 53 59 4d 42 4f 4c 53 09 ng pdbs.SYMBOLS.
7140: 09 3d 20 31 0a 21 65 6c 73 65 0a 53 59 4d 42 4f .= 1.!else.SYMBO
7150: 4c 53 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a LS..= 0.!endif..
7160: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7170: 20 24 28 4f 50 54 53 29 20 22 70 72 6f 66 69 6c $(OPTS) "profil
7180: 65 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a e"].!message ***
7190: 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 0a 50 Doing profile.P
71a0: 52 4f 46 49 4c 45 09 09 3d 20 31 0a 21 65 6c 73 ROFILE..= 1.!els
71b0: 65 0a 50 52 4f 46 49 4c 45 09 09 3d 20 30 0a 21 e.PROFILE..= 0.!
71c0: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
71d0: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
71e0: 22 70 67 69 22 5d 0a 21 6d 65 73 73 61 67 65 20 "pgi"].!message
71f0: 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c *** Doing profil
7200: 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a e guided optimiz
7210: 61 74 69 6f 6e 20 69 6e 73 74 72 75 6d 65 6e 74 ation instrument
7220: 61 74 69 6f 6e 0a 50 47 4f 09 09 3d 20 31 0a 21 ation.PGO..= 1.!
7230: 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 elseif [nmakehlp
7240: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 67 6f -f $(OPTS) "pgo
7250: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
7260: 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20 67 75 Doing profile gu
7270: 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f ided optimizatio
7280: 6e 0a 50 47 4f 09 09 3d 20 32 0a 21 65 6c 73 65 n.PGO..= 2.!else
7290: 0a 50 47 4f 09 09 3d 20 30 0a 21 65 6e 64 69 66 .PGO..= 0.!endif
72a0: 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
72b0: 2d 66 20 24 28 4f 50 54 53 29 20 22 6c 6f 69 6d -f $(OPTS) "loim
72c0: 70 61 63 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 pact"].!message
72d0: 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 69 67 6e *** Warning: ign
72e0: 6f 72 69 6e 67 20 6f 70 74 69 6f 6e 20 22 6c 6f oring option "lo
72f0: 69 6d 70 61 63 74 22 20 2d 20 64 65 70 72 65 63 impact" - deprec
7300: 61 74 65 64 20 6f 6e 20 6d 6f 64 65 72 6e 20 57 ated on modern W
7310: 69 6e 64 6f 77 73 2e 0a 21 65 6e 64 69 66 0a 0a indows..!endif..
7320: 23 20 54 42 44 20 2d 20 73 68 6f 75 6c 64 20 67 # TBD - should g
7330: 65 74 20 72 69 64 20 6f 66 20 74 68 69 73 20 6f et rid of this o
7340: 70 74 69 6f 6e 0a 21 69 66 20 5b 6e 6d 61 6b 65 ption.!if [nmake
7350: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
7360: 74 68 72 64 61 6c 6c 6f 63 22 5d 0a 21 6d 65 73 thrdalloc"].!mes
7370: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 74 sage *** Doing t
7380: 68 72 64 61 6c 6c 6f 63 0a 55 53 45 5f 54 48 52 hrdalloc.USE_THR
7390: 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 31 0a 21 65 EAD_ALLOC = 1.!e
73a0: 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 ndif..!if [nmake
73b0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
73c0: 74 63 6c 61 6c 6c 6f 63 22 5d 0a 55 53 45 5f 54 tclalloc"].USE_T
73d0: 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 30 0a HREAD_ALLOC = 0.
73e0: 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 !endif..!if [nma
73f0: 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 kehlp -f $(OPTS)
7400: 20 22 75 6e 63 68 65 63 6b 65 64 22 5d 0a 21 6d "unchecked"].!m
7410: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7420: 20 75 6e 63 68 65 63 6b 65 64 0a 55 4e 43 48 45 unchecked.UNCHE
7430: 43 4b 45 44 20 3d 20 31 0a 21 65 6c 73 65 0a 55 CKED = 1.!else.U
7440: 4e 43 48 45 43 4b 45 44 20 3d 20 30 0a 21 65 6e NCHECKED = 0.!en
7450: 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 dif..!if [nmakeh
7460: 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e lp -f $(OPTS) "n
7470: 6f 63 6f 6e 66 69 67 63 68 65 63 6b 22 5d 0a 43 oconfigcheck"].C
7480: 4f 4e 46 49 47 5f 43 48 45 43 4b 20 3d 20 31 0a ONFIG_CHECK = 1.
7490: 21 65 6c 73 65 0a 43 4f 4e 46 49 47 5f 43 48 45 !else.CONFIG_CHE
74a0: 43 4b 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 CK = 0.!endif..!
74b0: 65 6e 64 69 66 20 23 20 22 24 28 4f 50 54 53 29 endif # "$(OPTS)
74c0: 22 20 21 3d 20 22 22 20 20 26 26 20 2e 2e 2e 20 " != "" && ...
74d0: 70 61 72 73 69 6e 67 20 6f 66 20 4f 50 54 53 0a parsing of OPTS.
74e0: 0a 23 20 53 65 74 20 6c 69 6e 6b 65 72 20 66 6c .# Set linker fl
74f0: 61 67 73 20 62 61 73 65 64 20 6f 6e 20 61 62 6f ags based on abo
7500: 76 65 0a 0a 21 69 66 20 24 28 50 47 4f 29 20 3e ve..!if $(PGO) >
7510: 20 31 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 1.!if [nmakehlp
7520: 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 6f 70 74 69 -l -ltcg:pgopti
7530: 6d 69 7a 65 20 24 28 4c 49 4e 4b 45 52 5f 54 45 mize $(LINKER_TE
7540: 53 54 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 STFLAGS)].LINKER
7550: 46 4c 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 52 FLAGS.= $(LINKER
7560: 46 4c 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c FLAGS:-ltcg=) -l
7570: 74 63 67 3a 70 67 6f 70 74 69 6d 69 7a 65 0a 21 tcg:pgoptimize.!
7580: 65 6c 73 65 0a 4d 53 47 3d 5e 0a 54 68 69 73 20 else.MSG=^.This
7590: 63 6f 6d 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f compiler does no
75a0: 74 20 73 75 70 70 6f 72 74 20 70 72 6f 66 69 6c t support profil
75b0: 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a e guided optimiz
75c0: 61 74 69 6f 6e 2e 0a 21 65 72 72 6f 72 20 24 28 ation..!error $(
75d0: 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 6c 73 MSG).!endif.!els
75e0: 65 69 66 20 24 28 50 47 4f 29 20 3e 20 30 0a 21 eif $(PGO) > 0.!
75f0: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 6c 20 if [nmakehlp -l
7600: 2d 6c 74 63 67 3a 70 67 69 6e 73 74 72 75 6d 65 -ltcg:pginstrume
7610: 6e 74 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 nt $(LINKER_TEST
7620: 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c FLAGS)].LINKERFL
7630: 41 47 53 09 3d 20 24 28 4c 49 4e 4b 45 52 46 4c AGS.= $(LINKERFL
7640: 41 47 53 3a 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 AGS:-ltcg=) -ltc
7650: 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 0a 21 g:pginstrument.!
7660: 65 6c 73 65 0a 4d 53 47 3d 5e 0a 54 68 69 73 20 else.MSG=^.This
7670: 63 6f 6d 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f compiler does no
7680: 74 20 73 75 70 70 6f 72 74 20 70 72 6f 66 69 6c t support profil
7690: 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d 69 7a e guided optimiz
76a0: 61 74 69 6f 6e 2e 0a 21 65 72 72 6f 72 20 24 28 ation..!error $(
76b0: 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 MSG).!endif.!end
76c0: 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 if..############
76d0: 23 23 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 0a 23 20 38 2e 20 50 61 72 73 65 20 ####.# 8. Parse
7710: 74 68 65 20 53 54 41 54 53 20 6d 61 63 72 6f 20 the STATS macro
7720: 74 6f 20 63 6f 6e 66 69 67 75 72 65 20 63 6f 64 to configure cod
7730: 65 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f e instrumentatio
7740: 6e 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e n.# The followin
7750: 67 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 g macros are set
7760: 20 62 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e by this section
7770: 3a 0a 23 20 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 :.# TCL_MEM_DEBU
7780: 47 20 2d 20 31 20 2d 3e 20 65 6e 61 62 6c 65 73 G - 1 -> enables
7790: 20 6d 65 6d 6f 72 79 20 61 6c 6c 6f 63 61 74 69 memory allocati
77a0: 6f 6e 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 on instrumentati
77b0: 6f 6e 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 on.#
77c0: 20 20 20 20 20 30 20 2d 3e 20 64 69 73 61 62 6c 0 -> disabl
77d0: 65 73 0a 23 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 es.# TCL_COMPILE
77e0: 5f 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e _DEBUG - 1 -> en
77f0: 61 62 6c 65 73 20 62 79 74 65 20 63 6f 6d 70 69 ables byte compi
7800: 6c 65 72 20 6c 6f 67 67 69 6e 67 0a 23 20 20 20 ler logging.#
7810: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7820: 20 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0a 0 -> disables.
7830: 0a 23 20 44 65 66 61 75 6c 74 20 62 6f 74 68 20 .# Default both
7840: 61 72 65 20 6f 66 66 0a 54 43 4c 5f 4d 45 4d 5f are off.TCL_MEM_
7850: 44 45 42 55 47 09 20 20 20 20 3d 20 30 0a 54 43 DEBUG. = 0.TC
7860: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 L_COMPILE_DEBUG
7870: 20 20 3d 20 30 0a 0a 21 69 66 20 22 24 28 53 54 = 0..!if "$(ST
7880: 41 54 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 ATS)" != "" && !
7890: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 [nmakehlp -f "$(
78a0: 53 54 41 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0a STATS)" "none"].
78b0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
78c0: 66 20 24 28 53 54 41 54 53 29 20 22 6d 65 6d 64 f $(STATS) "memd
78d0: 62 67 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a bg"].!message **
78e0: 2a 20 44 6f 69 6e 67 20 6d 65 6d 64 62 67 0a 54 * Doing memdbg.T
78f0: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 CL_MEM_DEBUG.
7900: 20 3d 20 31 0a 21 65 6c 73 65 0a 54 43 4c 5f 4d = 1.!else.TCL_M
7910: 45 4d 5f 44 45 42 55 47 09 20 20 20 20 3d 20 30 EM_DEBUG. = 0
7920: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
7930: 61 6b 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 akehlp -f $(STAT
7940: 53 29 20 22 63 6f 6d 70 64 62 67 22 5d 0a 21 6d S) "compdbg"].!m
7950: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7960: 20 63 6f 6d 70 64 62 67 0a 54 43 4c 5f 43 4f 4d compdbg.TCL_COM
7970: 50 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 31 PILE_DEBUG = 1
7980: 0a 21 65 6c 73 65 0a 54 43 4c 5f 43 4f 4d 50 49 .!else.TCL_COMPI
7990: 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 30 0a 21 LE_DEBUG = 0.!
79a0: 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 0a 0a 23 endif..!endif..#
79b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 39 2e 20 50 61 72 73 65 20 74 ###.# 9. Parse t
7a00: 68 65 20 43 48 45 43 4b 53 20 6d 61 63 72 6f 20 he CHECKS macro
7a10: 74 6f 20 63 6f 6e 66 69 67 75 72 65 20 61 64 64 to configure add
7a20: 69 74 69 6f 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 itional compiler
7a30: 20 63 68 65 63 6b 73 0a 23 20 54 68 65 20 66 6f checks.# The fo
7a40: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 llowing macros a
7a50: 72 65 20 73 65 74 20 62 79 20 74 68 69 73 20 73 re set by this s
7a60: 65 63 74 69 6f 6e 3a 0a 23 20 57 41 52 4e 49 4e ection:.# WARNIN
7a70: 47 53 20 2d 20 63 6f 6d 70 69 6c 65 72 20 73 77 GS - compiler sw
7a80: 69 74 63 68 65 73 20 74 68 61 74 20 63 6f 6e 74 itches that cont
7a90: 72 6f 6c 20 74 68 65 20 77 61 72 6e 69 6e 67 73 rol the warnings
7aa0: 20 6c 65 76 65 6c 0a 23 20 54 43 4c 5f 4e 4f 5f level.# TCL_NO_
7ab0: 44 45 50 52 45 43 41 54 45 44 20 2d 20 31 20 2d DEPRECATED - 1 -
7ac0: 3e 20 64 69 73 61 62 6c 65 20 73 75 70 70 6f 72 > disable suppor
7ad0: 74 20 66 6f 72 20 64 65 70 72 65 63 61 74 65 64 t for deprecated
7ae0: 20 66 75 6e 63 74 69 6f 6e 73 0a 23 20 20 20 20 functions.#
7af0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7b00: 20 30 20 2d 3e 20 65 6e 61 62 6c 65 20 64 65 70 0 -> enable dep
7b10: 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e recated function
7b20: 73 0a 0a 23 20 44 65 66 61 75 6c 74 73 20 2d 20 s..# Defaults -
7b30: 50 65 72 6d 69 74 20 64 65 70 72 65 63 61 74 65 Permit deprecate
7b40: 64 20 66 75 6e 63 74 69 6f 6e 73 20 61 6e 64 20 d functions and
7b50: 77 61 72 6e 69 6e 67 20 6c 65 76 65 6c 20 33 0a warning level 3.
7b60: 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 TCL_NO_DEPRECATE
7b70: 44 09 20 20 20 20 3d 20 30 0a 57 41 52 4e 49 4e D. = 0.WARNIN
7b80: 47 53 09 09 20 20 20 20 3d 20 2d 57 33 0a 0a 21 GS.. = -W3..!
7b90: 69 66 20 22 24 28 43 48 45 43 4b 53 29 22 20 21 if "$(CHECKS)" !
7ba0: 3d 20 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 = "" && ![nmakeh
7bb0: 6c 70 20 2d 66 20 22 24 28 43 48 45 43 4b 53 29 lp -f "$(CHECKS)
7bc0: 22 20 22 6e 6f 6e 65 22 5d 0a 0a 21 69 66 20 5b " "none"]..!if [
7bd0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 nmakehlp -f $(CH
7be0: 45 43 4b 53 29 20 22 6e 6f 64 65 70 22 5d 0a 21 ECKS) "nodep"].!
7bf0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e message *** Doin
7c00: 67 20 6e 6f 64 65 70 20 63 68 65 63 6b 0a 54 43 g nodep check.TC
7c10: 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 L_NO_DEPRECATED.
7c20: 20 20 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a = 1.!endif..
7c30: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7c40: 20 24 28 43 48 45 43 4b 53 29 20 22 66 75 6c 6c $(CHECKS) "full
7c50: 77 61 72 6e 22 5d 0a 21 6d 65 73 73 61 67 65 20 warn"].!message
7c60: 2a 2a 2a 20 44 6f 69 6e 67 20 66 75 6c 6c 20 77 *** Doing full w
7c70: 61 72 6e 69 6e 67 73 20 63 68 65 63 6b 0a 57 41 arnings check.WA
7c80: 52 4e 49 4e 47 53 09 09 20 20 20 20 3d 20 2d 57 RNINGS.. = -W
7c90: 34 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 4.!if [nmakehlp
7ca0: 2d 6c 20 2d 77 61 72 6e 3a 33 20 24 28 4c 49 4e -l -warn:3 $(LIN
7cb0: 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a KER_TESTFLAGS)].
7cc0: 4c 49 4e 4b 45 52 46 4c 41 47 53 09 09 20 20 20 LINKERFLAGS..
7cd0: 20 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 = $(LINKERFLAGS
7ce0: 29 20 2d 77 61 72 6e 3a 33 0a 21 65 6e 64 69 66 ) -warn:3.!endif
7cf0: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
7d00: 61 6b 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 akehlp -f $(CHEC
7d10: 4b 53 29 20 22 36 34 62 69 74 22 5d 20 26 26 20 KS) "64bit"] &&
7d20: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 57 70 [nmakehlp -c -Wp
7d30: 36 34 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 64].!message ***
7d40: 20 44 6f 69 6e 67 20 36 34 62 69 74 20 70 6f 72 Doing 64bit por
7d50: 74 61 62 69 6c 69 74 79 20 77 61 72 6e 69 6e 67 tability warning
7d60: 73 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 s.WARNINGS..
7d70: 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 20 2d 57 = $(WARNINGS) -W
7d80: 70 36 34 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 p64.!endif..!end
7d90: 69 66 0a 0a 0a 23 23 23 23 23 23 23 23 23 23 23 if...###########
7da0: 23 23 23 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 0a 23 20 31 30 2e 20 43 6f 6e 73 #####.# 10. Cons
7de0: 74 72 75 63 74 20 6f 75 74 70 75 74 20 64 69 72 truct output dir
7df0: 65 63 74 6f 72 79 20 61 6e 64 20 66 69 6c 65 20 ectory and file
7e00: 70 61 74 68 73 0a 23 20 46 69 67 75 72 65 2d 6f paths.# Figure-o
7e10: 75 74 20 68 6f 77 20 74 6f 20 6e 61 6d 65 20 6f ut how to name o
7e20: 75 72 20 69 6e 74 65 72 6d 65 64 69 61 74 65 20 ur intermediate
7e30: 61 6e 64 20 6f 75 74 70 75 74 20 64 69 72 65 63 and output direc
7e40: 74 6f 72 69 65 73 2e 0a 23 20 49 6e 20 6f 72 64 tories..# In ord
7e50: 65 72 20 74 6f 20 61 76 6f 69 64 20 69 6e 61 64 er to avoid inad
7e60: 76 65 72 74 65 6e 74 20 6d 69 78 69 6e 67 20 6f vertent mixing o
7e70: 66 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 62 f object files b
7e80: 75 69 6c 74 20 75 73 69 6e 67 0a 23 20 64 69 66 uilt using.# dif
7e90: 66 65 72 65 6e 74 20 63 6f 6d 70 69 6c 65 72 73 ferent compilers
7ea0: 2c 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 , build configur
7eb0: 61 74 69 6f 6e 73 20 65 74 63 2e 2c 0a 23 0a 23 ations etc.,.#.#
7ec0: 20 4e 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 Naming conventi
7ed0: 6f 6e 20 28 73 75 66 66 69 78 65 73 29 3a 0a 23 on (suffixes):.#
7ee0: 20 20 20 74 20 3d 20 66 75 6c 6c 20 74 68 72 65 t = full thre
7ef0: 61 64 20 73 75 70 70 6f 72 74 2e 20 28 4e 6f 74 ad support. (Not
7f00: 20 75 73 65 64 20 66 6f 72 20 54 63 6c 20 3e 3d used for Tcl >=
7f10: 20 38 2e 37 29 0a 23 20 20 20 73 20 3d 20 73 74 8.7).# s = st
7f20: 61 74 69 63 20 6c 69 62 72 61 72 79 20 28 61 73 atic library (as
7f30: 20 6f 70 70 6f 73 65 64 20 74 6f 20 61 6e 20 69 opposed to an i
7f40: 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 29 0a 23 mport library).#
7f50: 20 20 20 67 20 3d 20 6c 69 6e 6b 65 64 20 74 6f g = linked to
7f60: 20 74 68 65 20 64 65 62 75 67 20 65 6e 61 62 6c the debug enabl
7f70: 65 64 20 43 20 72 75 6e 2d 74 69 6d 65 2e 0a 23 ed C run-time..#
7f80: 20 20 20 78 20 3d 20 73 70 65 63 69 61 6c 20 73 x = special s
7f90: 74 61 74 69 63 20 62 75 69 6c 64 20 77 68 65 6e tatic build when
7fa0: 20 69 74 20 6c 69 6e 6b 73 20 74 6f 20 74 68 65 it links to the
7fb0: 20 64 79 6e 61 6d 69 63 20 43 20 72 75 6e 2d 74 dynamic C run-t
7fc0: 69 6d 65 2e 0a 23 0a 23 20 54 68 65 20 66 6f 6c ime..#.# The fol
7fd0: 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 lowing macros ar
7fe0: 65 20 73 65 74 20 69 6e 20 74 68 69 73 20 73 65 e set in this se
7ff0: 63 74 69 6f 6e 3a 0a 23 20 53 55 46 58 20 2d 20 ction:.# SUFX -
8000: 74 68 65 20 73 75 66 66 69 78 20 74 6f 20 75 73 the suffix to us
8010: 65 20 66 6f 72 20 62 69 6e 61 72 69 65 73 20 62 e for binaries b
8020: 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 20 6e 61 ased on above na
8030: 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e 0a ming convention.
8040: 23 20 42 55 49 4c 44 44 49 52 54 4f 50 20 2d 20 # BUILDDIRTOP -
8050: 74 68 65 20 74 6f 70 6c 65 76 65 6c 20 64 65 66 the toplevel def
8060: 61 75 6c 74 20 6f 75 74 70 75 74 20 64 69 72 65 ault output dire
8070: 63 74 6f 72 79 0a 23 20 20 20 20 20 20 69 73 20 ctory.# is
8080: 6f 66 20 74 68 65 20 66 6f 72 6d 20 7b 52 65 6c of the form {Rel
8090: 65 61 73 65 2c 44 65 62 75 67 7d 5b 5f 41 4d 44 ease,Debug}[_AMD
80a0: 36 34 5d 5b 5f 43 4f 4d 50 49 4c 45 52 56 45 52 64][_COMPILERVER
80b0: 53 49 4f 4e 5d 0a 23 20 54 4d 50 5f 44 49 52 20 SION].# TMP_DIR
80c0: 2d 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 - directory wher
80d0: 65 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 61 e object files a
80e0: 72 65 20 63 72 65 61 74 65 64 0a 23 20 4f 55 54 re created.# OUT
80f0: 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 _DIR - directory
8100: 20 77 68 65 72 65 20 6f 75 74 70 75 74 20 65 78 where output ex
8110: 65 63 75 74 61 62 6c 65 73 20 61 72 65 20 63 72 ecutables are cr
8120: 65 61 74 65 64 0a 23 20 42 6f 74 68 20 54 4d 50 eated.# Both TMP
8130: 5f 44 49 52 20 61 6e 64 20 4f 55 54 5f 44 49 52 _DIR and OUT_DIR
8140: 20 61 72 65 20 64 65 66 61 75 6c 74 65 64 20 6f are defaulted o
8150: 6e 6c 79 20 69 66 20 6e 6f 74 20 64 65 66 69 6e nly if not defin
8160: 65 64 20 62 79 20 74 68 65 0a 23 20 70 61 72 65 ed by the.# pare
8170: 6e 74 20 6d 61 6b 65 66 69 6c 65 20 28 6f 72 20 nt makefile (or
8180: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 29 2e 20 54 command line). T
8190: 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 he default value
81a0: 73 20 61 72 65 0a 23 20 62 61 73 65 64 20 6f 6e s are.# based on
81b0: 20 42 55 49 4c 44 44 49 52 54 4f 50 2e 0a 23 20 BUILDDIRTOP..#
81c0: 53 54 55 42 50 52 45 46 49 58 20 2d 20 6e 61 6d STUBPREFIX - nam
81d0: 65 20 6f 66 20 74 68 65 20 73 74 75 62 73 20 6c e of the stubs l
81e0: 69 62 72 61 72 79 20 66 6f 72 20 74 68 69 73 20 ibrary for this
81f0: 70 72 6f 6a 65 63 74 0a 23 20 50 52 4a 49 4d 50 project.# PRJIMP
8200: 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 61 74 LIB - output pat
8210: 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 h of the generat
8220: 65 64 20 70 72 6f 6a 65 63 74 20 69 6d 70 6f 72 ed project impor
8230: 74 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 4c t library.# PRJL
8240: 49 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 IBNAME - name of
8250: 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 generated proje
8260: 63 74 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a ct library.# PRJ
8270: 4c 49 42 20 20 20 20 20 2d 20 6f 75 74 70 75 74 LIB - output
8280: 20 70 61 74 68 20 6f 66 20 67 65 6e 65 72 61 74 path of generat
8290: 65 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 ed project libra
82a0: 72 79 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 4e ry.# PRJSTUBLIBN
82b0: 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 AME - name of th
82c0: 65 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a e generated proj
82d0: 65 63 74 20 73 74 75 62 73 20 6c 69 62 72 61 72 ect stubs librar
82e0: 79 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 20 2d y.# PRJSTUBLIB -
82f0: 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f 66 20 output path of
8300: 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 70 72 the generated pr
8310: 6f 6a 65 63 74 20 73 74 75 62 73 20 6c 69 62 72 oject stubs libr
8320: 61 72 79 0a 23 20 52 45 53 46 49 4c 45 20 2d 20 ary.# RESFILE -
8330: 6f 75 74 70 75 74 20 72 65 73 6f 75 72 63 65 20 output resource
8340: 66 69 6c 65 20 28 6f 6e 6c 79 20 69 66 20 6e 6f file (only if no
8350: 74 20 73 74 61 74 69 63 20 62 75 69 6c 64 29 0a t static build).
8360: 0a 53 55 46 58 09 20 20 20 20 3d 20 74 73 67 78 .SUFX. = tsgx
8370: 0a 0a 21 69 66 20 24 28 44 45 42 55 47 29 0a 42 ..!if $(DEBUG).B
8380: 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 44 65 62 UILDDIRTOP = Deb
8390: 75 67 0a 21 65 6c 73 65 0a 42 55 49 4c 44 44 49 ug.!else.BUILDDI
83a0: 52 54 4f 50 20 3d 20 52 65 6c 65 61 73 65 0a 21 RTOP = Release.!
83b0: 65 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 4d 41 endif..!if "$(MA
83c0: 43 48 49 4e 45 29 22 20 21 3d 20 22 49 58 38 36 CHINE)" != "IX86
83d0: 22 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 ".BUILDDIRTOP =$
83e0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 24 28 (BUILDDIRTOP)_$(
83f0: 4d 41 43 48 49 4e 45 29 0a 21 65 6e 64 69 66 0a MACHINE).!endif.
8400: 21 69 66 20 24 28 56 43 56 45 52 29 20 3e 20 36 !if $(VCVER) > 6
8410: 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 28 .BUILDDIRTOP =$(
8420: 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 56 43 24 BUILDDIRTOP)_VC$
8430: 28 56 43 56 45 52 29 0a 21 65 6e 64 69 66 0a 0a (VCVER).!endif..
8440: 21 69 66 20 21 24 28 44 45 42 55 47 29 20 7c 7c !if !$(DEBUG) ||
8450: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 $(TCL_VERSION)
8460: 3e 20 38 36 20 7c 7c 20 24 28 44 45 42 55 47 29 > 86 || $(DEBUG)
8470: 20 26 26 20 24 28 55 4e 43 48 45 43 4b 45 44 29 && $(UNCHECKED)
8480: 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 .SUFX. = $(SU
8490: 46 58 3a 67 3d 29 0a 21 65 6e 64 69 66 0a 0a 54 FX:g=).!endif..T
84a0: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 2e 5c 24 MP_DIRFULL = .\$
84b0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 (BUILDDIRTOP)\$(
84c0: 50 52 4f 4a 45 43 54 29 5f 54 68 72 65 61 64 65 PROJECT)_Threade
84d0: 64 44 79 6e 61 6d 69 63 53 74 61 74 69 63 58 0a dDynamicStaticX.
84e0: 0a 21 69 66 20 21 24 28 53 54 41 54 49 43 5f 42 .!if !$(STATIC_B
84f0: 55 49 4c 44 29 0a 54 4d 50 5f 44 49 52 46 55 4c UILD).TMP_DIRFUL
8500: 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c L = $(TMP_DIRFUL
8510: 4c 3a 53 74 61 74 69 63 3d 29 0a 53 55 46 58 09 L:Static=).SUFX.
8520: 20 20 20 20 3d 20 24 28 53 55 46 58 3a 73 3d 29 = $(SUFX:s=)
8530: 0a 45 58 54 09 20 20 20 20 3d 20 64 6c 6c 0a 54 .EXT. = dll.T
8540: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
8550: 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a 53 MP_DIRFULL:X=).S
8560: 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 UFX. = $(SUFX
8570: 3a 78 3d 29 0a 21 65 6c 73 65 0a 54 4d 50 5f 44 :x=).!else.TMP_D
8580: 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f 44 IRFULL = $(TMP_D
8590: 49 52 46 55 4c 4c 3a 44 79 6e 61 6d 69 63 3d 29 IRFULL:Dynamic=)
85a0: 0a 45 58 54 09 20 20 20 20 3d 20 6c 69 62 0a 21 .EXT. = lib.!
85b0: 69 66 20 21 24 28 4d 53 56 43 52 54 29 0a 54 4d if !$(MSVCRT).TM
85c0: 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d P_DIRFULL = $(TM
85d0: 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a 53 55 P_DIRFULL:X=).SU
85e0: 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a FX. = $(SUFX:
85f0: 78 3d 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 x=).!endif.!endi
8600: 66 0a 0a 21 69 66 20 21 24 28 54 43 4c 5f 54 48 f..!if !$(TCL_TH
8610: 52 45 41 44 53 29 20 7c 7c 20 24 28 54 43 4c 5f READS) || $(TCL_
8620: 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0a 54 4d VERSION) > 86.TM
8630: 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d P_DIRFULL = $(TM
8640: 50 5f 44 49 52 46 55 4c 4c 3a 54 68 72 65 61 64 P_DIRFULL:Thread
8650: 65 64 3d 29 0a 53 55 46 58 09 20 20 20 20 3d 20 ed=).SUFX. =
8660: 24 28 53 55 46 58 3a 74 3d 29 0a 21 65 6e 64 69 $(SUFX:t=).!endi
8670: 66 0a 0a 21 69 66 6e 64 65 66 20 54 4d 50 5f 44 f..!ifndef TMP_D
8680: 49 52 0a 54 4d 50 5f 44 49 52 09 20 20 20 20 3d IR.TMP_DIR. =
8690: 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 29 0a $(TMP_DIRFULL).
86a0: 21 69 66 6e 64 65 66 20 4f 55 54 5f 44 49 52 0a !ifndef OUT_DIR.
86b0: 4f 55 54 5f 44 49 52 09 20 20 20 20 3d 20 2e 5c OUT_DIR. = .\
86c0: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 0a 21 $(BUILDDIRTOP).!
86d0: 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 6e endif.!else.!ifn
86e0: 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 54 5f def OUT_DIR.OUT_
86f0: 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50 5f DIR. = $(TMP_
8700: 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 DIR).!endif.!end
8710: 69 66 0a 0a 23 20 52 65 6c 61 74 69 76 65 20 70 if..# Relative p
8720: 61 74 68 73 20 2d 3e 20 61 62 73 6f 6c 75 74 65 aths -> absolute
8730: 0a 21 69 66 20 5b 65 63 68 6f 20 4f 55 54 5f 44 .!if [echo OUT_D
8740: 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 IR = \> nmakehlp
8750: 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e .out] \. || [n
8760: 6d 61 6b 65 68 6c 70 20 2d 51 20 22 24 28 4f 55 makehlp -Q "$(OU
8770: 54 5f 44 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 T_DIR)" >> nmake
8780: 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 hlp.out].!error
8790: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 *** Could not fu
87a0: 6c 6c 79 20 71 75 61 6c 69 66 79 20 70 61 74 68 lly qualify path
87b0: 20 4f 55 54 5f 44 49 52 3d 24 28 4f 55 54 5f 44 OUT_DIR=$(OUT_D
87c0: 49 52 29 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b IR).!endif.!if [
87d0: 65 63 68 6f 20 54 4d 50 5f 44 49 52 20 3d 20 5c echo TMP_DIR = \
87e0: 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d >> nmakehlp.out]
87f0: 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b 65 68 \. || [nmakeh
8800: 6c 70 20 2d 51 20 22 24 28 54 4d 50 5f 44 49 52 lp -Q "$(TMP_DIR
8810: 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f )" >> nmakehlp.o
8820: 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 ut].!error *** C
8830: 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 20 71 ould not fully q
8840: 75 61 6c 69 66 79 20 70 61 74 68 20 54 4d 50 5f ualify path TMP_
8850: 44 49 52 3d 24 28 54 4d 50 5f 44 49 52 29 0a 21 DIR=$(TMP_DIR).!
8860: 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e endif.!include n
8870: 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 0a 23 20 54 makehlp.out..# T
8880: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 he name of the s
8890: 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 tubs library for
88a0: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 62 65 69 the project bei
88b0: 6e 67 20 62 75 69 6c 74 0a 53 54 55 42 50 52 45 ng built.STUBPRE
88c0: 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 52 4f FIX = $(PRO
88d0: 4a 45 43 54 29 73 74 75 62 0a 0a 23 0a 23 20 53 JECT)stub..#.# S
88e0: 65 74 20 75 70 20 70 61 74 68 73 20 74 6f 20 76 et up paths to v
88f0: 61 72 69 6f 75 73 20 54 63 6c 20 65 78 65 63 75 arious Tcl execu
8900: 74 61 62 6c 65 73 20 61 6e 64 20 6c 69 62 72 61 tables and libra
8910: 72 69 65 73 20 6e 65 65 64 65 64 20 62 79 20 65 ries needed by e
8920: 78 74 65 6e 73 69 6f 6e 73 0a 23 0a 0a 23 20 54 xtensions.#..# T
8930: 49 50 20 34 33 30 2e 20 55 6e 75 73 65 64 20 66 IP 430. Unused f
8940: 6f 72 20 38 2e 36 20 62 75 74 20 6e 6f 20 68 61 or 8.6 but no ha
8950: 72 6d 20 64 65 66 69 6e 69 6e 67 20 69 74 20 74 rm defining it t
8960: 6f 20 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d 6f 6e o allow a common
8970: 20 72 75 6c 65 73 2e 76 63 0a 54 43 4c 53 43 52 rules.vc.TCLSCR
8980: 49 50 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 62 IPTZIPNAME = lib
8990: 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 tcl$(TCL_MAJOR_V
89a0: 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 ERSION).$(TCL_MI
89b0: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 43 NOR_VERSION)$(TC
89c0: 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 29 24 L_PATCH_LETTER)$
89d0: 28 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 (TCL_RELEASE_SER
89e0: 49 41 4c 29 2e 7a 69 70 0a 54 4b 53 43 52 49 50 IAL).zip.TKSCRIP
89f0: 54 5a 49 50 4e 41 4d 45 20 3d 20 6c 69 62 74 6b TZIPNAME = libtk
8a00: 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 $(TK_MAJOR_VERSI
8a10: 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 ON).$(TK_MINOR_V
8a20: 45 52 53 49 4f 4e 29 24 28 54 4b 5f 50 41 54 43 ERSION)$(TK_PATC
8a30: 48 5f 4c 45 54 54 45 52 29 24 28 54 4b 5f 52 45 H_LETTER)$(TK_RE
8a40: 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 2e 7a 69 LEASE_SERIAL).zi
8a50: 70 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 p..!if $(DOING_T
8a60: 43 4c 29 0a 54 43 4c 53 48 4e 41 4d 45 20 20 20 CL).TCLSHNAME
8a70: 20 20 20 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 = $(PROJECT)
8a80: 73 68 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 sh$(VERSION)$(SU
8a90: 46 58 29 2e 65 78 65 0a 54 43 4c 53 48 09 09 3d FX).exe.TCLSH..=
8aa0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 $(OUT_DIR)\$(TC
8ab0: 4c 53 48 4e 41 4d 45 29 0a 54 43 4c 49 4d 50 4c LSHNAME).TCLIMPL
8ac0: 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c IB.= $(OUT_DIR)\
8ad0: 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 $(PROJECT)$(VERS
8ae0: 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a ION)$(SUFX).lib.
8af0: 54 43 4c 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 TCLLIBNAME.= $(P
8b00: 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e ROJECT)$(VERSION
8b10: 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a )$(SUFX).$(EXT).
8b20: 54 43 4c 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f TCLLIB..= $(OUT_
8b30: 44 49 52 29 5c 24 28 54 43 4c 4c 49 42 4e 41 4d DIR)\$(TCLLIBNAM
8b40: 45 29 0a 54 43 4c 53 43 52 49 50 54 5a 49 50 20 E).TCLSCRIPTZIP
8b50: 20 20 20 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c = $(OUT_DIR)\
8b60: 24 28 54 43 4c 53 43 52 49 50 54 5a 49 50 4e 41 $(TCLSCRIPTZIPNA
8b70: 4d 45 29 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d ME)..!if $(TCL_M
8b80: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d AJOR_VERSION) ==
8b90: 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 4e 41 4d 8.TCLSTUBLIBNAM
8ba0: 45 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 58 E.= $(STUBPREFIX
8bb0: 29 24 28 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0a )$(VERSION).lib.
8bc0: 21 65 6c 73 65 0a 54 43 4c 53 54 55 42 4c 49 42 !else.TCLSTUBLIB
8bd0: 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52 45 NAME.= $(STUBPRE
8be0: 46 49 58 29 2e 6c 69 62 0a 21 65 6e 64 69 66 0a FIX).lib.!endif.
8bf0: 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 4f TCLSTUBLIB.= $(O
8c00: 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 53 54 55 UT_DIR)\$(TCLSTU
8c10: 42 4c 49 42 4e 41 4d 45 29 0a 54 43 4c 5f 49 4e BLIBNAME).TCL_IN
8c20: 43 4c 55 44 45 53 20 20 20 20 3d 20 2d 49 22 24 CLUDES = -I"$
8c30: 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 (WIN_DIR)" -I"$(
8c40: 47 45 4e 45 52 49 43 44 49 52 29 22 0a 0a 21 65 GENERICDIR)"..!e
8c50: 6c 73 65 20 23 20 21 24 28 44 4f 49 4e 47 5f 54 lse # !$(DOING_T
8c60: 43 4c 29 0a 0a 21 69 66 20 24 28 54 43 4c 49 4e CL)..!if $(TCLIN
8c70: 53 54 41 4c 4c 29 20 23 20 42 75 69 6c 64 69 6e STALL) # Buildin
8c80: 67 20 61 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 g against an ins
8c90: 74 61 6c 6c 65 64 20 54 63 6c 0a 0a 23 20 57 68 talled Tcl..# Wh
8ca0: 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 en building exte
8cb0: 6e 73 69 6f 6e 73 2c 20 77 65 20 6e 65 65 64 20 nsions, we need
8cc0: 74 6f 20 6c 6f 63 61 74 65 20 74 63 6c 73 68 2e to locate tclsh.
8cd0: 20 44 65 70 65 6e 64 69 6e 67 20 6f 6e 20 76 65 Depending on ve
8ce0: 72 73 69 6f 6e 0a 23 20 6f 66 20 54 63 6c 20 77 rsion.# of Tcl w
8cf0: 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 20 61 e are building a
8d00: 67 61 69 6e 73 74 2c 20 74 68 69 73 20 6d 61 79 gainst, this may
8d10: 20 6f 72 20 6d 61 79 20 6e 6f 74 20 68 61 76 65 or may not have
8d20: 20 61 20 22 74 22 20 73 75 66 66 69 78 2e 0a 23 a "t" suffix..#
8d30: 20 54 72 79 20 76 61 72 69 6f 75 73 20 70 6f 73 Try various pos
8d40: 73 69 62 69 6c 69 74 69 65 73 20 69 6e 20 74 75 sibilities in tu
8d50: 72 6e 2e 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f rn..TCLSH..= $(_
8d60: 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c 73 TCLDIR)\bin\tcls
8d70: 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 h$(TCL_VERSION)$
8d80: 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 69 (SUFX:t=).exe.!i
8d90: 66 20 21 65 78 69 73 74 28 22 24 28 54 43 4c 53 f !exist("$(TCLS
8da0: 48 29 22 29 0a 54 43 4c 53 48 20 20 20 20 20 20 H)").TCLSH
8db0: 20 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 = $(_TCLDIR
8dc0: 29 5c 62 69 6e 5c 74 63 6c 73 68 24 28 54 43 4c )\bin\tclsh$(TCL
8dd0: 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 _VERSION)t$(SUFX
8de0: 3a 74 3d 29 2e 65 78 65 0a 21 65 6e 64 69 66 0a :t=).exe.!endif.
8df0: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
8e00: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 _VERSION) == 8.T
8e10: 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 CLSTUBLIB.= $(_T
8e20: 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 CLDIR)\lib\tclst
8e30: 75 62 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 ub$(TCL_VERSION)
8e40: 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 54 .lib.!else.TCLST
8e50: 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 UBLIB.= $(_TCLDI
8e60: 52 29 5c 6c 69 62 5c 74 63 6c 73 74 75 62 2e 6c R)\lib\tclstub.l
8e70: 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 49 4d 50 ib.!endif.TCLIMP
8e80: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
8e90: 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 \lib\tcl$(TCL_VE
8ea0: 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 RSION)$(SUFX:t=)
8eb0: 2e 6c 69 62 0a 23 20 57 68 65 6e 20 62 75 69 6c .lib.# When buil
8ec0: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c ding extensions,
8ed0: 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 may be linking
8ee0: 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 against Tcl that
8ef0: 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 does not add.#
8f00: 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e "t" suffix (e.g.
8f10: 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 8.5 or 8.7). If
8f20: 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 lib not found c
8f30: 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f heck for that po
8f40: 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 ssibility..!if !
8f50: 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d 50 4c exist("$(TCLIMPL
8f60: 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 42 09 IB)").TCLIMPLIB.
8f70: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 = $(_TCLDIR)\lib
8f80: 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f \tcl$(TCL_VERSIO
8f90: 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 N)t$(SUFX:t=).li
8fa0: 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 42 b.!endif.TCL_LIB
8fb0: 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 RARY.= $(_TCLDIR
8fc0: 29 5c 6c 69 62 0a 54 43 4c 52 45 47 4c 49 42 09 )\lib.TCLREGLIB.
8fd0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 = $(_TCLDIR)\lib
8fe0: 5c 74 63 6c 72 65 67 31 33 24 28 53 55 46 58 3a \tclreg13$(SUFX:
8ff0: 74 3d 29 2e 6c 69 62 0a 54 43 4c 44 44 45 4c 49 t=).lib.TCLDDELI
9000: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c B.= $(_TCLDIR)\l
9010: 69 62 5c 74 63 6c 64 64 65 31 34 24 28 53 55 46 ib\tcldde14$(SUF
9020: 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 43 52 X:t=).lib.TCLSCR
9030: 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 IPTZIP.= $(_TCLD
9040: 49 52 29 5c 6c 69 62 5c 24 28 54 43 4c 53 43 52 IR)\lib\$(TCLSCR
9050: 49 50 54 5a 49 50 4e 41 4d 45 29 0a 54 43 4c 54 IPTZIPNAME).TCLT
9060: 4f 4f 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 5c OOLSDIR.= \must\
9070: 68 61 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 73 have\tcl\sources
9080: 5c 74 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c 74 \to\build\this\t
9090: 61 72 67 65 74 0a 54 43 4c 5f 49 4e 43 4c 55 44 arget.TCL_INCLUD
90a0: 45 53 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 43 ES = -I"$(_TC
90b0: 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0a 0a LDIR)\include"..
90c0: 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e 67 !else # Building
90d0: 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 against Tcl sou
90e0: 72 63 65 73 0a 0a 54 43 4c 53 48 09 09 3d 20 24 rces..TCLSH..= $
90f0: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 (_TCLDIR)\win\$(
9100: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c BUILDDIRTOP)\tcl
9110: 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 sh$(TCL_VERSION)
9120: 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 $(SUFX:t=).exe.!
9130: 69 66 20 21 65 78 69 73 74 28 24 28 54 43 4c 53 if !exist($(TCLS
9140: 48 29 29 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f H)).TCLSH..= $(_
9150: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
9160: 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 68 ILDDIRTOP)\tclsh
9170: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 $(TCL_VERSION)t$
9180: 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 65 (SUFX:t=).exe.!e
9190: 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 4d ndif.!if $(TCL_M
91a0: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d AJOR_VERSION) ==
91b0: 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 8.TCLSTUBLIB.=
91c0: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 $(_TCLDIR)\win\$
91d0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 (BUILDDIRTOP)\tc
91e0: 6c 73 74 75 62 24 28 54 43 4c 5f 56 45 52 53 49 lstub$(TCL_VERSI
91f0: 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 ON).lib.!else.TC
9200: 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 LSTUBLIB.= $(_TC
9210: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
9220: 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 DDIRTOP)\tclstub
9230: 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 49 .lib.!endif.TCLI
9240: 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 MPLIB.= $(_TCLDI
9250: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
9260: 52 54 4f 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 RTOP)\tcl$(TCL_V
9270: 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d ERSION)$(SUFX:t=
9280: 29 2e 6c 69 62 0a 23 20 57 68 65 6e 20 62 75 69 ).lib.# When bui
9290: 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 lding extensions
92a0: 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 , may be linking
92b0: 20 61 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 against Tcl tha
92c0: 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 t does not add.#
92d0: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 "t" suffix (e.g
92e0: 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 . 8.5 or 8.7). I
92f0: 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 f lib not found
9300: 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 check for that p
9310: 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 ossibility..!if
9320: 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d 50 !exist("$(TCLIMP
9330: 4c 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 42 LIB)").TCLIMPLIB
9340: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 .= $(_TCLDIR)\wi
9350: 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 n\$(BUILDDIRTOP)
9360: 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f \tcl$(TCL_VERSIO
9370: 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 N)t$(SUFX:t=).li
9380: 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 42 b.!endif.TCL_LIB
9390: 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 RARY.= $(_TCLDIR
93a0: 29 5c 6c 69 62 72 61 72 79 0a 54 43 4c 52 45 47 )\library.TCLREG
93b0: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
93c0: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
93d0: 4f 50 29 5c 74 63 6c 72 65 67 31 33 24 28 53 55 OP)\tclreg13$(SU
93e0: 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 44 44 FX:t=).lib.TCLDD
93f0: 45 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 ELIB.= $(_TCLDIR
9400: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
9410: 54 4f 50 29 5c 74 63 6c 64 64 65 31 34 24 28 53 TOP)\tcldde14$(S
9420: 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 UFX:t=).lib.TCLS
9430: 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 CRIPTZIP.= $(_TC
9440: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
9450: 44 44 49 52 54 4f 50 29 5c 24 28 54 43 4c 53 43 DDIRTOP)\$(TCLSC
9460: 52 49 50 54 5a 49 50 4e 41 4d 45 29 0a 54 43 4c RIPTZIPNAME).TCL
9470: 54 4f 4f 4c 53 44 49 52 09 3d 20 24 28 5f 54 43 TOOLSDIR.= $(_TC
9480: 4c 44 49 52 29 5c 74 6f 6f 6c 73 0a 54 43 4c 5f LDIR)\tools.TCL_
9490: 49 4e 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 28 INCLUDES.= -I"$(
94a0: 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 _TCLDIR)\generic
94b0: 22 20 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c " -I"$(_TCLDIR)\
94c0: 77 69 6e 22 0a 0a 21 65 6e 64 69 66 20 23 20 54 win"..!endif # T
94d0: 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 21 CLINSTALL..!if !
94e0: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 $(STATIC_BUILD)
94f0: 26 26 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f && "$(TCL_BUILD_
9500: 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a 74 63 6c FOR)" == "8".tcl
9510: 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 libs = "$(TCLSTU
9520: 42 4c 49 42 29 22 0a 21 65 6c 73 65 0a 74 63 6c BLIB)".!else.tcl
9530: 6c 69 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 libs = "$(TCLSTU
9540: 42 4c 49 42 29 22 20 22 24 28 54 43 4c 49 4d 50 BLIB)" "$(TCLIMP
9550: 4c 49 42 29 22 0a 21 65 6e 64 69 66 0a 0a 21 65 LIB)".!endif..!e
9560: 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 ndif # $(DOING_T
9570: 43 4c 29 0a 0a 23 20 57 65 20 6e 65 65 64 20 61 CL)..# We need a
9580: 20 74 63 6c 73 68 20 74 68 61 74 20 77 69 6c 6c tclsh that will
9590: 20 72 75 6e 20 6f 6e 20 74 68 65 20 68 6f 73 74 run on the host
95a0: 20 6d 61 63 68 69 6e 65 20 61 73 20 70 61 72 74 machine as part
95b0: 20 6f 66 20 74 68 65 20 62 75 69 6c 64 2e 0a 23 of the build..#
95c0: 20 49 58 38 36 20 72 75 6e 73 20 6f 6e 20 61 6c IX86 runs on al
95d0: 6c 20 61 72 63 68 69 74 65 63 74 75 72 65 73 2e l architectures.
95e0: 0a 21 69 66 6e 64 65 66 20 54 43 4c 53 48 5f 4e .!ifndef TCLSH_N
95f0: 41 54 49 56 45 0a 21 69 66 20 22 24 28 4d 41 43 ATIVE.!if "$(MAC
9600: 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 HINE)" == "IX86"
9610: 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 || "$(MACHINE)"
9620: 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 == "$(NATIVE_AR
9630: 43 48 29 22 0a 54 43 4c 53 48 5f 4e 41 54 49 56 CH)".TCLSH_NATIV
9640: 45 09 3d 20 24 28 54 43 4c 53 48 29 0a 21 65 6c E.= $(TCLSH).!el
9650: 73 65 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 se.!error You mu
9660: 73 74 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 st explicitly se
9670: 74 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 t TCLSH_NATIVE f
9680: 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 or cross-compila
9690: 74 69 6f 6e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 tion.!endif.!end
96a0: 69 66 0a 0a 23 20 44 6f 20 74 68 65 20 73 61 6d if..# Do the sam
96b0: 65 20 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20 e for Tk and Tk
96c0: 65 78 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 20 extensions that
96d0: 72 65 71 75 69 72 65 20 74 68 65 20 54 6b 20 6c require the Tk l
96e0: 69 62 72 61 72 69 65 73 0a 21 69 66 20 24 28 44 ibraries.!if $(D
96f0: 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45 OING_TK) || $(NE
9700: 45 44 5f 54 4b 29 0a 57 49 53 48 4e 41 4d 45 50 ED_TK).WISHNAMEP
9710: 52 45 46 49 58 20 3d 20 77 69 73 68 0a 57 49 53 REFIX = wish.WIS
9720: 48 4e 41 4d 45 20 3d 20 24 28 57 49 53 48 4e 41 HNAME = $(WISHNA
9730: 4d 45 50 52 45 46 49 58 29 24 28 54 4b 5f 56 45 MEPREFIX)$(TK_VE
9740: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 RSION)$(SUFX).ex
9750: 65 0a 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 74 e.TKLIBNAME8.= t
9760: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9770: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 4c SUFX).$(EXT).TKL
9780: 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c 39 74 6b IBNAME9.= tcl9tk
9790: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
97a0: 55 46 58 29 2e 24 28 45 58 54 29 0a 21 69 66 20 UFX).$(EXT).!if
97b0: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
97c0: 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 ION) == 8 || "$(
97d0: 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 TCL_BUILD_FOR)"
97e0: 3d 3d 20 22 38 22 0a 54 4b 4c 49 42 4e 41 4d 45 == "8".TKLIBNAME
97f0: 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f .= tk$(TK_VERSIO
9800: 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 N)$(SUFX).$(EXT)
9810: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 .TKIMPLIBNAME.=
9820: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9830: 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6c 73 65 (SUFX).lib.!else
9840: 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c .TKLIBNAME.= tcl
9850: 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 9tk$(TK_VERSION)
9860: 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 $(SUFX).$(EXT).T
9870: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 KIMPLIBNAME.= tc
9880: 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e l9tk$(TK_VERSION
9890: 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6e )$(SUFX).lib.!en
98a0: 64 69 66 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d dif.TKSTUBLIBNAM
98b0: 45 09 3d 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 E.= tkstub$(TK_V
98c0: 45 52 53 49 4f 4e 29 2e 6c 69 62 0a 0a 21 69 66 ERSION).lib..!if
98d0: 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 57 49 53 $(DOING_TK).WIS
98e0: 48 20 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 H ..= $(OUT_DIR)
98f0: 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 4b 53 \$(WISHNAME).TKS
9900: 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 TUBLIB.= $(OUT_D
9910: 49 52 29 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e IR)\$(TKSTUBLIBN
9920: 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 AME).TKIMPLIB.=
9930: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 49 $(OUT_DIR)\$(TKI
9940: 4d 50 4c 49 42 4e 41 4d 45 29 0a 54 4b 4c 49 42 MPLIBNAME).TKLIB
9950: 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 ..= $(OUT_DIR)\$
9960: 28 54 4b 4c 49 42 4e 41 4d 45 29 0a 54 4b 5f 49 (TKLIBNAME).TK_I
9970: 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 2d 49 NCLUDES = -I
9980: 22 24 28 57 49 4e 5f 44 49 52 29 22 20 2d 49 22 "$(WIN_DIR)" -I"
9990: 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 0a 54 $(GENERICDIR)".T
99a0: 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d KSCRIPTZIP =
99b0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b $(OUT_DIR)\$(TK
99c0: 53 43 52 49 50 54 5a 49 50 4e 41 4d 45 29 0a 0a SCRIPTZIPNAME)..
99d0: 21 65 6c 73 65 20 23 20 65 66 66 65 63 74 69 76 !else # effectiv
99e0: 65 6c 79 20 4e 45 45 44 5f 54 4b 0a 0a 21 69 66 ely NEED_TK..!if
99f0: 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 $(TKINSTALL) #
9a00: 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 Building against
9a10: 20 69 6e 73 74 61 6c 6c 65 64 20 54 6b 0a 57 49 installed Tk.WI
9a20: 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c SH..= $(_TKDIR)\
9a30: 62 69 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a bin\$(WISHNAME).
9a40: 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 TKSTUBLIB.= $(_T
9a50: 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 54 KDIR)\lib\$(TKST
9a60: 55 42 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 UBLIBNAME).TKIMP
9a70: 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c LIB.= $(_TKDIR)\
9a80: 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 lib\$(TKIMPLIBNA
9a90: 4d 45 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 ME).# When build
9aa0: 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 ing extensions,
9ab0: 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 may be linking a
9ac0: 67 61 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 gainst Tk that d
9ad0: 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 oes not add.# "t
9ae0: 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 " suffix (e.g. 8
9af0: 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 6c .5 or 8.7). If l
9b00: 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 ib not found che
9b10: 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 ck for that poss
9b20: 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 ibility..!if !ex
9b30: 69 73 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 ist("$(TKIMPLIB)
9b40: 22 29 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 ").TKIMPLIBNAME.
9b50: 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e = tk$(TK_VERSION
9b60: 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a )$(SUFX:t=).lib.
9b70: 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b TKIMPLIB.= $(_TK
9b80: 44 49 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 DIR)\lib\$(TKIMP
9b90: 4c 49 42 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a LIBNAME).!endif.
9ba0: 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 TK_INCLUDES
9bb0: 3d 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 69 = -I"$(_TKDIR)\i
9bc0: 6e 63 6c 75 64 65 22 0a 54 4b 53 43 52 49 50 54 nclude".TKSCRIPT
9bd0: 5a 49 50 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 ZIP = $(_TKD
9be0: 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 43 52 49 IR)\lib\$(TKSCRI
9bf0: 50 54 5a 49 50 4e 41 4d 45 29 0a 0a 21 65 6c 73 PTZIPNAME)..!els
9c00: 65 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 e # Building aga
9c10: 69 6e 73 74 20 54 6b 20 73 6f 75 72 63 65 73 0a inst Tk sources.
9c20: 0a 57 49 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 .WISH..= $(_TKDI
9c30: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
9c40: 52 54 4f 50 29 5c 24 28 57 49 53 48 4e 41 4d 45 RTOP)\$(WISHNAME
9c50: 29 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 ).TKSTUBLIB.= $(
9c60: 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 _TKDIR)\win\$(BU
9c70: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 53 ILDDIRTOP)\$(TKS
9c80: 54 55 42 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d TUBLIBNAME).TKIM
9c90: 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 PLIB.= $(_TKDIR)
9ca0: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
9cb0: 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 OP)\$(TKIMPLIBNA
9cc0: 4d 45 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 ME).# When build
9cd0: 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 ing extensions,
9ce0: 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 may be linking a
9cf0: 67 61 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 gainst Tk that d
9d00: 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 oes not add.# "t
9d10: 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 " suffix (e.g. 8
9d20: 2e 35 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 6c .5 or 8.7). If l
9d30: 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 ib not found che
9d40: 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 ck for that poss
9d50: 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 ibility..!if !ex
9d60: 69 73 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 ist("$(TKIMPLIB)
9d70: 22 29 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 ").TKIMPLIBNAME.
9d80: 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e = tk$(TK_VERSION
9d90: 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a )$(SUFX:t=).lib.
9da0: 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b TKIMPLIB.= $(_TK
9db0: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
9dc0: 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 4c DIRTOP)\$(TKIMPL
9dd0: 49 42 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a 54 IBNAME).!endif.T
9de0: 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d K_INCLUDES =
9df0: 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 -I"$(_TKDIR)\ge
9e00: 6e 65 72 69 63 22 20 2d 49 22 24 28 5f 54 4b 44 neric" -I"$(_TKD
9e10: 49 52 29 5c 77 69 6e 22 20 2d 49 22 24 28 5f 54 IR)\win" -I"$(_T
9e20: 4b 44 49 52 29 5c 78 6c 69 62 22 0a 54 4b 53 43 KDIR)\xlib".TKSC
9e30: 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 24 28 RIPTZIP = $(
9e40: 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 _TKDIR)\win\$(BU
9e50: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 53 ILDDIRTOP)\$(TKS
9e60: 43 52 49 50 54 5a 49 50 4e 41 4d 45 29 0a 0a 21 CRIPTZIPNAME)..!
9e70: 65 6e 64 69 66 20 23 20 54 4b 49 4e 53 54 41 4c endif # TKINSTAL
9e80: 4c 0a 0a 74 6b 6c 69 62 73 20 3d 20 22 24 28 54 L..tklibs = "$(T
9e90: 4b 53 54 55 42 4c 49 42 29 22 20 22 24 28 54 4b KSTUBLIB)" "$(TK
9ea0: 49 4d 50 4c 49 42 29 22 0a 0a 21 65 6e 64 69 66 IMPLIB)"..!endif
9eb0: 20 23 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 21 # $(DOING_TK).!
9ec0: 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f endif # $(DOING_
9ed0: 54 4b 29 20 7c 7c 20 24 28 4e 45 45 44 5f 54 4b TK) || $(NEED_TK
9ee0: 29 0a 0a 23 20 56 61 72 69 6f 75 73 20 6f 75 74 )..# Various out
9ef0: 70 75 74 20 70 61 74 68 73 0a 50 52 4a 49 4d 50 put paths.PRJIMP
9f00: 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 LIB.= $(OUT_DIR)
9f10: 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 \$(PROJECT)$(VER
9f20: 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 SION)$(SUFX).lib
9f30: 0a 50 52 4a 4c 49 42 4e 41 4d 45 38 09 3d 20 24 .PRJLIBNAME8.= $
9f40: 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 (PROJECT)$(VERSI
9f50: 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 ON)$(SUFX).$(EXT
9f60: 29 0a 50 52 4a 4c 49 42 4e 41 4d 45 39 09 3d 20 ).PRJLIBNAME9.=
9f70: 74 63 6c 39 24 28 50 52 4f 4a 45 43 54 29 24 28 tcl9$(PROJECT)$(
9f80: 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e VERSION)$(SUFX).
9f90: 24 28 45 58 54 29 0a 21 69 66 20 24 28 54 43 4c $(EXT).!if $(TCL
9fa0: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
9fb0: 3d 3d 20 38 20 7c 7c 20 22 24 28 54 43 4c 5f 42 == 8 || "$(TCL_B
9fc0: 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 UILD_FOR)" == "8
9fd0: 22 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 ".PRJLIBNAME.= $
9fe0: 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 21 65 (PRJLIBNAME8).!e
9ff0: 6c 73 65 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d lse.PRJLIBNAME.=
a000: 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 0a $(PRJLIBNAME9).
a010: 21 65 6e 64 69 66 0a 50 52 4a 4c 49 42 09 09 3d !endif.PRJLIB..=
a020: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 $(OUT_DIR)\$(PR
a030: 4a 4c 49 42 4e 41 4d 45 29 0a 0a 21 69 66 20 24 JLIBNAME)..!if $
a040: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
a050: 4f 4e 29 20 3d 3d 20 38 0a 50 52 4a 53 54 55 42 ON) == 8.PRJSTUB
a060: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 LIBNAME.= $(STUB
a070: 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e PREFIX)$(VERSION
a080: 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 50 52 4a 53 ).lib.!else.PRJS
a090: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 TUBLIBNAME.= $(S
a0a0: 54 55 42 50 52 45 46 49 58 29 2e 6c 69 62 0a 21 TUBPREFIX).lib.!
a0b0: 65 6e 64 69 66 0a 50 52 4a 53 54 55 42 4c 49 42 endif.PRJSTUBLIB
a0c0: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
a0d0: 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a PRJSTUBLIBNAME).
a0e0: 0a 23 20 49 66 20 65 78 74 65 6e 73 69 6f 6e 20 .# If extension
a0f0: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 parent makefile
a100: 68 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 has not defined
a110: 61 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 6e a resource defin
a120: 69 74 69 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 65 ition file,.# we
a130: 20 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f will generate o
a140: 6e 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 64 ne from standard
a150: 20 74 65 6d 70 6c 61 74 65 2e 0a 21 69 66 20 21 template..!if !
a160: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 $(DOING_TCL) &&
a170: 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26 20 !$(DOING_TK) &&
a180: 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 !$(STATIC_BUILD)
a190: 0a 21 69 66 64 65 66 20 52 43 46 49 4c 45 0a 52 .!ifdef RCFILE.R
a1a0: 45 53 46 49 4c 45 20 3d 20 24 28 54 4d 50 5f 44 ESFILE = $(TMP_D
a1b0: 49 52 29 5c 24 28 52 43 46 49 4c 45 3a 2e 72 63 IR)\$(RCFILE:.rc
a1c0: 3d 2e 72 65 73 29 0a 21 65 6c 73 65 0a 52 45 53 =.res).!else.RES
a1d0: 46 49 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 FILE = $(TMP_DIR
a1e0: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 )\$(PROJECT).res
a1f0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
a200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a210: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a220: 23 23 23 23 23 23 23 23 23 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 0a 23 20 31 31 2e 20 43 6f 6e 73 74 72 ###.# 11. Constr
a250: 75 63 74 20 74 68 65 20 70 61 74 68 73 20 66 6f uct the paths fo
a260: 72 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 r the installati
a270: 6f 6e 20 64 69 72 65 63 74 6f 72 69 65 73 0a 23 on directories.#
a280: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d The following m
a290: 61 63 72 6f 73 20 67 65 74 20 64 65 66 69 6e 65 acros get define
a2a0: 64 20 69 6e 20 74 68 69 73 20 73 65 63 74 69 6f d in this sectio
a2b0: 6e 3a 0a 23 20 4c 49 42 5f 49 4e 53 54 41 4c 4c n:.# LIB_INSTALL
a2c0: 5f 44 49 52 20 2d 20 77 68 65 72 65 20 6c 69 62 _DIR - where lib
a2d0: 72 61 72 69 65 73 20 73 68 6f 75 6c 64 20 62 65 raries should be
a2e0: 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 42 49 4e installed.# BIN
a2f0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 _INSTALL_DIR - w
a300: 68 65 72 65 20 74 68 65 20 65 78 65 63 75 74 61 here the executa
a310: 62 6c 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 bles should be i
a320: 6e 73 74 61 6c 6c 65 64 0a 23 20 44 4f 43 5f 49 nstalled.# DOC_I
a330: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
a340: 72 65 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e re documentation
a350: 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 should be insta
a360: 6c 6c 65 64 0a 23 20 53 43 52 49 50 54 5f 49 4e lled.# SCRIPT_IN
a370: 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 STALL_DIR - wher
a380: 65 20 73 63 72 69 70 74 73 20 73 68 6f 75 6c 64 e scripts should
a390: 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 be installed.#
a3a0: 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f INCLUDE_INSTALL_
a3b0: 44 49 52 20 2d 20 77 68 65 72 65 20 43 20 69 6e DIR - where C in
a3c0: 63 6c 75 64 65 20 66 69 6c 65 73 20 73 68 6f 75 clude files shou
a3d0: 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a ld be installed.
a3e0: 23 20 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 # DEMO_INSTALL_D
a3f0: 49 52 20 2d 20 77 68 65 72 65 20 64 65 6d 6f 73 IR - where demos
a400: 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 should be insta
a410: 6c 6c 65 64 0a 23 20 50 52 4a 5f 49 4e 53 54 41 lled.# PRJ_INSTA
a420: 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 70 LL_DIR - where p
a430: 61 63 6b 61 67 65 20 77 69 6c 6c 20 62 65 20 69 ackage will be i
a440: 6e 73 74 61 6c 6c 65 64 20 28 6e 6f 74 20 73 65 nstalled (not se
a450: 74 20 66 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b t for Tcl and Tk
a460: 29 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 )..!if $(DOING_T
a470: 43 4c 29 20 7c 7c 20 24 28 44 4f 49 4e 47 5f 54 CL) || $(DOING_T
a480: 4b 29 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 K).LIB_INSTALL_D
a490: 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c IR..= $(_INSTALL
a4a0: 44 49 52 29 5c 6c 69 62 0a 42 49 4e 5f 49 4e 53 DIR)\lib.BIN_INS
a4b0: 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 TALL_DIR..= $(_I
a4c0: 4e 53 54 41 4c 4c 44 49 52 29 5c 62 69 6e 0a 44 NSTALLDIR)\bin.D
a4d0: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 OC_INSTALL_DIR..
a4e0: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 = $(_INSTALLDIR)
a4f0: 5c 64 6f 63 0a 21 69 66 20 24 28 44 4f 49 4e 47 \doc.!if $(DOING
a500: 5f 54 43 4c 29 0a 53 43 52 49 50 54 5f 49 4e 53 _TCL).SCRIPT_INS
a510: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e TALL_DIR.= $(_IN
a520: 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 STALLDIR)\lib\$(
a530: 50 52 4f 4a 45 43 54 29 24 28 54 43 4c 5f 4d 41 PROJECT)$(TCL_MA
a540: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 JOR_VERSION).$(T
a550: 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e CL_MINOR_VERSION
a560: 29 0a 4d 4f 44 55 4c 45 5f 49 4e 53 54 41 4c 4c ).MODULE_INSTALL
a570: 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c _DIR.= $(_INSTAL
a580: 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 LDIR)\lib\tcl$(T
a590: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
a5a0: 29 0a 21 65 6c 73 65 20 23 20 44 4f 49 4e 47 5f ).!else # DOING_
a5b0: 54 4b 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c TK.SCRIPT_INSTAL
a5c0: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 L_DIR.= $(_INSTA
a5d0: 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 4f LLDIR)\lib\$(PRO
a5e0: 4a 45 43 54 29 24 28 54 4b 5f 4d 41 4a 4f 52 5f JECT)$(TK_MAJOR_
a5f0: 56 45 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 VERSION).$(TK_MI
a600: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 21 65 6e NOR_VERSION).!en
a610: 64 69 66 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c dif.DEMO_INSTALL
a620: 5f 44 49 52 09 3d 20 24 28 53 43 52 49 50 54 5f _DIR.= $(SCRIPT_
a630: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 64 65 6d INSTALL_DIR)\dem
a640: 6f 73 0a 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 os.INCLUDE_INSTA
a650: 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 LL_DIR.= $(_INST
a660: 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 0a ALLDIR)\include.
a670: 0a 21 65 6c 73 65 20 23 20 65 78 74 65 6e 73 69 .!else # extensi
a680: 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 6b on other than Tk
a690: 0a 0a 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 ..PRJ_INSTALL_DI
a6a0: 52 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 R = $(_I
a6b0: 4e 53 54 41 4c 4c 44 49 52 29 5c 24 28 50 52 4f NSTALLDIR)\$(PRO
a6c0: 4a 45 43 54 29 24 28 44 4f 54 56 45 52 53 49 4f JECT)$(DOTVERSIO
a6d0: 4e 29 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 4c N).!if $(MULTIPL
a6e0: 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 0a ATFORM_INSTALL).
a6f0: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 LIB_INSTALL_DIR.
a700: 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c .= $(PRJ_INSTALL
a710: 5f 44 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 4d _DIR)\$(PLATFORM
a720: 5f 49 44 45 4e 54 49 46 59 29 0a 42 49 4e 5f 49 _IDENTIFY).BIN_I
a730: 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 NSTALL_DIR..= $(
a740: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 PRJ_INSTALL_DIR)
a750: 5c 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e \$(PLATFORM_IDEN
a760: 54 49 46 59 29 0a 21 65 6c 73 65 0a 4c 49 42 5f TIFY).!else.LIB_
a770: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 INSTALL_DIR..= $
a780: 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (PRJ_INSTALL_DIR
a790: 29 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 ).BIN_INSTALL_DI
a7a0: 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 R..= $(PRJ_INSTA
a7b0: 4c 4c 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 44 LL_DIR).!endif.D
a7c0: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 OC_INSTALL_DIR..
a7d0: 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f = $(PRJ_INSTALL_
a7e0: 44 49 52 29 0a 53 43 52 49 50 54 5f 49 4e 53 54 DIR).SCRIPT_INST
a7f0: 41 4c 4c 5f 44 49 52 09 3d 20 24 28 50 52 4a 5f ALL_DIR.= $(PRJ_
a800: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 44 45 4d INSTALL_DIR).DEM
a810: 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 O_INSTALL_DIR.=
a820: 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(PRJ_INSTALL_DI
a830: 52 29 5c 64 65 6d 6f 73 0a 49 4e 43 4c 55 44 45 R)\demos.INCLUDE
a840: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 _INSTALL_DIR.= $
a850: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e (_INSTALLDIR)\..
a860: 5c 69 6e 63 6c 75 64 65 0a 0a 21 65 6e 64 69 66 \include..!endif
a870: 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
a880: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a890: 23 23 23 23 23 23 23 23 23 23 23 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 0a 23 20 31 32 2e 20 53 65 74 20 #####.# 12. Set
a8c0: 75 70 20 61 63 74 75 61 6c 20 6f 70 74 69 6f 6e up actual option
a8d0: 73 20 74 6f 20 62 65 20 70 61 73 73 65 64 20 74 s to be passed t
a8e0: 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 o the compiler a
a8f0: 6e 64 20 6c 69 6e 6b 65 72 0a 23 20 4e 6f 77 20 nd linker.# Now
a900: 77 65 20 68 61 76 65 20 61 6c 6c 20 74 68 65 20 we have all the
a910: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 77 65 20 6e information we n
a920: 65 65 64 2c 20 73 65 74 20 75 70 20 74 68 65 20 eed, set up the
a930: 61 63 74 75 61 6c 20 66 6c 61 67 73 20 61 6e 64 actual flags and
a940: 0a 23 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 .# options that
a950: 77 65 20 77 69 6c 6c 20 70 61 73 73 20 74 6f 20 we will pass to
a960: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 the compiler and
a970: 20 6c 69 6e 6b 65 72 2e 20 54 68 65 20 6d 61 69 linker. The mai
a980: 6e 0a 23 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f n.# makefile sho
a990: 75 6c 64 20 75 73 65 20 74 68 65 73 65 20 69 6e uld use these in
a9a0: 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 combination wit
a9b0: 68 20 77 68 61 74 65 76 65 72 20 6f 74 68 65 72 h whatever other
a9c0: 20 66 6c 61 67 73 0a 23 20 61 6e 64 20 73 77 69 flags.# and swi
a9d0: 74 63 68 65 73 20 61 72 65 20 73 70 65 63 69 66 tches are specif
a9e0: 69 63 20 74 6f 20 69 74 2e 0a 23 20 54 68 65 20 ic to it..# The
a9f0: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
aa00: 20 61 72 65 20 64 65 66 69 6e 65 64 2c 20 6e 61 are defined, na
aa10: 6d 65 73 20 61 72 65 20 66 6f 72 20 68 69 73 74 mes are for hist
aa20: 6f 72 69 63 61 6c 20 63 6f 6d 70 61 74 69 62 69 orical compatibi
aa30: 6c 69 74 79 3a 0a 23 20 4f 50 54 44 45 46 49 4e lity:.# OPTDEFIN
aa40: 45 53 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 63 ES - /Dxxx C mac
aa50: 72 6f 20 66 6c 61 67 73 20 62 61 73 65 64 20 6f ro flags based o
aa60: 6e 20 75 73 65 72 2d 73 70 65 63 69 66 69 65 64 n user-specified
aa70: 20 4f 50 54 53 0a 23 20 43 4f 4d 50 49 4c 45 52 OPTS.# COMPILER
aa80: 46 4c 41 47 53 20 2d 20 2f 44 78 78 78 20 43 20 FLAGS - /Dxxx C
aa90: 6d 61 63 72 6f 20 66 6c 61 67 73 20 69 6e 64 65 macro flags inde
aaa0: 70 65 6e 64 65 6e 74 20 6f 66 20 61 6e 79 20 63 pendent of any c
aab0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 onfiguration opt
aac0: 74 69 6f 6e 73 0a 23 20 63 72 74 20 2d 20 43 6f tions.# crt - Co
aad0: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 20 74 68 mpiler switch th
aae0: 61 74 20 73 65 6c 65 63 74 73 20 74 68 65 20 61 at selects the a
aaf0: 70 70 72 6f 70 72 69 61 74 65 20 43 20 72 75 6e ppropriate C run
ab00: 74 69 6d 65 0a 23 20 63 64 65 62 75 67 20 2d 20 time.# cdebug -
ab10: 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 Compiler switche
ab20: 73 20 72 65 6c 61 74 65 64 20 74 6f 20 64 65 62 s related to deb
ab30: 75 67 20 41 4e 44 20 6f 70 74 69 6d 69 7a 61 74 ug AND optimizat
ab40: 69 6f 6e 73 0a 23 20 63 77 61 72 6e 20 2d 20 43 ions.# cwarn - C
ab50: 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 ompiler switches
ab60: 20 74 68 61 74 20 73 65 74 20 77 61 72 6e 69 6e that set warnin
ab70: 67 20 6c 65 76 65 6c 73 0a 23 20 63 66 6c 61 67 g levels.# cflag
ab80: 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 63 6f 6d s - complete com
ab90: 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 28 piler switches (
aba0: 73 75 62 73 75 6d 65 73 20 63 64 65 62 75 67 20 subsumes cdebug
abb0: 61 6e 64 20 63 77 61 72 6e 29 0a 23 20 6c 64 65 and cwarn).# lde
abc0: 62 75 67 20 2d 20 4c 69 6e 6b 65 72 20 73 77 69 bug - Linker swi
abd0: 74 63 68 65 73 20 63 6f 6e 74 72 6f 6c 6c 69 6e tches controllin
abe0: 67 20 64 65 62 75 67 20 69 6e 66 6f 72 6d 61 74 g debug informat
abf0: 69 6f 6e 20 61 6e 64 20 6f 70 74 69 6d 69 7a 61 ion and optimiza
ac00: 74 69 6f 6e 0a 23 20 6c 66 6c 61 67 73 20 2d 20 tion.# lflags -
ac10: 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 complete linker
ac20: 73 77 69 74 63 68 65 73 20 28 73 75 62 73 75 6d switches (subsum
ac30: 65 73 20 6c 64 65 62 75 67 29 20 65 78 63 65 70 es ldebug) excep
ac40: 74 20 73 75 62 73 79 73 74 65 6d 20 74 79 70 65 t subsystem type
ac50: 0a 23 20 64 6c 6c 6c 66 6c 61 67 73 20 2d 20 63 .# dlllflags - c
ac60: 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 omplete linker s
ac70: 77 69 74 63 68 65 73 20 74 6f 20 62 75 69 6c 64 witches to build
ac80: 20 44 4c 4c 73 20 28 73 75 62 73 75 6d 65 73 20 DLLs (subsumes
ac90: 6c 66 6c 61 67 73 29 0a 23 20 63 6f 6e 6c 66 6c lflags).# conlfl
aca0: 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c ags - complete l
acb0: 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 66 inker switches f
acc0: 6f 72 20 63 6f 6e 73 6f 6c 65 20 70 72 6f 67 72 or console progr
acd0: 61 6d 20 28 73 75 62 73 75 6d 65 73 20 6c 66 6c am (subsumes lfl
ace0: 61 67 73 29 0a 23 20 67 75 69 6c 66 6c 61 67 73 ags).# guilflags
acf0: 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b - complete link
ad00: 65 72 20 73 77 69 74 63 68 65 73 20 66 6f 72 20 er switches for
ad10: 47 55 49 20 70 72 6f 67 72 61 6d 20 28 73 75 62 GUI program (sub
ad20: 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 0a 23 20 sumes lflags).#
ad30: 62 61 73 65 6c 69 62 73 20 2d 20 6d 69 6e 69 6d baselibs - minim
ad40: 75 6d 20 57 69 6e 64 6f 77 73 20 6c 69 62 72 61 um Windows libra
ad50: 72 69 65 73 20 72 65 71 75 69 72 65 64 2e 20 50 ries required. P
ad60: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 63 arent makefile c
ad70: 61 6e 0a 23 20 20 20 20 64 65 66 69 6e 65 20 50 an.# define P
ad80: 52 4a 5f 4c 49 42 53 20 62 65 66 6f 72 65 20 69 RJ_LIBS before i
ad90: 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 72 ncluding rules.r
ada0: 63 20 69 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 c if additional
adb0: 6c 69 62 73 20 61 72 65 20 6e 65 65 64 65 64 0a libs are needed.
adc0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 2f 44 .OPTDEFINES.= /D
add0: 53 54 44 43 5f 48 45 41 44 45 52 53 20 2f 44 55 STDC_HEADERS /DU
ade0: 53 45 5f 4e 4d 41 4b 45 3d 31 0a 21 69 66 20 24 SE_NMAKE=1.!if $
adf0: 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 20 31 36 (VCVERSION) > 16
ae00: 30 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 00.OPTDEFINES.=
ae10: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
ae20: 48 41 56 45 5f 53 54 44 49 4e 54 5f 48 3d 31 0a HAVE_STDINT_H=1.
ae30: 21 65 6c 73 65 0a 4f 50 54 44 45 46 49 4e 45 53 !else.OPTDEFINES
ae40: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
ae50: 20 2f 44 4d 50 5f 4e 4f 5f 53 54 44 49 4e 54 3d /DMP_NO_STDINT=
ae60: 31 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 56 1.!endif.!if $(V
ae70: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 38 30 CVERSION) >= 180
ae80: 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 0.OPTDEFINES.= $
ae90: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 48 (OPTDEFINES) /DH
aea0: 41 56 45 5f 49 4e 54 54 59 50 45 53 5f 48 3d 31 AVE_INTTYPES_H=1
aeb0: 20 2f 44 48 41 56 45 5f 53 54 44 42 4f 4f 4c 5f /DHAVE_STDBOOL_
aec0: 48 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 H=1.!endif..!if
aed0: 24 28 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 29 $(TCL_MEM_DEBUG)
aee0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
aef0: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 OPTDEFINES) /DTC
af00: 4c 5f 4d 45 4d 5f 44 45 42 55 47 0a 21 65 6e 64 L_MEM_DEBUG.!end
af10: 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 43 4f 4d if.!if $(TCL_COM
af20: 50 49 4c 45 5f 44 45 42 55 47 29 0a 4f 50 54 44 PILE_DEBUG).OPTD
af30: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
af40: 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 4f 4d FINES) /DTCL_COM
af50: 50 49 4c 45 5f 44 45 42 55 47 20 2f 44 54 43 4c PILE_DEBUG /DTCL
af60: 5f 43 4f 4d 50 49 4c 45 5f 53 54 41 54 53 0a 21 _COMPILE_STATS.!
af70: 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f endif.!if $(TCL_
af80: 54 48 52 45 41 44 53 29 20 26 26 20 24 28 54 43 THREADS) && $(TC
af90: 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a L_VERSION) < 87.
afa0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
afb0: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
afc0: 5f 54 48 52 45 41 44 53 3d 31 0a 21 69 66 20 24 _THREADS=1.!if $
afd0: 28 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f (USE_THREAD_ALLO
afe0: 43 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 C) && $(TCL_VERS
aff0: 49 4f 4e 29 20 3c 20 38 37 0a 4f 50 54 44 45 46 ION) < 87.OPTDEF
b000: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b010: 4e 45 53 29 20 2f 44 55 53 45 5f 54 48 52 45 41 NES) /DUSE_THREA
b020: 44 5f 41 4c 4c 4f 43 3d 31 0a 21 65 6e 64 69 66 D_ALLOC=1.!endif
b030: 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 53 54 .!endif.!if $(ST
b040: 41 54 49 43 5f 42 55 49 4c 44 29 0a 4f 50 54 44 ATIC_BUILD).OPTD
b050: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b060: 46 49 4e 45 53 29 20 2f 44 53 54 41 54 49 43 5f FINES) /DSTATIC_
b070: 42 55 49 4c 44 0a 21 65 6c 73 65 69 66 20 24 28 BUILD.!elseif $(
b080: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 TCL_VERSION) > 8
b090: 36 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 6.OPTDEFINES.= $
b0a0: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b0b0: 43 4c 5f 57 49 54 48 5f 45 58 54 45 52 4e 41 4c CL_WITH_EXTERNAL
b0c0: 5f 54 4f 4d 4d 41 54 48 0a 21 69 66 20 22 24 28 _TOMMATH.!if "$(
b0d0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d MACHINE)" == "AM
b0e0: 44 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 D64" || "$(MACHI
b0f0: 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a NE)" == "ARM64".
b100: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b110: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4d 50 5f PTDEFINES) /DMP_
b120: 36 34 42 49 54 0a 21 65 6e 64 69 66 0a 21 65 6e 64BIT.!endif.!en
b130: 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 4e 4f dif.!if $(TCL_NO
b140: 5f 44 45 50 52 45 43 41 54 45 44 29 0a 4f 50 54 _DEPRECATED).OPT
b150: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b160: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4e 4f EFINES) /DTCL_NO
b170: 5f 44 45 50 52 45 43 41 54 45 44 0a 21 65 6e 64 _DEPRECATED.!end
b180: 69 66 0a 0a 21 69 66 20 24 28 55 53 45 5f 53 54 if..!if $(USE_ST
b190: 55 42 53 29 0a 23 20 4e 6f 74 65 20 77 65 20 64 UBS).# Note we d
b1a0: 6f 20 6e 6f 74 20 64 65 66 69 6e 65 20 55 53 45 o not define USE
b1b0: 5f 54 43 4c 5f 53 54 55 42 53 20 65 76 65 6e 20 _TCL_STUBS even
b1c0: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 74 6b when building tk
b1d0: 20 73 69 6e 63 65 20 73 6f 6d 65 0a 23 20 74 65 since some.# te
b1e0: 73 74 20 74 61 72 67 65 74 73 20 69 6e 20 74 6b st targets in tk
b1f0: 20 64 6f 20 6e 6f 74 20 75 73 65 20 73 74 75 62 do not use stub
b200: 73 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 s.!if !$(DOING_T
b210: 43 4c 29 0a 55 53 45 5f 53 54 55 42 53 5f 44 45 CL).USE_STUBS_DE
b220: 46 53 20 20 3d 20 2f 44 55 53 45 5f 54 43 4c 5f FS = /DUSE_TCL_
b230: 53 54 55 42 53 20 2f 44 55 53 45 5f 54 43 4c 4f STUBS /DUSE_TCLO
b240: 4f 5f 53 54 55 42 53 0a 21 69 66 20 24 28 4e 45 O_STUBS.!if $(NE
b250: 45 44 5f 54 4b 29 0a 55 53 45 5f 53 54 55 42 53 ED_TK).USE_STUBS
b260: 5f 44 45 46 53 20 20 3d 20 24 28 55 53 45 5f 53 _DEFS = $(USE_S
b270: 54 55 42 53 5f 44 45 46 53 29 20 2f 44 55 53 45 TUBS_DEFS) /DUSE
b280: 5f 54 4b 5f 53 54 55 42 53 0a 21 65 6e 64 69 66 _TK_STUBS.!endif
b290: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
b2a0: 20 55 53 45 5f 53 54 55 42 53 0a 0a 21 69 66 20 USE_STUBS..!if
b2b0: 21 24 28 44 45 42 55 47 29 0a 4f 50 54 44 45 46 !$(DEBUG).OPTDEF
b2c0: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b2d0: 4e 45 53 29 20 2f 44 4e 44 45 42 55 47 0a 21 69 NES) /DNDEBUG.!i
b2e0: 66 20 24 28 4f 50 54 49 4d 49 5a 49 4e 47 29 0a f $(OPTIMIZING).
b2f0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b300: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
b310: 5f 43 46 47 5f 4f 50 54 49 4d 49 5a 45 44 0a 21 _CFG_OPTIMIZED.!
b320: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 endif.!endif.!if
b330: 20 24 28 50 52 4f 46 49 4c 45 29 0a 4f 50 54 44 $(PROFILE).OPTD
b340: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b350: 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 FINES) /DTCL_CFG
b360: 5f 50 52 4f 46 49 4c 45 44 0a 21 65 6e 64 69 66 _PROFILED.!endif
b370: 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 .!if "$(MACHINE)
b380: 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 " == "AMD64" ||
b390: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
b3a0: 22 41 52 4d 36 34 22 0a 4f 50 54 44 45 46 49 4e "ARM64".OPTDEFIN
b3b0: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b3c0: 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 44 4f 36 S) /DTCL_CFG_DO6
b3d0: 34 42 49 54 0a 21 65 6e 64 69 66 0a 21 69 66 20 4BIT.!endif.!if
b3e0: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 $(VCVERSION) < 1
b3f0: 33 30 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 300.OPTDEFINES.=
b400: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b410: 44 4e 4f 5f 53 54 52 54 4f 49 36 34 3d 31 0a 21 DNO_STRTOI64=1.!
b420: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c endif..!if $(TCL
b430: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
b440: 3d 3d 20 38 0a 21 69 66 20 22 24 28 5f 55 53 45 == 8.!if "$(_USE
b450: 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 29 22 20 _64BIT_TIME_T)"
b460: 3d 3d 20 22 31 22 0a 4f 50 54 44 45 46 49 4e 45 == "1".OPTDEFINE
b470: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b480: 29 20 2f 44 5f 55 53 45 5f 36 34 42 49 54 5f 54 ) /D_USE_64BIT_T
b490: 49 4d 45 5f 54 3d 31 0a 21 65 6e 64 69 66 0a 0a IME_T=1.!endif..
b4a0: 23 20 5f 41 54 4c 5f 58 50 5f 54 41 52 47 45 54 # _ATL_XP_TARGET
b4b0: 49 4e 47 20 2d 20 4e 65 77 65 72 20 53 44 4b 27 ING - Newer SDK'
b4c0: 73 20 6e 65 65 64 20 74 68 69 73 20 74 6f 20 62 s need this to b
b4d0: 75 69 6c 64 20 66 6f 72 20 58 50 0a 43 4f 4d 50 uild for XP.COMP
b4e0: 49 4c 45 52 46 4c 41 47 53 20 20 3d 20 2f 44 5f ILERFLAGS = /D_
b4f0: 41 54 4c 5f 58 50 5f 54 41 52 47 45 54 49 4e 47 ATL_XP_TARGETING
b500: 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 24 28 54 .!endif.!if "$(T
b510: 43 4c 5f 55 54 46 5f 4d 41 58 29 22 20 3d 3d 20 CL_UTF_MAX)" ==
b520: 22 33 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d "3".OPTDEFINES.=
b530: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b540: 44 54 43 4c 5f 55 54 46 5f 4d 41 58 3d 33 0a 21 DTCL_UTF_MAX=3.!
b550: 65 6e 64 69 66 0a 21 69 66 20 22 24 28 54 43 4c endif.!if "$(TCL
b560: 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 _BUILD_FOR)" ==
b570: 22 38 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d "8".OPTDEFINES.=
b580: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b590: 44 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 DTCL_MAJOR_VERSI
b5a0: 4f 4e 3d 38 0a 21 65 6e 64 69 66 0a 0a 23 20 4c ON=8.!endif..# L
b5b0: 69 6b 65 20 74 68 65 20 54 45 41 20 73 79 73 74 ike the TEA syst
b5c0: 65 6d 20 6f 6e 6c 79 20 73 65 74 20 74 68 69 73 em only set this
b5d0: 20 6e 6f 6e 20 65 6d 70 74 79 20 66 6f 72 20 6e non empty for n
b5e0: 6f 6e 2d 54 6b 20 65 78 74 65 6e 73 69 6f 6e 73 on-Tk extensions
b5f0: 0a 23 20 4e 6f 74 65 3a 20 73 6f 6d 65 20 65 78 .# Note: some ex
b600: 74 65 6e 73 69 6f 6e 73 20 75 73 65 20 50 41 43 tensions use PAC
b610: 4b 41 47 45 5f 4e 41 4d 45 20 61 6e 64 20 6f 74 KAGE_NAME and ot
b620: 68 65 72 73 20 75 73 65 20 50 41 43 4b 41 47 45 hers use PACKAGE
b630: 5f 54 43 4c 4e 41 4d 45 0a 23 20 73 6f 20 77 65 _TCLNAME.# so we
b640: 20 70 61 73 73 20 62 6f 74 68 0a 21 69 66 20 21 pass both.!if !
b650: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 $(DOING_TCL) &&
b660: 21 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 50 4b 47 !$(DOING_TK).PKG
b670: 4e 41 4d 45 46 4c 41 47 53 20 3d 20 2f 44 50 41 NAMEFLAGS = /DPA
b680: 43 4b 41 47 45 5f 4e 41 4d 45 3d 22 5c 22 24 28 CKAGE_NAME="\"$(
b690: 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e PRJ_PACKAGE_TCLN
b6a0: 41 4d 45 29 5c 22 22 20 5c 0a 20 20 20 20 20 20 AME)\"" \.
b6b0: 20 20 20 20 20 20 20 20 20 2f 44 50 41 43 4b 41 /DPACKA
b6c0: 47 45 5f 54 43 4c 4e 41 4d 45 3d 22 5c 22 24 28 GE_TCLNAME="\"$(
b6d0: 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e PRJ_PACKAGE_TCLN
b6e0: 41 4d 45 29 5c 22 22 20 5c 0a 20 20 20 20 20 20 AME)\"" \.
b6f0: 20 20 20 20 20 20 20 20 20 2f 44 50 41 43 4b 41 /DPACKA
b700: 47 45 5f 56 45 52 53 49 4f 4e 3d 22 5c 22 24 28 GE_VERSION="\"$(
b710: 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 22 20 5c DOTVERSION)\"" \
b720: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
b730: 2f 44 4d 4f 44 55 4c 45 5f 53 43 4f 50 45 3d 65 /DMODULE_SCOPE=e
b740: 78 74 65 72 6e 0a 21 65 6e 64 69 66 0a 0a 23 20 xtern.!endif..#
b750: 63 72 74 20 70 69 63 6b 73 20 74 68 65 20 43 20 crt picks the C
b760: 72 75 6e 20 74 69 6d 65 20 62 61 73 65 64 20 6f run time based o
b770: 6e 20 73 65 6c 65 63 74 65 64 20 4f 50 54 53 0a n selected OPTS.
b780: 21 69 66 20 24 28 4d 53 56 43 52 54 29 0a 21 69 !if $(MSVCRT).!i
b790: 66 20 24 28 44 45 42 55 47 29 20 26 26 20 21 24 f $(DEBUG) && !$
b7a0: 28 55 4e 43 48 45 43 4b 45 44 29 0a 63 72 74 20 (UNCHECKED).crt
b7b0: 3d 20 2d 4d 44 64 0a 21 65 6c 73 65 0a 63 72 74 = -MDd.!else.crt
b7c0: 20 3d 20 2d 4d 44 0a 21 65 6e 64 69 66 0a 21 65 = -MD.!endif.!e
b7d0: 6c 73 65 0a 21 69 66 20 24 28 44 45 42 55 47 29 lse.!if $(DEBUG)
b7e0: 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 && !$(UNCHECKED
b7f0: 29 0a 63 72 74 20 3d 20 2d 4d 54 64 0a 21 65 6c ).crt = -MTd.!el
b800: 73 65 0a 63 72 74 20 3d 20 2d 4d 54 0a 21 65 6e se.crt = -MT.!en
b810: 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 20 63 64 dif.!endif..# cd
b820: 65 62 75 67 20 69 6e 63 6c 75 64 65 73 20 63 6f ebug includes co
b830: 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 66 mpiler options f
b840: 6f 72 20 64 65 62 75 67 67 69 6e 67 20 61 73 20 or debugging as
b850: 77 65 6c 6c 20 61 73 20 6f 70 74 69 6d 69 7a 61 well as optimiza
b860: 74 69 6f 6e 2e 0a 21 69 66 20 24 28 44 45 42 55 tion..!if $(DEBU
b870: 47 29 0a 0a 23 20 49 6e 20 64 65 62 75 67 67 69 G)..# In debuggi
b880: 6e 67 20 6d 6f 64 65 2c 20 6f 70 74 69 6d 69 7a ng mode, optimiz
b890: 61 74 69 6f 6e 73 20 6e 65 65 64 20 74 6f 20 62 ations need to b
b8a0: 65 20 64 69 73 61 62 6c 65 64 0a 63 64 65 62 75 e disabled.cdebu
b8b0: 67 20 3d 20 2d 5a 69 20 2d 4f 64 20 24 28 44 45 g = -Zi -Od $(DE
b8c0: 42 55 47 46 4c 41 47 53 29 0a 0a 21 65 6c 73 65 BUGFLAGS)..!else
b8d0: 0a 0a 63 64 65 62 75 67 20 3d 20 24 28 4f 50 54 ..cdebug = $(OPT
b8e0: 49 4d 49 5a 41 54 49 4f 4e 53 29 0a 21 69 66 20 IMIZATIONS).!if
b8f0: 24 28 53 59 4d 42 4f 4c 53 29 0a 63 64 65 62 75 $(SYMBOLS).cdebu
b900: 67 20 3d 20 24 28 63 64 65 62 75 67 29 20 2d 5a g = $(cdebug) -Z
b910: 69 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 i.!endif..!endif
b920: 20 23 20 24 28 44 45 42 55 47 29 0a 0a 23 20 63 # $(DEBUG)..# c
b930: 77 61 72 6e 20 69 6e 63 6c 75 64 65 73 20 64 65 warn includes de
b940: 66 61 75 6c 74 20 77 61 72 6e 69 6e 67 20 6c 65 fault warning le
b950: 76 65 6c 73 2c 20 61 6c 73 6f 20 43 34 30 39 30 vels, also C4090
b960: 20 28 62 75 67 67 79 29 20 61 6e 64 20 43 34 31 (buggy) and C41
b970: 34 36 20 69 73 20 75 73 65 6c 65 73 73 2e 0a 63 46 is useless..c
b980: 77 61 72 6e 20 3d 20 24 28 57 41 52 4e 49 4e 47 warn = $(WARNING
b990: 53 29 20 2d 77 64 34 30 39 30 20 2d 77 64 34 31 S) -wd4090 -wd41
b9a0: 34 36 0a 0a 21 69 66 20 22 24 28 4d 41 43 48 49 46..!if "$(MACHI
b9b0: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 NE)" == "AMD64"
b9c0: 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 || "$(MACHINE)"
b9d0: 3d 3d 20 22 41 52 4d 36 34 22 0a 23 20 44 69 73 == "ARM64".# Dis
b9e0: 61 62 6c 65 20 70 6f 69 6e 74 65 72 3c 2d 3e 69 able pointer<->i
b9f0: 6e 74 20 77 61 72 6e 69 6e 67 73 20 72 65 6c 61 nt warnings rela
ba00: 74 65 64 20 74 6f 20 63 61 73 74 20 62 65 74 77 ted to cast betw
ba10: 65 65 6e 20 64 69 66 66 65 72 65 6e 74 20 73 69 een different si
ba20: 7a 65 73 0a 23 20 54 68 65 72 65 20 61 72 65 20 zes.# There are
ba30: 61 20 67 61 64 7a 69 6c 6c 69 6f 6e 20 6f 66 20 a gadzillion of
ba40: 74 68 65 73 65 20 64 75 65 20 74 6f 20 75 73 65 these due to use
ba50: 20 6f 66 20 43 6c 69 65 6e 74 44 61 74 61 20 61 of ClientData a
ba60: 6e 64 0a 23 20 63 6c 75 74 74 65 72 20 75 70 20 nd.# clutter up
ba70: 63 6f 6d 70 69 6c 65 72 0a 23 20 6f 75 74 70 75 compiler.# outpu
ba80: 74 20 69 6e 63 72 65 61 73 69 6e 67 20 63 68 61 t increasing cha
ba90: 6e 63 65 20 6f 66 20 61 20 72 65 61 6c 20 77 61 nce of a real wa
baa0: 72 6e 69 6e 67 20 67 65 74 74 69 6e 67 20 6c 6f rning getting lo
bab0: 73 74 2e 20 53 6f 20 64 69 73 61 62 6c 65 20 74 st. So disable t
bac0: 68 65 6d 2e 0a 23 20 45 76 65 6e 74 75 61 6c 6c hem..# Eventuall
bad0: 79 20 73 6f 6d 65 20 64 61 79 2c 20 54 63 6c 20 y some day, Tcl
bae0: 77 69 6c 6c 20 62 65 20 36 34 2d 62 69 74 20 63 will be 64-bit c
baf0: 6c 65 61 6e 2e 0a 63 77 61 72 6e 20 3d 20 24 28 lean..cwarn = $(
bb00: 63 77 61 72 6e 29 20 2d 77 64 34 33 31 31 20 2d cwarn) -wd4311 -
bb10: 77 64 34 33 31 32 0a 21 65 6e 64 69 66 0a 0a 23 wd4312.!endif..#
bb20: 23 23 20 43 6f 6d 6d 6f 6e 20 63 6f 6d 70 69 6c ## Common compil
bb30: 65 72 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 er options that
bb40: 61 72 65 20 61 72 63 68 69 74 65 63 74 75 72 65 are architecture
bb50: 20 73 70 65 63 69 66 69 63 0a 21 69 66 20 22 24 specific.!if "$
bb60: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 (MACHINE)" == "A
bb70: 52 4d 22 0a 63 61 72 63 68 20 3d 20 2f 44 5f 41 RM".carch = /D_A
bb80: 52 4d 5f 57 49 4e 41 50 49 5f 50 41 52 54 49 54 RM_WINAPI_PARTIT
bb90: 49 4f 4e 5f 44 45 53 4b 54 4f 50 5f 53 44 4b 5f ION_DESKTOP_SDK_
bba0: 41 56 41 49 4c 41 42 4c 45 0a 21 65 6c 73 65 0a AVAILABLE.!else.
bbb0: 63 61 72 63 68 20 3d 0a 21 65 6e 64 69 66 0a 0a carch =.!endif..
bbc0: 23 20 63 70 75 69 64 20 69 73 20 6f 6e 6c 79 20 # cpuid is only
bbd0: 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 69 6e 74 available on int
bbe0: 65 6c 20 6d 61 63 68 69 6e 65 73 0a 21 69 66 20 el machines.!if
bbf0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
bc00: 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 "IX86" || "$(MAC
bc10: 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 HINE)" == "AMD64
bc20: 22 0a 63 61 72 63 68 20 3d 20 24 28 63 61 72 63 ".carch = $(carc
bc30: 68 29 20 2f 44 48 41 56 45 5f 43 50 55 49 44 3d h) /DHAVE_CPUID=
bc40: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 1.!endif..!if $(
bc50: 44 45 42 55 47 29 0a 23 20 54 75 72 6e 20 77 61 DEBUG).# Turn wa
bc60: 72 6e 69 6e 67 73 20 69 6e 74 6f 20 65 72 72 6f rnings into erro
bc70: 72 73 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 61 rs.cwarn = $(cwa
bc80: 72 6e 29 20 2d 57 58 0a 21 65 6e 64 69 66 0a 0a rn) -WX.!endif..
bc90: 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 54 43 4c INCLUDES = $(TCL
bca0: 5f 49 4e 43 4c 55 44 45 53 29 20 24 28 54 4b 5f _INCLUDES) $(TK_
bcb0: 49 4e 43 4c 55 44 45 53 29 20 24 28 50 52 4a 5f INCLUDES) $(PRJ_
bcc0: 49 4e 43 4c 55 44 45 53 29 0a 21 69 66 20 21 24 INCLUDES).!if !$
bcd0: 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 (DOING_TCL) && !
bce0: 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 49 4e 43 4c $(DOING_TK).INCL
bcf0: 55 44 45 53 20 3d 20 24 28 49 4e 43 4c 55 44 45 UDES = $(INCLUDE
bd00: 53 29 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 S) -I"$(GENERICD
bd10: 49 52 29 22 20 2d 49 22 24 28 57 49 4e 5f 44 49 IR)" -I"$(WIN_DI
bd20: 52 29 22 20 2d 49 22 24 28 43 4f 4d 50 41 54 44 R)" -I"$(COMPATD
bd30: 49 52 29 22 0a 21 65 6e 64 69 66 0a 0a 23 20 54 IR)".!endif..# T
bd40: 68 65 73 65 20 66 6c 61 67 73 20 61 72 65 20 64 hese flags are d
bd50: 65 66 69 6e 65 64 20 72 6f 75 67 68 6c 79 20 69 efined roughly i
bd60: 6e 20 74 68 65 20 6f 72 64 65 72 20 6f 66 20 74 n the order of t
bd70: 68 65 20 70 72 65 2d 72 65 66 6f 72 6d 0a 23 20 he pre-reform.#
bd80: 72 75 6c 65 73 2e 76 63 2f 6d 61 6b 65 66 69 6c rules.vc/makefil
bd90: 65 2e 76 63 20 74 6f 20 68 65 6c 70 20 76 69 73 e.vc to help vis
bda0: 75 61 6c 6c 79 20 63 6f 6d 70 61 72 65 20 74 68 ually compare th
bdb0: 61 74 20 74 68 65 20 70 72 65 2d 20 61 6e 64 0a at the pre- and.
bdc0: 23 20 70 6f 73 74 2d 72 65 66 6f 72 6d 20 62 75 # post-reform bu
bdd0: 69 6c 64 20 6c 6f 67 73 0a 0a 23 20 63 66 6c 61 ild logs..# cfla
bde0: 67 73 20 63 6f 6e 74 61 69 6e 73 20 67 65 6e 65 gs contains gene
bdf0: 72 69 63 20 66 6c 61 67 73 20 75 73 65 64 20 66 ric flags used f
be00: 6f 72 20 62 75 69 6c 64 69 6e 67 20 70 72 61 63 or building prac
be10: 74 69 63 61 6c 6c 79 20 61 6c 6c 20 6f 62 6a 65 tically all obje
be20: 63 74 20 66 69 6c 65 73 0a 63 66 6c 61 67 73 20 ct files.cflags
be30: 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d 63 20 24 28 43 = -nologo -c $(C
be40: 4f 4d 50 49 4c 45 52 46 4c 41 47 53 29 20 24 28 OMPILERFLAGS) $(
be50: 63 61 72 63 68 29 20 24 28 63 77 61 72 6e 29 20 carch) $(cwarn)
be60: 2d 46 70 24 28 54 4d 50 5f 44 49 52 29 5e 5c 20 -Fp$(TMP_DIR)^\
be70: 24 28 63 64 65 62 75 67 29 0a 0a 23 20 61 70 70 $(cdebug)..# app
be80: 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 cflags contains
be90: 24 28 63 66 6c 61 67 73 29 20 61 6e 64 20 66 6c $(cflags) and fl
bea0: 61 67 73 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 ags for building
beb0: 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e the application
bec0: 0a 23 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 .# object files
bed0: 28 65 2e 67 2e 20 74 63 6c 73 68 2c 20 6f 72 20 (e.g. tclsh, or
bee0: 77 69 73 68 29 20 70 6b 67 63 66 6c 61 67 73 20 wish) pkgcflags
bef0: 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 contains $(cflag
bf00: 73 29 20 70 6c 75 73 0a 23 20 66 6c 61 67 73 20 s) plus.# flags
bf10: 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e used for buildin
bf20: 67 20 73 68 61 72 65 64 20 6f 62 6a 65 63 74 20 g shared object
bf30: 66 69 6c 65 73 20 54 68 65 20 74 77 6f 20 64 69 files The two di
bf40: 66 66 65 72 20 69 6e 20 74 68 65 0a 23 20 42 55 ffer in the.# BU
bf50: 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 20 6d ILD_$(PROJECT) m
bf60: 61 63 72 6f 20 77 68 69 63 68 20 73 68 6f 75 6c acro which shoul
bf70: 64 20 62 65 20 64 65 66 69 6e 65 64 20 6f 6e 6c d be defined onl
bf80: 79 20 66 6f 72 20 74 68 65 20 73 68 61 72 65 64 y for the shared
bf90: 0a 23 20 6c 69 62 72 61 72 79 20 2a 69 6d 70 6c .# library *impl
bfa0: 65 6d 65 6e 74 61 74 69 6f 6e 2a 20 61 6e 64 20 ementation* and
bfb0: 6e 6f 74 20 66 6f 72 20 69 74 73 20 63 61 6c 6c not for its call
bfc0: 65 72 20 69 6e 74 65 72 66 61 63 65 0a 0a 61 70 er interface..ap
bfd0: 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 pcflags_nostubs
bfe0: 3d 20 24 28 63 66 6c 61 67 73 29 20 24 28 63 72 = $(cflags) $(cr
bff0: 74 29 20 24 28 49 4e 43 4c 55 44 45 53 29 20 24 t) $(INCLUDES) $
c000: 28 54 43 4c 5f 44 45 46 49 4e 45 53 29 20 24 28 (TCL_DEFINES) $(
c010: 50 52 4a 5f 44 45 46 49 4e 45 53 29 20 24 28 4f PRJ_DEFINES) $(O
c020: 50 54 44 45 46 49 4e 45 53 29 0a 61 70 70 63 66 PTDEFINES).appcf
c030: 6c 61 67 73 20 3d 20 24 28 61 70 70 63 66 6c 61 lags = $(appcfla
c040: 67 73 5f 6e 6f 73 74 75 62 73 29 20 24 28 55 53 gs_nostubs) $(US
c050: 45 5f 53 54 55 42 53 5f 44 45 46 53 29 0a 70 6b E_STUBS_DEFS).pk
c060: 67 63 66 6c 61 67 73 20 3d 20 24 28 61 70 70 63 gcflags = $(appc
c070: 66 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 flags) $(PKGNAME
c080: 46 4c 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 FLAGS) /DBUILD_$
c090: 28 50 52 4f 4a 45 43 54 29 0a 70 6b 67 63 66 6c (PROJECT).pkgcfl
c0a0: 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 24 28 ags_nostubs = $(
c0b0: 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 appcflags_nostub
c0c0: 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c 41 47 s) $(PKGNAMEFLAG
c0d0: 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 52 4f S) /DBUILD_$(PRO
c0e0: 4a 45 43 54 29 0a 0a 23 20 73 74 75 62 73 63 66 JECT)..# stubscf
c0f0: 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 lags contains $(
c100: 63 66 6c 61 67 73 29 20 70 6c 75 73 20 66 6c 61 cflags) plus fla
c110: 67 73 20 75 73 65 64 20 66 6f 72 20 62 75 69 6c gs used for buil
c120: 64 69 6e 67 20 61 20 73 74 75 62 73 0a 23 20 6c ding a stubs.# l
c130: 69 62 72 61 72 79 20 66 6f 72 20 74 68 65 20 70 ibrary for the p
c140: 61 63 6b 61 67 65 2e 20 20 4e 6f 74 65 3a 20 2f ackage. Note: /
c150: 44 53 54 41 54 49 43 5f 42 55 49 4c 44 20 69 73 DSTATIC_BUILD is
c160: 20 64 65 66 69 6e 65 64 20 69 6e 0a 23 20 24 28 defined in.# $(
c170: 4f 50 54 44 45 46 49 4e 45 53 29 20 6f 6e 6c 79 OPTDEFINES) only
c180: 20 69 66 20 74 68 65 20 4f 50 54 53 20 63 6f 6e if the OPTS con
c190: 66 69 67 75 72 61 74 69 6f 6e 20 69 6e 64 69 63 figuration indic
c1a0: 61 74 65 73 20 61 20 73 74 61 74 69 63 0a 23 20 ates a static.#
c1b0: 6c 69 62 72 61 72 79 2e 20 48 6f 77 65 76 65 72 library. However
c1c0: 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 72 61 the stubs libra
c1d0: 72 79 20 69 73 20 41 4c 57 41 59 53 20 73 74 61 ry is ALWAYS sta
c1e0: 74 69 63 20 68 65 6e 63 65 20 69 6e 63 6c 75 64 tic hence includ
c1f0: 65 64 0a 23 20 68 65 72 65 20 69 72 72 65 73 70 ed.# here irresp
c200: 65 63 74 69 76 65 20 6f 66 20 74 68 65 20 4f 50 ective of the OP
c210: 54 53 20 73 65 74 74 69 6e 67 2e 0a 23 0a 23 20 TS setting..#.#
c220: 54 42 44 20 2d 20 74 63 6c 76 66 73 20 68 61 73 TBD - tclvfs has
c230: 20 61 20 63 6f 6d 6d 65 6e 74 20 74 68 61 74 20 a comment that
c240: 73 74 75 62 73 20 6c 69 62 73 20 73 68 6f 75 6c stubs libs shoul
c250: 64 20 6e 6f 74 20 62 65 20 63 6f 6d 70 69 6c 65 d not be compile
c260: 64 20 77 69 74 68 20 2d 47 4c 0a 23 20 77 69 74 d with -GL.# wit
c270: 68 6f 75 74 20 73 74 61 74 69 6e 67 20 77 68 79 hout stating why
c280: 2e 20 54 63 6c 20 69 74 73 65 6c 66 20 63 6f 6d . Tcl itself com
c290: 70 69 6c 65 64 20 73 74 75 62 73 20 6c 69 62 73 piled stubs libs
c2a0: 20 77 69 74 68 20 74 68 69 73 20 66 6c 61 67 2e with this flag.
c2b0: 0a 23 20 73 6f 20 77 65 20 64 6f 20 6e 6f 74 20 .# so we do not
c2c0: 72 65 6d 6f 76 65 20 69 74 20 66 72 6f 6d 20 63 remove it from c
c2d0: 66 6c 61 67 73 2e 20 2d 47 4c 20 6d 61 79 20 70 flags. -GL may p
c2e0: 72 65 76 65 6e 74 20 65 78 74 65 6e 73 69 6f 6e revent extension
c2f0: 73 0a 23 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 s.# compiled wit
c300: 68 20 6f 6e 65 20 56 43 20 76 65 72 73 69 6f 6e h one VC version
c310: 20 74 6f 20 66 61 69 6c 20 74 6f 20 6c 69 6e 6b to fail to link
c320: 20 61 67 61 69 6e 73 74 20 73 74 75 62 73 20 6c against stubs l
c330: 69 62 72 61 72 79 0a 23 20 63 6f 6d 70 69 6c 65 ibrary.# compile
c340: 64 20 77 69 74 68 20 61 6e 6f 74 68 65 72 20 56 d with another V
c350: 43 20 76 65 72 73 69 6f 6e 2e 20 43 68 65 63 6b C version. Check
c360: 20 66 6f 72 20 74 68 69 73 20 61 6e 64 20 66 69 for this and fi
c370: 78 20 61 63 63 6f 72 64 69 6e 67 6c 79 2e 0a 73 x accordingly..s
c380: 74 75 62 73 63 66 6c 61 67 73 20 3d 20 24 28 63 tubscflags = $(c
c390: 66 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 4d 45 flags) $(PKGNAME
c3a0: 46 4c 41 47 53 29 20 24 28 50 52 4a 5f 44 45 46 FLAGS) $(PRJ_DEF
c3b0: 49 4e 45 53 29 20 24 28 4f 50 54 44 45 46 49 4e INES) $(OPTDEFIN
c3c0: 45 53 29 20 2f 5a 6c 20 2f 47 4c 2d 20 2f 44 53 ES) /Zl /GL- /DS
c3d0: 54 41 54 49 43 5f 42 55 49 4c 44 20 24 28 49 4e TATIC_BUILD $(IN
c3e0: 43 4c 55 44 45 53 29 20 24 28 55 53 45 5f 53 54 CLUDES) $(USE_ST
c3f0: 55 42 53 5f 44 45 46 53 29 0a 0a 23 20 4c 69 6e UBS_DEFS)..# Lin
c400: 6b 20 66 6c 61 67 73 0a 0a 21 69 66 20 24 28 44 k flags..!if $(D
c410: 45 42 55 47 29 0a 6c 64 65 62 75 67 09 3d 20 2d EBUG).ldebug.= -
c420: 64 65 62 75 67 20 2d 64 65 62 75 67 74 79 70 65 debug -debugtype
c430: 3a 63 76 0a 21 65 6c 73 65 0a 6c 64 65 62 75 67 :cv.!else.ldebug
c440: 09 3d 20 2d 72 65 6c 65 61 73 65 20 2d 6f 70 74 .= -release -opt
c450: 3a 72 65 66 20 2d 6f 70 74 3a 69 63 66 2c 33 0a :ref -opt:icf,3.
c460: 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 29 0a 6c !if $(SYMBOLS).l
c470: 64 65 62 75 67 09 3d 20 24 28 6c 64 65 62 75 67 debug.= $(ldebug
c480: 29 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67 74 ) -debug -debugt
c490: 79 70 65 3a 63 76 0a 21 65 6e 64 69 66 0a 21 65 ype:cv.!endif.!e
c4a0: 6e 64 69 66 0a 0a 23 20 4e 6f 74 65 3a 20 50 72 ndif..# Note: Pr
c4b0: 6f 66 69 6c 69 6e 67 20 69 73 20 63 75 72 72 65 ofiling is curre
c4c0: 6e 74 6c 79 20 6f 6e 6c 79 20 70 6f 73 73 69 62 ntly only possib
c4d0: 6c 65 20 77 69 74 68 20 74 68 65 20 56 69 73 75 le with the Visu
c4e0: 61 6c 20 53 74 75 64 69 6f 20 45 6e 74 65 72 70 al Studio Enterp
c4f0: 72 69 73 65 0a 21 69 66 20 24 28 50 52 4f 46 49 rise.!if $(PROFI
c500: 4c 45 29 0a 6c 64 65 62 75 67 3d 20 24 28 6c 64 LE).ldebug= $(ld
c510: 65 62 75 67 29 20 2d 70 72 6f 66 69 6c 65 0a 21 ebug) -profile.!
c520: 65 6e 64 69 66 0a 0a 23 23 23 20 44 65 63 6c 61 endif..### Decla
c530: 72 61 74 69 6f 6e 73 20 63 6f 6d 6d 6f 6e 20 74 rations common t
c540: 6f 20 61 6c 6c 20 6c 69 6e 6b 65 72 20 76 65 72 o all linker ver
c550: 73 69 6f 6e 73 0a 6c 66 6c 61 67 73 09 3d 20 2d sions.lflags.= -
c560: 6e 6f 6c 6f 67 6f 20 2d 6d 61 63 68 69 6e 65 3a nologo -machine:
c570: 24 28 4d 41 43 48 49 4e 45 29 20 24 28 4c 49 4e $(MACHINE) $(LIN
c580: 4b 45 52 46 4c 41 47 53 29 20 24 28 6c 64 65 62 KERFLAGS) $(ldeb
c590: 75 67 29 0a 0a 21 69 66 20 24 28 4d 53 56 43 52 ug)..!if $(MSVCR
c5a0: 54 29 20 26 26 20 21 28 24 28 44 45 42 55 47 29 T) && !($(DEBUG)
c5b0: 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 && !$(UNCHECKED
c5c0: 29 29 20 26 26 20 24 28 56 43 56 45 52 53 49 4f )) && $(VCVERSIO
c5d0: 4e 29 20 3e 3d 20 31 39 30 30 0a 6c 66 6c 61 67 N) >= 1900.lflag
c5e0: 73 09 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 6e s.= $(lflags) -n
c5f0: 6f 64 65 66 61 75 6c 74 6c 69 62 3a 6c 69 62 75 odefaultlib:libu
c600: 63 72 74 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a crt.lib.!endif..
c610: 64 6c 6c 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 dlllflags = $(lf
c620: 6c 61 67 73 29 20 2d 64 6c 6c 0a 63 6f 6e 6c 66 lags) -dll.conlf
c630: 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 lags = $(lflags)
c640: 20 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 -subsystem:cons
c650: 6f 6c 65 0a 67 75 69 6c 66 6c 61 67 73 20 3d 20 ole.guilflags =
c660: 24 28 6c 66 6c 61 67 73 29 20 2d 73 75 62 73 79 $(lflags) -subsy
c670: 73 74 65 6d 3a 77 69 6e 64 6f 77 73 0a 0a 23 20 stem:windows..#
c680: 4c 69 62 72 61 72 69 65 73 20 74 68 61 74 20 61 Libraries that a
c690: 72 65 20 72 65 71 75 69 72 65 64 20 66 6f 72 20 re required for
c6a0: 65 76 65 72 79 20 69 6d 61 67 65 2e 0a 23 20 45 every image..# E
c6b0: 78 74 65 6e 73 69 6f 6e 73 20 73 68 6f 75 6c 64 xtensions should
c6c0: 20 64 65 66 69 6e 65 20 61 6e 79 20 61 64 64 69 define any addi
c6d0: 74 69 6f 6e 61 6c 20 6c 69 62 72 61 72 69 65 73 tional libraries
c6e0: 20 77 69 74 68 20 24 28 50 52 4a 5f 4c 49 42 53 with $(PRJ_LIBS
c6f0: 29 0a 77 69 6e 6c 69 62 73 20 20 20 3d 20 6b 65 ).winlibs = ke
c700: 72 6e 65 6c 33 32 2e 6c 69 62 20 61 64 76 61 70 rnel32.lib advap
c710: 69 33 32 2e 6c 69 62 0a 0a 21 69 66 20 24 28 4e i32.lib..!if $(N
c720: 45 45 44 5f 54 4b 29 0a 77 69 6e 6c 69 62 73 20 EED_TK).winlibs
c730: 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 67 64 69 = $(winlibs) gdi
c740: 33 32 2e 6c 69 62 20 75 73 65 72 33 32 2e 6c 69 32.lib user32.li
c750: 62 20 75 78 74 68 65 6d 65 2e 6c 69 62 0a 21 65 b uxtheme.lib.!e
c760: 6e 64 69 66 0a 0a 23 20 41 76 6f 69 64 20 27 75 ndif..# Avoid 'u
c770: 6e 72 65 73 6f 6c 76 65 64 20 65 78 74 65 72 6e nresolved extern
c780: 61 6c 20 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 75 al symbol __secu
c790: 72 69 74 79 5f 63 6f 6f 6b 69 65 27 20 65 72 72 rity_cookie' err
c7a0: 6f 72 73 2e 0a 23 20 63 2e 66 2e 20 68 74 74 70 ors..# c.f. http
c7b0: 3a 2f 2f 73 75 70 70 6f 72 74 2e 6d 69 63 72 6f ://support.micro
c7c0: 73 6f 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 39 34 soft.com/?id=894
c7d0: 35 37 33 0a 21 69 66 20 22 24 28 4d 41 43 48 49 573.!if "$(MACHI
c7e0: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a NE)" == "AMD64".
c7f0: 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 !if $(VCVERSION)
c800: 20 3e 20 31 33 39 39 20 26 26 20 24 28 56 43 56 > 1399 && $(VCV
c810: 45 52 53 49 4f 4e 29 20 3c 20 31 35 30 30 0a 77 ERSION) < 1500.w
c820: 69 6e 6c 69 62 73 20 20 20 3d 20 24 28 77 69 6e inlibs = $(win
c830: 6c 69 62 73 29 20 62 75 66 66 65 72 6f 76 65 72 libs) bufferover
c840: 66 6c 6f 77 55 2e 6c 69 62 0a 21 65 6e 64 69 66 flowU.lib.!endif
c850: 0a 21 65 6e 64 69 66 0a 0a 62 61 73 65 6c 69 62 .!endif..baselib
c860: 73 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 24 s = $(winlibs) $
c870: 28 50 52 4a 5f 4c 49 42 53 29 0a 0a 21 69 66 20 (PRJ_LIBS)..!if
c880: 24 28 4d 53 56 43 52 54 29 20 26 26 20 21 28 24 $(MSVCRT) && !($
c890: 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 4e (DEBUG) && !$(UN
c8a0: 43 48 45 43 4b 45 44 29 29 20 26 26 20 24 28 56 CHECKED)) && $(V
c8b0: 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 39 30 CVERSION) >= 190
c8c0: 30 0a 62 61 73 65 6c 69 62 73 20 20 20 3d 20 24 0.baselibs = $
c8d0: 28 62 61 73 65 6c 69 62 73 29 20 75 63 72 74 2e (baselibs) ucrt.
c8e0: 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 lib.!endif..####
c8f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c900: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c910: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c920: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 ############.# 1
c930: 33 2e 20 44 65 66 69 6e 65 20 73 74 61 6e 64 61 3. Define standa
c940: 72 64 20 63 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d rd commands, com
c950: 6d 6f 6e 20 6d 61 6b 65 20 74 61 72 67 65 74 73 mon make targets
c960: 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 and implicit ru
c970: 6c 65 73 0a 0a 43 43 50 4b 47 43 4d 44 20 3d 20 les..CCPKGCMD =
c980: 24 28 63 63 33 32 29 20 24 28 70 6b 67 63 66 6c $(cc32) $(pkgcfl
c990: 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 ags) -Fo$(TMP_DI
c9a0: 52 29 5e 5c 0a 43 43 41 50 50 43 4d 44 20 3d 20 R)^\.CCAPPCMD =
c9b0: 24 28 63 63 33 32 29 20 24 28 61 70 70 63 66 6c $(cc32) $(appcfl
c9c0: 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 ags) -Fo$(TMP_DI
c9d0: 52 29 5e 5c 0a 43 43 53 54 55 42 53 43 4d 44 20 R)^\.CCSTUBSCMD
c9e0: 3d 20 24 28 63 63 33 32 29 20 24 28 73 74 75 62 = $(cc32) $(stub
c9f0: 73 63 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d scflags) -Fo$(TM
ca00: 50 5f 44 49 52 29 5e 5c 0a 0a 4c 49 42 43 4d 44 P_DIR)^\..LIBCMD
ca10: 20 3d 20 24 28 6c 69 62 33 32 29 20 2d 6e 6f 6c = $(lib32) -nol
ca20: 6f 67 6f 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 ogo $(LINKERFLAG
ca30: 53 29 20 2d 6f 75 74 3a 24 40 0a 44 4c 4c 43 4d S) -out:$@.DLLCM
ca40: 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 D = $(link32) $(
ca50: 64 6c 6c 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a dlllflags) -out:
ca60: 24 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 $@ $(baselibs) $
ca70: 28 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 (tcllibs) $(tkli
ca80: 62 73 29 0a 0a 43 4f 4e 45 58 45 43 4d 44 20 3d bs)..CONEXECMD =
ca90: 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 63 6f 6e $(link32) $(con
caa0: 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 lflags) -out:$@
cab0: 24 28 62 61 73 65 6c 69 62 73 29 20 24 28 74 63 $(baselibs) $(tc
cac0: 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 73 29 llibs) $(tklibs)
cad0: 0a 47 55 49 45 58 45 43 4d 44 20 3d 20 24 28 6c .GUIEXECMD = $(l
cae0: 69 6e 6b 33 32 29 20 24 28 67 75 69 6c 66 6c 61 ink32) $(guilfla
caf0: 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 gs) -out:$@ $(ba
cb00: 73 65 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 selibs) $(tcllib
cb10: 73 29 20 24 28 74 6b 6c 69 62 73 29 0a 52 45 53 s) $(tklibs).RES
cb20: 43 4d 44 20 20 3d 20 24 28 72 63 33 32 29 20 2d CMD = $(rc32) -
cb30: 66 6f 20 24 40 20 2d 72 20 2d 69 20 22 24 28 47 fo $@ -r -i "$(G
cb40: 45 4e 45 52 49 43 44 49 52 29 22 20 2d 69 20 22 ENERICDIR)" -i "
cb50: 24 28 54 4d 50 5f 44 49 52 29 22 20 5c 0a 09 20 $(TMP_DIR)" \..
cb60: 20 20 20 24 28 54 43 4c 5f 49 4e 43 4c 55 44 45 $(TCL_INCLUDE
cb70: 53 29 20 5c 0a 09 20 20 20 20 2f 44 44 45 42 55 S) \.. /DDEBU
cb80: 47 3d 24 28 44 45 42 55 47 29 20 2d 64 20 55 4e G=$(DEBUG) -d UN
cb90: 43 48 45 43 4b 45 44 3d 24 28 55 4e 43 48 45 43 CHECKED=$(UNCHEC
cba0: 4b 45 44 29 20 5c 0a 09 20 20 20 20 2f 44 43 4f KED) \.. /DCO
cbb0: 4d 4d 41 56 45 52 53 49 4f 4e 3d 24 28 52 43 43 MMAVERSION=$(RCC
cbc0: 4f 4d 4d 41 56 45 52 53 49 4f 4e 29 20 5c 0a 09 OMMAVERSION) \..
cbd0: 20 20 20 20 2f 44 44 4f 54 56 45 52 53 49 4f 4e /DDOTVERSION
cbe0: 3d 5c 22 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 =\"$(DOTVERSION)
cbf0: 5c 22 20 5c 0a 09 20 20 20 20 2f 44 56 45 52 53 \" \.. /DVERS
cc00: 49 4f 4e 3d 5c 22 24 28 56 45 52 53 49 4f 4e 29 ION=\"$(VERSION)
cc10: 5c 22 20 5c 0a 09 20 20 20 20 2f 44 53 55 46 58 \" \.. /DSUFX
cc20: 3d 5c 22 24 28 53 55 46 58 29 5c 22 20 5c 0a 09 =\"$(SUFX)\" \..
cc30: 20 20 20 20 2f 44 50 52 4f 4a 45 43 54 3d 5c 22 /DPROJECT=\"
cc40: 24 28 50 52 4f 4a 45 43 54 29 5c 22 20 5c 0a 09 $(PROJECT)\" \..
cc50: 20 20 20 20 2f 44 50 52 4a 4c 49 42 4e 41 4d 45 /DPRJLIBNAME
cc60: 3d 5c 22 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 =\"$(PRJLIBNAME)
cc70: 5c 22 0a 0a 21 69 66 6e 64 65 66 20 44 45 46 41 \"..!ifndef DEFA
cc80: 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 ULT_BUILD_TARGET
cc90: 0a 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 .DEFAULT_BUILD_T
cca0: 41 52 47 45 54 20 3d 20 24 28 50 52 4f 4a 45 43 ARGET = $(PROJEC
ccb0: 54 29 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 T).!endif..defau
ccc0: 6c 74 2d 74 61 72 67 65 74 3a 20 24 28 44 45 46 lt-target: $(DEF
ccd0: 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 AULT_BUILD_TARGE
cce0: 54 29 0a 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 T)..!if $(MULTIP
ccf0: 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 LATFORM_INSTALL)
cd00: 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 .default-pkginde
cd10: 78 3a 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 x:..@echo if {[p
cd20: 61 63 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 ackage vsatisfie
cd30: 73 20 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 s [package provi
cd40: 64 65 20 54 63 6c 5d 20 39 2e 30 2d 5d 7d 20 7b de Tcl] 9.0-]} {
cd50: 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b > $(OUT_DIR)\pk
cd60: 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 gIndex.tcl..@ech
cd70: 6f 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 o package ifneed
cd80: 65 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 ed $(PRJ_PACKAGE
cd90: 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 _TCLNAME) $(DOTV
cda0: 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b ERSION) \.. [
cdb0: 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 list load [file
cdc0: 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 50 4c 41 join $$dir $(PLA
cdd0: 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 20 TFORM_IDENTIFY)
cde0: 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d $(PRJLIBNAME9)]]
cdf0: 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 >> $(OUT_DIR)\p
ce00: 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 kgIndex.tcl..@ec
ce10: 68 6f 20 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24 ho } else { >> $
ce20: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
ce30: 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 ex.tcl..@echo pa
ce40: 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 ckage ifneeded $
ce50: 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c (PRJ_PACKAGE_TCL
ce60: 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 NAME) $(DOTVERSI
ce70: 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 ON) \.. [list
ce80: 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e load [file join
ce90: 20 24 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 $$dir $(PLATFOR
cea0: 4d 5f 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 M_IDENTIFY) $(PR
ceb0: 4a 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 JLIBNAME8)]] >>
cec0: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
ced0: 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d dex.tcl..@echo }
cee0: 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 >> $(OUT_DIR)\p
cef0: 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 21 65 6c 73 kgIndex.tcl.!els
cf00: 65 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 e.default-pkgind
cf10: 65 78 3a 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b ex:..@echo if {[
cf20: 70 61 63 6b 61 67 65 20 76 73 61 74 69 73 66 69 package vsatisfi
cf30: 65 73 20 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 es [package prov
cf40: 69 64 65 20 54 63 6c 5d 20 39 2e 30 2d 5d 7d 20 ide Tcl] 9.0-]}
cf50: 7b 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 { > $(OUT_DIR)\p
cf60: 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 kgIndex.tcl..@ec
cf70: 68 6f 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 ho package ifnee
cf80: 64 65 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 ded $(PRJ_PACKAG
cf90: 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 E_TCLNAME) $(DOT
cfa0: 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 VERSION) \..
cfb0: 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 [list load [file
cfc0: 20 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 join $$dir $(PR
cfd0: 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 JLIBNAME9)]] >>
cfe0: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
cff0: 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d dex.tcl..@echo }
d000: 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 else { >> $(OUT
d010: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
d020: 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 cl..@echo packag
d030: 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a e ifneeded $(PRJ
d040: 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 _PACKAGE_TCLNAME
d050: 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 ) $(DOTVERSION)
d060: 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 \.. [list loa
d070: 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 d [file join $$d
d080: 69 72 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 ir $(PRJLIBNAME8
d090: 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 )]] >> $(OUT_DIR
d0a0: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 )\pkgIndex.tcl..
d0b0: 40 65 63 68 6f 20 7d 20 3e 3e 20 24 28 4f 55 54 @echo } >> $(OUT
d0c0: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
d0d0: 63 6c 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 cl.!endif..defau
d0e0: 6c 74 2d 70 6b 67 69 6e 64 65 78 2d 74 65 61 3a lt-pkgindex-tea:
d0f0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 52 4f ..@if exist $(RO
d100: 4f 54 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c OT)\pkgIndex.tcl
d110: 2e 69 6e 20 6e 6d 61 6b 65 68 6c 70 20 2d 73 20 .in nmakehlp -s
d120: 3c 3c 20 24 28 52 4f 4f 54 29 5c 70 6b 67 49 6e << $(ROOT)\pkgIn
d130: 64 65 78 2e 74 63 6c 2e 69 6e 20 3e 20 24 28 4f dex.tcl.in > $(O
d140: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d150: 2e 74 63 6c 0a 40 50 41 43 4b 41 47 45 5f 56 45 .tcl.@PACKAGE_VE
d160: 52 53 49 4f 4e 40 20 20 20 20 24 28 44 4f 54 56 RSION@ $(DOTV
d170: 45 52 53 49 4f 4e 29 0a 40 50 41 43 4b 41 47 45 ERSION).@PACKAGE
d180: 5f 4e 41 4d 45 40 20 20 20 20 20 20 20 24 28 50 _NAME@ $(P
d190: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
d1a0: 4d 45 29 0a 40 50 41 43 4b 41 47 45 5f 54 43 4c ME).@PACKAGE_TCL
d1b0: 4e 41 4d 45 40 20 20 20 20 24 28 50 52 4a 5f 50 NAME@ $(PRJ_P
d1c0: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 0a ACKAGE_TCLNAME).
d1d0: 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 40 20 20 @PKG_LIB_FILE@
d1e0: 20 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d $(PRJLIBNAM
d1f0: 45 29 0a 40 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 E).@PKG_LIB_FILE
d200: 38 40 20 20 20 20 20 20 24 28 50 52 4a 4c 49 42 8@ $(PRJLIB
d210: 4e 41 4d 45 38 29 0a 40 50 4b 47 5f 4c 49 42 5f NAME8).@PKG_LIB_
d220: 46 49 4c 45 39 40 20 20 20 20 20 20 24 28 50 52 FILE9@ $(PR
d230: 4a 4c 49 42 4e 41 4d 45 39 29 0a 3c 3c 0a 0a 64 JLIBNAME9).<<..d
d240: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 3a 20 efault-install:
d250: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d260: 62 69 6e 61 72 69 65 73 20 64 65 66 61 75 6c 74 binaries default
d270: 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 -install-librari
d280: 65 73 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 es.!if $(SYMBOLS
d290: 29 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c ).default-instal
d2a0: 6c 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 l: default-insta
d2b0: 6c 6c 2d 70 64 62 73 0a 21 65 6e 64 69 66 0a 0a ll-pdbs.!endif..
d2c0: 23 20 41 67 61 69 6e 20 74 6f 20 64 65 61 6c 20 # Again to deal
d2d0: 77 69 74 68 20 68 69 73 74 6f 72 69 63 61 6c 20 with historical
d2e0: 62 72 6f 6b 65 6e 6e 65 73 73 2c 20 74 68 65 72 brokenness, ther
d2f0: 65 20 69 73 20 73 6f 6d 65 20 63 6f 6e 66 75 73 e is some confus
d300: 69 6f 6e 0a 23 20 69 6e 20 74 65 72 6d 69 6e 6c ion.# in terminl
d310: 6f 67 79 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 ogy. For extensi
d320: 6f 6e 73 2c 20 74 68 65 20 22 69 6e 73 74 61 6c ons, the "instal
d330: 6c 2d 62 69 6e 61 72 69 65 73 22 20 77 61 73 20 l-binaries" was
d340: 75 73 65 64 20 74 6f 0a 23 20 6c 6f 63 61 74 65 used to.# locate
d350: 20 74 61 72 67 65 74 20 64 69 72 65 63 74 6f 72 target director
d360: 79 20 66 6f 72 20 2a 62 69 6e 61 72 79 20 73 68 y for *binary sh
d370: 61 72 65 64 20 6c 69 62 72 61 72 69 65 73 2a 20 ared libraries*
d380: 61 6e 64 20 74 68 75 73 0a 23 20 74 68 65 20 61 and thus.# the a
d390: 70 70 72 6f 70 72 69 61 74 65 20 6d 61 63 72 6f ppropriate macro
d3a0: 20 69 73 20 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f is LIB_INSTALL_
d3b0: 44 49 52 20 73 69 6e 63 65 20 42 49 4e 5f 49 4e DIR since BIN_IN
d3c0: 53 54 41 4c 4c 5f 44 49 52 20 69 73 0a 23 20 66 STALL_DIR is.# f
d3d0: 6f 72 20 65 78 65 63 75 74 61 62 6c 65 73 20 28 or executables (
d3e0: 65 78 65 73 29 2e 20 4f 6e 20 74 68 65 20 6f 74 exes). On the ot
d3f0: 68 65 72 20 68 61 6e 64 20 74 68 65 20 22 69 6e her hand the "in
d400: 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 65 73 22 stall-libraries"
d410: 0a 23 20 74 61 72 67 65 74 20 69 73 20 66 6f 72 .# target is for
d420: 20 2a 73 63 72 69 70 74 73 2a 20 61 6e 64 20 73 *scripts* and s
d430: 68 6f 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 hould have been
d440: 63 61 6c 6c 65 64 20 22 69 6e 73 74 61 6c 6c 2d called "install-
d450: 73 63 72 69 70 74 73 22 2e 0a 64 65 66 61 75 6c scripts"..defaul
d460: 74 2d 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 t-install-binari
d470: 65 73 3a 20 24 28 50 52 4a 4c 49 42 29 0a 09 40 es: $(PRJLIB)..@
d480: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
d490: 62 69 6e 61 72 69 65 73 20 74 6f 20 27 24 28 4c binaries to '$(L
d4a0: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 IB_INSTALL_DIR)'
d4b0: 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 ..@if not exist
d4c0: 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 "$(LIB_INSTALL_D
d4d0: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c 49 IR)" mkdir "$(LI
d4e0: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a B_INSTALL_DIR)".
d4f0: 09 40 24 28 43 50 59 29 20 24 28 50 52 4a 4c 49 .@$(CPY) $(PRJLI
d500: 42 29 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c B) "$(LIB_INSTAL
d510: 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0a 0a 23 20 L_DIR)" >NUL..#
d520: 41 6c 69 61 73 20 66 6f 72 20 64 65 66 61 75 6c Alias for defaul
d530: 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 t-install-script
d540: 73 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c s.default-instal
d550: 6c 2d 6c 69 62 72 61 72 69 65 73 3a 20 64 65 66 l-libraries: def
d560: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 ault-install-scr
d570: 69 70 74 73 0a 0a 64 65 66 61 75 6c 74 2d 69 6e ipts..default-in
d580: 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 3a 20 24 stall-scripts: $
d590: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
d5a0: 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 49 6e ex.tcl..@echo In
d5b0: 73 74 61 6c 6c 69 6e 67 20 6c 69 62 72 61 72 69 stalling librari
d5c0: 65 73 20 74 6f 20 27 24 28 53 43 52 49 50 54 5f es to '$(SCRIPT_
d5d0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 INSTALL_DIR)'..@
d5e0: 69 66 20 65 78 69 73 74 20 24 28 4c 49 42 44 49 if exist $(LIBDI
d5f0: 52 29 20 24 28 43 50 59 29 20 24 28 4c 49 42 44 R) $(CPY) $(LIBD
d600: 49 52 29 5c 2a 2e 74 63 6c 20 22 24 28 53 43 52 IR)\*.tcl "$(SCR
d610: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 IPT_INSTALL_DIR)
d620: 22 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c "..@echo Install
d630: 69 6e 67 20 70 61 63 6b 61 67 65 20 69 6e 64 65 ing package inde
d640: 78 20 69 6e 20 27 24 28 53 43 52 49 50 54 5f 49 x in '$(SCRIPT_I
d650: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 24 NSTALL_DIR)'..@$
d660: 28 43 50 59 29 20 24 28 4f 55 54 5f 44 49 52 29 (CPY) $(OUT_DIR)
d670: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 20 24 28 \pkgIndex.tcl $(
d680: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
d690: 49 52 29 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 IR)..default-ins
d6a0: 74 61 6c 6c 2d 73 74 75 62 73 3a 0a 09 40 65 63 tall-stubs:..@ec
d6b0: 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 73 74 ho Installing st
d6c0: 75 62 73 20 6c 69 62 72 61 72 79 20 74 6f 20 27 ubs library to '
d6d0: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
d6e0: 5f 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 _DIR)'..@if not
d6f0: 65 78 69 73 74 20 22 24 28 53 43 52 49 50 54 5f exist "$(SCRIPT_
d700: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b INSTALL_DIR)" mk
d710: 64 69 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e dir "$(SCRIPT_IN
d720: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 STALL_DIR)"..@$(
d730: 43 50 59 29 20 24 28 50 52 4a 53 54 55 42 4c 49 CPY) $(PRJSTUBLI
d740: 42 29 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 B) "$(SCRIPT_INS
d750: 54 41 4c 4c 5f 44 49 52 29 22 20 3e 4e 55 4c 0a TALL_DIR)" >NUL.
d760: 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c .default-install
d770: 2d 70 64 62 73 3a 0a 09 40 65 63 68 6f 20 49 6e -pdbs:..@echo In
d780: 73 74 61 6c 6c 69 6e 67 20 50 44 42 73 20 74 6f stalling PDBs to
d790: 20 27 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f '$(LIB_INSTALL_
d7a0: 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 DIR)'..@if not e
d7b0: 78 69 73 74 20 22 24 28 4c 49 42 5f 49 4e 53 54 xist "$(LIB_INST
d7c0: 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 ALL_DIR)" mkdir
d7d0: 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 "$(LIB_INSTALL_D
d7e0: 49 52 29 22 0a 09 40 24 28 43 50 59 29 20 22 24 IR)"..@$(CPY) "$
d7f0: 28 4f 55 54 5f 44 49 52 29 5c 2a 2e 70 64 62 22 (OUT_DIR)\*.pdb"
d800: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f "$(LIB_INSTALL_
d810: 44 49 52 29 5c 22 0a 0a 23 20 22 65 6d 61 63 73 DIR)\"..# "emacs
d820: 20 66 6f 6e 74 2d 6c 6f 63 6b 20 68 69 67 68 6c font-lock highl
d830: 69 67 68 74 69 6e 67 20 66 69 78 0a 0a 64 65 66 ighting fix..def
d840: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 ault-install-doc
d850: 73 2d 68 74 6d 6c 3a 0a 09 40 65 63 68 6f 20 49 s-html:..@echo I
d860: 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 nstalling docume
d870: 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f ntation files to
d880: 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f '$(DOC_INSTALL_
d890: 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 DIR)'..@if not e
d8a0: 78 69 73 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 xist "$(DOC_INST
d8b0: 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 ALL_DIR)" mkdir
d8c0: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 "$(DOC_INSTALL_D
d8d0: 49 52 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 IR)"..@if exist
d8e0: 24 28 44 4f 43 44 49 52 29 20 66 6f 72 20 25 66 $(DOCDIR) for %f
d8f0: 20 69 6e 20 28 22 24 28 44 4f 43 44 49 52 29 5c in ("$(DOCDIR)\
d900: 2a 2e 68 74 6d 6c 22 20 22 24 28 44 4f 43 44 49 *.html" "$(DOCDI
d910: 52 29 5c 2a 2e 63 73 73 22 20 22 24 28 44 4f 43 R)\*.css" "$(DOC
d920: 44 49 52 29 5c 2a 2e 70 6e 67 22 29 20 64 6f 20 DIR)\*.png") do
d930: 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 28 44 @$(COPY) %f "$(D
d940: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 OC_INSTALL_DIR)"
d950: 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c ..default-instal
d960: 6c 2d 64 6f 63 73 2d 6e 3a 0a 09 40 65 63 68 6f l-docs-n:..@echo
d970: 20 49 6e 73 74 61 6c 6c 69 6e 67 20 64 6f 63 75 Installing docu
d980: 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 20 mentation files
d990: 74 6f 20 27 24 28 44 4f 43 5f 49 4e 53 54 41 4c to '$(DOC_INSTAL
d9a0: 4c 5f 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 L_DIR)'..@if not
d9b0: 20 65 78 69 73 74 20 22 24 28 44 4f 43 5f 49 4e exist "$(DOC_IN
d9c0: 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 STALL_DIR)" mkdi
d9d0: 72 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c r "$(DOC_INSTALL
d9e0: 5f 44 49 52 29 22 0a 09 40 69 66 20 65 78 69 73 _DIR)"..@if exis
d9f0: 74 20 24 28 44 4f 43 44 49 52 29 20 66 6f 72 20 t $(DOCDIR) for
da00: 25 66 20 69 6e 20 28 22 24 28 44 4f 43 44 49 52 %f in ("$(DOCDIR
da10: 29 5c 2a 2e 6e 22 29 20 64 6f 20 40 24 28 43 4f )\*.n") do @$(CO
da20: 50 59 29 20 25 66 20 22 24 28 44 4f 43 5f 49 4e PY) %f "$(DOC_IN
da30: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 0a 64 65 66 STALL_DIR)"..def
da40: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 65 6d ault-install-dem
da50: 6f 73 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 os:..@echo Insta
da60: 6c 6c 69 6e 67 20 64 65 6d 6f 73 20 74 6f 20 27 lling demos to '
da70: 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 $(DEMO_INSTALL_D
da80: 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 IR)'..@if not ex
da90: 69 73 74 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 ist "$(DEMO_INST
daa0: 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 ALL_DIR)" mkdir
dab0: 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f "$(DEMO_INSTALL_
dac0: 44 49 52 29 22 0a 09 40 69 66 20 65 78 69 73 74 DIR)"..@if exist
dad0: 20 24 28 44 45 4d 4f 44 49 52 29 20 24 28 43 50 $(DEMODIR) $(CP
dae0: 59 44 49 52 29 20 22 24 28 44 45 4d 4f 44 49 52 YDIR) "$(DEMODIR
daf0: 29 22 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 )" "$(DEMO_INSTA
db00: 4c 4c 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 6c LL_DIR)"..defaul
db10: 74 2d 63 6c 65 61 6e 3a 0a 09 40 65 63 68 6f 20 t-clean:..@echo
db20: 43 6c 65 61 6e 69 6e 67 20 24 28 54 4d 50 5f 44 Cleaning $(TMP_D
db30: 49 52 29 5c 2a 20 2e 2e 2e 0a 09 40 69 66 20 65 IR)\* .....@if e
db40: 78 69 73 74 20 24 28 54 4d 50 5f 44 49 52 29 5c xist $(TMP_DIR)\
db50: 6e 75 6c 20 24 28 52 4d 44 49 52 29 20 24 28 54 nul $(RMDIR) $(T
db60: 4d 50 5f 44 49 52 29 0a 09 40 65 63 68 6f 20 43 MP_DIR)..@echo C
db70: 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 leaning $(WIN_DI
db80: 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 2c R)\nmakehlp.obj,
db90: 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 20 2e 2e nmakehlp.exe ..
dba0: 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 ...@if exist $(W
dbb0: 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 IN_DIR)\nmakehlp
dbc0: 2e 6f 62 6a 20 64 65 6c 20 24 28 57 49 4e 5f 44 .obj del $(WIN_D
dbd0: 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a IR)\nmakehlp.obj
dbe0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 ..@if exist $(WI
dbf0: 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e N_DIR)\nmakehlp.
dc00: 65 78 65 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 exe del $(WIN_DI
dc10: 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 0a R)\nmakehlp.exe.
dc20: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
dc30: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
dc40: 75 74 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 ut del $(WIN_DIR
dc50: 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 09 )\nmakehlp.out..
dc60: 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 @echo Cleaning $
dc70: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d (WIN_DIR)\nmhlp-
dc80: 6f 75 74 2e 74 78 74 20 2e 2e 2e 0a 09 40 69 66 out.txt .....@if
dc90: 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 exist $(WIN_DIR
dca0: 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 )\nmhlp-out.txt
dcb0: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e del $(WIN_DIR)\n
dcc0: 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 0a 09 40 65 mhlp-out.txt..@e
dcd0: 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 cho Cleaning $(W
dce0: 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 IN_DIR)\_junk.pc
dcf0: 68 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 h .....@if exist
dd00: 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e $(WIN_DIR)\_jun
dd10: 6b 2e 70 63 68 20 64 65 6c 20 24 28 57 49 4e 5f k.pch del $(WIN_
dd20: 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 0a 09 DIR)\_junk.pch..
dd30: 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 @echo Cleaning $
dd40: 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e (WIN_DIR)\vercl.
dd50: 78 2c 20 76 65 72 63 6c 2e 69 20 2e 2e 2e 0a 09 x, vercl.i .....
dd60: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
dd70: 44 49 52 29 5c 76 65 72 63 6c 2e 78 20 64 65 6c DIR)\vercl.x del
dd80: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 $(WIN_DIR)\verc
dd90: 6c 2e 78 0a 09 40 69 66 20 65 78 69 73 74 20 24 l.x..@if exist $
dda0: 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e (WIN_DIR)\vercl.
ddb0: 69 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 i del $(WIN_DIR)
ddc0: 5c 76 65 72 63 6c 2e 69 0a 09 40 65 63 68 6f 20 \vercl.i..@echo
ddd0: 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 Cleaning $(WIN_D
dde0: 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 2c IR)\versions.vc,
ddf0: 20 76 65 72 73 69 6f 6e 2e 76 63 20 2e 2e 2e 0a version.vc ....
de00: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
de10: 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 _DIR)\versions.v
de20: 63 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 c del $(WIN_DIR)
de30: 5c 76 65 72 73 69 6f 6e 73 2e 76 63 0a 09 40 69 \versions.vc..@i
de40: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
de50: 52 29 5c 76 65 72 73 69 6f 6e 2e 76 63 20 64 65 R)\version.vc de
de60: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 l $(WIN_DIR)\ver
de70: 73 69 6f 6e 2e 76 63 0a 0a 64 65 66 61 75 6c 74 sion.vc..default
de80: 2d 68 6f 73 65 3a 20 64 65 66 61 75 6c 74 2d 63 -hose: default-c
de90: 6c 65 61 6e 0a 09 40 65 63 68 6f 20 48 6f 73 69 lean..@echo Hosi
dea0: 6e 67 20 24 28 4f 55 54 5f 44 49 52 29 5c 2a 20 ng $(OUT_DIR)\*
deb0: 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 .....@if exist $
dec0: 28 4f 55 54 5f 44 49 52 29 5c 6e 75 6c 20 24 28 (OUT_DIR)\nul $(
ded0: 52 4d 44 49 52 29 20 24 28 4f 55 54 5f 44 49 52 RMDIR) $(OUT_DIR
dee0: 29 0a 0a 23 20 4f 6e 6c 79 20 66 6f 72 20 62 61 )..# Only for ba
def0: 63 6b 77 61 72 64 20 63 6f 6d 70 61 74 69 62 69 ckward compatibi
df00: 6c 69 74 79 0a 64 65 66 61 75 6c 74 2d 64 69 73 lity.default-dis
df10: 74 63 6c 65 61 6e 3a 20 64 65 66 61 75 6c 74 2d tclean: default-
df20: 68 6f 73 65 0a 0a 64 65 66 61 75 6c 74 2d 73 65 hose..default-se
df30: 74 75 70 3a 0a 09 40 69 66 20 6e 6f 74 20 65 78 tup:..@if not ex
df40: 69 73 74 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e ist $(OUT_DIR)\n
df50: 75 6c 20 6d 6b 64 69 72 20 24 28 4f 55 54 5f 44 ul mkdir $(OUT_D
df60: 49 52 29 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 IR)..@if not exi
df70: 73 74 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 st $(TMP_DIR)\nu
df80: 6c 20 6d 6b 64 69 72 20 24 28 54 4d 50 5f 44 49 l mkdir $(TMP_DI
df90: 52 29 0a 0a 21 69 66 20 22 24 28 54 45 53 54 50 R)..!if "$(TESTP
dfa0: 41 54 29 22 20 21 3d 20 22 22 0a 54 45 53 54 46 AT)" != "".TESTF
dfb0: 4c 41 47 53 20 3d 20 24 28 54 45 53 54 46 4c 41 LAGS = $(TESTFLA
dfc0: 47 53 29 20 2d 66 69 6c 65 20 24 28 54 45 53 54 GS) -file $(TEST
dfd0: 50 41 54 29 0a 21 65 6e 64 69 66 0a 0a 64 65 66 PAT).!endif..def
dfe0: 61 75 6c 74 2d 74 65 73 74 3a 20 64 65 66 61 75 ault-test: defau
dff0: 6c 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 lt-setup $(PROJE
e000: 43 54 29 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 CT)..@set TCLLIB
e010: 50 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c PATH=$(OUT_DIR:\
e020: 3d 2f 29 0a 09 40 69 66 20 65 78 69 73 74 20 24 =/)..@if exist $
e030: 28 4c 49 42 44 49 52 29 20 66 6f 72 20 25 66 20 (LIBDIR) for %f
e040: 69 6e 20 28 22 24 28 4c 49 42 44 49 52 29 5c 2a in ("$(LIBDIR)\*
e050: 2e 74 63 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 .tcl") do @$(COP
e060: 59 29 20 25 66 20 22 24 28 4f 55 54 5f 44 49 52 Y) %f "$(OUT_DIR
e070: 29 22 0a 09 63 64 20 22 24 28 54 45 53 54 44 49 )"..cd "$(TESTDI
e080: 52 29 22 20 26 26 20 24 28 44 45 42 55 47 47 45 R)" && $(DEBUGGE
e090: 52 29 20 24 28 54 43 4c 53 48 29 20 61 6c 6c 2e R) $(TCLSH) all.
e0a0: 74 63 6c 20 24 28 54 45 53 54 46 4c 41 47 53 29 tcl $(TESTFLAGS)
e0b0: 0a 0a 64 65 66 61 75 6c 74 2d 73 68 65 6c 6c 3a ..default-shell:
e0c0: 20 64 65 66 61 75 6c 74 2d 73 65 74 75 70 20 24 default-setup $
e0d0: 28 50 52 4f 4a 45 43 54 29 0a 09 40 73 65 74 20 (PROJECT)..@set
e0e0: 54 43 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 54 TCLLIBPATH=$(OUT
e0f0: 5f 44 49 52 3a 5c 3d 2f 29 0a 09 40 69 66 20 65 _DIR:\=/)..@if e
e100: 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 66 xist $(LIBDIR) f
e110: 6f 72 20 25 66 20 69 6e 20 28 22 24 28 4c 49 42 or %f in ("$(LIB
e120: 44 49 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f 20 DIR)\*.tcl") do
e130: 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 28 4f @$(COPY) %f "$(O
e140: 55 54 5f 44 49 52 29 22 0a 09 24 28 44 45 42 55 UT_DIR)"..$(DEBU
e150: 47 47 45 52 29 20 24 28 54 43 4c 53 48 29 0a 0a GGER) $(TCLSH)..
e160: 23 20 47 65 6e 65 72 61 74 69 6f 6e 20 6f 66 20 # Generation of
e170: 57 69 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 20 Windows version
e180: 72 65 73 6f 75 72 63 65 0a 21 69 66 64 65 66 20 resource.!ifdef
e190: 52 43 46 49 4c 45 0a 0a 23 20 4e 6f 74 65 3a 20 RCFILE..# Note:
e1a0: 64 6f 6e 27 74 20 75 73 65 20 24 2a 2a 20 69 6e don't use $** in
e1b0: 20 62 65 6c 6f 77 20 72 75 6c 65 20 62 65 63 61 below rule beca
e1c0: 75 73 65 20 74 68 65 72 65 20 6d 61 79 20 62 65 use there may be
e1d0: 20 6f 74 68 65 72 20 64 65 70 65 6e 64 65 6e 63 other dependenc
e1e0: 69 65 73 0a 23 20 61 6e 64 20 6f 6e 6c 79 20 74 ies.# and only t
e1f0: 68 65 20 22 6d 61 69 6e 22 20 72 63 20 6d 75 73 he "main" rc mus
e200: 74 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 t be passed to t
e210: 68 65 20 72 65 73 6f 75 72 63 65 20 63 6f 6d 70 he resource comp
e220: 69 6c 65 72 0a 24 28 54 4d 50 5f 44 49 52 29 5c iler.$(TMP_DIR)\
e230: 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a 20 $(PROJECT).res:
e240: 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 $(RCDIR)\$(PROJE
e250: 43 54 29 2e 72 63 0a 09 24 28 52 45 53 43 4d 44 CT).rc..$(RESCMD
e260: 29 20 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f ) $(RCDIR)\$(PRO
e270: 4a 45 43 54 29 2e 72 63 0a 0a 21 65 6c 73 65 0a JECT).rc..!else.
e280: 0a 23 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b .# If parent mak
e290: 65 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 efile has not de
e2a0: 66 69 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 fined a resource
e2b0: 20 64 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 definition file
e2c0: 2c 0a 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 ,.# we will gene
e2d0: 72 61 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 rate one from st
e2e0: 61 6e 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e andard template.
e2f0: 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 .$(TMP_DIR)\$(PR
e300: 4f 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 54 4d OJECT).res: $(TM
e310: 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 P_DIR)\$(PROJECT
e320: 29 2e 72 63 0a 0a 24 28 54 4d 50 5f 44 49 52 29 ).rc..$(TMP_DIR)
e330: 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 3a 0a \$(PROJECT).rc:.
e340: 09 40 24 28 43 4f 50 59 29 20 3c 3c 20 24 28 54 .@$(COPY) << $(T
e350: 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 MP_DIR)\$(PROJEC
e360: 54 29 2e 72 63 0a 23 69 6e 63 6c 75 64 65 20 3c T).rc.#include <
e370: 77 69 6e 76 65 72 2e 68 3e 0a 0a 56 53 5f 56 45 winver.h>..VS_VE
e380: 52 53 49 4f 4e 5f 49 4e 46 4f 20 56 45 52 53 49 RSION_INFO VERSI
e390: 4f 4e 49 4e 46 4f 0a 20 46 49 4c 45 56 45 52 53 ONINFO. FILEVERS
e3a0: 49 4f 4e 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e ION.COMMAVERSION
e3b0: 0a 20 50 52 4f 44 55 43 54 56 45 52 53 49 4f 4e . PRODUCTVERSION
e3c0: 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 46 .COMMAVERSION. F
e3d0: 49 4c 45 46 4c 41 47 53 4d 41 53 4b 09 30 78 33 ILEFLAGSMASK.0x3
e3e0: 66 4c 0a 23 69 66 64 65 66 20 44 45 42 55 47 0a fL.#ifdef DEBUG.
e3f0: 20 46 49 4c 45 46 4c 41 47 53 09 56 53 5f 46 46 FILEFLAGS.VS_FF
e400: 5f 44 45 42 55 47 0a 23 65 6c 73 65 0a 20 46 49 _DEBUG.#else. FI
e410: 4c 45 46 4c 41 47 53 09 30 78 30 4c 0a 23 65 6e LEFLAGS.0x0L.#en
e420: 64 69 66 0a 20 46 49 4c 45 4f 53 09 09 56 4f 53 dif. FILEOS..VOS
e430: 5f 4e 54 5f 57 49 4e 44 4f 57 53 33 32 0a 20 46 _NT_WINDOWS32. F
e440: 49 4c 45 54 59 50 45 09 56 46 54 5f 44 4c 4c 0a ILETYPE.VFT_DLL.
e450: 20 46 49 4c 45 53 55 42 54 59 50 45 09 30 78 30 FILESUBTYPE.0x0
e460: 4c 0a 42 45 47 49 4e 0a 20 20 20 20 42 4c 4f 43 L.BEGIN. BLOC
e470: 4b 20 22 53 74 72 69 6e 67 46 69 6c 65 49 6e 66 K "StringFileInf
e480: 6f 22 0a 20 20 20 20 42 45 47 49 4e 0a 20 20 20 o". BEGIN.
e490: 20 20 20 20 20 42 4c 4f 43 4b 20 22 30 34 30 39 BLOCK "0409
e4a0: 30 34 62 30 22 0a 20 20 20 20 20 20 20 20 42 45 04b0". BE
e4b0: 47 49 4e 0a 20 20 20 20 20 20 20 20 20 20 20 20 GIN.
e4c0: 56 41 4c 55 45 20 22 46 69 6c 65 44 65 73 63 72 VALUE "FileDescr
e4d0: 69 70 74 69 6f 6e 22 2c 20 20 22 54 63 6c 20 65 iption", "Tcl e
e4e0: 78 74 65 6e 73 69 6f 6e 20 22 20 50 52 4f 4a 45 xtension " PROJE
e4f0: 43 54 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 CT. V
e500: 41 4c 55 45 20 22 4f 72 69 67 69 6e 61 6c 46 69 ALUE "OriginalFi
e510: 6c 65 6e 61 6d 65 22 2c 20 50 52 4a 4c 49 42 4e lename", PRJLIBN
e520: 41 4d 45 0a 20 20 20 20 20 20 20 20 20 20 20 20 AME.
e530: 56 41 4c 55 45 20 22 46 69 6c 65 56 65 72 73 69 VALUE "FileVersi
e540: 6f 6e 22 2c 20 20 20 20 20 20 44 4f 54 56 45 52 on", DOTVER
e550: 53 49 4f 4e 0a 20 20 20 20 20 20 20 20 20 20 20 SION.
e560: 20 56 41 4c 55 45 20 22 50 72 6f 64 75 63 74 4e VALUE "ProductN
e570: 61 6d 65 22 2c 20 20 20 20 20 20 22 50 61 63 6b ame", "Pack
e580: 61 67 65 20 22 20 50 52 4f 4a 45 43 54 20 22 20 age " PROJECT "
e590: 66 6f 72 20 54 63 6c 22 0a 20 20 20 20 20 20 20 for Tcl".
e5a0: 20 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f 64 VALUE "Prod
e5b0: 75 63 74 56 65 72 73 69 6f 6e 22 2c 20 20 20 44 uctVersion", D
e5c0: 4f 54 56 45 52 53 49 4f 4e 0a 20 20 20 20 20 20 OTVERSION.
e5d0: 20 20 45 4e 44 0a 20 20 20 20 45 4e 44 0a 20 20 END. END.
e5e0: 20 20 42 4c 4f 43 4b 20 22 56 61 72 46 69 6c 65 BLOCK "VarFile
e5f0: 49 6e 66 6f 22 0a 20 20 20 20 42 45 47 49 4e 0a Info". BEGIN.
e600: 20 20 20 20 20 20 20 20 56 41 4c 55 45 20 22 54 VALUE "T
e610: 72 61 6e 73 6c 61 74 69 6f 6e 22 2c 20 30 78 34 ranslation", 0x4
e620: 30 39 2c 20 31 32 30 30 0a 20 20 20 20 45 4e 44 09, 1200. END
e630: 0a 45 4e 44 0a 0a 3c 3c 0a 0a 21 65 6e 64 69 66 .END..<<..!endif
e640: 20 23 20 69 66 64 65 66 20 52 43 46 49 4c 45 0a # ifdef RCFILE.
e650: 0a 21 69 66 6e 64 65 66 20 44 49 53 41 42 4c 45 .!ifndef DISABLE
e660: 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 0a _IMPLICIT_RULES.
e670: 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 54 DISABLE_IMPLICIT
e680: 5f 52 55 4c 45 53 20 3d 20 30 0a 21 65 6e 64 69 _RULES = 0.!endi
e690: 66 0a 0a 21 69 66 20 21 24 28 44 49 53 41 42 4c f..!if !$(DISABL
e6a0: 45 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 E_IMPLICIT_RULES
e6b0: 29 0a 23 20 49 6d 70 6c 69 63 69 74 20 72 75 6c ).# Implicit rul
e6c0: 65 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 2d 20 e definitions -
e6d0: 6f 6e 6c 79 20 66 6f 72 20 62 75 69 6c 64 69 6e only for buildin
e6e0: 67 20 6c 69 62 72 61 72 79 20 6f 62 6a 65 63 74 g library object
e6f0: 73 2e 20 46 6f 72 20 73 74 75 62 73 20 61 6e 64 s. For stubs and
e700: 0a 23 20 6d 61 69 6e 20 61 70 70 6c 69 63 61 74 .# main applicat
e710: 69 6f 6e 2c 20 74 68 65 20 6d 61 6b 65 66 69 6c ion, the makefil
e720: 65 20 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 e should define
e730: 65 78 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0a explicit rules..
e740: 0a 7b 24 28 52 4f 4f 54 29 7d 2e 63 7b 24 28 54 .{$(ROOT)}.c{$(T
e750: 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 MP_DIR)}.obj::..
e760: 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a $(CCPKGCMD) @<<.
e770: 24 3c 0a 3c 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 $<.<<..{$(WIN_DI
e780: 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 R)}.c{$(TMP_DIR)
e790: 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 }.obj::..$(CCPKG
e7a0: 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a CMD) @<<.$<.<<..
e7b0: 7b 24 28 47 45 4e 45 52 49 43 44 49 52 29 7d 2e {$(GENERICDIR)}.
e7c0: 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 c{$(TMP_DIR)}.ob
e7d0: 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 j::..$(CCPKGCMD)
e7e0: 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 43 @<<.$<.<<..{$(C
e7f0: 4f 4d 50 41 54 44 49 52 29 7d 2e 63 7b 24 28 54 OMPATDIR)}.c{$(T
e800: 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 MP_DIR)}.obj::..
e810: 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a $(CCPKGCMD) @<<.
e820: 24 3c 0a 3c 3c 0a 0a 7b 24 28 52 43 44 49 52 29 $<.<<..{$(RCDIR)
e830: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
e840: 2e 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 .res:..$(RESCMD)
e850: 20 24 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 29 $<..{$(WIN_DIR)
e860: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
e870: 2e 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 .res:..$(RESCMD)
e880: 20 24 3c 0a 0a 7b 24 28 54 4d 50 5f 44 49 52 29 $<..{$(TMP_DIR)
e890: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
e8a0: 2e 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 .res:..$(RESCMD)
e8b0: 20 24 3c 0a 0a 2e 53 55 46 46 49 58 45 53 3a 0a $<...SUFFIXES:.
e8c0: 2e 53 55 46 46 49 58 45 53 3a 2e 63 20 2e 72 63 .SUFFIXES:.c .rc
e8d0: 0a 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 ..!endif..######
e8e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
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 0a 23 20 31 34 2e ##########.# 14.
e920: 20 53 61 6e 69 74 79 20 63 68 65 63 6b 20 73 65 Sanity check se
e930: 6c 65 63 74 65 64 20 6f 70 74 69 6f 6e 73 20 61 lected options a
e940: 67 61 69 6e 73 74 20 54 63 6c 20 62 75 69 6c 64 gainst Tcl build
e950: 20 6f 70 74 69 6f 6e 73 0a 23 20 57 68 65 6e 20 options.# When
e960: 62 75 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 building an exte
e970: 6e 73 69 6f 6e 2c 20 63 65 72 74 61 69 6e 20 63 nsion, certain c
e980: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 onfiguration opt
e990: 69 6f 6e 73 20 73 68 6f 75 6c 64 0a 23 20 6d 61 ions should.# ma
e9a0: 74 63 68 20 74 68 65 20 6f 6e 65 73 20 75 73 65 tch the ones use
e9b0: 64 20 77 68 65 6e 20 54 63 6c 20 77 61 73 20 62 d when Tcl was b
e9c0: 75 69 6c 74 2e 20 48 65 72 65 20 77 65 20 63 68 uilt. Here we ch
e9d0: 65 63 6b 20 61 6e 64 0a 23 20 77 61 72 6e 20 6f eck and.# warn o
e9e0: 6e 20 61 20 6d 69 73 6d 61 74 63 68 2e 0a 21 69 n a mismatch..!i
e9f0: 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a f !$(DOING_TCL).
ea00: 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 4c .!if $(TCLINSTAL
ea10: 4c 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 L) # Building ag
ea20: 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c 6c ainst an install
ea30: 65 64 20 54 63 6c 0a 21 69 66 20 65 78 69 73 74 ed Tcl.!if exist
ea40: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 ("$(_TCLDIR)\lib
ea50: 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 \nmake\tcl.nmake
ea60: 22 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 ").TCLNMAKECONFI
ea70: 47 20 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 5c G = "$(_TCLDIR)\
ea80: 6c 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d lib\nmake\tcl.nm
ea90: 61 6b 65 22 0a 21 65 6e 64 69 66 0a 21 65 6c 73 ake".!endif.!els
eaa0: 65 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c e # !$(TCLINSTAL
eab0: 4c 29 20 2d 20 62 75 69 6c 64 69 6e 67 20 61 67 L) - building ag
eac0: 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 ainst Tcl source
ead0: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 .!if exist("$(_T
eae0: 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 CLDIR)\win\$(BUI
eaf0: 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d LDDIRTOP)\tcl.nm
eb00: 61 6b 65 22 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f ake").TCLNMAKECO
eb10: 4e 46 49 47 09 3d 20 22 24 28 5f 54 43 4c 44 49 NFIG.= "$(_TCLDI
eb20: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
eb30: 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 RTOP)\tcl.nmake"
eb40: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
eb50: 20 54 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 TCLINSTALL..!if
eb60: 20 24 28 43 4f 4e 46 49 47 5f 43 48 45 43 4b 29 $(CONFIG_CHECK)
eb70: 0a 21 69 66 64 65 66 20 54 43 4c 4e 4d 41 4b 45 .!ifdef TCLNMAKE
eb80: 43 4f 4e 46 49 47 0a 21 69 6e 63 6c 75 64 65 20 CONFIG.!include
eb90: 24 28 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 $(TCLNMAKECONFIG
eba0: 29 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 )..!if defined(C
ebb0: 4f 52 45 5f 4d 41 43 48 49 4e 45 29 20 26 26 20 ORE_MACHINE) &&
ebc0: 22 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 "$(CORE_MACHINE)
ebd0: 22 20 21 3d 20 22 24 28 4d 41 43 48 49 4e 45 29 " != "$(MACHINE)
ebe0: 22 0a 21 65 72 72 6f 72 20 45 52 52 4f 52 3a 20 ".!error ERROR:
ebf0: 42 75 69 6c 64 20 74 61 72 67 65 74 20 28 24 28 Build target ($(
ec00: 4d 41 43 48 49 4e 45 29 29 20 64 6f 65 73 20 6e MACHINE)) does n
ec10: 6f 74 20 6d 61 74 63 68 20 74 68 65 20 54 63 6c ot match the Tcl
ec20: 20 6c 69 62 72 61 72 79 20 61 72 63 68 69 74 65 library archite
ec30: 63 74 75 72 65 20 28 24 28 43 4f 52 45 5f 4d 41 cture ($(CORE_MA
ec40: 43 48 49 4e 45 29 29 2e 0a 21 65 6e 64 69 66 0a CHINE))..!endif.
ec50: 21 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f !if $(TCL_VERSIO
ec60: 4e 29 20 3c 20 38 37 20 26 26 20 64 65 66 69 6e N) < 87 && defin
ec70: 65 64 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 ed(CORE_USE_THRE
ec80: 41 44 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 43 AD_ALLOC) && $(C
ec90: 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 ORE_USE_THREAD_A
eca0: 4c 4c 4f 43 29 20 21 3d 20 24 28 55 53 45 5f 54 LLOC) != $(USE_T
ecb0: 48 52 45 41 44 5f 41 4c 4c 4f 43 29 0a 21 6d 65 HREAD_ALLOC).!me
ecc0: 73 73 61 67 65 20 57 41 52 4e 49 4e 47 3a 20 56 ssage WARNING: V
ecd0: 61 6c 75 65 20 6f 66 20 55 53 45 5f 54 48 52 45 alue of USE_THRE
ece0: 41 44 5f 41 4c 4c 4f 43 20 28 24 28 55 53 45 5f AD_ALLOC ($(USE_
ecf0: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 29 20 64 THREAD_ALLOC)) d
ed00: 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 oes not match it
ed10: 73 20 54 63 6c 20 63 6f 72 65 20 76 61 6c 75 65 s Tcl core value
ed20: 20 28 24 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 ($(CORE_USE_THR
ed30: 45 41 44 5f 41 4c 4c 4f 43 29 29 2e 0a 21 65 6e EAD_ALLOC))..!en
ed40: 64 69 66 0a 21 69 66 20 64 65 66 69 6e 65 64 28 dif.!if defined(
ed50: 43 4f 52 45 5f 44 45 42 55 47 29 20 26 26 20 24 CORE_DEBUG) && $
ed60: 28 43 4f 52 45 5f 44 45 42 55 47 29 20 21 3d 20 (CORE_DEBUG) !=
ed70: 24 28 44 45 42 55 47 29 0a 21 6d 65 73 73 61 67 $(DEBUG).!messag
ed80: 65 20 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 e WARNING: Value
ed90: 20 6f 66 20 44 45 42 55 47 20 28 24 28 44 45 42 of DEBUG ($(DEB
eda0: 55 47 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 UG)) does not ma
edb0: 74 63 68 20 69 74 73 20 54 63 6c 20 6c 69 62 72 tch its Tcl libr
edc0: 61 72 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ary configuratio
edd0: 6e 20 28 24 28 44 45 42 55 47 29 29 2e 0a 21 65 n ($(DEBUG))..!e
ede0: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 21 65 6e ndif.!endif..!en
edf0: 64 69 66 20 23 20 54 43 4c 4e 4d 41 4b 45 43 4f dif # TCLNMAKECO
ee00: 4e 46 49 47 0a 0a 21 65 6e 64 69 66 20 23 20 21 NFIG..!endif # !
ee10: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 0a 23 $(DOING_TCL)...#
ee20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 23 20 44 69 73 ----------.# Dis
ee60: 70 6c 61 79 20 73 74 61 74 73 20 62 65 69 6e 67 play stats being
ee70: 20 75 73 65 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d used..#--------
ee80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
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 0a 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 --..!if !$(DOING
eec0: 5f 54 43 4c 29 0a 21 6d 65 73 73 61 67 65 20 2a _TCL).!message *
eed0: 2a 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 ** Building agai
eee0: 6e 73 74 20 54 63 6c 20 61 74 20 27 24 28 5f 54 nst Tcl at '$(_T
eef0: 43 4c 44 49 52 29 27 0a 21 65 6e 64 69 66 0a 21 CLDIR)'.!endif.!
ef00: 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 if !$(DOING_TK)
ef10: 26 26 20 24 28 4e 45 45 44 5f 54 4b 29 0a 21 6d && $(NEED_TK).!m
ef20: 65 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 essage *** Build
ef30: 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 61 ing against Tk a
ef40: 74 20 27 24 28 5f 54 4b 44 49 52 29 27 0a 21 65 t '$(_TKDIR)'.!e
ef50: 6e 64 69 66 0a 21 6d 65 73 73 61 67 65 20 2a 2a ndif.!message **
ef60: 2a 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 64 * Intermediate d
ef70: 69 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 irectory will be
ef80: 20 27 24 28 54 4d 50 5f 44 49 52 29 27 0a 21 6d '$(TMP_DIR)'.!m
ef90: 65 73 73 61 67 65 20 2a 2a 2a 20 4f 75 74 70 75 essage *** Outpu
efa0: 74 20 64 69 72 65 63 74 6f 72 79 20 77 69 6c 6c t directory will
efb0: 20 62 65 20 27 24 28 4f 55 54 5f 44 49 52 29 27 be '$(OUT_DIR)'
efc0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e .!message *** In
efd0: 73 74 61 6c 6c 61 74 69 6f 6e 2c 20 69 66 20 73 stallation, if s
efe0: 65 6c 65 63 74 65 64 2c 20 77 69 6c 6c 20 62 65 elected, will be
eff0: 20 69 6e 20 27 24 28 5f 49 4e 53 54 41 4c 4c 44 in '$(_INSTALLD
f000: 49 52 29 27 0a 21 6d 65 73 73 61 67 65 20 2a 2a IR)'.!message **
f010: 2a 20 53 75 66 66 69 78 20 66 6f 72 20 62 69 6e * Suffix for bin
f020: 61 72 69 65 73 20 77 69 6c 6c 20 62 65 20 27 24 aries will be '$
f030: 28 53 55 46 58 29 27 0a 21 6d 65 73 73 61 67 65 (SUFX)'.!message
f040: 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 76 65 *** Compiler ve
f050: 72 73 69 6f 6e 20 24 28 56 43 56 45 52 29 2e 20 rsion $(VCVER).
f060: 54 61 72 67 65 74 20 24 28 4d 41 43 48 49 4e 45 Target $(MACHINE
f070: 29 2c 20 68 6f 73 74 20 24 28 4e 41 54 49 56 45 ), host $(NATIVE
f080: 5f 41 52 43 48 29 2e 0a 0a 21 65 6e 64 69 66 20 _ARCH)...!endif
f090: 23 20 69 66 64 65 66 20 5f 52 55 4c 45 53 5f 56 # ifdef _RULES_V
f0a0: 43 0a C.