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 33 0a 0a ION_MINOR = 13..
0430: 23 20 54 68 65 20 50 52 4f 4a 45 43 54 20 6d 61 # The PROJECT ma
0440: 63 72 6f 20 6d 75 73 74 20 62 65 20 64 65 66 69 cro must be defi
0450: 6e 65 64 20 62 79 20 70 61 72 65 6e 74 20 6d 61 ned by parent ma
0460: 6b 65 66 69 6c 65 2e 0a 21 69 66 20 22 24 28 50 kefile..!if "$(P
0470: 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 22 0a 21 ROJECT)" == "".!
0480: 65 72 72 6f 72 20 2a 2a 2a 20 45 72 72 6f 72 3a error *** Error:
0490: 20 4d 61 63 72 6f 20 50 52 4f 4a 45 43 54 20 6e Macro PROJECT n
04a0: 6f 74 20 64 65 66 69 6e 65 64 21 20 50 6c 65 61 ot defined! Plea
04b0: 73 65 20 64 65 66 69 6e 65 20 69 74 20 62 65 66 se define it bef
04c0: 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 ore including ru
04d0: 6c 65 73 2e 76 63 0a 21 65 6e 64 69 66 0a 0a 21 les.vc.!endif..!
04e0: 69 66 20 22 24 28 50 52 4a 5f 50 41 43 4b 41 47 if "$(PRJ_PACKAG
04f0: 45 5f 54 43 4c 4e 41 4d 45 29 22 20 3d 3d 20 22 E_TCLNAME)" == "
0500: 22 0a 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 ".PRJ_PACKAGE_TC
0510: 4c 4e 41 4d 45 20 3d 20 24 28 50 52 4f 4a 45 43 LNAME = $(PROJEC
0520: 54 29 0a 21 65 6e 64 69 66 0a 0a 23 20 41 6c 73 T).!endif..# Als
0530: 6f 20 73 70 65 63 69 61 6c 20 63 61 73 65 20 54 o special case T
0540: 63 6c 20 61 6e 64 20 54 6b 20 74 6f 20 73 61 76 cl and Tk to sav
0550: 65 20 73 6f 6d 65 20 74 79 70 69 6e 67 20 6c 61 e some typing la
0560: 74 65 72 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 ter.DOING_TCL =
0570: 30 0a 44 4f 49 4e 47 5f 54 4b 20 20 3d 20 30 0a 0.DOING_TK = 0.
0580: 21 69 66 20 22 24 28 50 52 4f 4a 45 43 54 29 22 !if "$(PROJECT)"
0590: 20 3d 3d 20 22 74 63 6c 22 0a 44 4f 49 4e 47 5f == "tcl".DOING_
05a0: 54 43 4c 20 3d 20 31 0a 21 65 6c 73 65 69 66 20 TCL = 1.!elseif
05b0: 22 24 28 50 52 4f 4a 45 43 54 29 22 20 3d 3d 20 "$(PROJECT)" ==
05c0: 22 74 6b 22 0a 44 4f 49 4e 47 5f 54 4b 20 3d 20 "tk".DOING_TK =
05d0: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 6e 64 65 1.!endif..!ifnde
05e0: 66 20 4e 45 45 44 5f 54 4b 0a 23 20 42 61 63 6b f NEED_TK.# Back
05f0: 77 61 72 64 73 20 63 6f 6d 70 61 74 69 62 69 6c wards compatibil
0600: 69 74 79 0a 21 69 66 64 65 66 20 50 52 4f 4a 45 ity.!ifdef PROJE
0610: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 0a 4e CT_REQUIRES_TK.N
0620: 45 45 44 5f 54 4b 20 3d 20 24 28 50 52 4f 4a 45 EED_TK = $(PROJE
0630: 43 54 5f 52 45 51 55 49 52 45 53 5f 54 4b 29 0a CT_REQUIRES_TK).
0640: 21 65 6c 73 65 0a 4e 45 45 44 5f 54 4b 20 3d 20 !else.NEED_TK =
0650: 30 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0.!endif.!endif.
0660: 0a 21 69 66 6e 64 65 66 20 4e 45 45 44 5f 54 43 .!ifndef NEED_TC
0670: 4c 5f 53 4f 55 52 43 45 0a 4e 45 45 44 5f 54 43 L_SOURCE.NEED_TC
0680: 4c 5f 53 4f 55 52 43 45 20 3d 20 30 0a 21 65 6e L_SOURCE = 0.!en
0690: 64 69 66 0a 0a 21 69 66 64 65 66 20 4e 45 45 44 dif..!ifdef NEED
06a0: 5f 54 4b 5f 53 4f 55 52 43 45 0a 21 69 66 20 24 _TK_SOURCE.!if $
06b0: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 (NEED_TK_SOURCE)
06c0: 0a 4e 45 45 44 5f 54 4b 20 3d 20 31 0a 21 65 6e .NEED_TK = 1.!en
06d0: 64 69 66 0a 21 65 6c 73 65 0a 4e 45 45 44 5f 54 dif.!else.NEED_T
06e0: 4b 5f 53 4f 55 52 43 45 20 3d 20 30 0a 21 65 6e K_SOURCE = 0.!en
06f0: 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 dif..###########
0700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0710: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0730: 23 23 23 23 23 0a 23 20 4e 6d 61 6b 65 20 69 73 #####.# Nmake is
0740: 20 61 20 70 72 65 74 74 79 20 77 65 61 6b 20 65 a pretty weak e
0750: 6e 76 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 73 79 nvironment in sy
0760: 6e 74 61 78 20 61 6e 64 20 63 61 70 61 62 69 6c ntax and capabil
0770: 69 74 69 65 73 0a 23 20 73 6f 20 74 68 69 73 20 ities.# so this
0780: 66 69 6c 65 20 69 73 20 6e 65 63 65 73 73 61 72 file is necessar
0790: 69 6c 79 20 76 65 72 62 6f 73 65 2e 20 49 74 27 ily verbose. It'
07a0: 73 20 62 72 6f 6b 65 6e 20 64 6f 77 6e 20 69 6e s broken down in
07b0: 74 6f 0a 23 20 74 68 65 20 66 6f 6c 6c 6f 77 69 to.# the followi
07c0: 6e 67 20 70 61 72 74 73 2e 0a 23 0a 23 20 30 2e ng parts..#.# 0.
07d0: 20 53 61 6e 69 74 79 20 63 68 65 63 6b 20 74 68 Sanity check th
07e0: 61 74 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 at compiler envi
07f0: 72 6f 6e 6d 65 6e 74 20 69 73 20 73 65 74 20 75 ronment is set u
0800: 70 20 61 6e 64 20 69 6e 69 74 69 61 6c 69 7a 65 p and initialize
0810: 0a 23 20 20 20 20 61 6e 79 20 62 75 69 6c 74 2d .# any built-
0820: 69 6e 20 73 65 74 74 69 6e 67 73 20 66 72 6f 6d in settings from
0830: 20 74 68 65 20 70 61 72 65 6e 74 20 6d 61 6b 65 the parent make
0840: 66 69 6c 65 0a 23 20 31 2e 20 46 69 72 73 74 20 file.# 1. First
0850: 64 65 66 69 6e 65 20 74 68 65 20 65 78 74 65 72 define the exter
0860: 6e 61 6c 20 74 6f 6f 6c 73 20 75 73 65 64 20 66 nal tools used f
0870: 6f 72 20 63 6f 6d 70 69 6c 69 6e 67 2c 20 63 6f or compiling, co
0880: 70 79 69 6e 67 20 65 74 63 2e 0a 23 20 20 20 20 pying etc..#
0890: 61 73 20 74 68 69 73 20 69 73 20 69 6e 64 65 70 as this is indep
08a0: 65 6e 64 65 6e 74 20 6f 66 20 65 76 65 72 79 74 endent of everyt
08b0: 68 69 6e 67 20 65 6c 73 65 2e 0a 23 20 32 2e 20 hing else..# 2.
08c0: 46 69 67 75 72 65 20 6f 75 74 20 6f 75 72 20 62 Figure out our b
08d0: 75 69 6c 64 20 73 74 72 75 63 74 75 72 65 20 69 uild structure i
08e0: 6e 20 74 65 72 6d 73 20 6f 66 20 74 68 65 20 64 n terms of the d
08f0: 69 72 65 63 74 6f 72 79 2c 20 77 68 65 74 68 65 irectory, whethe
0900: 72 0a 23 20 20 20 20 77 65 20 61 72 65 20 62 75 r.# we are bu
0910: 69 6c 64 69 6e 67 20 54 63 6c 20 6f 72 20 61 6e ilding Tcl or an
0920: 20 65 78 74 65 6e 73 69 6f 6e 2c 20 65 74 63 2e extension, etc.
0930: 0a 23 20 33 2e 20 44 65 74 65 72 6d 69 6e 65 20 .# 3. Determine
0940: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 the compiler and
0950: 20 6c 69 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 linker versions
0960: 0a 23 20 34 2e 20 42 75 69 6c 64 20 74 68 65 20 .# 4. Build the
0970: 6e 6d 61 6b 65 68 6c 70 20 68 65 6c 70 65 72 20 nmakehlp helper
0980: 61 70 70 6c 69 63 61 74 69 6f 6e 0a 23 20 35 2e application.# 5.
0990: 20 44 65 74 65 72 6d 69 6e 65 20 74 68 65 20 73 Determine the s
09a0: 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 6c 65 upported compile
09b0: 72 20 6f 70 74 69 6f 6e 73 20 61 6e 64 20 66 65 r options and fe
09c0: 61 74 75 72 65 73 0a 23 20 36 2e 20 45 78 74 72 atures.# 6. Extr
09d0: 61 63 74 20 54 63 6c 2c 20 54 6b 2c 20 61 6e 64 act Tcl, Tk, and
09e0: 20 70 6f 73 73 69 62 6c 79 20 65 78 74 65 6e 73 possibly extens
09f0: 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e 20 6e 75 ions, version nu
0a00: 6d 62 65 72 73 20 66 72 6f 6d 20 74 68 65 0a 23 mbers from the.#
0a10: 20 20 20 20 68 65 61 64 65 72 73 0a 23 20 37 2e headers.# 7.
0a20: 20 50 61 72 73 65 20 74 68 65 20 4f 50 54 53 20 Parse the OPTS
0a30: 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 6f 72 20 macro value for
0a40: 75 73 65 72 2d 73 70 65 63 69 66 69 65 64 20 62 user-specified b
0a50: 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 uild configurati
0a60: 6f 6e 0a 23 20 38 2e 20 50 61 72 73 65 20 74 68 on.# 8. Parse th
0a70: 65 20 53 54 41 54 53 20 6d 61 63 72 6f 20 76 61 e STATS macro va
0a80: 6c 75 65 20 66 6f 72 20 73 74 61 74 69 73 74 69 lue for statisti
0a90: 63 73 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 cs instrumentati
0aa0: 6f 6e 0a 23 20 39 2e 20 50 61 72 73 65 20 74 68 on.# 9. Parse th
0ab0: 65 20 43 48 45 43 4b 53 20 6d 61 63 72 6f 20 66 e CHECKS macro f
0ac0: 6f 72 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 6f or additional co
0ad0: 6d 70 69 6c 61 74 69 6f 6e 20 63 68 65 63 6b 73 mpilation checks
0ae0: 0a 23 20 31 30 2e 20 42 61 73 65 64 20 6f 6e 20 .# 10. Based on
0af0: 74 68 69 73 20 73 65 6c 65 63 74 65 64 20 63 6f this selected co
0b00: 6e 66 69 67 75 72 61 74 69 6f 6e 2c 20 63 6f 6e nfiguration, con
0b10: 73 74 72 75 63 74 20 74 68 65 20 6f 75 74 70 75 struct the outpu
0b20: 74 0a 23 20 20 20 20 20 64 69 72 65 63 74 6f 72 t.# director
0b30: 79 20 61 6e 64 20 66 69 6c 65 20 70 61 74 68 73 y and file paths
0b40: 0a 23 20 31 31 2e 20 43 6f 6e 73 74 72 75 63 74 .# 11. Construct
0b50: 20 74 68 65 20 70 61 74 68 73 20 77 68 65 72 65 the paths where
0b60: 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 the package is
0b70: 74 6f 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a to be installed.
0b80: 23 20 31 32 2e 20 53 65 74 20 75 70 20 74 68 65 # 12. Set up the
0b90: 20 61 63 74 75 61 6c 20 6f 70 74 69 6f 6e 73 20 actual options
0ba0: 70 61 73 73 65 64 20 74 6f 20 63 6f 6d 70 69 6c passed to compil
0bb0: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 62 61 er and linker ba
0bc0: 73 65 64 0a 23 20 20 20 20 20 6f 6e 20 74 68 65 sed.# on the
0bd0: 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 67 61 74 information gat
0be0: 68 65 72 65 64 20 61 62 6f 76 65 2e 0a 23 20 31 hered above..# 1
0bf0: 33 2e 20 44 65 66 69 6e 65 20 73 6f 6d 65 20 73 3. Define some s
0c00: 74 61 6e 64 61 72 64 20 62 75 69 6c 64 20 74 61 tandard build ta
0c10: 72 67 65 74 73 20 61 6e 64 20 69 6d 70 6c 69 63 rgets and implic
0c20: 69 74 20 72 75 6c 65 73 2e 20 54 68 65 73 65 20 it rules. These
0c30: 6d 61 79 0a 23 20 20 20 20 20 62 65 20 6f 70 74 may.# be opt
0c40: 69 6f 6e 61 6c 6c 79 20 64 69 73 61 62 6c 65 64 ionally disabled
0c50: 20 62 79 20 74 68 65 20 70 61 72 65 6e 74 20 6d by the parent m
0c60: 61 6b 65 66 69 6c 65 2e 0a 23 20 31 34 2e 20 28 akefile..# 14. (
0c70: 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 6f For extensions o
0c80: 6e 6c 79 2e 29 20 43 6f 6d 70 61 72 65 20 74 68 nly.) Compare th
0c90: 65 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 e configuration
0ca0: 6f 66 20 74 68 65 20 74 61 72 67 65 74 0a 23 20 of the target.#
0cb0: 20 20 20 20 54 63 6c 20 61 6e 64 20 74 68 65 20 Tcl and the
0cc0: 65 78 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 77 extensions and w
0cd0: 61 72 6e 20 61 67 61 69 6e 73 74 20 64 69 73 63 arn against disc
0ce0: 72 65 70 61 6e 63 69 65 73 2e 0a 23 0a 23 20 4f repancies..#.# O
0cf0: 6e 65 20 66 69 6e 61 6c 20 6e 6f 74 65 20 61 62 ne final note ab
0d00: 6f 75 74 20 74 68 65 20 6d 61 63 72 6f 20 6e 61 out the macro na
0d10: 6d 65 73 20 75 73 65 64 2e 20 54 68 65 79 20 61 mes used. They a
0d20: 72 65 20 61 73 20 74 68 65 79 20 61 72 65 0a 23 re as they are.#
0d30: 20 66 6f 72 20 68 69 73 74 6f 72 69 63 61 6c 20 for historical
0d40: 72 65 61 73 6f 6e 73 2e 20 57 65 20 77 6f 75 6c reasons. We woul
0d50: 64 20 6c 69 6b 65 20 6c 65 67 61 63 79 20 65 78 d like legacy ex
0d60: 74 65 6e 73 69 6f 6e 73 20 74 6f 0a 23 20 63 6f tensions to.# co
0d70: 6e 74 69 6e 75 65 20 74 6f 20 77 6f 72 6b 20 77 ntinue to work w
0d80: 69 74 68 20 74 68 69 73 20 6d 61 6b 65 20 69 6e ith this make in
0d90: 63 6c 75 64 65 20 66 69 6c 65 20 73 6f 20 62 65 clude file so be
0da0: 20 77 61 72 79 20 6f 66 0a 23 20 63 68 61 6e 67 wary of.# chang
0db0: 69 6e 67 20 74 68 65 6d 20 66 6f 72 20 63 6f 6e ing them for con
0dc0: 73 69 73 74 65 6e 63 79 20 6f 72 20 63 6c 61 72 sistency or clar
0dd0: 69 74 79 2e 0a 0a 23 20 30 2e 20 53 61 6e 69 74 ity...# 0. Sanit
0de0: 79 20 63 68 65 63 6b 20 63 6f 6d 70 69 6c 65 72 y check compiler
0df0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 0a 23 20 environment..#
0e00: 43 68 65 63 6b 20 74 6f 20 73 65 65 20 77 65 20 Check to see we
0e10: 61 72 65 20 63 6f 6e 66 69 67 75 72 65 64 20 74 are configured t
0e20: 6f 20 62 75 69 6c 64 20 77 69 74 68 20 4d 53 56 o build with MSV
0e30: 43 20 28 4d 53 44 45 56 44 49 52 2c 20 4d 53 56 C (MSDEVDIR, MSV
0e40: 43 44 49 52 20 6f 72 0a 23 20 56 43 49 4e 53 54 CDIR or.# VCINST
0e50: 41 4c 4c 44 49 52 29 20 6f 72 20 77 69 74 68 20 ALLDIR) or with
0e60: 74 68 65 20 4d 53 20 50 6c 61 74 66 6f 72 6d 20 the MS Platform
0e70: 53 44 4b 20 28 4d 53 53 44 4b 20 6f 72 20 57 69 SDK (MSSDK or Wi
0e80: 6e 64 6f 77 73 53 44 4b 44 69 72 29 0a 0a 21 69 ndowsSDKDir)..!i
0e90: 66 20 21 64 65 66 69 6e 65 64 28 4d 53 44 45 56 f !defined(MSDEV
0ea0: 44 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 DIR) && !defined
0eb0: 28 4d 53 56 43 44 49 52 29 20 26 26 20 21 64 65 (MSVCDIR) && !de
0ec0: 66 69 6e 65 64 28 56 43 49 4e 53 54 41 4c 4c 44 fined(VCINSTALLD
0ed0: 49 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 IR) && !defined(
0ee0: 4d 53 53 44 4b 29 20 26 26 20 21 64 65 66 69 6e MSSDK) && !defin
0ef0: 65 64 28 57 49 4e 44 4f 57 53 53 44 4b 44 49 52 ed(WINDOWSSDKDIR
0f00: 29 0a 4d 53 47 20 3d 20 5e 0a 56 69 73 75 61 6c ).MSG = ^.Visual
0f10: 20 43 2b 2b 20 63 6f 6d 70 69 6c 65 72 20 65 6e C++ compiler en
0f20: 76 69 72 6f 6e 6d 65 6e 74 20 6e 6f 74 20 69 6e vironment not in
0f30: 69 74 69 61 6c 69 7a 65 64 2e 0a 21 65 72 72 6f itialized..!erro
0f40: 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a r $(MSG).!endif.
0f50: 0a 23 20 57 65 20 6e 65 65 64 20 74 6f 20 72 75 .# We need to ru
0f60: 6e 20 66 72 6f 6d 20 74 68 65 20 64 69 72 65 63 n from the direc
0f70: 74 6f 72 79 20 74 68 65 20 70 61 72 65 6e 74 20 tory the parent
0f80: 6d 61 6b 65 66 69 6c 65 20 69 73 20 6c 6f 63 61 makefile is loca
0f90: 74 65 64 20 69 6e 2e 0a 23 20 6e 6d 61 6b 65 20 ted in..# nmake
0fa0: 64 6f 65 73 20 6e 6f 74 20 74 65 6c 6c 20 75 73 does not tell us
0fb0: 20 77 68 61 74 20 6d 61 6b 65 66 69 6c 65 20 77 what makefile w
0fc0: 61 73 20 75 73 65 64 20 74 6f 20 69 6e 76 6f 6b as used to invok
0fd0: 65 20 69 74 20 73 6f 20 70 61 72 65 6e 74 0a 23 e it so parent.#
0fe0: 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 74 6f makefile has to
0ff0: 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46 49 4c set the MAKEFIL
1000: 45 56 43 20 6d 61 63 72 6f 20 6f 72 20 77 65 20 EVC macro or we
1010: 6a 75 73 74 20 6d 61 6b 65 20 61 20 67 75 65 73 just make a gues
1020: 73 20 61 6e 64 0a 23 20 77 61 72 6e 20 69 66 20 s and.# warn if
1030: 77 65 20 74 68 69 6e 6b 20 74 68 61 74 20 69 73 we think that is
1040: 20 6e 6f 74 20 74 68 65 20 63 61 73 65 2e 0a 21 not the case..!
1050: 69 66 20 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 if "$(MAKEFILEVC
1060: 29 22 20 3d 3d 20 22 22 0a 0a 21 69 66 20 65 78 )" == ""..!if ex
1070: 69 73 74 28 22 24 28 50 52 4f 4a 45 43 54 29 2e ist("$(PROJECT).
1080: 76 63 22 29 0a 4d 41 4b 45 46 49 4c 45 56 43 20 vc").MAKEFILEVC
1090: 3d 20 24 28 50 52 4f 4a 45 43 54 29 2e 76 63 0a = $(PROJECT).vc.
10a0: 21 65 6c 73 65 69 66 20 65 78 69 73 74 28 22 6d !elseif exist("m
10b0: 61 6b 65 66 69 6c 65 2e 76 63 22 29 0a 4d 41 4b akefile.vc").MAK
10c0: 45 46 49 4c 45 56 43 20 3d 20 6d 61 6b 65 66 69 EFILEVC = makefi
10d0: 6c 65 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 6e le.vc.!endif.!en
10e0: 64 69 66 20 23 20 22 24 28 4d 41 4b 45 46 49 4c dif # "$(MAKEFIL
10f0: 45 56 43 29 22 20 3d 3d 20 22 22 0a 0a 21 69 66 EVC)" == ""..!if
1100: 20 21 65 78 69 73 74 28 22 24 28 4d 41 4b 45 46 !exist("$(MAKEF
1110: 49 4c 45 56 43 29 22 29 0a 4d 53 47 20 3d 20 5e ILEVC)").MSG = ^
1120: 0a 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 6e 6d .You must run nm
1130: 61 6b 65 20 66 72 6f 6d 20 74 68 65 20 64 69 72 ake from the dir
1140: 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e ectory containin
1150: 67 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 g the project ma
1160: 6b 65 66 69 6c 65 2e 5e 0a 49 66 20 79 6f 75 20 kefile.^.If you
1170: 61 72 65 20 64 6f 69 6e 67 20 74 68 61 74 20 61 are doing that a
1180: 6e 64 20 67 65 74 74 69 6e 67 20 74 68 69 73 20 nd getting this
1190: 6d 65 73 73 61 67 65 2c 20 73 65 74 20 74 68 65 message, set the
11a0: 20 4d 41 4b 45 46 49 4c 45 56 43 5e 0a 6d 61 63 MAKEFILEVC^.mac
11b0: 72 6f 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f ro to the name o
11c0: 66 20 74 68 65 20 70 72 6f 6a 65 63 74 20 6d 61 f the project ma
11d0: 6b 65 66 69 6c 65 2e 0a 21 6d 65 73 73 61 67 65 kefile..!message
11e0: 20 57 41 52 4e 49 4e 47 3a 20 24 28 4d 53 47 29 WARNING: $(MSG)
11f0: 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 23 .!endif...######
1200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1210: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1220: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1230: 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 2e 20 ##########.# 1.
1240: 44 65 66 69 6e 65 20 65 78 74 65 72 6e 61 6c 20 Define external
1250: 70 72 6f 67 72 61 6d 73 20 62 65 69 6e 67 20 75 programs being u
1260: 73 65 64 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d sed..#----------
1270: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1280: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1290: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
12a0: 0a 23 20 53 65 74 20 74 68 65 20 70 72 6f 70 65 .# Set the prope
12b0: 72 20 63 6f 70 79 20 6d 65 74 68 6f 64 20 74 6f r copy method to
12c0: 20 61 76 6f 69 64 20 6f 76 65 72 77 72 69 74 65 avoid overwrite
12d0: 20 71 75 65 73 74 69 6f 6e 73 0a 23 20 74 6f 20 questions.# to
12e0: 74 68 65 20 75 73 65 72 20 77 68 65 6e 20 63 6f the user when co
12f0: 70 79 69 6e 67 20 66 69 6c 65 73 20 61 6e 64 20 pying files and
1300: 73 65 6c 65 63 74 69 6e 67 20 74 68 65 20 72 69 selecting the ri
1310: 67 68 74 0a 23 20 22 64 65 6c 65 74 65 20 61 6c ght.# "delete al
1320: 6c 22 20 6d 65 74 68 6f 64 2e 0a 23 2d 2d 2d 2d l" method..#----
1330: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1360: 2d 2d 2d 2d 2d 2d 0a 0a 52 4d 44 49 52 09 3d 20 ------..RMDIR.=
1370: 72 6d 64 69 72 20 2f 53 20 2f 51 0a 43 50 59 09 rmdir /S /Q.CPY.
1380: 3d 20 78 63 6f 70 79 20 2f 69 20 2f 79 20 3e 4e = xcopy /i /y >N
1390: 55 4c 0a 43 50 59 44 49 52 20 20 3d 20 78 63 6f UL.CPYDIR = xco
13a0: 70 79 20 2f 65 20 2f 69 20 2f 79 20 3e 4e 55 4c py /e /i /y >NUL
13b0: 0a 43 4f 50 59 09 3d 20 63 6f 70 79 20 2f 79 20 .COPY.= copy /y
13c0: 3e 4e 55 4c 0a 4d 4b 44 49 52 20 20 20 3d 20 6d >NUL.MKDIR = m
13d0: 6b 64 69 72 0a 0a 23 23 23 23 23 23 23 23 23 23 kdir..##########
13e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
13f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1400: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1410: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 32 ############.# 2
1420: 2e 20 46 69 67 75 72 65 20 6f 75 74 20 6f 75 72 . Figure out our
1430: 20 62 75 69 6c 64 20 65 6e 76 69 72 6f 6e 6d 65 build environme
1440: 6e 74 20 69 6e 20 74 65 72 6d 73 20 6f 66 20 77 nt in terms of w
1450: 68 61 74 20 77 65 27 72 65 20 62 75 69 6c 64 69 hat we're buildi
1460: 6e 67 2e 0a 23 0a 23 20 28 61 29 20 54 63 6c 20 ng..#.# (a) Tcl
1470: 69 74 73 65 6c 66 0a 23 20 28 62 29 20 54 6b 0a itself.# (b) Tk.
1480: 23 20 28 63 29 20 61 20 54 63 6c 20 65 78 74 65 # (c) a Tcl exte
1490: 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 62 72 nsion using libr
14a0: 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 20 66 aries/includes f
14b0: 72 6f 6d 20 61 6e 20 2a 69 6e 73 74 61 6c 6c 65 rom an *installe
14c0: 64 2a 20 54 63 6c 0a 23 20 28 64 29 20 61 20 54 d* Tcl.# (d) a T
14d0: 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 69 cl extension usi
14e0: 6e 67 20 6c 69 62 72 61 72 69 65 73 2f 69 6e 63 ng libraries/inc
14f0: 6c 75 64 65 73 20 66 72 6f 6d 20 54 63 6c 20 73 ludes from Tcl s
1500: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 0a ource directory.
1510: 23 0a 23 20 54 68 69 73 20 6c 61 73 74 20 69 73 #.# This last is
1520: 20 6e 65 65 64 65 64 20 62 65 63 61 75 73 65 20 needed because
1530: 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 some extensions
1540: 73 74 69 6c 6c 20 6e 65 65 64 0a 23 20 73 6f 6d still need.# som
1550: 65 20 54 63 6c 20 69 6e 74 65 72 66 61 63 65 73 e Tcl interfaces
1560: 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 70 75 that are not pu
1570: 62 6c 69 63 6c 79 20 65 78 70 6f 73 65 64 2e 0a blicly exposed..
1580: 23 0a 23 20 54 68 65 20 66 72 61 67 6d 65 6e 74 #.# The fragment
1590: 20 77 69 6c 6c 20 73 65 74 20 74 68 65 20 66 6f will set the fo
15a0: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a llowing macros:.
15b0: 23 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 20 6f 66 # ROOT - root of
15c0: 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 73 6f 75 this module sou
15d0: 72 63 65 73 0a 23 20 43 4f 4d 50 41 54 44 49 52 rces.# COMPATDIR
15e0: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 - source direct
15f0: 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 73 20 63 ory that holds c
1600: 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 73 6f 75 ompatibility sou
1610: 72 63 65 73 0a 23 20 44 4f 43 44 49 52 20 2d 20 rces.# DOCDIR -
1620: 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 source directory
1630: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64 6f 63 75 containing docu
1640: 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c 65 73 0a mentation files.
1650: 23 20 47 45 4e 45 52 49 43 44 49 52 20 2d 20 70 # GENERICDIR - p
1660: 6c 61 74 66 6f 72 6d 2d 69 6e 64 65 70 65 6e 64 latform-independ
1670: 65 6e 74 20 73 6f 75 72 63 65 20 64 69 72 65 63 ent source direc
1680: 74 6f 72 79 0a 23 20 57 49 4e 5f 44 49 52 20 2d tory.# WIN_DIR -
1690: 20 57 69 6e 64 6f 77 73 2d 73 70 65 63 69 66 69 Windows-specifi
16a0: 63 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f c source directo
16b0: 72 79 0a 23 20 54 45 53 54 44 49 52 20 2d 20 64 ry.# TESTDIR - d
16c0: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e irectory contain
16d0: 69 6e 67 20 74 65 73 74 20 66 69 6c 65 73 0a 23 ing test files.#
16e0: 20 54 4f 4f 4c 53 44 49 52 20 2d 20 64 69 72 65 TOOLSDIR - dire
16f0: 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 ctory containing
1700: 20 62 75 69 6c 64 20 74 6f 6f 6c 73 0a 23 20 5f build tools.# _
1710: 54 43 4c 44 49 52 20 2d 20 72 6f 6f 74 20 6f 66 TCLDIR - root of
1720: 20 74 68 65 20 54 63 6c 20 69 6e 73 74 61 6c 6c the Tcl install
1730: 61 74 69 6f 6e 20 4f 52 20 74 68 65 20 54 63 6c ation OR the Tcl
1740: 20 73 6f 75 72 63 65 73 2e 20 4e 6f 74 20 73 65 sources. Not se
1750: 74 0a 23 20 20 20 20 77 68 65 6e 20 62 75 69 6c t.# when buil
1760: 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e ding Tcl itself.
1770: 0a 23 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 2d .# _INSTALLDIR -
1780: 20 6e 61 74 69 76 65 20 66 6f 72 6d 20 6f 66 20 native form of
1790: 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e the installation
17a0: 20 70 61 74 68 2e 20 46 6f 72 20 54 63 6c 0a 23 path. For Tcl.#
17b0: 20 20 20 20 74 68 69 73 20 77 69 6c 6c 20 62 65 this will be
17c0: 20 74 68 65 20 72 6f 6f 74 20 6f 66 20 74 68 65 the root of the
17d0: 20 54 63 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f Tcl installatio
17e0: 6e 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e n. For extension
17f0: 73 0a 23 20 20 20 20 74 68 69 73 20 77 69 6c 6c s.# this will
1800: 20 62 65 20 74 68 65 20 6c 69 62 20 64 69 72 65 be the lib dire
1810: 63 74 6f 72 79 20 75 6e 64 65 72 20 74 68 65 20 ctory under the
1820: 72 6f 6f 74 2e 0a 23 20 54 43 4c 49 4e 53 54 41 root..# TCLINSTA
1830: 4c 4c 20 20 2d 20 73 65 74 20 74 6f 20 31 20 69 LL - set to 1 i
1840: 66 20 5f 54 43 4c 44 49 52 20 72 65 66 65 72 73 f _TCLDIR refers
1850: 20 74 6f 0a 23 20 20 20 20 68 65 61 64 65 72 73 to.# headers
1860: 20 61 6e 64 20 6c 69 62 72 61 72 69 65 73 20 66 and libraries f
1870: 72 6f 6d 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 rom an installed
1880: 20 54 63 6c 2c 20 61 6e 64 20 30 20 69 66 20 62 Tcl, and 0 if b
1890: 75 69 6c 74 20 61 67 61 69 6e 73 74 0a 23 20 20 uilt against.#
18a0: 20 20 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e Tcl sources. N
18b0: 6f 74 20 73 65 74 20 77 68 65 6e 20 62 75 69 6c ot set when buil
18c0: 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 2e ding Tcl itself.
18d0: 20 59 65 73 2c 20 6e 6f 74 20 76 65 72 79 20 77 Yes, not very w
18e0: 65 6c 6c 0a 23 20 20 20 20 6e 61 6d 65 64 2e 0a ell.# named..
18f0: 23 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 74 69 76 # _TCL_H - nativ
1900: 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 63 e path to the tc
1910: 6c 2e 68 20 66 69 6c 65 0a 23 0a 23 20 49 66 20 l.h file.#.# If
1920: 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65 64 2c 20 Tk is involved,
1930: 61 6c 73 6f 20 73 65 74 73 20 74 68 65 20 66 6f also sets the fo
1940: 6c 6c 6f 77 69 6e 67 0a 23 20 5f 54 4b 44 49 52 llowing.# _TKDIR
1950: 20 2d 20 6e 61 74 69 76 65 20 66 6f 72 6d 20 54 - native form T
1960: 6b 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f k installation O
1970: 52 20 54 6b 20 73 6f 75 72 63 65 2e 20 4e 6f 74 R Tk source. Not
1980: 20 73 65 74 20 69 66 20 62 75 69 6c 64 69 6e 67 set if building
1990: 0a 23 20 20 20 20 54 6b 20 69 74 73 65 6c 66 2e .# Tk itself.
19a0: 0a 23 20 54 4b 49 4e 53 54 41 4c 4c 20 2d 20 73 .# TKINSTALL - s
19b0: 65 74 20 31 20 69 66 20 5f 54 4b 44 49 52 20 72 et 1 if _TKDIR r
19c0: 65 66 65 72 73 20 74 6f 20 69 6e 73 74 61 6c 6c efers to install
19d0: 65 64 20 54 6b 20 61 6e 64 20 30 20 69 66 20 54 ed Tk and 0 if T
19e0: 6b 20 73 6f 75 72 63 65 73 0a 23 20 5f 54 4b 5f k sources.# _TK_
19f0: 48 20 2d 20 6e 61 74 69 76 65 20 70 61 74 68 20 H - native path
1a00: 74 6f 20 74 68 65 20 74 6b 2e 68 20 66 69 6c 65 to the tk.h file
1a10: 0a 0a 23 20 52 6f 6f 74 20 64 69 72 65 63 74 6f ..# Root directo
1a20: 72 79 20 66 6f 72 20 73 6f 75 72 63 65 73 20 61 ry for sources a
1a30: 6e 64 20 61 73 73 75 6d 65 64 20 73 75 62 64 69 nd assumed subdi
1a40: 72 65 63 74 6f 72 69 65 73 0a 52 4f 4f 54 20 3d rectories.ROOT =
1a50: 20 24 28 4d 41 4b 45 44 49 52 29 5c 2e 2e 0a 23 $(MAKEDIR)\...#
1a60: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 The following p
1a70: 61 74 68 73 20 43 41 4e 4e 4f 54 20 68 61 76 65 aths CANNOT have
1a80: 20 73 70 61 63 65 73 20 69 6e 20 74 68 65 6d 20 spaces in them
1a90: 61 73 20 74 68 65 79 20 61 70 70 65 61 72 20 6f as they appear o
1aa0: 6e 20 74 68 65 0a 23 20 6c 65 66 74 20 73 69 64 n the.# left sid
1ab0: 65 20 6f 66 20 69 6d 70 6c 69 63 69 74 20 72 75 e of implicit ru
1ac0: 6c 65 73 2e 0a 21 69 66 6e 64 65 66 20 43 4f 4d les..!ifndef COM
1ad0: 50 41 54 44 49 52 0a 43 4f 4d 50 41 54 44 49 52 PATDIR.COMPATDIR
1ae0: 09 3d 20 24 28 52 4f 4f 54 29 5c 63 6f 6d 70 61 .= $(ROOT)\compa
1af0: 74 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 t.!endif.!ifndef
1b00: 20 44 4f 43 44 49 52 0a 44 4f 43 44 49 52 09 09 DOCDIR.DOCDIR..
1b10: 3d 20 24 28 52 4f 4f 54 29 5c 64 6f 63 0a 21 65 = $(ROOT)\doc.!e
1b20: 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 47 45 4e ndif.!ifndef GEN
1b30: 45 52 49 43 44 49 52 0a 47 45 4e 45 52 49 43 44 ERICDIR.GENERICD
1b40: 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 67 65 6e IR.= $(ROOT)\gen
1b50: 65 72 69 63 0a 21 65 6e 64 69 66 0a 21 69 66 6e eric.!endif.!ifn
1b60: 64 65 66 20 54 4f 4f 4c 53 44 49 52 0a 54 4f 4f def TOOLSDIR.TOO
1b70: 4c 53 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c LSDIR.= $(ROOT)\
1b80: 74 6f 6f 6c 73 0a 21 65 6e 64 69 66 0a 21 69 66 tools.!endif.!if
1b90: 6e 64 65 66 20 54 45 53 54 44 49 52 0a 54 45 53 ndef TESTDIR.TES
1ba0: 54 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 74 TDIR.= $(ROOT)\t
1bb0: 65 73 74 73 0a 21 65 6e 64 69 66 0a 21 69 66 6e ests.!endif.!ifn
1bc0: 64 65 66 20 4c 49 42 44 49 52 0a 21 69 66 20 65 def LIBDIR.!if e
1bd0: 78 69 73 74 28 22 24 28 52 4f 4f 54 29 5c 6c 69 xist("$(ROOT)\li
1be0: 62 72 61 72 79 22 29 0a 4c 49 42 44 49 52 20 20 brary").LIBDIR
1bf0: 20 20 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 = $(ROOT
1c00: 29 5c 6c 69 62 72 61 72 79 0a 21 65 6c 73 65 0a )\library.!else.
1c10: 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20 LIBDIR
1c20: 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 0a 21 65 = $(ROOT)\lib.!e
1c30: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 6e ndif.!endif.!ifn
1c40: 64 65 66 20 44 45 4d 4f 44 49 52 0a 21 69 66 20 def DEMODIR.!if
1c50: 65 78 69 73 74 28 22 24 28 4c 49 42 44 49 52 29 exist("$(LIBDIR)
1c60: 5c 64 65 6d 6f 73 22 29 0a 44 45 4d 4f 44 49 52 \demos").DEMODIR
1c70: 09 09 3d 20 24 28 4c 49 42 44 49 52 29 5c 64 65 ..= $(LIBDIR)\de
1c80: 6d 6f 73 0a 21 65 6c 73 65 0a 44 45 4d 4f 44 49 mos.!else.DEMODI
1c90: 52 09 09 3d 20 24 28 52 4f 4f 54 29 5c 64 65 6d R..= $(ROOT)\dem
1ca0: 6f 73 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 os.!endif.!endif
1cb0: 20 23 20 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 # ifndef DEMODI
1cc0: 52 0a 23 20 44 6f 20 4e 4f 54 20 75 73 65 20 57 R.# Do NOT use W
1cd0: 49 4e 44 49 52 20 62 65 63 61 75 73 65 20 69 74 INDIR because it
1ce0: 20 69 73 20 57 69 6e 64 6f 77 73 20 69 6e 74 65 is Windows inte
1cf0: 72 6e 61 6c 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 rnal environment
1d00: 0a 23 20 76 61 72 69 61 62 6c 65 20 74 6f 20 70 .# variable to p
1d10: 6f 69 6e 74 20 74 6f 20 63 3a 5c 77 69 6e 64 6f oint to c:\windo
1d20: 77 73 21 0a 57 49 4e 5f 44 49 52 09 09 3d 20 24 ws!.WIN_DIR..= $
1d30: 28 52 4f 4f 54 29 5c 77 69 6e 0a 0a 21 69 66 6e (ROOT)\win..!ifn
1d40: 64 65 66 20 52 43 44 49 52 0a 21 69 66 20 65 78 def RCDIR.!if ex
1d50: 69 73 74 28 22 24 28 57 49 4e 5f 44 49 52 29 5c ist("$(WIN_DIR)\
1d60: 72 63 22 29 0a 52 43 44 49 52 20 20 20 20 20 20 rc").RCDIR
1d70: 20 20 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 = $(WIN_DIR
1d80: 29 5c 72 63 0a 21 65 6c 73 65 0a 52 43 44 49 52 )\rc.!else.RCDIR
1d90: 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 57 = $(W
1da0: 49 4e 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 IN_DIR).!endif.!
1db0: 65 6e 64 69 66 0a 52 43 44 49 52 20 3d 20 24 28 endif.RCDIR = $(
1dc0: 52 43 44 49 52 3a 2f 3d 5c 29 0a 0a 23 20 54 68 RCDIR:/=\)..# Th
1dd0: 65 20 74 61 72 67 65 74 20 64 69 72 65 63 74 6f e target directo
1de0: 72 79 20 77 68 65 72 65 20 74 68 65 20 62 75 69 ry where the bui
1df0: 6c 74 20 70 61 63 6b 61 67 65 73 20 61 6e 64 20 lt packages and
1e00: 62 69 6e 61 72 69 65 73 20 77 69 6c 6c 20 62 65 binaries will be
1e10: 20 69 6e 73 74 61 6c 6c 65 64 2e 0a 23 20 49 4e installed..# IN
1e20: 53 54 41 4c 4c 44 49 52 20 69 73 20 74 68 65 20 STALLDIR is the
1e30: 28 6f 70 74 69 6f 6e 61 6c 29 20 70 61 74 68 20 (optional) path
1e40: 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 specified by the
1e50: 20 75 73 65 72 2e 0a 23 20 5f 49 4e 53 54 41 4c user..# _INSTAL
1e60: 4c 44 49 52 20 69 73 20 49 4e 53 54 41 4c 4c 44 LDIR is INSTALLD
1e70: 49 52 20 75 73 69 6e 67 20 74 68 65 20 62 61 63 IR using the bac
1e80: 6b 73 6c 61 73 68 20 73 65 70 61 72 61 74 6f 72 kslash separator
1e90: 20 73 79 6e 74 61 78 0a 21 69 66 64 65 66 20 49 syntax.!ifdef I
1ea0: 4e 53 54 41 4c 4c 44 49 52 0a 23 23 23 20 46 69 NSTALLDIR.### Fi
1eb0: 78 20 74 68 65 20 70 61 74 68 20 73 65 70 61 72 x the path separ
1ec0: 61 74 6f 72 73 2e 0a 5f 49 4e 53 54 41 4c 4c 44 ators.._INSTALLD
1ed0: 49 52 09 3d 20 24 28 49 4e 53 54 41 4c 4c 44 49 IR.= $(INSTALLDI
1ee0: 52 3a 2f 3d 5c 29 0a 21 65 6c 73 65 0a 23 23 23 R:/=\).!else.###
1ef0: 20 41 73 73 75 6d 65 20 74 68 65 20 6e 6f 72 6d Assume the norm
1f00: 61 6c 20 64 65 66 61 75 6c 74 2e 0a 5f 49 4e 53 al default.._INS
1f10: 54 41 4c 4c 44 49 52 09 3d 20 24 28 48 4f 4d 45 TALLDIR.= $(HOME
1f20: 44 52 49 56 45 29 5c 54 63 6c 0a 21 65 6e 64 69 DRIVE)\Tcl.!endi
1f30: 66 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 f..!if $(DOING_T
1f40: 43 4c 29 0a 0a 23 20 42 45 47 49 4e 20 43 61 73 CL)..# BEGIN Cas
1f50: 65 20 32 28 61 29 20 2d 20 42 75 69 6c 64 69 6e e 2(a) - Buildin
1f60: 67 20 54 63 6c 20 69 74 73 65 6c 66 0a 0a 23 20 g Tcl itself..#
1f70: 4f 6e 6c 79 20 6e 65 65 64 20 74 6f 20 64 65 66 Only need to def
1f80: 69 6e 65 20 5f 54 43 4c 5f 48 0a 5f 54 43 4c 5f ine _TCL_H._TCL_
1f90: 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 5c 74 H = ..\generic\t
1fa0: 63 6c 2e 68 0a 0a 23 20 45 4e 44 20 43 61 73 65 cl.h..# END Case
1fb0: 20 32 28 61 29 20 2d 20 42 75 69 6c 64 69 6e 67 2(a) - Building
1fc0: 20 54 63 6c 20 69 74 73 65 6c 66 0a 0a 21 65 6c Tcl itself..!el
1fd0: 73 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 seif $(DOING_TK)
1fe0: 0a 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 32 ..# BEGIN Case 2
1ff0: 28 62 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 54 (b) - Building T
2000: 6b 0a 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 3d 20 k..TCLINSTALL =
2010: 30 20 23 20 54 6b 20 61 6c 77 61 79 73 20 62 75 0 # Tk always bu
2020: 69 6c 64 73 20 61 67 61 69 6e 73 74 20 54 63 6c ilds against Tcl
2030: 20 73 6f 75 72 63 65 2c 20 6e 6f 74 20 61 6e 20 source, not an
2040: 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0a 21 69 installed Tcl.!i
2050: 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 3d 3d f "$(TCLDIR)" ==
2060: 20 22 22 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 "".!if [echo TC
2070: 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 LDIR = \> nmakeh
2080: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
2090: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e [nmakehlp -L gen
20a0: 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d eric\tcl.h >> nm
20b0: 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 akehlp.out].!err
20c0: 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 or *** Could not
20d0: 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f 75 72 locate Tcl sour
20e0: 63 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 ce directory..!e
20f0: 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d ndif.!include nm
2100: 61 6b 65 68 6c 70 2e 6f 75 74 0a 21 65 6e 64 69 akehlp.out.!endi
2110: 66 20 23 20 54 43 4c 44 49 52 20 3d 3d 20 22 22 f # TCLDIR == ""
2120: 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 43 .._TCLDIR.= $(TC
2130: 4c 44 49 52 3a 2f 3d 5c 29 0a 5f 54 43 4c 5f 48 LDIR:/=\)._TCL_H
2140: 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 67 = $(_TCLDIR)\g
2150: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 69 66 eneric\tcl.h.!if
2160: 20 21 65 78 69 73 74 28 22 24 28 5f 54 43 4c 5f !exist("$(_TCL_
2170: 48 29 22 29 0a 21 65 72 72 6f 72 20 43 6f 75 6c H)").!error Coul
2180: 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 74 63 6c d not locate tcl
2190: 2e 68 2e 20 50 6c 65 61 73 65 20 73 65 74 20 74 .h. Please set t
21a0: 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 he TCLDIR macro
21b0: 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 to point to the
21c0: 54 63 6c 20 2a 73 6f 75 72 63 65 2a 20 64 69 72 Tcl *source* dir
21d0: 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 0a ectory..!endif..
21e0: 5f 54 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 _TK_H = ..\gener
21f0: 69 63 5c 74 6b 2e 68 0a 0a 23 20 45 4e 44 20 43 ic\tk.h..# END C
2200: 61 73 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 ase 2(b) - Build
2210: 69 6e 67 20 54 6b 0a 0a 21 65 6c 73 65 0a 0a 23 ing Tk..!else..#
2220: 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 63 29 BEGIN Case 2(c)
2230: 20 6f 72 20 28 64 29 20 2d 20 42 75 69 6c 64 69 or (d) - Buildi
2240: 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 ng an extension
2250: 6f 74 68 65 72 20 74 68 61 6e 20 54 6b 0a 0a 23 other than Tk..#
2260: 20 49 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 If command line
2270: 20 68 61 73 20 73 70 65 63 69 66 69 65 64 20 54 has specified T
2280: 63 6c 20 6c 6f 63 61 74 69 6f 6e 20 74 68 72 6f cl location thro
2290: 75 67 68 20 54 43 4c 44 49 52 2c 20 75 73 65 20 ugh TCLDIR, use
22a0: 69 74 0a 23 20 65 6c 73 65 20 64 65 66 61 75 6c it.# else defaul
22b0: 74 20 74 6f 20 74 68 65 20 49 4e 53 54 41 4c 4c t to the INSTALL
22c0: 44 49 52 20 73 65 74 74 69 6e 67 0a 21 69 66 20 DIR setting.!if
22d0: 22 24 28 54 43 4c 44 49 52 29 22 20 21 3d 20 22 "$(TCLDIR)" != "
22e0: 22 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 ".._TCLDIR.= $(T
22f0: 43 4c 44 49 52 3a 2f 3d 5c 29 0a 21 69 66 20 65 CLDIR:/=\).!if e
2300: 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 xist("$(_TCLDIR)
2310: 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 \include\tcl.h")
2320: 20 23 20 43 61 73 65 20 32 28 63 29 20 77 69 74 # Case 2(c) wit
2330: 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e 65 64 h TCLDIR defined
2340: 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 31 0a .TCLINSTALL.= 1.
2350: 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 _TCL_H
2360: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 = $(_TCLDIR)\inc
2370: 6c 75 64 65 5c 74 63 6c 2e 68 0a 21 65 6c 73 65 lude\tcl.h.!else
2380: 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c if exist("$(_TCL
2390: 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c DIR)\generic\tcl
23a0: 2e 68 22 29 20 23 20 43 61 73 65 20 32 28 64 29 .h") # Case 2(d)
23b0: 20 77 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 with TCLDIR def
23c0: 69 6e 65 64 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 ined.TCLINSTALL.
23d0: 3d 20 30 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 = 0._TCL_H
23e0: 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 = $(_TCLDIR)
23f0: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 \generic\tcl.h.!
2400: 65 6e 64 69 66 0a 0a 21 65 6c 73 65 20 20 23 20 endif..!else #
2410: 20 23 20 43 61 73 65 20 32 28 63 29 20 66 6f 72 # Case 2(c) for
2420: 20 65 78 74 65 6e 73 69 6f 6e 73 20 77 69 74 68 extensions with
2430: 20 54 43 4c 44 49 52 20 75 6e 64 65 66 69 6e 65 TCLDIR undefine
2440: 64 0a 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 d..# Need to loc
2450: 61 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e ate Tcl dependin
2460: 67 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 g on whether it
2470: 6e 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 needs Tcl source
2480: 20 6f 72 20 6e 6f 74 2e 0a 23 20 49 66 20 77 65 or not..# If we
2490: 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 don't, check th
24a0: 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 e INSTALLDIR for
24b0: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
24c0: 6c 20 66 69 72 73 74 0a 0a 21 69 66 20 65 78 69 l first..!if exi
24d0: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 st("$(_INSTALLDI
24e0: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 R)\include\tcl.h
24f0: 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 43 ") && !$(NEED_TC
2500: 4c 5f 53 4f 55 52 43 45 29 0a 0a 54 43 4c 49 4e L_SOURCE)..TCLIN
2510: 53 54 41 4c 4c 09 3d 20 31 0a 54 43 4c 44 49 52 STALL.= 1.TCLDIR
2520: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 = $(_I
2530: 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 23 20 NSTALLDIR)\...#
2540: 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c 20 62 65 NOTE: we will be
2550: 20 72 65 73 65 74 74 69 6e 67 20 5f 49 4e 53 54 resetting _INST
2560: 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e 53 54 41 ALLDIR to _INSTA
2570: 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 20 65 78 LLDIR/lib for ex
2580: 74 65 6e 73 69 6f 6e 73 0a 23 20 6c 61 74 65 72 tensions.# later
2590: 20 73 6f 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f so the \.. acco
25a0: 75 6e 74 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 unts for the /li
25b0: 62 0a 5f 54 43 4c 44 49 52 09 09 3d 20 24 28 5f b._TCLDIR..= $(_
25c0: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f INSTALLDIR)\..._
25d0: 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d TCL_H =
25e0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c $(_TCLDIR)\incl
25f0: 75 64 65 5c 74 63 6c 2e 68 0a 0a 21 65 6c 73 65 ude\tcl.h..!else
2600: 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 # exist(...) &&
2610: 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 !$(NEED_TCL_SOU
2620: 52 43 45 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 RCE)..!if [echo
2630: 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 _TCLDIR = \> nma
2640: 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 kehlp.out] \.
2650: 7c 7c 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 || [nmakehlp -L
2660: 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e generic\tcl.h >>
2670: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 nmakehlp.out].!
2680: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
2690: 6e 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 not locate Tcl s
26a0: 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e ource directory.
26b0: 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 .!endif.!include
26c0: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 54 43 nmakehlp.out.TC
26d0: 4c 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 LINSTALL =
26e0: 30 0a 54 43 4c 44 49 52 20 20 20 20 20 20 20 20 0.TCLDIR
26f0: 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 0a 5f 54 = $(_TCLDIR)._T
2700: 43 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 CL_H =
2710: 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 72 $(_TCLDIR)\gener
2720: 69 63 5c 74 63 6c 2e 68 0a 0a 21 65 6e 64 69 66 ic\tcl.h..!endif
2730: 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 # exist(...) &&
2740: 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 !$(NEED_TCL_SOU
2750: 52 43 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 RCE)..!endif # T
2760: 43 4c 44 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f CLDIR..!ifndef _
2770: 54 43 4c 5f 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 TCL_H.MSG =^.Fai
2780: 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 63 6c 2e led to find tcl.
2790: 68 2e 20 54 68 65 20 54 43 4c 44 49 52 20 6d 61 h. The TCLDIR ma
27a0: 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63 6f 72 cro is set incor
27b0: 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f 74 rectly or is not
27c0: 20 73 65 74 20 61 6e 64 20 64 65 66 61 75 6c 74 set and default
27d0: 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 63 path does not c
27e0: 6f 6e 74 61 69 6e 20 74 63 6c 2e 68 2e 0a 21 65 ontain tcl.h..!e
27f0: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
2800: 69 66 0a 0a 23 20 4e 6f 77 20 64 6f 20 74 68 65 if..# Now do the
2810: 20 73 61 6d 65 20 74 6f 20 6c 6f 63 61 74 65 20 same to locate
2820: 54 6b 20 68 65 61 64 65 72 73 20 61 6e 64 20 6c Tk headers and l
2830: 69 62 73 20 69 66 20 70 72 6f 6a 65 63 74 20 72 ibs if project r
2840: 65 71 75 69 72 65 73 20 54 6b 0a 21 69 66 20 24 equires Tk.!if $
2850: 28 4e 45 45 44 5f 54 4b 29 0a 0a 21 69 66 20 22 (NEED_TK)..!if "
2860: 24 28 54 4b 44 49 52 29 22 20 21 3d 20 22 22 0a $(TKDIR)" != "".
2870: 0a 5f 54 4b 44 49 52 20 3d 20 24 28 54 4b 44 49 ._TKDIR = $(TKDI
2880: 52 3a 2f 3d 5c 29 0a 21 69 66 20 65 78 69 73 74 R:/=\).!if exist
2890: 28 22 24 28 5f 54 4b 44 49 52 29 5c 69 6e 63 6c ("$(_TKDIR)\incl
28a0: 75 64 65 5c 74 6b 2e 68 22 29 0a 54 4b 49 4e 53 ude\tk.h").TKINS
28b0: 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 0a 5f 54 TALL = 1._T
28c0: 4b 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 K_H = $
28d0: 28 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 (_TKDIR)\include
28e0: 5c 74 6b 2e 68 0a 21 65 6c 73 65 69 66 20 65 78 \tk.h.!elseif ex
28f0: 69 73 74 28 22 24 28 5f 54 4b 44 49 52 29 5c 67 ist("$(_TKDIR)\g
2900: 65 6e 65 72 69 63 5c 74 6b 2e 68 22 29 0a 54 4b eneric\tk.h").TK
2910: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 INSTALL = 0
2920: 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 20 20 ._TK_H
2930: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 = $(_TKDIR)\gene
2940: 72 69 63 5c 74 6b 2e 68 0a 21 65 6e 64 69 66 0a ric\tk.h.!endif.
2950: 0a 21 65 6c 73 65 20 23 20 54 4b 44 49 52 20 6e .!else # TKDIR n
2960: 6f 74 20 64 65 66 69 6e 65 64 0a 0a 23 20 4e 65 ot defined..# Ne
2970: 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 54 63 6c ed to locate Tcl
2980: 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77 68 depending on wh
2990: 65 74 68 65 72 20 69 74 20 6e 65 65 64 73 20 54 ether it needs T
29a0: 63 6c 20 73 6f 75 72 63 65 20 6f 72 20 6e 6f 74 cl source or not
29b0: 2e 0a 23 20 49 66 20 77 65 20 64 6f 6e 27 74 2c ..# If we don't,
29c0: 20 63 68 65 63 6b 20 74 68 65 20 49 4e 53 54 41 check the INSTA
29d0: 4c 4c 44 49 52 20 66 6f 72 20 61 6e 20 69 6e 73 LLDIR for an ins
29e0: 74 61 6c 6c 65 64 20 54 63 6c 20 66 69 72 73 74 talled Tcl first
29f0: 0a 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f ..!if exist("$(_
2a00: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c INSTALLDIR)\incl
2a10: 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 ude\tk.h") && !$
2a20: 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 (NEED_TK_SOURCE)
2a30: 0a 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 ..TKINSTALL
2a40: 20 3d 20 31 0a 23 20 4e 4f 54 45 3a 20 77 65 20 = 1.# NOTE: we
2a50: 77 69 6c 6c 20 62 65 20 72 65 73 65 74 74 69 6e will be resettin
2a60: 67 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 74 6f g _INSTALLDIR to
2a70: 20 5f 49 4e 53 54 41 4c 4c 44 49 52 2f 6c 69 62 _INSTALLDIR/lib
2a80: 20 66 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 0a for extensions.
2a90: 23 20 6c 61 74 65 72 20 73 6f 20 74 68 65 20 5c # later so the \
2aa0: 2e 2e 20 61 63 63 6f 75 6e 74 73 20 66 6f 72 20 .. accounts for
2ab0: 74 68 65 20 2f 6c 69 62 0a 5f 54 4b 44 49 52 20 the /lib._TKDIR
2ac0: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 = $(_INS
2ad0: 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f 54 4b 5f TALLDIR)\..._TK_
2ae0: 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f H = $(_
2af0: 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 TKDIR)\include\t
2b00: 6b 2e 68 0a 54 4b 44 49 52 20 20 20 20 20 20 20 k.h.TKDIR
2b10: 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 0a 0a = $(_TKDIR)..
2b20: 21 65 6c 73 65 20 23 20 65 78 69 73 74 28 22 24 !else # exist("$
2b30: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e (_INSTALLDIR)\in
2b40: 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 20 clude\tk.h") &&
2b50: 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 !$(NEED_TK_SOURC
2b60: 45 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 5f 54 E)..!if [echo _T
2b70: 4b 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 KDIR = \> nmakeh
2b80: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
2b90: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 4c 20 67 65 6e [nmakehlp -L gen
2ba0: 65 72 69 63 5c 74 6b 2e 68 20 3e 3e 20 6e 6d 61 eric\tk.h >> nma
2bb0: 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f kehlp.out].!erro
2bc0: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
2bd0: 6c 6f 63 61 74 65 20 54 6b 20 73 6f 75 72 63 65 locate Tk source
2be0: 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e 64 directory..!end
2bf0: 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b if.!include nmak
2c00: 65 68 6c 70 2e 6f 75 74 0a 54 4b 49 4e 53 54 41 ehlp.out.TKINSTA
2c10: 4c 4c 20 20 20 20 20 20 3d 20 30 0a 54 4b 44 49 LL = 0.TKDI
2c20: 52 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f R = $(_
2c30: 54 4b 44 49 52 29 0a 5f 54 4b 5f 48 20 20 20 20 TKDIR)._TK_H
2c40: 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 = $(_TKDIR
2c50: 29 5c 67 65 6e 65 72 69 63 5c 74 6b 2e 68 0a 0a )\generic\tk.h..
2c60: 21 65 6e 64 69 66 20 23 20 65 78 69 73 74 28 22 !endif # exist("
2c70: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 $(_INSTALLDIR)\i
2c80: 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 26 nclude\tk.h") &&
2c90: 20 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 !$(NEED_TK_SOUR
2ca0: 43 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 4b CE)..!endif # TK
2cb0: 44 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f 54 4b DIR..!ifndef _TK
2cc0: 5f 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 6c 65 64 _H.MSG =^.Failed
2cd0: 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68 2e 20 54 to find tk.h. T
2ce0: 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 69 he TKDIR macro i
2cf0: 73 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 6c s set incorrectl
2d00: 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 20 y or is not set
2d10: 61 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 68 and default path
2d20: 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 does not contai
2d30: 6e 20 74 6b 2e 68 2e 0a 21 65 72 72 6f 72 20 24 n tk.h..!error $
2d40: 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a 21 65 (MSG).!endif..!e
2d50: 6e 64 69 66 20 23 20 4e 45 45 44 5f 54 4b 0a 0a ndif # NEED_TK..
2d60: 21 69 66 20 24 28 4e 45 45 44 5f 54 43 4c 5f 53 !if $(NEED_TCL_S
2d70: 4f 55 52 43 45 29 20 26 26 20 24 28 54 43 4c 49 OURCE) && $(TCLI
2d80: 4e 53 54 41 4c 4c 29 0a 4d 53 47 20 3d 20 5e 0a NSTALL).MSG = ^.
2d90: 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 54 68 69 *** Warning: Thi
2da0: 73 20 65 78 74 65 6e 73 69 6f 6e 20 72 65 71 75 s extension requ
2db0: 69 72 65 73 20 74 68 65 20 73 6f 75 72 63 65 20 ires the source
2dc0: 64 69 73 74 72 69 62 75 74 69 6f 6e 20 6f 66 20 distribution of
2dd0: 54 63 6c 2e 5e 0a 2a 2a 2a 20 50 6c 65 61 73 65 Tcl.^.*** Please
2de0: 20 73 65 74 20 74 68 65 20 54 43 4c 44 49 52 20 set the TCLDIR
2df0: 6d 61 63 72 6f 20 74 6f 20 70 6f 69 6e 74 20 74 macro to point t
2e00: 6f 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 o the Tcl source
2e10: 73 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 s..!error $(MSG)
2e20: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 4e .!endif..!if $(N
2e30: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 21 EED_TK_SOURCE).!
2e40: 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 0a if $(TKINSTALL).
2e50: 4d 53 47 20 3d 20 5e 0a 2a 2a 2a 20 57 61 72 6e MSG = ^.*** Warn
2e60: 69 6e 67 3a 20 54 68 69 73 20 65 78 74 65 6e 73 ing: This extens
2e70: 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 68 65 ion requires the
2e80: 20 73 6f 75 72 63 65 20 64 69 73 74 72 69 62 75 source distribu
2e90: 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0a 2a 2a 2a tion of Tk.^.***
2ea0: 20 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 Please set the
2eb0: 54 4b 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 TKDIR macro to p
2ec0: 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 6b 20 73 oint to the Tk s
2ed0: 6f 75 72 63 65 73 2e 0a 21 65 72 72 6f 72 20 24 ources..!error $
2ee0: 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 6e (MSG).!endif.!en
2ef0: 64 69 66 0a 0a 0a 23 20 49 66 20 49 4e 53 54 41 dif...# If INSTA
2f00: 4c 4c 44 49 52 20 73 65 74 20 74 6f 20 54 63 6c LLDIR set to Tcl
2f10: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 72 6f installation ro
2f20: 6f 74 20 64 69 72 20 74 68 65 6e 20 72 65 73 65 ot dir then rese
2f30: 74 20 74 6f 20 74 68 65 0a 23 20 6c 69 62 20 64 t to the.# lib d
2f40: 69 72 20 66 6f 72 20 69 6e 73 74 61 6c 6c 69 6e ir for installin
2f50: 67 20 65 78 74 65 6e 73 69 6f 6e 73 0a 21 69 66 g extensions.!if
2f60: 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 exist("$(_INSTA
2f70: 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 LLDIR)\include\t
2f80: 63 6c 2e 68 22 29 0a 5f 49 4e 53 54 41 4c 4c 44 cl.h")._INSTALLD
2f90: 49 52 3d 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 IR=$(_INSTALLDIR
2fa0: 29 5c 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 20 )\lib.!endif..#
2fb0: 45 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f 72 END Case 2(c) or
2fc0: 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 (d) - Building
2fd0: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 0a 21 65 6e an extension.!en
2fe0: 64 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e 47 dif # if $(DOING
2ff0: 5f 54 43 4c 29 0a 0a 23 23 23 23 23 23 23 23 23 _TCL)..#########
3000: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3010: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3020: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3030: 23 23 23 23 23 23 23 0a 23 20 33 2e 20 44 65 74 #######.# 3. Det
3040: 65 72 6d 69 6e 65 20 63 6f 6d 70 69 6c 65 72 20 ermine compiler
3050: 76 65 72 73 69 6f 6e 20 61 6e 64 20 61 72 63 68 version and arch
3060: 69 74 65 63 74 75 72 65 0a 23 20 49 6e 20 74 68 itecture.# In th
3070: 69 73 20 73 65 63 74 69 6f 6e 2c 20 77 65 20 66 is section, we f
3080: 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 63 6f igure out the co
3090: 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 mpiler version a
30a0: 6e 64 20 74 68 65 0a 23 20 61 72 63 68 69 74 65 nd the.# archite
30b0: 63 74 75 72 65 20 66 6f 72 20 77 68 69 63 68 20 cture for which
30c0: 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 2e we are building.
30d0: 20 54 68 69 73 20 73 65 74 73 20 74 68 65 0a 23 This sets the.#
30e0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
30f0: 73 3a 0a 23 20 56 43 56 45 52 53 49 4f 4e 20 2d s:.# VCVERSION -
3100: 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 63 6f the internal co
3110: 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 mpiler version a
3120: 73 20 31 32 30 30 2c 20 31 34 30 30 2c 20 31 39 s 1200, 1400, 19
3130: 31 30 20 65 74 63 2e 0a 23 20 20 20 20 20 54 68 10 etc..# Th
3140: 69 73 20 69 73 20 61 6c 73 6f 20 70 72 69 6e 74 is is also print
3150: 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 69 6c ed by the compil
3160: 65 72 20 69 6e 20 64 6f 74 74 65 64 20 66 6f 72 er in dotted for
3170: 6d 20 31 39 2e 31 30 20 65 74 63 2e 0a 23 20 56 m 19.10 etc..# V
3180: 43 56 45 52 20 2d 20 74 68 65 20 22 6d 61 72 6b CVER - the "mark
3190: 65 74 69 6e 67 20 76 65 72 73 69 6f 6e 22 2c 20 eting version",
31a0: 66 6f 72 20 65 78 61 6d 70 6c 65 20 56 69 73 75 for example Visu
31b0: 61 6c 20 43 2b 2b 20 36 20 66 6f 72 20 69 6e 74 al C++ 6 for int
31c0: 65 72 6e 61 6c 0a 23 20 20 20 20 20 63 6f 6d 70 ernal.# comp
31d0: 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 31 32 30 iler version 120
31e0: 30 2e 20 54 68 69 73 20 69 73 20 6b 65 70 74 20 0. This is kept
31f0: 6f 6e 6c 79 20 66 6f 72 20 6c 65 67 61 63 79 20 only for legacy
3200: 72 65 61 73 6f 6e 73 20 61 73 20 69 74 0a 23 20 reasons as it.#
3210: 20 20 20 20 64 6f 65 73 20 6e 6f 74 20 6d 61 6b does not mak
3220: 65 20 73 65 6e 73 65 20 66 6f 72 20 72 65 63 65 e sense for rece
3230: 6e 74 20 4d 69 63 72 6f 73 6f 66 74 20 63 6f 6d nt Microsoft com
3240: 70 69 6c 65 72 73 2e 20 4f 6e 6c 79 20 75 73 65 pilers. Only use
3250: 64 20 66 6f 72 0a 23 20 20 20 20 20 6f 75 74 70 d for.# outp
3260: 75 74 20 64 69 72 65 63 74 6f 72 79 20 6e 61 6d ut directory nam
3270: 65 73 2e 0a 23 20 41 52 43 48 20 2d 20 73 65 74 es..# ARCH - set
3280: 20 74 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 to IX86, ARM64
3290: 6f 72 20 41 4d 44 36 34 20 64 65 70 65 6e 64 69 or AMD64 dependi
32a0: 6e 67 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 2d ng on 32- or 64-
32b0: 62 69 74 20 74 61 72 67 65 74 0a 23 20 4e 41 54 bit target.# NAT
32c0: 49 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 74 IVE_ARCH - set t
32d0: 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f 72 o IX86, ARM64 or
32e0: 20 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 68 AMD64 for the h
32f0: 6f 73 74 20 6d 61 63 68 69 6e 65 0a 23 20 4d 41 ost machine.# MA
3300: 43 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 20 CHINE - same as
3310: 24 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 79 $(ARCH) - legacy
3320: 0a 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f .# _VC_MANIFEST_
3330: 45 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d 20 EMBED_{DLL,EXE}
3340: 2d 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 65 - commands for e
3350: 6d 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 66 mbedding a manif
3360: 65 73 74 20 69 66 20 6e 65 65 64 65 64 0a 0a 63 est if needed..c
3370: 63 33 32 09 09 3d 20 24 28 43 43 29 20 20 20 23 c32..= $(CC) #
3380: 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c built-in defaul
3390: 74 2e 0a 6c 69 6e 6b 33 32 09 09 3d 20 6c 69 6e t..link32..= lin
33a0: 6b 0a 6c 69 62 33 32 09 09 3d 20 6c 69 62 0a 72 k.lib32..= lib.r
33b0: 63 33 32 09 09 3d 20 24 28 52 43 29 20 20 20 23 c32..= $(RC) #
33c0: 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 6c built-in defaul
33d0: 74 2e 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d t...#-----------
33e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
33f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3400: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3410: 2d 2d 2d 2d 2d 0a 23 20 46 69 67 75 72 65 20 6f -----.# Figure o
3420: 75 74 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 ut the compiler
3430: 61 72 63 68 69 74 65 63 74 75 72 65 20 61 6e 64 architecture and
3440: 20 76 65 72 73 69 6f 6e 20 62 79 20 77 72 69 74 version by writ
3450: 69 6e 67 0a 23 20 74 68 65 20 43 20 6d 61 63 72 ing.# the C macr
3460: 6f 73 20 74 6f 20 61 20 66 69 6c 65 2c 20 70 72 os to a file, pr
3470: 65 70 72 6f 63 65 73 73 69 6e 67 20 74 68 65 6d eprocessing them
3480: 20 77 69 74 68 20 74 68 65 20 43 0a 23 20 70 72 with the C.# pr
3490: 65 70 72 6f 63 65 73 73 6f 72 20 61 6e 64 20 72 eprocessor and r
34a0: 65 61 64 69 6e 67 20 62 61 63 6b 20 74 68 65 20 eading back the
34b0: 63 72 65 61 74 65 64 20 66 69 6c 65 0a 0a 5f 48 created file.._H
34c0: 41 53 48 3d 5e 23 0a 5f 56 43 5f 4d 41 4e 49 46 ASH=^#._VC_MANIF
34d0: 45 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0a 5f EST_EMBED_EXE=._
34e0: 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 VC_MANIFEST_EMBE
34f0: 44 5f 44 4c 4c 3d 0a 56 43 56 45 52 3d 30 0a 21 D_DLL=.VCVER=0.!
3500: 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 53 if ![echo VCVERS
3510: 49 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 76 ION=_MSC_VER > v
3520: 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 ercl.x] \. &&
3530: 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 ![echo $(_HASH)
3540: 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 49 58 if defined(_M_IX
3550: 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 86) >> vercl.x]
3560: 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 \. && ![echo
3570: 41 52 43 48 3d 49 58 38 36 20 3e 3e 20 76 65 72 ARCH=IX86 >> ver
3580: 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 cl.x] \. && !
3590: 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 65 6c [echo $(_HASH)el
35a0: 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 41 4d if defined(_M_AM
35b0: 44 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d D64) >> vercl.x]
35c0: 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f \. && ![echo
35d0: 20 41 52 43 48 3d 41 4d 44 36 34 20 3e 3e 20 76 ARCH=AMD64 >> v
35e0: 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 ercl.x] \. &&
35f0: 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 ![echo $(_HASH)
3600: 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f elif defined(_M_
3610: 41 52 4d 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e ARM64) >> vercl.
3620: 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 x] \. && ![ec
3630: 68 6f 20 41 52 43 48 3d 41 52 4d 36 34 20 3e 3e ho ARCH=ARM64 >>
3640: 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 vercl.x] \.
3650: 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 && ![echo $(_HAS
3660: 48 29 65 6e 64 69 66 20 3e 3e 20 76 65 72 63 6c H)endif >> vercl
3670: 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 24 .x] \. && ![$
3680: 28 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 2d (cc32) -nologo -
3690: 54 43 20 2d 50 20 76 65 72 63 6c 2e 78 20 32 3e TC -P vercl.x 2>
36a0: 4e 55 4c 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 NUL].!include ve
36b0: 72 63 6c 2e 69 0a 21 69 66 20 24 28 56 43 56 45 rcl.i.!if $(VCVE
36c0: 52 53 49 4f 4e 29 20 3c 20 31 39 30 30 0a 21 69 RSION) < 1900.!i
36d0: 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 3d 20 f ![echo VCVER=
36e0: 5e 5c 3e 20 76 65 72 63 6c 2e 76 63 5d 20 5c 0a ^\> vercl.vc] \.
36f0: 20 20 20 20 26 26 20 21 5b 73 65 74 20 2f 61 20 && ![set /a
3700: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 2f 20 31 $(VCVERSION) / 1
3710: 30 30 20 2d 20 36 20 3e 3e 20 76 65 72 63 6c 2e 00 - 6 >> vercl.
3720: 76 63 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 vc].!include ver
3730: 63 6c 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 6c cl.vc.!endif.!el
3740: 73 65 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 20 se.# The simple
3750: 63 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f 76 calculation abov
3760: 65 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c 79 e does not apply
3770: 20 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 53 to new Visual S
3780: 74 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0a 23 tudio releases.#
3790: 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 69 6c Keep the compil
37a0: 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 69 74 er version in it
37b0: 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e 0a 56 s native form..V
37c0: 43 56 45 52 20 3d 20 24 28 56 43 56 45 52 53 49 CVER = $(VCVERSI
37d0: 4f 4e 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 ON).!endif.!endi
37e0: 66 0a 0a 21 69 66 20 21 5b 64 65 6c 20 32 3e 4e f..!if ![del 2>N
37f0: 55 4c 20 2f 71 2f 66 20 76 65 72 63 6c 2e 78 20 UL /q/f vercl.x
3800: 76 65 72 63 6c 2e 69 20 76 65 72 63 6c 2e 76 63 vercl.i vercl.vc
3810: 5d 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d ].!endif..#-----
3820: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3830: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3840: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3850: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 -----------.# Th
3860: 65 20 4d 41 43 48 49 4e 45 20 6d 61 63 72 6f 20 e MACHINE macro
3870: 69 73 20 75 73 65 64 20 62 79 20 6c 65 67 61 63 is used by legac
3880: 79 20 6d 61 6b 65 66 69 6c 65 73 20 73 6f 20 73 y makefiles so s
3890: 65 74 20 69 74 20 61 73 20 77 65 6c 6c 0a 21 69 et it as well.!i
38a0: 66 64 65 66 20 4d 41 43 48 49 4e 45 0a 21 69 66 fdef MACHINE.!if
38b0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
38c0: 20 22 78 38 36 22 0a 21 75 6e 64 65 66 20 4d 41 "x86".!undef MA
38d0: 43 48 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 CHINE.MACHINE =
38e0: 49 58 38 36 0a 21 65 6c 73 65 69 66 20 22 24 28 IX86.!elseif "$(
38f0: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 72 MACHINE)" == "ar
3900: 6d 36 34 22 0a 21 75 6e 64 65 66 20 4d 41 43 48 m64".!undef MACH
3910: 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 41 52 INE.MACHINE = AR
3920: 4d 36 34 0a 21 65 6c 73 65 69 66 20 22 24 28 4d M64.!elseif "$(M
3930: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 36 34 ACHINE)" == "x64
3940: 22 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4e 45 ".!undef MACHINE
3950: 0a 4d 41 43 48 49 4e 45 20 3d 20 41 4d 44 36 34 .MACHINE = AMD64
3960: 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 24 28 4d .!endif.!if "$(M
3970: 41 43 48 49 4e 45 29 22 20 21 3d 20 22 24 28 41 ACHINE)" != "$(A
3980: 52 43 48 29 22 0a 21 65 72 72 6f 72 20 53 70 65 RCH)".!error Spe
3990: 63 69 66 69 65 64 20 4d 41 43 48 49 4e 45 20 6d cified MACHINE m
39a0: 61 63 72 6f 20 24 28 4d 41 43 48 49 4e 45 29 20 acro $(MACHINE)
39b0: 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 64 does not match d
39c0: 65 74 65 63 74 65 64 20 74 61 72 67 65 74 20 61 etected target a
39d0: 72 63 68 69 74 65 63 74 75 72 65 20 24 28 41 52 rchitecture $(AR
39e0: 43 48 29 2e 0a 21 65 6e 64 69 66 0a 21 65 6c 73 CH)..!endif.!els
39f0: 65 0a 4d 41 43 48 49 4e 45 3d 24 28 41 52 43 48 e.MACHINE=$(ARCH
3a00: 29 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d ).!endif..#-----
3a10: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3a40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 65 ----------.# The
3a50: 20 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 PLATFORM_IDENTI
3a60: 46 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 73 FY macro matches
3a70: 20 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 75 the values retu
3a80: 72 6e 65 64 20 62 79 0a 23 20 74 68 65 20 54 63 rned by.# the Tc
3a90: 6c 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 6e l platform::iden
3aa0: 74 69 66 79 20 63 6f 6d 6d 61 6e 64 0a 21 69 66 tify command.!if
3ab0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
3ac0: 20 22 41 4d 44 36 34 22 0a 50 4c 41 54 46 4f 52 "AMD64".PLATFOR
3ad0: 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 6e M_IDENTIFY = win
3ae0: 33 32 2d 78 38 36 5f 36 34 0a 21 65 6c 73 65 69 32-x86_64.!elsei
3af0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3b00: 3d 20 22 41 52 4d 36 34 22 0a 50 4c 41 54 46 4f = "ARM64".PLATFO
3b10: 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 RM_IDENTIFY = wi
3b20: 6e 33 32 2d 61 72 6d 0a 21 65 6c 73 65 0a 50 4c n32-arm.!else.PL
3b30: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 ATFORM_IDENTIFY
3b40: 3d 20 77 69 6e 33 32 2d 69 78 38 36 0a 21 65 6e = win32-ix86.!en
3b50: 64 69 66 0a 0a 23 20 54 68 65 20 4d 55 4c 54 49 dif..# The MULTI
3b60: 50 4c 41 54 46 4f 52 4d 20 6d 61 63 72 6f 20 63 PLATFORM macro c
3b70: 6f 6e 74 72 6f 6c 73 20 77 68 65 74 68 65 72 20 ontrols whether
3b80: 62 69 6e 61 72 79 20 65 78 74 65 6e 73 69 6f 6e binary extension
3b90: 73 20 61 72 65 20 69 6e 73 74 61 6c 6c 65 64 0a s are installed.
3ba0: 23 20 69 6e 20 70 6c 61 74 66 6f 72 6d 2d 73 70 # in platform-sp
3bb0: 65 63 69 66 69 63 20 64 69 72 65 63 74 6f 72 69 ecific directori
3bc0: 65 73 2e 20 49 6e 74 65 6e 64 65 64 20 74 6f 20 es. Intended to
3bd0: 62 65 20 73 65 74 2f 75 73 65 64 20 62 79 20 65 be set/used by e
3be0: 78 74 65 6e 73 69 6f 6e 73 2e 0a 21 69 66 6e 64 xtensions..!ifnd
3bf0: 65 66 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d ef MULTIPLATFORM
3c00: 5f 49 4e 53 54 41 4c 4c 0a 4d 55 4c 54 49 50 4c _INSTALL.MULTIPL
3c10: 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 20 3d ATFORM_INSTALL =
3c20: 20 30 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 0.!endif..#----
3c30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3c60: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 46 69 67 75 72 --------.# Figur
3c70: 65 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 2a e out the *host*
3c80: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 62 79 architecture by
3c90: 20 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 67 reading the reg
3ca0: 69 73 74 72 79 0a 0a 21 69 66 20 21 5b 72 65 67 istry..!if ![reg
3cb0: 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 query HKLM\Hard
3cc0: 77 61 72 65 5c 44 65 73 63 72 69 70 74 69 6f 6e ware\Description
3cd0: 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 \System\CentralP
3ce0: 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 rocessor\0 /v Id
3cf0: 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e 64 73 entifier | finds
3d00: 74 72 20 2f 69 20 78 38 36 5d 0a 4e 41 54 49 56 tr /i x86].NATIV
3d10: 45 5f 41 52 43 48 3d 49 58 38 36 0a 21 65 6c 73 E_ARCH=IX86.!els
3d20: 65 69 66 20 21 5b 72 65 67 20 71 75 65 72 79 20 eif ![reg query
3d30: 48 4b 4c 4d 5c 48 61 72 64 77 61 72 65 5c 44 65 HKLM\Hardware\De
3d40: 73 63 72 69 70 74 69 6f 6e 5c 53 79 73 74 65 6d scription\System
3d50: 5c 43 65 6e 74 72 61 6c 50 72 6f 63 65 73 73 6f \CentralProcesso
3d60: 72 5c 30 20 2f 76 20 49 64 65 6e 74 69 66 69 65 r\0 /v Identifie
3d70: 72 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 41 r | findstr /i A
3d80: 52 4d 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 RM | findstr /i
3d90: 36 34 2d 62 69 74 5d 0a 4e 41 54 49 56 45 5f 41 64-bit].NATIVE_A
3da0: 52 43 48 3d 41 52 4d 36 34 0a 21 65 6c 73 65 0a RCH=ARM64.!else.
3db0: 4e 41 54 49 56 45 5f 41 52 43 48 3d 41 4d 44 36 NATIVE_ARCH=AMD6
3dc0: 34 0a 21 65 6e 64 69 66 0a 0a 23 20 53 69 6e 63 4.!endif..# Sinc
3dd0: 65 20 4d 53 56 43 38 20 77 65 20 6d 75 73 74 20 e MSVC8 we must
3de0: 64 65 61 6c 20 77 69 74 68 20 6d 61 6e 69 66 65 deal with manife
3df0: 73 74 20 72 65 73 6f 75 72 63 65 73 2e 0a 21 69 st resources..!i
3e00: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
3e10: 3d 20 31 34 30 30 0a 5f 56 43 5f 4d 41 4e 49 46 = 1400._VC_MANIF
3e20: 45 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 69 66 EST_EMBED_EXE=if
3e30: 20 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 65 exist $@.manife
3e40: 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d st mt -nologo -m
3e50: 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 66 anifest $@.manif
3e60: 65 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f 75 est -outputresou
3e70: 72 63 65 3a 24 40 3b 31 0a 5f 56 43 5f 4d 41 4e rce:$@;1._VC_MAN
3e80: 49 46 45 53 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d IFEST_EMBED_DLL=
3e90: 69 66 20 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 if exist $@.mani
3ea0: 66 65 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 fest mt -nologo
3eb0: 2d 6d 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e -manifest $@.man
3ec0: 69 66 65 73 74 20 2d 6f 75 74 70 75 74 72 65 73 ifest -outputres
3ed0: 6f 75 72 63 65 3a 24 40 3b 32 0a 21 65 6e 64 69 ource:$@;2.!endi
3ee0: 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 f..#############
3ef0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3f00: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3f10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3f20: 23 23 23 0a 23 20 34 2e 20 42 75 69 6c 64 20 74 ###.# 4. Build t
3f30: 68 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f 67 he nmakehlp prog
3f40: 72 61 6d 0a 23 20 54 68 69 73 20 69 73 20 61 20 ram.# This is a
3f50: 68 65 6c 70 65 72 20 61 70 70 20 77 65 20 6e 65 helper app we ne
3f60: 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 6e ed to overcome n
3f70: 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e 67 0a make's limiting.
3f80: 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 20 57 # environment. W
3f90: 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f 75 74 20 e will call out
3fa0: 74 6f 20 69 74 20 74 6f 20 67 65 74 20 76 61 72 to it to get var
3fb0: 69 6f 75 73 20 62 69 74 73 20 6f 66 0a 23 20 69 ious bits of.# i
3fc0: 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 nformation about
3fd0: 20 73 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 69 supported compi
3fe0: 6c 65 72 20 6f 70 74 69 6f 6e 73 20 65 74 63 2e ler options etc.
3ff0: 0a 23 0a 23 20 54 63 6c 20 69 74 73 65 6c 66 20 .#.# Tcl itself
4000: 77 69 6c 6c 20 61 6c 77 61 79 73 20 75 73 65 20 will always use
4010: 74 68 65 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 70 the nmakehlp.c p
4020: 72 6f 67 72 61 6d 20 77 68 69 63 68 20 69 73 0a rogram which is.
4030: 23 20 69 6e 20 69 74 73 20 6f 77 6e 20 73 6f 75 # in its own sou
4040: 72 63 65 2e 20 49 74 20 77 69 6c 6c 20 62 65 20 rce. It will be
4050: 6b 65 70 74 20 75 70 64 61 74 65 64 20 74 68 65 kept updated the
4060: 72 65 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f re..#.# Extensio
4070: 6e 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 ns built against
4080: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
4090: 6c 20 77 69 6c 6c 20 75 73 65 20 74 68 65 20 69 l will use the i
40a0: 6e 73 74 61 6c 6c 65 64 0a 23 20 63 6f 70 79 20 nstalled.# copy
40b0: 6f 66 20 54 63 6c 27 73 20 6e 6d 61 6b 65 68 6c of Tcl's nmakehl
40c0: 70 2e 63 20 69 66 20 74 68 65 72 65 20 69 73 20 p.c if there is
40d0: 6f 6e 65 20 61 6e 64 20 74 68 65 69 72 20 6f 77 one and their ow
40e0: 6e 20 76 65 72 73 69 6f 6e 0a 23 20 6f 74 68 65 n version.# othe
40f0: 72 77 69 73 65 2e 20 49 6e 20 74 68 65 20 6c 61 rwise. In the la
4100: 74 74 65 72 20 63 61 73 65 2c 20 74 68 65 79 20 tter case, they
4110: 77 6f 75 6c 64 20 61 6c 73 6f 20 62 65 20 75 73 would also be us
4120: 69 6e 67 20 74 68 65 69 72 20 6f 77 6e 0a 23 20 ing their own.#
4130: 72 75 6c 65 73 2e 76 63 2e 20 4e 6f 74 65 20 74 rules.vc. Note t
4140: 68 61 74 20 6f 6c 64 65 72 20 76 65 72 73 69 6f hat older versio
4150: 6e 73 20 6f 66 20 54 63 6c 20 64 6f 20 6e 6f 74 ns of Tcl do not
4160: 20 69 6e 73 74 61 6c 6c 20 6e 6d 61 6b 65 68 6c install nmakehl
4170: 70 2e 63 0a 23 20 6f 72 20 72 75 6c 65 73 2e 76 p.c.# or rules.v
4180: 63 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f 6e c..#.# Extension
4190: 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 20 s built against
41a0: 54 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c 6c Tcl sources will
41b0: 20 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 6f use the one fro
41c0: 6d 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 m the Tcl source
41d0: 2e 0a 23 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 ..#.# When build
41e0: 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e ing an extension
41f0: 20 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 69 using a suffici
4200: 65 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 6f ently new versio
4210: 6e 20 6f 66 20 54 63 6c 2c 0a 23 20 72 75 6c 65 n of Tcl,.# rule
4220: 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 64 65 s-ext.vc will de
4230: 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 20 61 fine NMAKEHLPC a
4240: 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74 6f 20 ppropriately to
4250: 70 6f 69 6e 74 20 74 6f 20 74 68 65 0a 23 20 63 point to the.# c
4260: 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 6c 70 2e opy of nmakehlp.
4270: 63 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 0a 21 c to be used...!
4280: 69 66 6e 64 65 66 20 4e 4d 41 4b 45 48 4c 50 43 ifndef NMAKEHLPC
4290: 0a 23 20 44 65 66 61 75 6c 74 20 74 6f 20 74 68 .# Default to th
42a0: 65 20 6f 6e 65 20 69 6e 20 74 68 65 20 63 75 72 e one in the cur
42b0: 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 28 rent directory (
42c0: 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 27 73 20 the extension's
42d0: 6f 77 6e 20 6e 6d 61 6b 65 68 6c 70 2e 63 29 0a own nmakehlp.c).
42e0: 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 6e 6d 61 6b NMAKEHLPC = nmak
42f0: 65 68 6c 70 2e 63 0a 0a 21 69 66 20 21 24 28 44 ehlp.c..!if !$(D
4300: 4f 49 4e 47 5f 54 43 4c 29 0a 21 69 66 20 24 28 OING_TCL).!if $(
4310: 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 69 66 20 TCLINSTALL).!if
4320: 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 exist("$(_TCLDIR
4330: 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b )\lib\nmake\nmak
4340: 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 4c ehlp.c").NMAKEHL
4350: 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c PC = $(_TCLDIR)\
4360: 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 68 lib\nmake\nmakeh
4370: 6c 70 2e 63 0a 21 65 6e 64 69 66 0a 21 65 6c 73 lp.c.!endif.!els
4380: 65 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c e # !$(TCLINSTAL
4390: 4c 29 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 L).!if exist("$(
43a0: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 _TCLDIR)\win\nma
43b0: 6b 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 kehlp.c").NMAKEH
43c0: 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 LPC = $(_TCLDIR)
43d0: 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0a \win\nmakehlp.c.
43e0: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 !endif.!endif #
43f0: 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 65 $(TCLINSTALL).!e
4400: 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e 47 5f ndif # !$(DOING_
4410: 54 43 4c 29 0a 0a 21 65 6e 64 69 66 20 23 20 4e TCL)..!endif # N
4420: 4d 41 4b 45 48 4c 50 43 0a 0a 23 20 57 65 20 61 MAKEHLPC..# We a
4430: 6c 77 61 79 73 20 62 75 69 6c 64 20 6e 6d 61 6b lways build nmak
4440: 65 68 6c 70 20 65 76 65 6e 20 69 66 20 69 74 20 ehlp even if it
4450: 65 78 69 73 74 73 20 73 69 6e 63 65 20 77 65 20 exists since we
4460: 64 6f 20 6e 6f 74 20 6b 6e 6f 77 0a 23 20 77 68 do not know.# wh
4470: 61 74 20 73 6f 75 72 63 65 20 69 74 20 77 61 73 at source it was
4480: 20 62 75 69 6c 74 20 66 72 6f 6d 2e 0a 21 69 66 built from..!if
4490: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
44a0: 20 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 "IX86" || "$(MA
44b0: 43 48 49 4e 45 29 22 20 3d 3d 20 22 24 28 4e 41 CHINE)" == "$(NA
44c0: 54 49 56 45 5f 41 52 43 48 29 22 0a 21 69 66 20 TIVE_ARCH)".!if
44d0: 5b 24 28 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f [$(cc32) -nologo
44e0: 20 22 24 28 4e 4d 41 4b 45 48 4c 50 43 29 22 20 "$(NMAKEHLPC)"
44f0: 2d 6c 69 6e 6b 20 2d 73 75 62 73 79 73 74 65 6d -link -subsystem
4500: 3a 63 6f 6e 73 6f 6c 65 20 3e 20 6e 75 6c 5d 0a :console > nul].
4510: 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 !endif.!else.!if
4520: 20 5b 63 6f 70 79 20 24 28 4e 4d 41 4b 45 48 4c [copy $(NMAKEHL
4530: 50 43 3a 6e 6d 61 6b 65 68 6c 70 2e 63 3d 78 38 PC:nmakehlp.c=x8
4540: 36 5f 36 34 2d 77 36 34 2d 6d 69 6e 67 77 33 32 6_64-w64-mingw32
4550: 2d 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 29 20 6e -nmakehlp.exe) n
4560: 6d 61 6b 65 68 6c 70 2e 65 78 65 20 3e 4e 55 4c makehlp.exe >NUL
4570: 5d 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a ].!endif.!endif.
4580: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
4590: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
45a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
45b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
45c0: 23 0a 23 20 35 2e 20 54 65 73 74 20 66 6f 72 20 #.# 5. Test for
45d0: 63 6f 6d 70 69 6c 65 72 20 66 65 61 74 75 72 65 compiler feature
45e0: 73 0a 23 20 56 69 73 75 61 6c 20 43 2b 2b 20 63 s.# Visual C++ c
45f0: 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 ompiler options
4600: 68 61 76 65 20 63 68 61 6e 67 65 64 20 6f 76 65 have changed ove
4610: 72 20 74 68 65 20 79 65 61 72 73 2e 20 43 68 65 r the years. Che
4620: 63 6b 0a 23 20 77 68 69 63 68 20 6f 70 74 69 6f ck.# which optio
4630: 6e 73 20 61 72 65 20 73 75 70 70 6f 72 74 65 64 ns are supported
4640: 20 62 79 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 by the compiler
4650: 20 69 6e 20 75 73 65 2e 0a 23 0a 23 20 54 68 65 in use..#.# The
4660: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
4670: 73 20 61 72 65 20 73 65 74 3a 0a 23 20 4f 50 54 s are set:.# OPT
4680: 49 4d 49 5a 41 54 49 4f 4e 53 20 2d 20 74 68 65 IMIZATIONS - the
4690: 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 73 20 compiler flags
46a0: 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72 20 6f to be used for o
46b0: 70 74 69 6d 69 7a 65 64 20 62 75 69 6c 64 73 0a ptimized builds.
46c0: 23 20 44 45 42 55 47 46 4c 41 47 53 20 2d 20 74 # DEBUGFLAGS - t
46d0: 68 65 20 63 6f 6d 70 69 6c 65 72 20 66 6c 61 67 he compiler flag
46e0: 73 20 74 6f 20 62 65 20 75 73 65 64 20 66 6f 72 s to be used for
46f0: 20 64 65 62 75 67 20 62 75 69 6c 64 73 0a 23 20 debug builds.#
4700: 4c 49 4e 4b 45 52 46 4c 41 47 53 20 2d 20 46 6c LINKERFLAGS - Fl
4710: 61 67 73 20 70 61 73 73 65 64 20 74 6f 20 74 68 ags passed to th
4720: 65 20 6c 69 6e 6b 65 72 0a 23 0a 23 20 4e 6f 74 e linker.#.# Not
4730: 65 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 e that these are
4740: 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 73 65 the compiler se
4750: 74 74 69 6e 67 73 20 2a 61 76 61 69 6c 61 62 6c ttings *availabl
4760: 65 2a 2c 20 6e 6f 74 20 74 68 6f 73 65 0a 23 20 e*, not those.#
4770: 74 68 61 74 20 77 69 6c 6c 20 62 65 20 2a 75 73 that will be *us
4780: 65 64 2a 2e 20 54 68 65 20 6c 61 74 74 65 72 20 ed*. The latter
4790: 64 65 70 65 6e 64 73 20 6f 6e 20 74 68 65 20 4f depends on the O
47a0: 50 54 53 20 6d 61 63 72 6f 20 73 65 74 74 69 6e PTS macro settin
47b0: 67 73 0a 23 20 77 68 69 63 68 20 77 65 20 68 61 gs.# which we ha
47c0: 76 65 20 6e 6f 74 20 79 65 74 20 70 61 72 73 65 ve not yet parse
47d0: 64 2e 0a 23 0a 23 20 41 6c 73 6f 20 6e 6f 74 65 d..#.# Also note
47e0: 20 74 68 61 74 20 73 6f 6d 65 20 6f 66 20 74 68 that some of th
47f0: 65 20 66 6c 61 67 73 20 69 6e 20 4f 50 54 49 4d e flags in OPTIM
4800: 49 5a 41 54 49 4f 4e 53 20 61 72 65 20 6e 6f 74 IZATIONS are not
4810: 20 72 65 61 6c 6c 79 0a 23 20 72 65 6c 61 74 65 really.# relate
4820: 64 20 74 6f 20 6f 70 74 69 6d 69 7a 61 74 69 6f d to optimizatio
4830: 6e 2e 20 54 68 65 79 20 61 72 65 20 70 6c 61 63 n. They are plac
4840: 65 64 20 74 68 65 72 65 20 6f 6e 6c 79 20 66 6f ed there only fo
4850: 72 20 6c 65 67 61 63 79 20 72 65 61 73 6f 6e 73 r legacy reasons
4860: 0a 23 20 61 73 20 73 6f 6d 65 20 65 78 74 65 6e .# as some exten
4870: 73 69 6f 6e 73 20 65 78 70 65 63 74 20 74 68 65 sions expect the
4880: 6d 20 74 6f 20 62 65 20 69 6e 63 6c 75 64 65 64 m to be included
4890: 20 69 6e 20 74 68 61 74 20 6d 61 63 72 6f 2e 0a in that macro..
48a0: 0a 23 20 2d 4f 70 20 69 6d 70 72 6f 76 65 73 20 .# -Op improves
48b0: 66 6c 6f 61 74 20 63 6f 6e 73 69 73 74 65 6e 63 float consistenc
48c0: 79 2e 20 4e 6f 74 65 20 6f 6e 6c 79 20 6e 65 65 y. Note only nee
48d0: 64 65 64 20 66 6f 72 20 6f 6c 64 65 72 20 63 6f ded for older co
48e0: 6d 70 69 6c 65 72 73 0a 23 20 4e 65 77 65 72 20 mpilers.# Newer
48f0: 63 6f 6d 70 69 6c 65 72 73 20 64 6f 20 6e 6f 74 compilers do not
4900: 20 6e 65 65 64 20 6f 72 20 73 75 70 70 6f 72 74 need or support
4910: 20 74 68 69 73 20 6f 70 74 69 6f 6e 2e 0a 21 69 this option..!i
4920: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 20 2d f [nmakehlp -c -
4930: 4f 70 5d 0a 46 50 4f 50 54 53 20 20 3d 20 2d 4f Op].FPOPTS = -O
4940: 70 0a 21 65 6e 64 69 66 0a 0a 23 20 53 74 72 69 p.!endif..# Stri
4950: 63 74 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 6e ct floating poin
4960: 74 20 73 65 6d 61 6e 74 69 63 73 20 2d 20 70 72 t semantics - pr
4970: 65 73 65 6e 74 20 69 6e 20 6e 65 77 65 72 20 63 esent in newer c
4980: 6f 6d 70 69 6c 65 72 73 20 69 6e 20 6c 69 65 75 ompilers in lieu
4990: 20 6f 66 20 2d 4f 70 0a 21 69 66 20 5b 6e 6d 61 of -Op.!if [nma
49a0: 6b 65 68 6c 70 20 2d 63 20 2d 66 70 3a 73 74 72 kehlp -c -fp:str
49b0: 69 63 74 5d 0a 46 50 4f 50 54 53 20 20 3d 20 24 ict].FPOPTS = $
49c0: 28 46 50 4f 50 54 53 29 20 2d 66 70 3a 73 74 72 (FPOPTS) -fp:str
49d0: 69 63 74 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 ict.!endif..!if
49e0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
49f0: 22 49 58 38 36 22 0a 23 23 23 20 74 65 73 74 20 "IX86".### test
4a00: 66 6f 72 20 70 65 6e 74 69 75 6d 20 65 72 72 61 for pentium erra
4a10: 74 61 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 ta.!if [nmakehlp
4a20: 20 2d 63 20 2d 51 49 30 66 5d 0a 21 6d 65 73 73 -c -QI0f].!mess
4a30: 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 age *** Compiler
4a40: 20 68 61 73 20 27 50 65 6e 74 69 75 6d 20 30 78 has 'Pentium 0x
4a50: 30 66 20 66 69 78 27 0a 46 50 4f 50 54 53 20 20 0f fix'.FPOPTS
4a60: 3d 20 24 28 46 50 4f 50 54 53 29 20 2d 51 49 30 = $(FPOPTS) -QI0
4a70: 66 0a 21 65 6c 73 65 0a 21 6d 65 73 73 61 67 65 f.!else.!message
4a80: 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f *** Compiler do
4a90: 65 73 20 6e 6f 74 20 68 61 76 65 20 27 50 65 6e es not have 'Pen
4aa0: 74 69 75 6d 20 30 78 30 66 20 66 69 78 27 0a 21 tium 0x0f fix'.!
4ab0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 endif.!endif..##
4ac0: 23 20 74 65 73 74 20 66 6f 72 20 6f 70 74 69 6d # test for optim
4ad0: 69 7a 61 74 69 6f 6e 73 0a 23 20 2f 4f 32 20 6f izations.# /O2 o
4ae0: 70 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 63 6c ptimization incl
4af0: 75 64 65 73 20 2f 4f 67 20 2f 4f 69 20 2f 4f 74 udes /Og /Oi /Ot
4b00: 20 2f 4f 79 20 2f 4f 62 32 20 2f 47 73 20 2f 47 /Oy /Ob2 /Gs /G
4b10: 46 20 2f 47 79 20 61 73 20 70 65 72 0a 23 20 64 F /Gy as per.# d
4b20: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 20 4e 6f ocumentation. No
4b30: 74 65 20 77 65 20 64 6f 20 4e 4f 54 20 77 61 6e te we do NOT wan
4b40: 74 20 2f 47 73 20 61 73 20 74 68 61 74 20 69 6e t /Gs as that in
4b50: 73 65 72 74 73 20 61 20 5f 63 68 6b 73 74 6b 0a serts a _chkstk.
4b60: 23 20 73 74 61 63 6b 20 70 72 6f 62 65 20 61 74 # stack probe at
4b70: 20 2a 65 76 65 72 79 2a 20 66 75 6e 63 74 69 6f *every* functio
4b80: 6e 20 65 6e 74 72 79 2c 20 6e 6f 74 20 6a 75 73 n entry, not jus
4b90: 74 20 74 68 6f 73 65 20 77 69 74 68 20 6d 6f 72 t those with mor
4ba0: 65 20 74 68 61 6e 0a 23 20 61 20 70 61 67 65 20 e than.# a page
4bb0: 6f 66 20 73 74 61 63 6b 20 61 6c 6c 6f 63 61 74 of stack allocat
4bc0: 69 6f 6e 20 72 65 73 75 6c 74 69 6e 67 20 69 6e ion resulting in
4bd0: 20 61 20 70 65 72 66 6f 72 6d 61 6e 63 65 20 68 a performance h
4be0: 69 74 2e 20 20 48 6f 77 65 76 65 72 2c 0a 23 20 it. However,.#
4bf0: 2f 4f 32 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f /O2 documentatio
4c00: 6e 20 69 73 20 6d 69 73 6c 65 61 64 69 6e 67 20 n is misleading
4c10: 61 73 20 69 74 73 20 73 74 61 63 6b 20 70 72 6f as its stack pro
4c20: 62 65 73 20 61 72 65 20 73 69 6d 70 6c 79 20 74 bes are simply t
4c30: 68 65 0a 23 20 64 65 66 61 75 6c 74 20 70 61 67 he.# default pag
4c40: 65 20 73 69 7a 65 20 6c 6f 63 61 6c 73 20 61 6c e size locals al
4c50: 6c 6f 63 61 74 69 6f 6e 20 70 72 6f 62 65 73 20 location probes
4c60: 61 6e 64 20 6e 6f 74 20 77 68 61 74 20 69 73 20 and not what is
4c70: 69 6d 70 6c 69 65 64 0a 23 20 62 79 20 61 6e 20 implied.# by an
4c80: 65 78 70 6c 69 63 69 74 20 2f 47 73 20 6f 70 74 explicit /Gs opt
4c90: 69 6f 6e 2e 0a 0a 4f 50 54 49 4d 49 5a 41 54 49 ion...OPTIMIZATI
4ca0: 4f 4e 53 20 3d 20 24 28 46 50 4f 50 54 53 29 0a ONS = $(FPOPTS).
4cb0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
4cc0: 63 20 2d 4f 32 5d 0a 4f 50 54 49 4d 49 5a 49 4e c -O2].OPTIMIZIN
4cd0: 47 20 3d 20 31 0a 4f 50 54 49 4d 49 5a 41 54 49 G = 1.OPTIMIZATI
4ce0: 4f 4e 53 20 20 20 3d 20 24 28 4f 50 54 49 4d 49 ONS = $(OPTIMI
4cf0: 5a 41 54 49 4f 4e 53 29 20 2d 4f 32 0a 21 65 6c ZATIONS) -O2.!el
4d00: 73 65 0a 23 20 4c 65 67 61 63 79 2c 20 72 65 61 se.# Legacy, rea
4d10: 6c 6c 79 2e 20 41 6c 6c 20 6d 6f 64 65 72 6e 20 lly. All modern
4d20: 63 6f 6d 70 69 6c 65 72 73 20 73 75 70 70 6f 72 compilers suppor
4d30: 74 20 74 68 69 73 0a 21 6d 65 73 73 61 67 65 20 t this.!message
4d40: 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f 65 *** Compiler doe
4d50: 73 20 6e 6f 74 20 68 61 76 65 20 27 4f 70 74 69 s not have 'Opti
4d60: 6d 69 7a 61 74 69 6f 6e 73 27 0a 4f 50 54 49 4d mizations'.OPTIM
4d70: 49 5a 49 4e 47 20 3d 20 30 0a 21 65 6e 64 69 66 IZING = 0.!endif
4d80: 0a 0a 23 20 43 68 65 63 6b 73 20 66 6f 72 20 62 ..# Checks for b
4d90: 75 66 66 65 72 20 6f 76 65 72 66 6c 6f 77 73 20 uffer overflows
4da0: 69 6e 20 6c 6f 63 61 6c 20 61 72 72 61 79 73 0a in local arrays.
4db0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 63 !if [nmakehlp -c
4dc0: 20 2d 47 53 5d 0a 4f 50 54 49 4d 49 5a 41 54 49 -GS].OPTIMIZATI
4dd0: 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a ONS = $(OPTIMIZ
4de0: 41 54 49 4f 4e 53 29 20 2d 47 53 0a 21 65 6e 64 ATIONS) -GS.!end
4df0: 69 66 0a 0a 23 20 4c 69 6e 6b 20 74 69 6d 65 20 if..# Link time
4e00: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 4e 6f optimization. No
4e10: 74 65 20 74 68 61 74 20 74 68 69 73 20 6f 70 74 te that this opt
4e20: 69 6f 6e 20 28 70 6f 74 65 6e 74 69 61 6c 6c 79 ion (potentially
4e30: 29 20 6d 61 6b 65 73 0a 23 20 67 65 6e 65 72 61 ) makes.# genera
4e40: 74 65 64 20 6c 69 62 72 61 72 69 65 73 20 6f 6e ted libraries on
4e50: 6c 79 20 75 73 61 62 6c 65 20 62 79 20 74 68 65 ly usable by the
4e60: 20 73 70 65 63 69 66 69 63 20 56 43 2b 2b 20 76 specific VC++ v
4e70: 65 72 73 69 6f 6e 20 74 68 61 74 0a 23 20 63 72 ersion that.# cr
4e80: 65 61 74 65 64 20 69 74 2e 20 52 65 71 75 69 72 eated it. Requir
4e90: 65 73 20 2f 4c 54 43 47 20 6c 69 6e 6b 65 72 20 es /LTCG linker
4ea0: 6f 70 74 69 6f 6e 0a 21 69 66 20 5b 6e 6d 61 6b option.!if [nmak
4eb0: 65 68 6c 70 20 2d 63 20 2d 47 4c 5d 0a 4f 50 54 ehlp -c -GL].OPT
4ec0: 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d 20 24 28 IMIZATIONS = $(
4ed0: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 20 2d OPTIMIZATIONS) -
4ee0: 47 4c 0a 43 43 5f 47 4c 5f 4f 50 54 5f 45 4e 41 GL.CC_GL_OPT_ENA
4ef0: 42 4c 45 44 20 3d 20 31 0a 21 65 6c 73 65 0a 23 BLED = 1.!else.#
4f00: 20 49 6e 20 6e 65 77 65 72 20 63 6f 6d 70 69 6c In newer compil
4f10: 65 72 73 20 2d 47 4c 20 61 6e 64 20 2d 59 58 20 ers -GL and -YX
4f20: 61 72 65 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 are incompatible
4f30: 2e 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
4f40: 2d 63 20 2d 59 58 5d 0a 4f 50 54 49 4d 49 5a 41 -c -YX].OPTIMIZA
4f50: 54 49 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d TIONS = $(OPTIM
4f60: 49 5a 41 54 49 4f 4e 53 29 20 2d 59 58 0a 21 65 IZATIONS) -YX.!e
4f70: 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 5b 6e ndif.!endif # [n
4f80: 6d 61 6b 65 68 6c 70 20 2d 63 20 2d 47 4c 5d 0a makehlp -c -GL].
4f90: 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 .DEBUGFLAGS
4fa0: 3d 20 24 28 46 50 4f 50 54 53 29 0a 0a 23 20 52 = $(FPOPTS)..# R
4fb0: 75 6e 20 74 69 6d 65 20 65 72 72 6f 72 20 63 68 un time error ch
4fc0: 65 63 6b 73 2e 20 4e 6f 74 20 61 76 61 69 6c 61 ecks. Not availa
4fd0: 62 6c 65 20 6f 72 20 76 61 6c 69 64 20 69 6e 20 ble or valid in
4fe0: 61 20 72 65 6c 65 61 73 65 2c 20 6e 6f 6e 2d 64 a release, non-d
4ff0: 65 62 75 67 20 62 75 69 6c 64 0a 23 20 52 54 43 ebug build.# RTC
5000: 20 69 73 20 66 6f 72 20 6d 6f 64 65 72 6e 20 63 is for modern c
5010: 6f 6d 70 69 6c 65 72 73 2c 20 2d 47 5a 20 69 73 ompilers, -GZ is
5020: 20 6c 65 67 61 63 79 0a 21 69 66 20 5b 6e 6d 61 legacy.!if [nma
5030: 6b 65 68 6c 70 20 2d 63 20 2d 52 54 43 31 5d 0a kehlp -c -RTC1].
5040: 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d DEBUGFLAGS =
5050: 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 2d $(DEBUGFLAGS) -
5060: 52 54 43 31 0a 21 65 6c 73 65 69 66 20 5b 6e 6d RTC1.!elseif [nm
5070: 61 6b 65 68 6c 70 20 2d 63 20 2d 47 5a 5d 0a 44 akehlp -c -GZ].D
5080: 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 3d 20 EBUGFLAGS =
5090: 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 2d 47 $(DEBUGFLAGS) -G
50a0: 5a 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d Z.!endif..#-----
50b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
50c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
50d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
50e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 4c 69 -----------.# Li
50f0: 6e 6b 65 72 20 66 6c 61 67 73 0a 0a 23 20 4c 49 nker flags..# LI
5100: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 20 61 NKER_TESTFLAGS a
5110: 72 65 20 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20 re for internal
5120: 75 73 65 20 77 68 65 6e 20 77 65 20 63 61 6c 6c use when we call
5130: 20 6e 6d 61 6b 65 68 6c 70 20 74 6f 20 74 65 73 nmakehlp to tes
5140: 74 0a 23 20 69 66 20 74 68 65 20 6c 69 6e 6b 65 t.# if the linke
5150: 72 20 73 75 70 70 6f 72 74 73 20 61 20 73 70 65 r supports a spe
5160: 63 69 66 69 63 20 6f 70 74 69 6f 6e 2e 20 57 69 cific option. Wi
5170: 74 68 6f 75 74 20 74 68 65 73 65 20 66 6c 61 67 thout these flag
5180: 73 20 6c 69 6e 6b 20 77 69 6c 6c 0a 23 20 72 65 s link will.# re
5190: 74 75 72 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 turn "LNK1561: e
51a0: 6e 74 72 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 ntry point must
51b0: 62 65 20 64 65 66 69 6e 65 64 22 20 65 72 72 6f be defined" erro
51c0: 72 20 63 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d r compiling from
51d0: 20 56 53 2d 49 44 45 3a 0a 23 20 54 68 65 79 20 VS-IDE:.# They
51e0: 61 72 65 20 6e 6f 74 20 70 61 73 73 65 64 20 74 are not passed t
51f0: 68 72 6f 75 67 68 20 74 6f 20 74 68 65 20 61 63 hrough to the ac
5200: 74 75 61 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e tual application
5210: 20 2f 20 65 78 74 65 6e 73 69 6f 6e 0a 23 20 6c / extension.# l
5220: 69 6e 6b 20 72 75 6c 65 73 2e 0a 21 69 66 6e 64 ink rules..!ifnd
5230: 65 66 20 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c ef LINKER_TESTFL
5240: 41 47 53 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 46 AGS.LINKER_TESTF
5250: 4c 41 47 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f 45 LAGS = /DLL /NOE
5260: 4e 54 52 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 68 NTRY /OUT:nmakeh
5270: 6c 70 2e 6f 75 74 0a 21 65 6e 64 69 66 0a 0a 4c lp.out.!endif..L
5280: 49 4e 4b 45 52 46 4c 41 47 53 20 20 20 20 20 3d INKERFLAGS =
5290: 0a 0a 23 20 49 66 20 63 6f 6d 70 69 6c 65 72 20 ..# If compiler
52a0: 68 61 73 20 65 6e 61 62 6c 65 64 20 6c 69 6e 6b has enabled link
52b0: 20 74 69 6d 65 20 6f 70 74 69 6d 69 7a 61 74 69 time optimizati
52c0: 6f 6e 2c 20 6c 69 6e 6b 65 72 20 6d 75 73 74 20 on, linker must
52d0: 74 6f 6f 20 77 69 74 68 20 2d 6c 74 63 67 0a 21 too with -ltcg.!
52e0: 69 66 64 65 66 20 43 43 5f 47 4c 5f 4f 50 54 5f ifdef CC_GL_OPT_
52f0: 45 4e 41 42 4c 45 44 0a 21 69 66 20 5b 6e 6d 61 ENABLED.!if [nma
5300: 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 20 24 kehlp -l -ltcg $
5310: 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 (LINKER_TESTFLAG
5320: 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 20 S)].LINKERFLAGS
5330: 20 20 20 20 3d 20 24 28 4c 49 4e 4b 45 52 46 4c = $(LINKERFL
5340: 41 47 53 29 20 2d 6c 74 63 67 0a 21 65 6e 64 69 AGS) -ltcg.!endi
5350: 66 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 f.!endif...#####
5360: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5370: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5380: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5390: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 36 2e ###########.# 6.
53a0: 20 45 78 74 72 61 63 74 20 76 61 72 69 6f 75 73 Extract various
53b0: 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 version numbers
53c0: 20 66 72 6f 6d 20 68 65 61 64 65 72 73 0a 23 20 from headers.#
53d0: 46 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 2c 20 For Tcl and Tk,
53e0: 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 version numbers
53f0: 61 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72 are extracted fr
5400: 6f 6d 20 74 63 6c 2e 68 20 61 6e 64 20 74 6b 2e om tcl.h and tk.
5410: 68 0a 23 20 72 65 73 70 65 63 74 69 76 65 6c 79 h.# respectively
5420: 2e 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 . For extensions
5430: 2c 20 76 65 72 73 69 6f 6e 73 20 61 72 65 20 65 , versions are e
5440: 78 74 72 61 63 74 65 64 20 66 72 6f 6d 20 74 68 xtracted from th
5450: 65 0a 23 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e e.# configure.in
5460: 20 6f 72 20 63 6f 6e 66 69 67 75 72 65 2e 61 63 or configure.ac
5470: 20 66 72 6f 6d 20 74 68 65 20 54 45 41 20 63 6f from the TEA co
5480: 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 66 20 69 nfiguration if i
5490: 74 0a 23 20 65 78 69 73 74 73 2c 20 61 6e 64 20 t.# exists, and
54a0: 75 6e 73 65 74 20 6f 74 68 65 72 77 69 73 65 2e unset otherwise.
54b0: 0a 23 20 53 65 74 73 20 74 68 65 20 66 6f 6c 6c .# Sets the foll
54c0: 6f 77 69 6e 67 20 6d 61 63 72 6f 73 3a 0a 23 20 owing macros:.#
54d0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
54e0: 4e 0a 23 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 N.# TCL_MINOR_VE
54f0: 52 53 49 4f 4e 0a 23 20 54 43 4c 5f 52 45 4c 45 RSION.# TCL_RELE
5500: 41 53 45 5f 53 45 52 49 41 4c 0a 23 20 54 43 4c ASE_SERIAL.# TCL
5510: 5f 50 41 54 43 48 5f 4c 45 56 45 4c 0a 23 20 54 _PATCH_LEVEL.# T
5520: 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 0a CL_PATCH_LETTER.
5530: 23 20 54 43 4c 5f 56 45 52 53 49 4f 4e 0a 23 20 # TCL_VERSION.#
5540: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
5550: 0a 23 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 .# TK_MINOR_VERS
5560: 49 4f 4e 0a 23 20 54 4b 5f 52 45 4c 45 41 53 45 ION.# TK_RELEASE
5570: 5f 53 45 52 49 41 4c 0a 23 20 54 4b 5f 50 41 54 _SERIAL.# TK_PAT
5580: 43 48 5f 4c 45 56 45 4c 0a 23 20 54 4b 5f 50 41 CH_LEVEL.# TK_PA
5590: 54 43 48 5f 4c 45 54 54 45 52 0a 23 20 54 4b 5f TCH_LETTER.# TK_
55a0: 56 45 52 53 49 4f 4e 0a 23 20 44 4f 54 56 45 52 VERSION.# DOTVER
55b0: 53 49 4f 4e 20 2d 20 73 65 74 20 61 73 20 28 66 SION - set as (f
55c0: 6f 72 20 65 78 61 6d 70 6c 65 29 20 32 2e 35 0a or example) 2.5.
55d0: 23 20 56 45 52 53 49 4f 4e 20 2d 20 73 65 74 20 # VERSION - set
55e0: 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c 65 20 as (for example
55f0: 32 35 29 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 25).#-----------
5600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5630: 2d 2d 2d 0a 0a 21 69 66 20 5b 65 63 68 6f 20 52 ---..!if [echo R
5640: 45 4d 20 3d 20 54 68 69 73 20 66 69 6c 65 20 69 EM = This file i
5650: 73 20 67 65 6e 65 72 61 74 65 64 20 66 72 6f 6d s generated from
5660: 20 72 75 6c 65 73 2e 76 63 20 3e 20 76 65 72 73 rules.vc > vers
5670: 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a ions.vc].!endif.
5680: 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 4d 41 !if [echo TCL_MA
5690: 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e JOR_VERSION = \>
56a0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
56b0: 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 . && [nmakehlp
56c0: 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 -V "$(_TCL_H)"
56d0: 22 64 65 66 69 6e 65 20 54 43 4c 5f 4d 41 4a 4f "define TCL_MAJO
56e0: 52 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 R_VERSION" >> ve
56f0: 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 rsions.vc].!endi
5700: 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f f.!if [echo TCL_
5710: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 MINOR_VERSION =
5720: 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d \>> versions.vc]
5730: 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 \. && [nmakeh
5740: 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 lp -V "$(_TCL_H)
5750: 22 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 " TCL_MINOR_VERS
5760: 49 4f 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e ION >> versions.
5770: 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b vc].!endif.!if [
5780: 65 63 68 6f 20 54 43 4c 5f 52 45 4c 45 41 53 45 echo TCL_RELEASE
5790: 5f 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 _SERIAL = \>> ve
57a0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 rsions.vc] \.
57b0: 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 && [nmakehlp -V
57c0: 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f "$(_TCL_H)" TCL_
57d0: 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e RELEASE_SERIAL >
57e0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
57f0: 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 endif.!if [echo
5800: 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 TCL_PATCH_LEVEL
5810: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \>> versions.v
5820: 63 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 6b c] \. && [nmak
5830: 65 68 6c 70 20 2d 56 20 22 24 28 5f 54 43 4c 5f ehlp -V "$(_TCL_
5840: 48 29 22 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 H)" TCL_PATCH_LE
5850: 56 45 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e VEL >> versions.
5860: 76 63 5d 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 vc].!endif..!if
5870: 64 65 66 69 6e 65 64 28 5f 54 4b 5f 48 29 0a 21 defined(_TK_H).!
5880: 69 66 20 5b 65 63 68 6f 20 54 4b 5f 4d 41 4a 4f if [echo TK_MAJO
5890: 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 R_VERSION = \>>
58a0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 versions.vc] \.
58b0: 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d && [nmakehlp -
58c0: 56 20 24 28 5f 54 4b 5f 48 29 20 22 64 65 66 69 V $(_TK_H) "defi
58d0: 6e 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 ne TK_MAJOR_VERS
58e0: 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 ION" >> versions
58f0: 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 .vc].!endif.!if
5900: 5b 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 5f 56 [echo TK_MINOR_V
5910: 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 ERSION = \>> ver
5920: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 sions.vc] \. &
5930: 26 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 56 20 24 & [nmakehlp -V $
5940: 28 5f 54 4b 5f 48 29 20 54 4b 5f 4d 49 4e 4f 52 (_TK_H) TK_MINOR
5950: 5f 56 45 52 53 49 4f 4e 20 3e 3e 20 76 65 72 73 _VERSION >> vers
5960: 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a ions.vc].!endif.
5970: 21 69 66 20 5b 65 63 68 6f 20 54 4b 5f 52 45 4c !if [echo TK_REL
5980: 45 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e EASE_SERIAL = \>
5990: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
59a0: 0a 20 20 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 . && [nmakehlp
59b0: 20 2d 56 20 22 24 28 5f 54 4b 5f 48 29 22 20 54 -V "$(_TK_H)" T
59c0: 4b 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c K_RELEASE_SERIAL
59d0: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
59e0: 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 .!endif.!if [ech
59f0: 6f 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c o TK_PATCH_LEVEL
5a00: 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e = \>> versions.
5a10: 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b 6e 6d 61 vc] \. && [nma
5a20: 6b 65 68 6c 70 20 2d 56 20 24 28 5f 54 4b 5f 48 kehlp -V $(_TK_H
5a30: 29 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c ) TK_PATCH_LEVEL
5a40: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
5a50: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
5a60: 20 5f 54 4b 5f 48 0a 0a 21 69 6e 63 6c 75 64 65 _TK_H..!include
5a70: 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 54 43 versions.vc..TC
5a80: 4c 5f 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 L_VERSION.= $(TC
5a90: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
5aa0: 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 $(TCL_MINOR_VERS
5ab0: 49 4f 4e 29 0a 54 43 4c 5f 44 4f 54 56 45 52 53 ION).TCL_DOTVERS
5ac0: 49 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f ION.= $(TCL_MAJO
5ad0: 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c R_VERSION).$(TCL
5ae0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a _MINOR_VERSION).
5af0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
5b00: 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 $(TCL_PATCH_LEV
5b10: 45 4c 29 20 22 61 22 5d 0a 54 43 4c 5f 50 41 54 EL) "a"].TCL_PAT
5b20: 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 65 CH_LETTER = a.!e
5b30: 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 lseif [nmakehlp
5b40: 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 48 5f 4c -f $(TCL_PATCH_L
5b50: 45 56 45 4c 29 20 22 62 22 5d 0a 54 43 4c 5f 50 EVEL) "b"].TCL_P
5b60: 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0a ATCH_LETTER = b.
5b70: 21 65 6c 73 65 0a 54 43 4c 5f 50 41 54 43 48 5f !else.TCL_PATCH_
5b80: 4c 45 54 54 45 52 20 3d 20 2e 0a 21 65 6e 64 69 LETTER = ..!endi
5b90: 66 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 5f f..!if defined(_
5ba0: 54 4b 5f 48 29 0a 0a 54 4b 5f 56 45 52 53 49 4f TK_H)..TK_VERSIO
5bb0: 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 N.= $(TK_MAJOR_V
5bc0: 45 52 53 49 4f 4e 29 24 28 54 4b 5f 4d 49 4e 4f ERSION)$(TK_MINO
5bd0: 52 5f 56 45 52 53 49 4f 4e 29 0a 54 4b 5f 44 4f R_VERSION).TK_DO
5be0: 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 4b 5f TVERSION.= $(TK_
5bf0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 MAJOR_VERSION).$
5c00: 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f (TK_MINOR_VERSIO
5c10: 4e 29 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 N).!if [nmakehlp
5c20: 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c -f $(TK_PATCH_L
5c30: 45 56 45 4c 29 20 22 61 22 5d 0a 54 4b 5f 50 41 EVEL) "a"].TK_PA
5c40: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 TCH_LETTER = a.!
5c50: 65 6c 73 65 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 elseif [nmakehlp
5c60: 20 2d 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c -f $(TK_PATCH_L
5c70: 45 56 45 4c 29 20 22 62 22 5d 0a 54 4b 5f 50 41 EVEL) "b"].TK_PA
5c80: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 62 0a 21 TCH_LETTER = b.!
5c90: 65 6c 73 65 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 else.TK_PATCH_LE
5ca0: 54 54 45 52 20 3d 20 2e 0a 21 65 6e 64 69 66 0a TTER = ..!endif.
5cb0: 0a 21 65 6e 64 69 66 0a 0a 23 20 53 65 74 20 44 .!endif..# Set D
5cc0: 4f 54 56 45 52 53 49 4f 4e 20 61 6e 64 20 56 45 OTVERSION and VE
5cd0: 52 53 49 4f 4e 0a 21 69 66 20 24 28 44 4f 49 4e RSION.!if $(DOIN
5ce0: 47 5f 54 43 4c 29 0a 0a 44 4f 54 56 45 52 53 49 G_TCL)..DOTVERSI
5cf0: 4f 4e 20 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 ON = $(TCL_MAJOR
5d00: 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f _VERSION).$(TCL_
5d10: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 56 MINOR_VERSION).V
5d20: 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c 5f 56 ERSION = $(TCL_V
5d30: 45 52 53 49 4f 4e 29 0a 0a 21 65 6c 73 65 69 66 ERSION)..!elseif
5d40: 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 0a 44 4f $(DOING_TK)..DO
5d50: 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b 5f TVERSION = $(TK_
5d60: 44 4f 54 56 45 52 53 49 4f 4e 29 0a 56 45 52 53 DOTVERSION).VERS
5d70: 49 4f 4e 20 3d 20 24 28 54 4b 5f 56 45 52 53 49 ION = $(TK_VERSI
5d80: 4f 4e 29 0a 0a 21 65 6c 73 65 20 23 20 44 6f 69 ON)..!else # Doi
5d90: 6e 67 20 61 20 6e 6f 6e 2d 54 6b 20 65 78 74 65 ng a non-Tk exte
5da0: 6e 73 69 6f 6e 0a 0a 23 20 49 66 20 70 61 72 65 nsion..# If pare
5db0: 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 nt makefile has
5dc0: 6e 6f 74 20 64 65 66 69 6e 65 64 20 44 4f 54 56 not defined DOTV
5dd0: 45 52 53 49 4f 4e 2c 20 74 72 79 20 74 6f 20 67 ERSION, try to g
5de0: 65 74 20 69 74 20 66 72 6f 6d 20 54 45 41 0a 23 et it from TEA.#
5df0: 20 66 69 72 73 74 20 66 72 6f 6d 20 61 20 63 6f first from a co
5e00: 6e 66 69 67 75 72 65 2e 69 6e 20 66 69 6c 65 2c nfigure.in file,
5e10: 20 61 6e 64 20 74 68 65 6e 20 66 72 6f 6d 20 63 and then from c
5e20: 6f 6e 66 69 67 75 72 65 2e 61 63 0a 21 69 66 6e onfigure.ac.!ifn
5e30: 64 65 66 20 44 4f 54 56 45 52 53 49 4f 4e 0a 21 def DOTVERSION.!
5e40: 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 if [echo DOTVERS
5e50: 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e ION = \> version
5e60: 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e s.vc] \. || [n
5e70: 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f makehlp -V $(ROO
5e80: 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 T)\configure.in
5e90: 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e ^[$(PROJECT)^] >
5ea0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
5eb0: 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 if [echo DOTVERS
5ec0: 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e ION = \> version
5ed0: 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e s.vc] \. || [n
5ee0: 6d 61 6b 65 68 6c 70 20 2d 56 20 24 28 52 4f 4f makehlp -V $(ROO
5ef0: 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 61 63 20 T)\configure.ac
5f00: 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e ^[$(PROJECT)^] >
5f10: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
5f20: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
5f30: 6e 6f 74 20 66 69 67 75 72 65 20 6f 75 74 20 65 not figure out e
5f40: 78 74 65 6e 73 69 6f 6e 20 76 65 72 73 69 6f 6e xtension version
5f50: 2e 20 50 6c 65 61 73 65 20 64 65 66 69 6e 65 20 . Please define
5f60: 44 4f 54 56 45 52 53 49 4f 4e 20 69 6e 20 70 61 DOTVERSION in pa
5f70: 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 62 65 rent makefile be
5f80: 66 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 fore including r
5f90: 75 6c 65 73 2e 76 63 2e 0a 21 65 6e 64 69 66 0a ules.vc..!endif.
5fa0: 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 !endif.!include
5fb0: 76 65 72 73 69 6f 6e 73 2e 76 63 0a 21 65 6e 64 versions.vc.!end
5fc0: 69 66 20 23 20 44 4f 54 56 45 52 53 49 4f 4e 0a if # DOTVERSION.
5fd0: 56 45 52 53 49 4f 4e 20 20 20 20 20 20 20 20 20 VERSION
5fe0: 3d 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 3a 2e = $(DOTVERSION:.
5ff0: 3d 29 0a 0a 21 65 6e 64 69 66 20 23 20 24 28 44 =)..!endif # $(D
6000: 4f 49 4e 47 5f 54 43 4c 29 20 2e 2e 2e 20 65 74 OING_TCL) ... et
6010: 63 2e 0a 0a 23 20 57 69 6e 64 6f 77 73 20 52 43 c...# Windows RC
6020: 20 66 69 6c 65 73 20 68 61 76 65 20 33 20 76 65 files have 3 ve
6030: 72 73 69 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 rsion components
6040: 2e 20 45 6e 73 75 72 65 20 74 68 69 73 20 69 72 . Ensure this ir
6050: 72 65 73 70 65 63 74 69 76 65 0a 23 20 6f 66 20 respective.# of
6060: 68 6f 77 20 6d 61 6e 79 20 63 6f 6d 70 6f 6e 65 how many compone
6070: 6e 74 73 20 74 68 65 20 70 61 63 6b 61 67 65 20 nts the package
6080: 68 61 73 20 73 70 65 63 69 66 69 65 64 2e 20 42 has specified. B
6090: 61 73 69 63 61 6c 6c 79 2c 20 65 6e 73 75 72 65 asically, ensure
60a0: 0a 23 20 6d 69 6e 69 6d 75 6d 20 34 20 63 6f 6d .# minimum 4 com
60b0: 70 6f 6e 65 6e 74 73 20 62 79 20 61 70 70 65 6e ponents by appen
60c0: 64 69 6e 67 20 34 20 30 27 73 20 61 6e 64 20 74 ding 4 0's and t
60d0: 68 65 6e 20 70 69 63 6b 20 6f 75 74 20 74 68 65 hen pick out the
60e0: 20 66 69 72 73 74 20 34 2e 0a 23 20 41 6c 73 6f first 4..# Also
60f0: 20 74 61 6b 65 20 63 61 72 65 20 6f 66 20 74 68 take care of th
6100: 65 20 66 61 63 74 20 74 68 61 74 20 44 4f 54 56 e fact that DOTV
6110: 45 52 53 49 4f 4e 20 6d 61 79 20 68 61 76 65 20 ERSION may have
6120: 22 61 22 20 6f 72 20 22 62 22 20 69 6e 73 74 65 "a" or "b" inste
6130: 61 64 0a 23 20 6f 66 20 22 2e 22 20 73 65 70 61 ad.# of "." sepa
6140: 72 61 74 69 6e 67 20 74 68 65 20 76 65 72 73 69 rating the versi
6150: 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e 0a 44 on components..D
6160: 4f 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f OTSEPARATED=$(DO
6170: 54 56 45 52 53 49 4f 4e 3a 61 3d 2e 29 0a 44 4f TVERSION:a=.).DO
6180: 54 53 45 50 41 52 41 54 45 44 3d 24 28 44 4f 54 TSEPARATED=$(DOT
6190: 53 45 50 41 52 41 54 45 44 3a 62 3d 2e 29 0a 21 SEPARATED:b=.).!
61a0: 69 66 20 5b 65 63 68 6f 20 52 43 43 4f 4d 4d 41 if [echo RCCOMMA
61b0: 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 VERSION = \> ver
61c0: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 7c 7c sions.vc] \. ||
61d0: 20 5b 66 6f 72 20 2f 66 20 22 74 6f 6b 65 6e 73 [for /f "tokens
61e0: 3d 31 2c 32 2c 33 2c 34 2c 35 2a 20 64 65 6c 69 =1,2,3,4,5* deli
61f0: 6d 73 3d 2e 22 20 25 61 20 69 6e 20 28 22 24 28 ms=." %a in ("$(
6200: 44 4f 54 53 45 50 41 52 41 54 45 44 29 2e 30 2e DOTSEPARATED).0.
6210: 30 2e 30 2e 30 22 29 20 64 6f 20 65 63 68 6f 20 0.0.0") do echo
6220: 25 61 2c 25 62 2c 25 63 2c 25 64 20 3e 3e 20 76 %a,%b,%c,%d >> v
6230: 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 72 72 ersions.vc].!err
6240: 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 or *** Could not
6250: 20 67 65 6e 65 72 61 74 65 20 52 43 43 4f 4d 4d generate RCCOMM
6260: 41 56 45 52 53 49 4f 4e 20 2a 2a 2a 0a 21 65 6e AVERSION ***.!en
6270: 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 dif.!include ver
6280: 73 69 6f 6e 73 2e 76 63 0a 0a 23 23 23 23 23 23 sions.vc..######
6290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
62d0: 23 23 0a 23 20 37 2e 20 50 61 72 73 65 20 74 68 ##.# 7. Parse th
62e0: 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 74 6f 20 e OPTS macro to
62f0: 77 6f 72 6b 20 6f 75 74 20 74 68 65 20 72 65 71 work out the req
6300: 75 65 73 74 65 64 20 62 75 69 6c 64 20 63 6f 6e uested build con
6310: 66 69 67 75 72 61 74 69 6f 6e 2e 0a 23 20 42 61 figuration..# Ba
6320: 73 65 64 20 6f 6e 20 74 68 69 73 2c 20 77 65 20 sed on this, we
6330: 77 69 6c 6c 20 63 6f 6e 73 74 72 75 63 74 20 74 will construct t
6340: 68 65 20 61 63 74 75 61 6c 20 73 77 69 74 63 68 he actual switch
6350: 65 73 20 74 6f 20 62 65 20 70 61 73 73 65 64 20 es to be passed
6360: 74 6f 20 74 68 65 0a 23 20 63 6f 6d 70 69 6c 65 to the.# compile
6370: 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 75 73 69 r and linker usi
6380: 6e 67 20 74 68 65 20 6d 61 63 72 6f 73 20 64 65 ng the macros de
6390: 66 69 6e 65 64 20 69 6e 20 74 68 65 20 70 72 65 fined in the pre
63a0: 76 69 6f 75 73 20 73 65 63 74 69 6f 6e 2e 0a 23 vious section..#
63b0: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d The following m
63c0: 61 63 72 6f 73 20 61 72 65 20 64 65 66 69 6e 65 acros are define
63d0: 64 20 62 79 20 74 68 69 73 20 73 65 63 74 69 6f d by this sectio
63e0: 6e 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 0a n based on OPTS.
63f0: 23 20 53 54 41 54 49 43 5f 42 55 49 4c 44 20 2d # STATIC_BUILD -
6400: 20 30 20 2d 3e 20 54 63 6c 20 69 73 20 74 6f 20 0 -> Tcl is to
6410: 62 65 20 62 75 69 6c 74 20 61 73 20 61 20 73 68 be built as a sh
6420: 61 72 65 64 20 6c 69 62 72 61 72 79 0a 23 20 20 ared library.#
6430: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 20 1
6440: 2d 3e 20 62 75 69 6c 64 20 61 73 20 61 20 73 74 -> build as a st
6450: 61 74 69 63 20 6c 69 62 72 61 72 79 20 61 6e 64 atic library and
6460: 20 73 68 65 6c 6c 0a 23 20 54 43 4c 5f 54 48 52 shell.# TCL_THR
6470: 45 41 44 53 20 2d 20 6c 65 67 61 63 79 20 62 75 EADS - legacy bu
6480: 74 20 61 6c 77 61 79 73 20 31 20 6f 6e 20 57 69 t always 1 on Wi
6490: 6e 64 6f 77 73 20 73 69 6e 63 65 20 77 69 6e 73 ndows since wins
64a0: 6f 63 6b 20 72 65 71 75 69 72 65 73 20 69 74 2e ock requires it.
64b0: 0a 23 20 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 .# DEBUG - 1 ->
64c0: 64 65 62 75 67 20 62 75 69 6c 64 2c 20 30 20 2d debug build, 0 -
64d0: 3e 20 72 65 6c 65 61 73 65 20 62 75 69 6c 64 73 > release builds
64e0: 0a 23 20 53 59 4d 42 4f 4c 53 20 2d 20 31 20 2d .# SYMBOLS - 1 -
64f0: 3e 20 67 65 6e 65 72 61 74 65 20 50 44 42 27 73 > generate PDB's
6500: 2c 20 30 20 2d 3e 20 6e 6f 20 50 44 42 27 73 0a , 0 -> no PDB's.
6510: 23 20 50 52 4f 46 49 4c 45 20 2d 20 31 20 2d 3e # PROFILE - 1 ->
6520: 20 67 65 6e 65 72 61 74 65 20 70 72 6f 66 69 6c generate profil
6530: 69 6e 67 20 69 6e 66 6f 2c 20 30 20 2d 3e 20 6e ing info, 0 -> n
6540: 6f 20 70 72 6f 66 69 6c 69 6e 67 0a 23 20 50 47 o profiling.# PG
6550: 4f 20 20 20 20 20 2d 20 31 20 2d 3e 20 70 72 6f O - 1 -> pro
6560: 66 69 6c 65 20 62 61 73 65 64 20 6f 70 74 69 6d file based optim
6570: 69 7a 61 74 69 6f 6e 2c 20 30 20 2d 3e 20 6e 6f ization, 0 -> no
6580: 0a 23 20 4d 53 56 43 52 54 20 20 2d 20 31 20 2d .# MSVCRT - 1 -
6590: 3e 20 6c 69 6e 6b 20 74 6f 20 64 79 6e 61 6d 69 > link to dynami
65a0: 63 20 43 20 72 75 6e 74 69 6d 65 20 65 76 65 6e c C runtime even
65b0: 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 73 when building s
65c0: 74 61 74 69 63 20 54 63 6c 20 62 75 69 6c 64 0a tatic Tcl build.
65d0: 23 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e # 0 ->
65e0: 20 6c 69 6e 6b 20 74 6f 20 73 74 61 74 69 63 20 link to static
65f0: 43 20 72 75 6e 74 69 6d 65 20 66 6f 72 20 73 74 C runtime for st
6600: 61 74 69 63 20 54 63 6c 20 62 75 69 6c 64 2e 0a atic Tcl build..
6610: 23 20 20 20 20 20 20 20 20 20 20 20 44 6f 65 73 # Does
6620: 20 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 61 72 not impact shar
6630: 65 64 20 54 63 6c 20 62 75 69 6c 64 73 20 28 53 ed Tcl builds (S
6640: 54 41 54 49 43 5f 42 55 49 4c 44 20 3d 3d 20 30 TATIC_BUILD == 0
6650: 29 0a 23 20 20 20 20 20 20 20 20 20 20 20 44 65 ).# De
6660: 66 61 75 6c 74 3a 20 31 20 66 6f 72 20 54 63 6c fault: 1 for Tcl
6670: 20 38 2e 37 20 61 6e 64 20 75 70 2c 20 30 20 6f 8.7 and up, 0 o
6680: 74 68 65 72 77 69 73 65 2e 0a 23 20 54 43 4c 5f therwise..# TCL_
6690: 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 USE_STATIC_PACKA
66a0: 47 45 53 20 2d 20 31 20 2d 3e 20 73 74 61 74 69 GES - 1 -> stati
66b0: 63 61 6c 6c 79 20 6c 69 6e 6b 20 74 68 65 20 72 cally link the r
66c0: 65 67 69 73 74 72 79 20 61 6e 64 20 64 64 65 20 egistry and dde
66d0: 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 20 20 20 extensions.#
66e0: 20 20 20 20 20 20 20 69 6e 20 74 68 65 20 54 63 in the Tc
66f0: 6c 20 61 6e 64 20 57 69 73 68 20 73 68 65 6c 6c l and Wish shell
6700: 2e 20 30 20 2d 3e 20 6b 65 65 70 20 74 68 65 6d . 0 -> keep them
6710: 20 61 73 20 73 68 61 72 65 64 20 6c 69 62 72 61 as shared libra
6720: 72 69 65 73 2e 20 44 6f 65 73 0a 23 20 20 20 20 ries. Does.#
6730: 20 20 20 20 20 20 20 6e 6f 74 20 69 6d 70 61 63 not impac
6740: 74 20 73 68 61 72 65 64 20 54 63 6c 20 62 75 69 t shared Tcl bui
6750: 6c 64 73 2e 20 49 6d 70 6c 69 65 64 20 62 79 20 lds. Implied by
6760: 53 54 41 54 49 43 5f 42 55 49 4c 44 20 73 69 6e STATIC_BUILD sin
6770: 63 65 20 54 63 6c 20 38 2e 37 2e 0a 23 20 55 53 ce Tcl 8.7..# US
6780: 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 2d E_THREAD_ALLOC -
6790: 20 31 20 2d 3e 20 55 73 65 20 61 20 73 68 61 72 1 -> Use a shar
67a0: 65 64 20 67 6c 6f 62 61 6c 20 66 72 65 65 20 70 ed global free p
67b0: 6f 6f 6c 20 66 6f 72 20 61 6c 6c 6f 63 61 74 69 ool for allocati
67c0: 6f 6e 2e 0a 23 20 20 20 20 20 20 20 20 20 20 20 on..#
67d0: 30 20 2d 3e 20 55 73 65 20 74 68 65 20 6e 6f 6e 0 -> Use the non
67e0: 2d 74 68 72 65 61 64 20 61 6c 6c 6f 63 61 74 6f -thread allocato
67f0: 72 2e 0a 23 20 55 4e 43 48 45 43 4b 45 44 20 2d r..# UNCHECKED -
6800: 20 31 20 2d 3e 20 77 68 65 6e 20 64 6f 69 6e 67 1 -> when doing
6810: 20 61 20 64 65 62 75 67 20 62 75 69 6c 64 20 77 a debug build w
6820: 69 74 68 20 73 79 6d 62 6f 6c 73 2c 20 75 73 65 ith symbols, use
6830: 20 74 68 65 20 72 65 6c 65 61 73 65 0a 23 20 20 the release.#
6840: 20 20 20 20 20 20 20 20 20 43 20 72 75 6e 74 69 C runti
6850: 6d 65 2c 20 30 20 2d 3e 20 75 73 65 20 74 68 65 me, 0 -> use the
6860: 20 64 65 62 75 67 20 43 20 72 75 6e 74 69 6d 65 debug C runtime
6870: 2e 0a 23 20 55 53 45 5f 53 54 55 42 53 20 2d 20 ..# USE_STUBS -
6880: 31 20 2d 3e 20 63 6f 6d 70 69 6c 65 20 74 6f 20 1 -> compile to
6890: 75 73 65 20 73 74 75 62 73 20 69 6e 74 65 72 66 use stubs interf
68a0: 61 63 65 73 2c 20 30 20 2d 3e 20 64 69 72 65 63 aces, 0 -> direc
68b0: 74 20 6c 69 6e 6b 69 6e 67 0a 23 20 43 4f 4e 46 t linking.# CONF
68c0: 49 47 5f 43 48 45 43 4b 20 2d 20 31 20 2d 3e 20 IG_CHECK - 1 ->
68d0: 63 68 65 63 6b 20 63 75 72 72 65 6e 74 20 62 75 check current bu
68e0: 69 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ild configuratio
68f0: 6e 20 61 67 61 69 6e 73 74 20 54 63 6c 0a 23 20 n against Tcl.#
6900: 20 20 20 20 20 20 20 20 20 20 63 6f 6e 66 69 67 config
6910: 75 72 61 74 69 6f 6e 20 28 69 67 6e 6f 72 65 64 uration (ignored
6920: 20 66 6f 72 20 54 63 6c 20 69 74 73 65 6c 66 29 for Tcl itself)
6930: 0a 23 20 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 .# _USE_64BIT_TI
6940: 4d 45 5f 54 20 2d 20 66 6f 72 63 65 73 20 61 20 ME_T - forces a
6950: 62 75 69 6c 64 20 75 73 69 6e 67 20 36 34 2d 62 build using 64-b
6960: 69 74 20 74 69 6d 65 5f 74 20 66 6f 72 20 33 32 it time_t for 32
6970: 2d 62 69 74 20 62 75 69 6c 64 0a 23 20 20 20 20 -bit build.#
6980: 20 20 20 20 20 20 20 28 43 52 54 20 6c 69 62 72 (CRT libr
6990: 61 72 79 20 73 68 6f 75 6c 64 20 73 75 70 70 6f ary should suppo
69a0: 72 74 20 74 68 69 73 2c 20 6e 6f 74 20 6e 65 65 rt this, not nee
69b0: 64 65 64 20 66 6f 72 20 54 63 6c 20 39 2e 78 29 ded for Tcl 9.x)
69c0: 0a 23 20 46 75 72 74 68 65 72 2c 20 4c 49 4e 4b .# Further, LINK
69d0: 45 52 46 4c 41 47 53 20 61 72 65 20 6d 6f 64 69 ERFLAGS are modi
69e0: 66 69 65 64 20 62 61 73 65 64 20 6f 6e 20 61 62 fied based on ab
69f0: 6f 76 65 2e 0a 0a 23 20 44 65 66 61 75 6c 74 20 ove...# Default
6a00: 76 61 6c 75 65 73 20 66 6f 72 20 61 6c 6c 20 74 values for all t
6a10: 68 65 20 61 62 6f 76 65 0a 53 54 41 54 49 43 5f he above.STATIC_
6a20: 42 55 49 4c 44 09 3d 20 30 0a 54 43 4c 5f 54 48 BUILD.= 0.TCL_TH
6a30: 52 45 41 44 53 09 3d 20 31 0a 44 45 42 55 47 09 READS.= 1.DEBUG.
6a40: 09 3d 20 30 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 .= 0.SYMBOLS..=
6a50: 30 0a 50 52 4f 46 49 4c 45 09 09 3d 20 30 0a 50 0.PROFILE..= 0.P
6a60: 47 4f 09 09 3d 20 30 0a 4d 53 56 43 52 54 09 09 GO..= 0.MSVCRT..
6a70: 3d 20 31 0a 54 43 4c 5f 55 53 45 5f 53 54 41 54 = 1.TCL_USE_STAT
6a80: 49 43 5f 50 41 43 4b 41 47 45 53 09 3d 20 30 0a IC_PACKAGES.= 0.
6a90: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
6aa0: 20 3d 20 31 0a 55 4e 43 48 45 43 4b 45 44 09 3d = 1.UNCHECKED.=
6ab0: 20 30 0a 43 4f 4e 46 49 47 5f 43 48 45 43 4b 20 0.CONFIG_CHECK
6ac0: 20 20 20 3d 20 31 0a 21 69 66 20 24 28 44 4f 49 = 1.!if $(DOI
6ad0: 4e 47 5f 54 43 4c 29 0a 55 53 45 5f 53 54 55 42 NG_TCL).USE_STUB
6ae0: 53 20 20 20 20 20 20 20 3d 20 30 0a 21 65 6c 73 S = 0.!els
6af0: 65 0a 55 53 45 5f 53 54 55 42 53 20 20 20 20 20 e.USE_STUBS
6b00: 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 23 20 = 1.!endif..#
6b10: 49 66 20 4f 50 54 53 20 69 73 20 6e 6f 74 20 65 If OPTS is not e
6b20: 6d 70 74 79 20 41 4e 44 20 64 6f 65 73 20 6e 6f mpty AND does no
6b30: 74 20 63 6f 6e 74 61 69 6e 20 22 6e 6f 6e 65 22 t contain "none"
6b40: 20 77 68 69 63 68 20 74 75 72 6e 73 20 6f 66 66 which turns off
6b50: 20 61 6c 6c 20 4f 50 54 53 0a 23 20 73 65 74 20 all OPTS.# set
6b60: 74 68 65 20 61 62 6f 76 65 20 6d 61 63 72 6f 73 the above macros
6b70: 20 62 61 73 65 64 20 6f 6e 20 4f 50 54 53 20 63 based on OPTS c
6b80: 6f 6e 74 65 6e 74 0a 21 69 66 20 22 24 28 4f 50 ontent.!if "$(OP
6b90: 54 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 5b TS)" != "" && ![
6ba0: 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 4f nmakehlp -f "$(O
6bb0: 50 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0a 0a 23 PTS)" "none"]..#
6bc0: 20 4f 50 54 53 20 61 72 65 20 73 70 65 63 69 66 OPTS are specif
6bd0: 69 65 64 2c 20 70 61 72 73 65 20 74 68 65 6d 0a ied, parse them.
6be0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
6bf0: 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 74 69 f $(OPTS) "stati
6c00: 63 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a c"].!message ***
6c10: 20 44 6f 69 6e 67 20 73 74 61 74 69 63 0a 53 54 Doing static.ST
6c20: 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 31 0a 21 ATIC_BUILD.= 1.!
6c30: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
6c40: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
6c50: 22 6e 6f 73 74 75 62 73 22 5d 0a 21 6d 65 73 73 "nostubs"].!mess
6c60: 61 67 65 20 2a 2a 2a 20 4e 6f 74 20 75 73 69 6e age *** Not usin
6c70: 67 20 73 74 75 62 73 0a 55 53 45 5f 53 54 55 42 g stubs.USE_STUB
6c80: 53 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 S.= 0.!endif..!i
6c90: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
6ca0: 28 4f 50 54 53 29 20 22 6e 6f 6d 73 76 63 72 74 (OPTS) "nomsvcrt
6cb0: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
6cc0: 44 6f 69 6e 67 20 6e 6f 6d 73 76 63 72 74 0a 4d Doing nomsvcrt.M
6cd0: 53 56 43 52 54 09 09 3d 20 30 0a 21 65 6c 73 65 SVCRT..= 0.!else
6ce0: 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d .!if [nmakehlp -
6cf0: 66 20 24 28 4f 50 54 53 29 20 22 6d 73 76 63 72 f $(OPTS) "msvcr
6d00: 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a t"].!message ***
6d10: 20 44 6f 69 6e 67 20 6d 73 76 63 72 74 0a 21 65 Doing msvcrt.!e
6d20: 6c 73 65 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 lse.!if $(TCL_MA
6d30: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 JOR_VERSION) ==
6d40: 38 20 26 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 8 && $(TCL_MINOR
6d50: 5f 56 45 52 53 49 4f 4e 29 20 3c 20 37 20 26 26 _VERSION) < 7 &&
6d60: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
6d70: 0a 4d 53 56 43 52 54 09 09 3d 20 30 0a 21 65 6e .MSVCRT..= 0.!en
6d80: 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 dif.!endif.!endi
6d90: 66 20 23 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 f # [nmakehlp -f
6da0: 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73 76 63 $(OPTS) "nomsvc
6db0: 72 74 22 5d 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 rt"]..!if [nmake
6dc0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
6dd0: 73 74 61 74 69 63 70 6b 67 22 5d 20 26 26 20 24 staticpkg"] && $
6de0: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 21 (STATIC_BUILD).!
6df0: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e message *** Doin
6e00: 67 20 73 74 61 74 69 63 70 6b 67 0a 54 43 4c 5f g staticpkg.TCL_
6e10: 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 4b 41 USE_STATIC_PACKA
6e20: 47 45 53 09 3d 20 31 0a 21 65 6e 64 69 66 0a 0a GES.= 1.!endif..
6e30: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
6e40: 20 24 28 4f 50 54 53 29 20 22 6e 6f 74 68 72 65 $(OPTS) "nothre
6e50: 61 64 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a ads"].!message *
6e60: 2a 2a 20 43 6f 6d 70 69 6c 65 20 65 78 70 6c 69 ** Compile expli
6e70: 63 69 74 6c 79 20 66 6f 72 20 6e 6f 6e 2d 74 68 citly for non-th
6e80: 72 65 61 64 65 64 20 74 63 6c 0a 54 43 4c 5f 54 readed tcl.TCL_T
6e90: 48 52 45 41 44 53 20 3d 20 30 0a 55 53 45 5f 54 HREADS = 0.USE_T
6ea0: 48 52 45 41 44 5f 41 4c 4c 4f 43 3d 20 30 0a 21 HREAD_ALLOC= 0.!
6eb0: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
6ec0: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
6ed0: 22 74 63 6c 38 22 5d 0a 21 6d 65 73 73 61 67 65 "tcl8"].!message
6ee0: 20 2a 2a 2a 20 42 75 69 6c 64 20 66 6f 72 20 54 *** Build for T
6ef0: 63 6c 38 0a 54 43 4c 5f 42 55 49 4c 44 5f 46 4f cl8.TCL_BUILD_FO
6f00: 52 20 3d 20 38 0a 21 65 6e 64 69 66 0a 21 69 66 R = 8.!endif.!if
6f10: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
6f20: 4f 50 54 53 29 20 22 74 6b 38 22 5d 0a 21 6d 65 OPTS) "tk8"].!me
6f30: 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 20 ssage *** Build
6f40: 66 6f 72 20 54 6b 38 0a 54 4b 5f 42 55 49 4c 44 for Tk8.TK_BUILD
6f50: 5f 46 4f 52 20 3d 20 38 0a 21 65 6e 64 69 66 0a _FOR = 8.!endif.
6f60: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
6f70: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 21 _VERSION) == 8.!
6f80: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
6f90: 24 28 4f 50 54 53 29 20 22 74 69 6d 65 36 34 62 $(OPTS) "time64b
6fa0: 69 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a it"].!message **
6fb0: 2a 20 46 6f 72 63 65 20 36 34 2d 62 69 74 20 74 * Force 64-bit t
6fc0: 69 6d 65 5f 74 0a 5f 55 53 45 5f 36 34 42 49 54 ime_t._USE_64BIT
6fd0: 5f 54 49 4d 45 5f 54 20 3d 20 31 0a 21 65 6e 64 _TIME_T = 1.!end
6fe0: 69 66 0a 21 65 6e 64 69 66 0a 0a 23 20 59 65 73 if.!endif..# Yes
6ff0: 2c 20 69 74 27 73 20 77 65 69 72 64 20 74 68 61 , it's weird tha
7000: 74 20 74 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 t the "symbols"
7010: 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 option controls
7020: 44 45 42 55 47 20 61 6e 64 0a 23 20 74 68 65 20 DEBUG and.# the
7030: 22 70 64 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f "pdbs" option co
7040: 6e 74 72 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20 ntrols SYMBOLS.
7050: 54 68 61 74 27 73 20 68 69 73 74 6f 72 69 63 61 That's historica
7060: 6c 2e 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 l..!if [nmakehlp
7070: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 73 79 6d -f $(OPTS) "sym
7080: 62 6f 6c 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 bols"].!message
7090: 2a 2a 2a 20 44 6f 69 6e 67 20 73 79 6d 62 6f 6c *** Doing symbol
70a0: 73 0a 44 45 42 55 47 09 09 3d 20 31 0a 21 65 6c s.DEBUG..= 1.!el
70b0: 73 65 0a 44 45 42 55 47 09 09 3d 20 30 0a 21 65 se.DEBUG..= 0.!e
70c0: 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 ndif..!if [nmake
70d0: 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 22 hlp -f $(OPTS) "
70e0: 70 64 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 pdbs"].!message
70f0: 2a 2a 2a 20 44 6f 69 6e 67 20 70 64 62 73 0a 53 *** Doing pdbs.S
7100: 59 4d 42 4f 4c 53 09 09 3d 20 31 0a 21 65 6c 73 YMBOLS..= 1.!els
7110: 65 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 21 e.SYMBOLS..= 0.!
7120: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
7130: 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 29 20 ehlp -f $(OPTS)
7140: 22 70 72 6f 66 69 6c 65 22 5d 0a 21 6d 65 73 73 "profile"].!mess
7150: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 age *** Doing pr
7160: 6f 66 69 6c 65 0a 50 52 4f 46 49 4c 45 09 09 3d ofile.PROFILE..=
7170: 20 31 0a 21 65 6c 73 65 0a 50 52 4f 46 49 4c 45 1.!else.PROFILE
7180: 09 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 ..= 0.!endif..!i
7190: 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 f [nmakehlp -f $
71a0: 28 4f 50 54 53 29 20 22 70 67 69 22 5d 0a 21 6d (OPTS) "pgi"].!m
71b0: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
71c0: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
71d0: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 20 69 6e 73 optimization ins
71e0: 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 50 47 4f trumentation.PGO
71f0: 09 09 3d 20 31 0a 21 65 6c 73 65 69 66 20 5b 6e ..= 1.!elseif [n
7200: 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 makehlp -f $(OPT
7210: 53 29 20 22 70 67 6f 22 5d 0a 21 6d 65 73 73 61 S) "pgo"].!messa
7220: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f ge *** Doing pro
7230: 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 file guided opti
7240: 6d 69 7a 61 74 69 6f 6e 0a 50 47 4f 09 09 3d 20 mization.PGO..=
7250: 32 0a 21 65 6c 73 65 0a 50 47 4f 09 09 3d 20 30 2.!else.PGO..= 0
7260: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d .!endif..!if [nm
7270: 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f 50 54 53 akehlp -f $(OPTS
7280: 29 20 22 6c 6f 69 6d 70 61 63 74 22 5d 0a 21 6d ) "loimpact"].!m
7290: 65 73 73 61 67 65 20 2a 2a 2a 20 57 61 72 6e 69 essage *** Warni
72a0: 6e 67 3a 20 69 67 6e 6f 72 69 6e 67 20 6f 70 74 ng: ignoring opt
72b0: 69 6f 6e 20 22 6c 6f 69 6d 70 61 63 74 22 20 2d ion "loimpact" -
72c0: 20 64 65 70 72 65 63 61 74 65 64 20 6f 6e 20 6d deprecated on m
72d0: 6f 64 65 72 6e 20 57 69 6e 64 6f 77 73 2e 0a 21 odern Windows..!
72e0: 65 6e 64 69 66 0a 0a 23 20 54 42 44 20 2d 20 73 endif..# TBD - s
72f0: 68 6f 75 6c 64 20 67 65 74 20 72 69 64 20 6f 66 hould get rid of
7300: 20 74 68 69 73 20 6f 70 74 69 6f 6e 0a 21 69 66 this option.!if
7310: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
7320: 4f 50 54 53 29 20 22 74 68 72 64 61 6c 6c 6f 63 OPTS) "thrdalloc
7330: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
7340: 44 6f 69 6e 67 20 74 68 72 64 61 6c 6c 6f 63 0a Doing thrdalloc.
7350: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
7360: 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 = 1.!endif..!if
7370: 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 [nmakehlp -f $(
7380: 4f 50 54 53 29 20 22 74 63 6c 61 6c 6c 6f 63 22 OPTS) "tclalloc"
7390: 5d 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c ].USE_THREAD_ALL
73a0: 4f 43 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 OC = 0.!endif..!
73b0: 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 if [nmakehlp -f
73c0: 24 28 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b $(OPTS) "uncheck
73d0: 65 64 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a ed"].!message **
73e0: 2a 20 44 6f 69 6e 67 20 75 6e 63 68 65 63 6b 65 * Doing unchecke
73f0: 64 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 31 0a d.UNCHECKED = 1.
7400: 21 65 6c 73 65 0a 55 4e 43 48 45 43 4b 45 44 20 !else.UNCHECKED
7410: 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 = 0.!endif..!if
7420: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 24 28 4f [nmakehlp -f $(O
7430: 50 54 53 29 20 22 6e 6f 63 6f 6e 66 69 67 63 68 PTS) "noconfigch
7440: 65 63 6b 22 5d 0a 43 4f 4e 46 49 47 5f 43 48 45 eck"].CONFIG_CHE
7450: 43 4b 20 3d 20 31 0a 21 65 6c 73 65 0a 43 4f 4e CK = 1.!else.CON
7460: 46 49 47 5f 43 48 45 43 4b 20 3d 20 30 0a 21 65 FIG_CHECK = 0.!e
7470: 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 22 ndif..!endif # "
7480: 24 28 4f 50 54 53 29 22 20 21 3d 20 22 22 20 20 $(OPTS)" != ""
7490: 26 26 20 2e 2e 2e 20 70 61 72 73 69 6e 67 20 6f && ... parsing o
74a0: 66 20 4f 50 54 53 0a 0a 23 20 53 65 74 20 6c 69 f OPTS..# Set li
74b0: 6e 6b 65 72 20 66 6c 61 67 73 20 62 61 73 65 64 nker flags based
74c0: 20 6f 6e 20 61 62 6f 76 65 0a 0a 21 69 66 20 24 on above..!if $
74d0: 28 50 47 4f 29 20 3e 20 31 0a 21 69 66 20 5b 6e (PGO) > 1.!if [n
74e0: 6d 61 6b 65 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 makehlp -l -ltcg
74f0: 3a 70 67 6f 70 74 69 6d 69 7a 65 20 24 28 4c 49 :pgoptimize $(LI
7500: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d NKER_TESTFLAGS)]
7510: 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 .LINKERFLAGS.= $
7520: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 (LINKERFLAGS:-lt
7530: 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 6f 70 74 cg=) -ltcg:pgopt
7540: 69 6d 69 7a 65 0a 21 65 6c 73 65 0a 4d 53 47 3d imize.!else.MSG=
7550: 5e 0a 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 ^.This compiler
7560: 64 6f 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 does not support
7570: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
7580: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 optimization..!e
7590: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
75a0: 69 66 0a 21 65 6c 73 65 69 66 20 24 28 50 47 4f if.!elseif $(PGO
75b0: 29 20 3e 20 30 0a 21 69 66 20 5b 6e 6d 61 6b 65 ) > 0.!if [nmake
75c0: 68 6c 70 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 69 hlp -l -ltcg:pgi
75d0: 6e 73 74 72 75 6d 65 6e 74 20 24 28 4c 49 4e 4b nstrument $(LINK
75e0: 45 52 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c ER_TESTFLAGS)].L
75f0: 49 4e 4b 45 52 46 4c 41 47 53 09 3d 20 24 28 4c INKERFLAGS.= $(L
7600: 49 4e 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 63 67 INKERFLAGS:-ltcg
7610: 3d 29 20 2d 6c 74 63 67 3a 70 67 69 6e 73 74 72 =) -ltcg:pginstr
7620: 75 6d 65 6e 74 0a 21 65 6c 73 65 0a 4d 53 47 3d ument.!else.MSG=
7630: 5e 0a 54 68 69 73 20 63 6f 6d 70 69 6c 65 72 20 ^.This compiler
7640: 64 6f 65 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 does not support
7650: 20 70 72 6f 66 69 6c 65 20 67 75 69 64 65 64 20 profile guided
7660: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 optimization..!e
7670: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
7680: 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 if.!endif..#####
7690: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
76a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
76b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
76c0: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 38 2e ###########.# 8.
76d0: 20 50 61 72 73 65 20 74 68 65 20 53 54 41 54 53 Parse the STATS
76e0: 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 macro to config
76f0: 75 72 65 20 63 6f 64 65 20 69 6e 73 74 72 75 6d ure code instrum
7700: 65 6e 74 61 74 69 6f 6e 0a 23 20 54 68 65 20 66 entation.# The f
7710: 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 ollowing macros
7720: 61 72 65 20 73 65 74 20 62 79 20 74 68 69 73 20 are set by this
7730: 73 65 63 74 69 6f 6e 3a 0a 23 20 54 43 4c 5f 4d section:.# TCL_M
7740: 45 4d 5f 44 45 42 55 47 20 2d 20 31 20 2d 3e 20 EM_DEBUG - 1 ->
7750: 65 6e 61 62 6c 65 73 20 6d 65 6d 6f 72 79 20 61 enables memory a
7760: 6c 6c 6f 63 61 74 69 6f 6e 20 69 6e 73 74 72 75 llocation instru
7770: 6d 65 6e 74 61 74 69 6f 6e 0a 23 20 20 20 20 20 mentation.#
7780: 20 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 0 ->
7790: 20 64 69 73 61 62 6c 65 73 0a 23 20 54 43 4c 5f disables.# TCL_
77a0: 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 2d 20 COMPILE_DEBUG -
77b0: 31 20 2d 3e 20 65 6e 61 62 6c 65 73 20 62 79 74 1 -> enables byt
77c0: 65 20 63 6f 6d 70 69 6c 65 72 20 6c 6f 67 67 69 e compiler loggi
77d0: 6e 67 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 ng.#
77e0: 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 64 69 0 -> di
77f0: 73 61 62 6c 65 73 0a 0a 23 20 44 65 66 61 75 6c sables..# Defaul
7800: 74 20 62 6f 74 68 20 61 72 65 20 6f 66 66 0a 54 t both are off.T
7810: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 CL_MEM_DEBUG.
7820: 20 3d 20 30 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 = 0.TCL_COMPILE
7830: 5f 44 45 42 55 47 20 20 20 3d 20 30 0a 0a 21 69 _DEBUG = 0..!i
7840: 66 20 22 24 28 53 54 41 54 53 29 22 20 21 3d 20 f "$(STATS)" !=
7850: 22 22 20 26 26 20 21 5b 6e 6d 61 6b 65 68 6c 70 "" && ![nmakehlp
7860: 20 2d 66 20 22 24 28 53 54 41 54 53 29 22 20 22 -f "$(STATS)" "
7870: 6e 6f 6e 65 22 5d 0a 0a 21 69 66 20 5b 6e 6d 61 none"]..!if [nma
7880: 6b 65 68 6c 70 20 2d 66 20 24 28 53 54 41 54 53 kehlp -f $(STATS
7890: 29 20 22 6d 65 6d 64 62 67 22 5d 0a 21 6d 65 73 ) "memdbg"].!mes
78a0: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 6d sage *** Doing m
78b0: 65 6d 64 62 67 0a 54 43 4c 5f 4d 45 4d 5f 44 45 emdbg.TCL_MEM_DE
78c0: 42 55 47 09 20 20 20 20 3d 20 31 0a 21 65 6c 73 BUG. = 1.!els
78d0: 65 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 e.TCL_MEM_DEBUG.
78e0: 20 20 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a = 0.!endif..
78f0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7900: 20 24 28 53 54 41 54 53 29 20 22 63 6f 6d 70 64 $(STATS) "compd
7910: 62 67 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a bg"].!message **
7920: 2a 20 44 6f 69 6e 67 20 63 6f 6d 70 64 62 67 0a * Doing compdbg.
7930: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 TCL_COMPILE_DEBU
7940: 47 20 20 20 3d 20 31 0a 21 65 6c 73 65 0a 54 43 G = 1.!else.TC
7950: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 L_COMPILE_DEBUG
7960: 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 65 = 0.!endif..!e
7970: 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 ndif..##########
7980: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7990: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
79a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
79b0: 23 23 23 23 23 23 23 23 23 23 0a 23 20 39 2e 20 ##########.# 9.
79c0: 50 61 72 73 65 20 74 68 65 20 43 48 45 43 4b 53 Parse the CHECKS
79d0: 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 69 67 macro to config
79e0: 75 72 65 20 61 64 64 69 74 69 6f 6e 61 6c 20 63 ure additional c
79f0: 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 0a 23 ompiler checks.#
7a00: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d The following m
7a10: 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 79 acros are set by
7a20: 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 this section:.#
7a30: 20 57 41 52 4e 49 4e 47 53 20 2d 20 63 6f 6d 70 WARNINGS - comp
7a40: 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 74 68 iler switches th
7a50: 61 74 20 63 6f 6e 74 72 6f 6c 20 74 68 65 20 77 at control the w
7a60: 61 72 6e 69 6e 67 73 20 6c 65 76 65 6c 0a 23 20 arnings level.#
7a70: 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 TCL_NO_DEPRECATE
7a80: 44 20 2d 20 31 20 2d 3e 20 64 69 73 61 62 6c 65 D - 1 -> disable
7a90: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 64 65 70 support for dep
7aa0: 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f 6e recated function
7ab0: 73 0a 23 20 20 20 20 20 20 20 20 20 20 20 20 20 s.#
7ac0: 20 20 20 20 20 20 20 20 30 20 2d 3e 20 65 6e 61 0 -> ena
7ad0: 62 6c 65 20 64 65 70 72 65 63 61 74 65 64 20 66 ble deprecated f
7ae0: 75 6e 63 74 69 6f 6e 73 0a 0a 23 20 44 65 66 61 unctions..# Defa
7af0: 75 6c 74 73 20 2d 20 50 65 72 6d 69 74 20 64 65 ults - Permit de
7b00: 70 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 6f precated functio
7b10: 6e 73 20 61 6e 64 20 77 61 72 6e 69 6e 67 20 6c ns and warning l
7b20: 65 76 65 6c 20 33 0a 54 43 4c 5f 4e 4f 5f 44 45 evel 3.TCL_NO_DE
7b30: 50 52 45 43 41 54 45 44 09 20 20 20 20 3d 20 30 PRECATED. = 0
7b40: 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 20 3d .WARNINGS.. =
7b50: 20 2d 57 33 0a 0a 21 69 66 20 22 24 28 43 48 45 -W3..!if "$(CHE
7b60: 43 4b 53 29 22 20 21 3d 20 22 22 20 26 26 20 21 CKS)" != "" && !
7b70: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 20 22 24 28 [nmakehlp -f "$(
7b80: 43 48 45 43 4b 53 29 22 20 22 6e 6f 6e 65 22 5d CHECKS)" "none"]
7b90: 0a 0a 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 ..!if [nmakehlp
7ba0: 2d 66 20 24 28 43 48 45 43 4b 53 29 20 22 6e 6f -f $(CHECKS) "no
7bb0: 64 65 70 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a dep"].!message *
7bc0: 2a 2a 20 44 6f 69 6e 67 20 6e 6f 64 65 70 20 63 ** Doing nodep c
7bd0: 68 65 63 6b 0a 54 43 4c 5f 4e 4f 5f 44 45 50 52 heck.TCL_NO_DEPR
7be0: 45 43 41 54 45 44 09 20 20 20 20 3d 20 31 0a 21 ECATED. = 1.!
7bf0: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 6e 6d 61 6b endif..!if [nmak
7c00: 65 68 6c 70 20 2d 66 20 24 28 43 48 45 43 4b 53 ehlp -f $(CHECKS
7c10: 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0a 21 6d ) "fullwarn"].!m
7c20: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7c30: 20 66 75 6c 6c 20 77 61 72 6e 69 6e 67 73 20 63 full warnings c
7c40: 68 65 63 6b 0a 57 41 52 4e 49 4e 47 53 09 09 20 heck.WARNINGS..
7c50: 20 20 20 3d 20 2d 57 34 0a 21 69 66 20 5b 6e 6d = -W4.!if [nm
7c60: 61 6b 65 68 6c 70 20 2d 6c 20 2d 77 61 72 6e 3a akehlp -l -warn:
7c70: 33 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 3 $(LINKER_TESTF
7c80: 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 LAGS)].LINKERFLA
7c90: 47 53 09 09 20 20 20 20 3d 20 24 28 4c 49 4e 4b GS.. = $(LINK
7ca0: 45 52 46 4c 41 47 53 29 20 2d 77 61 72 6e 3a 33 ERFLAGS) -warn:3
7cb0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
7cc0: 21 69 66 20 5b 6e 6d 61 6b 65 68 6c 70 20 2d 66 !if [nmakehlp -f
7cd0: 20 24 28 43 48 45 43 4b 53 29 20 22 36 34 62 69 $(CHECKS) "64bi
7ce0: 74 22 5d 20 26 26 20 5b 6e 6d 61 6b 65 68 6c 70 t"] && [nmakehlp
7cf0: 20 2d 63 20 2d 57 70 36 34 5d 0a 21 6d 65 73 73 -c -Wp64].!mess
7d00: 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 36 34 age *** Doing 64
7d10: 62 69 74 20 70 6f 72 74 61 62 69 6c 69 74 79 20 bit portability
7d20: 77 61 72 6e 69 6e 67 73 0a 57 41 52 4e 49 4e 47 warnings.WARNING
7d30: 53 09 09 20 20 20 20 3d 20 24 28 57 41 52 4e 49 S.. = $(WARNI
7d40: 4e 47 53 29 20 2d 57 70 36 34 0a 21 65 6e 64 69 NGS) -Wp64.!endi
7d50: 66 0a 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 f..!endif...####
7d60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7d90: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 ############.# 1
7da0: 30 2e 20 43 6f 6e 73 74 72 75 63 74 20 6f 75 74 0. Construct out
7db0: 70 75 74 20 64 69 72 65 63 74 6f 72 79 20 61 6e put directory an
7dc0: 64 20 66 69 6c 65 20 70 61 74 68 73 0a 23 20 46 d file paths.# F
7dd0: 69 67 75 72 65 2d 6f 75 74 20 68 6f 77 20 74 6f igure-out how to
7de0: 20 6e 61 6d 65 20 6f 75 72 20 69 6e 74 65 72 6d name our interm
7df0: 65 64 69 61 74 65 20 61 6e 64 20 6f 75 74 70 75 ediate and outpu
7e00: 74 20 64 69 72 65 63 74 6f 72 69 65 73 2e 0a 23 t directories..#
7e10: 20 49 6e 20 6f 72 64 65 72 20 74 6f 20 61 76 6f In order to avo
7e20: 69 64 20 69 6e 61 64 76 65 72 74 65 6e 74 20 6d id inadvertent m
7e30: 69 78 69 6e 67 20 6f 66 20 6f 62 6a 65 63 74 20 ixing of object
7e40: 66 69 6c 65 73 20 62 75 69 6c 74 20 75 73 69 6e files built usin
7e50: 67 0a 23 20 64 69 66 66 65 72 65 6e 74 20 63 6f g.# different co
7e60: 6d 70 69 6c 65 72 73 2c 20 62 75 69 6c 64 20 63 mpilers, build c
7e70: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 73 20 65 74 onfigurations et
7e80: 63 2e 2c 0a 23 0a 23 20 4e 61 6d 69 6e 67 20 63 c.,.#.# Naming c
7e90: 6f 6e 76 65 6e 74 69 6f 6e 20 28 73 75 66 66 69 onvention (suffi
7ea0: 78 65 73 29 3a 0a 23 20 20 20 74 20 3d 20 66 75 xes):.# t = fu
7eb0: 6c 6c 20 74 68 72 65 61 64 20 73 75 70 70 6f 72 ll thread suppor
7ec0: 74 2e 20 28 4e 6f 74 20 75 73 65 64 20 66 6f 72 t. (Not used for
7ed0: 20 54 63 6c 20 3e 3d 20 38 2e 37 29 0a 23 20 20 Tcl >= 8.7).#
7ee0: 20 73 20 3d 20 73 74 61 74 69 63 20 6c 69 62 72 s = static libr
7ef0: 61 72 79 20 28 61 73 20 6f 70 70 6f 73 65 64 20 ary (as opposed
7f00: 74 6f 20 61 6e 20 69 6d 70 6f 72 74 20 6c 69 62 to an import lib
7f10: 72 61 72 79 29 0a 23 20 20 20 67 20 3d 20 6c 69 rary).# g = li
7f20: 6e 6b 65 64 20 74 6f 20 74 68 65 20 64 65 62 75 nked to the debu
7f30: 67 20 65 6e 61 62 6c 65 64 20 43 20 72 75 6e 2d g enabled C run-
7f40: 74 69 6d 65 2e 0a 23 20 20 20 78 20 3d 20 73 70 time..# x = sp
7f50: 65 63 69 61 6c 20 73 74 61 74 69 63 20 62 75 69 ecial static bui
7f60: 6c 64 20 77 68 65 6e 20 69 74 20 6c 69 6e 6b 73 ld when it links
7f70: 20 74 6f 20 74 68 65 20 64 79 6e 61 6d 69 63 20 to the dynamic
7f80: 43 20 72 75 6e 2d 74 69 6d 65 2e 0a 23 0a 23 20 C run-time..#.#
7f90: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
7fa0: 63 72 6f 73 20 61 72 65 20 73 65 74 20 69 6e 20 cros are set in
7fb0: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 this section:.#
7fc0: 53 55 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 SUFX - the suffi
7fd0: 78 20 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e x to use for bin
7fe0: 61 72 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 aries based on a
7ff0: 62 6f 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 bove naming conv
8000: 65 6e 74 69 6f 6e 0a 23 20 42 55 49 4c 44 44 49 ention.# BUILDDI
8010: 52 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c 65 RTOP - the tople
8020: 76 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 70 vel default outp
8030: 75 74 20 64 69 72 65 63 74 6f 72 79 0a 23 20 20 ut directory.#
8040: 20 20 20 20 69 73 20 6f 66 20 74 68 65 20 66 6f is of the fo
8050: 72 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 62 75 rm {Release,Debu
8060: 67 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f 4d 50 g}[_AMD64][_COMP
8070: 49 4c 45 52 56 45 52 53 49 4f 4e 5d 0a 23 20 54 ILERVERSION].# T
8080: 4d 50 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f MP_DIR - directo
8090: 72 79 20 77 68 65 72 65 20 6f 62 6a 65 63 74 20 ry where object
80a0: 66 69 6c 65 73 20 61 72 65 20 63 72 65 61 74 65 files are create
80b0: 64 0a 23 20 4f 55 54 5f 44 49 52 20 2d 20 64 69 d.# OUT_DIR - di
80c0: 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 6f 75 rectory where ou
80d0: 74 70 75 74 20 65 78 65 63 75 74 61 62 6c 65 73 tput executables
80e0: 20 61 72 65 20 63 72 65 61 74 65 64 0a 23 20 42 are created.# B
80f0: 6f 74 68 20 54 4d 50 5f 44 49 52 20 61 6e 64 20 oth TMP_DIR and
8100: 4f 55 54 5f 44 49 52 20 61 72 65 20 64 65 66 61 OUT_DIR are defa
8110: 75 6c 74 65 64 20 6f 6e 6c 79 20 69 66 20 6e 6f ulted only if no
8120: 74 20 64 65 66 69 6e 65 64 20 62 79 20 74 68 65 t defined by the
8130: 0a 23 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 .# parent makefi
8140: 6c 65 20 28 6f 72 20 63 6f 6d 6d 61 6e 64 20 6c le (or command l
8150: 69 6e 65 29 2e 20 54 68 65 20 64 65 66 61 75 6c ine). The defaul
8160: 74 20 76 61 6c 75 65 73 20 61 72 65 0a 23 20 62 t values are.# b
8170: 61 73 65 64 20 6f 6e 20 42 55 49 4c 44 44 49 52 ased on BUILDDIR
8180: 54 4f 50 2e 0a 23 20 53 54 55 42 50 52 45 46 49 TOP..# STUBPREFI
8190: 58 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 X - name of the
81a0: 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f stubs library fo
81b0: 72 20 74 68 69 73 20 70 72 6f 6a 65 63 74 0a 23 r this project.#
81c0: 20 50 52 4a 49 4d 50 4c 49 42 20 2d 20 6f 75 74 PRJIMPLIB - out
81d0: 70 75 74 20 70 61 74 68 20 6f 66 20 74 68 65 20 put path of the
81e0: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
81f0: 74 20 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 t import library
8200: 0a 23 20 50 52 4a 4c 49 42 4e 41 4d 45 20 2d 20 .# PRJLIBNAME -
8210: 6e 61 6d 65 20 6f 66 20 67 65 6e 65 72 61 74 65 name of generate
8220: 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 72 d project librar
8230: 79 0a 23 20 50 52 4a 4c 49 42 20 20 20 20 20 2d y.# PRJLIB -
8240: 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f 66 20 output path of
8250: 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 generated projec
8260: 74 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 t library.# PRJS
8270: 54 55 42 4c 49 42 4e 41 4d 45 20 2d 20 6e 61 6d TUBLIBNAME - nam
8280: 65 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 e of the generat
8290: 65 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 73 ed project stubs
82a0: 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 54 library.# PRJST
82b0: 55 42 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 UBLIB - output p
82c0: 61 74 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 ath of the gener
82d0: 61 74 65 64 20 70 72 6f 6a 65 63 74 20 73 74 75 ated project stu
82e0: 62 73 20 6c 69 62 72 61 72 79 0a 23 20 52 45 53 bs library.# RES
82f0: 46 49 4c 45 20 2d 20 6f 75 74 70 75 74 20 72 65 FILE - output re
8300: 73 6f 75 72 63 65 20 66 69 6c 65 20 28 6f 6e 6c source file (onl
8310: 79 20 69 66 20 6e 6f 74 20 73 74 61 74 69 63 20 y if not static
8320: 62 75 69 6c 64 29 0a 0a 53 55 46 58 09 20 20 20 build)..SUFX.
8330: 20 3d 20 74 73 67 78 0a 0a 21 69 66 20 24 28 44 = tsgx..!if $(D
8340: 45 42 55 47 29 0a 42 55 49 4c 44 44 49 52 54 4f EBUG).BUILDDIRTO
8350: 50 20 3d 20 44 65 62 75 67 0a 21 65 6c 73 65 0a P = Debug.!else.
8360: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 52 65 BUILDDIRTOP = Re
8370: 6c 65 61 73 65 0a 21 65 6e 64 69 66 0a 0a 21 69 lease.!endif..!i
8380: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 f "$(MACHINE)" !
8390: 3d 20 22 49 58 38 36 22 0a 42 55 49 4c 44 44 49 = "IX86".BUILDDI
83a0: 52 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 RTOP =$(BUILDDIR
83b0: 54 4f 50 29 5f 24 28 4d 41 43 48 49 4e 45 29 0a TOP)_$(MACHINE).
83c0: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 56 43 56 !endif.!if $(VCV
83d0: 45 52 29 20 3e 20 36 0a 42 55 49 4c 44 44 49 52 ER) > 6.BUILDDIR
83e0: 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 54 TOP =$(BUILDDIRT
83f0: 4f 50 29 5f 56 43 24 28 56 43 56 45 52 29 0a 21 OP)_VC$(VCVER).!
8400: 65 6e 64 69 66 0a 0a 21 69 66 20 21 24 28 44 45 endif..!if !$(DE
8410: 42 55 47 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 BUG) || $(TCL_VE
8420: 52 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 RSION) > 86 || $
8430: 28 44 45 42 55 47 29 20 26 26 20 24 28 55 4e 43 (DEBUG) && $(UNC
8440: 48 45 43 4b 45 44 29 0a 53 55 46 58 09 20 20 20 HECKED).SUFX.
8450: 20 3d 20 24 28 53 55 46 58 3a 67 3d 29 0a 21 65 = $(SUFX:g=).!e
8460: 6e 64 69 66 0a 0a 54 4d 50 5f 44 49 52 46 55 4c ndif..TMP_DIRFUL
8470: 4c 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49 52 L = .\$(BUILDDIR
8480: 54 4f 50 29 5c 24 28 50 52 4f 4a 45 43 54 29 5f TOP)\$(PROJECT)_
8490: 54 68 72 65 61 64 65 64 44 79 6e 61 6d 69 63 53 ThreadedDynamicS
84a0: 74 61 74 69 63 58 0a 0a 21 69 66 20 21 24 28 53 taticX..!if !$(S
84b0: 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 54 4d 50 TATIC_BUILD).TMP
84c0: 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 _DIRFULL = $(TMP
84d0: 5f 44 49 52 46 55 4c 4c 3a 53 74 61 74 69 63 3d _DIRFULL:Static=
84e0: 29 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 ).SUFX. = $(S
84f0: 55 46 58 3a 73 3d 29 0a 45 58 54 09 20 20 20 20 UFX:s=).EXT.
8500: 3d 20 64 6c 6c 0a 54 4d 50 5f 44 49 52 46 55 4c = dll.TMP_DIRFUL
8510: 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c L = $(TMP_DIRFUL
8520: 4c 3a 58 3d 29 0a 53 55 46 58 09 20 20 20 20 3d L:X=).SUFX. =
8530: 20 24 28 53 55 46 58 3a 78 3d 29 0a 21 65 6c 73 $(SUFX:x=).!els
8540: 65 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 e.TMP_DIRFULL =
8550: 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 44 79 $(TMP_DIRFULL:Dy
8560: 6e 61 6d 69 63 3d 29 0a 45 58 54 09 20 20 20 20 namic=).EXT.
8570: 3d 20 6c 69 62 0a 21 69 66 20 24 28 4d 53 56 43 = lib.!if $(MSVC
8580: 52 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 RT) && $(TCL_VER
8590: 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 21 24 SION) > 86 || !$
85a0: 28 4d 53 56 43 52 54 29 20 26 26 20 24 28 54 43 (MSVCRT) && $(TC
85b0: 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a L_VERSION) < 87.
85c0: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 TMP_DIRFULL = $(
85d0: 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a TMP_DIRFULL:X=).
85e0: 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 SUFX. = $(SUF
85f0: 58 3a 78 3d 29 0a 21 65 6e 64 69 66 0a 21 65 6e X:x=).!endif.!en
8600: 64 69 66 0a 0a 21 69 66 20 21 24 28 54 43 4c 5f dif..!if !$(TCL_
8610: 54 48 52 45 41 44 53 29 20 7c 7c 20 24 28 54 43 THREADS) || $(TC
8620: 4c 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0a L_VERSION) > 86.
8630: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 TMP_DIRFULL = $(
8640: 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 54 68 72 65 TMP_DIRFULL:Thre
8650: 61 64 65 64 3d 29 0a 53 55 46 58 09 20 20 20 20 aded=).SUFX.
8660: 3d 20 24 28 53 55 46 58 3a 74 3d 29 0a 21 65 6e = $(SUFX:t=).!en
8670: 64 69 66 0a 0a 21 69 66 6e 64 65 66 20 54 4d 50 dif..!ifndef TMP
8680: 5f 44 49 52 0a 54 4d 50 5f 44 49 52 09 20 20 20 _DIR.TMP_DIR.
8690: 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c = $(TMP_DIRFULL
86a0: 29 0a 21 69 66 6e 64 65 66 20 4f 55 54 5f 44 49 ).!ifndef OUT_DI
86b0: 52 0a 4f 55 54 5f 44 49 52 09 20 20 20 20 3d 20 R.OUT_DIR. =
86c0: 2e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 .\$(BUILDDIRTOP)
86d0: 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 .!endif.!else.!i
86e0: 66 6e 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 fndef OUT_DIR.OU
86f0: 54 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d T_DIR. = $(TM
8700: 50 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 65 P_DIR).!endif.!e
8710: 6e 64 69 66 0a 0a 23 20 52 65 6c 61 74 69 76 65 ndif..# Relative
8720: 20 70 61 74 68 73 20 2d 3e 20 61 62 73 6f 6c 75 paths -> absolu
8730: 74 65 0a 21 69 66 20 5b 65 63 68 6f 20 4f 55 54 te.!if [echo OUT
8740: 5f 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 _DIR = \> nmakeh
8750: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
8760: 5b 6e 6d 61 6b 65 68 6c 70 20 2d 51 20 22 24 28 [nmakehlp -Q "$(
8770: 4f 55 54 5f 44 49 52 29 22 20 3e 3e 20 6e 6d 61 OUT_DIR)" >> nma
8780: 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f kehlp.out].!erro
8790: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
87a0: 66 75 6c 6c 79 20 71 75 61 6c 69 66 79 20 70 61 fully qualify pa
87b0: 74 68 20 4f 55 54 5f 44 49 52 3d 24 28 4f 55 54 th OUT_DIR=$(OUT
87c0: 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 69 66 _DIR).!endif.!if
87d0: 20 5b 65 63 68 6f 20 54 4d 50 5f 44 49 52 20 3d [echo TMP_DIR =
87e0: 20 5c 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 \>> nmakehlp.ou
87f0: 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b 6e 6d 61 6b t] \. || [nmak
8800: 65 68 6c 70 20 2d 51 20 22 24 28 54 4d 50 5f 44 ehlp -Q "$(TMP_D
8810: 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 IR)" >> nmakehlp
8820: 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a .out].!error ***
8830: 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 Could not fully
8840: 20 71 75 61 6c 69 66 79 20 70 61 74 68 20 54 4d qualify path TM
8850: 50 5f 44 49 52 3d 24 28 54 4d 50 5f 44 49 52 29 P_DIR=$(TMP_DIR)
8860: 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 .!endif.!include
8870: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 0a 23 nmakehlp.out..#
8880: 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 The name of the
8890: 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 stubs library f
88a0: 6f 72 20 74 68 65 20 70 72 6f 6a 65 63 74 20 62 or the project b
88b0: 65 69 6e 67 20 62 75 69 6c 74 0a 53 54 55 42 50 eing built.STUBP
88c0: 52 45 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 REFIX = $(P
88d0: 52 4f 4a 45 43 54 29 73 74 75 62 0a 0a 23 0a 23 ROJECT)stub..#.#
88e0: 20 53 65 74 20 75 70 20 70 61 74 68 73 20 74 6f Set up paths to
88f0: 20 76 61 72 69 6f 75 73 20 54 63 6c 20 65 78 65 various Tcl exe
8900: 63 75 74 61 62 6c 65 73 20 61 6e 64 20 6c 69 62 cutables and lib
8910: 72 61 72 69 65 73 20 6e 65 65 64 65 64 20 62 79 raries needed by
8920: 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 0a 0a 23 extensions.#..#
8930: 20 54 49 50 20 34 33 30 2e 20 55 6e 75 73 65 64 TIP 430. Unused
8940: 20 66 6f 72 20 38 2e 36 20 62 75 74 20 6e 6f 20 for 8.6 but no
8950: 68 61 72 6d 20 64 65 66 69 6e 69 6e 67 20 69 74 harm defining it
8960: 20 74 6f 20 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d to allow a comm
8970: 6f 6e 20 72 75 6c 65 73 2e 76 63 0a 54 43 4c 5f on rules.vc.TCL_
8980: 5a 49 50 5f 46 49 4c 45 20 3d 20 6c 69 62 74 63 ZIP_FILE = libtc
8990: 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 l$(TCL_MAJOR_VER
89a0: 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f SION).$(TCL_MINO
89b0: 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 43 4c 5f R_VERSION)$(TCL_
89c0: 50 41 54 43 48 5f 4c 45 54 54 45 52 29 24 28 54 PATCH_LETTER)$(T
89d0: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
89e0: 4c 29 2e 7a 69 70 0a 54 4b 5f 5a 49 50 5f 46 49 L).zip.TK_ZIP_FI
89f0: 4c 45 20 3d 20 6c 69 62 74 6b 24 28 54 4b 5f 4d LE = libtk$(TK_M
8a00: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 AJOR_VERSION).$(
8a10: 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e TK_MINOR_VERSION
8a20: 29 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 )$(TK_PATCH_LETT
8a30: 45 52 29 24 28 54 4b 5f 52 45 4c 45 41 53 45 5f ER)$(TK_RELEASE_
8a40: 53 45 52 49 41 4c 29 2e 7a 69 70 0a 0a 21 69 66 SERIAL).zip..!if
8a50: 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 54 43 $(DOING_TCL).TC
8a60: 4c 53 48 4e 41 4d 45 20 20 20 20 20 20 20 3d 20 LSHNAME =
8a70: 24 28 50 52 4f 4a 45 43 54 29 73 68 24 28 56 45 $(PROJECT)sh$(VE
8a80: 52 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 RSION)$(SUFX).ex
8a90: 65 0a 54 43 4c 53 48 09 09 3d 20 24 28 4f 55 54 e.TCLSH..= $(OUT
8aa0: 5f 44 49 52 29 5c 24 28 54 43 4c 53 48 4e 41 4d _DIR)\$(TCLSHNAM
8ab0: 45 29 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 E).TCLIMPLIB.= $
8ac0: 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a (OUT_DIR)\$(PROJ
8ad0: 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 ECT)$(VERSION)$(
8ae0: 53 55 46 58 29 2e 6c 69 62 0a 54 43 4c 4c 49 42 SUFX).lib.TCLLIB
8af0: 4e 41 4d 45 09 3d 20 24 28 50 52 4f 4a 45 43 54 NAME.= $(PROJECT
8b00: 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 )$(VERSION)$(SUF
8b10: 58 29 2e 24 28 45 58 54 29 0a 54 43 4c 4c 49 42 X).$(EXT).TCLLIB
8b20: 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 ..= $(OUT_DIR)\$
8b30: 28 54 43 4c 4c 49 42 4e 41 4d 45 29 0a 54 43 4c (TCLLIBNAME).TCL
8b40: 53 43 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 SCRIPTZIP = $
8b50: 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 5f (OUT_DIR)\$(TCL_
8b60: 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 69 66 20 24 ZIP_FILE)..!if $
8b70: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
8b80: 4f 4e 29 20 3d 3d 20 38 0a 54 43 4c 53 54 55 42 ON) == 8.TCLSTUB
8b90: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 LIBNAME.= $(STUB
8ba0: 50 52 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e PREFIX)$(VERSION
8bb0: 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 ).lib.!else.TCLS
8bc0: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 TUBLIBNAME.= $(S
8bd0: 54 55 42 50 52 45 46 49 58 29 2e 6c 69 62 0a 21 TUBPREFIX).lib.!
8be0: 65 6e 64 69 66 0a 54 43 4c 53 54 55 42 4c 49 42 endif.TCLSTUBLIB
8bf0: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
8c00: 54 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a TCLSTUBLIBNAME).
8c10: 54 43 4c 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 TCL_INCLUDES
8c20: 3d 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 = -I"$(WIN_DIR)"
8c30: 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 -I"$(GENERICDIR
8c40: 29 22 0a 0a 21 65 6c 73 65 20 23 20 21 24 28 44 )"..!else # !$(D
8c50: 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 69 66 20 24 OING_TCL)..!if $
8c60: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 (TCLINSTALL) # B
8c70: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
8c80: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
8c90: 0a 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e ..# When buildin
8ca0: 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 77 65 g extensions, we
8cb0: 20 6e 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 need to locate
8cc0: 74 63 6c 73 68 2e 20 44 65 70 65 6e 64 69 6e 67 tclsh. Depending
8cd0: 20 6f 6e 20 76 65 72 73 69 6f 6e 0a 23 20 6f 66 on version.# of
8ce0: 20 54 63 6c 20 77 65 20 61 72 65 20 62 75 69 6c Tcl we are buil
8cf0: 64 69 6e 67 20 61 67 61 69 6e 73 74 2c 20 74 68 ding against, th
8d00: 69 73 20 6d 61 79 20 6f 72 20 6d 61 79 20 6e 6f is may or may no
8d10: 74 20 68 61 76 65 20 61 20 22 74 22 20 73 75 66 t have a "t" suf
8d20: 66 69 78 2e 0a 23 20 54 72 79 20 76 61 72 69 6f fix..# Try vario
8d30: 75 73 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 us possibilities
8d40: 20 69 6e 20 74 75 72 6e 2e 0a 54 43 4c 53 48 09 in turn..TCLSH.
8d50: 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 .= $(_TCLDIR)\bi
8d60: 6e 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 n\tclsh$(TCL_VER
8d70: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
8d80: 65 78 65 0a 21 69 66 20 21 65 78 69 73 74 28 22 exe.!if !exist("
8d90: 24 28 54 43 4c 53 48 29 22 29 0a 54 43 4c 53 48 $(TCLSH)").TCLSH
8da0: 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f = $(_
8db0: 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c 73 TCLDIR)\bin\tcls
8dc0: 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 h$(TCL_VERSION)t
8dd0: 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 $(SUFX:t=).exe.!
8de0: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c endif..!if $(TCL
8df0: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
8e00: 3d 3d 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 09 == 8.TCLSTUBLIB.
8e10: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 = $(_TCLDIR)\lib
8e20: 5c 74 63 6c 73 74 75 62 24 28 54 43 4c 5f 56 45 \tclstub$(TCL_VE
8e30: 52 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 RSION).lib.!else
8e40: 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 .TCLSTUBLIB.= $(
8e50: 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c _TCLDIR)\lib\tcl
8e60: 73 74 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a stub.lib.!endif.
8e70: 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 TCLIMPLIB.= $(_T
8e80: 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 CLDIR)\lib\tcl$(
8e90: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 TCL_VERSION)$(SU
8ea0: 46 58 3a 74 3d 29 2e 6c 69 62 0a 23 20 57 68 65 FX:t=).lib.# Whe
8eb0: 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e n building exten
8ec0: 73 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 sions, may be li
8ed0: 6e 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 nking against Tc
8ee0: 6c 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 l that does not
8ef0: 61 64 64 0a 23 20 22 74 22 20 73 75 66 66 69 78 add.# "t" suffix
8f00: 20 28 65 2e 67 2e 20 38 2e 35 20 6f 72 20 38 2e (e.g. 8.5 or 8.
8f10: 37 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 7). If lib not f
8f20: 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74 ound check for t
8f30: 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e hat possibility.
8f40: 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 28 54 .!if !exist("$(T
8f50: 43 4c 49 4d 50 4c 49 42 29 22 29 0a 54 43 4c 49 CLIMPLIB)").TCLI
8f60: 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 MPLIB.= $(_TCLDI
8f70: 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f R)\lib\tcl$(TCL_
8f80: 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 3a VERSION)t$(SUFX:
8f90: 74 3d 29 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 t=).lib.!endif.T
8fa0: 43 4c 5f 4c 49 42 52 41 52 59 09 3d 20 24 28 5f CL_LIBRARY.= $(_
8fb0: 54 43 4c 44 49 52 29 5c 6c 69 62 0a 54 43 4c 52 TCLDIR)\lib.TCLR
8fc0: 45 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 EGLIB.= $(_TCLDI
8fd0: 52 29 5c 6c 69 62 5c 74 63 6c 72 65 67 31 33 24 R)\lib\tclreg13$
8fe0: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 (SUFX:t=).lib.TC
8ff0: 4c 44 44 45 4c 49 42 09 3d 20 24 28 5f 54 43 4c LDDELIB.= $(_TCL
9000: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 64 64 65 31 DIR)\lib\tcldde1
9010: 34 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 4$(SUFX:t=).lib.
9020: 54 43 4c 53 43 52 49 50 54 5a 49 50 09 3d 20 24 TCLSCRIPTZIP.= $
9030: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 24 28 (_TCLDIR)\lib\$(
9040: 54 43 4c 5f 5a 49 50 5f 46 49 4c 45 29 0a 54 43 TCL_ZIP_FILE).TC
9050: 4c 54 4f 4f 4c 53 44 49 52 09 3d 20 5c 6d 75 73 LTOOLSDIR.= \mus
9060: 74 5c 68 61 76 65 5c 74 63 6c 5c 73 6f 75 72 63 t\have\tcl\sourc
9070: 65 73 5c 74 6f 5c 62 75 69 6c 64 5c 74 68 69 73 es\to\build\this
9080: 5c 74 61 72 67 65 74 0a 54 43 4c 5f 49 4e 43 4c \target.TCL_INCL
9090: 55 44 45 53 20 20 20 20 3d 20 2d 49 22 24 28 5f UDES = -I"$(_
90a0: 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 TCLDIR)\include"
90b0: 0a 0a 21 65 6c 73 65 20 23 20 42 75 69 6c 64 69 ..!else # Buildi
90c0: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 ng against Tcl s
90d0: 6f 75 72 63 65 73 0a 0a 54 43 4c 53 48 09 09 3d ources..TCLSH..=
90e0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c $(_TCLDIR)\win\
90f0: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 $(BUILDDIRTOP)\t
9100: 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f clsh$(TCL_VERSIO
9110: 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 N)$(SUFX:t=).exe
9120: 0a 21 69 66 20 21 65 78 69 73 74 28 24 28 54 43 .!if !exist($(TC
9130: 4c 53 48 29 29 0a 54 43 4c 53 48 09 09 3d 20 24 LSH)).TCLSH..= $
9140: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 (_TCLDIR)\win\$(
9150: 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c BUILDDIRTOP)\tcl
9160: 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 sh$(TCL_VERSION)
9170: 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a t$(SUFX:t=).exe.
9180: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c !endif.!if $(TCL
9190: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 _MAJOR_VERSION)
91a0: 3d 3d 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 09 == 8.TCLSTUBLIB.
91b0: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
91c0: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
91d0: 74 63 6c 73 74 75 62 24 28 54 43 4c 5f 56 45 52 tclstub$(TCL_VER
91e0: 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a SION).lib.!else.
91f0: 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f TCLSTUBLIB.= $(_
9200: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
9210: 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 74 ILDDIRTOP)\tclst
9220: 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 ub.lib.!endif.TC
9230: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c LIMPLIB.= $(_TCL
9240: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
9250: 44 49 52 54 4f 50 29 5c 74 63 6c 24 28 54 43 4c DIRTOP)\tcl$(TCL
9260: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a _VERSION)$(SUFX:
9270: 74 3d 29 2e 6c 69 62 0a 23 20 57 68 65 6e 20 62 t=).lib.# When b
9280: 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f uilding extensio
9290: 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 ns, may be linki
92a0: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 74 ng against Tcl t
92b0: 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 hat does not add
92c0: 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 65 .# "t" suffix (e
92d0: 2e 67 2e 20 38 2e 35 20 6f 72 20 38 2e 37 29 2e .g. 8.5 or 8.7).
92e0: 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e If lib not foun
92f0: 64 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 d check for that
9300: 20 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 possibility..!i
9310: 66 20 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 f !exist("$(TCLI
9320: 4d 50 4c 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c MPLIB)").TCLIMPL
9330: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9340: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
9350: 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 P)\tcl$(TCL_VERS
9360: 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e ION)t$(SUFX:t=).
9370: 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c lib.!endif.TCL_L
9380: 49 42 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 IBRARY.= $(_TCLD
9390: 49 52 29 5c 6c 69 62 72 61 72 79 0a 54 43 4c 52 IR)\library.TCLR
93a0: 45 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 EGLIB.= $(_TCLDI
93b0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
93c0: 52 54 4f 50 29 5c 74 63 6c 72 65 67 31 33 24 28 RTOP)\tclreg13$(
93d0: 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c SUFX:t=).lib.TCL
93e0: 44 44 45 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 DDELIB.= $(_TCLD
93f0: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9400: 49 52 54 4f 50 29 5c 74 63 6c 64 64 65 31 34 24 IRTOP)\tcldde14$
9410: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 (SUFX:t=).lib.TC
9420: 4c 53 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f LSCRIPTZIP.= $(_
9430: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
9440: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 43 4c ILDDIRTOP)\$(TCL
9450: 5f 5a 49 50 5f 46 49 4c 45 29 0a 54 43 4c 54 4f _ZIP_FILE).TCLTO
9460: 4f 4c 53 44 49 52 09 3d 20 24 28 5f 54 43 4c 44 OLSDIR.= $(_TCLD
9470: 49 52 29 5c 74 6f 6f 6c 73 0a 54 43 4c 5f 49 4e IR)\tools.TCL_IN
9480: 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 28 5f 54 CLUDES.= -I"$(_T
9490: 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 CLDIR)\generic"
94a0: 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 -I"$(_TCLDIR)\wi
94b0: 6e 22 0a 0a 21 65 6e 64 69 66 20 23 20 54 43 4c n"..!endif # TCL
94c0: 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 21 24 28 INSTALL..!if !$(
94d0: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 26 26 STATIC_BUILD) &&
94e0: 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f "$(TCL_BUILD_FO
94f0: 52 29 22 20 3d 3d 20 22 38 22 0a 74 63 6c 6c 69 R)" == "8".tclli
9500: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
9510: 49 42 29 22 0a 21 65 6c 73 65 0a 74 63 6c 6c 69 IB)".!else.tclli
9520: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
9530: 49 42 29 22 20 22 24 28 54 43 4c 49 4d 50 4c 49 IB)" "$(TCLIMPLI
9540: 42 29 22 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 B)".!endif..!end
9550: 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 43 4c if # $(DOING_TCL
9560: 29 0a 0a 23 20 57 65 20 6e 65 65 64 20 61 20 74 )..# We need a t
9570: 63 6c 73 68 20 74 68 61 74 20 77 69 6c 6c 20 72 clsh that will r
9580: 75 6e 20 6f 6e 20 74 68 65 20 68 6f 73 74 20 6d un on the host m
9590: 61 63 68 69 6e 65 20 61 73 20 70 61 72 74 20 6f achine as part o
95a0: 66 20 74 68 65 20 62 75 69 6c 64 2e 0a 23 20 49 f the build..# I
95b0: 58 38 36 20 72 75 6e 73 20 6f 6e 20 61 6c 6c 20 X86 runs on all
95c0: 61 72 63 68 69 74 65 63 74 75 72 65 73 2e 0a 21 architectures..!
95d0: 69 66 6e 64 65 66 20 54 43 4c 53 48 5f 4e 41 54 ifndef TCLSH_NAT
95e0: 49 56 45 0a 21 69 66 20 22 24 28 4d 41 43 48 49 IVE.!if "$(MACHI
95f0: 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 20 7c NE)" == "IX86" |
9600: 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d | "$(MACHINE)" =
9610: 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 43 48 = "$(NATIVE_ARCH
9620: 29 22 0a 54 43 4c 53 48 5f 4e 41 54 49 56 45 09 )".TCLSH_NATIVE.
9630: 3d 20 24 28 54 43 4c 53 48 29 0a 21 65 6c 73 65 = $(TCLSH).!else
9640: 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 73 74 .!error You must
9650: 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 explicitly set
9660: 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 6f 72 TCLSH_NATIVE for
9670: 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 cross-compilati
9680: 6f 6e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 on.!endif.!endif
9690: 0a 0a 23 20 44 6f 20 74 68 65 20 73 61 6d 65 20 ..# Do the same
96a0: 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20 65 78 for Tk and Tk ex
96b0: 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 20 72 65 tensions that re
96c0: 71 75 69 72 65 20 74 68 65 20 54 6b 20 6c 69 62 quire the Tk lib
96d0: 72 61 72 69 65 73 0a 21 69 66 20 24 28 44 4f 49 raries.!if $(DOI
96e0: 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45 45 44 NG_TK) || $(NEED
96f0: 5f 54 4b 29 0a 57 49 53 48 4e 41 4d 45 50 52 45 _TK).WISHNAMEPRE
9700: 46 49 58 20 3d 20 77 69 73 68 0a 57 49 53 48 4e FIX = wish.WISHN
9710: 41 4d 45 20 3d 20 24 28 57 49 53 48 4e 41 4d 45 AME = $(WISHNAME
9720: 50 52 45 46 49 58 29 24 28 54 4b 5f 56 45 52 53 PREFIX)$(TK_VERS
9730: 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 65 0a ION)$(SUFX).exe.
9740: 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 74 6b 24 TKLIBNAME8.= tk$
9750: 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 (TK_VERSION)$(SU
9760: 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 4c 49 42 FX).$(EXT).TKLIB
9770: 4e 41 4d 45 39 09 3d 20 74 63 6c 39 74 6b 24 28 NAME9.= tcl9tk$(
9780: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
9790: 58 29 2e 24 28 45 58 54 29 0a 21 69 66 20 24 28 X).$(EXT).!if $(
97a0: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
97b0: 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 54 43 N) == 8 || "$(TC
97c0: 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d L_BUILD_FOR)" ==
97d0: 20 22 38 22 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d "8".TKLIBNAME.=
97e0: 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 tk$(TK_VERSION)
97f0: 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 $(SUFX).$(EXT).T
9800: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b KIMPLIBNAME.= tk
9810: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
9820: 55 46 58 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 UFX).lib.!else.T
9830: 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 KLIBNAME.= tcl9t
9840: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9850: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 49 SUFX).$(EXT).TKI
9860: 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 MPLIBNAME.= tcl9
9870: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9880: 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6e 64 69 (SUFX).lib.!endi
9890: 66 0a 21 69 66 20 24 28 54 4b 5f 4d 41 4a 4f 52 f.!if $(TK_MAJOR
98a0: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 _VERSION) == 8.T
98b0: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 KSTUBLIBNAME.= t
98c0: 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 53 49 4f kstub$(TK_VERSIO
98d0: 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 4b 53 N).lib.!else.TKS
98e0: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 73 TUBLIBNAME.= tks
98f0: 74 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a tub.lib.!endif..
9900: 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a !if $(DOING_TK).
9910: 57 49 53 48 09 09 3d 20 24 28 4f 55 54 5f 44 49 WISH..= $(OUT_DI
9920: 52 29 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 R)\$(WISHNAME).T
9930: 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 KSTUBLIB.= $(OUT
9940: 5f 44 49 52 29 5c 24 28 54 4b 53 54 55 42 4c 49 _DIR)\$(TKSTUBLI
9950: 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 42 09 BNAME).TKIMPLIB.
9960: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
9970: 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 54 4b 4c KIMPLIBNAME).TKL
9980: 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 IB..= $(OUT_DIR)
9990: 5c 24 28 54 4b 4c 49 42 4e 41 4d 45 29 0a 54 4b \$(TKLIBNAME).TK
99a0: 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 _INCLUDES =
99b0: 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 20 2d -I"$(WIN_DIR)" -
99c0: 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 I"$(GENERICDIR)"
99d0: 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 .TKSCRIPTZIP
99e0: 20 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 = $(OUT_DIR)\$(
99f0: 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 65 TK_ZIP_FILE)..!e
9a00: 6c 73 65 20 23 20 65 66 66 65 63 74 69 76 65 6c lse # effectivel
9a10: 79 20 4e 45 45 44 5f 54 4b 0a 0a 21 69 66 20 24 y NEED_TK..!if $
9a20: 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 (TKINSTALL) # Bu
9a30: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 69 ilding against i
9a40: 6e 73 74 61 6c 6c 65 64 20 54 6b 0a 57 49 53 48 nstalled Tk.WISH
9a50: 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 62 69 ..= $(_TKDIR)\bi
9a60: 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 4b n\$(WISHNAME).TK
9a70: 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 4b 44 STUBLIB.= $(_TKD
9a80: 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 54 55 42 IR)\lib\$(TKSTUB
9a90: 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 LIBNAME).TKIMPLI
9aa0: 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 B.= $(_TKDIR)\li
9ab0: 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 b\$(TKIMPLIBNAME
9ac0: 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e ).# When buildin
9ad0: 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 g extensions, ma
9ae0: 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 y be linking aga
9af0: 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 6f 65 inst Tk that doe
9b00: 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 22 20 s not add.# "t"
9b10: 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 35 suffix (e.g. 8.5
9b20: 20 6f 72 20 38 2e 37 29 2e 20 49 66 20 6c 69 62 or 8.7). If lib
9b30: 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b not found check
9b40: 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 for that possib
9b50: 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 69 73 ility..!if !exis
9b60: 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 t("$(TKIMPLIB)")
9b70: 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 .TKIMPLIBNAME.=
9b80: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9b90: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b (SUFX:t=).lib.TK
9ba0: 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 IMPLIB.= $(_TKDI
9bb0: 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 R)\lib\$(TKIMPLI
9bc0: 42 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a 54 4b BNAME).!endif.TK
9bd0: 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 _INCLUDES =
9be0: 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 69 6e 63 -I"$(_TKDIR)\inc
9bf0: 6c 75 64 65 22 0a 54 4b 53 43 52 49 50 54 5a 49 lude".TKSCRIPTZI
9c00: 50 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 P = $(_TKDIR
9c10: 29 5c 6c 69 62 5c 24 28 54 4b 5f 5a 49 50 5f 46 )\lib\$(TK_ZIP_F
9c20: 49 4c 45 29 0a 0a 21 65 6c 73 65 20 23 20 42 75 ILE)..!else # Bu
9c30: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 ilding against T
9c40: 6b 20 73 6f 75 72 63 65 73 0a 0a 57 49 53 48 09 k sources..WISH.
9c50: 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e .= $(_TKDIR)\win
9c60: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
9c70: 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 4b 53 54 $(WISHNAME).TKST
9c80: 55 42 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 UBLIB.= $(_TKDIR
9c90: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
9ca0: 54 4f 50 29 5c 24 28 54 4b 53 54 55 42 4c 49 42 TOP)\$(TKSTUBLIB
9cb0: 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 42 09 3d NAME).TKIMPLIB.=
9cc0: 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 $(_TKDIR)\win\$
9cd0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 (BUILDDIRTOP)\$(
9ce0: 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 23 20 TKIMPLIBNAME).#
9cf0: 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 When building ex
9d00: 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 79 20 62 65 tensions, may be
9d10: 20 6c 69 6e 6b 69 6e 67 20 61 67 61 69 6e 73 74 linking against
9d20: 20 54 6b 20 74 68 61 74 20 64 6f 65 73 20 6e 6f Tk that does no
9d30: 74 20 61 64 64 0a 23 20 22 74 22 20 73 75 66 66 t add.# "t" suff
9d40: 69 78 20 28 65 2e 67 2e 20 38 2e 35 20 6f 72 20 ix (e.g. 8.5 or
9d50: 38 2e 37 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 8.7). If lib not
9d60: 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 found check for
9d70: 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 that possibilit
9d80: 79 2e 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 y..!if !exist("$
9d90: 28 54 4b 49 4d 50 4c 49 42 29 22 29 0a 54 4b 49 (TKIMPLIB)").TKI
9da0: 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 MPLIBNAME.= tk$(
9db0: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
9dc0: 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b 49 4d 50 4c X:t=).lib.TKIMPL
9dd0: 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 77 IB.= $(_TKDIR)\w
9de0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
9df0: 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 )\$(TKIMPLIBNAME
9e00: 29 0a 21 65 6e 64 69 66 0a 54 4b 5f 49 4e 43 4c ).!endif.TK_INCL
9e10: 55 44 45 53 20 20 20 20 20 3d 20 2d 49 22 24 28 UDES = -I"$(
9e20: 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 69 63 22 _TKDIR)\generic"
9e30: 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 77 69 -I"$(_TKDIR)\wi
9e40: 6e 22 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c n" -I"$(_TKDIR)\
9e50: 78 6c 69 62 22 0a 54 4b 53 43 52 49 50 54 5a 49 xlib".TKSCRIPTZI
9e60: 50 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 P = $(_TKDIR
9e70: 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 )\win\$(BUILDDIR
9e80: 54 4f 50 29 5c 24 28 54 4b 5f 5a 49 50 5f 46 49 TOP)\$(TK_ZIP_FI
9e90: 4c 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 4b LE)..!endif # TK
9ea0: 49 4e 53 54 41 4c 4c 0a 0a 74 6b 6c 69 62 73 20 INSTALL..tklibs
9eb0: 3d 20 22 24 28 54 4b 53 54 55 42 4c 49 42 29 22 = "$(TKSTUBLIB)"
9ec0: 20 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 0a 0a "$(TKIMPLIB)"..
9ed0: 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 !endif # $(DOING
9ee0: 5f 54 4b 29 0a 21 65 6e 64 69 66 20 23 20 24 28 _TK).!endif # $(
9ef0: 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e DOING_TK) || $(N
9f00: 45 45 44 5f 54 4b 29 0a 0a 23 20 56 61 72 69 6f EED_TK)..# Vario
9f10: 75 73 20 6f 75 74 70 75 74 20 70 61 74 68 73 0a us output paths.
9f20: 50 52 4a 49 4d 50 4c 49 42 09 3d 20 24 28 4f 55 PRJIMPLIB.= $(OU
9f30: 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 T_DIR)\$(PROJECT
9f40: 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 )$(VERSION)$(SUF
9f50: 58 29 2e 6c 69 62 0a 50 52 4a 4c 49 42 4e 41 4d X).lib.PRJLIBNAM
9f60: 45 38 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 E8.= $(PROJECT)$
9f70: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 (VERSION)$(SUFX)
9f80: 2e 24 28 45 58 54 29 0a 23 20 45 76 65 6e 20 77 .$(EXT).# Even w
9f90: 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 61 67 61 hen building aga
9fa0: 69 6e 73 74 20 54 63 6c 20 38 2c 20 50 52 4a 4c inst Tcl 8, PRJL
9fb0: 49 42 4e 41 4d 45 39 20 6d 75 73 74 20 6e 6f 74 IBNAME9 must not
9fc0: 20 68 61 76 65 20 22 74 22 0a 50 52 4a 4c 49 42 have "t".PRJLIB
9fd0: 4e 41 4d 45 39 09 3d 20 74 63 6c 39 24 28 50 52 NAME9.= tcl9$(PR
9fe0: 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 OJECT)$(VERSION)
9ff0: 24 28 53 55 46 58 3a 74 3d 29 2e 24 28 45 58 54 $(SUFX:t=).$(EXT
a000: 29 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f ).!if $(TCL_MAJO
a010: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 R_VERSION) == 8
a020: 7c 7c 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f || "$(TCL_BUILD_
a030: 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a 50 52 4a FOR)" == "8".PRJ
a040: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 4a 4c LIBNAME.= $(PRJL
a050: 49 42 4e 41 4d 45 38 29 0a 21 65 6c 73 65 0a 50 IBNAME8).!else.P
a060: 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 RJLIBNAME.= $(PR
a070: 4a 4c 49 42 4e 41 4d 45 39 29 0a 21 65 6e 64 69 JLIBNAME9).!endi
a080: 66 0a 50 52 4a 4c 49 42 09 09 3d 20 24 28 4f 55 f.PRJLIB..= $(OU
a090: 54 5f 44 49 52 29 5c 24 28 50 52 4a 4c 49 42 4e T_DIR)\$(PRJLIBN
a0a0: 41 4d 45 29 0a 0a 21 69 66 20 24 28 54 43 4c 5f AME)..!if $(TCL_
a0b0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
a0c0: 3d 20 38 0a 50 52 4a 53 54 55 42 4c 49 42 4e 41 = 8.PRJSTUBLIBNA
a0d0: 4d 45 09 3d 20 24 28 53 54 55 42 50 52 45 46 49 ME.= $(STUBPREFI
a0e0: 58 29 24 28 56 45 52 53 49 4f 4e 29 2e 6c 69 62 X)$(VERSION).lib
a0f0: 0a 21 65 6c 73 65 0a 50 52 4a 53 54 55 42 4c 49 .!else.PRJSTUBLI
a100: 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52 BNAME.= $(STUBPR
a110: 45 46 49 58 29 2e 6c 69 62 0a 21 65 6e 64 69 66 EFIX).lib.!endif
a120: 0a 50 52 4a 53 54 55 42 4c 49 42 09 3d 20 24 28 .PRJSTUBLIB.= $(
a130: 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4a 53 54 OUT_DIR)\$(PRJST
a140: 55 42 4c 49 42 4e 41 4d 45 29 0a 0a 23 20 49 66 UBLIBNAME)..# If
a150: 20 65 78 74 65 6e 73 69 6f 6e 20 70 61 72 65 6e extension paren
a160: 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 20 6e t makefile has n
a170: 6f 74 20 64 65 66 69 6e 65 64 20 61 20 72 65 73 ot defined a res
a180: 6f 75 72 63 65 20 64 65 66 69 6e 69 74 69 6f 6e ource definition
a190: 20 66 69 6c 65 2c 0a 23 20 77 65 20 77 69 6c 6c file,.# we will
a1a0: 20 67 65 6e 65 72 61 74 65 20 6f 6e 65 20 66 72 generate one fr
a1b0: 6f 6d 20 73 74 61 6e 64 61 72 64 20 74 65 6d 70 om standard temp
a1c0: 6c 61 74 65 2e 0a 21 69 66 20 21 24 28 44 4f 49 late..!if !$(DOI
a1d0: 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 28 44 4f NG_TCL) && !$(DO
a1e0: 49 4e 47 5f 54 4b 29 20 26 26 20 21 24 28 53 54 ING_TK) && !$(ST
a1f0: 41 54 49 43 5f 42 55 49 4c 44 29 0a 21 69 66 64 ATIC_BUILD).!ifd
a200: 65 66 20 52 43 46 49 4c 45 0a 52 45 53 46 49 4c ef RCFILE.RESFIL
a210: 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 E = $(TMP_DIR)\$
a220: 28 52 43 46 49 4c 45 3a 2e 72 63 3d 2e 72 65 73 (RCFILE:.rc=.res
a230: 29 0a 21 65 6c 73 65 0a 52 45 53 46 49 4c 45 20 ).!else.RESFILE
a240: 3d 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 = $(TMP_DIR)\$(P
a250: 52 4f 4a 45 43 54 29 2e 72 65 73 0a 21 65 6e 64 ROJECT).res.!end
a260: 69 66 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 if.!endif..#####
a270: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a280: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a290: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a2a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 ##############.#
a2b0: 20 31 31 2e 20 43 6f 6e 73 74 72 75 63 74 20 74 11. Construct t
a2c0: 68 65 20 70 61 74 68 73 20 66 6f 72 20 74 68 65 he paths for the
a2d0: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 64 69 installation di
a2e0: 72 65 63 74 6f 72 69 65 73 0a 23 20 54 68 65 20 rectories.# The
a2f0: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
a300: 20 67 65 74 20 64 65 66 69 6e 65 64 20 69 6e 20 get defined in
a310: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 this section:.#
a320: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 LIB_INSTALL_DIR
a330: 2d 20 77 68 65 72 65 20 6c 69 62 72 61 72 69 65 - where librarie
a340: 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 s should be inst
a350: 61 6c 6c 65 64 0a 23 20 42 49 4e 5f 49 4e 53 54 alled.# BIN_INST
a360: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a370: 74 68 65 20 65 78 65 63 75 74 61 62 6c 65 73 20 the executables
a380: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a390: 6c 65 64 0a 23 20 44 4f 43 5f 49 4e 53 54 41 4c led.# DOC_INSTAL
a3a0: 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 64 6f L_DIR - where do
a3b0: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 73 68 6f 75 cumentation shou
a3c0: 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a ld be installed.
a3d0: 23 20 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c # SCRIPT_INSTALL
a3e0: 5f 44 49 52 20 2d 20 77 68 65 72 65 20 73 63 72 _DIR - where scr
a3f0: 69 70 74 73 20 73 68 6f 75 6c 64 20 62 65 20 69 ipts should be i
a400: 6e 73 74 61 6c 6c 65 64 0a 23 20 49 4e 43 4c 55 nstalled.# INCLU
a410: 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d DE_INSTALL_DIR -
a420: 20 77 68 65 72 65 20 43 20 69 6e 63 6c 75 64 65 where C include
a430: 20 66 69 6c 65 73 20 73 68 6f 75 6c 64 20 62 65 files should be
a440: 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 44 45 4d installed.# DEM
a450: 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 O_INSTALL_DIR -
a460: 77 68 65 72 65 20 64 65 6d 6f 73 20 73 68 6f 75 where demos shou
a470: 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a ld be installed.
a480: 23 20 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 # PRJ_INSTALL_DI
a490: 52 20 2d 20 77 68 65 72 65 20 70 61 63 6b 61 67 R - where packag
a4a0: 65 20 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c e will be instal
a4b0: 6c 65 64 20 28 6e 6f 74 20 73 65 74 20 66 6f 72 led (not set for
a4c0: 20 54 63 6c 20 61 6e 64 20 54 6b 29 0a 0a 21 69 Tcl and Tk)..!i
a4d0: 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 7c f $(DOING_TCL) |
a4e0: 7c 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 4c 49 | $(DOING_TK).LI
a4f0: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d B_INSTALL_DIR..=
a500: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c $(_INSTALLDIR)\
a510: 6c 69 62 0a 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f lib.BIN_INSTALL_
a520: 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c DIR..= $(_INSTAL
a530: 4c 44 49 52 29 5c 62 69 6e 0a 44 4f 43 5f 49 4e LDIR)\bin.DOC_IN
a540: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f STALL_DIR..= $(_
a550: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 64 6f 63 0a INSTALLDIR)\doc.
a560: 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 !if $(DOING_TCL)
a570: 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f .SCRIPT_INSTALL_
a580: 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c DIR.= $(_INSTALL
a590: 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 4f 4a 45 DIR)\lib\$(PROJE
a5a0: 43 54 29 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 CT)$(TCL_MAJOR_V
a5b0: 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 ERSION).$(TCL_MI
a5c0: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 4d 4f 44 NOR_VERSION).MOD
a5d0: 55 4c 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 ULE_INSTALL_DIR.
a5e0: 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 = $(_INSTALLDIR)
a5f0: 5c 6c 69 62 5c 74 63 6c 24 28 54 43 4c 5f 4d 41 \lib\tcl$(TCL_MA
a600: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 21 65 6c JOR_VERSION).!el
a610: 73 65 20 23 20 44 4f 49 4e 47 5f 54 4b 0a 53 43 se # DOING_TK.SC
a620: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
a630: 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 .= $(_INSTALLDIR
a640: 29 5c 6c 69 62 5c 24 28 50 52 4f 4a 45 43 54 29 )\lib\$(PROJECT)
a650: 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 $(TK_MAJOR_VERSI
a660: 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 ON).$(TK_MINOR_V
a670: 45 52 53 49 4f 4e 29 0a 21 65 6e 64 69 66 0a 44 ERSION).!endif.D
a680: 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 EMO_INSTALL_DIR.
a690: 3d 20 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 = $(SCRIPT_INSTA
a6a0: 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 0a 49 4e LL_DIR)\demos.IN
a6b0: 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 CLUDE_INSTALL_DI
a6c0: 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 R.= $(_INSTALLDI
a6d0: 52 29 5c 69 6e 63 6c 75 64 65 0a 0a 21 65 6c 73 R)\include..!els
a6e0: 65 20 23 20 65 78 74 65 6e 73 69 6f 6e 20 6f 74 e # extension ot
a6f0: 68 65 72 20 74 68 61 6e 20 54 6b 0a 0a 50 52 4a her than Tk..PRJ
a700: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 20 20 20 _INSTALL_DIR
a710: 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c = $(_INSTAL
a720: 4c 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 LDIR)\$(PROJECT)
a730: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 0a 21 69 $(DOTVERSION).!i
a740: 66 20 24 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 f $(MULTIPLATFOR
a750: 4d 5f 49 4e 53 54 41 4c 4c 29 0a 4c 49 42 5f 49 M_INSTALL).LIB_I
a760: 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 NSTALL_DIR..= $(
a770: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 PRJ_INSTALL_DIR)
a780: 5c 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e \$(PLATFORM_IDEN
a790: 54 49 46 59 29 0a 42 49 4e 5f 49 4e 53 54 41 4c TIFY).BIN_INSTAL
a7a0: 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 L_DIR..= $(PRJ_I
a7b0: 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 24 28 50 4c NSTALL_DIR)\$(PL
a7c0: 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 ATFORM_IDENTIFY)
a7d0: 0a 21 65 6c 73 65 0a 4c 49 42 5f 49 4e 53 54 41 .!else.LIB_INSTA
a7e0: 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f LL_DIR..= $(PRJ_
a7f0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 42 49 4e INSTALL_DIR).BIN
a800: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _INSTALL_DIR..=
a810: 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(PRJ_INSTALL_DI
a820: 52 29 0a 21 65 6e 64 69 66 0a 44 4f 43 5f 49 4e R).!endif.DOC_IN
a830: 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 50 STALL_DIR..= $(P
a840: 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a RJ_INSTALL_DIR).
a850: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
a860: 49 52 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 IR.= $(PRJ_INSTA
a870: 4c 4c 5f 44 49 52 29 0a 44 45 4d 4f 5f 49 4e 53 LL_DIR).DEMO_INS
a880: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 50 52 4a TALL_DIR.= $(PRJ
a890: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 64 65 _INSTALL_DIR)\de
a8a0: 6d 6f 73 0a 49 4e 43 4c 55 44 45 5f 49 4e 53 54 mos.INCLUDE_INST
a8b0: 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 ALL_DIR.= $(_INS
a8c0: 54 41 4c 4c 44 49 52 29 5c 2e 2e 5c 69 6e 63 6c TALLDIR)\..\incl
a8d0: 75 64 65 0a 0a 21 65 6e 64 69 66 0a 0a 23 23 23 ude..!endif..###
a8e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a8f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a900: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a910: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a920: 0a 23 20 31 32 2e 20 53 65 74 20 75 70 20 61 63 .# 12. Set up ac
a930: 74 75 61 6c 20 6f 70 74 69 6f 6e 73 20 74 6f 20 tual options to
a940: 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 be passed to the
a950: 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c 69 compiler and li
a960: 6e 6b 65 72 0a 23 20 4e 6f 77 20 77 65 20 68 61 nker.# Now we ha
a970: 76 65 20 61 6c 6c 20 74 68 65 20 69 6e 66 6f 72 ve all the infor
a980: 6d 61 74 69 6f 6e 20 77 65 20 6e 65 65 64 2c 20 mation we need,
a990: 73 65 74 20 75 70 20 74 68 65 20 61 63 74 75 61 set up the actua
a9a0: 6c 20 66 6c 61 67 73 20 61 6e 64 0a 23 20 6f 70 l flags and.# op
a9b0: 74 69 6f 6e 73 20 74 68 61 74 20 77 65 20 77 69 tions that we wi
a9c0: 6c 6c 20 70 61 73 73 20 74 6f 20 74 68 65 20 63 ll pass to the c
a9d0: 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b ompiler and link
a9e0: 65 72 2e 20 54 68 65 20 6d 61 69 6e 0a 23 20 6d er. The main.# m
a9f0: 61 6b 65 66 69 6c 65 20 73 68 6f 75 6c 64 20 75 akefile should u
aa00: 73 65 20 74 68 65 73 65 20 69 6e 20 63 6f 6d 62 se these in comb
aa10: 69 6e 61 74 69 6f 6e 20 77 69 74 68 20 77 68 61 ination with wha
aa20: 74 65 76 65 72 20 6f 74 68 65 72 20 66 6c 61 67 tever other flag
aa30: 73 0a 23 20 61 6e 64 20 73 77 69 74 63 68 65 73 s.# and switches
aa40: 20 61 72 65 20 73 70 65 63 69 66 69 63 20 74 6f are specific to
aa50: 20 69 74 2e 0a 23 20 54 68 65 20 66 6f 6c 6c 6f it..# The follo
aa60: 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 wing macros are
aa70: 64 65 66 69 6e 65 64 2c 20 6e 61 6d 65 73 20 61 defined, names a
aa80: 72 65 20 66 6f 72 20 68 69 73 74 6f 72 69 63 61 re for historica
aa90: 6c 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 3a l compatibility:
aaa0: 0a 23 20 4f 50 54 44 45 46 49 4e 45 53 20 2d 20 .# OPTDEFINES -
aab0: 2f 44 78 78 78 20 43 20 6d 61 63 72 6f 20 66 6c /Dxxx C macro fl
aac0: 61 67 73 20 62 61 73 65 64 20 6f 6e 20 75 73 65 ags based on use
aad0: 72 2d 73 70 65 63 69 66 69 65 64 20 4f 50 54 53 r-specified OPTS
aae0: 0a 23 20 43 4f 4d 50 49 4c 45 52 46 4c 41 47 53 .# COMPILERFLAGS
aaf0: 20 2d 20 2f 44 78 78 78 20 43 20 6d 61 63 72 6f - /Dxxx C macro
ab00: 20 66 6c 61 67 73 20 69 6e 64 65 70 65 6e 64 65 flags independe
ab10: 6e 74 20 6f 66 20 61 6e 79 20 63 6f 6e 66 69 67 nt of any config
ab20: 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 0a uration options.
ab30: 23 20 63 72 74 20 2d 20 43 6f 6d 70 69 6c 65 72 # crt - Compiler
ab40: 20 73 77 69 74 63 68 20 74 68 61 74 20 73 65 6c switch that sel
ab50: 65 63 74 73 20 74 68 65 20 61 70 70 72 6f 70 72 ects the appropr
ab60: 69 61 74 65 20 43 20 72 75 6e 74 69 6d 65 0a 23 iate C runtime.#
ab70: 20 63 64 65 62 75 67 20 2d 20 43 6f 6d 70 69 6c cdebug - Compil
ab80: 65 72 20 73 77 69 74 63 68 65 73 20 72 65 6c 61 er switches rela
ab90: 74 65 64 20 74 6f 20 64 65 62 75 67 20 41 4e 44 ted to debug AND
aba0: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 0a 23 optimizations.#
abb0: 20 63 77 61 72 6e 20 2d 20 43 6f 6d 70 69 6c 65 cwarn - Compile
abc0: 72 20 73 77 69 74 63 68 65 73 20 74 68 61 74 20 r switches that
abd0: 73 65 74 20 77 61 72 6e 69 6e 67 20 6c 65 76 65 set warning leve
abe0: 6c 73 0a 23 20 63 66 6c 61 67 73 20 2d 20 63 6f ls.# cflags - co
abf0: 6d 70 6c 65 74 65 20 63 6f 6d 70 69 6c 65 72 20 mplete compiler
ac00: 73 77 69 74 63 68 65 73 20 28 73 75 62 73 75 6d switches (subsum
ac10: 65 73 20 63 64 65 62 75 67 20 61 6e 64 20 63 77 es cdebug and cw
ac20: 61 72 6e 29 0a 23 20 6c 64 65 62 75 67 20 2d 20 arn).# ldebug -
ac30: 4c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 Linker switches
ac40: 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 64 65 62 75 controlling debu
ac50: 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 6e g information an
ac60: 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 0a 23 d optimization.#
ac70: 20 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 lflags - comple
ac80: 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 te linker switch
ac90: 65 73 20 28 73 75 62 73 75 6d 65 73 20 6c 64 65 es (subsumes lde
aca0: 62 75 67 29 20 65 78 63 65 70 74 20 73 75 62 73 bug) except subs
acb0: 79 73 74 65 6d 20 74 79 70 65 0a 23 20 64 6c 6c ystem type.# dll
acc0: 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 lflags - complet
acd0: 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 e linker switche
ace0: 73 20 74 6f 20 62 75 69 6c 64 20 44 4c 4c 73 20 s to build DLLs
acf0: 28 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 (subsumes lflags
ad00: 29 0a 23 20 63 6f 6e 6c 66 6c 61 67 73 20 2d 20 ).# conlflags -
ad10: 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 complete linker
ad20: 73 77 69 74 63 68 65 73 20 66 6f 72 20 63 6f 6e switches for con
ad30: 73 6f 6c 65 20 70 72 6f 67 72 61 6d 20 28 73 75 sole program (su
ad40: 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 0a 23 bsumes lflags).#
ad50: 20 67 75 69 6c 66 6c 61 67 73 20 2d 20 63 6f 6d guilflags - com
ad60: 70 6c 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 plete linker swi
ad70: 74 63 68 65 73 20 66 6f 72 20 47 55 49 20 70 72 tches for GUI pr
ad80: 6f 67 72 61 6d 20 28 73 75 62 73 75 6d 65 73 20 ogram (subsumes
ad90: 6c 66 6c 61 67 73 29 0a 23 20 62 61 73 65 6c 69 lflags).# baseli
ada0: 62 73 20 2d 20 6d 69 6e 69 6d 75 6d 20 57 69 6e bs - minimum Win
adb0: 64 6f 77 73 20 6c 69 62 72 61 72 69 65 73 20 72 dows libraries r
adc0: 65 71 75 69 72 65 64 2e 20 50 61 72 65 6e 74 20 equired. Parent
add0: 6d 61 6b 65 66 69 6c 65 20 63 61 6e 0a 23 20 20 makefile can.#
ade0: 20 20 64 65 66 69 6e 65 20 50 52 4a 5f 4c 49 42 define PRJ_LIB
adf0: 53 20 62 65 66 6f 72 65 20 69 6e 63 6c 75 64 69 S before includi
ae00: 6e 67 20 72 75 6c 65 73 2e 72 63 20 69 66 20 61 ng rules.rc if a
ae10: 64 64 69 74 69 6f 6e 61 6c 20 6c 69 62 73 20 61 dditional libs a
ae20: 72 65 20 6e 65 65 64 65 64 0a 0a 4f 50 54 44 45 re needed..OPTDE
ae30: 46 49 4e 45 53 09 3d 20 2f 44 53 54 44 43 5f 48 FINES.= /DSTDC_H
ae40: 45 41 44 45 52 53 20 2f 44 55 53 45 5f 4e 4d 41 EADERS /DUSE_NMA
ae50: 4b 45 3d 31 0a 21 69 66 20 24 28 56 43 56 45 52 KE=1.!if $(VCVER
ae60: 53 49 4f 4e 29 20 3e 20 31 36 30 30 0a 4f 50 54 SION) > 1600.OPT
ae70: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
ae80: 45 46 49 4e 45 53 29 20 2f 44 48 41 56 45 5f 53 EFINES) /DHAVE_S
ae90: 54 44 49 4e 54 5f 48 3d 31 0a 21 65 6c 73 65 0a TDINT_H=1.!else.
aea0: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
aeb0: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 4d 50 5f PTDEFINES) /DMP_
aec0: 4e 4f 5f 53 54 44 49 4e 54 3d 31 0a 21 65 6e 64 NO_STDINT=1.!end
aed0: 69 66 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 if.!if $(VCVERSI
aee0: 4f 4e 29 20 3e 3d 20 31 38 30 30 0a 4f 50 54 44 ON) >= 1800.OPTD
aef0: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
af00: 46 49 4e 45 53 29 20 2f 44 48 41 56 45 5f 49 4e FINES) /DHAVE_IN
af10: 54 54 59 50 45 53 5f 48 3d 31 20 2f 44 48 41 56 TTYPES_H=1 /DHAV
af20: 45 5f 53 54 44 42 4f 4f 4c 5f 48 3d 31 0a 21 65 E_STDBOOL_H=1.!e
af30: 6e 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c 5f ndif..!if $(TCL_
af40: 4d 45 4d 5f 44 45 42 55 47 29 0a 4f 50 54 44 45 MEM_DEBUG).OPTDE
af50: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
af60: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4d 45 4d 5f INES) /DTCL_MEM_
af70: 44 45 42 55 47 0a 21 65 6e 64 69 66 0a 21 69 66 DEBUG.!endif.!if
af80: 20 24 28 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 $(TCL_COMPILE_D
af90: 45 42 55 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 EBUG).OPTDEFINES
afa0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
afb0: 20 2f 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 /DTCL_COMPILE_D
afc0: 45 42 55 47 20 2f 44 54 43 4c 5f 43 4f 4d 50 49 EBUG /DTCL_COMPI
afd0: 4c 45 5f 53 54 41 54 53 0a 21 65 6e 64 69 66 0a LE_STATS.!endif.
afe0: 21 69 66 20 24 28 54 43 4c 5f 54 48 52 45 41 44 !if $(TCL_THREAD
aff0: 53 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 S) && $(TCL_VERS
b000: 49 4f 4e 29 20 3c 20 38 37 0a 4f 50 54 44 45 46 ION) < 87.OPTDEF
b010: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b020: 4e 45 53 29 20 2f 44 54 43 4c 5f 54 48 52 45 41 NES) /DTCL_THREA
b030: 44 53 3d 31 0a 21 69 66 20 24 28 55 53 45 5f 54 DS=1.!if $(USE_T
b040: 48 52 45 41 44 5f 41 4c 4c 4f 43 29 20 26 26 20 HREAD_ALLOC) &&
b050: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3c $(TCL_VERSION) <
b060: 20 38 37 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 87.OPTDEFINES.=
b070: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b080: 44 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f DUSE_THREAD_ALLO
b090: 43 3d 31 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 C=1.!endif.!endi
b0a0: 66 0a 21 69 66 20 24 28 53 54 41 54 49 43 5f 42 f.!if $(STATIC_B
b0b0: 55 49 4c 44 29 0a 4f 50 54 44 45 46 49 4e 45 53 UILD).OPTDEFINES
b0c0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b0d0: 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c 44 0a /DSTATIC_BUILD.
b0e0: 21 65 6c 73 65 69 66 20 24 28 54 43 4c 5f 56 45 !elseif $(TCL_VE
b0f0: 52 53 49 4f 4e 29 20 3e 20 38 36 0a 4f 50 54 44 RSION) > 86.OPTD
b100: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b110: 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 57 49 54 FINES) /DTCL_WIT
b120: 48 5f 45 58 54 45 52 4e 41 4c 5f 54 4f 4d 4d 41 H_EXTERNAL_TOMMA
b130: 54 48 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e TH.!if "$(MACHIN
b140: 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c E)" == "AMD64" |
b150: 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d | "$(MACHINE)" =
b160: 3d 20 22 41 52 4d 36 34 22 0a 4f 50 54 44 45 46 = "ARM64".OPTDEF
b170: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b180: 4e 45 53 29 20 2f 44 4d 50 5f 36 34 42 49 54 0a NES) /DMP_64BIT.
b190: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 !endif.!endif.!i
b1a0: 66 20 24 28 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 f $(TCL_NO_DEPRE
b1b0: 43 41 54 45 44 29 0a 4f 50 54 44 45 46 49 4e 45 CATED).OPTDEFINE
b1c0: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b1d0: 29 20 2f 44 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 ) /DTCL_NO_DEPRE
b1e0: 43 41 54 45 44 0a 21 65 6e 64 69 66 0a 0a 21 69 CATED.!endif..!i
b1f0: 66 20 24 28 55 53 45 5f 53 54 55 42 53 29 0a 23 f $(USE_STUBS).#
b200: 20 4e 6f 74 65 20 77 65 20 64 6f 20 6e 6f 74 20 Note we do not
b210: 64 65 66 69 6e 65 20 55 53 45 5f 54 43 4c 5f 53 define USE_TCL_S
b220: 54 55 42 53 20 65 76 65 6e 20 77 68 65 6e 20 62 TUBS even when b
b230: 75 69 6c 64 69 6e 67 20 74 6b 20 73 69 6e 63 65 uilding tk since
b240: 20 73 6f 6d 65 0a 23 20 74 65 73 74 20 74 61 72 some.# test tar
b250: 67 65 74 73 20 69 6e 20 74 6b 20 64 6f 20 6e 6f gets in tk do no
b260: 74 20 75 73 65 20 73 74 75 62 73 0a 21 69 66 20 t use stubs.!if
b270: 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 55 53 !$(DOING_TCL).US
b280: 45 5f 53 54 55 42 53 5f 44 45 46 53 20 20 3d 20 E_STUBS_DEFS =
b290: 2f 44 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 20 /DUSE_TCL_STUBS
b2a0: 2f 44 55 53 45 5f 54 43 4c 4f 4f 5f 53 54 55 42 /DUSE_TCLOO_STUB
b2b0: 53 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29 S.!if $(NEED_TK)
b2c0: 0a 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 20 .USE_STUBS_DEFS
b2d0: 20 3d 20 24 28 55 53 45 5f 53 54 55 42 53 5f 44 = $(USE_STUBS_D
b2e0: 45 46 53 29 20 2f 44 55 53 45 5f 54 4b 5f 53 54 EFS) /DUSE_TK_ST
b2f0: 55 42 53 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 UBS.!endif.!endi
b300: 66 0a 21 65 6e 64 69 66 20 23 20 55 53 45 5f 53 f.!endif # USE_S
b310: 54 55 42 53 0a 0a 21 69 66 20 21 24 28 44 45 42 TUBS..!if !$(DEB
b320: 55 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d UG).OPTDEFINES.=
b330: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b340: 44 4e 44 45 42 55 47 0a 21 69 66 20 24 28 4f 50 DNDEBUG.!if $(OP
b350: 54 49 4d 49 5a 49 4e 47 29 0a 4f 50 54 44 45 46 TIMIZING).OPTDEF
b360: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b370: 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f 4f NES) /DTCL_CFG_O
b380: 50 54 49 4d 49 5a 45 44 0a 21 65 6e 64 69 66 0a PTIMIZED.!endif.
b390: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 50 52 4f !endif.!if $(PRO
b3a0: 46 49 4c 45 29 0a 4f 50 54 44 45 46 49 4e 45 53 FILE).OPTDEFINES
b3b0: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b3c0: 20 2f 44 54 43 4c 5f 43 46 47 5f 50 52 4f 46 49 /DTCL_CFG_PROFI
b3d0: 4c 45 44 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 LED.!endif.!if "
b3e0: 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 $(MACHINE)" == "
b3f0: 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 AMD64" || "$(MAC
b400: 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 HINE)" == "ARM64
b410: 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ".OPTDEFINES.= $
b420: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b430: 43 4c 5f 43 46 47 5f 44 4f 36 34 42 49 54 0a 21 CL_CFG_DO64BIT.!
b440: 65 6e 64 69 66 0a 21 69 66 20 24 28 56 43 56 45 endif.!if $(VCVE
b450: 52 53 49 4f 4e 29 20 3c 20 31 33 30 30 0a 4f 50 RSION) < 1300.OP
b460: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
b470: 44 45 46 49 4e 45 53 29 20 2f 44 4e 4f 5f 53 54 DEFINES) /DNO_ST
b480: 52 54 4f 49 36 34 3d 31 0a 21 65 6e 64 69 66 0a RTOI64=1.!endif.
b490: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
b4a0: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 21 _VERSION) == 8.!
b4b0: 69 66 20 22 24 28 5f 55 53 45 5f 36 34 42 49 54 if "$(_USE_64BIT
b4c0: 5f 54 49 4d 45 5f 54 29 22 20 3d 3d 20 22 31 22 _TIME_T)" == "1"
b4d0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
b4e0: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 5f 55 OPTDEFINES) /D_U
b4f0: 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 3d SE_64BIT_TIME_T=
b500: 31 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 1.!endif.!endif.
b510: 21 69 66 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 !if "$(TCL_BUILD
b520: 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a 4f 50 _FOR)" == "8".OP
b530: 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 TDEFINES.= $(OPT
b540: 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 4d DEFINES) /DTCL_M
b550: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 3d 38 0a 21 AJOR_VERSION=8.!
b560: 65 6e 64 69 66 0a 21 69 66 20 22 24 28 54 4b 5f endif.!if "$(TK_
b570: 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 BUILD_FOR)" == "
b580: 38 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 8".OPTDEFINES.=
b590: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
b5a0: 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e TK_MAJOR_VERSION
b5b0: 3d 38 0a 21 65 6e 64 69 66 0a 0a 23 20 4c 69 6b =8.!endif..# Lik
b5c0: 65 20 74 68 65 20 54 45 41 20 73 79 73 74 65 6d e the TEA system
b5d0: 20 6f 6e 6c 79 20 73 65 74 20 74 68 69 73 20 6e only set this n
b5e0: 6f 6e 20 65 6d 70 74 79 20 66 6f 72 20 6e 6f 6e on empty for non
b5f0: 2d 54 6b 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 -Tk extensions.#
b600: 20 4e 6f 74 65 3a 20 73 6f 6d 65 20 65 78 74 65 Note: some exte
b610: 6e 73 69 6f 6e 73 20 75 73 65 20 50 41 43 4b 41 nsions use PACKA
b620: 47 45 5f 4e 41 4d 45 20 61 6e 64 20 6f 74 68 65 GE_NAME and othe
b630: 72 73 20 75 73 65 20 50 41 43 4b 41 47 45 5f 54 rs use PACKAGE_T
b640: 43 4c 4e 41 4d 45 0a 23 20 73 6f 20 77 65 20 70 CLNAME.# so we p
b650: 61 73 73 20 62 6f 74 68 0a 21 69 66 20 21 24 28 ass both.!if !$(
b660: 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 DOING_TCL) && !$
b670: 28 44 4f 49 4e 47 5f 54 4b 29 0a 50 4b 47 4e 41 (DOING_TK).PKGNA
b680: 4d 45 46 4c 41 47 53 20 3d 20 2f 44 50 41 43 4b MEFLAGS = /DPACK
b690: 41 47 45 5f 4e 41 4d 45 3d 22 5c 22 24 28 50 52 AGE_NAME="\"$(PR
b6a0: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
b6b0: 45 29 5c 22 22 20 5c 0a 09 2f 44 50 41 43 4b 41 E)\"" \../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 09 2f 44 50 41 43 AME)\"" \../DPAC
b6f0: 4b 41 47 45 5f 56 45 52 53 49 4f 4e 3d 22 5c 22 KAGE_VERSION="\"
b700: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 22 $(DOTVERSION)\""
b710: 20 5c 0a 09 2f 44 4d 4f 44 55 4c 45 5f 53 43 4f \../DMODULE_SCO
b720: 50 45 3d 65 78 74 65 72 6e 0a 21 65 6e 64 69 66 PE=extern.!endif
b730: 0a 0a 23 20 63 72 74 20 70 69 63 6b 73 20 74 68 ..# crt picks th
b740: 65 20 43 20 72 75 6e 20 74 69 6d 65 20 62 61 73 e C run time bas
b750: 65 64 20 6f 6e 20 73 65 6c 65 63 74 65 64 20 4f ed on selected O
b760: 50 54 53 0a 21 69 66 20 24 28 4d 53 56 43 52 54 PTS.!if $(MSVCRT
b770: 29 0a 21 69 66 20 24 28 44 45 42 55 47 29 20 26 ).!if $(DEBUG) &
b780: 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 0a & !$(UNCHECKED).
b790: 63 72 74 20 3d 20 2d 4d 44 64 0a 21 65 6c 73 65 crt = -MDd.!else
b7a0: 0a 63 72 74 20 3d 20 2d 4d 44 0a 21 65 6e 64 69 .crt = -MD.!endi
b7b0: 66 0a 21 65 6c 73 65 0a 21 69 66 20 24 28 44 45 f.!else.!if $(DE
b7c0: 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 BUG) && !$(UNCHE
b7d0: 43 4b 45 44 29 0a 63 72 74 20 3d 20 2d 4d 54 64 CKED).crt = -MTd
b7e0: 0a 21 65 6c 73 65 0a 63 72 74 20 3d 20 2d 4d 54 .!else.crt = -MT
b7f0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
b800: 23 20 63 64 65 62 75 67 20 69 6e 63 6c 75 64 65 # cdebug include
b810: 73 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f s compiler optio
b820: 6e 73 20 66 6f 72 20 64 65 62 75 67 67 69 6e 67 ns for debugging
b830: 20 61 73 20 77 65 6c 6c 20 61 73 20 6f 70 74 69 as well as opti
b840: 6d 69 7a 61 74 69 6f 6e 2e 0a 21 69 66 20 24 28 mization..!if $(
b850: 44 45 42 55 47 29 0a 0a 23 20 49 6e 20 64 65 62 DEBUG)..# In deb
b860: 75 67 67 69 6e 67 20 6d 6f 64 65 2c 20 6f 70 74 ugging mode, opt
b870: 69 6d 69 7a 61 74 69 6f 6e 73 20 6e 65 65 64 20 imizations need
b880: 74 6f 20 62 65 20 64 69 73 61 62 6c 65 64 0a 63 to be disabled.c
b890: 64 65 62 75 67 20 3d 20 2d 5a 69 20 2d 4f 64 20 debug = -Zi -Od
b8a0: 24 28 44 45 42 55 47 46 4c 41 47 53 29 0a 0a 21 $(DEBUGFLAGS)..!
b8b0: 65 6c 73 65 0a 0a 63 64 65 62 75 67 20 3d 20 24 else..cdebug = $
b8c0: 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 0a (OPTIMIZATIONS).
b8d0: 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 29 0a 63 !if $(SYMBOLS).c
b8e0: 64 65 62 75 67 20 3d 20 24 28 63 64 65 62 75 67 debug = $(cdebug
b8f0: 29 20 2d 5a 69 0a 21 65 6e 64 69 66 0a 0a 21 65 ) -Zi.!endif..!e
b900: 6e 64 69 66 20 23 20 24 28 44 45 42 55 47 29 0a ndif # $(DEBUG).
b910: 0a 23 20 63 77 61 72 6e 20 69 6e 63 6c 75 64 65 .# cwarn include
b920: 73 20 64 65 66 61 75 6c 74 20 77 61 72 6e 69 6e s default warnin
b930: 67 20 6c 65 76 65 6c 73 2c 20 61 6c 73 6f 20 43 g levels, also C
b940: 34 30 39 30 20 28 62 75 67 67 79 29 20 61 6e 64 4090 (buggy) and
b950: 20 43 34 31 34 36 20 69 73 20 75 73 65 6c 65 73 C4146 is useles
b960: 73 2e 0a 63 77 61 72 6e 20 3d 20 24 28 57 41 52 s..cwarn = $(WAR
b970: 4e 49 4e 47 53 29 20 2d 77 64 34 30 39 30 20 2d NINGS) -wd4090 -
b980: 77 64 34 31 34 36 0a 0a 21 69 66 20 22 24 28 4d wd4146..!if "$(M
b990: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 ACHINE)" == "AMD
b9a0: 36 34 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 64" || "$(MACHIN
b9b0: 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a 23 E)" == "ARM64".#
b9c0: 20 44 69 73 61 62 6c 65 20 70 6f 69 6e 74 65 72 Disable pointer
b9d0: 3c 2d 3e 69 6e 74 20 77 61 72 6e 69 6e 67 73 20 <->int warnings
b9e0: 72 65 6c 61 74 65 64 20 74 6f 20 63 61 73 74 20 related to cast
b9f0: 62 65 74 77 65 65 6e 20 64 69 66 66 65 72 65 6e between differen
ba00: 74 20 73 69 7a 65 73 0a 23 20 54 68 65 72 65 20 t sizes.# There
ba10: 61 72 65 20 61 20 67 61 64 7a 69 6c 6c 69 6f 6e are a gadzillion
ba20: 20 6f 66 20 74 68 65 73 65 20 64 75 65 20 74 6f of these due to
ba30: 20 75 73 65 20 6f 66 20 43 6c 69 65 6e 74 44 61 use of ClientDa
ba40: 74 61 20 61 6e 64 0a 23 20 63 6c 75 74 74 65 72 ta and.# clutter
ba50: 20 75 70 20 63 6f 6d 70 69 6c 65 72 0a 23 20 6f up compiler.# o
ba60: 75 74 70 75 74 20 69 6e 63 72 65 61 73 69 6e 67 utput increasing
ba70: 20 63 68 61 6e 63 65 20 6f 66 20 61 20 72 65 61 chance of a rea
ba80: 6c 20 77 61 72 6e 69 6e 67 20 67 65 74 74 69 6e l warning gettin
ba90: 67 20 6c 6f 73 74 2e 20 53 6f 20 64 69 73 61 62 g lost. So disab
baa0: 6c 65 20 74 68 65 6d 2e 0a 23 20 45 76 65 6e 74 le them..# Event
bab0: 75 61 6c 6c 79 20 73 6f 6d 65 20 64 61 79 2c 20 ually some day,
bac0: 54 63 6c 20 77 69 6c 6c 20 62 65 20 36 34 2d 62 Tcl will be 64-b
bad0: 69 74 20 63 6c 65 61 6e 2e 0a 63 77 61 72 6e 20 it clean..cwarn
bae0: 3d 20 24 28 63 77 61 72 6e 29 20 2d 77 64 34 33 = $(cwarn) -wd43
baf0: 31 31 20 2d 77 64 34 33 31 32 0a 21 65 6e 64 69 11 -wd4312.!endi
bb00: 66 0a 0a 23 23 23 20 43 6f 6d 6d 6f 6e 20 63 6f f..### Common co
bb10: 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 74 mpiler options t
bb20: 68 61 74 20 61 72 65 20 61 72 63 68 69 74 65 63 hat are architec
bb30: 74 75 72 65 20 73 70 65 63 69 66 69 63 0a 21 69 ture specific.!i
bb40: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
bb50: 3d 20 22 41 52 4d 22 0a 63 61 72 63 68 20 3d 20 = "ARM".carch =
bb60: 2f 44 5f 41 52 4d 5f 57 49 4e 41 50 49 5f 50 41 /D_ARM_WINAPI_PA
bb70: 52 54 49 54 49 4f 4e 5f 44 45 53 4b 54 4f 50 5f RTITION_DESKTOP_
bb80: 53 44 4b 5f 41 56 41 49 4c 41 42 4c 45 0a 21 65 SDK_AVAILABLE.!e
bb90: 6c 73 65 0a 63 61 72 63 68 20 3d 0a 21 65 6e 64 lse.carch =.!end
bba0: 69 66 0a 0a 23 20 63 70 75 69 64 20 69 73 20 6f if..# cpuid is o
bbb0: 6e 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 6f 6e nly available on
bbc0: 20 69 6e 74 65 6c 20 6d 61 63 68 69 6e 65 73 0a intel machines.
bbd0: 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 !if "$(MACHINE)"
bbe0: 20 3d 3d 20 22 49 58 38 36 22 20 7c 7c 20 22 24 == "IX86" || "$
bbf0: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 (MACHINE)" == "A
bc00: 4d 44 36 34 22 0a 63 61 72 63 68 20 3d 20 24 28 MD64".carch = $(
bc10: 63 61 72 63 68 29 20 2f 44 48 41 56 45 5f 43 50 carch) /DHAVE_CP
bc20: 55 49 44 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 UID=1.!endif..!i
bc30: 66 20 24 28 44 45 42 55 47 29 0a 23 20 54 75 72 f $(DEBUG).# Tur
bc40: 6e 20 77 61 72 6e 69 6e 67 73 20 69 6e 74 6f 20 n warnings into
bc50: 65 72 72 6f 72 73 0a 63 77 61 72 6e 20 3d 20 24 errors.cwarn = $
bc60: 28 63 77 61 72 6e 29 20 2d 57 58 0a 21 65 6e 64 (cwarn) -WX.!end
bc70: 69 66 0a 0a 49 4e 43 4c 55 44 45 53 20 3d 20 24 if..INCLUDES = $
bc80: 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 29 20 24 (TCL_INCLUDES) $
bc90: 28 54 4b 5f 49 4e 43 4c 55 44 45 53 29 20 24 28 (TK_INCLUDES) $(
bca0: 50 52 4a 5f 49 4e 43 4c 55 44 45 53 29 0a 21 69 PRJ_INCLUDES).!i
bcb0: 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 20 f !$(DOING_TCL)
bcc0: 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 0a && !$(DOING_TK).
bcd0: 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 49 4e 43 INCLUDES = $(INC
bce0: 4c 55 44 45 53 29 20 2d 49 22 24 28 47 45 4e 45 LUDES) -I"$(GENE
bcf0: 52 49 43 44 49 52 29 22 20 2d 49 22 24 28 57 49 RICDIR)" -I"$(WI
bd00: 4e 5f 44 49 52 29 22 20 2d 49 22 24 28 43 4f 4d N_DIR)" -I"$(COM
bd10: 50 41 54 44 49 52 29 22 0a 21 65 6e 64 69 66 0a PATDIR)".!endif.
bd20: 0a 23 20 54 68 65 73 65 20 66 6c 61 67 73 20 61 .# These flags a
bd30: 72 65 20 64 65 66 69 6e 65 64 20 72 6f 75 67 68 re defined rough
bd40: 6c 79 20 69 6e 20 74 68 65 20 6f 72 64 65 72 20 ly in the order
bd50: 6f 66 20 74 68 65 20 70 72 65 2d 72 65 66 6f 72 of the pre-refor
bd60: 6d 0a 23 20 72 75 6c 65 73 2e 76 63 2f 6d 61 6b m.# rules.vc/mak
bd70: 65 66 69 6c 65 2e 76 63 20 74 6f 20 68 65 6c 70 efile.vc to help
bd80: 20 76 69 73 75 61 6c 6c 79 20 63 6f 6d 70 61 72 visually compar
bd90: 65 20 74 68 61 74 20 74 68 65 20 70 72 65 2d 20 e that the pre-
bda0: 61 6e 64 0a 23 20 70 6f 73 74 2d 72 65 66 6f 72 and.# post-refor
bdb0: 6d 20 62 75 69 6c 64 20 6c 6f 67 73 0a 0a 23 20 m build logs..#
bdc0: 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 cflags contains
bdd0: 67 65 6e 65 72 69 63 20 66 6c 61 67 73 20 75 73 generic flags us
bde0: 65 64 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 ed for building
bdf0: 70 72 61 63 74 69 63 61 6c 6c 79 20 61 6c 6c 20 practically all
be00: 6f 62 6a 65 63 74 20 66 69 6c 65 73 0a 63 66 6c object files.cfl
be10: 61 67 73 20 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d 63 ags = -nologo -c
be20: 20 24 28 43 4f 4d 50 49 4c 45 52 46 4c 41 47 53 $(COMPILERFLAGS
be30: 29 20 24 28 63 61 72 63 68 29 20 24 28 63 77 61 ) $(carch) $(cwa
be40: 72 6e 29 20 2d 46 70 24 28 54 4d 50 5f 44 49 52 rn) -Fp$(TMP_DIR
be50: 29 5e 5c 20 24 28 63 64 65 62 75 67 29 0a 0a 21 )^\ $(cdebug)..!
be60: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
be70: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 26 26 20 ERSION) == 8 &&
be80: 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 $(TCL_MINOR_VERS
be90: 49 4f 4e 29 20 3c 20 37 0a 63 66 6c 61 67 73 20 ION) < 7.cflags
bea0: 3d 20 24 28 63 66 6c 61 67 73 29 20 2d 44 54 63 = $(cflags) -DTc
beb0: 6c 5f 53 69 7a 65 3d 69 6e 74 0a 21 65 6e 64 69 l_Size=int.!endi
bec0: 66 0a 0a 23 20 61 70 70 63 66 6c 61 67 73 20 63 f..# appcflags c
bed0: 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 ontains $(cflags
bee0: 29 20 61 6e 64 20 66 6c 61 67 73 20 66 6f 72 20 ) and flags for
bef0: 62 75 69 6c 64 69 6e 67 20 74 68 65 20 61 70 70 building the app
bf00: 6c 69 63 61 74 69 6f 6e 0a 23 20 6f 62 6a 65 63 lication.# objec
bf10: 74 20 66 69 6c 65 73 20 28 65 2e 67 2e 20 74 63 t files (e.g. tc
bf20: 6c 73 68 2c 20 6f 72 20 77 69 73 68 29 20 70 6b lsh, or wish) pk
bf30: 67 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 gcflags contains
bf40: 20 24 28 63 66 6c 61 67 73 29 20 70 6c 75 73 0a $(cflags) plus.
bf50: 23 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 # flags used for
bf60: 20 62 75 69 6c 64 69 6e 67 20 73 68 61 72 65 64 building shared
bf70: 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 54 68 object files Th
bf80: 65 20 74 77 6f 20 64 69 66 66 65 72 20 69 6e 20 e two differ in
bf90: 74 68 65 0a 23 20 42 55 49 4c 44 5f 24 28 50 52 the.# BUILD_$(PR
bfa0: 4f 4a 45 43 54 29 20 6d 61 63 72 6f 20 77 68 69 OJECT) macro whi
bfb0: 63 68 20 73 68 6f 75 6c 64 20 62 65 20 64 65 66 ch should be def
bfc0: 69 6e 65 64 20 6f 6e 6c 79 20 66 6f 72 20 74 68 ined only for th
bfd0: 65 20 73 68 61 72 65 64 0a 23 20 6c 69 62 72 61 e shared.# libra
bfe0: 72 79 20 2a 69 6d 70 6c 65 6d 65 6e 74 61 74 69 ry *implementati
bff0: 6f 6e 2a 20 61 6e 64 20 6e 6f 74 20 66 6f 72 20 on* and not for
c000: 69 74 73 20 63 61 6c 6c 65 72 20 69 6e 74 65 72 its caller inter
c010: 66 61 63 65 0a 0a 61 70 70 63 66 6c 61 67 73 5f face..appcflags_
c020: 6e 6f 73 74 75 62 73 20 3d 20 24 28 63 66 6c 61 nostubs = $(cfla
c030: 67 73 29 20 24 28 63 72 74 29 20 24 28 49 4e 43 gs) $(crt) $(INC
c040: 4c 55 44 45 53 29 20 24 28 54 43 4c 5f 44 45 46 LUDES) $(TCL_DEF
c050: 49 4e 45 53 29 20 24 28 50 52 4a 5f 44 45 46 49 INES) $(PRJ_DEFI
c060: 4e 45 53 29 20 24 28 4f 50 54 44 45 46 49 4e 45 NES) $(OPTDEFINE
c070: 53 29 0a 61 70 70 63 66 6c 61 67 73 20 3d 20 24 S).appcflags = $
c080: 28 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 (appcflags_nostu
c090: 62 73 29 20 24 28 55 53 45 5f 53 54 55 42 53 5f bs) $(USE_STUBS_
c0a0: 44 45 46 53 29 0a 70 6b 67 63 66 6c 61 67 73 20 DEFS).pkgcflags
c0b0: 3d 20 24 28 61 70 70 63 66 6c 61 67 73 29 20 24 = $(appcflags) $
c0c0: 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29 20 2f (PKGNAMEFLAGS) /
c0d0: 44 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 DBUILD_$(PROJECT
c0e0: 29 0a 70 6b 67 63 66 6c 61 67 73 5f 6e 6f 73 74 ).pkgcflags_nost
c0f0: 75 62 73 20 3d 20 24 28 61 70 70 63 66 6c 61 67 ubs = $(appcflag
c100: 73 5f 6e 6f 73 74 75 62 73 29 20 24 28 50 4b 47 s_nostubs) $(PKG
c110: 4e 41 4d 45 46 4c 41 47 53 29 20 2f 44 42 55 49 NAMEFLAGS) /DBUI
c120: 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 0a 0a 23 LD_$(PROJECT)..#
c130: 20 73 74 75 62 73 63 66 6c 61 67 73 20 63 6f 6e stubscflags con
c140: 74 61 69 6e 73 20 24 28 63 66 6c 61 67 73 29 20 tains $(cflags)
c150: 70 6c 75 73 20 66 6c 61 67 73 20 75 73 65 64 20 plus flags used
c160: 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 61 20 73 for building a s
c170: 74 75 62 73 0a 23 20 6c 69 62 72 61 72 79 20 66 tubs.# library f
c180: 6f 72 20 74 68 65 20 70 61 63 6b 61 67 65 2e 20 or the package.
c190: 20 4e 6f 74 65 3a 20 2f 44 53 54 41 54 49 43 5f Note: /DSTATIC_
c1a0: 42 55 49 4c 44 20 69 73 20 64 65 66 69 6e 65 64 BUILD is defined
c1b0: 20 69 6e 0a 23 20 24 28 4f 50 54 44 45 46 49 4e in.# $(OPTDEFIN
c1c0: 45 53 29 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 ES) only if the
c1d0: 4f 50 54 53 20 63 6f 6e 66 69 67 75 72 61 74 69 OPTS configurati
c1e0: 6f 6e 20 69 6e 64 69 63 61 74 65 73 20 61 20 73 on indicates a s
c1f0: 74 61 74 69 63 0a 23 20 6c 69 62 72 61 72 79 2e tatic.# library.
c200: 20 48 6f 77 65 76 65 72 20 74 68 65 20 73 74 75 However the stu
c210: 62 73 20 6c 69 62 72 61 72 79 20 69 73 20 41 4c bs library is AL
c220: 57 41 59 53 20 73 74 61 74 69 63 20 68 65 6e 63 WAYS static henc
c230: 65 20 69 6e 63 6c 75 64 65 64 0a 23 20 68 65 72 e included.# her
c240: 65 20 69 72 72 65 73 70 65 63 74 69 76 65 20 6f e irrespective o
c250: 66 20 74 68 65 20 4f 50 54 53 20 73 65 74 74 69 f the OPTS setti
c260: 6e 67 2e 0a 23 0a 23 20 54 42 44 20 2d 20 74 63 ng..#.# TBD - tc
c270: 6c 76 66 73 20 68 61 73 20 61 20 63 6f 6d 6d 65 lvfs has a comme
c280: 6e 74 20 74 68 61 74 20 73 74 75 62 73 20 6c 69 nt that stubs li
c290: 62 73 20 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 bs should not be
c2a0: 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 2d compiled with -
c2b0: 47 4c 0a 23 20 77 69 74 68 6f 75 74 20 73 74 61 GL.# without sta
c2c0: 74 69 6e 67 20 77 68 79 2e 20 54 63 6c 20 69 74 ting why. Tcl it
c2d0: 73 65 6c 66 20 63 6f 6d 70 69 6c 65 64 20 73 74 self compiled st
c2e0: 75 62 73 20 6c 69 62 73 20 77 69 74 68 20 74 68 ubs libs with th
c2f0: 69 73 20 66 6c 61 67 2e 0a 23 20 73 6f 20 77 65 is flag..# so we
c300: 20 64 6f 20 6e 6f 74 20 72 65 6d 6f 76 65 20 69 do not remove i
c310: 74 20 66 72 6f 6d 20 63 66 6c 61 67 73 2e 20 2d t from cflags. -
c320: 47 4c 20 6d 61 79 20 70 72 65 76 65 6e 74 20 65 GL may prevent e
c330: 78 74 65 6e 73 69 6f 6e 73 0a 23 20 63 6f 6d 70 xtensions.# comp
c340: 69 6c 65 64 20 77 69 74 68 20 6f 6e 65 20 56 43 iled with one VC
c350: 20 76 65 72 73 69 6f 6e 20 74 6f 20 66 61 69 6c version to fail
c360: 20 74 6f 20 6c 69 6e 6b 20 61 67 61 69 6e 73 74 to link against
c370: 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 0a 23 stubs library.#
c380: 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 61 compiled with a
c390: 6e 6f 74 68 65 72 20 56 43 20 76 65 72 73 69 6f nother VC versio
c3a0: 6e 2e 20 43 68 65 63 6b 20 66 6f 72 20 74 68 69 n. Check for thi
c3b0: 73 20 61 6e 64 20 66 69 78 20 61 63 63 6f 72 64 s and fix accord
c3c0: 69 6e 67 6c 79 2e 0a 73 74 75 62 73 63 66 6c 61 ingly..stubscfla
c3d0: 67 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 24 gs = $(cflags) $
c3e0: 28 50 4b 47 4e 41 4d 45 46 4c 41 47 53 29 20 24 (PKGNAMEFLAGS) $
c3f0: 28 50 52 4a 5f 44 45 46 49 4e 45 53 29 20 24 28 (PRJ_DEFINES) $(
c400: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 5a 6c 20 OPTDEFINES) /Zl
c410: 2f 47 4c 2d 20 2f 44 53 54 41 54 49 43 5f 42 55 /GL- /DSTATIC_BU
c420: 49 4c 44 20 24 28 49 4e 43 4c 55 44 45 53 29 20 ILD $(INCLUDES)
c430: 24 28 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 $(USE_STUBS_DEFS
c440: 29 0a 0a 23 20 4c 69 6e 6b 20 66 6c 61 67 73 0a )..# Link flags.
c450: 0a 21 69 66 20 24 28 44 45 42 55 47 29 0a 6c 64 .!if $(DEBUG).ld
c460: 65 62 75 67 09 3d 20 2d 64 65 62 75 67 20 2d 64 ebug.= -debug -d
c470: 65 62 75 67 74 79 70 65 3a 63 76 0a 21 65 6c 73 ebugtype:cv.!els
c480: 65 0a 6c 64 65 62 75 67 09 3d 20 2d 72 65 6c 65 e.ldebug.= -rele
c490: 61 73 65 20 2d 6f 70 74 3a 72 65 66 20 2d 6f 70 ase -opt:ref -op
c4a0: 74 3a 69 63 66 2c 33 0a 21 69 66 20 24 28 53 59 t:icf,3.!if $(SY
c4b0: 4d 42 4f 4c 53 29 0a 6c 64 65 62 75 67 09 3d 20 MBOLS).ldebug.=
c4c0: 24 28 6c 64 65 62 75 67 29 20 2d 64 65 62 75 67 $(ldebug) -debug
c4d0: 20 2d 64 65 62 75 67 74 79 70 65 3a 63 76 0a 21 -debugtype:cv.!
c4e0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 20 endif.!endif..#
c4f0: 4e 6f 74 65 3a 20 50 72 6f 66 69 6c 69 6e 67 20 Note: Profiling
c500: 69 73 20 63 75 72 72 65 6e 74 6c 79 20 6f 6e 6c is currently onl
c510: 79 20 70 6f 73 73 69 62 6c 65 20 77 69 74 68 20 y possible with
c520: 74 68 65 20 56 69 73 75 61 6c 20 53 74 75 64 69 the Visual Studi
c530: 6f 20 45 6e 74 65 72 70 72 69 73 65 0a 21 69 66 o Enterprise.!if
c540: 20 24 28 50 52 4f 46 49 4c 45 29 0a 6c 64 65 62 $(PROFILE).ldeb
c550: 75 67 3d 20 24 28 6c 64 65 62 75 67 29 20 2d 70 ug= $(ldebug) -p
c560: 72 6f 66 69 6c 65 0a 21 65 6e 64 69 66 0a 0a 23 rofile.!endif..#
c570: 23 23 20 44 65 63 6c 61 72 61 74 69 6f 6e 73 20 ## Declarations
c580: 63 6f 6d 6d 6f 6e 20 74 6f 20 61 6c 6c 20 6c 69 common to all li
c590: 6e 6b 65 72 20 76 65 72 73 69 6f 6e 73 0a 6c 66 nker versions.lf
c5a0: 6c 61 67 73 09 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d lags.= -nologo -
c5b0: 6d 61 63 68 69 6e 65 3a 24 28 4d 41 43 48 49 4e machine:$(MACHIN
c5c0: 45 29 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 E) $(LINKERFLAGS
c5d0: 29 20 24 28 6c 64 65 62 75 67 29 0a 0a 21 69 66 ) $(ldebug)..!if
c5e0: 20 24 28 4d 53 56 43 52 54 29 20 26 26 20 21 28 $(MSVCRT) && !(
c5f0: 24 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 $(DEBUG) && !$(U
c600: 4e 43 48 45 43 4b 45 44 29 29 20 26 26 20 24 28 NCHECKED)) && $(
c610: 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 39 VCVERSION) >= 19
c620: 30 30 0a 6c 66 6c 61 67 73 09 3d 20 24 28 6c 66 00.lflags.= $(lf
c630: 6c 61 67 73 29 20 2d 6e 6f 64 65 66 61 75 6c 74 lags) -nodefault
c640: 6c 69 62 3a 6c 69 62 75 63 72 74 2e 6c 69 62 0a lib:libucrt.lib.
c650: 21 65 6e 64 69 66 0a 0a 64 6c 6c 6c 66 6c 61 67 !endif..dlllflag
c660: 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 2d 64 s = $(lflags) -d
c670: 6c 6c 0a 63 6f 6e 6c 66 6c 61 67 73 20 3d 20 24 ll.conlflags = $
c680: 28 6c 66 6c 61 67 73 29 20 2d 73 75 62 73 79 73 (lflags) -subsys
c690: 74 65 6d 3a 63 6f 6e 73 6f 6c 65 0a 67 75 69 6c tem:console.guil
c6a0: 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 flags = $(lflags
c6b0: 29 20 2d 73 75 62 73 79 73 74 65 6d 3a 77 69 6e ) -subsystem:win
c6c0: 64 6f 77 73 0a 0a 23 20 4c 69 62 72 61 72 69 65 dows..# Librarie
c6d0: 73 20 74 68 61 74 20 61 72 65 20 72 65 71 75 69 s that are requi
c6e0: 72 65 64 20 66 6f 72 20 65 76 65 72 79 20 69 6d red for every im
c6f0: 61 67 65 2e 0a 23 20 45 78 74 65 6e 73 69 6f 6e age..# Extension
c700: 73 20 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 s should define
c710: 61 6e 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 6c any additional l
c720: 69 62 72 61 72 69 65 73 20 77 69 74 68 20 24 28 ibraries with $(
c730: 50 52 4a 5f 4c 49 42 53 29 0a 77 69 6e 6c 69 62 PRJ_LIBS).winlib
c740: 73 20 20 20 3d 20 6b 65 72 6e 65 6c 33 32 2e 6c s = kernel32.l
c750: 69 62 20 61 64 76 61 70 69 33 32 2e 6c 69 62 0a ib advapi32.lib.
c760: 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29 0a .!if $(NEED_TK).
c770: 77 69 6e 6c 69 62 73 20 3d 20 24 28 77 69 6e 6c winlibs = $(winl
c780: 69 62 73 29 20 67 64 69 33 32 2e 6c 69 62 20 75 ibs) gdi32.lib u
c790: 73 65 72 33 32 2e 6c 69 62 20 75 78 74 68 65 6d ser32.lib uxthem
c7a0: 65 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 20 e.lib.!endif..#
c7b0: 41 76 6f 69 64 20 27 75 6e 72 65 73 6f 6c 76 65 Avoid 'unresolve
c7c0: 64 20 65 78 74 65 72 6e 61 6c 20 73 79 6d 62 6f d external symbo
c7d0: 6c 20 5f 5f 73 65 63 75 72 69 74 79 5f 63 6f 6f l __security_coo
c7e0: 6b 69 65 27 20 65 72 72 6f 72 73 2e 0a 23 20 63 kie' errors..# c
c7f0: 2e 66 2e 20 68 74 74 70 3a 2f 2f 73 75 70 70 6f .f. http://suppo
c800: 72 74 2e 6d 69 63 72 6f 73 6f 66 74 2e 63 6f 6d rt.microsoft.com
c810: 2f 3f 69 64 3d 38 39 34 35 37 33 0a 21 69 66 20 /?id=894573.!if
c820: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
c830: 22 41 4d 44 36 34 22 0a 21 69 66 20 24 28 56 43 "AMD64".!if $(VC
c840: 56 45 52 53 49 4f 4e 29 20 3e 20 31 33 39 39 20 VERSION) > 1399
c850: 26 26 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 && $(VCVERSION)
c860: 3c 20 31 35 30 30 0a 77 69 6e 6c 69 62 73 20 20 < 1500.winlibs
c870: 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 62 75 = $(winlibs) bu
c880: 66 66 65 72 6f 76 65 72 66 6c 6f 77 55 2e 6c 69 fferoverflowU.li
c890: 62 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a b.!endif.!endif.
c8a0: 0a 62 61 73 65 6c 69 62 73 20 3d 20 24 28 77 69 .baselibs = $(wi
c8b0: 6e 6c 69 62 73 29 20 24 28 50 52 4a 5f 4c 49 42 nlibs) $(PRJ_LIB
c8c0: 53 29 0a 0a 21 69 66 20 24 28 4d 53 56 43 52 54 S)..!if $(MSVCRT
c8d0: 29 20 26 26 20 21 28 24 28 44 45 42 55 47 29 20 ) && !($(DEBUG)
c8e0: 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 && !$(UNCHECKED)
c8f0: 29 20 26 26 20 24 28 56 43 56 45 52 53 49 4f 4e ) && $(VCVERSION
c900: 29 20 3e 3d 20 31 39 30 30 0a 62 61 73 65 6c 69 ) >= 1900.baseli
c910: 62 73 20 20 20 3d 20 24 28 62 61 73 65 6c 69 62 bs = $(baselib
c920: 73 29 20 75 63 72 74 2e 6c 69 62 0a 21 65 6e 64 s) ucrt.lib.!end
c930: 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 if..############
c940: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c950: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c960: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
c970: 23 23 23 23 0a 23 20 31 33 2e 20 44 65 66 69 6e ####.# 13. Defin
c980: 65 20 73 74 61 6e 64 61 72 64 20 63 6f 6d 6d 61 e standard comma
c990: 6e 64 73 2c 20 63 6f 6d 6d 6f 6e 20 6d 61 6b 65 nds, common make
c9a0: 20 74 61 72 67 65 74 73 20 61 6e 64 20 69 6d 70 targets and imp
c9b0: 6c 69 63 69 74 20 72 75 6c 65 73 0a 0a 43 43 50 licit rules..CCP
c9c0: 4b 47 43 4d 44 20 3d 20 24 28 63 63 33 32 29 20 KGCMD = $(cc32)
c9d0: 24 28 70 6b 67 63 66 6c 61 67 73 29 20 2d 46 6f $(pkgcflags) -Fo
c9e0: 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0a 43 43 41 $(TMP_DIR)^\.CCA
c9f0: 50 50 43 4d 44 20 3d 20 24 28 63 63 33 32 29 20 PPCMD = $(cc32)
ca00: 24 28 61 70 70 63 66 6c 61 67 73 29 20 2d 46 6f $(appcflags) -Fo
ca10: 24 28 54 4d 50 5f 44 49 52 29 5e 5c 0a 43 43 53 $(TMP_DIR)^\.CCS
ca20: 54 55 42 53 43 4d 44 20 3d 20 24 28 63 63 33 32 TUBSCMD = $(cc32
ca30: 29 20 24 28 73 74 75 62 73 63 66 6c 61 67 73 29 ) $(stubscflags)
ca40: 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 29 5e 5c -Fo$(TMP_DIR)^\
ca50: 0a 0a 4c 49 42 43 4d 44 20 3d 20 24 28 6c 69 62 ..LIBCMD = $(lib
ca60: 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 24 28 4c 49 32) -nologo $(LI
ca70: 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6f 75 74 3a NKERFLAGS) -out:
ca80: 24 40 0a 44 4c 4c 43 4d 44 20 3d 20 24 28 6c 69 $@.DLLCMD = $(li
ca90: 6e 6b 33 32 29 20 24 28 64 6c 6c 6c 66 6c 61 67 nk32) $(dlllflag
caa0: 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 s) -out:$@ $(bas
cab0: 65 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 73 elibs) $(tcllibs
cac0: 29 20 24 28 74 6b 6c 69 62 73 29 0a 0a 43 4f 4e ) $(tklibs)..CON
cad0: 45 58 45 43 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 EXECMD = $(link3
cae0: 32 29 20 24 28 63 6f 6e 6c 66 6c 61 67 73 29 20 2) $(conlflags)
caf0: 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 65 6c 69 -out:$@ $(baseli
cb00: 62 73 29 20 24 28 74 63 6c 6c 69 62 73 29 20 24 bs) $(tcllibs) $
cb10: 28 74 6b 6c 69 62 73 29 0a 47 55 49 45 58 45 43 (tklibs).GUIEXEC
cb20: 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 MD = $(link32) $
cb30: 28 67 75 69 6c 66 6c 61 67 73 29 20 2d 6f 75 74 (guilflags) -out
cb40: 3a 24 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 :$@ $(baselibs)
cb50: 24 28 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c $(tcllibs) $(tkl
cb60: 69 62 73 29 0a 52 45 53 43 4d 44 20 20 3d 20 24 ibs).RESCMD = $
cb70: 28 72 63 33 32 29 20 2d 66 6f 20 24 40 20 2d 72 (rc32) -fo $@ -r
cb80: 20 2d 69 20 22 24 28 47 45 4e 45 52 49 43 44 49 -i "$(GENERICDI
cb90: 52 29 22 20 2d 69 20 22 24 28 54 4d 50 5f 44 49 R)" -i "$(TMP_DI
cba0: 52 29 22 20 5c 0a 09 20 20 20 20 24 28 54 43 4c R)" \.. $(TCL
cbb0: 5f 49 4e 43 4c 55 44 45 53 29 20 2f 44 53 54 41 _INCLUDES) /DSTA
cbc0: 54 49 43 5f 42 55 49 4c 44 3d 24 28 53 54 41 54 TIC_BUILD=$(STAT
cbd0: 49 43 5f 42 55 49 4c 44 29 20 5c 0a 09 20 20 20 IC_BUILD) \..
cbe0: 20 2f 44 44 45 42 55 47 3d 24 28 44 45 42 55 47 /DDEBUG=$(DEBUG
cbf0: 29 20 2d 64 20 55 4e 43 48 45 43 4b 45 44 3d 24 ) -d UNCHECKED=$
cc00: 28 55 4e 43 48 45 43 4b 45 44 29 20 5c 0a 09 20 (UNCHECKED) \..
cc10: 20 20 20 2f 44 43 4f 4d 4d 41 56 45 52 53 49 4f /DCOMMAVERSIO
cc20: 4e 3d 24 28 52 43 43 4f 4d 4d 41 56 45 52 53 49 N=$(RCCOMMAVERSI
cc30: 4f 4e 29 20 5c 0a 09 20 20 20 20 2f 44 44 4f 54 ON) \.. /DDOT
cc40: 56 45 52 53 49 4f 4e 3d 5c 22 24 28 44 4f 54 56 VERSION=\"$(DOTV
cc50: 45 52 53 49 4f 4e 29 5c 22 20 5c 0a 09 20 20 20 ERSION)\" \..
cc60: 20 2f 44 56 45 52 53 49 4f 4e 3d 5c 22 24 28 56 /DVERSION=\"$(V
cc70: 45 52 53 49 4f 4e 29 5c 22 20 5c 0a 09 20 20 20 ERSION)\" \..
cc80: 20 2f 44 53 55 46 58 3d 5c 22 24 28 53 55 46 58 /DSUFX=\"$(SUFX
cc90: 29 5c 22 20 5c 0a 09 20 20 20 20 2f 44 50 52 4f )\" \.. /DPRO
cca0: 4a 45 43 54 3d 5c 22 24 28 50 52 4f 4a 45 43 54 JECT=\"$(PROJECT
ccb0: 29 5c 22 20 5c 0a 09 20 20 20 20 2f 44 50 52 4a )\" \.. /DPRJ
ccc0: 4c 49 42 4e 41 4d 45 3d 5c 22 24 28 50 52 4a 4c LIBNAME=\"$(PRJL
ccd0: 49 42 4e 41 4d 45 29 5c 22 0a 0a 21 69 66 6e 64 IBNAME)\"..!ifnd
cce0: 65 66 20 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 ef DEFAULT_BUILD
ccf0: 5f 54 41 52 47 45 54 0a 44 45 46 41 55 4c 54 5f _TARGET.DEFAULT_
cd00: 42 55 49 4c 44 5f 54 41 52 47 45 54 20 3d 20 24 BUILD_TARGET = $
cd10: 28 50 52 4f 4a 45 43 54 29 0a 21 65 6e 64 69 66 (PROJECT).!endif
cd20: 0a 0a 64 65 66 61 75 6c 74 2d 74 61 72 67 65 74 ..default-target
cd30: 3a 20 24 28 44 45 46 41 55 4c 54 5f 42 55 49 4c : $(DEFAULT_BUIL
cd40: 44 5f 54 41 52 47 45 54 29 0a 0a 21 69 66 20 24 D_TARGET)..!if $
cd50: 28 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 (MULTIPLATFORM_I
cd60: 4e 53 54 41 4c 4c 29 0a 64 65 66 61 75 6c 74 2d NSTALL).default-
cd70: 70 6b 67 69 6e 64 65 78 3a 0a 09 40 65 63 68 6f pkgindex:..@echo
cd80: 20 69 66 20 7b 5b 70 61 63 6b 61 67 65 20 76 73 if {[package vs
cd90: 61 74 69 73 66 69 65 73 20 5b 70 61 63 6b 61 67 atisfies [packag
cda0: 65 20 70 72 6f 76 69 64 65 20 54 63 6c 5d 20 39 e provide Tcl] 9
cdb0: 2e 30 2d 5d 7d 20 7b 20 3e 20 24 28 4f 55 54 5f .0-]} { > $(OUT_
cdc0: 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 DIR)\pkgIndex.tc
cdd0: 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 l..@echo package
cde0: 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f ifneeded $(PRJ_
cdf0: 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 PACKAGE_TCLNAME)
ce00: 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c $(DOTVERSION) \
ce10: 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 .. [list load
ce20: 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 [file join $$di
ce30: 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f 49 44 45 r $(PLATFORM_IDE
ce40: 4e 54 49 46 59 29 20 24 28 50 52 4a 4c 49 42 4e NTIFY) $(PRJLIBN
ce50: 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 AME9)]] >> $(OUT
ce60: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
ce70: 63 6c 0a 09 40 65 63 68 6f 20 7d 20 65 6c 73 65 cl..@echo } else
ce80: 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 { >> $(OUT_DIR)
ce90: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 \pkgIndex.tcl..@
cea0: 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 66 6e echo package ifn
ceb0: 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 43 4b eeded $(PRJ_PACK
cec0: 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 44 AGE_TCLNAME) $(D
ced0: 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 OTVERSION) \..
cee0: 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66 69 [list load [fi
cef0: 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 20 24 28 le join $$dir $(
cf00: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 PLATFORM_IDENTIF
cf10: 59 29 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 Y) $(PRJLIBNAME8
cf20: 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 )]] >> $(OUT_DIR
cf30: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 )\pkgIndex.tcl..
cf40: 40 65 63 68 6f 20 7d 20 3e 3e 20 24 28 4f 55 54 @echo } >> $(OUT
cf50: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
cf60: 63 6c 0a 21 65 6c 73 65 0a 64 65 66 61 75 6c 74 cl.!else.default
cf70: 2d 70 6b 67 69 6e 64 65 78 3a 0a 09 40 65 63 68 -pkgindex:..@ech
cf80: 6f 20 69 66 20 7b 5b 70 61 63 6b 61 67 65 20 76 o if {[package v
cf90: 73 61 74 69 73 66 69 65 73 20 5b 70 61 63 6b 61 satisfies [packa
cfa0: 67 65 20 70 72 6f 76 69 64 65 20 54 63 6c 5d 20 ge provide Tcl]
cfb0: 39 2e 30 2d 5d 7d 20 7b 20 3e 20 24 28 4f 55 54 9.0-]} { > $(OUT
cfc0: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
cfd0: 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 cl..@echo packag
cfe0: 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a e ifneeded $(PRJ
cff0: 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 _PACKAGE_TCLNAME
d000: 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 ) $(DOTVERSION)
d010: 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 \.. [list loa
d020: 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 d [file join $$d
d030: 69 72 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 ir $(PRJLIBNAME9
d040: 29 5d 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 )]] >> $(OUT_DIR
d050: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 )\pkgIndex.tcl..
d060: 40 65 63 68 6f 20 7d 20 65 6c 73 65 20 7b 20 3e @echo } else { >
d070: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
d080: 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f Index.tcl..@echo
d090: 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 package ifneede
d0a0: 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f d $(PRJ_PACKAGE_
d0b0: 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 TCLNAME) $(DOTVE
d0c0: 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c RSION) \.. [l
d0d0: 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a ist load [file j
d0e0: 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a 4c oin $$dir $(PRJL
d0f0: 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 IBNAME8)]] >> $(
d100: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d110: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 3e x.tcl..@echo } >
d120: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
d130: 49 6e 64 65 78 2e 74 63 6c 0a 21 65 6e 64 69 66 Index.tcl.!endif
d140: 0a 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 ..default-pkgind
d150: 65 78 2d 74 65 61 3a 0a 09 40 69 66 20 65 78 69 ex-tea:..@if exi
d160: 73 74 20 24 28 52 4f 4f 54 29 5c 70 6b 67 49 6e st $(ROOT)\pkgIn
d170: 64 65 78 2e 74 63 6c 2e 69 6e 20 6e 6d 61 6b 65 dex.tcl.in nmake
d180: 68 6c 70 20 2d 73 20 3c 3c 20 24 28 52 4f 4f 54 hlp -s << $(ROOT
d190: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 )\pkgIndex.tcl.i
d1a0: 6e 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 n > $(OUT_DIR)\p
d1b0: 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 40 50 41 43 kgIndex.tcl.@PAC
d1c0: 4b 41 47 45 5f 56 45 52 53 49 4f 4e 40 20 20 20 KAGE_VERSION@
d1d0: 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 0a 40 $(DOTVERSION).@
d1e0: 50 41 43 4b 41 47 45 5f 4e 41 4d 45 40 20 20 20 PACKAGE_NAME@
d1f0: 20 20 20 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 $(PRJ_PACKAG
d200: 45 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 41 43 4b E_TCLNAME).@PACK
d210: 41 47 45 5f 54 43 4c 4e 41 4d 45 40 20 20 20 20 AGE_TCLNAME@
d220: 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 $(PRJ_PACKAGE_TC
d230: 4c 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c 49 42 5f LNAME).@PKG_LIB_
d240: 46 49 4c 45 40 20 20 20 20 20 20 20 24 28 50 52 FILE@ $(PR
d250: 4a 4c 49 42 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c JLIBNAME).@PKG_L
d260: 49 42 5f 46 49 4c 45 38 40 20 20 20 20 20 20 24 IB_FILE8@ $
d270: 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 40 50 (PRJLIBNAME8).@P
d280: 4b 47 5f 4c 49 42 5f 46 49 4c 45 39 40 20 20 20 KG_LIB_FILE9@
d290: 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 $(PRJLIBNAME9
d2a0: 29 0a 3c 3c 0a 0a 64 65 66 61 75 6c 74 2d 69 6e ).<<..default-in
d2b0: 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 69 stall: default-i
d2c0: 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 nstall-binaries
d2d0: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d2e0: 6c 69 62 72 61 72 69 65 73 0a 21 69 66 20 24 28 libraries.!if $(
d2f0: 53 59 4d 42 4f 4c 53 29 0a 64 65 66 61 75 6c 74 SYMBOLS).default
d300: 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c -install: defaul
d310: 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 0a 21 t-install-pdbs.!
d320: 65 6e 64 69 66 0a 0a 23 20 41 67 61 69 6e 20 74 endif..# Again t
d330: 6f 20 64 65 61 6c 20 77 69 74 68 20 68 69 73 74 o deal with hist
d340: 6f 72 69 63 61 6c 20 62 72 6f 6b 65 6e 6e 65 73 orical brokennes
d350: 73 2c 20 74 68 65 72 65 20 69 73 20 73 6f 6d 65 s, there is some
d360: 20 63 6f 6e 66 75 73 69 6f 6e 0a 23 20 69 6e 20 confusion.# in
d370: 74 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 6f 72 20 terminlogy. For
d380: 65 78 74 65 6e 73 69 6f 6e 73 2c 20 74 68 65 20 extensions, the
d390: 22 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 "install-binarie
d3a0: 73 22 20 77 61 73 20 75 73 65 64 20 74 6f 0a 23 s" was used to.#
d3b0: 20 6c 6f 63 61 74 65 20 74 61 72 67 65 74 20 64 locate target d
d3c0: 69 72 65 63 74 6f 72 79 20 66 6f 72 20 2a 62 69 irectory for *bi
d3d0: 6e 61 72 79 20 73 68 61 72 65 64 20 6c 69 62 72 nary shared libr
d3e0: 61 72 69 65 73 2a 20 61 6e 64 20 74 68 75 73 0a aries* and thus.
d3f0: 23 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 # the appropriat
d400: 65 20 6d 61 63 72 6f 20 69 73 20 4c 49 42 5f 49 e macro is LIB_I
d410: 4e 53 54 41 4c 4c 5f 44 49 52 20 73 69 6e 63 65 NSTALL_DIR since
d420: 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 BIN_INSTALL_DIR
d430: 20 69 73 0a 23 20 66 6f 72 20 65 78 65 63 75 74 is.# for execut
d440: 61 62 6c 65 73 20 28 65 78 65 73 29 2e 20 4f 6e ables (exes). On
d450: 20 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 20 the other hand
d460: 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d 6c 69 62 the "install-lib
d470: 72 61 72 69 65 73 22 0a 23 20 74 61 72 67 65 74 raries".# target
d480: 20 69 73 20 66 6f 72 20 2a 73 63 72 69 70 74 73 is for *scripts
d490: 2a 20 61 6e 64 20 73 68 6f 75 6c 64 20 68 61 76 * and should hav
d4a0: 65 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 22 69 e been called "i
d4b0: 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 22 2e nstall-scripts".
d4c0: 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c .default-install
d4d0: 2d 62 69 6e 61 72 69 65 73 3a 20 24 28 50 52 4a -binaries: $(PRJ
d4e0: 4c 49 42 29 0a 09 40 65 63 68 6f 20 49 6e 73 74 LIB)..@echo Inst
d4f0: 61 6c 6c 69 6e 67 20 62 69 6e 61 72 69 65 73 20 alling binaries
d500: 74 6f 20 27 24 28 4c 49 42 5f 49 4e 53 54 41 4c to '$(LIB_INSTAL
d510: 4c 5f 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 L_DIR)'..@if not
d520: 20 65 78 69 73 74 20 22 24 28 4c 49 42 5f 49 4e exist "$(LIB_IN
d530: 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 STALL_DIR)" mkdi
d540: 72 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c r "$(LIB_INSTALL
d550: 5f 44 49 52 29 22 0a 09 40 24 28 43 50 59 29 20 _DIR)"..@$(CPY)
d560: 24 28 50 52 4a 4c 49 42 29 20 22 24 28 4c 49 42 $(PRJLIB) "$(LIB
d570: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 3e _INSTALL_DIR)" >
d580: 4e 55 4c 0a 0a 23 20 41 6c 69 61 73 20 66 6f 72 NUL..# Alias for
d590: 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c default-install
d5a0: 2d 73 63 72 69 70 74 73 0a 64 65 66 61 75 6c 74 -scripts.default
d5b0: 2d 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 -install-librari
d5c0: 65 73 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 es: default-inst
d5d0: 61 6c 6c 2d 73 63 72 69 70 74 73 0a 0a 64 65 66 all-scripts..def
d5e0: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 ault-install-scr
d5f0: 69 70 74 73 3a 20 24 28 4f 55 54 5f 44 49 52 29 ipts: $(OUT_DIR)
d600: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 \pkgIndex.tcl..@
d610: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
d620: 6c 69 62 72 61 72 69 65 73 20 74 6f 20 27 24 28 libraries to '$(
d630: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
d640: 49 52 29 27 0a 09 40 69 66 20 65 78 69 73 74 20 IR)'..@if exist
d650: 24 28 4c 49 42 44 49 52 29 20 24 28 43 50 59 29 $(LIBDIR) $(CPY)
d660: 20 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 6c $(LIBDIR)\*.tcl
d670: 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 "$(SCRIPT_INSTA
d680: 4c 4c 5f 44 49 52 29 22 0a 09 40 65 63 68 6f 20 LL_DIR)"..@echo
d690: 49 6e 73 74 61 6c 6c 69 6e 67 20 70 61 63 6b 61 Installing packa
d6a0: 67 65 20 69 6e 64 65 78 20 69 6e 20 27 24 28 53 ge index in '$(S
d6b0: 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 CRIPT_INSTALL_DI
d6c0: 52 29 27 0a 09 40 24 28 43 50 59 29 20 24 28 4f R)'..@$(CPY) $(O
d6d0: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d6e0: 2e 74 63 6c 20 24 28 53 43 52 49 50 54 5f 49 4e .tcl $(SCRIPT_IN
d6f0: 53 54 41 4c 4c 5f 44 49 52 29 0a 0a 64 65 66 61 STALL_DIR)..defa
d700: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 74 75 62 ult-install-stub
d710: 73 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c s:..@echo Instal
d720: 6c 69 6e 67 20 73 74 75 62 73 20 6c 69 62 72 61 ling stubs libra
d730: 72 79 20 74 6f 20 27 24 28 53 43 52 49 50 54 5f ry to '$(SCRIPT_
d740: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 INSTALL_DIR)'..@
d750: 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 if not exist "$(
d760: 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 SCRIPT_INSTALL_D
d770: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 53 43 IR)" mkdir "$(SC
d780: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
d790: 29 22 0a 09 40 24 28 43 50 59 29 20 24 28 50 52 )"..@$(CPY) $(PR
d7a0: 4a 53 54 55 42 4c 49 42 29 20 22 24 28 53 43 52 JSTUBLIB) "$(SCR
d7b0: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 IPT_INSTALL_DIR)
d7c0: 22 20 3e 4e 55 4c 0a 0a 64 65 66 61 75 6c 74 2d " >NUL..default-
d7d0: 69 6e 73 74 61 6c 6c 2d 70 64 62 73 3a 0a 09 40 install-pdbs:..@
d7e0: 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 echo Installing
d7f0: 50 44 42 73 20 74 6f 20 27 24 28 4c 49 42 5f 49 PDBs to '$(LIB_I
d800: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 NSTALL_DIR)'..@i
d810: 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 4c f not exist "$(L
d820: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 IB_INSTALL_DIR)"
d830: 20 6d 6b 64 69 72 20 22 24 28 4c 49 42 5f 49 4e mkdir "$(LIB_IN
d840: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 STALL_DIR)"..@$(
d850: 43 50 59 29 20 22 24 28 4f 55 54 5f 44 49 52 29 CPY) "$(OUT_DIR)
d860: 5c 2a 2e 70 64 62 22 20 22 24 28 4c 49 42 5f 49 \*.pdb" "$(LIB_I
d870: 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 22 0a 0a 23 NSTALL_DIR)\"..#
d880: 20 22 65 6d 61 63 73 20 66 6f 6e 74 2d 6c 6f 63 "emacs font-loc
d890: 6b 20 68 69 67 68 6c 69 67 68 74 69 6e 67 20 66 k highlighting f
d8a0: 69 78 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 ix..default-inst
d8b0: 61 6c 6c 2d 64 6f 63 73 2d 68 74 6d 6c 3a 0a 09 all-docs-html:..
d8c0: 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 @echo Installing
d8d0: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 documentation f
d8e0: 69 6c 65 73 20 74 6f 20 27 24 28 44 4f 43 5f 49 iles to '$(DOC_I
d8f0: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 NSTALL_DIR)'..@i
d900: 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 44 f not exist "$(D
d910: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 OC_INSTALL_DIR)"
d920: 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 5f 49 4e mkdir "$(DOC_IN
d930: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 69 66 STALL_DIR)"..@if
d940: 20 65 78 69 73 74 20 24 28 44 4f 43 44 49 52 29 exist $(DOCDIR)
d950: 20 66 6f 72 20 25 66 20 69 6e 20 28 22 24 28 44 for %f in ("$(D
d960: 4f 43 44 49 52 29 5c 2a 2e 68 74 6d 6c 22 20 22 OCDIR)\*.html" "
d970: 24 28 44 4f 43 44 49 52 29 5c 2a 2e 63 73 73 22 $(DOCDIR)\*.css"
d980: 20 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 70 6e "$(DOCDIR)\*.pn
d990: 67 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 g") do @$(COPY)
d9a0: 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c %f "$(DOC_INSTAL
d9b0: 4c 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 L_DIR)"..default
d9c0: 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d 6e 3a -install-docs-n:
d9d0: 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 ..@echo Installi
d9e0: 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e ng documentation
d9f0: 20 66 69 6c 65 73 20 74 6f 20 27 24 28 44 4f 43 files to '$(DOC
da00: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 _INSTALL_DIR)'..
da10: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 @if not exist "$
da20: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
da30: 29 22 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 5f )" mkdir "$(DOC_
da40: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 INSTALL_DIR)"..@
da50: 69 66 20 65 78 69 73 74 20 24 28 44 4f 43 44 49 if exist $(DOCDI
da60: 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22 24 R) for %f in ("$
da70: 28 44 4f 43 44 49 52 29 5c 2a 2e 6e 22 29 20 64 (DOCDIR)\*.n") d
da80: 6f 20 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 o @$(COPY) %f "$
da90: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
daa0: 29 22 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 )"..default-inst
dab0: 61 6c 6c 2d 64 65 6d 6f 73 3a 0a 09 40 65 63 68 all-demos:..@ech
dac0: 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 64 65 6d o Installing dem
dad0: 6f 73 20 74 6f 20 27 24 28 44 45 4d 4f 5f 49 4e os to '$(DEMO_IN
dae0: 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 66 STALL_DIR)'..@if
daf0: 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 44 45 not exist "$(DE
db00: 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 MO_INSTALL_DIR)"
db10: 20 6d 6b 64 69 72 20 22 24 28 44 45 4d 4f 5f 49 mkdir "$(DEMO_I
db20: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 69 NSTALL_DIR)"..@i
db30: 66 20 65 78 69 73 74 20 24 28 44 45 4d 4f 44 49 f exist $(DEMODI
db40: 52 29 20 24 28 43 50 59 44 49 52 29 20 22 24 28 R) $(CPYDIR) "$(
db50: 44 45 4d 4f 44 49 52 29 22 20 22 24 28 44 45 4d DEMODIR)" "$(DEM
db60: 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a O_INSTALL_DIR)".
db70: 0a 64 65 66 61 75 6c 74 2d 63 6c 65 61 6e 3a 0a .default-clean:.
db80: 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 .@echo Cleaning
db90: 24 28 54 4d 50 5f 44 49 52 29 5c 2a 20 2e 2e 2e $(TMP_DIR)\* ...
dba0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 54 4d ..@if exist $(TM
dbb0: 50 5f 44 49 52 29 5c 6e 75 6c 20 24 28 52 4d 44 P_DIR)\nul $(RMD
dbc0: 49 52 29 20 24 28 54 4d 50 5f 44 49 52 29 0a 09 IR) $(TMP_DIR)..
dbd0: 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 24 @echo Cleaning $
dbe0: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
dbf0: 6c 70 2e 6f 62 6a 2c 20 6e 6d 61 6b 65 68 6c 70 lp.obj, nmakehlp
dc00: 2e 65 78 65 20 2e 2e 2e 0a 09 40 69 66 20 65 78 .exe .....@if ex
dc10: 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e ist $(WIN_DIR)\n
dc20: 6d 61 6b 65 68 6c 70 2e 6f 62 6a 20 64 65 6c 20 makehlp.obj del
dc30: 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 $(WIN_DIR)\nmake
dc40: 68 6c 70 2e 6f 62 6a 0a 09 40 69 66 20 65 78 69 hlp.obj..@if exi
dc50: 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d st $(WIN_DIR)\nm
dc60: 61 6b 65 68 6c 70 2e 65 78 65 20 64 65 6c 20 24 akehlp.exe del $
dc70: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
dc80: 6c 70 2e 65 78 65 0a 09 40 69 66 20 65 78 69 73 lp.exe..@if exis
dc90: 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 t $(WIN_DIR)\nma
dca0: 6b 65 68 6c 70 2e 6f 75 74 20 64 65 6c 20 24 28 kehlp.out del $(
dcb0: 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c WIN_DIR)\nmakehl
dcc0: 70 2e 6f 75 74 0a 09 40 65 63 68 6f 20 43 6c 65 p.out..@echo Cle
dcd0: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
dce0: 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 2e \nmhlp-out.txt .
dcf0: 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 ....@if exist $(
dd00: 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f WIN_DIR)\nmhlp-o
dd10: 75 74 2e 74 78 74 20 64 65 6c 20 24 28 57 49 4e ut.txt del $(WIN
dd20: 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e _DIR)\nmhlp-out.
dd30: 74 78 74 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e txt..@echo Clean
dd40: 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f ing $(WIN_DIR)\_
dd50: 6a 75 6e 6b 2e 70 63 68 20 2e 2e 2e 0a 09 40 69 junk.pch .....@i
dd60: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
dd70: 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 64 65 6c R)\_junk.pch del
dd80: 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f 6a 75 6e $(WIN_DIR)\_jun
dd90: 6b 2e 70 63 68 0a 09 40 65 63 68 6f 20 43 6c 65 k.pch..@echo Cle
dda0: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
ddb0: 5c 76 65 72 63 6c 2e 78 2c 20 76 65 72 63 6c 2e \vercl.x, vercl.
ddc0: 69 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 i .....@if exist
ddd0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 $(WIN_DIR)\verc
dde0: 6c 2e 78 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 l.x del $(WIN_DI
ddf0: 52 29 5c 76 65 72 63 6c 2e 78 0a 09 40 69 66 20 R)\vercl.x..@if
de00: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
de10: 5c 76 65 72 63 6c 2e 69 20 64 65 6c 20 24 28 57 \vercl.i del $(W
de20: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 69 0a IN_DIR)\vercl.i.
de30: 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 6e 67 20 .@echo Cleaning
de40: 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 $(WIN_DIR)\versi
de50: 6f 6e 73 2e 76 63 2c 20 76 65 72 73 69 6f 6e 2e ons.vc, version.
de60: 76 63 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 vc .....@if exis
de70: 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 t $(WIN_DIR)\ver
de80: 73 69 6f 6e 73 2e 76 63 20 64 65 6c 20 24 28 57 sions.vc del $(W
de90: 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 73 IN_DIR)\versions
dea0: 2e 76 63 0a 09 40 69 66 20 65 78 69 73 74 20 24 .vc..@if exist $
deb0: 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f (WIN_DIR)\versio
dec0: 6e 2e 76 63 20 64 65 6c 20 24 28 57 49 4e 5f 44 n.vc del $(WIN_D
ded0: 49 52 29 5c 76 65 72 73 69 6f 6e 2e 76 63 0a 0a IR)\version.vc..
dee0: 64 65 66 61 75 6c 74 2d 68 6f 73 65 3a 20 64 65 default-hose: de
def0: 66 61 75 6c 74 2d 63 6c 65 61 6e 0a 09 40 65 63 fault-clean..@ec
df00: 68 6f 20 48 6f 73 69 6e 67 20 24 28 4f 55 54 5f ho Hosing $(OUT_
df10: 44 49 52 29 5c 2a 20 2e 2e 2e 0a 09 40 69 66 20 DIR)\* .....@if
df20: 65 78 69 73 74 20 24 28 4f 55 54 5f 44 49 52 29 exist $(OUT_DIR)
df30: 5c 6e 75 6c 20 24 28 52 4d 44 49 52 29 20 24 28 \nul $(RMDIR) $(
df40: 4f 55 54 5f 44 49 52 29 0a 0a 23 20 4f 6e 6c 79 OUT_DIR)..# Only
df50: 20 66 6f 72 20 62 61 63 6b 77 61 72 64 20 63 6f for backward co
df60: 6d 70 61 74 69 62 69 6c 69 74 79 0a 64 65 66 61 mpatibility.defa
df70: 75 6c 74 2d 64 69 73 74 63 6c 65 61 6e 3a 20 64 ult-distclean: d
df80: 65 66 61 75 6c 74 2d 68 6f 73 65 0a 0a 64 65 66 efault-hose..def
df90: 61 75 6c 74 2d 73 65 74 75 70 3a 0a 09 40 69 66 ault-setup:..@if
dfa0: 20 6e 6f 74 20 65 78 69 73 74 20 24 28 4f 55 54 not exist $(OUT
dfb0: 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 69 72 20 _DIR)\nul mkdir
dfc0: 24 28 4f 55 54 5f 44 49 52 29 0a 09 40 69 66 20 $(OUT_DIR)..@if
dfd0: 6e 6f 74 20 65 78 69 73 74 20 24 28 54 4d 50 5f not exist $(TMP_
dfe0: 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 69 72 20 24 DIR)\nul mkdir $
dff0: 28 54 4d 50 5f 44 49 52 29 0a 0a 21 69 66 20 22 (TMP_DIR)..!if "
e000: 24 28 54 45 53 54 50 41 54 29 22 20 21 3d 20 22 $(TESTPAT)" != "
e010: 22 0a 54 45 53 54 46 4c 41 47 53 20 3d 20 24 28 ".TESTFLAGS = $(
e020: 54 45 53 54 46 4c 41 47 53 29 20 2d 66 69 6c 65 TESTFLAGS) -file
e030: 20 24 28 54 45 53 54 50 41 54 29 0a 21 65 6e 64 $(TESTPAT).!end
e040: 69 66 0a 0a 64 65 66 61 75 6c 74 2d 74 65 73 74 if..default-test
e050: 3a 20 64 65 66 61 75 6c 74 2d 73 65 74 75 70 20 : default-setup
e060: 24 28 50 52 4f 4a 45 43 54 29 0a 09 40 73 65 74 $(PROJECT)..@set
e070: 20 54 43 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 TCLLIBPATH=$(OU
e080: 54 5f 44 49 52 3a 5c 3d 2f 29 0a 09 40 69 66 20 T_DIR:\=/)..@if
e090: 65 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 exist $(LIBDIR)
e0a0: 66 6f 72 20 25 66 20 69 6e 20 28 22 24 28 4c 49 for %f in ("$(LI
e0b0: 42 44 49 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f BDIR)\*.tcl") do
e0c0: 20 40 24 28 43 4f 50 59 29 20 25 66 20 22 24 28 @$(COPY) %f "$(
e0d0: 4f 55 54 5f 44 49 52 29 22 0a 09 63 64 20 22 24 OUT_DIR)"..cd "$
e0e0: 28 54 45 53 54 44 49 52 29 22 20 26 26 20 24 28 (TESTDIR)" && $(
e0f0: 44 45 42 55 47 47 45 52 29 20 24 28 54 43 4c 53 DEBUGGER) $(TCLS
e100: 48 29 20 61 6c 6c 2e 74 63 6c 20 24 28 54 45 53 H) all.tcl $(TES
e110: 54 46 4c 41 47 53 29 0a 0a 64 65 66 61 75 6c 74 TFLAGS)..default
e120: 2d 73 68 65 6c 6c 3a 20 64 65 66 61 75 6c 74 2d -shell: default-
e130: 73 65 74 75 70 20 24 28 50 52 4f 4a 45 43 54 29 setup $(PROJECT)
e140: 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 50 41 54 ..@set TCLLIBPAT
e150: 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f 29 H=$(OUT_DIR:\=/)
e160: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 4c 49 ..@if exist $(LI
e170: 42 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 BDIR) for %f in
e180: 28 22 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 ("$(LIBDIR)\*.tc
e190: 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 l") do @$(COPY)
e1a0: 25 66 20 22 24 28 4f 55 54 5f 44 49 52 29 22 0a %f "$(OUT_DIR)".
e1b0: 09 24 28 44 45 42 55 47 47 45 52 29 20 24 28 54 .$(DEBUGGER) $(T
e1c0: 43 4c 53 48 29 0a 0a 23 20 47 65 6e 65 72 61 74 CLSH)..# Generat
e1d0: 69 6f 6e 20 6f 66 20 57 69 6e 64 6f 77 73 20 76 ion of Windows v
e1e0: 65 72 73 69 6f 6e 20 72 65 73 6f 75 72 63 65 0a ersion resource.
e1f0: 21 69 66 64 65 66 20 52 43 46 49 4c 45 0a 0a 23 !ifdef RCFILE..#
e200: 20 4e 6f 74 65 3a 20 64 6f 6e 27 74 20 75 73 65 Note: don't use
e210: 20 24 2a 2a 20 69 6e 20 62 65 6c 6f 77 20 72 75 $** in below ru
e220: 6c 65 20 62 65 63 61 75 73 65 20 74 68 65 72 65 le because there
e230: 20 6d 61 79 20 62 65 20 6f 74 68 65 72 20 64 65 may be other de
e240: 70 65 6e 64 65 6e 63 69 65 73 0a 23 20 61 6e 64 pendencies.# and
e250: 20 6f 6e 6c 79 20 74 68 65 20 22 6d 61 69 6e 22 only the "main"
e260: 20 72 63 20 6d 75 73 74 20 62 65 20 70 61 73 73 rc must be pass
e270: 65 64 20 74 6f 20 74 68 65 20 72 65 73 6f 75 72 ed to the resour
e280: 63 65 20 63 6f 6d 70 69 6c 65 72 0a 24 28 54 4d ce compiler.$(TM
e290: 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 P_DIR)\$(PROJECT
e2a0: 29 2e 72 65 73 3a 20 24 28 52 43 44 49 52 29 5c ).res: $(RCDIR)\
e2b0: 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0a 09 24 $(PROJECT).rc..$
e2c0: 28 52 45 53 43 4d 44 29 20 24 28 52 43 44 49 52 (RESCMD) $(RCDIR
e2d0: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0a )\$(PROJECT).rc.
e2e0: 0a 21 65 6c 73 65 0a 0a 23 20 49 66 20 70 61 72 .!else..# If par
e2f0: 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 61 73 ent makefile has
e300: 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 61 20 72 not defined a r
e310: 65 73 6f 75 72 63 65 20 64 65 66 69 6e 69 74 69 esource definiti
e320: 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 65 20 77 69 on file,.# we wi
e330: 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f 6e 65 20 ll generate one
e340: 66 72 6f 6d 20 73 74 61 6e 64 61 72 64 20 74 65 from standard te
e350: 6d 70 6c 61 74 65 2e 0a 24 28 54 4d 50 5f 44 49 mplate..$(TMP_DI
e360: 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 R)\$(PROJECT).re
e370: 73 3a 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 s: $(TMP_DIR)\$(
e380: 50 52 4f 4a 45 43 54 29 2e 72 63 0a 0a 24 28 54 PROJECT).rc..$(T
e390: 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 MP_DIR)\$(PROJEC
e3a0: 54 29 2e 72 63 3a 0a 09 40 24 28 43 4f 50 59 29 T).rc:..@$(COPY)
e3b0: 20 3c 3c 20 24 28 54 4d 50 5f 44 49 52 29 5c 24 << $(TMP_DIR)\$
e3c0: 28 50 52 4f 4a 45 43 54 29 2e 72 63 0a 23 69 6e (PROJECT).rc.#in
e3d0: 63 6c 75 64 65 20 3c 77 69 6e 76 65 72 2e 68 3e clude <winver.h>
e3e0: 0a 0a 56 53 5f 56 45 52 53 49 4f 4e 5f 49 4e 46 ..VS_VERSION_INF
e3f0: 4f 20 56 45 52 53 49 4f 4e 49 4e 46 4f 0a 20 46 O VERSIONINFO. F
e400: 49 4c 45 56 45 52 53 49 4f 4e 09 43 4f 4d 4d 41 ILEVERSION.COMMA
e410: 56 45 52 53 49 4f 4e 0a 20 50 52 4f 44 55 43 54 VERSION. PRODUCT
e420: 56 45 52 53 49 4f 4e 09 43 4f 4d 4d 41 56 45 52 VERSION.COMMAVER
e430: 53 49 4f 4e 0a 20 46 49 4c 45 46 4c 41 47 53 4d SION. FILEFLAGSM
e440: 41 53 4b 09 30 78 33 66 4c 0a 23 69 66 64 65 66 ASK.0x3fL.#ifdef
e450: 20 44 45 42 55 47 0a 20 46 49 4c 45 46 4c 41 47 DEBUG. FILEFLAG
e460: 53 09 56 53 5f 46 46 5f 44 45 42 55 47 0a 23 65 S.VS_FF_DEBUG.#e
e470: 6c 73 65 0a 20 46 49 4c 45 46 4c 41 47 53 09 30 lse. FILEFLAGS.0
e480: 78 30 4c 0a 23 65 6e 64 69 66 0a 20 46 49 4c 45 x0L.#endif. FILE
e490: 4f 53 09 09 56 4f 53 5f 4e 54 5f 57 49 4e 44 4f OS..VOS_NT_WINDO
e4a0: 57 53 33 32 0a 20 46 49 4c 45 54 59 50 45 09 56 WS32. FILETYPE.V
e4b0: 46 54 5f 44 4c 4c 0a 20 46 49 4c 45 53 55 42 54 FT_DLL. FILESUBT
e4c0: 59 50 45 09 30 78 30 4c 0a 42 45 47 49 4e 0a 20 YPE.0x0L.BEGIN.
e4d0: 20 20 20 42 4c 4f 43 4b 20 22 53 74 72 69 6e 67 BLOCK "String
e4e0: 46 69 6c 65 49 6e 66 6f 22 0a 20 20 20 20 42 45 FileInfo". BE
e4f0: 47 49 4e 0a 09 42 4c 4f 43 4b 20 22 30 34 30 39 GIN..BLOCK "0409
e500: 30 34 62 30 22 0a 09 42 45 47 49 4e 0a 09 20 20 04b0"..BEGIN..
e510: 20 20 56 41 4c 55 45 20 22 46 69 6c 65 44 65 73 VALUE "FileDes
e520: 63 72 69 70 74 69 6f 6e 22 2c 20 20 22 54 63 6c cription", "Tcl
e530: 20 65 78 74 65 6e 73 69 6f 6e 20 22 20 50 52 4f extension " PRO
e540: 4a 45 43 54 0a 09 20 20 20 20 56 41 4c 55 45 20 JECT.. VALUE
e550: 22 4f 72 69 67 69 6e 61 6c 46 69 6c 65 6e 61 6d "OriginalFilenam
e560: 65 22 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 0a 09 e", PRJLIBNAME..
e570: 20 20 20 20 56 41 4c 55 45 20 22 46 69 6c 65 56 VALUE "FileV
e580: 65 72 73 69 6f 6e 22 2c 20 20 20 20 20 20 44 4f ersion", DO
e590: 54 56 45 52 53 49 4f 4e 0a 09 20 20 20 20 56 41 TVERSION.. VA
e5a0: 4c 55 45 20 22 50 72 6f 64 75 63 74 4e 61 6d 65 LUE "ProductName
e5b0: 22 2c 20 20 20 20 20 20 22 50 61 63 6b 61 67 65 ", "Package
e5c0: 20 22 20 50 52 4f 4a 45 43 54 20 22 20 66 6f 72 " PROJECT " for
e5d0: 20 54 63 6c 22 0a 09 20 20 20 20 56 41 4c 55 45 Tcl".. VALUE
e5e0: 20 22 50 72 6f 64 75 63 74 56 65 72 73 69 6f 6e "ProductVersion
e5f0: 22 2c 20 20 20 44 4f 54 56 45 52 53 49 4f 4e 0a ", DOTVERSION.
e600: 09 45 4e 44 0a 20 20 20 20 45 4e 44 0a 20 20 20 .END. END.
e610: 20 42 4c 4f 43 4b 20 22 56 61 72 46 69 6c 65 49 BLOCK "VarFileI
e620: 6e 66 6f 22 0a 20 20 20 20 42 45 47 49 4e 0a 09 nfo". BEGIN..
e630: 56 41 4c 55 45 20 22 54 72 61 6e 73 6c 61 74 69 VALUE "Translati
e640: 6f 6e 22 2c 20 30 78 34 30 39 2c 20 31 32 30 30 on", 0x409, 1200
e650: 0a 20 20 20 20 45 4e 44 0a 45 4e 44 0a 0a 3c 3c . END.END..<<
e660: 0a 0a 21 65 6e 64 69 66 20 23 20 69 66 64 65 66 ..!endif # ifdef
e670: 20 52 43 46 49 4c 45 0a 0a 21 69 66 6e 64 65 66 RCFILE..!ifndef
e680: 20 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 DISABLE_IMPLICI
e690: 54 5f 52 55 4c 45 53 0a 44 49 53 41 42 4c 45 5f T_RULES.DISABLE_
e6a0: 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 20 3d IMPLICIT_RULES =
e6b0: 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 21 0.!endif..!if !
e6c0: 24 28 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 $(DISABLE_IMPLIC
e6d0: 49 54 5f 52 55 4c 45 53 29 0a 23 20 49 6d 70 6c IT_RULES).# Impl
e6e0: 69 63 69 74 20 72 75 6c 65 20 64 65 66 69 6e 69 icit rule defini
e6f0: 74 69 6f 6e 73 20 2d 20 6f 6e 6c 79 20 66 6f 72 tions - only for
e700: 20 62 75 69 6c 64 69 6e 67 20 6c 69 62 72 61 72 building librar
e710: 79 20 6f 62 6a 65 63 74 73 2e 20 46 6f 72 20 73 y objects. For s
e720: 74 75 62 73 20 61 6e 64 0a 23 20 6d 61 69 6e 20 tubs and.# main
e730: 61 70 70 6c 69 63 61 74 69 6f 6e 2c 20 74 68 65 application, the
e740: 20 6d 61 6b 65 66 69 6c 65 20 73 68 6f 75 6c 64 makefile should
e750: 20 64 65 66 69 6e 65 20 65 78 70 6c 69 63 69 74 define explicit
e760: 20 72 75 6c 65 73 2e 0a 0a 7b 24 28 52 4f 4f 54 rules...{$(ROOT
e770: 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d )}.c{$(TMP_DIR)}
e780: 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 .obj::..$(CCPKGC
e790: 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b MD) @<<.$<.<<..{
e7a0: 24 28 57 49 4e 5f 44 49 52 29 7d 2e 63 7b 24 28 $(WIN_DIR)}.c{$(
e7b0: 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a TMP_DIR)}.obj::.
e7c0: 09 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c .$(CCPKGCMD) @<<
e7d0: 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 47 45 4e 45 52 .$<.<<..{$(GENER
e7e0: 49 43 44 49 52 29 7d 2e 63 7b 24 28 54 4d 50 5f ICDIR)}.c{$(TMP_
e7f0: 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 DIR)}.obj::..$(C
e800: 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a CPKGCMD) @<<.$<.
e810: 3c 3c 0a 0a 7b 24 28 43 4f 4d 50 41 54 44 49 52 <<..{$(COMPATDIR
e820: 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d )}.c{$(TMP_DIR)}
e830: 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 .obj::..$(CCPKGC
e840: 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b MD) @<<.$<.<<..{
e850: 24 28 52 43 44 49 52 29 7d 2e 72 63 7b 24 28 54 $(RCDIR)}.rc{$(T
e860: 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0a 09 24 MP_DIR)}.res:..$
e870: 28 52 45 53 43 4d 44 29 20 24 3c 0a 0a 7b 24 28 (RESCMD) $<..{$(
e880: 57 49 4e 5f 44 49 52 29 7d 2e 72 63 7b 24 28 54 WIN_DIR)}.rc{$(T
e890: 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0a 09 24 MP_DIR)}.res:..$
e8a0: 28 52 45 53 43 4d 44 29 20 24 3c 0a 0a 7b 24 28 (RESCMD) $<..{$(
e8b0: 54 4d 50 5f 44 49 52 29 7d 2e 72 63 7b 24 28 54 TMP_DIR)}.rc{$(T
e8c0: 4d 50 5f 44 49 52 29 7d 2e 72 65 73 3a 0a 09 24 MP_DIR)}.res:..$
e8d0: 28 52 45 53 43 4d 44 29 20 24 3c 0a 0a 2e 53 55 (RESCMD) $<...SU
e8e0: 46 46 49 58 45 53 3a 0a 2e 53 55 46 46 49 58 45 FFIXES:..SUFFIXE
e8f0: 53 3a 2e 63 20 2e 72 63 0a 0a 21 65 6e 64 69 66 S:.c .rc..!endif
e900: 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
e910: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e920: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e930: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
e940: 23 23 0a 23 20 31 34 2e 20 53 61 6e 69 74 79 20 ##.# 14. Sanity
e950: 63 68 65 63 6b 20 73 65 6c 65 63 74 65 64 20 6f check selected o
e960: 70 74 69 6f 6e 73 20 61 67 61 69 6e 73 74 20 54 ptions against T
e970: 63 6c 20 62 75 69 6c 64 20 6f 70 74 69 6f 6e 73 cl build options
e980: 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 .# When building
e990: 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 2c 20 63 an extension, c
e9a0: 65 72 74 61 69 6e 20 63 6f 6e 66 69 67 75 72 61 ertain configura
e9b0: 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 20 73 68 6f tion options sho
e9c0: 75 6c 64 0a 23 20 6d 61 74 63 68 20 74 68 65 20 uld.# match the
e9d0: 6f 6e 65 73 20 75 73 65 64 20 77 68 65 6e 20 54 ones used when T
e9e0: 63 6c 20 77 61 73 20 62 75 69 6c 74 2e 20 48 65 cl was built. He
e9f0: 72 65 20 77 65 20 63 68 65 63 6b 20 61 6e 64 0a re we check and.
ea00: 23 20 77 61 72 6e 20 6f 6e 20 61 20 6d 69 73 6d # warn on a mism
ea10: 61 74 63 68 2e 0a 21 69 66 20 21 24 28 44 4f 49 atch..!if !$(DOI
ea20: 4e 47 5f 54 43 4c 29 0a 0a 21 69 66 20 24 28 54 NG_TCL)..!if $(T
ea30: 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 69 CLINSTALL) # Bui
ea40: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 61 6e lding against an
ea50: 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0a 21 installed Tcl.!
ea60: 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c if exist("$(_TCL
ea70: 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 74 DIR)\lib\nmake\t
ea80: 63 6c 2e 6e 6d 61 6b 65 22 29 0a 54 43 4c 4e 4d cl.nmake").TCLNM
ea90: 41 4b 45 43 4f 4e 46 49 47 20 3d 20 22 24 28 5f AKECONFIG = "$(_
eaa0: 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b TCLDIR)\lib\nmak
eab0: 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0a 21 65 6e e\tcl.nmake".!en
eac0: 64 69 66 0a 21 65 6c 73 65 20 23 20 21 24 28 54 dif.!else # !$(T
ead0: 43 4c 49 4e 53 54 41 4c 4c 29 20 2d 20 62 75 69 CLINSTALL) - bui
eae0: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 lding against Tc
eaf0: 6c 20 73 6f 75 72 63 65 0a 21 69 66 20 65 78 69 l source.!if exi
eb00: 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 st("$(_TCLDIR)\w
eb10: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
eb20: 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 0a 54 43 )\tcl.nmake").TC
eb30: 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 09 3d 20 22 LNMAKECONFIG.= "
eb40: 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 $(_TCLDIR)\win\$
eb50: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 (BUILDDIRTOP)\tc
eb60: 6c 2e 6e 6d 61 6b 65 22 0a 21 65 6e 64 69 66 0a l.nmake".!endif.
eb70: 21 65 6e 64 69 66 20 23 20 54 43 4c 49 4e 53 54 !endif # TCLINST
eb80: 41 4c 4c 0a 0a 21 69 66 20 24 28 43 4f 4e 46 49 ALL..!if $(CONFI
eb90: 47 5f 43 48 45 43 4b 29 0a 21 69 66 64 65 66 20 G_CHECK).!ifdef
eba0: 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 0a 21 TCLNMAKECONFIG.!
ebb0: 69 6e 63 6c 75 64 65 20 24 28 54 43 4c 4e 4d 41 include $(TCLNMA
ebc0: 4b 45 43 4f 4e 46 49 47 29 0a 0a 21 69 66 20 64 KECONFIG)..!if d
ebd0: 65 66 69 6e 65 64 28 43 4f 52 45 5f 4d 41 43 48 efined(CORE_MACH
ebe0: 49 4e 45 29 20 26 26 20 22 24 28 43 4f 52 45 5f INE) && "$(CORE_
ebf0: 4d 41 43 48 49 4e 45 29 22 20 21 3d 20 22 24 28 MACHINE)" != "$(
ec00: 4d 41 43 48 49 4e 45 29 22 0a 21 65 72 72 6f 72 MACHINE)".!error
ec10: 20 45 52 52 4f 52 3a 20 42 75 69 6c 64 20 74 61 ERROR: Build ta
ec20: 72 67 65 74 20 28 24 28 4d 41 43 48 49 4e 45 29 rget ($(MACHINE)
ec30: 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 ) does not match
ec40: 20 74 68 65 20 54 63 6c 20 6c 69 62 72 61 72 79 the Tcl library
ec50: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 28 24 architecture ($
ec60: 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 29 2e (CORE_MACHINE)).
ec70: 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 .!endif.!if $(TC
ec80: 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 20 L_VERSION) < 87
ec90: 26 26 20 64 65 66 69 6e 65 64 28 43 4f 52 45 5f && defined(CORE_
eca0: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
ecb0: 29 20 26 26 20 24 28 43 4f 52 45 5f 55 53 45 5f ) && $(CORE_USE_
ecc0: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 20 21 3d THREAD_ALLOC) !=
ecd0: 20 24 28 55 53 45 5f 54 48 52 45 41 44 5f 41 4c $(USE_THREAD_AL
ece0: 4c 4f 43 29 0a 21 6d 65 73 73 61 67 65 20 57 41 LOC).!message WA
ecf0: 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20 6f 66 20 RNING: Value of
ed00: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
ed10: 20 28 24 28 55 53 45 5f 54 48 52 45 41 44 5f 41 ($(USE_THREAD_A
ed20: 4c 4c 4f 43 29 29 20 64 6f 65 73 20 6e 6f 74 20 LLOC)) does not
ed30: 6d 61 74 63 68 20 69 74 73 20 54 63 6c 20 63 6f match its Tcl co
ed40: 72 65 20 76 61 6c 75 65 20 28 24 28 43 4f 52 45 re value ($(CORE
ed50: 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f _USE_THREAD_ALLO
ed60: 43 29 29 2e 0a 21 65 6e 64 69 66 0a 21 69 66 20 C))..!endif.!if
ed70: 64 65 66 69 6e 65 64 28 43 4f 52 45 5f 44 45 42 defined(CORE_DEB
ed80: 55 47 29 20 26 26 20 24 28 43 4f 52 45 5f 44 45 UG) && $(CORE_DE
ed90: 42 55 47 29 20 21 3d 20 24 28 44 45 42 55 47 29 BUG) != $(DEBUG)
eda0: 0a 21 6d 65 73 73 61 67 65 20 57 41 52 4e 49 4e .!message WARNIN
edb0: 47 3a 20 56 61 6c 75 65 20 6f 66 20 44 45 42 55 G: Value of DEBU
edc0: 47 20 28 24 28 44 45 42 55 47 29 29 20 64 6f 65 G ($(DEBUG)) doe
edd0: 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 73 20 s not match its
ede0: 54 63 6c 20 6c 69 62 72 61 72 79 20 63 6f 6e 66 Tcl library conf
edf0: 69 67 75 72 61 74 69 6f 6e 20 28 24 28 44 45 42 iguration ($(DEB
ee00: 55 47 29 29 2e 0a 21 65 6e 64 69 66 0a 21 65 6e UG))..!endif.!en
ee10: 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 54 43 dif..!endif # TC
ee20: 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 0a 0a 21 65 LNMAKECONFIG..!e
ee30: 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e 47 5f ndif # !$(DOING_
ee40: 54 43 4c 29 0a 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d TCL)...#--------
ee50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ee60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ee70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
ee80: 2d 2d 0a 23 20 44 69 73 70 6c 61 79 20 73 74 61 --.# Display sta
ee90: 74 73 20 62 65 69 6e 67 20 75 73 65 64 2e 0a 23 ts being used..#
eea0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
eeb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
eec0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
eed0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 21 69 66 20 ----------..!if
eee0: 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 21 6d !$(DOING_TCL).!m
eef0: 65 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 essage *** Build
ef00: 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 ing against Tcl
ef10: 61 74 20 27 24 28 5f 54 43 4c 44 49 52 29 27 0a at '$(_TCLDIR)'.
ef20: 21 65 6e 64 69 66 0a 21 69 66 20 21 24 28 44 4f !endif.!if !$(DO
ef30: 49 4e 47 5f 54 4b 29 20 26 26 20 24 28 4e 45 45 ING_TK) && $(NEE
ef40: 44 5f 54 4b 29 0a 21 6d 65 73 73 61 67 65 20 2a D_TK).!message *
ef50: 2a 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 ** Building agai
ef60: 6e 73 74 20 54 6b 20 61 74 20 27 24 28 5f 54 4b nst Tk at '$(_TK
ef70: 44 49 52 29 27 0a 21 65 6e 64 69 66 0a 21 6d 65 DIR)'.!endif.!me
ef80: 73 73 61 67 65 20 2a 2a 2a 20 49 6e 74 65 72 6d ssage *** Interm
ef90: 65 64 69 61 74 65 20 64 69 72 65 63 74 6f 72 79 ediate directory
efa0: 20 77 69 6c 6c 20 62 65 20 27 24 28 54 4d 50 5f will be '$(TMP_
efb0: 44 49 52 29 27 0a 21 6d 65 73 73 61 67 65 20 2a DIR)'.!message *
efc0: 2a 2a 20 4f 75 74 70 75 74 20 64 69 72 65 63 74 ** Output direct
efd0: 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 24 28 4f ory will be '$(O
efe0: 55 54 5f 44 49 52 29 27 0a 21 6d 65 73 73 61 67 UT_DIR)'.!messag
eff0: 65 20 2a 2a 2a 20 49 6e 73 74 61 6c 6c 61 74 69 e *** Installati
f000: 6f 6e 2c 20 69 66 20 73 65 6c 65 63 74 65 64 2c on, if selected,
f010: 20 77 69 6c 6c 20 62 65 20 69 6e 20 27 24 28 5f will be in '$(_
f020: 49 4e 53 54 41 4c 4c 44 49 52 29 27 0a 21 6d 65 INSTALLDIR)'.!me
f030: 73 73 61 67 65 20 2a 2a 2a 20 53 75 66 66 69 78 ssage *** Suffix
f040: 20 66 6f 72 20 62 69 6e 61 72 69 65 73 20 77 69 for binaries wi
f050: 6c 6c 20 62 65 20 27 24 28 53 55 46 58 29 27 0a ll be '$(SUFX)'.
f060: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d !message *** Com
f070: 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 24 28 piler version $(
f080: 56 43 56 45 52 29 2e 20 54 61 72 67 65 74 20 24 VCVER). Target $
f090: 28 4d 41 43 48 49 4e 45 29 2c 20 68 6f 73 74 20 (MACHINE), host
f0a0: 24 28 4e 41 54 49 56 45 5f 41 52 43 48 29 2e 0a $(NATIVE_ARCH)..
f0b0: 0a 21 65 6e 64 69 66 20 23 20 69 66 64 65 66 20 .!endif # ifdef
f0c0: 5f 52 55 4c 45 53 5f 56 43 0a _RULES_VC.