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 57 65 20 6e 65 65 64 20 61 20 1..# We need a
0360: 6e 6d 61 6b 65 68 6c 70 20 74 68 61 74 20 77 69 nmakehlp that wi
0370: 6c 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 68 6f ll run on the ho
0380: 73 74 20 6d 61 63 68 69 6e 65 20 61 73 20 70 61 st machine as pa
0390: 72 74 20 6f 66 20 74 68 65 20 62 75 69 6c 64 2e rt of the build.
03a0: 0a 23 20 69 66 20 54 43 4c 53 48 5f 4e 41 54 49 .# if TCLSH_NATI
03b0: 56 45 20 69 73 20 73 65 74 20 66 6f 72 20 63 72 VE is set for cr
03c0: 6f 73 73 20 63 6f 6d 70 69 6c 61 74 69 6f 6e 2c oss compilation,
03d0: 20 77 65 27 6c 6c 20 74 72 79 20 74 6f 20 66 69 we'll try to fi
03e0: 6e 64 20 61 6e 20 61 73 73 6f 63 69 61 74 65 64 nd an associated
03f0: 20 0a 23 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 .# nmakehlp.exe
0400: 20 74 68 61 74 20 72 75 6e 73 20 6f 6e 20 74 68 that runs on th
0410: 65 20 62 75 69 6c 64 20 61 72 63 68 69 74 65 63 e build architec
0420: 74 75 72 65 2e 0a 21 69 66 64 65 66 20 54 43 4c ture..!ifdef TCL
0430: 53 48 5f 4e 41 54 49 56 45 0a 21 6d 65 73 73 61 SH_NATIVE.!messa
0440: 67 65 20 2a 2a 2a 20 55 73 69 6e 67 20 54 43 4c ge *** Using TCL
0450: 53 48 5f 4e 41 54 49 56 45 3d 24 28 54 43 4c 53 SH_NATIVE=$(TCLS
0460: 48 5f 4e 41 54 49 56 45 29 0a 21 69 66 6e 64 65 H_NATIVE).!ifnde
0470: 66 20 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 f NMAKEHLP_NATIV
0480: 45 0a 21 69 66 20 5b 24 28 54 43 4c 53 48 5f 4e E.!if [$(TCLSH_N
0490: 41 54 49 56 45 29 20 66 69 6e 64 5f 6e 6d 61 6b ATIVE) find_nmak
04a0: 65 68 6c 70 2e 74 63 6c 20 24 28 54 43 4c 53 48 ehlp.tcl $(TCLSH
04b0: 5f 4e 41 54 49 56 45 29 20 3e 20 66 69 6e 64 5f _NATIVE) > find_
04c0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 nmakehlp.out].!e
04d0: 72 72 6f 72 20 54 43 4c 53 48 5f 4e 41 54 49 56 rror TCLSH_NATIV
04e0: 45 20 69 73 20 73 65 74 2c 20 62 75 74 20 75 6e E is set, but un
04f0: 61 62 6c 65 20 74 6f 20 66 69 6e 64 20 61 73 73 able to find ass
0500: 6f 63 69 61 74 65 64 20 6e 6d 61 6b 65 68 6c 70 ociated nmakehlp
0510: 2e 65 78 65 20 6e 65 61 72 62 79 2e 0a 21 65 6c .exe nearby..!el
0520: 73 65 0a 21 69 6e 63 6c 75 64 65 20 66 69 6e 64 se.!include find
0530: 5f 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 21 65 _nmakehlp.out.!e
0540: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e 64 ndif.!endif.!end
0550: 69 66 0a 0a 21 69 66 6e 64 65 66 20 4e 4d 41 4b if..!ifndef NMAK
0560: 45 48 4c 50 5f 4e 41 54 49 56 45 0a 4e 4d 41 4b EHLP_NATIVE.NMAK
0570: 45 48 4c 50 5f 4e 41 54 49 56 45 3d 6e 6d 61 6b EHLP_NATIVE=nmak
0580: 65 68 6c 70 0a 21 65 6e 64 69 66 0a 0a 23 20 54 ehlp.!endif..# T
0590: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 he following mac
05a0: 72 6f 73 20 64 65 66 69 6e 65 20 74 68 65 20 76 ros define the v
05b0: 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 72 75 ersion of the ru
05c0: 6c 65 73 2e 76 63 20 6e 6d 61 6b 65 20 62 75 69 les.vc nmake bui
05d0: 6c 64 20 73 79 73 74 65 6d 0a 23 20 46 6f 72 20 ld system.# For
05e0: 6d 6f 64 69 66 69 63 61 74 69 6f 6e 73 20 74 68 modifications th
05f0: 61 74 20 61 72 65 20 6e 6f 74 20 62 61 63 6b 77 at are not backw
0600: 61 72 64 2d 63 6f 6d 70 61 74 69 62 6c 65 2c 20 ard-compatible,
0610: 79 6f 75 20 2a 6d 75 73 74 2a 20 63 68 61 6e 67 you *must* chang
0620: 65 0a 23 20 74 68 65 20 6d 61 6a 6f 72 20 76 65 e.# the major ve
0630: 72 73 69 6f 6e 2e 0a 52 55 4c 45 53 5f 56 45 52 rsion..RULES_VER
0640: 53 49 4f 4e 5f 4d 41 4a 4f 52 20 3d 20 31 0a 52 SION_MAJOR = 1.R
0650: 55 4c 45 53 5f 56 45 52 53 49 4f 4e 5f 4d 49 4e ULES_VERSION_MIN
0660: 4f 52 20 3d 20 31 37 0a 0a 23 20 54 68 65 20 50 OR = 17..# The P
0670: 52 4f 4a 45 43 54 20 6d 61 63 72 6f 20 6d 75 73 ROJECT macro mus
0680: 74 20 62 65 20 64 65 66 69 6e 65 64 20 62 79 20 t be defined by
0690: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 2e parent makefile.
06a0: 0a 21 69 66 20 22 24 28 50 52 4f 4a 45 43 54 29 .!if "$(PROJECT)
06b0: 22 20 3d 3d 20 22 22 0a 21 65 72 72 6f 72 20 2a " == "".!error *
06c0: 2a 2a 20 45 72 72 6f 72 3a 20 4d 61 63 72 6f 20 ** Error: Macro
06d0: 50 52 4f 4a 45 43 54 20 6e 6f 74 20 64 65 66 69 PROJECT not defi
06e0: 6e 65 64 21 20 50 6c 65 61 73 65 20 64 65 66 69 ned! Please defi
06f0: 6e 65 20 69 74 20 62 65 66 6f 72 65 20 69 6e 63 ne it before inc
0700: 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 76 63 0a luding rules.vc.
0710: 21 65 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 50 !endif..!if "$(P
0720: 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 RJ_PACKAGE_TCLNA
0730: 4d 45 29 22 20 3d 3d 20 22 22 0a 50 52 4a 5f 50 ME)" == "".PRJ_P
0740: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 20 3d ACKAGE_TCLNAME =
0750: 20 24 28 50 52 4f 4a 45 43 54 29 0a 21 65 6e 64 $(PROJECT).!end
0760: 69 66 0a 0a 23 20 41 6c 73 6f 20 73 70 65 63 69 if..# Also speci
0770: 61 6c 20 63 61 73 65 20 54 63 6c 20 61 6e 64 20 al case Tcl and
0780: 54 6b 20 74 6f 20 73 61 76 65 20 73 6f 6d 65 20 Tk to save some
0790: 74 79 70 69 6e 67 20 6c 61 74 65 72 0a 44 4f 49 typing later.DOI
07a0: 4e 47 5f 54 43 4c 20 3d 20 30 0a 44 4f 49 4e 47 NG_TCL = 0.DOING
07b0: 5f 54 4b 20 20 3d 20 30 0a 21 69 66 20 22 24 28 _TK = 0.!if "$(
07c0: 50 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 74 63 PROJECT)" == "tc
07d0: 6c 22 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 31 l".DOING_TCL = 1
07e0: 0a 21 65 6c 73 65 69 66 20 22 24 28 50 52 4f 4a .!elseif "$(PROJ
07f0: 45 43 54 29 22 20 3d 3d 20 22 74 6b 22 0a 44 4f ECT)" == "tk".DO
0800: 49 4e 47 5f 54 4b 20 3d 20 31 0a 21 65 6e 64 69 ING_TK = 1.!endi
0810: 66 0a 0a 21 69 66 6e 64 65 66 20 4e 45 45 44 5f f..!ifndef NEED_
0820: 54 4b 0a 23 20 42 61 63 6b 77 61 72 64 73 20 63 TK.# Backwards c
0830: 6f 6d 70 61 74 69 62 69 6c 69 74 79 0a 21 69 66 ompatibility.!if
0840: 64 65 66 20 50 52 4f 4a 45 43 54 5f 52 45 51 55 def PROJECT_REQU
0850: 49 52 45 53 5f 54 4b 0a 4e 45 45 44 5f 54 4b 20 IRES_TK.NEED_TK
0860: 3d 20 24 28 50 52 4f 4a 45 43 54 5f 52 45 51 55 = $(PROJECT_REQU
0870: 49 52 45 53 5f 54 4b 29 0a 21 65 6c 73 65 0a 4e IRES_TK).!else.N
0880: 45 45 44 5f 54 4b 20 3d 20 30 0a 21 65 6e 64 69 EED_TK = 0.!endi
0890: 66 0a 21 65 6e 64 69 66 0a 0a 21 69 66 6e 64 65 f.!endif..!ifnde
08a0: 66 20 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 f NEED_TCL_SOURC
08b0: 45 0a 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 E.NEED_TCL_SOURC
08c0: 45 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 E = 0.!endif..!i
08d0: 66 64 65 66 20 4e 45 45 44 5f 54 4b 5f 53 4f 55 fdef NEED_TK_SOU
08e0: 52 43 45 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 RCE.!if $(NEED_T
08f0: 4b 5f 53 4f 55 52 43 45 29 0a 4e 45 45 44 5f 54 K_SOURCE).NEED_T
0900: 4b 20 3d 20 31 0a 21 65 6e 64 69 66 0a 21 65 6c K = 1.!endif.!el
0910: 73 65 0a 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 se.NEED_TK_SOURC
0920: 45 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 23 23 E = 0.!endif..##
0930: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0940: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0950: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
0960: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 ##############.#
0970: 20 4e 6d 61 6b 65 20 69 73 20 61 20 70 72 65 74 Nmake is a pret
0980: 74 79 20 77 65 61 6b 20 65 6e 76 69 72 6f 6e 6d ty weak environm
0990: 65 6e 74 20 69 6e 20 73 79 6e 74 61 78 20 61 6e ent in syntax an
09a0: 64 20 63 61 70 61 62 69 6c 69 74 69 65 73 0a 23 d capabilities.#
09b0: 20 73 6f 20 74 68 69 73 20 66 69 6c 65 20 69 73 so this file is
09c0: 20 6e 65 63 65 73 73 61 72 69 6c 79 20 76 65 72 necessarily ver
09d0: 62 6f 73 65 2e 20 49 74 27 73 20 62 72 6f 6b 65 bose. It's broke
09e0: 6e 20 64 6f 77 6e 20 69 6e 74 6f 0a 23 20 74 68 n down into.# th
09f0: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 72 74 e following part
0a00: 73 2e 0a 23 0a 23 20 30 2e 20 53 61 6e 69 74 79 s..#.# 0. Sanity
0a10: 20 63 68 65 63 6b 20 74 68 61 74 20 63 6f 6d 70 check that comp
0a20: 69 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 iler environment
0a30: 20 69 73 20 73 65 74 20 75 70 20 61 6e 64 20 69 is set up and i
0a40: 6e 69 74 69 61 6c 69 7a 65 0a 23 20 20 20 20 61 nitialize.# a
0a50: 6e 79 20 62 75 69 6c 74 2d 69 6e 20 73 65 74 74 ny built-in sett
0a60: 69 6e 67 73 20 66 72 6f 6d 20 74 68 65 20 70 61 ings from the pa
0a70: 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 0a 23 20 rent makefile.#
0a80: 31 2e 20 46 69 72 73 74 20 64 65 66 69 6e 65 20 1. First define
0a90: 74 68 65 20 65 78 74 65 72 6e 61 6c 20 74 6f 6f the external too
0aa0: 6c 73 20 75 73 65 64 20 66 6f 72 20 63 6f 6d 70 ls used for comp
0ab0: 69 6c 69 6e 67 2c 20 63 6f 70 79 69 6e 67 20 65 iling, copying e
0ac0: 74 63 2e 0a 23 20 20 20 20 61 73 20 74 68 69 73 tc..# as this
0ad0: 20 69 73 20 69 6e 64 65 70 65 6e 64 65 6e 74 20 is independent
0ae0: 6f 66 20 65 76 65 72 79 74 68 69 6e 67 20 65 6c of everything el
0af0: 73 65 2e 0a 23 20 32 2e 20 46 69 67 75 72 65 20 se..# 2. Figure
0b00: 6f 75 74 20 6f 75 72 20 62 75 69 6c 64 20 73 74 out our build st
0b10: 72 75 63 74 75 72 65 20 69 6e 20 74 65 72 6d 73 ructure in terms
0b20: 20 6f 66 20 74 68 65 20 64 69 72 65 63 74 6f 72 of the director
0b30: 79 2c 20 77 68 65 74 68 65 72 0a 23 20 20 20 20 y, whether.#
0b40: 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 20 we are building
0b50: 54 63 6c 20 6f 72 20 61 6e 20 65 78 74 65 6e 73 Tcl or an extens
0b60: 69 6f 6e 2c 20 65 74 63 2e 0a 23 20 33 2e 20 44 ion, etc..# 3. D
0b70: 65 74 65 72 6d 69 6e 65 20 74 68 65 20 63 6f 6d etermine the com
0b80: 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 piler and linker
0b90: 20 76 65 72 73 69 6f 6e 73 0a 23 20 34 2e 20 42 versions.# 4. B
0ba0: 75 69 6c 64 20 74 68 65 20 6e 6d 61 6b 65 68 6c uild the nmakehl
0bb0: 70 20 68 65 6c 70 65 72 20 61 70 70 6c 69 63 61 p helper applica
0bc0: 74 69 6f 6e 0a 23 20 35 2e 20 44 65 74 65 72 6d tion.# 5. Determ
0bd0: 69 6e 65 20 74 68 65 20 73 75 70 70 6f 72 74 65 ine the supporte
0be0: 64 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f d compiler optio
0bf0: 6e 73 20 61 6e 64 20 66 65 61 74 75 72 65 73 0a ns and features.
0c00: 23 20 36 2e 20 45 78 74 72 61 63 74 20 54 63 6c # 6. Extract Tcl
0c10: 2c 20 54 6b 2c 20 61 6e 64 20 70 6f 73 73 69 62 , Tk, and possib
0c20: 6c 79 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 76 ly extensions, v
0c30: 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 66 ersion numbers f
0c40: 72 6f 6d 20 74 68 65 0a 23 20 20 20 20 68 65 61 rom the.# hea
0c50: 64 65 72 73 0a 23 20 37 2e 20 50 61 72 73 65 20 ders.# 7. Parse
0c60: 74 68 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 76 the OPTS macro v
0c70: 61 6c 75 65 20 66 6f 72 20 75 73 65 72 2d 73 70 alue for user-sp
0c80: 65 63 69 66 69 65 64 20 62 75 69 6c 64 20 63 6f ecified build co
0c90: 6e 66 69 67 75 72 61 74 69 6f 6e 0a 23 20 38 2e nfiguration.# 8.
0ca0: 20 50 61 72 73 65 20 74 68 65 20 53 54 41 54 53 Parse the STATS
0cb0: 20 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 6f 72 macro value for
0cc0: 20 73 74 61 74 69 73 74 69 63 73 20 69 6e 73 74 statistics inst
0cd0: 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 23 20 39 2e rumentation.# 9.
0ce0: 20 50 61 72 73 65 20 74 68 65 20 43 48 45 43 4b Parse the CHECK
0cf0: 53 20 6d 61 63 72 6f 20 66 6f 72 20 61 64 64 69 S macro for addi
0d00: 74 69 6f 6e 61 6c 20 63 6f 6d 70 69 6c 61 74 69 tional compilati
0d10: 6f 6e 20 63 68 65 63 6b 73 0a 23 20 31 30 2e 20 on checks.# 10.
0d20: 42 61 73 65 64 20 6f 6e 20 74 68 69 73 20 73 65 Based on this se
0d30: 6c 65 63 74 65 64 20 63 6f 6e 66 69 67 75 72 61 lected configura
0d40: 74 69 6f 6e 2c 20 63 6f 6e 73 74 72 75 63 74 20 tion, construct
0d50: 74 68 65 20 6f 75 74 70 75 74 0a 23 20 20 20 20 the output.#
0d60: 20 64 69 72 65 63 74 6f 72 79 20 61 6e 64 20 66 directory and f
0d70: 69 6c 65 20 70 61 74 68 73 0a 23 20 31 31 2e 20 ile paths.# 11.
0d80: 43 6f 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 Construct the pa
0d90: 74 68 73 20 77 68 65 72 65 20 74 68 65 20 70 61 ths where the pa
0da0: 63 6b 61 67 65 20 69 73 20 74 6f 20 62 65 20 69 ckage is to be i
0db0: 6e 73 74 61 6c 6c 65 64 0a 23 20 31 32 2e 20 53 nstalled.# 12. S
0dc0: 65 74 20 75 70 20 74 68 65 20 61 63 74 75 61 6c et up the actual
0dd0: 20 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 options passed
0de0: 74 6f 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 to compiler and
0df0: 6c 69 6e 6b 65 72 20 62 61 73 65 64 0a 23 20 20 linker based.#
0e00: 20 20 20 6f 6e 20 74 68 65 20 69 6e 66 6f 72 6d on the inform
0e10: 61 74 69 6f 6e 20 67 61 74 68 65 72 65 64 20 61 ation gathered a
0e20: 62 6f 76 65 2e 0a 23 20 31 33 2e 20 44 65 66 69 bove..# 13. Defi
0e30: 6e 65 20 73 6f 6d 65 20 73 74 61 6e 64 61 72 64 ne some standard
0e40: 20 62 75 69 6c 64 20 74 61 72 67 65 74 73 20 61 build targets a
0e50: 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 nd implicit rule
0e60: 73 2e 20 54 68 65 73 65 20 6d 61 79 0a 23 20 20 s. These may.#
0e70: 20 20 20 62 65 20 6f 70 74 69 6f 6e 61 6c 6c 79 be optionally
0e80: 20 64 69 73 61 62 6c 65 64 20 62 79 20 74 68 65 disabled by the
0e90: 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 parent makefile
0ea0: 2e 0a 23 20 31 34 2e 20 28 46 6f 72 20 65 78 74 ..# 14. (For ext
0eb0: 65 6e 73 69 6f 6e 73 20 6f 6e 6c 79 2e 29 20 43 ensions only.) C
0ec0: 6f 6d 70 61 72 65 20 74 68 65 20 63 6f 6e 66 69 ompare the confi
0ed0: 67 75 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 guration of the
0ee0: 74 61 72 67 65 74 0a 23 20 20 20 20 20 54 63 6c target.# Tcl
0ef0: 20 61 6e 64 20 74 68 65 20 65 78 74 65 6e 73 69 and the extensi
0f00: 6f 6e 73 20 61 6e 64 20 77 61 72 6e 20 61 67 61 ons and warn aga
0f10: 69 6e 73 74 20 64 69 73 63 72 65 70 61 6e 63 69 inst discrepanci
0f20: 65 73 2e 0a 23 0a 23 20 4f 6e 65 20 66 69 6e 61 es..#.# One fina
0f30: 6c 20 6e 6f 74 65 20 61 62 6f 75 74 20 74 68 65 l note about the
0f40: 20 6d 61 63 72 6f 20 6e 61 6d 65 73 20 75 73 65 macro names use
0f50: 64 2e 20 54 68 65 79 20 61 72 65 20 61 73 20 74 d. They are as t
0f60: 68 65 79 20 61 72 65 0a 23 20 66 6f 72 20 68 69 hey are.# for hi
0f70: 73 74 6f 72 69 63 61 6c 20 72 65 61 73 6f 6e 73 storical reasons
0f80: 2e 20 57 65 20 77 6f 75 6c 64 20 6c 69 6b 65 20 . We would like
0f90: 6c 65 67 61 63 79 20 65 78 74 65 6e 73 69 6f 6e legacy extension
0fa0: 73 20 74 6f 0a 23 20 63 6f 6e 74 69 6e 75 65 20 s to.# continue
0fb0: 74 6f 20 77 6f 72 6b 20 77 69 74 68 20 74 68 69 to work with thi
0fc0: 73 20 6d 61 6b 65 20 69 6e 63 6c 75 64 65 20 66 s make include f
0fd0: 69 6c 65 20 73 6f 20 62 65 20 77 61 72 79 20 6f ile so be wary o
0fe0: 66 0a 23 20 63 68 61 6e 67 69 6e 67 20 74 68 65 f.# changing the
0ff0: 6d 20 66 6f 72 20 63 6f 6e 73 69 73 74 65 6e 63 m for consistenc
1000: 79 20 6f 72 20 63 6c 61 72 69 74 79 2e 0a 0a 23 y or clarity...#
1010: 20 30 2e 20 53 61 6e 69 74 79 20 63 68 65 63 6b 0. Sanity check
1020: 20 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 72 6f compiler enviro
1030: 6e 6d 65 6e 74 0a 0a 23 20 43 68 65 63 6b 20 74 nment..# Check t
1040: 6f 20 73 65 65 20 77 65 20 61 72 65 20 63 6f 6e o see we are con
1050: 66 69 67 75 72 65 64 20 74 6f 20 62 75 69 6c 64 figured to build
1060: 20 77 69 74 68 20 4d 53 56 43 20 28 4d 53 44 45 with MSVC (MSDE
1070: 56 44 49 52 2c 20 4d 53 56 43 44 49 52 20 6f 72 VDIR, MSVCDIR or
1080: 0a 23 20 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 .# VCINSTALLDIR)
1090: 20 6f 72 20 77 69 74 68 20 74 68 65 20 4d 53 20 or with the MS
10a0: 50 6c 61 74 66 6f 72 6d 20 53 44 4b 20 28 4d 53 Platform SDK (MS
10b0: 53 44 4b 20 6f 72 20 57 69 6e 64 6f 77 73 53 44 SDK or WindowsSD
10c0: 4b 44 69 72 29 0a 0a 21 69 66 20 21 64 65 66 69 KDir)..!if !defi
10d0: 6e 65 64 28 4d 53 44 45 56 44 49 52 29 20 26 26 ned(MSDEVDIR) &&
10e0: 20 21 64 65 66 69 6e 65 64 28 4d 53 56 43 44 49 !defined(MSVCDI
10f0: 52 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 56 R) && !defined(V
1100: 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 26 26 20 CINSTALLDIR) &&
1110: 21 64 65 66 69 6e 65 64 28 4d 53 53 44 4b 29 20 !defined(MSSDK)
1120: 26 26 20 21 64 65 66 69 6e 65 64 28 57 49 4e 44 && !defined(WIND
1130: 4f 57 53 53 44 4b 44 49 52 29 0a 4d 53 47 20 3d OWSSDKDIR).MSG =
1140: 20 5e 0a 56 69 73 75 61 6c 20 43 2b 2b 20 63 6f ^.Visual C++ co
1150: 6d 70 69 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 mpiler environme
1160: 6e 74 20 6e 6f 74 20 69 6e 69 74 69 61 6c 69 7a nt not initializ
1170: 65 64 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 ed..!error $(MSG
1180: 29 0a 21 65 6e 64 69 66 0a 0a 23 20 57 65 20 6e ).!endif..# We n
1190: 65 65 64 20 74 6f 20 72 75 6e 20 66 72 6f 6d 20 eed to run from
11a0: 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 74 68 the directory th
11b0: 65 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c e parent makefil
11c0: 65 20 69 73 20 6c 6f 63 61 74 65 64 20 69 6e 2e e is located in.
11d0: 0a 23 20 6e 6d 61 6b 65 20 64 6f 65 73 20 6e 6f .# nmake does no
11e0: 74 20 74 65 6c 6c 20 75 73 20 77 68 61 74 20 6d t tell us what m
11f0: 61 6b 65 66 69 6c 65 20 77 61 73 20 75 73 65 64 akefile was used
1200: 20 74 6f 20 69 6e 76 6f 6b 65 20 69 74 20 73 6f to invoke it so
1210: 20 70 61 72 65 6e 74 0a 23 20 6d 61 6b 65 66 69 parent.# makefi
1220: 6c 65 20 68 61 73 20 74 6f 20 73 65 74 20 74 68 le has to set th
1230: 65 20 4d 41 4b 45 46 49 4c 45 56 43 20 6d 61 63 e MAKEFILEVC mac
1240: 72 6f 20 6f 72 20 77 65 20 6a 75 73 74 20 6d 61 ro or we just ma
1250: 6b 65 20 61 20 67 75 65 73 73 20 61 6e 64 0a 23 ke a guess and.#
1260: 20 77 61 72 6e 20 69 66 20 77 65 20 74 68 69 6e warn if we thin
1270: 6b 20 74 68 61 74 20 69 73 20 6e 6f 74 20 74 68 k that is not th
1280: 65 20 63 61 73 65 2e 0a 21 69 66 20 22 24 28 4d e case..!if "$(M
1290: 41 4b 45 46 49 4c 45 56 43 29 22 20 3d 3d 20 22 AKEFILEVC)" == "
12a0: 22 0a 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 "..!if exist("$(
12b0: 50 52 4f 4a 45 43 54 29 2e 76 63 22 29 0a 4d 41 PROJECT).vc").MA
12c0: 4b 45 46 49 4c 45 56 43 20 3d 20 24 28 50 52 4f KEFILEVC = $(PRO
12d0: 4a 45 43 54 29 2e 76 63 0a 21 65 6c 73 65 69 66 JECT).vc.!elseif
12e0: 20 65 78 69 73 74 28 22 6d 61 6b 65 66 69 6c 65 exist("makefile
12f0: 2e 76 63 22 29 0a 4d 41 4b 45 46 49 4c 45 56 43 .vc").MAKEFILEVC
1300: 20 3d 20 6d 61 6b 65 66 69 6c 65 2e 76 63 0a 21 = makefile.vc.!
1310: 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 22 endif.!endif # "
1320: 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 20 3d $(MAKEFILEVC)" =
1330: 3d 20 22 22 0a 0a 21 69 66 20 21 65 78 69 73 74 = ""..!if !exist
1340: 28 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 ("$(MAKEFILEVC)"
1350: 29 0a 4d 53 47 20 3d 20 5e 0a 59 6f 75 20 6d 75 ).MSG = ^.You mu
1360: 73 74 20 72 75 6e 20 6e 6d 61 6b 65 20 66 72 6f st run nmake fro
1370: 6d 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 m the directory
1380: 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 70 containing the p
1390: 72 6f 6a 65 63 74 20 6d 61 6b 65 66 69 6c 65 2e roject makefile.
13a0: 5e 0a 49 66 20 79 6f 75 20 61 72 65 20 64 6f 69 ^.If you are doi
13b0: 6e 67 20 74 68 61 74 20 61 6e 64 20 67 65 74 74 ng that and gett
13c0: 69 6e 67 20 74 68 69 73 20 6d 65 73 73 61 67 65 ing this message
13d0: 2c 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46 49 , set the MAKEFI
13e0: 4c 45 56 43 5e 0a 6d 61 63 72 6f 20 74 6f 20 74 LEVC^.macro to t
13f0: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 70 he name of the p
1400: 72 6f 6a 65 63 74 20 6d 61 6b 65 66 69 6c 65 2e roject makefile.
1410: 0a 21 6d 65 73 73 61 67 65 20 57 41 52 4e 49 4e .!message WARNIN
1420: 47 3a 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 G: $(MSG).!endif
1430: 0a 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 ...#############
1440: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1450: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1460: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1470: 23 23 23 0a 23 20 31 2e 20 44 65 66 69 6e 65 20 ###.# 1. Define
1480: 65 78 74 65 72 6e 61 6c 20 70 72 6f 67 72 61 6d external program
1490: 73 20 62 65 69 6e 67 20 75 73 65 64 0a 0a 23 2d s being used..#-
14a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
14b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
14c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
14d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 53 65 74 20 ---------.# Set
14e0: 74 68 65 20 70 72 6f 70 65 72 20 63 6f 70 79 20 the proper copy
14f0: 6d 65 74 68 6f 64 20 74 6f 20 61 76 6f 69 64 20 method to avoid
1500: 6f 76 65 72 77 72 69 74 65 20 71 75 65 73 74 69 overwrite questi
1510: 6f 6e 73 0a 23 20 74 6f 20 74 68 65 20 75 73 65 ons.# to the use
1520: 72 20 77 68 65 6e 20 63 6f 70 79 69 6e 67 20 66 r when copying f
1530: 69 6c 65 73 20 61 6e 64 20 73 65 6c 65 63 74 69 iles and selecti
1540: 6e 67 20 74 68 65 20 72 69 67 68 74 0a 23 20 22 ng the right.# "
1550: 64 65 6c 65 74 65 20 61 6c 6c 22 20 6d 65 74 68 delete all" meth
1560: 6f 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d od..#-----------
1570: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a ---------------.
15a0: 23 20 54 63 6c 20 42 75 67 20 62 65 34 30 62 37 # Tcl Bug be40b7
15b0: 33 36 3a 20 75 73 65 20 72 64 2f 6d 64 20 69 6e 36: use rd/md in
15c0: 73 74 65 61 64 20 72 6d 64 69 72 2f 6d 6b 64 69 stead rmdir/mkdi
15d0: 72 2e 0a 23 20 4f 74 68 65 72 77 69 73 65 2c 20 r..# Otherwise,
15e0: 61 6e 20 65 76 65 6e 74 75 61 6c 20 63 79 67 77 an eventual cygw
15f0: 69 6e 20 76 65 72 73 69 6f 6e 20 77 69 74 68 20 in version with
1600: 64 69 66 66 65 72 65 6e 74 0a 23 20 70 61 72 61 different.# para
1610: 6d 65 74 65 72 73 20 6d 61 79 20 62 65 20 75 73 meters may be us
1620: 65 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ed..#-----------
1630: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1640: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1650: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a ---------------.
1660: 0a 52 4d 44 49 52 09 3d 20 72 64 20 2f 53 20 2f .RMDIR.= rd /S /
1670: 51 0a 43 50 59 09 3d 20 78 63 6f 70 79 20 2f 69 Q.CPY.= xcopy /i
1680: 20 2f 79 20 3e 4e 55 4c 0a 43 50 59 44 49 52 20 /y >NUL.CPYDIR
1690: 20 3d 20 78 63 6f 70 79 20 2f 65 20 2f 69 20 2f = xcopy /e /i /
16a0: 79 20 3e 4e 55 4c 0a 43 4f 50 59 09 3d 20 63 6f y >NUL.COPY.= co
16b0: 70 79 20 2f 79 20 3e 4e 55 4c 0a 4d 4b 44 49 52 py /y >NUL.MKDIR
16c0: 20 20 20 3d 20 6d 64 0a 0a 23 23 23 23 23 23 23 = md..#######
16d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
16e0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
16f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a ###############.
1710: 23 20 32 2e 20 46 69 67 75 72 65 20 6f 75 74 20 # 2. Figure out
1720: 6f 75 72 20 62 75 69 6c 64 20 65 6e 76 69 72 6f our build enviro
1730: 6e 6d 65 6e 74 20 69 6e 20 74 65 72 6d 73 20 6f nment in terms o
1740: 66 20 77 68 61 74 20 77 65 27 72 65 20 62 75 69 f what we're bui
1750: 6c 64 69 6e 67 2e 0a 23 0a 23 20 28 61 29 20 54 lding..#.# (a) T
1760: 63 6c 20 69 74 73 65 6c 66 0a 23 20 28 62 29 20 cl itself.# (b)
1770: 54 6b 0a 23 20 28 63 29 20 61 20 54 63 6c 20 65 Tk.# (c) a Tcl e
1780: 78 74 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 6c xtension using l
1790: 69 62 72 61 72 69 65 73 2f 69 6e 63 6c 75 64 65 ibraries/include
17a0: 73 20 66 72 6f 6d 20 61 6e 20 2a 69 6e 73 74 61 s from an *insta
17b0: 6c 6c 65 64 2a 20 54 63 6c 0a 23 20 28 64 29 20 lled* Tcl.# (d)
17c0: 61 20 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 a Tcl extension
17d0: 75 73 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f using libraries/
17e0: 69 6e 63 6c 75 64 65 73 20 66 72 6f 6d 20 54 63 includes from Tc
17f0: 6c 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f l source directo
1800: 72 79 0a 23 0a 23 20 54 68 69 73 20 6c 61 73 74 ry.#.# This last
1810: 20 69 73 20 6e 65 65 64 65 64 20 62 65 63 61 75 is needed becau
1820: 73 65 20 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f se some extensio
1830: 6e 73 20 73 74 69 6c 6c 20 6e 65 65 64 0a 23 20 ns still need.#
1840: 73 6f 6d 65 20 54 63 6c 20 69 6e 74 65 72 66 61 some Tcl interfa
1850: 63 65 73 20 74 68 61 74 20 61 72 65 20 6e 6f 74 ces that are not
1860: 20 70 75 62 6c 69 63 6c 79 20 65 78 70 6f 73 65 publicly expose
1870: 64 2e 0a 23 0a 23 20 54 68 65 20 66 72 61 67 6d d..#.# The fragm
1880: 65 6e 74 20 77 69 6c 6c 20 73 65 74 20 74 68 65 ent will set the
1890: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
18a0: 73 3a 0a 23 20 52 4f 4f 54 20 2d 20 72 6f 6f 74 s:.# ROOT - root
18b0: 20 6f 66 20 74 68 69 73 20 6d 6f 64 75 6c 65 20 of this module
18c0: 73 6f 75 72 63 65 73 0a 23 20 43 4f 4d 50 41 54 sources.# COMPAT
18d0: 44 49 52 20 2d 20 73 6f 75 72 63 65 20 64 69 72 DIR - source dir
18e0: 65 63 74 6f 72 79 20 74 68 61 74 20 68 6f 6c 64 ectory that hold
18f0: 73 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 s compatibility
1900: 73 6f 75 72 63 65 73 0a 23 20 44 4f 43 44 49 52 sources.# DOCDIR
1910: 20 2d 20 73 6f 75 72 63 65 20 64 69 72 65 63 74 - source direct
1920: 6f 72 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 64 ory containing d
1930: 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 69 6c ocumentation fil
1940: 65 73 0a 23 20 47 45 4e 45 52 49 43 44 49 52 20 es.# GENERICDIR
1950: 2d 20 70 6c 61 74 66 6f 72 6d 2d 69 6e 64 65 70 - platform-indep
1960: 65 6e 64 65 6e 74 20 73 6f 75 72 63 65 20 64 69 endent source di
1970: 72 65 63 74 6f 72 79 0a 23 20 57 49 4e 5f 44 49 rectory.# WIN_DI
1980: 52 20 2d 20 57 69 6e 64 6f 77 73 2d 73 70 65 63 R - Windows-spec
1990: 69 66 69 63 20 73 6f 75 72 63 65 20 64 69 72 65 ific source dire
19a0: 63 74 6f 72 79 0a 23 20 54 45 53 54 44 49 52 20 ctory.# TESTDIR
19b0: 2d 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 - directory cont
19c0: 61 69 6e 69 6e 67 20 74 65 73 74 20 66 69 6c 65 aining test file
19d0: 73 0a 23 20 54 4f 4f 4c 53 44 49 52 20 2d 20 64 s.# TOOLSDIR - d
19e0: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e irectory contain
19f0: 69 6e 67 20 62 75 69 6c 64 20 74 6f 6f 6c 73 0a ing build tools.
1a00: 23 20 5f 54 43 4c 44 49 52 20 2d 20 72 6f 6f 74 # _TCLDIR - root
1a10: 20 6f 66 20 74 68 65 20 54 63 6c 20 69 6e 73 74 of the Tcl inst
1a20: 61 6c 6c 61 74 69 6f 6e 20 4f 52 20 74 68 65 20 allation OR the
1a30: 54 63 6c 20 73 6f 75 72 63 65 73 2e 20 4e 6f 74 Tcl sources. Not
1a40: 20 73 65 74 0a 23 20 20 20 20 77 68 65 6e 20 62 set.# when b
1a50: 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 65 uilding Tcl itse
1a60: 6c 66 2e 0a 23 20 5f 49 4e 53 54 41 4c 4c 44 49 lf..# _INSTALLDI
1a70: 52 20 2d 20 6e 61 74 69 76 65 20 66 6f 72 6d 20 R - native form
1a80: 6f 66 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 of the installat
1a90: 69 6f 6e 20 70 61 74 68 2e 20 46 6f 72 20 54 63 ion path. For Tc
1aa0: 6c 0a 23 20 20 20 20 74 68 69 73 20 77 69 6c 6c l.# this will
1ab0: 20 62 65 20 74 68 65 20 72 6f 6f 74 20 6f 66 20 be the root of
1ac0: 74 68 65 20 54 63 6c 20 69 6e 73 74 61 6c 6c 61 the Tcl installa
1ad0: 74 69 6f 6e 2e 20 46 6f 72 20 65 78 74 65 6e 73 tion. For extens
1ae0: 69 6f 6e 73 0a 23 20 20 20 20 74 68 69 73 20 77 ions.# this w
1af0: 69 6c 6c 20 62 65 20 74 68 65 20 6c 69 62 20 64 ill be the lib d
1b00: 69 72 65 63 74 6f 72 79 20 75 6e 64 65 72 20 74 irectory under t
1b10: 68 65 20 72 6f 6f 74 2e 0a 23 20 54 43 4c 49 4e he root..# TCLIN
1b20: 53 54 41 4c 4c 20 20 2d 20 73 65 74 20 74 6f 20 STALL - set to
1b30: 31 20 69 66 20 5f 54 43 4c 44 49 52 20 72 65 66 1 if _TCLDIR ref
1b40: 65 72 73 20 74 6f 0a 23 20 20 20 20 68 65 61 64 ers to.# head
1b50: 65 72 73 20 61 6e 64 20 6c 69 62 72 61 72 69 65 ers and librarie
1b60: 73 20 66 72 6f 6d 20 61 6e 20 69 6e 73 74 61 6c s from an instal
1b70: 6c 65 64 20 54 63 6c 2c 20 61 6e 64 20 30 20 69 led Tcl, and 0 i
1b80: 66 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 0a f built against.
1b90: 23 20 20 20 20 54 63 6c 20 73 6f 75 72 63 65 73 # Tcl sources
1ba0: 2e 20 4e 6f 74 20 73 65 74 20 77 68 65 6e 20 62 . Not set when b
1bb0: 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 65 uilding Tcl itse
1bc0: 6c 66 2e 20 59 65 73 2c 20 6e 6f 74 20 76 65 72 lf. Yes, not ver
1bd0: 79 20 77 65 6c 6c 0a 23 20 20 20 20 6e 61 6d 65 y well.# name
1be0: 64 2e 0a 23 20 5f 54 43 4c 5f 48 20 2d 20 6e 61 d..# _TCL_H - na
1bf0: 74 69 76 65 20 70 61 74 68 20 74 6f 20 74 68 65 tive path to the
1c00: 20 74 63 6c 2e 68 20 66 69 6c 65 0a 23 0a 23 20 tcl.h file.#.#
1c10: 49 66 20 54 6b 20 69 73 20 69 6e 76 6f 6c 76 65 If Tk is involve
1c20: 64 2c 20 61 6c 73 6f 20 73 65 74 73 20 74 68 65 d, also sets the
1c30: 20 66 6f 6c 6c 6f 77 69 6e 67 0a 23 20 5f 54 4b following.# _TK
1c40: 44 49 52 20 2d 20 6e 61 74 69 76 65 20 66 6f 72 DIR - native for
1c50: 6d 20 54 6b 20 69 6e 73 74 61 6c 6c 61 74 69 6f m Tk installatio
1c60: 6e 20 4f 52 20 54 6b 20 73 6f 75 72 63 65 2e 20 n OR Tk source.
1c70: 4e 6f 74 20 73 65 74 20 69 66 20 62 75 69 6c 64 Not set if build
1c80: 69 6e 67 0a 23 20 20 20 20 54 6b 20 69 74 73 65 ing.# Tk itse
1c90: 6c 66 2e 0a 23 20 54 4b 49 4e 53 54 41 4c 4c 20 lf..# TKINSTALL
1ca0: 2d 20 73 65 74 20 31 20 69 66 20 5f 54 4b 44 49 - set 1 if _TKDI
1cb0: 52 20 72 65 66 65 72 73 20 74 6f 20 69 6e 73 74 R refers to inst
1cc0: 61 6c 6c 65 64 20 54 6b 20 61 6e 64 20 30 20 69 alled Tk and 0 i
1cd0: 66 20 54 6b 20 73 6f 75 72 63 65 73 0a 23 20 5f f Tk sources.# _
1ce0: 54 4b 5f 48 20 2d 20 6e 61 74 69 76 65 20 70 61 TK_H - native pa
1cf0: 74 68 20 74 6f 20 74 68 65 20 74 6b 2e 68 20 66 th to the tk.h f
1d00: 69 6c 65 0a 0a 23 20 52 6f 6f 74 20 64 69 72 65 ile..# Root dire
1d10: 63 74 6f 72 79 20 66 6f 72 20 73 6f 75 72 63 65 ctory for source
1d20: 73 20 61 6e 64 20 61 73 73 75 6d 65 64 20 73 75 s and assumed su
1d30: 62 64 69 72 65 63 74 6f 72 69 65 73 0a 52 4f 4f bdirectories.ROO
1d40: 54 20 3d 20 24 28 4d 41 4b 45 44 49 52 29 5c 2e T = $(MAKEDIR)\.
1d50: 2e 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e ..# The followin
1d60: 67 20 70 61 74 68 73 20 43 41 4e 4e 4f 54 20 68 g paths CANNOT h
1d70: 61 76 65 20 73 70 61 63 65 73 20 69 6e 20 74 68 ave spaces in th
1d80: 65 6d 20 61 73 20 74 68 65 79 20 61 70 70 65 61 em as they appea
1d90: 72 20 6f 6e 20 74 68 65 0a 23 20 6c 65 66 74 20 r on the.# left
1da0: 73 69 64 65 20 6f 66 20 69 6d 70 6c 69 63 69 74 side of implicit
1db0: 20 72 75 6c 65 73 2e 0a 21 69 66 6e 64 65 66 20 rules..!ifndef
1dc0: 43 4f 4d 50 41 54 44 49 52 0a 43 4f 4d 50 41 54 COMPATDIR.COMPAT
1dd0: 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c 63 6f DIR.= $(ROOT)\co
1de0: 6d 70 61 74 0a 21 65 6e 64 69 66 0a 21 69 66 6e mpat.!endif.!ifn
1df0: 64 65 66 20 44 4f 43 44 49 52 0a 44 4f 43 44 49 def DOCDIR.DOCDI
1e00: 52 09 09 3d 20 24 28 52 4f 4f 54 29 5c 64 6f 63 R..= $(ROOT)\doc
1e10: 0a 21 65 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 .!endif.!ifndef
1e20: 47 45 4e 45 52 49 43 44 49 52 0a 47 45 4e 45 52 GENERICDIR.GENER
1e30: 49 43 44 49 52 09 3d 20 24 28 52 4f 4f 54 29 5c ICDIR.= $(ROOT)\
1e40: 67 65 6e 65 72 69 63 0a 21 65 6e 64 69 66 0a 21 generic.!endif.!
1e50: 69 66 6e 64 65 66 20 54 4f 4f 4c 53 44 49 52 0a ifndef TOOLSDIR.
1e60: 54 4f 4f 4c 53 44 49 52 09 3d 20 24 28 52 4f 4f TOOLSDIR.= $(ROO
1e70: 54 29 5c 74 6f 6f 6c 73 0a 21 65 6e 64 69 66 0a T)\tools.!endif.
1e80: 21 69 66 6e 64 65 66 20 54 45 53 54 44 49 52 0a !ifndef TESTDIR.
1e90: 54 45 53 54 44 49 52 09 3d 20 24 28 52 4f 4f 54 TESTDIR.= $(ROOT
1ea0: 29 5c 74 65 73 74 73 0a 21 65 6e 64 69 66 0a 21 )\tests.!endif.!
1eb0: 69 66 6e 64 65 66 20 4c 49 42 44 49 52 0a 21 69 ifndef LIBDIR.!i
1ec0: 66 20 65 78 69 73 74 28 22 24 28 52 4f 4f 54 29 f exist("$(ROOT)
1ed0: 5c 6c 69 62 72 61 72 79 22 29 0a 4c 49 42 44 49 \library").LIBDI
1ee0: 52 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 52 R = $(R
1ef0: 4f 4f 54 29 5c 6c 69 62 72 61 72 79 0a 21 65 6c OOT)\library.!el
1f00: 73 65 0a 4c 49 42 44 49 52 20 20 20 20 20 20 20 se.LIBDIR
1f10: 20 20 20 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 = $(ROOT)\lib
1f20: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 .!endif.!endif.!
1f30: 69 66 6e 64 65 66 20 44 45 4d 4f 44 49 52 0a 21 ifndef DEMODIR.!
1f40: 69 66 20 65 78 69 73 74 28 22 24 28 4c 49 42 44 if exist("$(LIBD
1f50: 49 52 29 5c 64 65 6d 6f 73 22 29 0a 44 45 4d 4f IR)\demos").DEMO
1f60: 44 49 52 09 09 3d 20 24 28 4c 49 42 44 49 52 29 DIR..= $(LIBDIR)
1f70: 5c 64 65 6d 6f 73 0a 21 65 6c 73 65 0a 44 45 4d \demos.!else.DEM
1f80: 4f 44 49 52 09 09 3d 20 24 28 52 4f 4f 54 29 5c ODIR..= $(ROOT)\
1f90: 64 65 6d 6f 73 0a 21 65 6e 64 69 66 0a 21 65 6e demos.!endif.!en
1fa0: 64 69 66 20 23 20 69 66 6e 64 65 66 20 44 45 4d dif # ifndef DEM
1fb0: 4f 44 49 52 0a 23 20 44 6f 20 4e 4f 54 20 75 73 ODIR.# Do NOT us
1fc0: 65 20 57 49 4e 44 49 52 20 62 65 63 61 75 73 65 e WINDIR because
1fd0: 20 69 74 20 69 73 20 57 69 6e 64 6f 77 73 20 69 it is Windows i
1fe0: 6e 74 65 72 6e 61 6c 20 65 6e 76 69 72 6f 6e 6d nternal environm
1ff0: 65 6e 74 0a 23 20 76 61 72 69 61 62 6c 65 20 74 ent.# variable t
2000: 6f 20 70 6f 69 6e 74 20 74 6f 20 63 3a 5c 77 69 o point to c:\wi
2010: 6e 64 6f 77 73 21 0a 57 49 4e 5f 44 49 52 09 09 ndows!.WIN_DIR..
2020: 3d 20 24 28 52 4f 4f 54 29 5c 77 69 6e 0a 0a 21 = $(ROOT)\win..!
2030: 69 66 6e 64 65 66 20 52 43 44 49 52 0a 21 69 66 ifndef RCDIR.!if
2040: 20 65 78 69 73 74 28 22 24 28 57 49 4e 5f 44 49 exist("$(WIN_DI
2050: 52 29 5c 72 63 22 29 0a 52 43 44 49 52 20 20 20 R)\rc").RCDIR
2060: 20 20 20 20 20 20 20 20 3d 20 24 28 57 49 4e 5f = $(WIN_
2070: 44 49 52 29 5c 72 63 0a 21 65 6c 73 65 0a 52 43 DIR)\rc.!else.RC
2080: 44 49 52 20 20 20 20 20 20 20 20 20 20 20 3d 20 DIR =
2090: 24 28 57 49 4e 5f 44 49 52 29 0a 21 65 6e 64 69 $(WIN_DIR).!endi
20a0: 66 0a 21 65 6e 64 69 66 0a 52 43 44 49 52 20 3d f.!endif.RCDIR =
20b0: 20 24 28 52 43 44 49 52 3a 2f 3d 5c 29 0a 0a 23 $(RCDIR:/=\)..#
20c0: 20 54 68 65 20 74 61 72 67 65 74 20 64 69 72 65 The target dire
20d0: 63 74 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 ctory where the
20e0: 62 75 69 6c 74 20 70 61 63 6b 61 67 65 73 20 61 built packages a
20f0: 6e 64 20 62 69 6e 61 72 69 65 73 20 77 69 6c 6c nd binaries will
2100: 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 2e 0a 23 be installed..#
2110: 20 49 4e 53 54 41 4c 4c 44 49 52 20 69 73 20 74 INSTALLDIR is t
2120: 68 65 20 28 6f 70 74 69 6f 6e 61 6c 29 20 70 61 he (optional) pa
2130: 74 68 20 73 70 65 63 69 66 69 65 64 20 62 79 20 th specified by
2140: 74 68 65 20 75 73 65 72 2e 0a 23 20 5f 49 4e 53 the user..# _INS
2150: 54 41 4c 4c 44 49 52 20 69 73 20 49 4e 53 54 41 TALLDIR is INSTA
2160: 4c 4c 44 49 52 20 75 73 69 6e 67 20 74 68 65 20 LLDIR using the
2170: 62 61 63 6b 73 6c 61 73 68 20 73 65 70 61 72 61 backslash separa
2180: 74 6f 72 20 73 79 6e 74 61 78 0a 21 69 66 64 65 tor syntax.!ifde
2190: 66 20 49 4e 53 54 41 4c 4c 44 49 52 0a 23 23 23 f INSTALLDIR.###
21a0: 20 46 69 78 20 74 68 65 20 70 61 74 68 20 73 65 Fix the path se
21b0: 70 61 72 61 74 6f 72 73 2e 0a 5f 49 4e 53 54 41 parators.._INSTA
21c0: 4c 4c 44 49 52 09 3d 20 24 28 49 4e 53 54 41 4c LLDIR.= $(INSTAL
21d0: 4c 44 49 52 3a 2f 3d 5c 29 0a 21 65 6c 73 65 0a LDIR:/=\).!else.
21e0: 23 23 23 20 41 73 73 75 6d 65 20 74 68 65 20 6e ### Assume the n
21f0: 6f 72 6d 61 6c 20 64 65 66 61 75 6c 74 2e 0a 5f ormal default.._
2200: 49 4e 53 54 41 4c 4c 44 49 52 09 3d 20 24 28 48 INSTALLDIR.= $(H
2210: 4f 4d 45 44 52 49 56 45 29 5c 54 63 6c 0a 21 65 OMEDRIVE)\Tcl.!e
2220: 6e 64 69 66 0a 0a 21 69 66 20 24 28 44 4f 49 4e ndif..!if $(DOIN
2230: 47 5f 54 43 4c 29 0a 0a 23 20 42 45 47 49 4e 20 G_TCL)..# BEGIN
2240: 43 61 73 65 20 32 28 61 29 20 2d 20 42 75 69 6c Case 2(a) - Buil
2250: 64 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 0a ding Tcl itself.
2260: 0a 23 20 4f 6e 6c 79 20 6e 65 65 64 20 74 6f 20 .# Only need to
2270: 64 65 66 69 6e 65 20 5f 54 43 4c 5f 48 0a 5f 54 define _TCL_H._T
2280: 43 4c 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 CL_H = ..\generi
2290: 63 5c 74 63 6c 2e 68 0a 0a 23 20 45 4e 44 20 43 c\tcl.h..# END C
22a0: 61 73 65 20 32 28 61 29 20 2d 20 42 75 69 6c 64 ase 2(a) - Build
22b0: 69 6e 67 20 54 63 6c 20 69 74 73 65 6c 66 0a 0a ing Tcl itself..
22c0: 21 65 6c 73 65 69 66 20 24 28 44 4f 49 4e 47 5f !elseif $(DOING_
22d0: 54 4b 29 0a 0a 23 20 42 45 47 49 4e 20 43 61 73 TK)..# BEGIN Cas
22e0: 65 20 32 28 62 29 20 2d 20 42 75 69 6c 64 69 6e e 2(b) - Buildin
22f0: 67 20 54 6b 0a 0a 54 43 4c 49 4e 53 54 41 4c 4c g Tk..TCLINSTALL
2300: 20 3d 20 30 20 23 20 54 6b 20 61 6c 77 61 79 73 = 0 # Tk always
2310: 20 62 75 69 6c 64 73 20 61 67 61 69 6e 73 74 20 builds against
2320: 54 63 6c 20 73 6f 75 72 63 65 2c 20 6e 6f 74 20 Tcl source, not
2330: 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c an installed Tcl
2340: 0a 21 69 66 20 22 24 28 54 43 4c 44 49 52 29 22 .!if "$(TCLDIR)"
2350: 20 3d 3d 20 22 22 0a 21 69 66 20 5b 65 63 68 6f == "".!if [echo
2360: 20 54 43 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 TCLDIR = \> nma
2370: 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 kehlp.out] \.
2380: 7c 7c 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e || [$(NMAKEHLP_N
2390: 41 54 49 56 45 29 20 2d 4c 20 67 65 6e 65 72 69 ATIVE) -L generi
23a0: 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d 61 6b 65 c\tcl.h >> nmake
23b0: 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 hlp.out].!error
23c0: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 6c 6f *** Could not lo
23d0: 63 61 74 65 20 54 63 6c 20 73 6f 75 72 63 65 20 cate Tcl source
23e0: 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 directory..!endi
23f0: 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 f.!include nmake
2400: 68 6c 70 2e 6f 75 74 0a 21 65 6e 64 69 66 20 23 hlp.out.!endif #
2410: 20 54 43 4c 44 49 52 20 3d 3d 20 22 22 0a 0a 5f TCLDIR == "".._
2420: 54 43 4c 44 49 52 09 3d 20 24 28 54 43 4c 44 49 TCLDIR.= $(TCLDI
2430: 52 3a 2f 3d 5c 29 0a 5f 54 43 4c 5f 48 20 20 3d R:/=\)._TCL_H =
2440: 20 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 $(_TCLDIR)\gene
2450: 72 69 63 5c 74 63 6c 2e 68 0a 21 69 66 20 21 65 ric\tcl.h.!if !e
2460: 78 69 73 74 28 22 24 28 5f 54 43 4c 5f 48 29 22 xist("$(_TCL_H)"
2470: 29 0a 21 65 72 72 6f 72 20 43 6f 75 6c 64 20 6e ).!error Could n
2480: 6f 74 20 6c 6f 63 61 74 65 20 74 63 6c 2e 68 2e ot locate tcl.h.
2490: 20 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 Please set the
24a0: 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 TCLDIR macro to
24b0: 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 63 6c point to the Tcl
24c0: 20 2a 73 6f 75 72 63 65 2a 20 64 69 72 65 63 74 *source* direct
24d0: 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 0a 5f 54 4b ory..!endif.._TK
24e0: 5f 48 20 3d 20 2e 2e 5c 67 65 6e 65 72 69 63 5c _H = ..\generic\
24f0: 74 6b 2e 68 0a 0a 23 20 45 4e 44 20 43 61 73 65 tk.h..# END Case
2500: 20 32 28 62 29 20 2d 20 42 75 69 6c 64 69 6e 67 2(b) - Building
2510: 20 54 6b 0a 0a 21 65 6c 73 65 0a 0a 23 20 42 45 Tk..!else..# BE
2520: 47 49 4e 20 43 61 73 65 20 32 28 63 29 20 6f 72 GIN Case 2(c) or
2530: 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 20 (d) - Building
2540: 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 6f 74 68 an extension oth
2550: 65 72 20 74 68 61 6e 20 54 6b 0a 0a 23 20 49 66 er than Tk..# If
2560: 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 68 61 command line ha
2570: 73 20 73 70 65 63 69 66 69 65 64 20 54 63 6c 20 s specified Tcl
2580: 6c 6f 63 61 74 69 6f 6e 20 74 68 72 6f 75 67 68 location through
2590: 20 54 43 4c 44 49 52 2c 20 75 73 65 20 69 74 0a TCLDIR, use it.
25a0: 23 20 65 6c 73 65 20 64 65 66 61 75 6c 74 20 74 # else default t
25b0: 6f 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 49 52 o the INSTALLDIR
25c0: 20 73 65 74 74 69 6e 67 0a 21 69 66 20 22 24 28 setting.!if "$(
25d0: 54 43 4c 44 49 52 29 22 20 21 3d 20 22 22 0a 0a TCLDIR)" != ""..
25e0: 5f 54 43 4c 44 49 52 09 3d 20 24 28 54 43 4c 44 _TCLDIR.= $(TCLD
25f0: 49 52 3a 2f 3d 5c 29 0a 21 69 66 20 65 78 69 73 IR:/=\).!if exis
2600: 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e t("$(_TCLDIR)\in
2610: 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 20 23 20 clude\tcl.h") #
2620: 43 61 73 65 20 32 28 63 29 20 77 69 74 68 20 54 Case 2(c) with T
2630: 43 4c 44 49 52 20 64 65 66 69 6e 65 64 0a 54 43 CLDIR defined.TC
2640: 4c 49 4e 53 54 41 4c 4c 09 3d 20 31 0a 5f 54 43 LINSTALL.= 1._TC
2650: 4c 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 L_H = $
2660: 28 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 (_TCLDIR)\includ
2670: 65 5c 74 63 6c 2e 68 0a 21 65 6c 73 65 69 66 20 e\tcl.h.!elseif
2680: 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 52 exist("$(_TCLDIR
2690: 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 22 )\generic\tcl.h"
26a0: 29 20 23 20 43 61 73 65 20 32 28 64 29 20 77 69 ) # Case 2(d) wi
26b0: 74 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e 65 th TCLDIR define
26c0: 64 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 30 d.TCLINSTALL.= 0
26d0: 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 ._TCL_H
26e0: 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 = $(_TCLDIR)\ge
26f0: 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 65 6e 64 neric\tcl.h.!end
2700: 69 66 0a 0a 21 65 6c 73 65 20 20 23 20 20 23 20 if..!else # #
2710: 43 61 73 65 20 32 28 63 29 20 66 6f 72 20 65 78 Case 2(c) for ex
2720: 74 65 6e 73 69 6f 6e 73 20 77 69 74 68 20 54 43 tensions with TC
2730: 4c 44 49 52 20 75 6e 64 65 66 69 6e 65 64 0a 0a LDIR undefined..
2740: 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 # Need to locate
2750: 20 54 63 6c 20 64 65 70 65 6e 64 69 6e 67 20 6f Tcl depending o
2760: 6e 20 77 68 65 74 68 65 72 20 69 74 20 6e 65 65 n whether it nee
2770: 64 73 20 54 63 6c 20 73 6f 75 72 63 65 20 6f 72 ds Tcl source or
2780: 20 6e 6f 74 2e 0a 23 20 49 66 20 77 65 20 64 6f not..# If we do
2790: 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 65 20 49 n't, check the I
27a0: 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 20 61 6e NSTALLDIR for an
27b0: 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 20 66 installed Tcl f
27c0: 69 72 73 74 0a 0a 21 69 66 20 65 78 69 73 74 28 irst..!if exist(
27d0: 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c "$(_INSTALLDIR)\
27e0: 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 22 29 20 include\tcl.h")
27f0: 26 26 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 && !$(NEED_TCL_S
2800: 4f 55 52 43 45 29 0a 0a 54 43 4c 49 4e 53 54 41 OURCE)..TCLINSTA
2810: 4c 4c 09 3d 20 31 0a 54 43 4c 44 49 52 20 20 20 LL.= 1.TCLDIR
2820: 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 = $(_INST
2830: 41 4c 4c 44 49 52 29 5c 2e 2e 0a 23 20 4e 4f 54 ALLDIR)\...# NOT
2840: 45 3a 20 77 65 20 77 69 6c 6c 20 62 65 20 72 65 E: we will be re
2850: 73 65 74 74 69 6e 67 20 5f 49 4e 53 54 41 4c 4c setting _INSTALL
2860: 44 49 52 20 74 6f 20 5f 49 4e 53 54 41 4c 4c 44 DIR to _INSTALLD
2870: 49 52 2f 6c 69 62 20 66 6f 72 20 65 78 74 65 6e IR/lib for exten
2880: 73 69 6f 6e 73 0a 23 20 6c 61 74 65 72 20 73 6f sions.# later so
2890: 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f 75 6e 74 the \.. account
28a0: 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 62 0a 5f s for the /lib._
28b0: 54 43 4c 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 TCLDIR..= $(_INS
28c0: 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a 5f 54 43 4c TALLDIR)\..._TCL
28d0: 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 _H = $(
28e0: 5f 54 43 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 _TCLDIR)\include
28f0: 5c 74 63 6c 2e 68 0a 0a 21 65 6c 73 65 20 23 20 \tcl.h..!else #
2900: 65 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 exist(...) && !$
2910: 28 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 (NEED_TCL_SOURCE
2920: 29 0a 0a 21 69 66 20 5b 65 63 68 6f 20 5f 54 43 )..!if [echo _TC
2930: 4c 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 LDIR = \> nmakeh
2940: 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 lp.out] \. ||
2950: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
2960: 56 45 29 20 2d 4c 20 67 65 6e 65 72 69 63 5c 74 VE) -L generic\t
2970: 63 6c 2e 68 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 cl.h >> nmakehlp
2980: 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a .out].!error ***
2990: 20 43 6f 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 Could not locat
29a0: 65 20 54 63 6c 20 73 6f 75 72 63 65 20 64 69 72 e Tcl source dir
29b0: 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 66 0a 21 ectory..!endif.!
29c0: 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 include nmakehlp
29d0: 2e 6f 75 74 0a 54 43 4c 49 4e 53 54 41 4c 4c 20 .out.TCLINSTALL
29e0: 20 20 20 20 20 3d 20 30 0a 54 43 4c 44 49 52 20 = 0.TCLDIR
29f0: 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c = $(_TCL
2a00: 44 49 52 29 0a 5f 54 43 4c 5f 48 20 20 20 20 20 DIR)._TCL_H
2a10: 20 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 = $(_TCLDIR
2a20: 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a )\generic\tcl.h.
2a30: 0a 21 65 6e 64 69 66 20 23 20 65 78 69 73 74 28 .!endif # exist(
2a40: 2e 2e 2e 29 20 26 26 20 21 24 28 4e 45 45 44 5f ...) && !$(NEED_
2a50: 54 43 4c 5f 53 4f 55 52 43 45 29 0a 0a 21 65 6e TCL_SOURCE)..!en
2a60: 64 69 66 20 23 20 54 43 4c 44 49 52 0a 0a 21 69 dif # TCLDIR..!i
2a70: 66 6e 64 65 66 20 5f 54 43 4c 5f 48 0a 4d 53 47 fndef _TCL_H.MSG
2a80: 20 3d 5e 0a 46 61 69 6c 65 64 20 74 6f 20 66 69 =^.Failed to fi
2a90: 6e 64 20 74 63 6c 2e 68 2e 20 54 68 65 20 54 43 nd tcl.h. The TC
2aa0: 4c 44 49 52 20 6d 61 63 72 6f 20 69 73 20 73 65 LDIR macro is se
2ab0: 74 20 69 6e 63 6f 72 72 65 63 74 6c 79 20 6f 72 t incorrectly or
2ac0: 20 69 73 20 6e 6f 74 20 73 65 74 20 61 6e 64 20 is not set and
2ad0: 64 65 66 61 75 6c 74 20 70 61 74 68 20 64 6f 65 default path doe
2ae0: 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 74 63 s not contain tc
2af0: 6c 2e 68 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 l.h..!error $(MS
2b00: 47 29 0a 21 65 6e 64 69 66 0a 0a 23 20 4e 6f 77 G).!endif..# Now
2b10: 20 64 6f 20 74 68 65 20 73 61 6d 65 20 74 6f 20 do the same to
2b20: 6c 6f 63 61 74 65 20 54 6b 20 68 65 61 64 65 72 locate Tk header
2b30: 73 20 61 6e 64 20 6c 69 62 73 20 69 66 20 70 72 s and libs if pr
2b40: 6f 6a 65 63 74 20 72 65 71 75 69 72 65 73 20 54 oject requires T
2b50: 6b 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b 29 k.!if $(NEED_TK)
2b60: 0a 0a 21 69 66 20 22 24 28 54 4b 44 49 52 29 22 ..!if "$(TKDIR)"
2b70: 20 21 3d 20 22 22 0a 0a 5f 54 4b 44 49 52 20 3d != "".._TKDIR =
2b80: 20 24 28 54 4b 44 49 52 3a 2f 3d 5c 29 0a 21 69 $(TKDIR:/=\).!i
2b90: 66 20 65 78 69 73 74 28 22 24 28 5f 54 4b 44 49 f exist("$(_TKDI
2ba0: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 R)\include\tk.h"
2bb0: 29 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 ).TKINSTALL
2bc0: 20 3d 20 31 0a 5f 54 4b 5f 48 20 20 20 20 20 20 = 1._TK_H
2bd0: 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c = $(_TKDIR)\
2be0: 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 0a 21 65 6c include\tk.h.!el
2bf0: 73 65 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 seif exist("$(_T
2c00: 4b 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 6b KDIR)\generic\tk
2c10: 2e 68 22 29 0a 54 4b 49 4e 53 54 41 4c 4c 20 20 .h").TKINSTALL
2c20: 20 20 20 20 3d 20 30 0a 5f 54 4b 5f 48 20 20 20 = 0._TK_H
2c30: 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 = $(_TKDI
2c40: 52 29 5c 67 65 6e 65 72 69 63 5c 74 6b 2e 68 0a R)\generic\tk.h.
2c50: 21 65 6e 64 69 66 0a 0a 21 65 6c 73 65 20 23 20 !endif..!else #
2c60: 54 4b 44 49 52 20 6e 6f 74 20 64 65 66 69 6e 65 TKDIR not define
2c70: 64 0a 0a 23 20 4e 65 65 64 20 74 6f 20 6c 6f 63 d..# Need to loc
2c80: 61 74 65 20 54 63 6c 20 64 65 70 65 6e 64 69 6e ate Tcl dependin
2c90: 67 20 6f 6e 20 77 68 65 74 68 65 72 20 69 74 20 g on whether it
2ca0: 6e 65 65 64 73 20 54 63 6c 20 73 6f 75 72 63 65 needs Tcl source
2cb0: 20 6f 72 20 6e 6f 74 2e 0a 23 20 49 66 20 77 65 or not..# If we
2cc0: 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 74 68 don't, check th
2cd0: 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 6f 72 e INSTALLDIR for
2ce0: 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 an installed Tc
2cf0: 6c 20 66 69 72 73 74 0a 0a 21 69 66 20 65 78 69 l first..!if exi
2d00: 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 st("$(_INSTALLDI
2d10: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 R)\include\tk.h"
2d20: 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 4b 5f ) && !$(NEED_TK_
2d30: 53 4f 55 52 43 45 29 0a 0a 54 4b 49 4e 53 54 41 SOURCE)..TKINSTA
2d40: 4c 4c 20 20 20 20 20 20 3d 20 31 0a 23 20 4e 4f LL = 1.# NO
2d50: 54 45 3a 20 77 65 20 77 69 6c 6c 20 62 65 20 72 TE: we will be r
2d60: 65 73 65 74 74 69 6e 67 20 5f 49 4e 53 54 41 4c esetting _INSTAL
2d70: 4c 44 49 52 20 74 6f 20 5f 49 4e 53 54 41 4c 4c LDIR to _INSTALL
2d80: 44 49 52 2f 6c 69 62 20 66 6f 72 20 65 78 74 65 DIR/lib for exte
2d90: 6e 73 69 6f 6e 73 0a 23 20 6c 61 74 65 72 20 73 nsions.# later s
2da0: 6f 20 74 68 65 20 5c 2e 2e 20 61 63 63 6f 75 6e o the \.. accoun
2db0: 74 73 20 66 6f 72 20 74 68 65 20 2f 6c 69 62 0a ts for the /lib.
2dc0: 5f 54 4b 44 49 52 20 20 20 20 20 20 20 20 20 3d _TKDIR =
2dd0: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c $(_INSTALLDIR)\
2de0: 2e 2e 0a 5f 54 4b 5f 48 20 20 20 20 20 20 20 20 ..._TK_H
2df0: 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c 69 6e = $(_TKDIR)\in
2e00: 63 6c 75 64 65 5c 74 6b 2e 68 0a 54 4b 44 49 52 clude\tk.h.TKDIR
2e10: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2e20: 4b 44 49 52 29 0a 0a 21 65 6c 73 65 20 23 20 65 KDIR)..!else # e
2e30: 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c xist("$(_INSTALL
2e40: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e DIR)\include\tk.
2e50: 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 h") && !$(NEED_T
2e60: 4b 5f 53 4f 55 52 43 45 29 0a 0a 21 69 66 20 5b K_SOURCE)..!if [
2e70: 65 63 68 6f 20 5f 54 4b 44 49 52 20 3d 20 5c 3e echo _TKDIR = \>
2e80: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c nmakehlp.out] \
2e90: 0a 20 20 20 7c 7c 20 5b 24 28 4e 4d 41 4b 45 48 . || [$(NMAKEH
2ea0: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 4c 20 67 65 LP_NATIVE) -L ge
2eb0: 6e 65 72 69 63 5c 74 6b 2e 68 20 3e 3e 20 6e 6d neric\tk.h >> nm
2ec0: 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 akehlp.out].!err
2ed0: 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 or *** Could not
2ee0: 20 6c 6f 63 61 74 65 20 54 6b 20 73 6f 75 72 63 locate Tk sourc
2ef0: 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e e directory..!en
2f00: 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 dif.!include nma
2f10: 6b 65 68 6c 70 2e 6f 75 74 0a 54 4b 49 4e 53 54 kehlp.out.TKINST
2f20: 41 4c 4c 20 20 20 20 20 20 3d 20 30 0a 54 4b 44 ALL = 0.TKD
2f30: 49 52 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 IR = $(
2f40: 5f 54 4b 44 49 52 29 0a 5f 54 4b 5f 48 20 20 20 _TKDIR)._TK_H
2f50: 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 = $(_TKDI
2f60: 52 29 5c 67 65 6e 65 72 69 63 5c 74 6b 2e 68 0a R)\generic\tk.h.
2f70: 0a 21 65 6e 64 69 66 20 23 20 65 78 69 73 74 28 .!endif # exist(
2f80: 22 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c "$(_INSTALLDIR)\
2f90: 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 22 29 20 26 include\tk.h") &
2fa0: 26 20 21 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 & !$(NEED_TK_SOU
2fb0: 52 43 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 54 RCE)..!endif # T
2fc0: 4b 44 49 52 0a 0a 21 69 66 6e 64 65 66 20 5f 54 KDIR..!ifndef _T
2fd0: 4b 5f 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 6c 65 K_H.MSG =^.Faile
2fe0: 64 20 74 6f 20 66 69 6e 64 20 74 6b 2e 68 2e 20 d to find tk.h.
2ff0: 54 68 65 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 The TKDIR macro
3000: 69 73 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 is set incorrect
3010: 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 ly or is not set
3020: 20 61 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 and default pat
3030: 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 h does not conta
3040: 69 6e 20 74 6b 2e 68 2e 0a 21 65 72 72 6f 72 20 in tk.h..!error
3050: 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a 21 $(MSG).!endif..!
3060: 65 6e 64 69 66 20 23 20 4e 45 45 44 5f 54 4b 0a endif # NEED_TK.
3070: 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 43 4c 5f .!if $(NEED_TCL_
3080: 53 4f 55 52 43 45 29 20 26 26 20 24 28 54 43 4c SOURCE) && $(TCL
3090: 49 4e 53 54 41 4c 4c 29 0a 4d 53 47 20 3d 20 5e INSTALL).MSG = ^
30a0: 0a 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 54 68 .*** Warning: Th
30b0: 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 72 65 71 is extension req
30c0: 75 69 72 65 73 20 74 68 65 20 73 6f 75 72 63 65 uires the source
30d0: 20 64 69 73 74 72 69 62 75 74 69 6f 6e 20 6f 66 distribution of
30e0: 20 54 63 6c 2e 5e 0a 2a 2a 2a 20 50 6c 65 61 73 Tcl.^.*** Pleas
30f0: 65 20 73 65 74 20 74 68 65 20 54 43 4c 44 49 52 e set the TCLDIR
3100: 20 6d 61 63 72 6f 20 74 6f 20 70 6f 69 6e 74 20 macro to point
3110: 74 6f 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 to the Tcl sourc
3120: 65 73 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 es..!error $(MSG
3130: 29 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 ).!endif..!if $(
3140: 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a NEED_TK_SOURCE).
3150: 21 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 !if $(TKINSTALL)
3160: 0a 4d 53 47 20 3d 20 5e 0a 2a 2a 2a 20 57 61 72 .MSG = ^.*** War
3170: 6e 69 6e 67 3a 20 54 68 69 73 20 65 78 74 65 6e ning: This exten
3180: 73 69 6f 6e 20 72 65 71 75 69 72 65 73 20 74 68 sion requires th
3190: 65 20 73 6f 75 72 63 65 20 64 69 73 74 72 69 62 e source distrib
31a0: 75 74 69 6f 6e 20 6f 66 20 54 6b 2e 5e 0a 2a 2a ution of Tk.^.**
31b0: 2a 20 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 * Please set the
31c0: 20 54 4b 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 TKDIR macro to
31d0: 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 6b 20 point to the Tk
31e0: 73 6f 75 72 63 65 73 2e 0a 21 65 72 72 6f 72 20 sources..!error
31f0: 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 $(MSG).!endif.!e
3200: 6e 64 69 66 0a 0a 0a 23 20 49 66 20 49 4e 53 54 ndif...# If INST
3210: 41 4c 4c 44 49 52 20 73 65 74 20 74 6f 20 54 63 ALLDIR set to Tc
3220: 6c 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 72 l installation r
3230: 6f 6f 74 20 64 69 72 20 74 68 65 6e 20 72 65 73 oot dir then res
3240: 65 74 20 74 6f 20 74 68 65 0a 23 20 6c 69 62 20 et to the.# lib
3250: 64 69 72 20 66 6f 72 20 69 6e 73 74 61 6c 6c 69 dir for installi
3260: 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 0a 21 69 ng extensions.!i
3270: 66 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 f exist("$(_INST
3280: 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c ALLDIR)\include\
3290: 74 63 6c 2e 68 22 29 0a 5f 49 4e 53 54 41 4c 4c tcl.h")._INSTALL
32a0: 44 49 52 3d 24 28 5f 49 4e 53 54 41 4c 4c 44 49 DIR=$(_INSTALLDI
32b0: 52 29 5c 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 R)\lib.!endif..#
32c0: 20 45 4e 44 20 43 61 73 65 20 32 28 63 29 20 6f END Case 2(c) o
32d0: 72 20 28 64 29 20 2d 20 42 75 69 6c 64 69 6e 67 r (d) - Building
32e0: 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 0a 21 65 an extension.!e
32f0: 6e 64 69 66 20 23 20 69 66 20 24 28 44 4f 49 4e ndif # if $(DOIN
3300: 47 5f 54 43 4c 29 0a 0a 23 23 23 23 23 23 23 23 G_TCL)..########
3310: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3320: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3330: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3340: 23 23 23 23 23 23 23 23 0a 23 20 33 2e 20 44 65 ########.# 3. De
3350: 74 65 72 6d 69 6e 65 20 63 6f 6d 70 69 6c 65 72 termine compiler
3360: 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 61 72 63 version and arc
3370: 68 69 74 65 63 74 75 72 65 0a 23 20 49 6e 20 74 hitecture.# In t
3380: 68 69 73 20 73 65 63 74 69 6f 6e 2c 20 77 65 20 his section, we
3390: 66 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 63 figure out the c
33a0: 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 ompiler version
33b0: 61 6e 64 20 74 68 65 0a 23 20 61 72 63 68 69 74 and the.# archit
33c0: 65 63 74 75 72 65 20 66 6f 72 20 77 68 69 63 68 ecture for which
33d0: 20 77 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 we are building
33e0: 2e 20 54 68 69 73 20 73 65 74 73 20 74 68 65 0a . This sets the.
33f0: 23 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 # following macr
3400: 6f 73 3a 0a 23 20 56 43 56 45 52 53 49 4f 4e 20 os:.# VCVERSION
3410: 2d 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 63 - the internal c
3420: 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 ompiler version
3430: 61 73 20 31 32 30 30 2c 20 31 34 30 30 2c 20 31 as 1200, 1400, 1
3440: 39 31 30 20 65 74 63 2e 0a 23 20 20 20 20 20 54 910 etc..# T
3450: 68 69 73 20 69 73 20 61 6c 73 6f 20 70 72 69 6e his is also prin
3460: 74 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 69 ted by the compi
3470: 6c 65 72 20 69 6e 20 64 6f 74 74 65 64 20 66 6f ler in dotted fo
3480: 72 6d 20 31 39 2e 31 30 20 65 74 63 2e 0a 23 20 rm 19.10 etc..#
3490: 56 43 56 45 52 20 2d 20 74 68 65 20 22 6d 61 72 VCVER - the "mar
34a0: 6b 65 74 69 6e 67 20 76 65 72 73 69 6f 6e 22 2c keting version",
34b0: 20 66 6f 72 20 65 78 61 6d 70 6c 65 20 56 69 73 for example Vis
34c0: 75 61 6c 20 43 2b 2b 20 36 20 66 6f 72 20 69 6e ual C++ 6 for in
34d0: 74 65 72 6e 61 6c 0a 23 20 20 20 20 20 63 6f 6d ternal.# com
34e0: 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 31 32 piler version 12
34f0: 30 30 2e 20 54 68 69 73 20 69 73 20 6b 65 70 74 00. This is kept
3500: 20 6f 6e 6c 79 20 66 6f 72 20 6c 65 67 61 63 79 only for legacy
3510: 20 72 65 61 73 6f 6e 73 20 61 73 20 69 74 0a 23 reasons as it.#
3520: 20 20 20 20 20 64 6f 65 73 20 6e 6f 74 20 6d 61 does not ma
3530: 6b 65 20 73 65 6e 73 65 20 66 6f 72 20 72 65 63 ke sense for rec
3540: 65 6e 74 20 4d 69 63 72 6f 73 6f 66 74 20 63 6f ent Microsoft co
3550: 6d 70 69 6c 65 72 73 2e 20 4f 6e 6c 79 20 75 73 mpilers. Only us
3560: 65 64 20 66 6f 72 0a 23 20 20 20 20 20 6f 75 74 ed for.# out
3570: 70 75 74 20 64 69 72 65 63 74 6f 72 79 20 6e 61 put directory na
3580: 6d 65 73 2e 0a 23 20 41 52 43 48 20 2d 20 73 65 mes..# ARCH - se
3590: 74 20 74 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 t to IX86, ARM64
35a0: 20 6f 72 20 41 4d 44 36 34 20 64 65 70 65 6e 64 or AMD64 depend
35b0: 69 6e 67 20 6f 6e 20 33 32 2d 20 6f 72 20 36 34 ing on 32- or 64
35c0: 2d 62 69 74 20 74 61 72 67 65 74 0a 23 20 4e 41 -bit target.# NA
35d0: 54 49 56 45 5f 41 52 43 48 20 2d 20 73 65 74 20 TIVE_ARCH - set
35e0: 74 6f 20 49 58 38 36 2c 20 41 52 4d 36 34 20 6f to IX86, ARM64 o
35f0: 72 20 41 4d 44 36 34 20 66 6f 72 20 74 68 65 20 r AMD64 for the
3600: 68 6f 73 74 20 6d 61 63 68 69 6e 65 0a 23 20 4d host machine.# M
3610: 41 43 48 49 4e 45 20 2d 20 73 61 6d 65 20 61 73 ACHINE - same as
3620: 20 24 28 41 52 43 48 29 20 2d 20 6c 65 67 61 63 $(ARCH) - legac
3630: 79 0a 23 20 5f 56 43 5f 4d 41 4e 49 46 45 53 54 y.# _VC_MANIFEST
3640: 5f 45 4d 42 45 44 5f 7b 44 4c 4c 2c 45 58 45 7d _EMBED_{DLL,EXE}
3650: 20 2d 20 63 6f 6d 6d 61 6e 64 73 20 66 6f 72 20 - commands for
3660: 65 6d 62 65 64 64 69 6e 67 20 61 20 6d 61 6e 69 embedding a mani
3670: 66 65 73 74 20 69 66 20 6e 65 65 64 65 64 0a 0a fest if needed..
3680: 63 63 33 32 09 09 3d 20 24 28 43 43 29 20 20 20 cc32..= $(CC)
3690: 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 # built-in defau
36a0: 6c 74 2e 0a 6c 69 6e 6b 33 32 09 09 3d 20 6c 69 lt..link32..= li
36b0: 6e 6b 0a 6c 69 62 33 32 09 09 3d 20 6c 69 62 0a nk.lib32..= lib.
36c0: 72 63 33 32 09 09 3d 20 24 28 52 43 29 20 20 20 rc32..= $(RC)
36d0: 23 20 62 75 69 6c 74 2d 69 6e 20 64 65 66 61 75 # built-in defau
36e0: 6c 74 2e 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d lt...#----------
36f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3700: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3710: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3720: 2d 2d 2d 2d 2d 2d 0a 23 20 46 69 67 75 72 65 20 ------.# Figure
3730: 6f 75 74 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 out the compiler
3740: 20 61 72 63 68 69 74 65 63 74 75 72 65 20 61 6e architecture an
3750: 64 20 76 65 72 73 69 6f 6e 20 62 79 20 77 72 69 d version by wri
3760: 74 69 6e 67 0a 23 20 74 68 65 20 43 20 6d 61 63 ting.# the C mac
3770: 72 6f 73 20 74 6f 20 61 20 66 69 6c 65 2c 20 70 ros to a file, p
3780: 72 65 70 72 6f 63 65 73 73 69 6e 67 20 74 68 65 reprocessing the
3790: 6d 20 77 69 74 68 20 74 68 65 20 43 0a 23 20 70 m with the C.# p
37a0: 72 65 70 72 6f 63 65 73 73 6f 72 20 61 6e 64 20 reprocessor and
37b0: 72 65 61 64 69 6e 67 20 62 61 63 6b 20 74 68 65 reading back the
37c0: 20 63 72 65 61 74 65 64 20 66 69 6c 65 0a 0a 5f created file.._
37d0: 48 41 53 48 3d 5e 23 0a 5f 56 43 5f 4d 41 4e 49 HASH=^#._VC_MANI
37e0: 46 45 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 0a FEST_EMBED_EXE=.
37f0: 5f 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 _VC_MANIFEST_EMB
3800: 45 44 5f 44 4c 4c 3d 0a 56 43 56 45 52 3d 30 0a ED_DLL=.VCVER=0.
3810: 21 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 !if ![echo VCVER
3820: 53 49 4f 4e 3d 5f 4d 53 43 5f 56 45 52 20 3e 20 SION=_MSC_VER >
3830: 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 vercl.x] \. &
3840: 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 & ![echo $(_HASH
3850: 29 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 49 )if defined(_M_I
3860: 58 38 36 29 20 3e 3e 20 76 65 72 63 6c 2e 78 5d X86) >> vercl.x]
3870: 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f \. && ![echo
3880: 20 41 52 43 48 3d 49 58 38 36 20 3e 3e 20 76 65 ARCH=IX86 >> ve
3890: 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 rcl.x] \. &&
38a0: 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 29 65 ![echo $(_HASH)e
38b0: 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 4d 5f 41 lif defined(_M_A
38c0: 4d 44 36 34 29 20 3e 3e 20 76 65 72 63 6c 2e 78 MD64) >> vercl.x
38d0: 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 ] \. && ![ech
38e0: 6f 20 41 52 43 48 3d 41 4d 44 36 34 20 3e 3e 20 o ARCH=AMD64 >>
38f0: 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 vercl.x] \. &
3900: 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 53 48 & ![echo $(_HASH
3910: 29 65 6c 69 66 20 64 65 66 69 6e 65 64 28 5f 4d )elif defined(_M
3920: 5f 41 52 4d 36 34 29 20 3e 3e 20 76 65 72 63 6c _ARM64) >> vercl
3930: 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 65 .x] \. && ![e
3940: 63 68 6f 20 41 52 43 48 3d 41 52 4d 36 34 20 3e cho ARCH=ARM64 >
3950: 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 > vercl.x] \.
3960: 20 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 41 && ![echo $(_HA
3970: 53 48 29 65 6e 64 69 66 20 3e 3e 20 76 65 72 63 SH)endif >> verc
3980: 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b l.x] \. && ![
3990: 24 28 63 63 33 32 29 20 2d 6e 6f 6c 6f 67 6f 20 $(cc32) -nologo
39a0: 2d 54 43 20 2d 50 20 76 65 72 63 6c 2e 78 20 32 -TC -P vercl.x 2
39b0: 3e 4e 55 4c 5d 0a 21 69 6e 63 6c 75 64 65 20 76 >NUL].!include v
39c0: 65 72 63 6c 2e 69 0a 21 69 66 20 24 28 56 43 56 ercl.i.!if $(VCV
39d0: 45 52 53 49 4f 4e 29 20 3c 20 31 39 30 30 0a 21 ERSION) < 1900.!
39e0: 69 66 20 21 5b 65 63 68 6f 20 56 43 56 45 52 3d if ![echo VCVER=
39f0: 20 5e 5c 3e 20 76 65 72 63 6c 2e 76 63 5d 20 5c ^\> vercl.vc] \
3a00: 0a 20 20 20 20 26 26 20 21 5b 73 65 74 20 2f 61 . && ![set /a
3a10: 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 2f 20 $(VCVERSION) /
3a20: 31 30 30 20 2d 20 36 20 3e 3e 20 76 65 72 63 6c 100 - 6 >> vercl
3a30: 2e 76 63 5d 0a 21 69 6e 63 6c 75 64 65 20 76 65 .vc].!include ve
3a40: 72 63 6c 2e 76 63 0a 21 65 6e 64 69 66 0a 21 65 rcl.vc.!endif.!e
3a50: 6c 73 65 0a 23 20 54 68 65 20 73 69 6d 70 6c 65 lse.# The simple
3a60: 20 63 61 6c 63 75 6c 61 74 69 6f 6e 20 61 62 6f calculation abo
3a70: 76 65 20 64 6f 65 73 20 6e 6f 74 20 61 70 70 6c ve does not appl
3a80: 79 20 74 6f 20 6e 65 77 20 56 69 73 75 61 6c 20 y to new Visual
3a90: 53 74 75 64 69 6f 20 72 65 6c 65 61 73 65 73 0a Studio releases.
3aa0: 23 20 4b 65 65 70 20 74 68 65 20 63 6f 6d 70 69 # Keep the compi
3ab0: 6c 65 72 20 76 65 72 73 69 6f 6e 20 69 6e 20 69 ler version in i
3ac0: 74 73 20 6e 61 74 69 76 65 20 66 6f 72 6d 2e 0a ts native form..
3ad0: 56 43 56 45 52 20 3d 20 24 28 56 43 56 45 52 53 VCVER = $(VCVERS
3ae0: 49 4f 4e 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 ION).!endif.!end
3af0: 69 66 0a 0a 21 69 66 20 21 5b 64 65 6c 20 32 3e if..!if ![del 2>
3b00: 4e 55 4c 20 2f 71 2f 66 20 76 65 72 63 6c 2e 78 NUL /q/f vercl.x
3b10: 20 76 65 72 63 6c 2e 69 20 76 65 72 63 6c 2e 76 vercl.i vercl.v
3b20: 63 5d 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d c].!endif..#----
3b30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3b40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3b50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3b60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 ------------.# T
3b70: 68 65 20 4d 41 43 48 49 4e 45 20 6d 61 63 72 6f he MACHINE macro
3b80: 20 69 73 20 75 73 65 64 20 62 79 20 6c 65 67 61 is used by lega
3b90: 63 79 20 6d 61 6b 65 66 69 6c 65 73 20 73 6f 20 cy makefiles so
3ba0: 73 65 74 20 69 74 20 61 73 20 77 65 6c 6c 0a 21 set it as well.!
3bb0: 69 66 64 65 66 20 4d 41 43 48 49 4e 45 0a 21 69 ifdef MACHINE.!i
3bc0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3bd0: 3d 20 22 78 38 36 22 0a 21 75 6e 64 65 66 20 4d = "x86".!undef M
3be0: 41 43 48 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d ACHINE.MACHINE =
3bf0: 20 49 58 38 36 0a 21 65 6c 73 65 69 66 20 22 24 IX86.!elseif "$
3c00: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 61 (MACHINE)" == "a
3c10: 72 6d 36 34 22 0a 21 75 6e 64 65 66 20 4d 41 43 rm64".!undef MAC
3c20: 48 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d 20 41 HINE.MACHINE = A
3c30: 52 4d 36 34 0a 21 65 6c 73 65 69 66 20 22 24 28 RM64.!elseif "$(
3c40: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 78 36 MACHINE)" == "x6
3c50: 34 22 0a 21 75 6e 64 65 66 20 4d 41 43 48 49 4e 4".!undef MACHIN
3c60: 45 0a 4d 41 43 48 49 4e 45 20 3d 20 41 4d 44 36 E.MACHINE = AMD6
3c70: 34 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 24 28 4.!endif.!if "$(
3c80: 4d 41 43 48 49 4e 45 29 22 20 21 3d 20 22 24 28 MACHINE)" != "$(
3c90: 41 52 43 48 29 22 0a 21 65 72 72 6f 72 20 53 70 ARCH)".!error Sp
3ca0: 65 63 69 66 69 65 64 20 4d 41 43 48 49 4e 45 20 ecified MACHINE
3cb0: 6d 61 63 72 6f 20 24 28 4d 41 43 48 49 4e 45 29 macro $(MACHINE)
3cc0: 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 does not match
3cd0: 64 65 74 65 63 74 65 64 20 74 61 72 67 65 74 20 detected target
3ce0: 61 72 63 68 69 74 65 63 74 75 72 65 20 24 28 41 architecture $(A
3cf0: 52 43 48 29 2e 0a 21 65 6e 64 69 66 0a 21 65 6c RCH)..!endif.!el
3d00: 73 65 0a 4d 41 43 48 49 4e 45 3d 24 28 41 52 43 se.MACHINE=$(ARC
3d10: 48 29 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d H).!endif..#----
3d20: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d30: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 54 68 -----------.# Th
3d60: 65 20 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 e PLATFORM_IDENT
3d70: 49 46 59 20 6d 61 63 72 6f 20 6d 61 74 63 68 65 IFY macro matche
3d80: 73 20 74 68 65 20 76 61 6c 75 65 73 20 72 65 74 s the values ret
3d90: 75 72 6e 65 64 20 62 79 0a 23 20 74 68 65 20 54 urned by.# the T
3da0: 63 6c 20 70 6c 61 74 66 6f 72 6d 3a 3a 69 64 65 cl platform::ide
3db0: 6e 74 69 66 79 20 63 6f 6d 6d 61 6e 64 0a 21 69 ntify command.!i
3dc0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3dd0: 3d 20 22 41 4d 44 36 34 22 0a 50 4c 41 54 46 4f = "AMD64".PLATFO
3de0: 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 69 RM_IDENTIFY = wi
3df0: 6e 33 32 2d 78 38 36 5f 36 34 0a 21 65 6c 73 65 n32-x86_64.!else
3e00: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
3e10: 3d 3d 20 22 41 52 4d 36 34 22 0a 50 4c 41 54 46 == "ARM64".PLATF
3e20: 4f 52 4d 5f 49 44 45 4e 54 49 46 59 20 3d 20 77 ORM_IDENTIFY = w
3e30: 69 6e 33 32 2d 61 72 6d 0a 21 65 6c 73 65 0a 50 in32-arm.!else.P
3e40: 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 LATFORM_IDENTIFY
3e50: 20 3d 20 77 69 6e 33 32 2d 69 78 38 36 0a 21 65 = win32-ix86.!e
3e60: 6e 64 69 66 0a 0a 23 20 54 68 65 20 4d 55 4c 54 ndif..# The MULT
3e70: 49 50 4c 41 54 46 4f 52 4d 20 6d 61 63 72 6f 20 IPLATFORM macro
3e80: 63 6f 6e 74 72 6f 6c 73 20 77 68 65 74 68 65 72 controls whether
3e90: 20 62 69 6e 61 72 79 20 65 78 74 65 6e 73 69 6f binary extensio
3ea0: 6e 73 20 61 72 65 20 69 6e 73 74 61 6c 6c 65 64 ns are installed
3eb0: 0a 23 20 69 6e 20 70 6c 61 74 66 6f 72 6d 2d 73 .# in platform-s
3ec0: 70 65 63 69 66 69 63 20 64 69 72 65 63 74 6f 72 pecific director
3ed0: 69 65 73 2e 20 49 6e 74 65 6e 64 65 64 20 74 6f ies. Intended to
3ee0: 20 62 65 20 73 65 74 2f 75 73 65 64 20 62 79 20 be set/used by
3ef0: 65 78 74 65 6e 73 69 6f 6e 73 2e 0a 21 69 66 6e extensions..!ifn
3f00: 64 65 66 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 def MULTIPLATFOR
3f10: 4d 5f 49 4e 53 54 41 4c 4c 0a 4d 55 4c 54 49 50 M_INSTALL.MULTIP
3f20: 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 20 LATFORM_INSTALL
3f30: 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 23 2d 2d 2d = 0.!endif..#---
3f40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 46 69 67 75 ---------.# Figu
3f80: 72 65 20 6f 75 74 20 74 68 65 20 2a 68 6f 73 74 re out the *host
3f90: 2a 20 61 72 63 68 69 74 65 63 74 75 72 65 20 62 * architecture b
3fa0: 79 20 72 65 61 64 69 6e 67 20 74 68 65 20 72 65 y reading the re
3fb0: 67 69 73 74 72 79 0a 0a 21 69 66 20 21 5b 72 65 gistry..!if ![re
3fc0: 67 20 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 72 g query HKLM\Har
3fd0: 64 77 61 72 65 5c 44 65 73 63 72 69 70 74 69 6f dware\Descriptio
3fe0: 6e 5c 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 6c n\System\Central
3ff0: 50 72 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 49 Processor\0 /v I
4000: 64 65 6e 74 69 66 69 65 72 20 7c 20 66 69 6e 64 dentifier | find
4010: 73 74 72 20 2f 69 20 78 38 36 5d 0a 4e 41 54 49 str /i x86].NATI
4020: 56 45 5f 41 52 43 48 3d 49 58 38 36 0a 21 65 6c VE_ARCH=IX86.!el
4030: 73 65 69 66 20 21 5b 72 65 67 20 71 75 65 72 79 seif ![reg query
4040: 20 48 4b 4c 4d 5c 48 61 72 64 77 61 72 65 5c 44 HKLM\Hardware\D
4050: 65 73 63 72 69 70 74 69 6f 6e 5c 53 79 73 74 65 escription\Syste
4060: 6d 5c 43 65 6e 74 72 61 6c 50 72 6f 63 65 73 73 m\CentralProcess
4070: 6f 72 5c 30 20 2f 76 20 49 64 65 6e 74 69 66 69 or\0 /v Identifi
4080: 65 72 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 20 er | findstr /i
4090: 41 52 4d 20 7c 20 66 69 6e 64 73 74 72 20 2f 69 ARM | findstr /i
40a0: 20 36 34 2d 62 69 74 5d 0a 4e 41 54 49 56 45 5f 64-bit].NATIVE_
40b0: 41 52 43 48 3d 41 52 4d 36 34 0a 21 65 6c 73 65 ARCH=ARM64.!else
40c0: 0a 4e 41 54 49 56 45 5f 41 52 43 48 3d 41 4d 44 .NATIVE_ARCH=AMD
40d0: 36 34 0a 21 65 6e 64 69 66 0a 0a 23 20 53 69 6e 64.!endif..# Sin
40e0: 63 65 20 4d 53 56 43 38 20 77 65 20 6d 75 73 74 ce MSVC8 we must
40f0: 20 64 65 61 6c 20 77 69 74 68 20 6d 61 6e 69 66 deal with manif
4100: 65 73 74 20 72 65 73 6f 75 72 63 65 73 2e 0a 21 est resources..!
4110: 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 if $(VCVERSION)
4120: 3e 3d 20 31 34 30 30 0a 5f 56 43 5f 4d 41 4e 49 >= 1400._VC_MANI
4130: 46 45 53 54 5f 45 4d 42 45 44 5f 45 58 45 3d 69 FEST_EMBED_EXE=i
4140: 66 20 65 78 69 73 74 20 24 40 2e 6d 61 6e 69 66 f exist $@.manif
4150: 65 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f 20 2d est mt -nologo -
4160: 6d 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 6e 69 manifest $@.mani
4170: 66 65 73 74 20 2d 6f 75 74 70 75 74 72 65 73 6f fest -outputreso
4180: 75 72 63 65 3a 24 40 3b 31 0a 5f 56 43 5f 4d 41 urce:$@;1._VC_MA
4190: 4e 49 46 45 53 54 5f 45 4d 42 45 44 5f 44 4c 4c NIFEST_EMBED_DLL
41a0: 3d 69 66 20 65 78 69 73 74 20 24 40 2e 6d 61 6e =if exist $@.man
41b0: 69 66 65 73 74 20 6d 74 20 2d 6e 6f 6c 6f 67 6f ifest mt -nologo
41c0: 20 2d 6d 61 6e 69 66 65 73 74 20 24 40 2e 6d 61 -manifest $@.ma
41d0: 6e 69 66 65 73 74 20 2d 6f 75 74 70 75 74 72 65 nifest -outputre
41e0: 73 6f 75 72 63 65 3a 24 40 3b 32 0a 21 65 6e 64 source:$@;2.!end
41f0: 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 if..############
4200: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4210: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4220: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4230: 23 23 23 23 0a 23 20 34 2e 20 42 75 69 6c 64 20 ####.# 4. Build
4240: 74 68 65 20 6e 6d 61 6b 65 68 6c 70 20 70 72 6f the nmakehlp pro
4250: 67 72 61 6d 0a 23 20 54 68 69 73 20 69 73 20 61 gram.# This is a
4260: 20 68 65 6c 70 65 72 20 61 70 70 20 77 65 20 6e helper app we n
4270: 65 65 64 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 eed to overcome
4280: 6e 6d 61 6b 65 27 73 20 6c 69 6d 69 74 69 6e 67 nmake's limiting
4290: 0a 23 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 20 .# environment.
42a0: 57 65 20 77 69 6c 6c 20 63 61 6c 6c 20 6f 75 74 We will call out
42b0: 20 74 6f 20 69 74 20 74 6f 20 67 65 74 20 76 61 to it to get va
42c0: 72 69 6f 75 73 20 62 69 74 73 20 6f 66 0a 23 20 rious bits of.#
42d0: 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 information abou
42e0: 74 20 73 75 70 70 6f 72 74 65 64 20 63 6f 6d 70 t supported comp
42f0: 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 65 74 63 iler options etc
4300: 2e 0a 23 0a 23 20 54 63 6c 20 69 74 73 65 6c 66 ..#.# Tcl itself
4310: 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 75 73 65 will always use
4320: 20 74 68 65 20 6e 6d 61 6b 65 68 6c 70 2e 63 20 the nmakehlp.c
4330: 70 72 6f 67 72 61 6d 20 77 68 69 63 68 20 69 73 program which is
4340: 0a 23 20 69 6e 20 69 74 73 20 6f 77 6e 20 73 6f .# in its own so
4350: 75 72 63 65 2e 20 49 74 20 77 69 6c 6c 20 62 65 urce. It will be
4360: 20 6b 65 70 74 20 75 70 64 61 74 65 64 20 74 68 kept updated th
4370: 65 72 65 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 ere..#.# Extensi
4380: 6f 6e 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 ons built agains
4390: 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 t an installed T
43a0: 63 6c 20 77 69 6c 6c 20 75 73 65 20 74 68 65 20 cl will use the
43b0: 69 6e 73 74 61 6c 6c 65 64 0a 23 20 63 6f 70 79 installed.# copy
43c0: 20 6f 66 20 54 63 6c 27 73 20 6e 6d 61 6b 65 68 of Tcl's nmakeh
43d0: 6c 70 2e 63 20 69 66 20 74 68 65 72 65 20 69 73 lp.c if there is
43e0: 20 6f 6e 65 20 61 6e 64 20 74 68 65 69 72 20 6f one and their o
43f0: 77 6e 20 76 65 72 73 69 6f 6e 0a 23 20 6f 74 68 wn version.# oth
4400: 65 72 77 69 73 65 2e 20 49 6e 20 74 68 65 20 6c erwise. In the l
4410: 61 74 74 65 72 20 63 61 73 65 2c 20 74 68 65 79 atter case, they
4420: 20 77 6f 75 6c 64 20 61 6c 73 6f 20 62 65 20 75 would also be u
4430: 73 69 6e 67 20 74 68 65 69 72 20 6f 77 6e 0a 23 sing their own.#
4440: 20 72 75 6c 65 73 2e 76 63 2e 20 4e 6f 74 65 20 rules.vc. Note
4450: 74 68 61 74 20 6f 6c 64 65 72 20 76 65 72 73 69 that older versi
4460: 6f 6e 73 20 6f 66 20 54 63 6c 20 64 6f 20 6e 6f ons of Tcl do no
4470: 74 20 69 6e 73 74 61 6c 6c 20 6e 6d 61 6b 65 68 t install nmakeh
4480: 6c 70 2e 63 0a 23 20 6f 72 20 72 75 6c 65 73 2e lp.c.# or rules.
4490: 76 63 2e 0a 23 0a 23 20 45 78 74 65 6e 73 69 6f vc..#.# Extensio
44a0: 6e 73 20 62 75 69 6c 74 20 61 67 61 69 6e 73 74 ns built against
44b0: 20 54 63 6c 20 73 6f 75 72 63 65 73 20 77 69 6c Tcl sources wil
44c0: 6c 20 75 73 65 20 74 68 65 20 6f 6e 65 20 66 72 l use the one fr
44d0: 6f 6d 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 om the Tcl sourc
44e0: 65 2e 0a 23 0a 23 20 57 68 65 6e 20 62 75 69 6c e..#.# When buil
44f0: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
4500: 6e 20 75 73 69 6e 67 20 61 20 73 75 66 66 69 63 n using a suffic
4510: 69 65 6e 74 6c 79 20 6e 65 77 20 76 65 72 73 69 iently new versi
4520: 6f 6e 20 6f 66 20 54 63 6c 2c 0a 23 20 72 75 6c on of Tcl,.# rul
4530: 65 73 2d 65 78 74 2e 76 63 20 77 69 6c 6c 20 64 es-ext.vc will d
4540: 65 66 69 6e 65 20 4e 4d 41 4b 45 48 4c 50 43 20 efine NMAKEHLPC
4550: 61 70 70 72 6f 70 72 69 61 74 65 6c 79 20 74 6f appropriately to
4560: 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 0a 23 20 point to the.#
4570: 63 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 6c 70 copy of nmakehlp
4580: 2e 63 20 74 6f 20 62 65 20 75 73 65 64 2e 0a 0a .c to be used...
4590: 21 69 66 6e 64 65 66 20 4e 4d 41 4b 45 48 4c 50 !ifndef NMAKEHLP
45a0: 43 0a 23 20 44 65 66 61 75 6c 74 20 74 6f 20 74 C.# Default to t
45b0: 68 65 20 6f 6e 65 20 69 6e 20 74 68 65 20 63 75 he one in the cu
45c0: 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 rrent directory
45d0: 28 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 27 73 (the extension's
45e0: 20 6f 77 6e 20 6e 6d 61 6b 65 68 6c 70 2e 63 29 own nmakehlp.c)
45f0: 0a 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 6e 6d 61 .NMAKEHLPC = nma
4600: 6b 65 68 6c 70 2e 63 0a 0a 21 69 66 20 21 24 28 kehlp.c..!if !$(
4610: 44 4f 49 4e 47 5f 54 43 4c 29 0a 21 69 66 20 24 DOING_TCL).!if $
4620: 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 69 66 (TCLINSTALL).!if
4630: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 exist("$(_TCLDI
4640: 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 R)\lib\nmake\nma
4650: 6b 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 48 kehlp.c").NMAKEH
4660: 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 LPC = $(_TCLDIR)
4670: 5c 6c 69 62 5c 6e 6d 61 6b 65 5c 6e 6d 61 6b 65 \lib\nmake\nmake
4680: 68 6c 70 2e 63 0a 21 65 6e 64 69 66 0a 21 65 6c hlp.c.!endif.!el
4690: 73 65 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 se # !$(TCLINSTA
46a0: 4c 4c 29 0a 21 69 66 20 65 78 69 73 74 28 22 24 LL).!if exist("$
46b0: 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d (_TCLDIR)\win\nm
46c0: 61 6b 65 68 6c 70 2e 63 22 29 0a 4e 4d 41 4b 45 akehlp.c").NMAKE
46d0: 48 4c 50 43 20 3d 20 24 28 5f 54 43 4c 44 49 52 HLPC = $(_TCLDIR
46e0: 29 5c 77 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 )\win\nmakehlp.c
46f0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
4700: 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 21 $(TCLINSTALL).!
4710: 65 6e 64 69 66 20 23 20 21 24 28 44 4f 49 4e 47 endif # !$(DOING
4720: 5f 54 43 4c 29 0a 0a 21 65 6e 64 69 66 20 23 20 _TCL)..!endif #
4730: 4e 4d 41 4b 45 48 4c 50 43 0a 0a 23 20 57 65 20 NMAKEHLPC..# We
4740: 61 6c 77 61 79 73 20 62 75 69 6c 64 20 6e 6d 61 always build nma
4750: 6b 65 68 6c 70 20 65 76 65 6e 20 69 66 20 69 74 kehlp even if it
4760: 20 65 78 69 73 74 73 20 73 69 6e 63 65 20 77 65 exists since we
4770: 20 64 6f 20 6e 6f 74 20 6b 6e 6f 77 0a 23 20 77 do not know.# w
4780: 68 61 74 20 73 6f 75 72 63 65 20 69 74 20 77 61 hat source it wa
4790: 73 20 62 75 69 6c 74 20 66 72 6f 6d 2e 0a 21 69 s built from..!i
47a0: 66 20 5b 24 28 63 63 33 32 29 20 2d 6e 6f 6c 6f f [$(cc32) -nolo
47b0: 67 6f 20 22 24 28 4e 4d 41 4b 45 48 4c 50 43 29 go "$(NMAKEHLPC)
47c0: 22 20 2d 6c 69 6e 6b 20 2d 73 75 62 73 79 73 74 " -link -subsyst
47d0: 65 6d 3a 63 6f 6e 73 6f 6c 65 20 3e 20 6e 75 6c em:console > nul
47e0: 5d 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 ].!endif..######
47f0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4800: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4810: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4820: 23 23 23 23 23 23 23 23 23 23 0a 23 20 35 2e 20 ##########.# 5.
4830: 54 65 73 74 20 66 6f 72 20 63 6f 6d 70 69 6c 65 Test for compile
4840: 72 20 66 65 61 74 75 72 65 73 0a 23 20 56 69 73 r features.# Vis
4850: 75 61 6c 20 43 2b 2b 20 63 6f 6d 70 69 6c 65 72 ual C++ compiler
4860: 20 6f 70 74 69 6f 6e 73 20 68 61 76 65 20 63 68 options have ch
4870: 61 6e 67 65 64 20 6f 76 65 72 20 74 68 65 20 79 anged over the y
4880: 65 61 72 73 2e 20 43 68 65 63 6b 0a 23 20 77 68 ears. Check.# wh
4890: 69 63 68 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 ich options are
48a0: 73 75 70 70 6f 72 74 65 64 20 62 79 20 74 68 65 supported by the
48b0: 20 63 6f 6d 70 69 6c 65 72 20 69 6e 20 75 73 65 compiler in use
48c0: 2e 0a 23 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 ..#.# The follow
48d0: 69 6e 67 20 6d 61 63 72 6f 73 20 61 72 65 20 73 ing macros are s
48e0: 65 74 3a 0a 23 20 4f 50 54 49 4d 49 5a 41 54 49 et:.# OPTIMIZATI
48f0: 4f 4e 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c ONS - the compil
4900: 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 er flags to be u
4910: 73 65 64 20 66 6f 72 20 6f 70 74 69 6d 69 7a 65 sed for optimize
4920: 64 20 62 75 69 6c 64 73 0a 23 20 44 45 42 55 47 d builds.# DEBUG
4930: 46 4c 41 47 53 20 2d 20 74 68 65 20 63 6f 6d 70 FLAGS - the comp
4940: 69 6c 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 iler flags to be
4950: 20 75 73 65 64 20 66 6f 72 20 64 65 62 75 67 20 used for debug
4960: 62 75 69 6c 64 73 0a 23 20 4c 49 4e 4b 45 52 46 builds.# LINKERF
4970: 4c 41 47 53 20 2d 20 46 6c 61 67 73 20 70 61 73 LAGS - Flags pas
4980: 73 65 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b 65 sed to the linke
4990: 72 0a 23 0a 23 20 4e 6f 74 65 20 74 68 61 74 20 r.#.# Note that
49a0: 74 68 65 73 65 20 61 72 65 20 74 68 65 20 63 6f these are the co
49b0: 6d 70 69 6c 65 72 20 73 65 74 74 69 6e 67 73 20 mpiler settings
49c0: 2a 61 76 61 69 6c 61 62 6c 65 2a 2c 20 6e 6f 74 *available*, not
49d0: 20 74 68 6f 73 65 0a 23 20 74 68 61 74 20 77 69 those.# that wi
49e0: 6c 6c 20 62 65 20 2a 75 73 65 64 2a 2e 20 54 68 ll be *used*. Th
49f0: 65 20 6c 61 74 74 65 72 20 64 65 70 65 6e 64 73 e latter depends
4a00: 20 6f 6e 20 74 68 65 20 4f 50 54 53 20 6d 61 63 on the OPTS mac
4a10: 72 6f 20 73 65 74 74 69 6e 67 73 0a 23 20 77 68 ro settings.# wh
4a20: 69 63 68 20 77 65 20 68 61 76 65 20 6e 6f 74 20 ich we have not
4a30: 79 65 74 20 70 61 72 73 65 64 2e 0a 23 0a 23 20 yet parsed..#.#
4a40: 41 6c 73 6f 20 6e 6f 74 65 20 74 68 61 74 20 73 Also note that s
4a50: 6f 6d 65 20 6f 66 20 74 68 65 20 66 6c 61 67 73 ome of the flags
4a60: 20 69 6e 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e in OPTIMIZATION
4a70: 53 20 61 72 65 20 6e 6f 74 20 72 65 61 6c 6c 79 S are not really
4a80: 0a 23 20 72 65 6c 61 74 65 64 20 74 6f 20 6f 70 .# related to op
4a90: 74 69 6d 69 7a 61 74 69 6f 6e 2e 20 54 68 65 79 timization. They
4aa0: 20 61 72 65 20 70 6c 61 63 65 64 20 74 68 65 72 are placed ther
4ab0: 65 20 6f 6e 6c 79 20 66 6f 72 20 6c 65 67 61 63 e only for legac
4ac0: 79 20 72 65 61 73 6f 6e 73 0a 23 20 61 73 20 73 y reasons.# as s
4ad0: 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 65 ome extensions e
4ae0: 78 70 65 63 74 20 74 68 65 6d 20 74 6f 20 62 65 xpect them to be
4af0: 20 69 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 61 included in tha
4b00: 74 20 6d 61 63 72 6f 2e 0a 0a 23 20 2d 4f 70 20 t macro...# -Op
4b10: 69 6d 70 72 6f 76 65 73 20 66 6c 6f 61 74 20 63 improves float c
4b20: 6f 6e 73 69 73 74 65 6e 63 79 2e 20 4e 6f 74 65 onsistency. Note
4b30: 20 6f 6e 6c 79 20 6e 65 65 64 65 64 20 66 6f 72 only needed for
4b40: 20 6f 6c 64 65 72 20 63 6f 6d 70 69 6c 65 72 73 older compilers
4b50: 0a 23 20 4e 65 77 65 72 20 63 6f 6d 70 69 6c 65 .# Newer compile
4b60: 72 73 20 64 6f 20 6e 6f 74 20 6e 65 65 64 20 6f rs do not need o
4b70: 72 20 73 75 70 70 6f 72 74 20 74 68 69 73 20 6f r support this o
4b80: 70 74 69 6f 6e 2e 0a 21 69 66 20 5b 24 28 4e 4d ption..!if [$(NM
4b90: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
4ba0: 63 20 2d 4f 70 5d 0a 46 50 4f 50 54 53 20 20 3d c -Op].FPOPTS =
4bb0: 20 2d 4f 70 0a 21 65 6e 64 69 66 0a 0a 23 20 53 -Op.!endif..# S
4bc0: 74 72 69 63 74 20 66 6c 6f 61 74 69 6e 67 20 70 trict floating p
4bd0: 6f 69 6e 74 20 73 65 6d 61 6e 74 69 63 73 20 2d oint semantics -
4be0: 20 70 72 65 73 65 6e 74 20 69 6e 20 6e 65 77 65 present in newe
4bf0: 72 20 63 6f 6d 70 69 6c 65 72 73 20 69 6e 20 6c r compilers in l
4c00: 69 65 75 20 6f 66 20 2d 4f 70 0a 21 69 66 20 5b ieu of -Op.!if [
4c10: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
4c20: 45 29 20 2d 63 20 2d 66 70 3a 73 74 72 69 63 74 E) -c -fp:strict
4c30: 5d 0a 46 50 4f 50 54 53 20 20 3d 20 24 28 46 50 ].FPOPTS = $(FP
4c40: 4f 50 54 53 29 20 2d 66 70 3a 73 74 72 69 63 74 OPTS) -fp:strict
4c50: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 .!endif..!if "$(
4c60: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 MACHINE)" == "IX
4c70: 38 36 22 0a 23 23 23 20 74 65 73 74 20 66 6f 72 86".### test for
4c80: 20 70 65 6e 74 69 75 6d 20 65 72 72 61 74 61 0a pentium errata.
4c90: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
4ca0: 4e 41 54 49 56 45 29 20 2d 63 20 2d 51 49 30 66 NATIVE) -c -QI0f
4cb0: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 ].!message *** C
4cc0: 6f 6d 70 69 6c 65 72 20 68 61 73 20 27 50 65 6e ompiler has 'Pen
4cd0: 74 69 75 6d 20 30 78 30 66 20 66 69 78 27 0a 46 tium 0x0f fix'.F
4ce0: 50 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50 54 POPTS = $(FPOPT
4cf0: 53 29 20 2d 51 49 30 66 0a 21 65 6c 73 65 0a 21 S) -QI0f.!else.!
4d00: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 message *** Comp
4d10: 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 iler does not ha
4d20: 76 65 20 27 50 65 6e 74 69 75 6d 20 30 78 30 66 ve 'Pentium 0x0f
4d30: 20 66 69 78 27 0a 21 65 6e 64 69 66 0a 21 65 6e fix'.!endif.!en
4d40: 64 69 66 0a 0a 23 23 23 20 74 65 73 74 20 66 6f dif..### test fo
4d50: 72 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 0a r optimizations.
4d60: 23 20 2f 4f 32 20 6f 70 74 69 6d 69 7a 61 74 69 # /O2 optimizati
4d70: 6f 6e 20 69 6e 63 6c 75 64 65 73 20 2f 4f 67 20 on includes /Og
4d80: 2f 4f 69 20 2f 4f 74 20 2f 4f 79 20 2f 4f 62 32 /Oi /Ot /Oy /Ob2
4d90: 20 2f 47 73 20 2f 47 46 20 2f 47 79 20 61 73 20 /Gs /GF /Gy as
4da0: 70 65 72 0a 23 20 64 6f 63 75 6d 65 6e 74 61 74 per.# documentat
4db0: 69 6f 6e 2e 20 4e 6f 74 65 20 77 65 20 64 6f 20 ion. Note we do
4dc0: 4e 4f 54 20 77 61 6e 74 20 2f 47 73 20 61 73 20 NOT want /Gs as
4dd0: 74 68 61 74 20 69 6e 73 65 72 74 73 20 61 20 5f that inserts a _
4de0: 63 68 6b 73 74 6b 0a 23 20 73 74 61 63 6b 20 70 chkstk.# stack p
4df0: 72 6f 62 65 20 61 74 20 2a 65 76 65 72 79 2a 20 robe at *every*
4e00: 66 75 6e 63 74 69 6f 6e 20 65 6e 74 72 79 2c 20 function entry,
4e10: 6e 6f 74 20 6a 75 73 74 20 74 68 6f 73 65 20 77 not just those w
4e20: 69 74 68 20 6d 6f 72 65 20 74 68 61 6e 0a 23 20 ith more than.#
4e30: 61 20 70 61 67 65 20 6f 66 20 73 74 61 63 6b 20 a page of stack
4e40: 61 6c 6c 6f 63 61 74 69 6f 6e 20 72 65 73 75 6c allocation resul
4e50: 74 69 6e 67 20 69 6e 20 61 20 70 65 72 66 6f 72 ting in a perfor
4e60: 6d 61 6e 63 65 20 68 69 74 2e 20 20 48 6f 77 65 mance hit. Howe
4e70: 76 65 72 2c 0a 23 20 2f 4f 32 20 64 6f 63 75 6d ver,.# /O2 docum
4e80: 65 6e 74 61 74 69 6f 6e 20 69 73 20 6d 69 73 6c entation is misl
4e90: 65 61 64 69 6e 67 20 61 73 20 69 74 73 20 73 74 eading as its st
4ea0: 61 63 6b 20 70 72 6f 62 65 73 20 61 72 65 20 73 ack probes are s
4eb0: 69 6d 70 6c 79 20 74 68 65 0a 23 20 64 65 66 61 imply the.# defa
4ec0: 75 6c 74 20 70 61 67 65 20 73 69 7a 65 20 6c 6f ult page size lo
4ed0: 63 61 6c 73 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 cals allocation
4ee0: 70 72 6f 62 65 73 20 61 6e 64 20 6e 6f 74 20 77 probes and not w
4ef0: 68 61 74 20 69 73 20 69 6d 70 6c 69 65 64 0a 23 hat is implied.#
4f00: 20 62 79 20 61 6e 20 65 78 70 6c 69 63 69 74 20 by an explicit
4f10: 2f 47 73 20 6f 70 74 69 6f 6e 2e 0a 0a 4f 50 54 /Gs option...OPT
4f20: 49 4d 49 5a 41 54 49 4f 4e 53 20 3d 20 24 28 46 IMIZATIONS = $(F
4f30: 50 4f 50 54 53 29 0a 0a 21 69 66 20 5b 24 28 4e POPTS)..!if [$(N
4f40: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
4f50: 2d 63 20 2d 4f 32 5d 0a 4f 50 54 49 4d 49 5a 49 -c -O2].OPTIMIZI
4f60: 4e 47 20 3d 20 31 0a 4f 50 54 49 4d 49 5a 41 54 NG = 1.OPTIMIZAT
4f70: 49 4f 4e 53 20 20 20 3d 20 24 28 4f 50 54 49 4d IONS = $(OPTIM
4f80: 49 5a 41 54 49 4f 4e 53 29 20 2d 4f 32 0a 21 65 IZATIONS) -O2.!e
4f90: 6c 73 65 0a 23 20 4c 65 67 61 63 79 2c 20 72 65 lse.# Legacy, re
4fa0: 61 6c 6c 79 2e 20 41 6c 6c 20 6d 6f 64 65 72 6e ally. All modern
4fb0: 20 63 6f 6d 70 69 6c 65 72 73 20 73 75 70 70 6f compilers suppo
4fc0: 72 74 20 74 68 69 73 0a 21 6d 65 73 73 61 67 65 rt this.!message
4fd0: 20 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f *** Compiler do
4fe0: 65 73 20 6e 6f 74 20 68 61 76 65 20 27 4f 70 74 es not have 'Opt
4ff0: 69 6d 69 7a 61 74 69 6f 6e 73 27 0a 4f 50 54 49 imizations'.OPTI
5000: 4d 49 5a 49 4e 47 20 3d 20 30 0a 21 65 6e 64 69 MIZING = 0.!endi
5010: 66 0a 0a 23 20 43 68 65 63 6b 73 20 66 6f 72 20 f..# Checks for
5020: 62 75 66 66 65 72 20 6f 76 65 72 66 6c 6f 77 73 buffer overflows
5030: 20 69 6e 20 6c 6f 63 61 6c 20 61 72 72 61 79 73 in local arrays
5040: 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 .!if [$(NMAKEHLP
5050: 5f 4e 41 54 49 56 45 29 20 2d 63 20 2d 47 53 5d _NATIVE) -c -GS]
5060: 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 .OPTIMIZATIONS
5070: 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e = $(OPTIMIZATION
5080: 53 29 20 2d 47 53 0a 21 65 6e 64 69 66 0a 0a 23 S) -GS.!endif..#
5090: 20 4c 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69 6d Link time optim
50a0: 69 7a 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 74 68 ization. Note th
50b0: 61 74 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 28 at this option (
50c0: 70 6f 74 65 6e 74 69 61 6c 6c 79 29 20 6d 61 6b potentially) mak
50d0: 65 73 0a 23 20 67 65 6e 65 72 61 74 65 64 20 6c es.# generated l
50e0: 69 62 72 61 72 69 65 73 20 6f 6e 6c 79 20 75 73 ibraries only us
50f0: 61 62 6c 65 20 62 79 20 74 68 65 20 73 70 65 63 able by the spec
5100: 69 66 69 63 20 56 43 2b 2b 20 76 65 72 73 69 6f ific VC++ versio
5110: 6e 20 74 68 61 74 0a 23 20 63 72 65 61 74 65 64 n that.# created
5120: 20 69 74 2e 20 52 65 71 75 69 72 65 73 20 2f 4c it. Requires /L
5130: 54 43 47 20 6c 69 6e 6b 65 72 20 6f 70 74 69 6f TCG linker optio
5140: 6e 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c n.!if [$(NMAKEHL
5150: 50 5f 4e 41 54 49 56 45 29 20 2d 63 20 2d 47 4c P_NATIVE) -c -GL
5160: 5d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 ].OPTIMIZATIONS
5170: 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f = $(OPTIMIZATIO
5180: 4e 53 29 20 2d 47 4c 0a 43 43 5f 47 4c 5f 4f 50 NS) -GL.CC_GL_OP
5190: 54 5f 45 4e 41 42 4c 45 44 20 3d 20 31 0a 21 65 T_ENABLED = 1.!e
51a0: 6c 73 65 0a 23 20 49 6e 20 6e 65 77 65 72 20 63 lse.# In newer c
51b0: 6f 6d 70 69 6c 65 72 73 20 2d 47 4c 20 61 6e 64 ompilers -GL and
51c0: 20 2d 59 58 20 61 72 65 20 69 6e 63 6f 6d 70 61 -YX are incompa
51d0: 74 69 62 6c 65 2e 0a 21 69 66 20 5b 24 28 4e 4d tible..!if [$(NM
51e0: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
51f0: 63 20 2d 59 58 5d 0a 4f 50 54 49 4d 49 5a 41 54 c -YX].OPTIMIZAT
5200: 49 4f 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 IONS = $(OPTIMI
5210: 5a 41 54 49 4f 4e 53 29 20 2d 59 58 0a 21 65 6e ZATIONS) -YX.!en
5220: 64 69 66 0a 21 65 6e 64 69 66 20 23 20 5b 24 28 dif.!endif # [$(
5230: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
5240: 20 2d 63 20 2d 47 4c 5d 0a 0a 44 45 42 55 47 46 -c -GL]..DEBUGF
5250: 4c 41 47 53 20 20 20 20 20 3d 20 24 28 46 50 4f LAGS = $(FPO
5260: 50 54 53 29 0a 0a 23 20 52 75 6e 20 74 69 6d 65 PTS)..# Run time
5270: 20 65 72 72 6f 72 20 63 68 65 63 6b 73 2e 20 4e error checks. N
5280: 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 6f 72 20 ot available or
5290: 76 61 6c 69 64 20 69 6e 20 61 20 72 65 6c 65 61 valid in a relea
52a0: 73 65 2c 20 6e 6f 6e 2d 64 65 62 75 67 20 62 75 se, non-debug bu
52b0: 69 6c 64 0a 23 20 52 54 43 20 69 73 20 66 6f 72 ild.# RTC is for
52c0: 20 6d 6f 64 65 72 6e 20 63 6f 6d 70 69 6c 65 72 modern compiler
52d0: 73 2c 20 2d 47 5a 20 69 73 20 6c 65 67 61 63 79 s, -GZ is legacy
52e0: 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 .!if [$(NMAKEHLP
52f0: 5f 4e 41 54 49 56 45 29 20 2d 63 20 2d 52 54 43 _NATIVE) -c -RTC
5300: 31 5d 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 1].DEBUGFLAGS
5310: 20 20 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53 = $(DEBUGFLAGS
5320: 29 20 2d 52 54 43 31 0a 21 65 6c 73 65 69 66 20 ) -RTC1.!elseif
5330: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
5340: 56 45 29 20 2d 63 20 2d 47 5a 5d 0a 44 45 42 55 VE) -c -GZ].DEBU
5350: 47 46 4c 41 47 53 20 20 20 20 20 3d 20 24 28 44 GFLAGS = $(D
5360: 45 42 55 47 46 4c 41 47 53 29 20 2d 47 5a 0a 21 EBUGFLAGS) -GZ.!
5370: 65 6e 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d endif..#--------
5380: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5390: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
53a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
53b0: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 4c 69 6e 6b 65 --------.# Linke
53c0: 72 20 66 6c 61 67 73 0a 0a 23 20 4c 49 4e 4b 45 r flags..# LINKE
53d0: 52 5f 54 45 53 54 46 4c 41 47 53 20 61 72 65 20 R_TESTFLAGS are
53e0: 66 6f 72 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 for internal use
53f0: 20 77 68 65 6e 20 77 65 20 63 61 6c 6c 20 6e 6d when we call nm
5400: 61 6b 65 68 6c 70 20 74 6f 20 74 65 73 74 0a 23 akehlp to test.#
5410: 20 69 66 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 if the linker s
5420: 75 70 70 6f 72 74 73 20 61 20 73 70 65 63 69 66 upports a specif
5430: 69 63 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f ic option. Witho
5440: 75 74 20 74 68 65 73 65 20 66 6c 61 67 73 20 6c ut these flags l
5450: 69 6e 6b 20 77 69 6c 6c 0a 23 20 72 65 74 75 72 ink will.# retur
5460: 6e 20 22 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72 n "LNK1561: entr
5470: 79 20 70 6f 69 6e 74 20 6d 75 73 74 20 62 65 20 y point must be
5480: 64 65 66 69 6e 65 64 22 20 65 72 72 6f 72 20 63 defined" error c
5490: 6f 6d 70 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53 ompiling from VS
54a0: 2d 49 44 45 3a 0a 23 20 54 68 65 79 20 61 72 65 -IDE:.# They are
54b0: 20 6e 6f 74 20 70 61 73 73 65 64 20 74 68 72 6f not passed thro
54c0: 75 67 68 20 74 6f 20 74 68 65 20 61 63 74 75 61 ugh to the actua
54d0: 6c 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 2f 20 l application /
54e0: 65 78 74 65 6e 73 69 6f 6e 0a 23 20 6c 69 6e 6b extension.# link
54f0: 20 72 75 6c 65 73 2e 0a 21 69 66 6e 64 65 66 20 rules..!ifndef
5500: 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 LINKER_TESTFLAGS
5510: 0a 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 .LINKER_TESTFLAG
5520: 53 20 3d 20 2f 44 4c 4c 20 2f 4e 4f 45 4e 54 52 S = /DLL /NOENTR
5530: 59 20 2f 4f 55 54 3a 6e 6d 61 6b 65 68 6c 70 2e Y /OUT:nmakehlp.
5540: 6f 75 74 0a 21 65 6e 64 69 66 0a 0a 4c 49 4e 4b out.!endif..LINK
5550: 45 52 46 4c 41 47 53 20 20 20 20 20 3d 0a 0a 23 ERFLAGS =..#
5560: 20 49 66 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 If compiler has
5570: 20 65 6e 61 62 6c 65 64 20 6c 69 6e 6b 20 74 69 enabled link ti
5580: 6d 65 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2c me optimization,
5590: 20 6c 69 6e 6b 65 72 20 6d 75 73 74 20 74 6f 6f linker must too
55a0: 20 77 69 74 68 20 2d 6c 74 63 67 0a 21 69 66 64 with -ltcg.!ifd
55b0: 65 66 20 43 43 5f 47 4c 5f 4f 50 54 5f 45 4e 41 ef CC_GL_OPT_ENA
55c0: 42 4c 45 44 0a 21 69 66 20 5b 24 28 4e 4d 41 4b BLED.!if [$(NMAK
55d0: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 6c 20 EHLP_NATIVE) -l
55e0: 2d 6c 74 63 67 20 24 28 4c 49 4e 4b 45 52 5f 54 -ltcg $(LINKER_T
55f0: 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 ESTFLAGS)].LINKE
5600: 52 46 4c 41 47 53 20 20 20 20 20 3d 20 24 28 4c RFLAGS = $(L
5610: 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 6c 74 63 INKERFLAGS) -ltc
5620: 67 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a g.!endif.!endif.
5630: 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ..##############
5640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5670: 23 23 0a 23 20 36 2e 20 45 78 74 72 61 63 74 20 ##.# 6. Extract
5680: 76 61 72 69 6f 75 73 20 76 65 72 73 69 6f 6e 20 various version
5690: 6e 75 6d 62 65 72 73 20 66 72 6f 6d 20 68 65 61 numbers from hea
56a0: 64 65 72 73 0a 23 20 46 6f 72 20 54 63 6c 20 61 ders.# For Tcl a
56b0: 6e 64 20 54 6b 2c 20 76 65 72 73 69 6f 6e 20 6e nd Tk, version n
56c0: 75 6d 62 65 72 73 20 61 72 65 20 65 78 74 72 61 umbers are extra
56d0: 63 74 65 64 20 66 72 6f 6d 20 74 63 6c 2e 68 20 cted from tcl.h
56e0: 61 6e 64 20 74 6b 2e 68 0a 23 20 72 65 73 70 65 and tk.h.# respe
56f0: 63 74 69 76 65 6c 79 2e 20 46 6f 72 20 65 78 74 ctively. For ext
5700: 65 6e 73 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e ensions, version
5710: 73 20 61 72 65 20 65 78 74 72 61 63 74 65 64 20 s are extracted
5720: 66 72 6f 6d 20 74 68 65 0a 23 20 63 6f 6e 66 69 from the.# confi
5730: 67 75 72 65 2e 69 6e 20 6f 72 20 63 6f 6e 66 69 gure.in or confi
5740: 67 75 72 65 2e 61 63 20 66 72 6f 6d 20 74 68 65 gure.ac from the
5750: 20 54 45 41 20 63 6f 6e 66 69 67 75 72 61 74 69 TEA configurati
5760: 6f 6e 20 69 66 20 69 74 0a 23 20 65 78 69 73 74 on if it.# exist
5770: 73 2c 20 61 6e 64 20 75 6e 73 65 74 20 6f 74 68 s, and unset oth
5780: 65 72 77 69 73 65 2e 0a 23 20 53 65 74 73 20 74 erwise..# Sets t
5790: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 he following mac
57a0: 72 6f 73 3a 0a 23 20 54 43 4c 5f 4d 41 4a 4f 52 ros:.# TCL_MAJOR
57b0: 5f 56 45 52 53 49 4f 4e 0a 23 20 54 43 4c 5f 4d _VERSION.# TCL_M
57c0: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 0a 23 20 54 INOR_VERSION.# T
57d0: 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 CL_RELEASE_SERIA
57e0: 4c 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 L.# TCL_PATCH_LE
57f0: 56 45 4c 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f VEL.# TCL_PATCH_
5800: 4c 45 54 54 45 52 0a 23 20 54 43 4c 5f 56 45 52 LETTER.# TCL_VER
5810: 53 49 4f 4e 0a 23 20 54 4b 5f 4d 41 4a 4f 52 5f SION.# TK_MAJOR_
5820: 56 45 52 53 49 4f 4e 0a 23 20 54 4b 5f 4d 49 4e VERSION.# TK_MIN
5830: 4f 52 5f 56 45 52 53 49 4f 4e 0a 23 20 54 4b 5f OR_VERSION.# TK_
5840: 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 0a 23 RELEASE_SERIAL.#
5850: 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 0a TK_PATCH_LEVEL.
5860: 23 20 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 # TK_PATCH_LETTE
5870: 52 0a 23 20 54 4b 5f 56 45 52 53 49 4f 4e 0a 23 R.# TK_VERSION.#
5880: 20 44 4f 54 56 45 52 53 49 4f 4e 20 2d 20 73 65 DOTVERSION - se
5890: 74 20 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c t as (for exampl
58a0: 65 29 20 32 2e 35 0a 23 20 56 45 52 53 49 4f 4e e) 2.5.# VERSION
58b0: 20 2d 20 73 65 74 20 61 73 20 28 66 6f 72 20 65 - set as (for e
58c0: 78 61 6d 70 6c 65 20 32 35 29 0a 23 2d 2d 2d 2d xample 25).#----
58d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
58f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5900: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 21 69 66 20 ----------..!if
5910: 5b 65 63 68 6f 20 52 45 4d 20 3d 20 54 68 69 73 [echo REM = This
5920: 20 66 69 6c 65 20 69 73 20 67 65 6e 65 72 61 74 file is generat
5930: 65 64 20 66 72 6f 6d 20 72 75 6c 65 73 2e 76 63 ed from rules.vc
5940: 20 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a > versions.vc].
5950: 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f !endif.!if [echo
5960: 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 TCL_MAJOR_VERSI
5970: 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e ON = \>> version
5980: 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b 24 s.vc] \. && [$
5990: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
59a0: 29 20 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 ) -V "$(_TCL_H)"
59b0: 20 22 64 65 66 69 6e 65 20 54 43 4c 5f 4d 41 4a "define TCL_MAJ
59c0: 4f 52 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 OR_VERSION" >> v
59d0: 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 ersions.vc].!end
59e0: 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c if.!if [echo TCL
59f0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d _MINOR_VERSION =
5a00: 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 \>> versions.vc
5a10: 5d 20 5c 0a 20 20 20 26 26 20 5b 24 28 4e 4d 41 ] \. && [$(NMA
5a20: 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 56 KEHLP_NATIVE) -V
5a30: 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 22 64 65 "$(_TCL_H)" "de
5a40: 66 69 6e 65 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 fine TCL_MINOR_V
5a50: 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 ERSION" >> versi
5a60: 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 ons.vc].!endif.!
5a70: 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 52 45 4c if [echo TCL_REL
5a80: 45 41 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e EASE_SERIAL = \>
5a90: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
5aa0: 0a 20 20 20 26 26 20 5b 24 28 4e 4d 41 4b 45 48 . && [$(NMAKEH
5ab0: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 56 20 22 24 LP_NATIVE) -V "$
5ac0: 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f 52 45 (_TCL_H)" TCL_RE
5ad0: 4c 45 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e 20 LEASE_SERIAL >>
5ae0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e versions.vc].!en
5af0: 64 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 dif.!if [echo TC
5b00: 4c 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 3d 20 L_PATCH_LEVEL =
5b10: 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d \>> versions.vc]
5b20: 20 5c 0a 20 20 20 26 26 20 5b 24 28 4e 4d 41 4b \. && [$(NMAK
5b30: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 56 20 EHLP_NATIVE) -V
5b40: 22 24 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f "$(_TCL_H)" TCL_
5b50: 50 41 54 43 48 5f 4c 45 56 45 4c 20 3e 3e 20 76 PATCH_LEVEL >> v
5b60: 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 ersions.vc].!end
5b70: 69 66 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 if..!if defined(
5b80: 5f 54 4b 5f 48 29 0a 21 69 66 20 5b 65 63 68 6f _TK_H).!if [echo
5b90: 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TK_MAJOR_VERSIO
5ba0: 4e 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 N = \>> versions
5bb0: 2e 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b 24 28 .vc] \. && [$(
5bc0: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
5bd0: 20 2d 56 20 24 28 5f 54 4b 5f 48 29 20 22 64 65 -V $(_TK_H) "de
5be0: 66 69 6e 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 fine TK_MAJOR_VE
5bf0: 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f RSION" >> versio
5c00: 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 ns.vc].!endif.!i
5c10: 66 20 5b 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 f [echo TK_MINOR
5c20: 5f 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 _VERSION = \>> v
5c30: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 ersions.vc] \.
5c40: 20 26 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f && [$(NMAKEHLP_
5c50: 4e 41 54 49 56 45 29 20 2d 56 20 24 28 5f 54 4b NATIVE) -V $(_TK
5c60: 5f 48 29 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 _H) TK_MINOR_VER
5c70: 53 49 4f 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 SION >> versions
5c80: 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 .vc].!endif.!if
5c90: 5b 65 63 68 6f 20 54 4b 5f 52 45 4c 45 41 53 45 [echo TK_RELEASE
5ca0: 5f 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 _SERIAL = \>> ve
5cb0: 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 rsions.vc] \.
5cc0: 26 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e && [$(NMAKEHLP_N
5cd0: 41 54 49 56 45 29 20 2d 56 20 22 24 28 5f 54 4b ATIVE) -V "$(_TK
5ce0: 5f 48 29 22 20 54 4b 5f 52 45 4c 45 41 53 45 5f _H)" TK_RELEASE_
5cf0: 53 45 52 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f SERIAL >> versio
5d00: 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 ns.vc].!endif.!i
5d10: 66 20 5b 65 63 68 6f 20 54 4b 5f 50 41 54 43 48 f [echo TK_PATCH
5d20: 5f 4c 45 56 45 4c 20 3d 20 5c 3e 3e 20 76 65 72 _LEVEL = \>> ver
5d30: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 sions.vc] \. &
5d40: 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 & [$(NMAKEHLP_NA
5d50: 54 49 56 45 29 20 2d 56 20 24 28 5f 54 4b 5f 48 TIVE) -V $(_TK_H
5d60: 29 20 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c ) TK_PATCH_LEVEL
5d70: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
5d80: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
5d90: 20 5f 54 4b 5f 48 0a 0a 21 69 6e 63 6c 75 64 65 _TK_H..!include
5da0: 20 76 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 54 43 versions.vc..TC
5db0: 4c 5f 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 L_VERSION.= $(TC
5dc0: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
5dd0: 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 $(TCL_MINOR_VERS
5de0: 49 4f 4e 29 0a 54 43 4c 5f 44 4f 54 56 45 52 53 ION).TCL_DOTVERS
5df0: 49 4f 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f ION.= $(TCL_MAJO
5e00: 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c R_VERSION).$(TCL
5e10: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a _MINOR_VERSION).
5e20: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
5e30: 4e 41 54 49 56 45 29 20 2d 66 20 24 28 54 43 4c NATIVE) -f $(TCL
5e40: 5f 50 41 54 43 48 5f 4c 45 56 45 4c 29 20 22 61 _PATCH_LEVEL) "a
5e50: 22 5d 0a 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 "].TCL_PATCH_LET
5e60: 54 45 52 20 3d 20 61 0a 21 65 6c 73 65 69 66 20 TER = a.!elseif
5e70: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
5e80: 56 45 29 20 2d 66 20 24 28 54 43 4c 5f 50 41 54 VE) -f $(TCL_PAT
5e90: 43 48 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0a 54 CH_LEVEL) "b"].T
5ea0: 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 CL_PATCH_LETTER
5eb0: 3d 20 62 0a 21 65 6c 73 65 0a 54 43 4c 5f 50 41 = b.!else.TCL_PA
5ec0: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e 0a 21 TCH_LETTER = ..!
5ed0: 65 6e 64 69 66 0a 0a 21 69 66 20 64 65 66 69 6e endif..!if defin
5ee0: 65 64 28 5f 54 4b 5f 48 29 0a 0a 54 4b 5f 56 45 ed(_TK_H)..TK_VE
5ef0: 52 53 49 4f 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a RSION.= $(TK_MAJ
5f00: 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f OR_VERSION)$(TK_
5f10: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 54 MINOR_VERSION).T
5f20: 4b 5f 44 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 K_DOTVERSION.= $
5f30: 28 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f (TK_MAJOR_VERSIO
5f40: 4e 29 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 N).$(TK_MINOR_VE
5f50: 52 53 49 4f 4e 29 0a 21 69 66 20 5b 24 28 4e 4d RSION).!if [$(NM
5f60: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
5f70: 66 20 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 56 f $(TK_PATCH_LEV
5f80: 45 4c 29 20 22 61 22 5d 0a 54 4b 5f 50 41 54 43 EL) "a"].TK_PATC
5f90: 48 5f 4c 45 54 54 45 52 20 3d 20 61 0a 21 65 6c H_LETTER = a.!el
5fa0: 73 65 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 seif [$(NMAKEHLP
5fb0: 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 54 4b _NATIVE) -f $(TK
5fc0: 5f 50 41 54 43 48 5f 4c 45 56 45 4c 29 20 22 62 _PATCH_LEVEL) "b
5fd0: 22 5d 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 "].TK_PATCH_LETT
5fe0: 45 52 20 3d 20 62 0a 21 65 6c 73 65 0a 54 4b 5f ER = b.!else.TK_
5ff0: 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e PATCH_LETTER = .
6000: 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 0a .!endif..!endif.
6010: 0a 23 20 53 65 74 20 44 4f 54 56 45 52 53 49 4f .# Set DOTVERSIO
6020: 4e 20 61 6e 64 20 56 45 52 53 49 4f 4e 0a 21 69 N and VERSION.!i
6030: 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a f $(DOING_TCL)..
6040: 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 DOTVERSION = $(T
6050: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
6060: 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 ).$(TCL_MINOR_VE
6070: 52 53 49 4f 4e 29 0a 56 45 52 53 49 4f 4e 20 3d RSION).VERSION =
6080: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 0a $(TCL_VERSION).
6090: 0a 21 65 6c 73 65 69 66 20 24 28 44 4f 49 4e 47 .!elseif $(DOING
60a0: 5f 54 4b 29 0a 0a 44 4f 54 56 45 52 53 49 4f 4e _TK)..DOTVERSION
60b0: 20 3d 20 24 28 54 4b 5f 44 4f 54 56 45 52 53 49 = $(TK_DOTVERSI
60c0: 4f 4e 29 0a 56 45 52 53 49 4f 4e 20 3d 20 24 28 ON).VERSION = $(
60d0: 54 4b 5f 56 45 52 53 49 4f 4e 29 0a 0a 21 65 6c TK_VERSION)..!el
60e0: 73 65 20 23 20 44 6f 69 6e 67 20 61 20 6e 6f 6e se # Doing a non
60f0: 2d 54 6b 20 65 78 74 65 6e 73 69 6f 6e 0a 0a 23 -Tk extension..#
6100: 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 If parent makef
6110: 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 ile has not defi
6120: 6e 65 64 20 44 4f 54 56 45 52 53 49 4f 4e 2c 20 ned DOTVERSION,
6130: 74 72 79 20 74 6f 20 67 65 74 20 69 74 20 66 72 try to get it fr
6140: 6f 6d 20 54 45 41 0a 23 20 66 69 72 73 74 20 66 om TEA.# first f
6150: 72 6f 6d 20 61 20 63 6f 6e 66 69 67 75 72 65 2e rom a configure.
6160: 69 6e 20 66 69 6c 65 2c 20 61 6e 64 20 74 68 65 in file, and the
6170: 6e 20 66 72 6f 6d 20 63 6f 6e 66 69 67 75 72 65 n from configure
6180: 2e 61 63 0a 21 69 66 6e 64 65 66 20 44 4f 54 56 .ac.!ifndef DOTV
6190: 45 52 53 49 4f 4e 0a 21 69 66 20 5b 65 63 68 6f ERSION.!if [echo
61a0: 20 44 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c 3e DOTVERSION = \>
61b0: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a versions.vc] \.
61c0: 20 20 20 7c 7c 20 5b 24 28 4e 4d 41 4b 45 48 4c || [$(NMAKEHL
61d0: 50 5f 4e 41 54 49 56 45 29 20 2d 56 20 24 28 52 P_NATIVE) -V $(R
61e0: 4f 4f 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 69 OOT)\configure.i
61f0: 6e 20 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d n ^[$(PROJECT)^]
6200: 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d >> versions.vc]
6210: 0a 21 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 .!if [echo DOTVE
6220: 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 RSION = \> versi
6230: 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 ons.vc] \. ||
6240: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
6250: 56 45 29 20 2d 56 20 24 28 52 4f 4f 54 29 5c 63 VE) -V $(ROOT)\c
6260: 6f 6e 66 69 67 75 72 65 2e 61 63 20 5e 5b 24 28 onfigure.ac ^[$(
6270: 50 52 4f 4a 45 43 54 29 5e 5d 20 3e 3e 20 76 65 PROJECT)^] >> ve
6280: 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 72 72 6f rsions.vc].!erro
6290: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
62a0: 66 69 67 75 72 65 20 6f 75 74 20 65 78 74 65 6e figure out exten
62b0: 73 69 6f 6e 20 76 65 72 73 69 6f 6e 2e 20 50 6c sion version. Pl
62c0: 65 61 73 65 20 64 65 66 69 6e 65 20 44 4f 54 56 ease define DOTV
62d0: 45 52 53 49 4f 4e 20 69 6e 20 70 61 72 65 6e 74 ERSION in parent
62e0: 20 6d 61 6b 65 66 69 6c 65 20 62 65 66 6f 72 65 makefile before
62f0: 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 73 including rules
6300: 2e 76 63 2e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 .vc..!endif.!end
6310: 69 66 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 73 if.!include vers
6320: 69 6f 6e 73 2e 76 63 0a 21 65 6e 64 69 66 20 23 ions.vc.!endif #
6330: 20 44 4f 54 56 45 52 53 49 4f 4e 0a 56 45 52 53 DOTVERSION.VERS
6340: 49 4f 4e 20 20 20 20 20 20 20 20 20 3d 20 24 28 ION = $(
6350: 44 4f 54 56 45 52 53 49 4f 4e 3a 2e 3d 29 0a 0a DOTVERSION:.=)..
6360: 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 !endif # $(DOING
6370: 5f 54 43 4c 29 20 2e 2e 2e 20 65 74 63 2e 0a 0a _TCL) ... etc...
6380: 23 20 57 69 6e 64 6f 77 73 20 52 43 20 66 69 6c # Windows RC fil
6390: 65 73 20 68 61 76 65 20 33 20 76 65 72 73 69 6f es have 3 versio
63a0: 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 2e 20 45 6e n components. En
63b0: 73 75 72 65 20 74 68 69 73 20 69 72 72 65 73 70 sure this irresp
63c0: 65 63 74 69 76 65 0a 23 20 6f 66 20 68 6f 77 20 ective.# of how
63d0: 6d 61 6e 79 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 many components
63e0: 74 68 65 20 70 61 63 6b 61 67 65 20 68 61 73 20 the package has
63f0: 73 70 65 63 69 66 69 65 64 2e 20 42 61 73 69 63 specified. Basic
6400: 61 6c 6c 79 2c 20 65 6e 73 75 72 65 0a 23 20 6d ally, ensure.# m
6410: 69 6e 69 6d 75 6d 20 34 20 63 6f 6d 70 6f 6e 65 inimum 4 compone
6420: 6e 74 73 20 62 79 20 61 70 70 65 6e 64 69 6e 67 nts by appending
6430: 20 34 20 30 27 73 20 61 6e 64 20 74 68 65 6e 20 4 0's and then
6440: 70 69 63 6b 20 6f 75 74 20 74 68 65 20 66 69 72 pick out the fir
6450: 73 74 20 34 2e 0a 23 20 41 6c 73 6f 20 74 61 6b st 4..# Also tak
6460: 65 20 63 61 72 65 20 6f 66 20 74 68 65 20 66 61 e care of the fa
6470: 63 74 20 74 68 61 74 20 44 4f 54 56 45 52 53 49 ct that DOTVERSI
6480: 4f 4e 20 6d 61 79 20 68 61 76 65 20 22 61 22 20 ON may have "a"
6490: 6f 72 20 22 62 22 20 69 6e 73 74 65 61 64 0a 23 or "b" instead.#
64a0: 20 6f 66 20 22 2e 22 20 73 65 70 61 72 61 74 69 of "." separati
64b0: 6e 67 20 74 68 65 20 76 65 72 73 69 6f 6e 20 63 ng the version c
64c0: 6f 6d 70 6f 6e 65 6e 74 73 2e 0a 44 4f 54 53 45 omponents..DOTSE
64d0: 50 41 52 41 54 45 44 3d 24 28 44 4f 54 56 45 52 PARATED=$(DOTVER
64e0: 53 49 4f 4e 3a 61 3d 2e 29 0a 44 4f 54 53 45 50 SION:a=.).DOTSEP
64f0: 41 52 41 54 45 44 3d 24 28 44 4f 54 53 45 50 41 ARATED=$(DOTSEPA
6500: 52 41 54 45 44 3a 62 3d 2e 29 0a 21 69 66 20 5b RATED:b=.).!if [
6510: 65 63 68 6f 20 52 43 43 4f 4d 4d 41 56 45 52 53 echo RCCOMMAVERS
6520: 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e ION = \> version
6530: 73 2e 76 63 5d 20 5c 0a 20 20 7c 7c 20 5b 66 6f s.vc] \. || [fo
6540: 72 20 2f 66 20 22 74 6f 6b 65 6e 73 3d 31 2c 32 r /f "tokens=1,2
6550: 2c 33 2c 34 2c 35 2a 20 64 65 6c 69 6d 73 3d 2e ,3,4,5* delims=.
6560: 22 20 25 61 20 69 6e 20 28 22 24 28 44 4f 54 53 " %a in ("$(DOTS
6570: 45 50 41 52 41 54 45 44 29 2e 30 2e 30 2e 30 2e EPARATED).0.0.0.
6580: 30 22 29 20 64 6f 20 65 63 68 6f 20 25 61 2c 25 0") do echo %a,%
6590: 62 2c 25 63 2c 25 64 20 3e 3e 20 76 65 72 73 69 b,%c,%d >> versi
65a0: 6f 6e 73 2e 76 63 5d 0a 21 65 72 72 6f 72 20 2a ons.vc].!error *
65b0: 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 67 65 6e ** Could not gen
65c0: 65 72 61 74 65 20 52 43 43 4f 4d 4d 41 56 45 52 erate RCCOMMAVER
65d0: 53 49 4f 4e 20 2a 2a 2a 0a 21 65 6e 64 69 66 0a SION ***.!endif.
65e0: 21 69 6e 63 6c 75 64 65 20 76 65 72 73 69 6f 6e !include version
65f0: 73 2e 76 63 0a 0a 23 23 23 23 23 23 23 23 23 23 s.vc..##########
6600: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6610: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6620: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6630: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 ##############.#
6640: 20 37 2e 20 50 61 72 73 65 20 74 68 65 20 4f 50 7. Parse the OP
6650: 54 53 20 6d 61 63 72 6f 20 74 6f 20 77 6f 72 6b TS macro to work
6660: 20 6f 75 74 20 74 68 65 20 72 65 71 75 65 73 74 out the request
6670: 65 64 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 ed build configu
6680: 72 61 74 69 6f 6e 2e 0a 23 20 42 61 73 65 64 20 ration..# Based
6690: 6f 6e 20 74 68 69 73 2c 20 77 65 20 77 69 6c 6c on this, we will
66a0: 20 63 6f 6e 73 74 72 75 63 74 20 74 68 65 20 61 construct the a
66b0: 63 74 75 61 6c 20 73 77 69 74 63 68 65 73 20 74 ctual switches t
66c0: 6f 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 o be passed to t
66d0: 68 65 0a 23 20 63 6f 6d 70 69 6c 65 72 20 61 6e he.# compiler an
66e0: 64 20 6c 69 6e 6b 65 72 20 75 73 69 6e 67 20 74 d linker using t
66f0: 68 65 20 6d 61 63 72 6f 73 20 64 65 66 69 6e 65 he macros define
6700: 64 20 69 6e 20 74 68 65 20 70 72 65 76 69 6f 75 d in the previou
6710: 73 20 73 65 63 74 69 6f 6e 2e 0a 23 20 54 68 65 s section..# The
6720: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
6730: 73 20 61 72 65 20 64 65 66 69 6e 65 64 20 62 79 s are defined by
6740: 20 74 68 69 73 20 73 65 63 74 69 6f 6e 20 62 61 this section ba
6750: 73 65 64 20 6f 6e 20 4f 50 54 53 0a 23 20 53 54 sed on OPTS.# ST
6760: 41 54 49 43 5f 42 55 49 4c 44 20 2d 20 30 20 2d ATIC_BUILD - 0 -
6770: 3e 20 54 63 6c 20 69 73 20 74 6f 20 62 65 20 62 > Tcl is to be b
6780: 75 69 6c 74 20 61 73 20 61 20 73 68 61 72 65 64 uilt as a shared
6790: 20 6c 69 62 72 61 72 79 0a 23 20 20 20 20 20 20 library.#
67a0: 20 20 20 20 20 20 20 20 20 20 31 20 2d 3e 20 62 1 -> b
67b0: 75 69 6c 64 20 61 73 20 61 20 73 74 61 74 69 63 uild as a static
67c0: 20 6c 69 62 72 61 72 79 20 61 6e 64 20 73 68 65 library and she
67d0: 6c 6c 0a 23 20 54 43 4c 5f 54 48 52 45 41 44 53 ll.# TCL_THREADS
67e0: 20 2d 20 6c 65 67 61 63 79 20 62 75 74 20 61 6c - legacy but al
67f0: 77 61 79 73 20 31 20 6f 6e 20 57 69 6e 64 6f 77 ways 1 on Window
6800: 73 20 73 69 6e 63 65 20 77 69 6e 73 6f 63 6b 20 s since winsock
6810: 72 65 71 75 69 72 65 73 20 69 74 2e 0a 23 20 44 requires it..# D
6820: 45 42 55 47 20 2d 20 31 20 2d 3e 20 64 65 62 75 EBUG - 1 -> debu
6830: 67 20 62 75 69 6c 64 2c 20 30 20 2d 3e 20 72 65 g build, 0 -> re
6840: 6c 65 61 73 65 20 62 75 69 6c 64 73 0a 23 20 53 lease builds.# S
6850: 59 4d 42 4f 4c 53 20 2d 20 31 20 2d 3e 20 67 65 YMBOLS - 1 -> ge
6860: 6e 65 72 61 74 65 20 50 44 42 27 73 2c 20 30 20 nerate PDB's, 0
6870: 2d 3e 20 6e 6f 20 50 44 42 27 73 0a 23 20 50 52 -> no PDB's.# PR
6880: 4f 46 49 4c 45 20 2d 20 31 20 2d 3e 20 67 65 6e OFILE - 1 -> gen
6890: 65 72 61 74 65 20 70 72 6f 66 69 6c 69 6e 67 20 erate profiling
68a0: 69 6e 66 6f 2c 20 30 20 2d 3e 20 6e 6f 20 70 72 info, 0 -> no pr
68b0: 6f 66 69 6c 69 6e 67 0a 23 20 50 47 4f 20 20 20 ofiling.# PGO
68c0: 20 20 2d 20 31 20 2d 3e 20 70 72 6f 66 69 6c 65 - 1 -> profile
68d0: 20 62 61 73 65 64 20 6f 70 74 69 6d 69 7a 61 74 based optimizat
68e0: 69 6f 6e 2c 20 30 20 2d 3e 20 6e 6f 0a 23 20 4d ion, 0 -> no.# M
68f0: 53 56 43 52 54 20 20 2d 20 31 20 2d 3e 20 6c 69 SVCRT - 1 -> li
6900: 6e 6b 20 74 6f 20 64 79 6e 61 6d 69 63 20 43 20 nk to dynamic C
6910: 72 75 6e 74 69 6d 65 20 65 76 65 6e 20 77 68 65 runtime even whe
6920: 6e 20 62 75 69 6c 64 69 6e 67 20 73 74 61 74 69 n building stati
6930: 63 20 54 63 6c 20 62 75 69 6c 64 0a 23 20 20 20 c Tcl build.#
6940: 20 20 20 20 20 20 20 20 30 20 2d 3e 20 6c 69 6e 0 -> lin
6950: 6b 20 74 6f 20 73 74 61 74 69 63 20 43 20 72 75 k to static C ru
6960: 6e 74 69 6d 65 20 66 6f 72 20 73 74 61 74 69 63 ntime for static
6970: 20 54 63 6c 20 62 75 69 6c 64 2e 0a 23 20 20 20 Tcl build..#
6980: 20 20 20 20 20 20 20 20 44 6f 65 73 20 6e 6f 74 Does not
6990: 20 69 6d 70 61 63 74 20 73 68 61 72 65 64 20 54 impact shared T
69a0: 63 6c 20 62 75 69 6c 64 73 20 28 53 54 41 54 49 cl builds (STATI
69b0: 43 5f 42 55 49 4c 44 20 3d 3d 20 30 29 0a 23 20 C_BUILD == 0).#
69c0: 20 20 20 20 20 20 20 20 20 20 44 65 66 61 75 6c Defaul
69d0: 74 3a 20 31 20 66 6f 72 20 54 63 6c 20 39 2e 30 t: 1 for Tcl 9.0
69e0: 20 61 6e 64 20 75 70 2c 20 30 20 6f 74 68 65 72 and up, 0 other
69f0: 77 69 73 65 2e 0a 23 20 54 43 4c 5f 55 53 45 5f wise..# TCL_USE_
6a00: 53 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 20 STATIC_PACKAGES
6a10: 2d 20 31 20 2d 3e 20 73 74 61 74 69 63 61 6c 6c - 1 -> staticall
6a20: 79 20 6c 69 6e 6b 20 74 68 65 20 72 65 67 69 73 y link the regis
6a30: 74 72 79 20 61 6e 64 20 64 64 65 20 65 78 74 65 try and dde exte
6a40: 6e 73 69 6f 6e 73 0a 23 20 20 20 20 20 20 20 20 nsions.#
6a50: 20 20 20 69 6e 20 74 68 65 20 54 63 6c 20 61 6e in the Tcl an
6a60: 64 20 57 69 73 68 20 73 68 65 6c 6c 2e 20 30 20 d Wish shell. 0
6a70: 2d 3e 20 6b 65 65 70 20 74 68 65 6d 20 61 73 20 -> keep them as
6a80: 73 68 61 72 65 64 20 6c 69 62 72 61 72 69 65 73 shared libraries
6a90: 2e 20 44 6f 65 73 0a 23 20 20 20 20 20 20 20 20 . Does.#
6aa0: 20 20 20 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 not impact sh
6ab0: 61 72 65 64 20 54 63 6c 20 62 75 69 6c 64 73 2e ared Tcl builds.
6ac0: 20 49 6d 70 6c 69 65 64 20 62 79 20 53 54 41 54 Implied by STAT
6ad0: 49 43 5f 42 55 49 4c 44 20 73 69 6e 63 65 20 54 IC_BUILD since T
6ae0: 63 6c 20 39 2e 30 2e 0a 23 20 55 53 45 5f 54 48 cl 9.0..# USE_TH
6af0: 52 45 41 44 5f 41 4c 4c 4f 43 20 2d 20 31 20 2d READ_ALLOC - 1 -
6b00: 3e 20 55 73 65 20 61 20 73 68 61 72 65 64 20 67 > Use a shared g
6b10: 6c 6f 62 61 6c 20 66 72 65 65 20 70 6f 6f 6c 20 lobal free pool
6b20: 66 6f 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 2e 0a for allocation..
6b30: 23 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e # 0 ->
6b40: 20 55 73 65 20 74 68 65 20 6e 6f 6e 2d 74 68 72 Use the non-thr
6b50: 65 61 64 20 61 6c 6c 6f 63 61 74 6f 72 2e 0a 23 ead allocator..#
6b60: 20 55 4e 43 48 45 43 4b 45 44 20 2d 20 31 20 2d UNCHECKED - 1 -
6b70: 3e 20 77 68 65 6e 20 64 6f 69 6e 67 20 61 20 64 > when doing a d
6b80: 65 62 75 67 20 62 75 69 6c 64 20 77 69 74 68 20 ebug build with
6b90: 73 79 6d 62 6f 6c 73 2c 20 75 73 65 20 74 68 65 symbols, use the
6ba0: 20 72 65 6c 65 61 73 65 0a 23 20 20 20 20 20 20 release.#
6bb0: 20 20 20 20 20 43 20 72 75 6e 74 69 6d 65 2c 20 C runtime,
6bc0: 30 20 2d 3e 20 75 73 65 20 74 68 65 20 64 65 62 0 -> use the deb
6bd0: 75 67 20 43 20 72 75 6e 74 69 6d 65 2e 0a 23 20 ug C runtime..#
6be0: 55 53 45 5f 53 54 55 42 53 20 2d 20 31 20 2d 3e USE_STUBS - 1 ->
6bf0: 20 63 6f 6d 70 69 6c 65 20 74 6f 20 75 73 65 20 compile to use
6c00: 73 74 75 62 73 20 69 6e 74 65 72 66 61 63 65 73 stubs interfaces
6c10: 2c 20 30 20 2d 3e 20 64 69 72 65 63 74 20 6c 69 , 0 -> direct li
6c20: 6e 6b 69 6e 67 0a 23 20 43 4f 4e 46 49 47 5f 43 nking.# CONFIG_C
6c30: 48 45 43 4b 20 2d 20 31 20 2d 3e 20 63 68 65 63 HECK - 1 -> chec
6c40: 6b 20 63 75 72 72 65 6e 74 20 62 75 69 6c 64 20 k current build
6c50: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 67 configuration ag
6c60: 61 69 6e 73 74 20 54 63 6c 0a 23 20 20 20 20 20 ainst Tcl.#
6c70: 20 20 20 20 20 20 63 6f 6e 66 69 67 75 72 61 74 configurat
6c80: 69 6f 6e 20 28 69 67 6e 6f 72 65 64 20 66 6f 72 ion (ignored for
6c90: 20 54 63 6c 20 69 74 73 65 6c 66 29 0a 23 20 5f Tcl itself).# _
6ca0: 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 USE_64BIT_TIME_T
6cb0: 20 2d 20 66 6f 72 63 65 73 20 61 20 62 75 69 6c - forces a buil
6cc0: 64 20 75 73 69 6e 67 20 36 34 2d 62 69 74 20 74 d using 64-bit t
6cd0: 69 6d 65 5f 74 20 66 6f 72 20 33 32 2d 62 69 74 ime_t for 32-bit
6ce0: 20 62 75 69 6c 64 0a 23 20 20 20 20 20 20 20 20 build.#
6cf0: 20 20 20 28 43 52 54 20 6c 69 62 72 61 72 79 20 (CRT library
6d00: 73 68 6f 75 6c 64 20 73 75 70 70 6f 72 74 20 74 should support t
6d10: 68 69 73 2c 20 6e 6f 74 20 6e 65 65 64 65 64 20 his, not needed
6d20: 66 6f 72 20 54 63 6c 20 39 2e 78 29 0a 23 20 46 for Tcl 9.x).# F
6d30: 75 72 74 68 65 72 2c 20 4c 49 4e 4b 45 52 46 4c urther, LINKERFL
6d40: 41 47 53 20 61 72 65 20 6d 6f 64 69 66 69 65 64 AGS are modified
6d50: 20 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 2e based on above.
6d60: 0a 0a 23 20 44 65 66 61 75 6c 74 20 76 61 6c 75 ..# Default valu
6d70: 65 73 20 66 6f 72 20 61 6c 6c 20 74 68 65 20 61 es for all the a
6d80: 62 6f 76 65 0a 53 54 41 54 49 43 5f 42 55 49 4c bove.STATIC_BUIL
6d90: 44 09 3d 20 30 0a 54 43 4c 5f 54 48 52 45 41 44 D.= 0.TCL_THREAD
6da0: 53 09 3d 20 31 0a 44 45 42 55 47 09 09 3d 20 30 S.= 1.DEBUG..= 0
6db0: 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 50 52 .SYMBOLS..= 0.PR
6dc0: 4f 46 49 4c 45 09 09 3d 20 30 0a 50 47 4f 09 09 OFILE..= 0.PGO..
6dd0: 3d 20 30 0a 4d 53 56 43 52 54 09 09 3d 20 31 0a = 0.MSVCRT..= 1.
6de0: 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 TCL_USE_STATIC_P
6df0: 41 43 4b 41 47 45 53 09 3d 20 30 0a 55 53 45 5f ACKAGES.= 0.USE_
6e00: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 31 THREAD_ALLOC = 1
6e10: 0a 55 4e 43 48 45 43 4b 45 44 09 3d 20 30 0a 43 .UNCHECKED.= 0.C
6e20: 4f 4e 46 49 47 5f 43 48 45 43 4b 20 20 20 20 3d ONFIG_CHECK =
6e30: 20 31 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 1.!if $(DOING_T
6e40: 43 4c 29 0a 55 53 45 5f 53 54 55 42 53 20 20 20 CL).USE_STUBS
6e50: 20 20 20 20 3d 20 30 0a 21 65 6c 73 65 0a 55 53 = 0.!else.US
6e60: 45 5f 53 54 55 42 53 20 20 20 20 20 20 20 3d 20 E_STUBS =
6e70: 31 0a 21 65 6e 64 69 66 0a 0a 23 20 49 66 20 4f 1.!endif..# If O
6e80: 50 54 53 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 PTS is not empty
6e90: 20 41 4e 44 20 64 6f 65 73 20 6e 6f 74 20 63 6f AND does not co
6ea0: 6e 74 61 69 6e 20 22 6e 6f 6e 65 22 20 77 68 69 ntain "none" whi
6eb0: 63 68 20 74 75 72 6e 73 20 6f 66 66 20 61 6c 6c ch turns off all
6ec0: 20 4f 50 54 53 0a 23 20 73 65 74 20 74 68 65 20 OPTS.# set the
6ed0: 61 62 6f 76 65 20 6d 61 63 72 6f 73 20 62 61 73 above macros bas
6ee0: 65 64 20 6f 6e 20 4f 50 54 53 20 63 6f 6e 74 65 ed on OPTS conte
6ef0: 6e 74 0a 21 69 66 20 22 24 28 4f 50 54 53 29 22 nt.!if "$(OPTS)"
6f00: 20 21 3d 20 22 22 20 26 26 20 21 5b 24 28 4e 4d != "" && ![$(NM
6f10: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
6f20: 66 20 22 24 28 4f 50 54 53 29 22 20 22 6e 6f 6e f "$(OPTS)" "non
6f30: 65 22 5d 0a 0a 23 20 4f 50 54 53 20 61 72 65 20 e"]..# OPTS are
6f40: 73 70 65 63 69 66 69 65 64 2c 20 70 61 72 73 65 specified, parse
6f50: 20 74 68 65 6d 0a 0a 21 69 66 20 5b 24 28 4e 4d them..!if [$(NM
6f60: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
6f70: 66 20 24 28 4f 50 54 53 29 20 22 73 74 61 74 69 f $(OPTS) "stati
6f80: 63 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a c"].!message ***
6f90: 20 44 6f 69 6e 67 20 73 74 61 74 69 63 0a 53 54 Doing static.ST
6fa0: 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 31 0a 21 ATIC_BUILD.= 1.!
6fb0: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 4e 4d endif..!if [$(NM
6fc0: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
6fd0: 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 73 74 75 f $(OPTS) "nostu
6fe0: 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a bs"].!message **
6ff0: 2a 20 4e 6f 74 20 75 73 69 6e 67 20 73 74 75 62 * Not using stub
7000: 73 0a 55 53 45 5f 53 54 55 42 53 09 3d 20 30 0a s.USE_STUBS.= 0.
7010: 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 4e !endif..!if [$(N
7020: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
7030: 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 6d 73 -f $(OPTS) "noms
7040: 76 63 72 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 vcrt"].!message
7050: 2a 2a 2a 20 44 6f 69 6e 67 20 6e 6f 6d 73 76 63 *** Doing nomsvc
7060: 72 74 0a 4d 53 56 43 52 54 09 09 3d 20 30 0a 21 rt.MSVCRT..= 0.!
7070: 65 6c 73 65 0a 21 69 66 20 5b 24 28 4e 4d 41 4b else.!if [$(NMAK
7080: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 EHLP_NATIVE) -f
7090: 24 28 4f 50 54 53 29 20 22 6d 73 76 63 72 74 22 $(OPTS) "msvcrt"
70a0: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 ].!message *** D
70b0: 6f 69 6e 67 20 6d 73 76 63 72 74 0a 21 65 6c 73 oing msvcrt.!els
70c0: 65 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f e.!if $(TCL_MAJO
70d0: 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 R_VERSION) == 8
70e0: 26 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 && $(TCL_MINOR_V
70f0: 45 52 53 49 4f 4e 29 20 3c 20 37 20 26 26 20 24 ERSION) < 7 && $
7100: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 4d (STATIC_BUILD).M
7110: 53 56 43 52 54 09 09 3d 20 30 0a 21 65 6e 64 69 SVCRT..= 0.!endi
7120: 66 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 f.!endif.!endif
7130: 23 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 # [$(NMAKEHLP_NA
7140: 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 TIVE) -f $(OPTS)
7150: 20 22 6e 6f 6d 73 76 63 72 74 22 5d 0a 0a 21 69 "nomsvcrt"]..!i
7160: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
7170: 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 TIVE) -f $(OPTS)
7180: 20 22 73 74 61 74 69 63 70 6b 67 22 5d 20 26 26 "staticpkg"] &&
7190: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
71a0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f .!message *** Do
71b0: 69 6e 67 20 73 74 61 74 69 63 70 6b 67 0a 54 43 ing staticpkg.TC
71c0: 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 43 L_USE_STATIC_PAC
71d0: 4b 41 47 45 53 09 3d 20 31 0a 21 65 6e 64 69 66 KAGES.= 1.!endif
71e0: 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c ..!if [$(NMAKEHL
71f0: 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f P_NATIVE) -f $(O
7200: 50 54 53 29 20 22 6e 6f 74 68 72 65 61 64 73 22 PTS) "nothreads"
7210: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 ].!message *** C
7220: 6f 6d 70 69 6c 65 20 65 78 70 6c 69 63 69 74 6c ompile explicitl
7230: 79 20 66 6f 72 20 6e 6f 6e 2d 74 68 72 65 61 64 y for non-thread
7240: 65 64 20 74 63 6c 0a 54 43 4c 5f 54 48 52 45 41 ed tcl.TCL_THREA
7250: 44 53 20 3d 20 30 0a 55 53 45 5f 54 48 52 45 41 DS = 0.USE_THREA
7260: 44 5f 41 4c 4c 4f 43 3d 20 30 0a 21 65 6e 64 69 D_ALLOC= 0.!endi
7270: 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 f..!if [$(NMAKEH
7280: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 LP_NATIVE) -f $(
7290: 4f 50 54 53 29 20 22 74 63 6c 38 22 5d 0a 21 6d OPTS) "tcl8"].!m
72a0: 65 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 essage *** Build
72b0: 20 66 6f 72 20 54 63 6c 38 0a 54 43 4c 5f 42 55 for Tcl8.TCL_BU
72c0: 49 4c 44 5f 46 4f 52 20 3d 20 38 0a 21 65 6e 64 ILD_FOR = 8.!end
72d0: 69 66 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 if..!if $(TCL_MA
72e0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 JOR_VERSION) ==
72f0: 38 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 8.!if [$(NMAKEHL
7300: 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f P_NATIVE) -f $(O
7310: 50 54 53 29 20 22 74 69 6d 65 36 34 62 69 74 22 PTS) "time64bit"
7320: 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 46 ].!message *** F
7330: 6f 72 63 65 20 36 34 2d 62 69 74 20 74 69 6d 65 orce 64-bit time
7340: 5f 74 0a 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 _t._USE_64BIT_TI
7350: 4d 45 5f 54 20 3d 20 31 0a 21 65 6e 64 69 66 0a ME_T = 1.!endif.
7360: 21 65 6e 64 69 66 0a 0a 23 20 59 65 73 2c 20 69 !endif..# Yes, i
7370: 74 27 73 20 77 65 69 72 64 20 74 68 61 74 20 74 t's weird that t
7380: 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 6f 70 74 he "symbols" opt
7390: 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 44 45 42 ion controls DEB
73a0: 55 47 20 61 6e 64 0a 23 20 74 68 65 20 22 70 64 UG and.# the "pd
73b0: 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 bs" option contr
73c0: 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20 54 68 61 ols SYMBOLS. Tha
73d0: 74 27 73 20 68 69 73 74 6f 72 69 63 61 6c 2e 0a t's historical..
73e0: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
73f0: 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 NATIVE) -f $(OPT
7400: 53 29 20 22 73 79 6d 62 6f 6c 73 22 5d 0a 21 6d S) "symbols"].!m
7410: 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 essage *** Doing
7420: 20 73 79 6d 62 6f 6c 73 0a 44 45 42 55 47 09 09 symbols.DEBUG..
7430: 3d 20 31 0a 21 65 6c 73 65 0a 44 45 42 55 47 09 = 1.!else.DEBUG.
7440: 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 .= 0.!endif..!if
7450: 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 [$(NMAKEHLP_NAT
7460: 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 IVE) -f $(OPTS)
7470: 22 70 64 62 73 22 5d 0a 21 6d 65 73 73 61 67 65 "pdbs"].!message
7480: 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 64 62 73 0a *** Doing pdbs.
7490: 53 59 4d 42 4f 4c 53 09 09 3d 20 31 0a 21 65 6c SYMBOLS..= 1.!el
74a0: 73 65 0a 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a se.SYMBOLS..= 0.
74b0: 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 4e !endif..!if [$(N
74c0: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
74d0: 2d 66 20 24 28 4f 50 54 53 29 20 22 70 72 6f 66 -f $(OPTS) "prof
74e0: 69 6c 65 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a ile"].!message *
74f0: 2a 2a 20 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 ** Doing profile
7500: 0a 50 52 4f 46 49 4c 45 09 09 3d 20 31 0a 21 65 .PROFILE..= 1.!e
7510: 6c 73 65 0a 50 52 4f 46 49 4c 45 09 09 3d 20 30 lse.PROFILE..= 0
7520: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 .!endif..!if [$(
7530: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
7540: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 67 69 -f $(OPTS) "pgi
7550: 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 "].!message ***
7560: 44 6f 69 6e 67 20 70 72 6f 66 69 6c 65 20 67 75 Doing profile gu
7570: 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f ided optimizatio
7580: 6e 20 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f n instrumentatio
7590: 6e 0a 50 47 4f 09 09 3d 20 31 0a 21 65 6c 73 65 n.PGO..= 1.!else
75a0: 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e if [$(NMAKEHLP_N
75b0: 41 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 ATIVE) -f $(OPTS
75c0: 29 20 22 70 67 6f 22 5d 0a 21 6d 65 73 73 61 67 ) "pgo"].!messag
75d0: 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 70 72 6f 66 e *** Doing prof
75e0: 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d ile guided optim
75f0: 69 7a 61 74 69 6f 6e 0a 50 47 4f 09 09 3d 20 32 ization.PGO..= 2
7600: 0a 21 65 6c 73 65 0a 50 47 4f 09 09 3d 20 30 0a .!else.PGO..= 0.
7610: 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 4e !endif..!if [$(N
7620: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
7630: 2d 66 20 24 28 4f 50 54 53 29 20 22 6c 6f 69 6d -f $(OPTS) "loim
7640: 70 61 63 74 22 5d 0a 21 6d 65 73 73 61 67 65 20 pact"].!message
7650: 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a 20 69 67 6e *** Warning: ign
7660: 6f 72 69 6e 67 20 6f 70 74 69 6f 6e 20 22 6c 6f oring option "lo
7670: 69 6d 70 61 63 74 22 20 2d 20 64 65 70 72 65 63 impact" - deprec
7680: 61 74 65 64 20 6f 6e 20 6d 6f 64 65 72 6e 20 57 ated on modern W
7690: 69 6e 64 6f 77 73 2e 0a 21 65 6e 64 69 66 0a 0a indows..!endif..
76a0: 23 20 54 42 44 20 2d 20 73 68 6f 75 6c 64 20 67 # TBD - should g
76b0: 65 74 20 72 69 64 20 6f 66 20 74 68 69 73 20 6f et rid of this o
76c0: 70 74 69 6f 6e 0a 21 69 66 20 5b 24 28 4e 4d 41 ption.!if [$(NMA
76d0: 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 KEHLP_NATIVE) -f
76e0: 20 24 28 4f 50 54 53 29 20 22 74 68 72 64 61 6c $(OPTS) "thrdal
76f0: 6c 6f 63 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a loc"].!message *
7700: 2a 2a 20 44 6f 69 6e 67 20 74 68 72 64 61 6c 6c ** Doing thrdall
7710: 6f 63 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 4c oc.USE_THREAD_AL
7720: 4c 4f 43 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a LOC = 1.!endif..
7730: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
7740: 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 NATIVE) -f $(OPT
7750: 53 29 20 22 74 63 6c 61 6c 6c 6f 63 22 5d 0a 55 S) "tclalloc"].U
7760: 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 20 SE_THREAD_ALLOC
7770: 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 = 0.!endif..!if
7780: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
7790: 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 22 VE) -f $(OPTS) "
77a0: 75 6e 63 68 65 63 6b 65 64 22 5d 0a 21 6d 65 73 unchecked"].!mes
77b0: 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 75 sage *** Doing u
77c0: 6e 63 68 65 63 6b 65 64 0a 55 4e 43 48 45 43 4b nchecked.UNCHECK
77d0: 45 44 20 3d 20 31 0a 21 65 6c 73 65 0a 55 4e 43 ED = 1.!else.UNC
77e0: 48 45 43 4b 45 44 20 3d 20 30 0a 21 65 6e 64 69 HECKED = 0.!endi
77f0: 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 f..!if [$(NMAKEH
7800: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 LP_NATIVE) -f $(
7810: 4f 50 54 53 29 20 22 6e 6f 63 6f 6e 66 69 67 63 OPTS) "noconfigc
7820: 68 65 63 6b 22 5d 0a 43 4f 4e 46 49 47 5f 43 48 heck"].CONFIG_CH
7830: 45 43 4b 20 3d 20 31 0a 21 65 6c 73 65 0a 43 4f ECK = 1.!else.CO
7840: 4e 46 49 47 5f 43 48 45 43 4b 20 3d 20 30 0a 21 NFIG_CHECK = 0.!
7850: 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 endif..!endif #
7860: 22 24 28 4f 50 54 53 29 22 20 21 3d 20 22 22 20 "$(OPTS)" != ""
7870: 20 26 26 20 2e 2e 2e 20 70 61 72 73 69 6e 67 20 && ... parsing
7880: 6f 66 20 4f 50 54 53 0a 0a 23 20 53 65 74 20 6c of OPTS..# Set l
7890: 69 6e 6b 65 72 20 66 6c 61 67 73 20 62 61 73 65 inker flags base
78a0: 64 20 6f 6e 20 61 62 6f 76 65 0a 0a 21 69 66 20 d on above..!if
78b0: 24 28 50 47 4f 29 20 3e 20 31 0a 21 69 66 20 5b $(PGO) > 1.!if [
78c0: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
78d0: 45 29 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 6f 70 E) -l -ltcg:pgop
78e0: 74 69 6d 69 7a 65 20 24 28 4c 49 4e 4b 45 52 5f timize $(LINKER_
78f0: 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b TESTFLAGS)].LINK
7900: 45 52 46 4c 41 47 53 09 3d 20 24 28 4c 49 4e 4b ERFLAGS.= $(LINK
7910: 45 52 46 4c 41 47 53 3a 2d 6c 74 63 67 3d 29 20 ERFLAGS:-ltcg=)
7920: 2d 6c 74 63 67 3a 70 67 6f 70 74 69 6d 69 7a 65 -ltcg:pgoptimize
7930: 0a 21 65 6c 73 65 0a 4d 53 47 3d 5e 0a 54 68 69 .!else.MSG=^.Thi
7940: 73 20 63 6f 6d 70 69 6c 65 72 20 64 6f 65 73 20 s compiler does
7950: 6e 6f 74 20 73 75 70 70 6f 72 74 20 70 72 6f 66 not support prof
7960: 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 6d ile guided optim
7970: 69 7a 61 74 69 6f 6e 2e 0a 21 65 72 72 6f 72 20 ization..!error
7980: 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 65 $(MSG).!endif.!e
7990: 6c 73 65 69 66 20 24 28 50 47 4f 29 20 3e 20 30 lseif $(PGO) > 0
79a0: 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 .!if [$(NMAKEHLP
79b0: 5f 4e 41 54 49 56 45 29 20 2d 6c 20 2d 6c 74 63 _NATIVE) -l -ltc
79c0: 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 20 24 g:pginstrument $
79d0: 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 (LINKER_TESTFLAG
79e0: 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 S)].LINKERFLAGS.
79f0: 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 3a = $(LINKERFLAGS:
7a00: 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 67 3a 70 67 -ltcg=) -ltcg:pg
7a10: 69 6e 73 74 72 75 6d 65 6e 74 0a 21 65 6c 73 65 instrument.!else
7a20: 0a 4d 53 47 3d 5e 0a 54 68 69 73 20 63 6f 6d 70 .MSG=^.This comp
7a30: 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 73 75 iler does not su
7a40: 70 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 67 75 pport profile gu
7a50: 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 6f ided optimizatio
7a60: 6e 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 n..!error $(MSG)
7a70: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
7a80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7a90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7aa0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7ab0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7ac0: 0a 23 20 38 2e 20 50 61 72 73 65 20 74 68 65 20 .# 8. Parse the
7ad0: 53 54 41 54 53 20 6d 61 63 72 6f 20 74 6f 20 63 STATS macro to c
7ae0: 6f 6e 66 69 67 75 72 65 20 63 6f 64 65 20 69 6e onfigure code in
7af0: 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 23 20 strumentation.#
7b00: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
7b10: 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 79 20 cros are set by
7b20: 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 this section:.#
7b30: 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 20 2d 20 TCL_MEM_DEBUG -
7b40: 31 20 2d 3e 20 65 6e 61 62 6c 65 73 20 6d 65 6d 1 -> enables mem
7b50: 6f 72 79 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 69 ory allocation i
7b60: 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 23 nstrumentation.#
7b70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7b80: 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0a 23 0 -> disables.#
7b90: 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 TCL_COMPILE_DEB
7ba0: 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 62 6c 65 UG - 1 -> enable
7bb0: 73 20 62 79 74 65 20 63 6f 6d 70 69 6c 65 72 20 s byte compiler
7bc0: 6c 6f 67 67 69 6e 67 0a 23 20 20 20 20 20 20 20 logging.#
7bd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 0
7be0: 2d 3e 20 64 69 73 61 62 6c 65 73 0a 0a 23 20 44 -> disables..# D
7bf0: 65 66 61 75 6c 74 20 62 6f 74 68 20 61 72 65 20 efault both are
7c00: 6f 66 66 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 off.TCL_MEM_DEBU
7c10: 47 09 20 20 20 20 3d 20 30 0a 54 43 4c 5f 43 4f G. = 0.TCL_CO
7c20: 4d 50 49 4c 45 5f 44 45 42 55 47 20 20 20 3d 20 MPILE_DEBUG =
7c30: 30 0a 0a 21 69 66 20 22 24 28 53 54 41 54 53 29 0..!if "$(STATS)
7c40: 22 20 21 3d 20 22 22 20 26 26 20 21 5b 24 28 4e " != "" && ![$(N
7c50: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
7c60: 2d 66 20 22 24 28 53 54 41 54 53 29 22 20 22 6e -f "$(STATS)" "n
7c70: 6f 6e 65 22 5d 0a 0a 21 69 66 20 5b 24 28 4e 4d one"]..!if [$(NM
7c80: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
7c90: 66 20 24 28 53 54 41 54 53 29 20 22 6d 65 6d 64 f $(STATS) "memd
7ca0: 62 67 22 5d 0a 21 6d 65 73 73 61 67 65 20 2a 2a bg"].!message **
7cb0: 2a 20 44 6f 69 6e 67 20 6d 65 6d 64 62 67 0a 54 * Doing memdbg.T
7cc0: 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 09 20 20 20 CL_MEM_DEBUG.
7cd0: 20 3d 20 31 0a 21 65 6c 73 65 0a 54 43 4c 5f 4d = 1.!else.TCL_M
7ce0: 45 4d 5f 44 45 42 55 47 09 20 20 20 20 3d 20 30 EM_DEBUG. = 0
7cf0: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 .!endif..!if [$(
7d00: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
7d10: 20 2d 66 20 24 28 53 54 41 54 53 29 20 22 63 6f -f $(STATS) "co
7d20: 6d 70 64 62 67 22 5d 0a 21 6d 65 73 73 61 67 65 mpdbg"].!message
7d30: 20 2a 2a 2a 20 44 6f 69 6e 67 20 63 6f 6d 70 64 *** Doing compd
7d40: 62 67 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 bg.TCL_COMPILE_D
7d50: 45 42 55 47 20 20 20 3d 20 31 0a 21 65 6c 73 65 EBUG = 1.!else
7d60: 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 .TCL_COMPILE_DEB
7d70: 55 47 20 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a UG = 0.!endif.
7d80: 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 .!endif..#######
7d90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7da0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7db0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7dc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 #############.#
7dd0: 39 2e 20 50 61 72 73 65 20 74 68 65 20 43 48 45 9. Parse the CHE
7de0: 43 4b 53 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e CKS macro to con
7df0: 66 69 67 75 72 65 20 61 64 64 69 74 69 6f 6e 61 figure additiona
7e00: 6c 20 63 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b l compiler check
7e10: 73 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e s.# The followin
7e20: 67 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 g macros are set
7e30: 20 62 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e by this section
7e40: 3a 0a 23 20 57 41 52 4e 49 4e 47 53 20 2d 20 63 :.# WARNINGS - c
7e50: 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 ompiler switches
7e60: 20 74 68 61 74 20 63 6f 6e 74 72 6f 6c 20 74 68 that control th
7e70: 65 20 77 61 72 6e 69 6e 67 73 20 6c 65 76 65 6c e warnings level
7e80: 0a 23 20 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 .# TCL_NO_DEPREC
7e90: 41 54 45 44 20 2d 20 31 20 2d 3e 20 64 69 73 61 ATED - 1 -> disa
7ea0: 62 6c 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 ble support for
7eb0: 64 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 74 deprecated funct
7ec0: 69 6f 6e 73 0a 23 20 20 20 20 20 20 20 20 20 20 ions.#
7ed0: 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 0 ->
7ee0: 65 6e 61 62 6c 65 20 64 65 70 72 65 63 61 74 65 enable deprecate
7ef0: 64 20 66 75 6e 63 74 69 6f 6e 73 0a 0a 23 20 44 d functions..# D
7f00: 65 66 61 75 6c 74 73 20 2d 20 50 65 72 6d 69 74 efaults - Permit
7f10: 20 64 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 deprecated func
7f20: 74 69 6f 6e 73 20 61 6e 64 20 77 61 72 6e 69 6e tions and warnin
7f30: 67 20 6c 65 76 65 6c 20 33 0a 54 43 4c 5f 4e 4f g level 3.TCL_NO
7f40: 5f 44 45 50 52 45 43 41 54 45 44 09 20 20 20 20 _DEPRECATED.
7f50: 3d 20 30 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 = 0.WARNINGS..
7f60: 20 20 3d 20 2d 57 33 0a 0a 21 69 66 20 22 24 28 = -W3..!if "$(
7f70: 43 48 45 43 4b 53 29 22 20 21 3d 20 22 22 20 26 CHECKS)" != "" &
7f80: 26 20 21 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e & ![$(NMAKEHLP_N
7f90: 41 54 49 56 45 29 20 2d 66 20 22 24 28 43 48 45 ATIVE) -f "$(CHE
7fa0: 43 4b 53 29 22 20 22 6e 6f 6e 65 22 5d 0a 0a 21 CKS)" "none"]..!
7fb0: 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e if [$(NMAKEHLP_N
7fc0: 41 54 49 56 45 29 20 2d 66 20 24 28 43 48 45 43 ATIVE) -f $(CHEC
7fd0: 4b 53 29 20 22 6e 6f 64 65 70 22 5d 0a 21 6d 65 KS) "nodep"].!me
7fe0: 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 ssage *** Doing
7ff0: 6e 6f 64 65 70 20 63 68 65 63 6b 0a 54 43 4c 5f nodep check.TCL_
8000: 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 20 20 NO_DEPRECATED.
8010: 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 = 1.!endif..!i
8020: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
8030: 54 49 56 45 29 20 2d 66 20 24 28 43 48 45 43 4b TIVE) -f $(CHECK
8040: 53 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0a 21 S) "fullwarn"].!
8050: 6d 65 73 73 61 67 65 20 2a 2a 2a 20 44 6f 69 6e message *** Doin
8060: 67 20 66 75 6c 6c 20 77 61 72 6e 69 6e 67 73 20 g full warnings
8070: 63 68 65 63 6b 0a 57 41 52 4e 49 4e 47 53 09 09 check.WARNINGS..
8080: 20 20 20 20 3d 20 2d 57 34 0a 21 69 66 20 5b 24 = -W4.!if [$
8090: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
80a0: 29 20 2d 6c 20 2d 77 61 72 6e 3a 33 20 24 28 4c ) -l -warn:3 $(L
80b0: 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 29 INKER_TESTFLAGS)
80c0: 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 09 09 20 ].LINKERFLAGS..
80d0: 20 20 20 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 = $(LINKERFLA
80e0: 47 53 29 20 2d 77 61 72 6e 3a 33 0a 21 65 6e 64 GS) -warn:3.!end
80f0: 69 66 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b if.!endif..!if [
8100: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
8110: 45 29 20 2d 66 20 24 28 43 48 45 43 4b 53 29 20 E) -f $(CHECKS)
8120: 22 36 34 62 69 74 22 5d 20 26 26 20 5b 24 28 4e "64bit"] && [$(N
8130: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
8140: 2d 63 20 2d 57 70 36 34 5d 0a 21 6d 65 73 73 61 -c -Wp64].!messa
8150: 67 65 20 2a 2a 2a 20 44 6f 69 6e 67 20 36 34 62 ge *** Doing 64b
8160: 69 74 20 70 6f 72 74 61 62 69 6c 69 74 79 20 77 it portability w
8170: 61 72 6e 69 6e 67 73 0a 57 41 52 4e 49 4e 47 53 arnings.WARNINGS
8180: 09 09 20 20 20 20 3d 20 24 28 57 41 52 4e 49 4e .. = $(WARNIN
8190: 47 53 29 20 2d 57 70 36 34 0a 21 65 6e 64 69 66 GS) -Wp64.!endif
81a0: 0a 0a 21 65 6e 64 69 66 0a 0a 0a 23 23 23 23 23 ..!endif...#####
81b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
81c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
81d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
81e0: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 30 ###########.# 10
81f0: 2e 20 43 6f 6e 73 74 72 75 63 74 20 6f 75 74 70 . Construct outp
8200: 75 74 20 64 69 72 65 63 74 6f 72 79 20 61 6e 64 ut directory and
8210: 20 66 69 6c 65 20 70 61 74 68 73 0a 23 20 46 69 file paths.# Fi
8220: 67 75 72 65 2d 6f 75 74 20 68 6f 77 20 74 6f 20 gure-out how to
8230: 6e 61 6d 65 20 6f 75 72 20 69 6e 74 65 72 6d 65 name our interme
8240: 64 69 61 74 65 20 61 6e 64 20 6f 75 74 70 75 74 diate and output
8250: 20 64 69 72 65 63 74 6f 72 69 65 73 2e 0a 23 20 directories..#
8260: 49 6e 20 6f 72 64 65 72 20 74 6f 20 61 76 6f 69 In order to avoi
8270: 64 20 69 6e 61 64 76 65 72 74 65 6e 74 20 6d 69 d inadvertent mi
8280: 78 69 6e 67 20 6f 66 20 6f 62 6a 65 63 74 20 66 xing of object f
8290: 69 6c 65 73 20 62 75 69 6c 74 20 75 73 69 6e 67 iles built using
82a0: 0a 23 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6d .# different com
82b0: 70 69 6c 65 72 73 2c 20 62 75 69 6c 64 20 63 6f pilers, build co
82c0: 6e 66 69 67 75 72 61 74 69 6f 6e 73 20 65 74 63 nfigurations etc
82d0: 2e 2c 0a 23 0a 23 20 4e 61 6d 69 6e 67 20 63 6f .,.#.# Naming co
82e0: 6e 76 65 6e 74 69 6f 6e 20 28 73 75 66 66 69 78 nvention (suffix
82f0: 65 73 29 3a 0a 23 20 20 20 74 20 3d 20 66 75 6c es):.# t = ful
8300: 6c 20 74 68 72 65 61 64 20 73 75 70 70 6f 72 74 l thread support
8310: 2e 20 28 4e 6f 74 20 75 73 65 64 20 66 6f 72 20 . (Not used for
8320: 54 63 6c 20 3e 3d 20 39 2e 30 29 0a 23 20 20 20 Tcl >= 9.0).#
8330: 73 20 3d 20 73 74 61 74 69 63 20 6c 69 62 72 61 s = static libra
8340: 72 79 20 28 61 73 20 6f 70 70 6f 73 65 64 20 74 ry (as opposed t
8350: 6f 20 61 6e 20 69 6d 70 6f 72 74 20 6c 69 62 72 o an import libr
8360: 61 72 79 29 0a 23 20 20 20 67 20 3d 20 6c 69 6e ary).# g = lin
8370: 6b 65 64 20 74 6f 20 74 68 65 20 64 65 62 75 67 ked to the debug
8380: 20 65 6e 61 62 6c 65 64 20 43 20 72 75 6e 2d 74 enabled C run-t
8390: 69 6d 65 2e 0a 23 20 20 20 78 20 3d 20 73 70 65 ime..# x = spe
83a0: 63 69 61 6c 20 73 74 61 74 69 63 20 62 75 69 6c cial static buil
83b0: 64 20 77 68 65 6e 20 69 74 20 6c 69 6e 6b 73 20 d when it links
83c0: 74 6f 20 74 68 65 20 64 79 6e 61 6d 69 63 20 43 to the dynamic C
83d0: 20 72 75 6e 2d 74 69 6d 65 2e 0a 23 0a 23 20 54 run-time..#.# T
83e0: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 he following mac
83f0: 72 6f 73 20 61 72 65 20 73 65 74 20 69 6e 20 74 ros are set in t
8400: 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 20 53 his section:.# S
8410: 55 46 58 20 2d 20 74 68 65 20 73 75 66 66 69 78 UFX - the suffix
8420: 20 74 6f 20 75 73 65 20 66 6f 72 20 62 69 6e 61 to use for bina
8430: 72 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 62 ries based on ab
8440: 6f 76 65 20 6e 61 6d 69 6e 67 20 63 6f 6e 76 65 ove naming conve
8450: 6e 74 69 6f 6e 0a 23 20 42 55 49 4c 44 44 49 52 ntion.# BUILDDIR
8460: 54 4f 50 20 2d 20 74 68 65 20 74 6f 70 6c 65 76 TOP - the toplev
8470: 65 6c 20 64 65 66 61 75 6c 74 20 6f 75 74 70 75 el default outpu
8480: 74 20 64 69 72 65 63 74 6f 72 79 0a 23 20 20 20 t directory.#
8490: 20 20 20 69 73 20 6f 66 20 74 68 65 20 66 6f 72 is of the for
84a0: 6d 20 7b 52 65 6c 65 61 73 65 2c 44 65 62 75 67 m {Release,Debug
84b0: 7d 5b 5f 41 4d 44 36 34 5d 5b 5f 43 4f 4d 50 49 }[_AMD64][_COMPI
84c0: 4c 45 52 56 45 52 53 49 4f 4e 5d 0a 23 20 54 4d LERVERSION].# TM
84d0: 50 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f 72 P_DIR - director
84e0: 79 20 77 68 65 72 65 20 6f 62 6a 65 63 74 20 66 y where object f
84f0: 69 6c 65 73 20 61 72 65 20 63 72 65 61 74 65 64 iles are created
8500: 0a 23 20 4f 55 54 5f 44 49 52 20 2d 20 64 69 72 .# OUT_DIR - dir
8510: 65 63 74 6f 72 79 20 77 68 65 72 65 20 6f 75 74 ectory where out
8520: 70 75 74 20 65 78 65 63 75 74 61 62 6c 65 73 20 put executables
8530: 61 72 65 20 63 72 65 61 74 65 64 0a 23 20 42 6f are created.# Bo
8540: 74 68 20 54 4d 50 5f 44 49 52 20 61 6e 64 20 4f th TMP_DIR and O
8550: 55 54 5f 44 49 52 20 61 72 65 20 64 65 66 61 75 UT_DIR are defau
8560: 6c 74 65 64 20 6f 6e 6c 79 20 69 66 20 6e 6f 74 lted only if not
8570: 20 64 65 66 69 6e 65 64 20 62 79 20 74 68 65 0a defined by the.
8580: 23 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c # parent makefil
8590: 65 20 28 6f 72 20 63 6f 6d 6d 61 6e 64 20 6c 69 e (or command li
85a0: 6e 65 29 2e 20 54 68 65 20 64 65 66 61 75 6c 74 ne). The default
85b0: 20 76 61 6c 75 65 73 20 61 72 65 0a 23 20 62 61 values are.# ba
85c0: 73 65 64 20 6f 6e 20 42 55 49 4c 44 44 49 52 54 sed on BUILDDIRT
85d0: 4f 50 2e 0a 23 20 53 54 55 42 50 52 45 46 49 58 OP..# STUBPREFIX
85e0: 20 2d 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 - name of the s
85f0: 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 tubs library for
8600: 20 74 68 69 73 20 70 72 6f 6a 65 63 74 0a 23 20 this project.#
8610: 50 52 4a 49 4d 50 4c 49 42 20 2d 20 6f 75 74 70 PRJIMPLIB - outp
8620: 75 74 20 70 61 74 68 20 6f 66 20 74 68 65 20 67 ut path of the g
8630: 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 74 enerated project
8640: 20 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 0a import library.
8650: 23 20 50 52 4a 4c 49 42 4e 41 4d 45 20 2d 20 6e # PRJLIBNAME - n
8660: 61 6d 65 20 6f 66 20 67 65 6e 65 72 61 74 65 64 ame of generated
8670: 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 61 72 79 project library
8680: 0a 23 20 50 52 4a 4c 49 42 20 20 20 20 20 2d 20 .# PRJLIB -
8690: 6f 75 74 70 75 74 20 70 61 74 68 20 6f 66 20 67 output path of g
86a0: 65 6e 65 72 61 74 65 64 20 70 72 6f 6a 65 63 74 enerated project
86b0: 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 54 library.# PRJST
86c0: 55 42 4c 49 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 UBLIBNAME - name
86d0: 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 74 65 of the generate
86e0: 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 73 20 d project stubs
86f0: 6c 69 62 72 61 72 79 0a 23 20 50 52 4a 53 54 55 library.# PRJSTU
8700: 42 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 61 BLIB - output pa
8710: 74 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 th of the genera
8720: 74 65 64 20 70 72 6f 6a 65 63 74 20 73 74 75 62 ted project stub
8730: 73 20 6c 69 62 72 61 72 79 0a 23 20 52 45 53 46 s library.# RESF
8740: 49 4c 45 20 2d 20 6f 75 74 70 75 74 20 72 65 73 ILE - output res
8750: 6f 75 72 63 65 20 66 69 6c 65 20 28 6f 6e 6c 79 ource file (only
8760: 20 69 66 20 6e 6f 74 20 73 74 61 74 69 63 20 62 if not static b
8770: 75 69 6c 64 29 0a 0a 53 55 46 58 09 20 20 20 20 uild)..SUFX.
8780: 3d 20 74 73 67 78 0a 0a 21 69 66 20 24 28 44 45 = tsgx..!if $(DE
8790: 42 55 47 29 0a 42 55 49 4c 44 44 49 52 54 4f 50 BUG).BUILDDIRTOP
87a0: 20 3d 20 44 65 62 75 67 0a 21 65 6c 73 65 0a 42 = Debug.!else.B
87b0: 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 52 65 6c UILDDIRTOP = Rel
87c0: 65 61 73 65 0a 21 65 6e 64 69 66 0a 0a 21 69 66 ease.!endif..!if
87d0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 3d "$(MACHINE)" !=
87e0: 20 22 49 58 38 36 22 0a 42 55 49 4c 44 44 49 52 "IX86".BUILDDIR
87f0: 54 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 54 TOP =$(BUILDDIRT
8800: 4f 50 29 5f 24 28 4d 41 43 48 49 4e 45 29 0a 21 OP)_$(MACHINE).!
8810: 65 6e 64 69 66 0a 21 69 66 20 24 28 56 43 56 45 endif.!if $(VCVE
8820: 52 29 20 3e 20 36 0a 42 55 49 4c 44 44 49 52 54 R) > 6.BUILDDIRT
8830: 4f 50 20 3d 24 28 42 55 49 4c 44 44 49 52 54 4f OP =$(BUILDDIRTO
8840: 50 29 5f 56 43 24 28 56 43 56 45 52 29 0a 21 65 P)_VC$(VCVER).!e
8850: 6e 64 69 66 0a 0a 21 69 66 20 21 24 28 44 45 42 ndif..!if !$(DEB
8860: 55 47 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 UG) || $(TCL_VER
8870: 53 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 24 28 SION) > 86 || $(
8880: 44 45 42 55 47 29 20 26 26 20 24 28 55 4e 43 48 DEBUG) && $(UNCH
8890: 45 43 4b 45 44 29 0a 53 55 46 58 09 20 20 20 20 ECKED).SUFX.
88a0: 3d 20 24 28 53 55 46 58 3a 67 3d 29 0a 21 65 6e = $(SUFX:g=).!en
88b0: 64 69 66 0a 0a 54 4d 50 5f 44 49 52 46 55 4c 4c dif..TMP_DIRFULL
88c0: 20 3d 20 2e 5c 24 28 42 55 49 4c 44 44 49 52 54 = .\$(BUILDDIRT
88d0: 4f 50 29 5c 24 28 50 52 4f 4a 45 43 54 29 5f 54 OP)\$(PROJECT)_T
88e0: 68 72 65 61 64 65 64 44 79 6e 61 6d 69 63 53 74 hreadedDynamicSt
88f0: 61 74 69 63 58 0a 0a 21 69 66 20 21 24 28 53 54 aticX..!if !$(ST
8900: 41 54 49 43 5f 42 55 49 4c 44 29 0a 54 4d 50 5f ATIC_BUILD).TMP_
8910: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
8920: 44 49 52 46 55 4c 4c 3a 53 74 61 74 69 63 3d 29 DIRFULL:Static=)
8930: 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 .SUFX. = $(SU
8940: 46 58 3a 73 3d 29 0a 45 58 54 09 20 20 20 20 3d FX:s=).EXT. =
8950: 20 64 6c 6c 0a 54 4d 50 5f 44 49 52 46 55 4c 4c dll.TMP_DIRFULL
8960: 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c = $(TMP_DIRFULL
8970: 3a 58 3d 29 0a 53 55 46 58 09 20 20 20 20 3d 20 :X=).SUFX. =
8980: 24 28 53 55 46 58 3a 78 3d 29 0a 21 65 6c 73 65 $(SUFX:x=).!else
8990: 0a 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 .TMP_DIRFULL = $
89a0: 28 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 44 79 6e (TMP_DIRFULL:Dyn
89b0: 61 6d 69 63 3d 29 0a 45 58 54 09 20 20 20 20 3d amic=).EXT. =
89c0: 20 6c 69 62 0a 21 69 66 20 24 28 4d 53 56 43 52 lib.!if $(MSVCR
89d0: 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 T) && $(TCL_VERS
89e0: 49 4f 4e 29 20 3e 20 38 36 20 7c 7c 20 21 24 28 ION) > 86 || !$(
89f0: 4d 53 56 43 52 54 29 20 26 26 20 24 28 54 43 4c MSVCRT) && $(TCL
8a00: 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a 54 _VERSION) < 87.T
8a10: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
8a20: 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a 53 MP_DIRFULL:X=).S
8a30: 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 58 UFX. = $(SUFX
8a40: 3a 78 3d 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 :x=).!endif.!end
8a50: 69 66 0a 0a 21 69 66 20 21 24 28 54 43 4c 5f 54 if..!if !$(TCL_T
8a60: 48 52 45 41 44 53 29 20 7c 7c 20 24 28 54 43 4c HREADS) || $(TCL
8a70: 5f 56 45 52 53 49 4f 4e 29 20 3e 20 38 36 0a 54 _VERSION) > 86.T
8a80: 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 MP_DIRFULL = $(T
8a90: 4d 50 5f 44 49 52 46 55 4c 4c 3a 54 68 72 65 61 MP_DIRFULL:Threa
8aa0: 64 65 64 3d 29 0a 53 55 46 58 09 20 20 20 20 3d ded=).SUFX. =
8ab0: 20 24 28 53 55 46 58 3a 74 3d 29 0a 21 65 6e 64 $(SUFX:t=).!end
8ac0: 69 66 0a 0a 21 69 66 6e 64 65 66 20 54 4d 50 5f if..!ifndef TMP_
8ad0: 44 49 52 0a 54 4d 50 5f 44 49 52 09 20 20 20 20 DIR.TMP_DIR.
8ae0: 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 4c 4c 29 = $(TMP_DIRFULL)
8af0: 0a 21 69 66 6e 64 65 66 20 4f 55 54 5f 44 49 52 .!ifndef OUT_DIR
8b00: 0a 4f 55 54 5f 44 49 52 09 20 20 20 20 3d 20 2e .OUT_DIR. = .
8b10: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 0a \$(BUILDDIRTOP).
8b20: 21 65 6e 64 69 66 0a 21 65 6c 73 65 0a 21 69 66 !endif.!else.!if
8b30: 6e 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 54 ndef OUT_DIR.OUT
8b40: 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 4d 50 _DIR. = $(TMP
8b50: 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 65 6e _DIR).!endif.!en
8b60: 64 69 66 0a 0a 23 20 52 65 6c 61 74 69 76 65 20 dif..# Relative
8b70: 70 61 74 68 73 20 2d 3e 20 61 62 73 6f 6c 75 74 paths -> absolut
8b80: 65 0a 21 69 66 20 5b 65 63 68 6f 20 4f 55 54 5f e.!if [echo OUT_
8b90: 44 49 52 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c DIR = \> nmakehl
8ba0: 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b p.out] \. || [
8bb0: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
8bc0: 45 29 20 2d 51 20 22 24 28 4f 55 54 5f 44 49 52 E) -Q "$(OUT_DIR
8bd0: 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f )" >> nmakehlp.o
8be0: 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 ut].!error *** C
8bf0: 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 20 71 ould not fully q
8c00: 75 61 6c 69 66 79 20 70 61 74 68 20 4f 55 54 5f ualify path OUT_
8c10: 44 49 52 3d 24 28 4f 55 54 5f 44 49 52 29 0a 21 DIR=$(OUT_DIR).!
8c20: 65 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 endif.!if [echo
8c30: 54 4d 50 5f 44 49 52 20 3d 20 5c 3e 3e 20 6e 6d TMP_DIR = \>> nm
8c40: 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0a 20 20 akehlp.out] \.
8c50: 20 7c 7c 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f || [$(NMAKEHLP_
8c60: 4e 41 54 49 56 45 29 20 2d 51 20 22 24 28 54 4d NATIVE) -Q "$(TM
8c70: 50 5f 44 49 52 29 22 20 3e 3e 20 6e 6d 61 6b 65 P_DIR)" >> nmake
8c80: 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f 72 20 hlp.out].!error
8c90: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 75 *** Could not fu
8ca0: 6c 6c 79 20 71 75 61 6c 69 66 79 20 70 61 74 68 lly qualify path
8cb0: 20 54 4d 50 5f 44 49 52 3d 24 28 54 4d 50 5f 44 TMP_DIR=$(TMP_D
8cc0: 49 52 29 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c IR).!endif.!incl
8cd0: 75 64 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 ude nmakehlp.out
8ce0: 0a 0a 23 20 54 68 65 20 6e 61 6d 65 20 6f 66 20 ..# The name of
8cf0: 74 68 65 20 73 74 75 62 73 20 6c 69 62 72 61 72 the stubs librar
8d00: 79 20 66 6f 72 20 74 68 65 20 70 72 6f 6a 65 63 y for the projec
8d10: 74 20 62 65 69 6e 67 20 62 75 69 6c 74 0a 53 54 t being built.ST
8d20: 55 42 50 52 45 46 49 58 20 20 20 20 20 20 3d 20 UBPREFIX =
8d30: 24 28 50 52 4f 4a 45 43 54 29 73 74 75 62 0a 0a $(PROJECT)stub..
8d40: 23 0a 23 20 53 65 74 20 75 70 20 70 61 74 68 73 #.# Set up paths
8d50: 20 74 6f 20 76 61 72 69 6f 75 73 20 54 63 6c 20 to various Tcl
8d60: 65 78 65 63 75 74 61 62 6c 65 73 20 61 6e 64 20 executables and
8d70: 6c 69 62 72 61 72 69 65 73 20 6e 65 65 64 65 64 libraries needed
8d80: 20 62 79 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 by extensions.#
8d90: 0a 0a 23 20 54 49 50 20 34 33 30 2e 20 55 6e 75 ..# TIP 430. Unu
8da0: 73 65 64 20 66 6f 72 20 38 2e 36 20 62 75 74 20 sed for 8.6 but
8db0: 6e 6f 20 68 61 72 6d 20 64 65 66 69 6e 69 6e 67 no harm defining
8dc0: 20 69 74 20 74 6f 20 61 6c 6c 6f 77 20 61 20 63 it to allow a c
8dd0: 6f 6d 6d 6f 6e 20 72 75 6c 65 73 2e 76 63 0a 54 ommon rules.vc.T
8de0: 43 4c 5f 5a 49 50 5f 46 49 4c 45 20 3d 20 6c 69 CL_ZIP_FILE = li
8df0: 62 74 63 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f btcl$(TCL_MAJOR_
8e00: 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d VERSION).$(TCL_M
8e10: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 54 INOR_VERSION)$(T
8e20: 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 29 CL_PATCH_LETTER)
8e30: 24 28 54 43 4c 5f 52 45 4c 45 41 53 45 5f 53 45 $(TCL_RELEASE_SE
8e40: 52 49 41 4c 29 2e 7a 69 70 0a 54 4b 5f 5a 49 50 RIAL).zip.TK_ZIP
8e50: 5f 46 49 4c 45 20 3d 20 6c 69 62 74 6b 24 28 54 _FILE = libtk$(T
8e60: 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 K_MAJOR_VERSION)
8e70: 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 .$(TK_MINOR_VERS
8e80: 49 4f 4e 29 24 28 54 4b 5f 50 41 54 43 48 5f 4c ION)$(TK_PATCH_L
8e90: 45 54 54 45 52 29 24 28 54 4b 5f 52 45 4c 45 41 ETTER)$(TK_RELEA
8ea0: 53 45 5f 53 45 52 49 41 4c 29 2e 7a 69 70 0a 0a SE_SERIAL).zip..
8eb0: 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 4c 29 !if $(DOING_TCL)
8ec0: 0a 54 43 4c 53 48 4e 41 4d 45 20 20 20 20 20 20 .TCLSHNAME
8ed0: 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 73 68 24 = $(PROJECT)sh$
8ee0: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 (VERSION)$(SUFX)
8ef0: 2e 65 78 65 0a 54 43 4c 53 48 09 09 3d 20 24 28 .exe.TCLSH..= $(
8f00: 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 53 48 OUT_DIR)\$(TCLSH
8f10: 4e 41 4d 45 29 0a 54 43 4c 49 4d 50 4c 49 42 09 NAME).TCLIMPLIB.
8f20: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 = $(OUT_DIR)\$(P
8f30: 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f 4e ROJECT)$(VERSION
8f40: 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 54 43 4c )$(SUFX).lib.TCL
8f50: 4c 49 42 4e 41 4d 45 09 3d 20 24 28 50 52 4f 4a LIBNAME.= $(PROJ
8f60: 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 ECT)$(VERSION)$(
8f70: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 43 4c SUFX).$(EXT).TCL
8f80: 4c 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 LIB..= $(OUT_DIR
8f90: 29 5c 24 28 54 43 4c 4c 49 42 4e 41 4d 45 29 0a )\$(TCLLIBNAME).
8fa0: 54 43 4c 53 43 52 49 50 54 5a 49 50 20 20 20 20 TCLSCRIPTZIP
8fb0: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
8fc0: 43 4c 5f 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 69 CL_ZIP_FILE)..!i
8fd0: 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 f $(TCL_MAJOR_VE
8fe0: 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 43 4c 53 RSION) == 8.TCLS
8ff0: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 TUBLIBNAME.= $(S
9000: 54 55 42 50 52 45 46 49 58 29 24 28 56 45 52 53 TUBPREFIX)$(VERS
9010: 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 ION).lib.!else.T
9020: 43 4c 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 CLSTUBLIBNAME.=
9030: 24 28 53 54 55 42 50 52 45 46 49 58 29 2e 6c 69 $(STUBPREFIX).li
9040: 62 0a 21 65 6e 64 69 66 0a 54 43 4c 53 54 55 42 b.!endif.TCLSTUB
9050: 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 LIB.= $(OUT_DIR)
9060: 5c 24 28 54 43 4c 53 54 55 42 4c 49 42 4e 41 4d \$(TCLSTUBLIBNAM
9070: 45 29 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 53 20 E).TCL_INCLUDES
9080: 20 20 20 3d 20 2d 49 22 24 28 57 49 4e 5f 44 49 = -I"$(WIN_DI
9090: 52 29 22 20 2d 49 22 24 28 47 45 4e 45 52 49 43 R)" -I"$(GENERIC
90a0: 44 49 52 29 22 0a 0a 21 65 6c 73 65 20 23 20 21 DIR)"..!else # !
90b0: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 69 $(DOING_TCL)..!i
90c0: 66 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 f $(TCLINSTALL)
90d0: 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e # Building again
90e0: 73 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 st an installed
90f0: 54 63 6c 0a 0a 23 20 57 68 65 6e 20 62 75 69 6c Tcl..# When buil
9100: 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c ding extensions,
9110: 20 77 65 20 6e 65 65 64 20 74 6f 20 6c 6f 63 61 we need to loca
9120: 74 65 20 74 63 6c 73 68 2e 20 44 65 70 65 6e 64 te tclsh. Depend
9130: 69 6e 67 20 6f 6e 20 76 65 72 73 69 6f 6e 0a 23 ing on version.#
9140: 20 6f 66 20 54 63 6c 20 77 65 20 61 72 65 20 62 of Tcl we are b
9150: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 2c uilding against,
9160: 20 74 68 69 73 20 6d 61 79 20 6f 72 20 6d 61 79 this may or may
9170: 20 6e 6f 74 20 68 61 76 65 20 61 20 22 74 22 20 not have a "t"
9180: 73 75 66 66 69 78 2e 0a 23 20 54 72 79 20 76 61 suffix..# Try va
9190: 72 69 6f 75 73 20 70 6f 73 73 69 62 69 6c 69 74 rious possibilit
91a0: 69 65 73 20 69 6e 20 74 75 72 6e 2e 0a 54 43 4c ies in turn..TCL
91b0: 53 48 09 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 SH..= $(_TCLDIR)
91c0: 5c 62 69 6e 5c 74 63 6c 73 68 24 28 54 43 4c 5f \bin\tclsh$(TCL_
91d0: 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 VERSION)$(SUFX:t
91e0: 3d 29 2e 65 78 65 0a 21 69 66 20 21 65 78 69 73 =).exe.!if !exis
91f0: 74 28 22 24 28 54 43 4c 53 48 29 22 29 0a 54 43 t("$(TCLSH)").TC
9200: 4c 53 48 20 20 20 20 20 20 20 20 20 20 20 3d 20 LSH =
9210: 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 6e 5c 74 $(_TCLDIR)\bin\t
9220: 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 4f clsh$(TCL_VERSIO
9230: 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 N)t$(SUFX:t=).ex
9240: 65 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 e.!endif..!if $(
9250: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
9260: 4e 29 20 3d 3d 20 38 0a 54 43 4c 53 54 55 42 4c N) == 8.TCLSTUBL
9270: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
9280: 6c 69 62 5c 74 63 6c 73 74 75 62 24 28 54 43 4c lib\tclstub$(TCL
9290: 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 _VERSION).lib.!e
92a0: 6c 73 65 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d lse.TCLSTUBLIB.=
92b0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
92c0: 74 63 6c 73 74 75 62 2e 6c 69 62 0a 21 65 6e 64 tclstub.lib.!end
92d0: 69 66 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 if.TCLIMPLIB.= $
92e0: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 (_TCLDIR)\lib\tc
92f0: 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 l$(TCL_VERSION)$
9300: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 23 20 (SUFX:t=).lib.#
9310: 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 When building ex
9320: 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 79 20 62 65 tensions, may be
9330: 20 6c 69 6e 6b 69 6e 67 20 61 67 61 69 6e 73 74 linking against
9340: 20 54 63 6c 20 74 68 61 74 20 64 6f 65 73 20 6e Tcl that does n
9350: 6f 74 20 61 64 64 0a 23 20 22 74 22 20 73 75 66 ot add.# "t" suf
9360: 66 69 78 20 28 65 2e 67 2e 20 38 2e 36 29 2e 20 fix (e.g. 8.6).
9370: 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 If lib not found
9380: 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 20 check for that
9390: 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 possibility..!if
93a0: 20 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 4d !exist("$(TCLIM
93b0: 50 4c 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c 49 PLIB)").TCLIMPLI
93c0: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c B.= $(_TCLDIR)\l
93d0: 69 62 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 ib\tcl$(TCL_VERS
93e0: 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e ION)t$(SUFX:t=).
93f0: 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c lib.!endif.TCL_L
9400: 49 42 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 IBRARY.= $(_TCLD
9410: 49 52 29 5c 6c 69 62 0a 54 43 4c 52 45 47 4c 49 IR)\lib.TCLREGLI
9420: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c B.= $(_TCLDIR)\l
9430: 69 62 5c 74 63 6c 72 65 67 31 33 24 28 53 55 46 ib\tclreg13$(SUF
9440: 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 44 44 45 X:t=).lib.TCLDDE
9450: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
9460: 5c 6c 69 62 5c 74 63 6c 64 64 65 31 34 24 28 53 \lib\tcldde14$(S
9470: 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c 53 UFX:t=).lib.TCLS
9480: 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f 54 43 CRIPTZIP.= $(_TC
9490: 4c 44 49 52 29 5c 6c 69 62 5c 24 28 54 43 4c 5f LDIR)\lib\$(TCL_
94a0: 5a 49 50 5f 46 49 4c 45 29 0a 54 43 4c 54 4f 4f ZIP_FILE).TCLTOO
94b0: 4c 53 44 49 52 09 3d 20 5c 6d 75 73 74 5c 68 61 LSDIR.= \must\ha
94c0: 76 65 5c 74 63 6c 5c 73 6f 75 72 63 65 73 5c 74 ve\tcl\sources\t
94d0: 6f 5c 62 75 69 6c 64 5c 74 68 69 73 5c 74 61 72 o\build\this\tar
94e0: 67 65 74 0a 54 43 4c 5f 49 4e 43 4c 55 44 45 53 get.TCL_INCLUDES
94f0: 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 43 4c 44 = -I"$(_TCLD
9500: 49 52 29 5c 69 6e 63 6c 75 64 65 22 0a 0a 21 65 IR)\include"..!e
9510: 6c 73 65 20 23 20 42 75 69 6c 64 69 6e 67 20 61 lse # Building a
9520: 67 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 gainst Tcl sourc
9530: 65 73 0a 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f es..TCLSH..= $(_
9540: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
9550: 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 68 ILDDIRTOP)\tclsh
9560: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 24 28 $(TCL_VERSION)$(
9570: 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 69 66 SUFX:t=).exe.!if
9580: 20 21 65 78 69 73 74 28 24 28 54 43 4c 53 48 29 !exist($(TCLSH)
9590: 29 0a 54 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 ).TCLSH..= $(_TC
95a0: 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c LDIR)\win\$(BUIL
95b0: 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 DDIRTOP)\tclsh$(
95c0: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 TCL_VERSION)t$(S
95d0: 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 65 6e 64 UFX:t=).exe.!end
95e0: 69 66 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a if.!if $(TCL_MAJ
95f0: 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 OR_VERSION) == 8
9600: 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 .TCLSTUBLIB.= $(
9610: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 _TCLDIR)\win\$(B
9620: 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 73 UILDDIRTOP)\tcls
9630: 74 75 62 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e tub$(TCL_VERSION
9640: 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 ).lib.!else.TCLS
9650: 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 TUBLIB.= $(_TCLD
9660: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9670: 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 2e 6c IRTOP)\tclstub.l
9680: 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 49 4d 50 ib.!endif.TCLIMP
9690: 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 LIB.= $(_TCLDIR)
96a0: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
96b0: 4f 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 OP)\tcl$(TCL_VER
96c0: 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e SION)$(SUFX:t=).
96d0: 6c 69 62 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 lib.# When build
96e0: 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 ing extensions,
96f0: 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 may be linking a
9700: 67 61 69 6e 73 74 20 54 63 6c 20 74 68 61 74 20 gainst Tcl that
9710: 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 does not add.# "
9720: 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 2e 20 t" suffix (e.g.
9730: 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 8.6). If lib not
9740: 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 found check for
9750: 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c 69 74 that possibilit
9760: 79 2e 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 y..!if !exist("$
9770: 28 54 43 4c 49 4d 50 4c 49 42 29 22 29 0a 54 43 (TCLIMPLIB)").TC
9780: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c LIMPLIB.= $(_TCL
9790: 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 DIR)\win\$(BUILD
97a0: 44 49 52 54 4f 50 29 5c 74 63 6c 24 28 54 43 4c DIRTOP)\tcl$(TCL
97b0: 5f 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 _VERSION)t$(SUFX
97c0: 3a 74 3d 29 2e 6c 69 62 0a 21 65 6e 64 69 66 0a :t=).lib.!endif.
97d0: 54 43 4c 5f 4c 49 42 52 41 52 59 09 3d 20 24 28 TCL_LIBRARY.= $(
97e0: 5f 54 43 4c 44 49 52 29 5c 6c 69 62 72 61 72 79 _TCLDIR)\library
97f0: 0a 54 43 4c 52 45 47 4c 49 42 09 3d 20 24 28 5f .TCLREGLIB.= $(_
9800: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
9810: 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 72 65 ILDDIRTOP)\tclre
9820: 67 31 33 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 g13$(SUFX:t=).li
9830: 62 0a 54 43 4c 44 44 45 4c 49 42 09 3d 20 24 28 b.TCLDDELIB.= $(
9840: 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 _TCLDIR)\win\$(B
9850: 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 64 UILDDIRTOP)\tcld
9860: 64 65 31 34 24 28 53 55 46 58 3a 74 3d 29 2e 6c de14$(SUFX:t=).l
9870: 69 62 0a 54 43 4c 53 43 52 49 50 54 5a 49 50 09 ib.TCLSCRIPTZIP.
9880: 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e = $(_TCLDIR)\win
9890: 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c \$(BUILDDIRTOP)\
98a0: 24 28 54 43 4c 5f 5a 49 50 5f 46 49 4c 45 29 0a $(TCL_ZIP_FILE).
98b0: 54 43 4c 54 4f 4f 4c 53 44 49 52 09 3d 20 24 28 TCLTOOLSDIR.= $(
98c0: 5f 54 43 4c 44 49 52 29 5c 74 6f 6f 6c 73 0a 54 _TCLDIR)\tools.T
98d0: 43 4c 5f 49 4e 43 4c 55 44 45 53 09 3d 20 2d 49 CL_INCLUDES.= -I
98e0: 22 24 28 5f 54 43 4c 44 49 52 29 5c 67 65 6e 65 "$(_TCLDIR)\gene
98f0: 72 69 63 22 20 2d 49 22 24 28 5f 54 43 4c 44 49 ric" -I"$(_TCLDI
9900: 52 29 5c 77 69 6e 22 0a 0a 21 65 6e 64 69 66 20 R)\win"..!endif
9910: 23 20 54 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 # TCLINSTALL..!i
9920: 66 20 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c f !$(STATIC_BUIL
9930: 44 29 20 26 26 20 22 24 28 54 43 4c 5f 42 55 49 D) && "$(TCL_BUI
9940: 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 0a LD_FOR)" == "8".
9950: 74 63 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c tcllibs = "$(TCL
9960: 53 54 55 42 4c 49 42 29 22 0a 21 65 6c 73 65 0a STUBLIB)".!else.
9970: 74 63 6c 6c 69 62 73 20 3d 20 22 24 28 54 43 4c tcllibs = "$(TCL
9980: 53 54 55 42 4c 49 42 29 22 20 22 24 28 54 43 4c STUBLIB)" "$(TCL
9990: 49 4d 50 4c 49 42 29 22 0a 21 65 6e 64 69 66 0a IMPLIB)".!endif.
99a0: 0a 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49 4e .!endif # $(DOIN
99b0: 47 5f 54 43 4c 29 0a 0a 23 20 57 65 20 6e 65 65 G_TCL)..# We nee
99c0: 64 20 61 20 74 63 6c 73 68 20 74 68 61 74 20 77 d a tclsh that w
99d0: 69 6c 6c 20 72 75 6e 20 6f 6e 20 74 68 65 20 68 ill run on the h
99e0: 6f 73 74 20 6d 61 63 68 69 6e 65 20 61 73 20 70 ost machine as p
99f0: 61 72 74 20 6f 66 20 74 68 65 20 62 75 69 6c 64 art of the build
9a00: 2e 0a 23 20 49 58 38 36 20 72 75 6e 73 20 6f 6e ..# IX86 runs on
9a10: 20 61 6c 6c 20 61 72 63 68 69 74 65 63 74 75 72 all architectur
9a20: 65 73 2e 0a 21 69 66 6e 64 65 66 20 54 43 4c 53 es..!ifndef TCLS
9a30: 48 5f 4e 41 54 49 56 45 0a 21 69 66 20 22 24 28 H_NATIVE.!if "$(
9a40: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 MACHINE)" == "IX
9a50: 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 86" || "$(MACHIN
9a60: 45 29 22 20 3d 3d 20 22 24 28 4e 41 54 49 56 45 E)" == "$(NATIVE
9a70: 5f 41 52 43 48 29 22 0a 54 43 4c 53 48 5f 4e 41 _ARCH)".TCLSH_NA
9a80: 54 49 56 45 09 3d 20 24 28 54 43 4c 53 48 29 0a TIVE.= $(TCLSH).
9a90: 21 65 6c 73 65 0a 21 65 72 72 6f 72 20 59 6f 75 !else.!error You
9aa0: 20 6d 75 73 74 20 65 78 70 6c 69 63 69 74 6c 79 must explicitly
9ab0: 20 73 65 74 20 54 43 4c 53 48 5f 4e 41 54 49 56 set TCLSH_NATIV
9ac0: 45 20 66 6f 72 20 63 72 6f 73 73 2d 63 6f 6d 70 E for cross-comp
9ad0: 69 6c 61 74 69 6f 6e 0a 21 65 6e 64 69 66 0a 21 ilation.!endif.!
9ae0: 65 6e 64 69 66 0a 0a 23 20 44 6f 20 74 68 65 20 endif..# Do the
9af0: 73 61 6d 65 20 66 6f 72 20 54 6b 20 61 6e 64 20 same for Tk and
9b00: 54 6b 20 65 78 74 65 6e 73 69 6f 6e 73 20 74 68 Tk extensions th
9b10: 61 74 20 72 65 71 75 69 72 65 20 74 68 65 20 54 at require the T
9b20: 6b 20 6c 69 62 72 61 72 69 65 73 0a 21 69 66 20 k libraries.!if
9b30: 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 $(DOING_TK) || $
9b40: 28 4e 45 45 44 5f 54 4b 29 0a 57 49 53 48 4e 41 (NEED_TK).WISHNA
9b50: 4d 45 50 52 45 46 49 58 20 3d 20 77 69 73 68 0a MEPREFIX = wish.
9b60: 57 49 53 48 4e 41 4d 45 20 3d 20 24 28 57 49 53 WISHNAME = $(WIS
9b70: 48 4e 41 4d 45 50 52 45 46 49 58 29 24 28 54 4b HNAMEPREFIX)$(TK
9b80: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 _VERSION)$(SUFX)
9b90: 2e 65 78 65 0a 54 4b 4c 49 42 4e 41 4d 45 38 09 .exe.TKLIBNAME8.
9ba0: 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e = tk$(TK_VERSION
9bb0: 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a )$(SUFX).$(EXT).
9bc0: 54 4b 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c TKLIBNAME9.= tcl
9bd0: 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 9tk$(TK_VERSION)
9be0: 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 21 $(SUFX).$(EXT).!
9bf0: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
9c00: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 ERSION) == 8 ||
9c10: 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 "$(TCL_BUILD_FOR
9c20: 29 22 20 3d 3d 20 22 38 22 0a 54 4b 4c 49 42 4e )" == "8".TKLIBN
9c30: 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 AME.= tk$(TK_VER
9c40: 53 49 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 45 SION)$(SUFX).$(E
9c50: 58 54 29 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 XT).TKIMPLIBNAME
9c60: 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f .= tk$(TK_VERSIO
9c70: 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 N)$(SUFX).lib.!e
9c80: 6c 73 65 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d 20 lse.TKLIBNAME.=
9c90: 74 63 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 49 tcl9tk$(TK_VERSI
9ca0: 4f 4e 29 24 28 53 55 46 58 29 2e 24 28 45 58 54 ON)$(SUFX).$(EXT
9cb0: 29 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d ).TKIMPLIBNAME.=
9cc0: 20 74 63 6c 39 74 6b 24 28 54 4b 5f 56 45 52 53 tcl9tk$(TK_VERS
9cd0: 49 4f 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a ION)$(SUFX).lib.
9ce0: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 4b 5f !endif.!if $(TK_
9cf0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
9d00: 3d 20 38 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d = 8.TKSTUBLIBNAM
9d10: 45 09 3d 20 74 6b 73 74 75 62 24 28 54 4b 5f 56 E.= tkstub$(TK_V
9d20: 45 52 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 ERSION).lib.!els
9d30: 65 0a 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 e.TKSTUBLIBNAME.
9d40: 3d 20 74 6b 73 74 75 62 2e 6c 69 62 0a 21 65 6e = tkstub.lib.!en
9d50: 64 69 66 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 dif..!if $(DOING
9d60: 5f 54 4b 29 0a 57 49 53 48 09 09 3d 20 24 28 4f _TK).WISH..= $(O
9d70: 55 54 5f 44 49 52 29 5c 24 28 57 49 53 48 4e 41 UT_DIR)\$(WISHNA
9d80: 4d 45 29 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 ME).TKSTUBLIB.=
9d90: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 4b 53 $(OUT_DIR)\$(TKS
9da0: 54 55 42 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d TUBLIBNAME).TKIM
9db0: 50 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 PLIB.= $(OUT_DIR
9dc0: 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 )\$(TKIMPLIBNAME
9dd0: 29 0a 54 4b 4c 49 42 09 09 3d 20 24 28 4f 55 54 ).TKLIB..= $(OUT
9de0: 5f 44 49 52 29 5c 24 28 54 4b 4c 49 42 4e 41 4d _DIR)\$(TKLIBNAM
9df0: 45 29 0a 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 E).TK_INCLUDES
9e00: 20 20 20 3d 20 2d 49 22 24 28 57 49 4e 5f 44 49 = -I"$(WIN_DI
9e10: 52 29 22 20 2d 49 22 24 28 47 45 4e 45 52 49 43 R)" -I"$(GENERIC
9e20: 44 49 52 29 22 0a 54 4b 53 43 52 49 50 54 5a 49 DIR)".TKSCRIPTZI
9e30: 50 20 20 20 20 20 3d 20 24 28 4f 55 54 5f 44 49 P = $(OUT_DI
9e40: 52 29 5c 24 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 R)\$(TK_ZIP_FILE
9e50: 29 0a 0a 21 65 6c 73 65 20 23 20 65 66 66 65 63 )..!else # effec
9e60: 74 69 76 65 6c 79 20 4e 45 45 44 5f 54 4b 0a 0a tively NEED_TK..
9e70: 21 69 66 20 24 28 54 4b 49 4e 53 54 41 4c 4c 29 !if $(TKINSTALL)
9e80: 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 # Building agai
9e90: 6e 73 74 20 69 6e 73 74 61 6c 6c 65 64 20 54 6b nst installed Tk
9ea0: 0a 57 49 53 48 09 09 3d 20 24 28 5f 54 4b 44 49 .WISH..= $(_TKDI
9eb0: 52 29 5c 62 69 6e 5c 24 28 57 49 53 48 4e 41 4d R)\bin\$(WISHNAM
9ec0: 45 29 0a 54 4b 53 54 55 42 4c 49 42 09 3d 20 24 E).TKSTUBLIB.= $
9ed0: 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 28 54 (_TKDIR)\lib\$(T
9ee0: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a 54 4b KSTUBLIBNAME).TK
9ef0: 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 IMPLIB.= $(_TKDI
9f00: 52 29 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 R)\lib\$(TKIMPLI
9f10: 42 4e 41 4d 45 29 0a 23 20 57 68 65 6e 20 62 75 BNAME).# When bu
9f20: 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e ilding extension
9f30: 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e s, may be linkin
9f40: 67 20 61 67 61 69 6e 73 74 20 54 6b 20 74 68 61 g against Tk tha
9f50: 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 t does not add.#
9f60: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 "t" suffix (e.g
9f70: 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e . 8.6). If lib n
9f80: 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 ot found check f
9f90: 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c or that possibil
9fa0: 69 74 79 2e 0a 21 69 66 20 21 65 78 69 73 74 28 ity..!if !exist(
9fb0: 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 0a 54 "$(TKIMPLIB)").T
9fc0: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b KIMPLIBNAME.= tk
9fd0: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
9fe0: 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b 49 4d UFX:t=).lib.TKIM
9ff0: 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 PLIB.= $(_TKDIR)
a000: 5c 6c 69 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e \lib\$(TKIMPLIBN
a010: 41 4d 45 29 0a 21 65 6e 64 69 66 0a 54 4b 5f 49 AME).!endif.TK_I
a020: 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 2d 49 NCLUDES = -I
a030: 22 24 28 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 "$(_TKDIR)\inclu
a040: 64 65 22 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 de".TKSCRIPTZIP
a050: 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 52 29 5c = $(_TKDIR)\
a060: 6c 69 62 5c 24 28 54 4b 5f 5a 49 50 5f 46 49 4c lib\$(TK_ZIP_FIL
a070: 45 29 0a 0a 21 65 6c 73 65 20 23 20 42 75 69 6c E)..!else # Buil
a080: 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 ding against Tk
a090: 73 6f 75 72 63 65 73 0a 0a 57 49 53 48 09 09 3d sources..WISH..=
a0a0: 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 $(_TKDIR)\win\$
a0b0: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 (BUILDDIRTOP)\$(
a0c0: 57 49 53 48 4e 41 4d 45 29 0a 54 4b 53 54 55 42 WISHNAME).TKSTUB
a0d0: 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c LIB.= $(_TKDIR)\
a0e0: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
a0f0: 50 29 5c 24 28 54 4b 53 54 55 42 4c 49 42 4e 41 P)\$(TKSTUBLIBNA
a100: 4d 45 29 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 ME).TKIMPLIB.= $
a110: 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 (_TKDIR)\win\$(B
a120: 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b UILDDIRTOP)\$(TK
a130: 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 23 20 57 68 IMPLIBNAME).# Wh
a140: 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 78 74 65 en building exte
a150: 6e 73 69 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c nsions, may be l
a160: 69 6e 6b 69 6e 67 20 61 67 61 69 6e 73 74 20 54 inking against T
a170: 6b 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 k that does not
a180: 61 64 64 0a 23 20 22 74 22 20 73 75 66 66 69 78 add.# "t" suffix
a190: 20 28 65 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 (e.g. 8.6). If
a1a0: 6c 69 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 lib not found ch
a1b0: 65 63 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 eck for that pos
a1c0: 73 69 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 sibility..!if !e
a1d0: 78 69 73 74 28 22 24 28 54 4b 49 4d 50 4c 49 42 xist("$(TKIMPLIB
a1e0: 29 22 29 0a 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 )").TKIMPLIBNAME
a1f0: 09 3d 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f .= tk$(TK_VERSIO
a200: 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 N)$(SUFX:t=).lib
a210: 0a 54 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 .TKIMPLIB.= $(_T
a220: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
a230: 44 44 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 DDIRTOP)\$(TKIMP
a240: 4c 49 42 4e 41 4d 45 29 0a 21 65 6e 64 69 66 0a LIBNAME).!endif.
a250: 54 4b 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 TK_INCLUDES
a260: 3d 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c 67 = -I"$(_TKDIR)\g
a270: 65 6e 65 72 69 63 22 20 2d 49 22 24 28 5f 54 4b eneric" -I"$(_TK
a280: 44 49 52 29 5c 77 69 6e 22 20 2d 49 22 24 28 5f DIR)\win" -I"$(_
a290: 54 4b 44 49 52 29 5c 78 6c 69 62 22 0a 54 4b 53 TKDIR)\xlib".TKS
a2a0: 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d 20 24 CRIPTZIP = $
a2b0: 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 (_TKDIR)\win\$(B
a2c0: 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 4b UILDDIRTOP)\$(TK
a2d0: 5f 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 65 6e 64 _ZIP_FILE)..!end
a2e0: 69 66 20 23 20 54 4b 49 4e 53 54 41 4c 4c 0a 0a if # TKINSTALL..
a2f0: 74 6b 6c 69 62 73 20 3d 20 22 24 28 54 4b 53 54 tklibs = "$(TKST
a300: 55 42 4c 49 42 29 22 20 22 24 28 54 4b 49 4d 50 UBLIB)" "$(TKIMP
a310: 4c 49 42 29 22 0a 0a 21 65 6e 64 69 66 20 23 20 LIB)"..!endif #
a320: 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 21 65 6e 64 $(DOING_TK).!end
a330: 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 4b 29 if # $(DOING_TK)
a340: 20 7c 7c 20 24 28 4e 45 45 44 5f 54 4b 29 0a 0a || $(NEED_TK)..
a350: 23 20 56 61 72 69 6f 75 73 20 6f 75 74 70 75 74 # Various output
a360: 20 70 61 74 68 73 0a 50 52 4a 49 4d 50 4c 49 42 paths.PRJIMPLIB
a370: 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 .= $(OUT_DIR)\$(
a380: 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 49 4f PROJECT)$(VERSIO
a390: 4e 29 24 28 53 55 46 58 29 2e 6c 69 62 0a 23 20 N)$(SUFX).lib.#
a3a0: 45 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 Even when buildi
a3b0: 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 39 ng against Tcl 9
a3c0: 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 38 20 6d 75 , PRJLIBNAME8 mu
a3d0: 73 74 20 68 61 76 65 20 22 74 22 0a 50 52 4a 4c st have "t".PRJL
a3e0: 49 42 4e 41 4d 45 38 09 3d 20 24 28 50 52 4f 4a IBNAME8.= $(PROJ
a3f0: 45 43 54 29 24 28 56 45 52 53 49 4f 4e 29 74 24 ECT)$(VERSION)t$
a400: 28 53 55 46 58 3a 74 3d 29 2e 24 28 45 58 54 29 (SUFX:t=).$(EXT)
a410: 0a 23 20 45 76 65 6e 20 77 68 65 6e 20 62 75 69 .# Even when bui
a420: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 lding against Tc
a430: 6c 20 38 2c 20 50 52 4a 4c 49 42 4e 41 4d 45 39 l 8, PRJLIBNAME9
a440: 20 6d 75 73 74 20 6e 6f 74 20 68 61 76 65 20 22 must not have "
a450: 74 22 0a 50 52 4a 4c 49 42 4e 41 4d 45 39 09 3d t".PRJLIBNAME9.=
a460: 20 74 63 6c 39 24 28 50 52 4f 4a 45 43 54 29 24 tcl9$(PROJECT)$
a470: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a (VERSION)$(SUFX:
a480: 74 3d 29 2e 24 28 45 58 54 29 0a 21 69 66 20 24 t=).$(EXT).!if $
a490: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
a4a0: 4f 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 54 ON) == 8 || "$(T
a4b0: 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d CL_BUILD_FOR)" =
a4c0: 3d 20 22 38 22 0a 50 52 4a 4c 49 42 4e 41 4d 45 = "8".PRJLIBNAME
a4d0: 09 3d 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 .= $(PRJLIBNAME8
a4e0: 29 0a 21 65 6c 73 65 0a 50 52 4a 4c 49 42 4e 41 ).!else.PRJLIBNA
a4f0: 4d 45 09 3d 20 24 28 50 52 4a 4c 49 42 4e 41 4d ME.= $(PRJLIBNAM
a500: 45 39 29 0a 21 65 6e 64 69 66 0a 50 52 4a 4c 49 E9).!endif.PRJLI
a510: 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c B..= $(OUT_DIR)\
a520: 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 0a 0a 21 $(PRJLIBNAME)..!
a530: 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 if $(TCL_MAJOR_V
a540: 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 50 52 4a ERSION) == 8.PRJ
a550: 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 STUBLIBNAME.= $(
a560: 53 54 55 42 50 52 45 46 49 58 29 24 28 56 45 52 STUBPREFIX)$(VER
a570: 53 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a SION).lib.!else.
a580: 50 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d PRJSTUBLIBNAME.=
a590: 20 24 28 53 54 55 42 50 52 45 46 49 58 29 2e 6c $(STUBPREFIX).l
a5a0: 69 62 0a 21 65 6e 64 69 66 0a 50 52 4a 53 54 55 ib.!endif.PRJSTU
a5b0: 42 4c 49 42 09 3d 20 24 28 4f 55 54 5f 44 49 52 BLIB.= $(OUT_DIR
a5c0: 29 5c 24 28 50 52 4a 53 54 55 42 4c 49 42 4e 41 )\$(PRJSTUBLIBNA
a5d0: 4d 45 29 0a 0a 23 20 49 66 20 65 78 74 65 6e 73 ME)..# If extens
a5e0: 69 6f 6e 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 ion parent makef
a5f0: 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 ile has not defi
a600: 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 20 64 ned a resource d
a610: 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0a efinition file,.
a620: 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 72 61 # we will genera
a630: 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e te one from stan
a640: 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e 0a 21 dard template..!
a650: 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 if !$(DOING_TCL)
a660: 20 26 26 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 && !$(DOING_TK)
a670: 20 26 26 20 21 24 28 53 54 41 54 49 43 5f 42 55 && !$(STATIC_BU
a680: 49 4c 44 29 0a 21 69 66 64 65 66 20 52 43 46 49 ILD).!ifdef RCFI
a690: 4c 45 0a 52 45 53 46 49 4c 45 20 3d 20 24 28 54 LE.RESFILE = $(T
a6a0: 4d 50 5f 44 49 52 29 5c 24 28 52 43 46 49 4c 45 MP_DIR)\$(RCFILE
a6b0: 3a 2e 72 63 3d 2e 72 65 73 29 0a 21 65 6c 73 65 :.rc=.res).!else
a6c0: 0a 52 45 53 46 49 4c 45 20 3d 20 24 28 54 4d 50 .RESFILE = $(TMP
a6d0: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
a6e0: 2e 72 65 73 0a 21 65 6e 64 69 66 0a 21 65 6e 64 .res.!endif.!end
a6f0: 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 23 23 if..############
a700: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a710: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a730: 23 23 23 23 23 23 23 0a 23 20 31 31 2e 20 43 6f #######.# 11. Co
a740: 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 74 68 nstruct the path
a750: 73 20 66 6f 72 20 74 68 65 20 69 6e 73 74 61 6c s for the instal
a760: 6c 61 74 69 6f 6e 20 64 69 72 65 63 74 6f 72 69 lation directori
a770: 65 73 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 es.# The followi
a780: 6e 67 20 6d 61 63 72 6f 73 20 67 65 74 20 64 65 ng macros get de
a790: 66 69 6e 65 64 20 69 6e 20 74 68 69 73 20 73 65 fined in this se
a7a0: 63 74 69 6f 6e 3a 0a 23 20 4c 49 42 5f 49 4e 53 ction:.# LIB_INS
a7b0: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 TALL_DIR - where
a7c0: 20 6c 69 62 72 61 72 69 65 73 20 73 68 6f 75 6c libraries shoul
a7d0: 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 d be installed.#
a7e0: 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 BIN_INSTALL_DIR
a7f0: 20 2d 20 77 68 65 72 65 20 74 68 65 20 65 78 65 - where the exe
a800: 63 75 74 61 62 6c 65 73 20 73 68 6f 75 6c 64 20 cutables should
a810: 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 44 be installed.# D
a820: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d OC_INSTALL_DIR -
a830: 20 77 68 65 72 65 20 64 6f 63 75 6d 65 6e 74 61 where documenta
a840: 74 69 6f 6e 20 73 68 6f 75 6c 64 20 62 65 20 69 tion should be i
a850: 6e 73 74 61 6c 6c 65 64 0a 23 20 53 43 52 49 50 nstalled.# SCRIP
a860: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 T_INSTALL_DIR -
a870: 77 68 65 72 65 20 73 63 72 69 70 74 73 20 73 68 where scripts sh
a880: 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 ould be installe
a890: 64 0a 23 20 49 4e 43 4c 55 44 45 5f 49 4e 53 54 d.# INCLUDE_INST
a8a0: 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 ALL_DIR - where
a8b0: 43 20 69 6e 63 6c 75 64 65 20 66 69 6c 65 73 20 C include files
a8c0: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a8d0: 6c 65 64 0a 23 20 44 45 4d 4f 5f 49 4e 53 54 41 led.# DEMO_INSTA
a8e0: 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 64 LL_DIR - where d
a8f0: 65 6d 6f 73 20 73 68 6f 75 6c 64 20 62 65 20 69 emos should be i
a900: 6e 73 74 61 6c 6c 65 64 0a 23 20 50 52 4a 5f 49 nstalled.# PRJ_I
a910: 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 NSTALL_DIR - whe
a920: 72 65 20 70 61 63 6b 61 67 65 20 77 69 6c 6c 20 re package will
a930: 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 28 6e 6f be installed (no
a940: 74 20 73 65 74 20 66 6f 72 20 54 63 6c 20 61 6e t set for Tcl an
a950: 64 20 54 6b 29 0a 0a 21 69 66 20 24 28 44 4f 49 d Tk)..!if $(DOI
a960: 4e 47 5f 54 43 4c 29 20 7c 7c 20 24 28 44 4f 49 NG_TCL) || $(DOI
a970: 4e 47 5f 54 4b 29 0a 4c 49 42 5f 49 4e 53 54 41 NG_TK).LIB_INSTA
a980: 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e 53 LL_DIR..= $(_INS
a990: 54 41 4c 4c 44 49 52 29 5c 6c 69 62 0a 42 49 4e TALLDIR)\lib.BIN
a9a0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d 20 _INSTALL_DIR..=
a9b0: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 62 $(_INSTALLDIR)\b
a9c0: 69 6e 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 in.DOC_INSTALL_D
a9d0: 49 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c IR..= $(_INSTALL
a9e0: 44 49 52 29 5c 64 6f 63 0a 21 69 66 20 24 28 44 DIR)\doc.!if $(D
a9f0: 4f 49 4e 47 5f 54 43 4c 29 0a 53 43 52 49 50 54 OING_TCL).SCRIPT
aa00: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 _INSTALL_DIR.= $
aa10: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 (_INSTALLDIR)\li
aa20: 62 5c 24 28 50 52 4f 4a 45 43 54 29 24 28 54 43 b\$(PROJECT)$(TC
aa30: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
aa40: 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 .$(TCL_MINOR_VER
aa50: 53 49 4f 4e 29 0a 4d 4f 44 55 4c 45 5f 49 4e 53 SION).MODULE_INS
aa60: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e TALL_DIR.= $(_IN
aa70: 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 74 63 STALLDIR)\lib\tc
aa80: 6c 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 l$(TCL_MAJOR_VER
aa90: 53 49 4f 4e 29 0a 21 65 6c 73 65 20 23 20 44 4f SION).!else # DO
aaa0: 49 4e 47 5f 54 4b 0a 53 43 52 49 50 54 5f 49 4e ING_TK.SCRIPT_IN
aab0: 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 STALL_DIR.= $(_I
aac0: 4e 53 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 NSTALLDIR)\lib\$
aad0: 28 50 52 4f 4a 45 43 54 29 24 28 54 4b 5f 4d 41 (PROJECT)$(TK_MA
aae0: 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 JOR_VERSION).$(T
aaf0: 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 K_MINOR_VERSION)
ab00: 0a 21 65 6e 64 69 66 0a 44 45 4d 4f 5f 49 4e 53 .!endif.DEMO_INS
ab10: 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 53 43 52 TALL_DIR.= $(SCR
ab20: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 IPT_INSTALL_DIR)
ab30: 5c 64 65 6d 6f 73 0a 49 4e 43 4c 55 44 45 5f 49 \demos.INCLUDE_I
ab40: 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f NSTALL_DIR.= $(_
ab50: 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c INSTALLDIR)\incl
ab60: 75 64 65 0a 0a 21 65 6c 73 65 20 23 20 65 78 74 ude..!else # ext
ab70: 65 6e 73 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 ension other tha
ab80: 6e 20 54 6b 0a 0a 50 52 4a 5f 49 4e 53 54 41 4c n Tk..PRJ_INSTAL
ab90: 4c 5f 44 49 52 20 20 20 20 20 20 20 20 20 3d 20 L_DIR =
aba0: 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 24 $(_INSTALLDIR)\$
abb0: 28 50 52 4f 4a 45 43 54 29 24 28 44 4f 54 56 45 (PROJECT)$(DOTVE
abc0: 52 53 49 4f 4e 29 0a 21 69 66 20 24 28 4d 55 4c RSION).!if $(MUL
abd0: 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 TIPLATFORM_INSTA
abe0: 4c 4c 29 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f LL).LIB_INSTALL_
abf0: 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 DIR..= $(PRJ_INS
ac00: 54 41 4c 4c 5f 44 49 52 29 5c 24 28 50 4c 41 54 TALL_DIR)\$(PLAT
ac10: 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 0a 42 FORM_IDENTIFY).B
ac20: 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 IN_INSTALL_DIR..
ac30: 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f = $(PRJ_INSTALL_
ac40: 44 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 4d 5f DIR)\$(PLATFORM_
ac50: 49 44 45 4e 54 49 46 59 29 0a 21 65 6c 73 65 0a IDENTIFY).!else.
ac60: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 LIB_INSTALL_DIR.
ac70: 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c .= $(PRJ_INSTALL
ac80: 5f 44 49 52 29 0a 42 49 4e 5f 49 4e 53 54 41 4c _DIR).BIN_INSTAL
ac90: 4c 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 L_DIR..= $(PRJ_I
aca0: 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 21 65 6e 64 NSTALL_DIR).!end
acb0: 69 66 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 if.DOC_INSTALL_D
acc0: 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 IR..= $(PRJ_INST
acd0: 41 4c 4c 5f 44 49 52 29 0a 53 43 52 49 50 54 5f ALL_DIR).SCRIPT_
ace0: 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 24 28 INSTALL_DIR.= $(
acf0: 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 PRJ_INSTALL_DIR)
ad00: 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 .DEMO_INSTALL_DI
ad10: 52 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c R.= $(PRJ_INSTAL
ad20: 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 0a 49 4e 43 L_DIR)\demos.INC
ad30: 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 LUDE_INSTALL_DIR
ad40: 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 .= $(_INSTALLDIR
ad50: 29 5c 2e 2e 5c 69 6e 63 6c 75 64 65 0a 0a 21 65 )\..\include..!e
ad60: 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 ndif..##########
ad70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ad80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ad90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ada0: 23 23 23 23 23 23 23 23 23 0a 23 20 31 32 2e 20 #########.# 12.
adb0: 53 65 74 20 75 70 20 61 63 74 75 61 6c 20 6f 70 Set up actual op
adc0: 74 69 6f 6e 73 20 74 6f 20 62 65 20 70 61 73 73 tions to be pass
add0: 65 64 20 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c ed to the compil
ade0: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 0a 23 20 er and linker.#
adf0: 4e 6f 77 20 77 65 20 68 61 76 65 20 61 6c 6c 20 Now we have all
ae00: 74 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 the information
ae10: 77 65 20 6e 65 65 64 2c 20 73 65 74 20 75 70 20 we need, set up
ae20: 74 68 65 20 61 63 74 75 61 6c 20 66 6c 61 67 73 the actual flags
ae30: 20 61 6e 64 0a 23 20 6f 70 74 69 6f 6e 73 20 74 and.# options t
ae40: 68 61 74 20 77 65 20 77 69 6c 6c 20 70 61 73 73 hat we will pass
ae50: 20 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 to the compiler
ae60: 20 61 6e 64 20 6c 69 6e 6b 65 72 2e 20 54 68 65 and linker. The
ae70: 20 6d 61 69 6e 0a 23 20 6d 61 6b 65 66 69 6c 65 main.# makefile
ae80: 20 73 68 6f 75 6c 64 20 75 73 65 20 74 68 65 73 should use thes
ae90: 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e e in combination
aea0: 20 77 69 74 68 20 77 68 61 74 65 76 65 72 20 6f with whatever o
aeb0: 74 68 65 72 20 66 6c 61 67 73 0a 23 20 61 6e 64 ther flags.# and
aec0: 20 73 77 69 74 63 68 65 73 20 61 72 65 20 73 70 switches are sp
aed0: 65 63 69 66 69 63 20 74 6f 20 69 74 2e 0a 23 20 ecific to it..#
aee0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
aef0: 63 72 6f 73 20 61 72 65 20 64 65 66 69 6e 65 64 cros are defined
af00: 2c 20 6e 61 6d 65 73 20 61 72 65 20 66 6f 72 20 , names are for
af10: 68 69 73 74 6f 72 69 63 61 6c 20 63 6f 6d 70 61 historical compa
af20: 74 69 62 69 6c 69 74 79 3a 0a 23 20 4f 50 54 44 tibility:.# OPTD
af30: 45 46 49 4e 45 53 20 2d 20 2f 44 78 78 78 20 43 EFINES - /Dxxx C
af40: 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 62 61 73 macro flags bas
af50: 65 64 20 6f 6e 20 75 73 65 72 2d 73 70 65 63 69 ed on user-speci
af60: 66 69 65 64 20 4f 50 54 53 0a 23 20 43 4f 4d 50 fied OPTS.# COMP
af70: 49 4c 45 52 46 4c 41 47 53 20 2d 20 2f 44 78 78 ILERFLAGS - /Dxx
af80: 78 20 43 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 x C macro flags
af90: 69 6e 64 65 70 65 6e 64 65 6e 74 20 6f 66 20 61 independent of a
afa0: 6e 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e ny configuration
afb0: 20 6f 70 74 69 6f 6e 73 0a 23 20 63 72 74 20 2d options.# crt -
afc0: 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 Compiler switch
afd0: 20 74 68 61 74 20 73 65 6c 65 63 74 73 20 74 68 that selects th
afe0: 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 43 20 e appropriate C
aff0: 72 75 6e 74 69 6d 65 0a 23 20 63 64 65 62 75 67 runtime.# cdebug
b000: 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 - Compiler swit
b010: 63 68 65 73 20 72 65 6c 61 74 65 64 20 74 6f 20 ches related to
b020: 64 65 62 75 67 20 41 4e 44 20 6f 70 74 69 6d 69 debug AND optimi
b030: 7a 61 74 69 6f 6e 73 0a 23 20 63 77 61 72 6e 20 zations.# cwarn
b040: 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 - Compiler switc
b050: 68 65 73 20 74 68 61 74 20 73 65 74 20 77 61 72 hes that set war
b060: 6e 69 6e 67 20 6c 65 76 65 6c 73 0a 23 20 63 66 ning levels.# cf
b070: 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 lags - complete
b080: 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 compiler switche
b090: 73 20 28 73 75 62 73 75 6d 65 73 20 63 64 65 62 s (subsumes cdeb
b0a0: 75 67 20 61 6e 64 20 63 77 61 72 6e 29 0a 23 20 ug and cwarn).#
b0b0: 6c 64 65 62 75 67 20 2d 20 4c 69 6e 6b 65 72 20 ldebug - Linker
b0c0: 73 77 69 74 63 68 65 73 20 63 6f 6e 74 72 6f 6c switches control
b0d0: 6c 69 6e 67 20 64 65 62 75 67 20 69 6e 66 6f 72 ling debug infor
b0e0: 6d 61 74 69 6f 6e 20 61 6e 64 20 6f 70 74 69 6d mation and optim
b0f0: 69 7a 61 74 69 6f 6e 0a 23 20 6c 66 6c 61 67 73 ization.# lflags
b100: 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b - complete link
b110: 65 72 20 73 77 69 74 63 68 65 73 20 28 73 75 62 er switches (sub
b120: 73 75 6d 65 73 20 6c 64 65 62 75 67 29 20 65 78 sumes ldebug) ex
b130: 63 65 70 74 20 73 75 62 73 79 73 74 65 6d 20 74 cept subsystem t
b140: 79 70 65 0a 23 20 64 6c 6c 6c 66 6c 61 67 73 20 ype.# dlllflags
b150: 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e 6b 65 - complete linke
b160: 72 20 73 77 69 74 63 68 65 73 20 74 6f 20 62 75 r switches to bu
b170: 69 6c 64 20 44 4c 4c 73 20 28 73 75 62 73 75 6d ild DLLs (subsum
b180: 65 73 20 6c 66 6c 61 67 73 29 0a 23 20 63 6f 6e es lflags).# con
b190: 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 lflags - complet
b1a0: 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 e linker switche
b1b0: 73 20 66 6f 72 20 63 6f 6e 73 6f 6c 65 20 70 72 s for console pr
b1c0: 6f 67 72 61 6d 20 28 73 75 62 73 75 6d 65 73 20 ogram (subsumes
b1d0: 6c 66 6c 61 67 73 29 0a 23 20 67 75 69 6c 66 6c lflags).# guilfl
b1e0: 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c ags - complete l
b1f0: 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 66 inker switches f
b200: 6f 72 20 47 55 49 20 70 72 6f 67 72 61 6d 20 28 or GUI program (
b210: 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 73 29 subsumes lflags)
b220: 0a 23 20 62 61 73 65 6c 69 62 73 20 2d 20 6d 69 .# baselibs - mi
b230: 6e 69 6d 75 6d 20 57 69 6e 64 6f 77 73 20 6c 69 nimum Windows li
b240: 62 72 61 72 69 65 73 20 72 65 71 75 69 72 65 64 braries required
b250: 2e 20 50 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c . Parent makefil
b260: 65 20 63 61 6e 0a 23 20 20 20 20 64 65 66 69 6e e can.# defin
b270: 65 20 50 52 4a 5f 4c 49 42 53 20 62 65 66 6f 72 e PRJ_LIBS befor
b280: 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 e including rule
b290: 73 2e 72 63 20 69 66 20 61 64 64 69 74 69 6f 6e s.rc if addition
b2a0: 61 6c 20 6c 69 62 73 20 61 72 65 20 6e 65 65 64 al libs are need
b2b0: 65 64 0a 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d ed..OPTDEFINES.=
b2c0: 20 2f 44 53 54 44 43 5f 48 45 41 44 45 52 53 20 /DSTDC_HEADERS
b2d0: 2f 44 55 53 45 5f 4e 4d 41 4b 45 3d 31 0a 21 69 /DUSE_NMAKE=1.!i
b2e0: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
b2f0: 20 31 36 30 30 0a 4f 50 54 44 45 46 49 4e 45 53 1600.OPTDEFINES
b300: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b310: 20 2f 44 48 41 56 45 5f 53 54 44 49 4e 54 5f 48 /DHAVE_STDINT_H
b320: 3d 31 0a 21 65 6c 73 65 0a 4f 50 54 44 45 46 49 =1.!else.OPTDEFI
b330: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b340: 45 53 29 20 2f 44 4d 50 5f 4e 4f 5f 53 54 44 49 ES) /DMP_NO_STDI
b350: 4e 54 3d 31 0a 21 65 6e 64 69 66 0a 21 69 66 20 NT=1.!endif.!if
b360: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 $(VCVERSION) >=
b370: 31 38 30 30 0a 4f 50 54 44 45 46 49 4e 45 53 09 1800.OPTDEFINES.
b380: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b390: 2f 44 48 41 56 45 5f 49 4e 54 54 59 50 45 53 5f /DHAVE_INTTYPES_
b3a0: 48 3d 31 20 2f 44 48 41 56 45 5f 53 54 44 42 4f H=1 /DHAVE_STDBO
b3b0: 4f 4c 5f 48 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 OL_H=1.!endif..!
b3c0: 69 66 20 24 28 54 43 4c 5f 4d 45 4d 5f 44 45 42 if $(TCL_MEM_DEB
b3d0: 55 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d UG).OPTDEFINES.=
b3e0: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f $(OPTDEFINES) /
b3f0: 44 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 0a 21 DTCL_MEM_DEBUG.!
b400: 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c 5f endif.!if $(TCL_
b410: 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 29 0a 4f COMPILE_DEBUG).O
b420: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b430: 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f TDEFINES) /DTCL_
b440: 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 2f 44 COMPILE_DEBUG /D
b450: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 53 54 41 54 TCL_COMPILE_STAT
b460: 53 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 S.!endif.!if $(T
b470: 43 4c 5f 54 48 52 45 41 44 53 29 20 26 26 20 24 CL_THREADS) && $
b480: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3c 20 (TCL_VERSION) <
b490: 38 37 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 87.OPTDEFINES.=
b4a0: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
b4b0: 54 43 4c 5f 54 48 52 45 41 44 53 3d 31 0a 21 69 TCL_THREADS=1.!i
b4c0: 66 20 24 28 55 53 45 5f 54 48 52 45 41 44 5f 41 f $(USE_THREAD_A
b4d0: 4c 4c 4f 43 29 20 26 26 20 24 28 54 43 4c 5f 56 LLOC) && $(TCL_V
b4e0: 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a 4f 50 54 ERSION) < 87.OPT
b4f0: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b500: 45 46 49 4e 45 53 29 20 2f 44 55 53 45 5f 54 48 EFINES) /DUSE_TH
b510: 52 45 41 44 5f 41 4c 4c 4f 43 3d 31 0a 21 65 6e READ_ALLOC=1.!en
b520: 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 dif.!endif.!if $
b530: 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 4f (STATIC_BUILD).O
b540: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b550: 54 44 45 46 49 4e 45 53 29 20 2f 44 53 54 41 54 TDEFINES) /DSTAT
b560: 49 43 5f 42 55 49 4c 44 0a 21 65 6c 73 65 69 66 IC_BUILD.!elseif
b570: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 $(TCL_VERSION)
b580: 3e 20 38 36 0a 4f 50 54 44 45 46 49 4e 45 53 09 > 86.OPTDEFINES.
b590: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b5a0: 2f 44 54 43 4c 5f 57 49 54 48 5f 45 58 54 45 52 /DTCL_WITH_EXTER
b5b0: 4e 41 4c 5f 54 4f 4d 4d 41 54 48 0a 21 69 66 20 NAL_TOMMATH.!if
b5c0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
b5d0: 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 4d 41 "AMD64" || "$(MA
b5e0: 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 CHINE)" == "ARM6
b5f0: 34 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 4".OPTDEFINES.=
b600: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
b610: 4d 50 5f 36 34 42 49 54 0a 21 65 6e 64 69 66 0a MP_64BIT.!endif.
b620: 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 4c !endif.!if $(TCL
b630: 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 29 0a _NO_DEPRECATED).
b640: 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f OPTDEFINES.= $(O
b650: 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c PTDEFINES) /DTCL
b660: 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 0a 21 _NO_DEPRECATED.!
b670: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 55 53 45 endif..!if $(USE
b680: 5f 53 54 55 42 53 29 0a 23 20 4e 6f 74 65 20 77 _STUBS).# Note w
b690: 65 20 64 6f 20 6e 6f 74 20 64 65 66 69 6e 65 20 e do not define
b6a0: 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 20 65 76 USE_TCL_STUBS ev
b6b0: 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 en when building
b6c0: 20 74 6b 20 73 69 6e 63 65 20 73 6f 6d 65 0a 23 tk since some.#
b6d0: 20 74 65 73 74 20 74 61 72 67 65 74 73 20 69 6e test targets in
b6e0: 20 74 6b 20 64 6f 20 6e 6f 74 20 75 73 65 20 73 tk do not use s
b6f0: 74 75 62 73 0a 21 69 66 20 21 24 28 44 4f 49 4e tubs.!if !$(DOIN
b700: 47 5f 54 43 4c 29 0a 55 53 45 5f 53 54 55 42 53 G_TCL).USE_STUBS
b710: 5f 44 45 46 53 20 20 3d 20 2f 44 55 53 45 5f 54 _DEFS = /DUSE_T
b720: 43 4c 5f 53 54 55 42 53 20 2f 44 55 53 45 5f 54 CL_STUBS /DUSE_T
b730: 43 4c 4f 4f 5f 53 54 55 42 53 0a 21 69 66 20 24 CLOO_STUBS.!if $
b740: 28 4e 45 45 44 5f 54 4b 29 0a 55 53 45 5f 53 54 (NEED_TK).USE_ST
b750: 55 42 53 5f 44 45 46 53 20 20 3d 20 24 28 55 53 UBS_DEFS = $(US
b760: 45 5f 53 54 55 42 53 5f 44 45 46 53 29 20 2f 44 E_STUBS_DEFS) /D
b770: 55 53 45 5f 54 4b 5f 53 54 55 42 53 0a 21 65 6e USE_TK_STUBS.!en
b780: 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 dif.!endif.!endi
b790: 66 20 23 20 55 53 45 5f 53 54 55 42 53 0a 0a 21 f # USE_STUBS..!
b7a0: 69 66 20 21 24 28 44 45 42 55 47 29 0a 4f 50 54 if !$(DEBUG).OPT
b7b0: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b7c0: 45 46 49 4e 45 53 29 20 2f 44 4e 44 45 42 55 47 EFINES) /DNDEBUG
b7d0: 0a 21 69 66 20 24 28 4f 50 54 49 4d 49 5a 49 4e .!if $(OPTIMIZIN
b7e0: 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 G).OPTDEFINES.=
b7f0: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 $(OPTDEFINES) /D
b800: 54 43 4c 5f 43 46 47 5f 4f 50 54 49 4d 49 5a 45 TCL_CFG_OPTIMIZE
b810: 44 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a D.!endif.!endif.
b820: 21 69 66 20 24 28 50 52 4f 46 49 4c 45 29 0a 4f !if $(PROFILE).O
b830: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b840: 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f TDEFINES) /DTCL_
b850: 43 46 47 5f 50 52 4f 46 49 4c 45 44 0a 21 65 6e CFG_PROFILED.!en
b860: 64 69 66 0a 21 69 66 20 22 24 28 4d 41 43 48 49 dif.!if "$(MACHI
b870: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 NE)" == "AMD64"
b880: 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 || "$(MACHINE)"
b890: 3d 3d 20 22 41 52 4d 36 34 22 0a 4f 50 54 44 45 == "ARM64".OPTDE
b8a0: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b8b0: 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 47 5f INES) /DTCL_CFG_
b8c0: 44 4f 36 34 42 49 54 0a 21 65 6e 64 69 66 0a 21 DO64BIT.!endif.!
b8d0: 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 if $(VCVERSION)
b8e0: 3c 20 31 33 30 30 0a 4f 50 54 44 45 46 49 4e 45 < 1300.OPTDEFINE
b8f0: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b900: 29 20 2f 44 4e 4f 5f 53 54 52 54 4f 49 36 34 3d ) /DNO_STRTOI64=
b910: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 1.!endif..!if $(
b920: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
b930: 4e 29 20 3d 3d 20 38 0a 21 69 66 20 22 24 28 5f N) == 8.!if "$(_
b940: 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 USE_64BIT_TIME_T
b950: 29 22 20 3d 3d 20 22 31 22 0a 4f 50 54 44 45 46 )" == "1".OPTDEF
b960: 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 INES.= $(OPTDEFI
b970: 4e 45 53 29 20 2f 44 5f 55 53 45 5f 36 34 42 49 NES) /D_USE_64BI
b980: 54 5f 54 49 4d 45 5f 54 3d 31 0a 21 65 6e 64 69 T_TIME_T=1.!endi
b990: 66 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 24 28 f.!endif.!if "$(
b9a0: 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 TCL_BUILD_FOR)"
b9b0: 3d 3d 20 22 38 22 0a 4f 50 54 44 45 46 49 4e 45 == "8".OPTDEFINE
b9c0: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b9d0: 29 20 2f 44 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 ) /DTCL_MAJOR_VE
b9e0: 52 53 49 4f 4e 3d 38 20 2f 44 54 4b 5f 4d 41 4a RSION=8 /DTK_MAJ
b9f0: 4f 52 5f 56 45 52 53 49 4f 4e 3d 38 0a 21 65 6e OR_VERSION=8.!en
ba00: 64 69 66 0a 0a 23 20 4c 69 6b 65 20 74 68 65 20 dif..# Like the
ba10: 54 45 41 20 73 79 73 74 65 6d 20 6f 6e 6c 79 20 TEA system only
ba20: 73 65 74 20 74 68 69 73 20 6e 6f 6e 20 65 6d 70 set this non emp
ba30: 74 79 20 66 6f 72 20 6e 6f 6e 2d 54 6b 20 65 78 ty for non-Tk ex
ba40: 74 65 6e 73 69 6f 6e 73 0a 23 20 4e 6f 74 65 3a tensions.# Note:
ba50: 20 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f 6e 73 some extensions
ba60: 20 75 73 65 20 50 41 43 4b 41 47 45 5f 4e 41 4d use PACKAGE_NAM
ba70: 45 20 61 6e 64 20 6f 74 68 65 72 73 20 75 73 65 E and others use
ba80: 20 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 PACKAGE_TCLNAME
ba90: 0a 23 20 73 6f 20 77 65 20 70 61 73 73 20 62 6f .# so we pass bo
baa0: 74 68 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f th.!if !$(DOING_
bab0: 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 4e 47 TCL) && !$(DOING
bac0: 5f 54 4b 29 0a 50 4b 47 4e 41 4d 45 46 4c 41 47 _TK).PKGNAMEFLAG
bad0: 53 20 3d 20 2f 44 50 41 43 4b 41 47 45 5f 4e 41 S = /DPACKAGE_NA
bae0: 4d 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 43 4b ME="\"$(PRJ_PACK
baf0: 41 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 22 20 AGE_TCLNAME)\""
bb00: 5c 0a 09 2f 44 50 41 43 4b 41 47 45 5f 54 43 4c \../DPACKAGE_TCL
bb10: 4e 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 NAME="\"$(PRJ_PA
bb20: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 CKAGE_TCLNAME)\"
bb30: 22 20 5c 0a 09 2f 44 50 41 43 4b 41 47 45 5f 56 " \../DPACKAGE_V
bb40: 45 52 53 49 4f 4e 3d 22 5c 22 24 28 44 4f 54 56 ERSION="\"$(DOTV
bb50: 45 52 53 49 4f 4e 29 5c 22 22 20 5c 0a 09 2f 44 ERSION)\"" \../D
bb60: 4d 4f 44 55 4c 45 5f 53 43 4f 50 45 3d 65 78 74 MODULE_SCOPE=ext
bb70: 65 72 6e 0a 21 65 6e 64 69 66 0a 0a 23 20 63 72 ern.!endif..# cr
bb80: 74 20 70 69 63 6b 73 20 74 68 65 20 43 20 72 75 t picks the C ru
bb90: 6e 20 74 69 6d 65 20 62 61 73 65 64 20 6f 6e 20 n time based on
bba0: 73 65 6c 65 63 74 65 64 20 4f 50 54 53 0a 21 69 selected OPTS.!i
bbb0: 66 20 24 28 4d 53 56 43 52 54 29 0a 21 69 66 20 f $(MSVCRT).!if
bbc0: 24 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 $(DEBUG) && !$(U
bbd0: 4e 43 48 45 43 4b 45 44 29 0a 63 72 74 20 3d 20 NCHECKED).crt =
bbe0: 2d 4d 44 64 0a 21 65 6c 73 65 0a 63 72 74 20 3d -MDd.!else.crt =
bbf0: 20 2d 4d 44 0a 21 65 6e 64 69 66 0a 21 65 6c 73 -MD.!endif.!els
bc00: 65 0a 21 69 66 20 24 28 44 45 42 55 47 29 20 26 e.!if $(DEBUG) &
bc10: 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 29 0a & !$(UNCHECKED).
bc20: 63 72 74 20 3d 20 2d 4d 54 64 0a 21 65 6c 73 65 crt = -MTd.!else
bc30: 0a 63 72 74 20 3d 20 2d 4d 54 0a 21 65 6e 64 69 .crt = -MT.!endi
bc40: 66 0a 21 65 6e 64 69 66 0a 0a 23 20 63 64 65 62 f.!endif..# cdeb
bc50: 75 67 20 69 6e 63 6c 75 64 65 73 20 63 6f 6d 70 ug includes comp
bc60: 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 66 6f 72 iler options for
bc70: 20 64 65 62 75 67 67 69 6e 67 20 61 73 20 77 65 debugging as we
bc80: 6c 6c 20 61 73 20 6f 70 74 69 6d 69 7a 61 74 69 ll as optimizati
bc90: 6f 6e 2e 0a 21 69 66 20 24 28 44 45 42 55 47 29 on..!if $(DEBUG)
bca0: 0a 0a 23 20 49 6e 20 64 65 62 75 67 67 69 6e 67 ..# In debugging
bcb0: 20 6d 6f 64 65 2c 20 6f 70 74 69 6d 69 7a 61 74 mode, optimizat
bcc0: 69 6f 6e 73 20 6e 65 65 64 20 74 6f 20 62 65 20 ions need to be
bcd0: 64 69 73 61 62 6c 65 64 0a 63 64 65 62 75 67 20 disabled.cdebug
bce0: 3d 20 2d 5a 69 20 2d 4f 64 20 24 28 44 45 42 55 = -Zi -Od $(DEBU
bcf0: 47 46 4c 41 47 53 29 0a 0a 21 65 6c 73 65 0a 0a GFLAGS)..!else..
bd00: 63 64 65 62 75 67 20 3d 20 24 28 4f 50 54 49 4d cdebug = $(OPTIM
bd10: 49 5a 41 54 49 4f 4e 53 29 0a 21 69 66 20 24 28 IZATIONS).!if $(
bd20: 53 59 4d 42 4f 4c 53 29 0a 63 64 65 62 75 67 20 SYMBOLS).cdebug
bd30: 3d 20 24 28 63 64 65 62 75 67 29 20 2d 5a 69 0a = $(cdebug) -Zi.
bd40: 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 !endif..!endif #
bd50: 20 24 28 44 45 42 55 47 29 0a 0a 23 20 63 77 61 $(DEBUG)..# cwa
bd60: 72 6e 20 69 6e 63 6c 75 64 65 73 20 64 65 66 61 rn includes defa
bd70: 75 6c 74 20 77 61 72 6e 69 6e 67 20 6c 65 76 65 ult warning leve
bd80: 6c 73 2c 20 61 6c 73 6f 20 43 34 30 39 30 20 28 ls, also C4090 (
bd90: 62 75 67 67 79 29 20 61 6e 64 20 43 34 31 34 36 buggy) and C4146
bda0: 20 69 73 20 75 73 65 6c 65 73 73 2e 0a 63 77 61 is useless..cwa
bdb0: 72 6e 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 rn = $(WARNINGS)
bdc0: 20 2d 77 64 34 30 39 30 20 2d 77 64 34 31 34 36 -wd4090 -wd4146
bdd0: 0a 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 45 ..!if "$(MACHINE
bde0: 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 7c 7c )" == "AMD64" ||
bdf0: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d "$(MACHINE)" ==
be00: 20 22 41 52 4d 36 34 22 0a 23 20 44 69 73 61 62 "ARM64".# Disab
be10: 6c 65 20 70 6f 69 6e 74 65 72 3c 2d 3e 69 6e 74 le pointer<->int
be20: 20 77 61 72 6e 69 6e 67 73 20 72 65 6c 61 74 65 warnings relate
be30: 64 20 74 6f 20 63 61 73 74 20 62 65 74 77 65 65 d to cast betwee
be40: 6e 20 64 69 66 66 65 72 65 6e 74 20 73 69 7a 65 n different size
be50: 73 0a 23 20 54 68 65 72 65 20 61 72 65 20 61 20 s.# There are a
be60: 67 61 64 7a 69 6c 6c 69 6f 6e 20 6f 66 20 74 68 gadzillion of th
be70: 65 73 65 20 64 75 65 20 74 6f 20 75 73 65 20 6f ese due to use o
be80: 66 20 43 6c 69 65 6e 74 44 61 74 61 20 61 6e 64 f ClientData and
be90: 0a 23 20 63 6c 75 74 74 65 72 20 75 70 20 63 6f .# clutter up co
bea0: 6d 70 69 6c 65 72 0a 23 20 6f 75 74 70 75 74 20 mpiler.# output
beb0: 69 6e 63 72 65 61 73 69 6e 67 20 63 68 61 6e 63 increasing chanc
bec0: 65 20 6f 66 20 61 20 72 65 61 6c 20 77 61 72 6e e of a real warn
bed0: 69 6e 67 20 67 65 74 74 69 6e 67 20 6c 6f 73 74 ing getting lost
bee0: 2e 20 53 6f 20 64 69 73 61 62 6c 65 20 74 68 65 . So disable the
bef0: 6d 2e 0a 23 20 45 76 65 6e 74 75 61 6c 6c 79 20 m..# Eventually
bf00: 73 6f 6d 65 20 64 61 79 2c 20 54 63 6c 20 77 69 some day, Tcl wi
bf10: 6c 6c 20 62 65 20 36 34 2d 62 69 74 20 63 6c 65 ll be 64-bit cle
bf20: 61 6e 2e 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 an..cwarn = $(cw
bf30: 61 72 6e 29 20 2d 77 64 34 33 31 31 20 2d 77 64 arn) -wd4311 -wd
bf40: 34 33 31 32 0a 21 65 6e 64 69 66 0a 0a 23 23 23 4312.!endif..###
bf50: 20 43 6f 6d 6d 6f 6e 20 63 6f 6d 70 69 6c 65 72 Common compiler
bf60: 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 61 72 options that ar
bf70: 65 20 61 72 63 68 69 74 65 63 74 75 72 65 20 73 e architecture s
bf80: 70 65 63 69 66 69 63 0a 21 69 66 20 22 24 28 4d pecific.!if "$(M
bf90: 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 4d ACHINE)" == "ARM
bfa0: 22 0a 63 61 72 63 68 20 3d 20 2f 44 5f 41 52 4d ".carch = /D_ARM
bfb0: 5f 57 49 4e 41 50 49 5f 50 41 52 54 49 54 49 4f _WINAPI_PARTITIO
bfc0: 4e 5f 44 45 53 4b 54 4f 50 5f 53 44 4b 5f 41 56 N_DESKTOP_SDK_AV
bfd0: 41 49 4c 41 42 4c 45 0a 21 65 6c 73 65 0a 63 61 AILABLE.!else.ca
bfe0: 72 63 68 20 3d 0a 21 65 6e 64 69 66 0a 0a 23 20 rch =.!endif..#
bff0: 63 70 75 69 64 20 69 73 20 6f 6e 6c 79 20 61 76 cpuid is only av
c000: 61 69 6c 61 62 6c 65 20 6f 6e 20 69 6e 74 65 6c ailable on intel
c010: 20 6d 61 63 68 69 6e 65 73 0a 21 69 66 20 22 24 machines.!if "$
c020: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 (MACHINE)" == "I
c030: 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 X86" || "$(MACHI
c040: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a NE)" == "AMD64".
c050: 63 61 72 63 68 20 3d 20 24 28 63 61 72 63 68 29 carch = $(carch)
c060: 20 2f 44 48 41 56 45 5f 43 50 55 49 44 3d 31 0a /DHAVE_CPUID=1.
c070: 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 44 45 !endif..!if $(DE
c080: 42 55 47 29 0a 23 20 54 75 72 6e 20 77 61 72 6e BUG).# Turn warn
c090: 69 6e 67 73 20 69 6e 74 6f 20 65 72 72 6f 72 73 ings into errors
c0a0: 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 61 72 6e .cwarn = $(cwarn
c0b0: 29 20 2d 57 58 0a 21 65 6e 64 69 66 0a 0a 49 4e ) -WX.!endif..IN
c0c0: 43 4c 55 44 45 53 20 3d 20 24 28 54 43 4c 5f 49 CLUDES = $(TCL_I
c0d0: 4e 43 4c 55 44 45 53 29 20 24 28 54 4b 5f 49 4e NCLUDES) $(TK_IN
c0e0: 43 4c 55 44 45 53 29 20 24 28 50 52 4a 5f 49 4e CLUDES) $(PRJ_IN
c0f0: 43 4c 55 44 45 53 29 0a 21 69 66 20 21 24 28 44 CLUDES).!if !$(D
c100: 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 24 28 OING_TCL) && !$(
c110: 44 4f 49 4e 47 5f 54 4b 29 0a 49 4e 43 4c 55 44 DOING_TK).INCLUD
c120: 45 53 20 3d 20 24 28 49 4e 43 4c 55 44 45 53 29 ES = $(INCLUDES)
c130: 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 -I"$(GENERICDIR
c140: 29 22 20 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 )" -I"$(WIN_DIR)
c150: 22 20 2d 49 22 24 28 43 4f 4d 50 41 54 44 49 52 " -I"$(COMPATDIR
c160: 29 22 0a 21 65 6e 64 69 66 0a 0a 23 20 54 68 65 )".!endif..# The
c170: 73 65 20 66 6c 61 67 73 20 61 72 65 20 64 65 66 se flags are def
c180: 69 6e 65 64 20 72 6f 75 67 68 6c 79 20 69 6e 20 ined roughly in
c190: 74 68 65 20 6f 72 64 65 72 20 6f 66 20 74 68 65 the order of the
c1a0: 20 70 72 65 2d 72 65 66 6f 72 6d 0a 23 20 72 75 pre-reform.# ru
c1b0: 6c 65 73 2e 76 63 2f 6d 61 6b 65 66 69 6c 65 2e les.vc/makefile.
c1c0: 76 63 20 74 6f 20 68 65 6c 70 20 76 69 73 75 61 vc to help visua
c1d0: 6c 6c 79 20 63 6f 6d 70 61 72 65 20 74 68 61 74 lly compare that
c1e0: 20 74 68 65 20 70 72 65 2d 20 61 6e 64 0a 23 20 the pre- and.#
c1f0: 70 6f 73 74 2d 72 65 66 6f 72 6d 20 62 75 69 6c post-reform buil
c200: 64 20 6c 6f 67 73 0a 0a 23 20 63 66 6c 61 67 73 d logs..# cflags
c210: 20 63 6f 6e 74 61 69 6e 73 20 67 65 6e 65 72 69 contains generi
c220: 63 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 c flags used for
c230: 20 62 75 69 6c 64 69 6e 67 20 70 72 61 63 74 69 building practi
c240: 63 61 6c 6c 79 20 61 6c 6c 20 6f 62 6a 65 63 74 cally all object
c250: 20 66 69 6c 65 73 0a 63 66 6c 61 67 73 20 3d 20 files.cflags =
c260: 2d 6e 6f 6c 6f 67 6f 20 2d 63 20 24 28 43 4f 4d -nologo -c $(COM
c270: 50 49 4c 45 52 46 4c 41 47 53 29 20 24 28 63 61 PILERFLAGS) $(ca
c280: 72 63 68 29 20 24 28 63 77 61 72 6e 29 20 2d 46 rch) $(cwarn) -F
c290: 70 24 28 54 4d 50 5f 44 49 52 29 5e 5c 20 24 28 p$(TMP_DIR)^\ $(
c2a0: 63 64 65 62 75 67 29 0a 0a 21 69 66 20 24 28 54 cdebug)..!if $(T
c2b0: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
c2c0: 29 20 3d 3d 20 38 20 26 26 20 24 28 54 43 4c 5f ) == 8 && $(TCL_
c2d0: 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3c MINOR_VERSION) <
c2e0: 20 37 0a 63 66 6c 61 67 73 20 3d 20 24 28 63 66 7.cflags = $(cf
c2f0: 6c 61 67 73 29 20 2d 44 54 63 6c 5f 53 69 7a 65 lags) -DTcl_Size
c300: 3d 69 6e 74 0a 21 65 6e 64 69 66 0a 0a 23 20 61 =int.!endif..# a
c310: 70 70 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e ppcflags contain
c320: 73 20 24 28 63 66 6c 61 67 73 29 20 61 6e 64 20 s $(cflags) and
c330: 66 6c 61 67 73 20 66 6f 72 20 62 75 69 6c 64 69 flags for buildi
c340: 6e 67 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 ng the applicati
c350: 6f 6e 0a 23 20 6f 62 6a 65 63 74 20 66 69 6c 65 on.# object file
c360: 73 20 28 65 2e 67 2e 20 74 63 6c 73 68 2c 20 6f s (e.g. tclsh, o
c370: 72 20 77 69 73 68 29 20 70 6b 67 63 66 6c 61 67 r wish) pkgcflag
c380: 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 66 6c s contains $(cfl
c390: 61 67 73 29 20 70 6c 75 73 0a 23 20 66 6c 61 67 ags) plus.# flag
c3a0: 73 20 75 73 65 64 20 66 6f 72 20 62 75 69 6c 64 s used for build
c3b0: 69 6e 67 20 73 68 61 72 65 64 20 6f 62 6a 65 63 ing shared objec
c3c0: 74 20 66 69 6c 65 73 20 54 68 65 20 74 77 6f 20 t files The two
c3d0: 64 69 66 66 65 72 20 69 6e 20 74 68 65 0a 23 20 differ in the.#
c3e0: 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 BUILD_$(PROJECT)
c3f0: 20 6d 61 63 72 6f 20 77 68 69 63 68 20 73 68 6f macro which sho
c400: 75 6c 64 20 62 65 20 64 65 66 69 6e 65 64 20 6f uld be defined o
c410: 6e 6c 79 20 66 6f 72 20 74 68 65 20 73 68 61 72 nly for the shar
c420: 65 64 0a 23 20 6c 69 62 72 61 72 79 20 2a 69 6d ed.# library *im
c430: 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2a 20 61 6e plementation* an
c440: 64 20 6e 6f 74 20 66 6f 72 20 69 74 73 20 63 61 d not for its ca
c450: 6c 6c 65 72 20 69 6e 74 65 72 66 61 63 65 0a 0a ller interface..
c460: 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 appcflags_nostub
c470: 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 24 28 s = $(cflags) $(
c480: 63 72 74 29 20 24 28 49 4e 43 4c 55 44 45 53 29 crt) $(INCLUDES)
c490: 20 24 28 54 43 4c 5f 44 45 46 49 4e 45 53 29 20 $(TCL_DEFINES)
c4a0: 24 28 50 52 4a 5f 44 45 46 49 4e 45 53 29 20 24 $(PRJ_DEFINES) $
c4b0: 28 4f 50 54 44 45 46 49 4e 45 53 29 0a 61 70 70 (OPTDEFINES).app
c4c0: 63 66 6c 61 67 73 20 3d 20 24 28 61 70 70 63 66 cflags = $(appcf
c4d0: 6c 61 67 73 5f 6e 6f 73 74 75 62 73 29 20 24 28 lags_nostubs) $(
c4e0: 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 29 0a USE_STUBS_DEFS).
c4f0: 70 6b 67 63 66 6c 61 67 73 20 3d 20 24 28 61 70 pkgcflags = $(ap
c500: 70 63 66 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 pcflags) $(PKGNA
c510: 4d 45 46 4c 41 47 53 29 20 2f 44 42 55 49 4c 44 MEFLAGS) /DBUILD
c520: 5f 24 28 50 52 4f 4a 45 43 54 29 0a 70 6b 67 63 _$(PROJECT).pkgc
c530: 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 3d 20 flags_nostubs =
c540: 24 28 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 $(appcflags_nost
c550: 75 62 73 29 20 24 28 50 4b 47 4e 41 4d 45 46 4c ubs) $(PKGNAMEFL
c560: 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 28 50 AGS) /DBUILD_$(P
c570: 52 4f 4a 45 43 54 29 0a 0a 23 20 73 74 75 62 73 ROJECT)..# stubs
c580: 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 cflags contains
c590: 24 28 63 66 6c 61 67 73 29 20 70 6c 75 73 20 66 $(cflags) plus f
c5a0: 6c 61 67 73 20 75 73 65 64 20 66 6f 72 20 62 75 lags used for bu
c5b0: 69 6c 64 69 6e 67 20 61 20 73 74 75 62 73 0a 23 ilding a stubs.#
c5c0: 20 6c 69 62 72 61 72 79 20 66 6f 72 20 74 68 65 library for the
c5d0: 20 70 61 63 6b 61 67 65 2e 20 20 4e 6f 74 65 3a package. Note:
c5e0: 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c 44 20 /DSTATIC_BUILD
c5f0: 69 73 20 64 65 66 69 6e 65 64 20 69 6e 0a 23 20 is defined in.#
c600: 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 6f 6e $(OPTDEFINES) on
c610: 6c 79 20 69 66 20 74 68 65 20 4f 50 54 53 20 63 ly if the OPTS c
c620: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 6e 64 onfiguration ind
c630: 69 63 61 74 65 73 20 61 20 73 74 61 74 69 63 0a icates a static.
c640: 23 20 6c 69 62 72 61 72 79 2e 20 48 6f 77 65 76 # library. Howev
c650: 65 72 20 74 68 65 20 73 74 75 62 73 20 6c 69 62 er the stubs lib
c660: 72 61 72 79 20 69 73 20 41 4c 57 41 59 53 20 73 rary is ALWAYS s
c670: 74 61 74 69 63 20 68 65 6e 63 65 20 69 6e 63 6c tatic hence incl
c680: 75 64 65 64 0a 23 20 68 65 72 65 20 69 72 72 65 uded.# here irre
c690: 73 70 65 63 74 69 76 65 20 6f 66 20 74 68 65 20 spective of the
c6a0: 4f 50 54 53 20 73 65 74 74 69 6e 67 2e 0a 23 0a OPTS setting..#.
c6b0: 23 20 54 42 44 20 2d 20 74 63 6c 76 66 73 20 68 # TBD - tclvfs h
c6c0: 61 73 20 61 20 63 6f 6d 6d 65 6e 74 20 74 68 61 as a comment tha
c6d0: 74 20 73 74 75 62 73 20 6c 69 62 73 20 73 68 6f t stubs libs sho
c6e0: 75 6c 64 20 6e 6f 74 20 62 65 20 63 6f 6d 70 69 uld not be compi
c6f0: 6c 65 64 20 77 69 74 68 20 2d 47 4c 0a 23 20 77 led with -GL.# w
c700: 69 74 68 6f 75 74 20 73 74 61 74 69 6e 67 20 77 ithout stating w
c710: 68 79 2e 20 54 63 6c 20 69 74 73 65 6c 66 20 63 hy. Tcl itself c
c720: 6f 6d 70 69 6c 65 64 20 73 74 75 62 73 20 6c 69 ompiled stubs li
c730: 62 73 20 77 69 74 68 20 74 68 69 73 20 66 6c 61 bs with this fla
c740: 67 2e 0a 23 20 73 6f 20 77 65 20 64 6f 20 6e 6f g..# so we do no
c750: 74 20 72 65 6d 6f 76 65 20 69 74 20 66 72 6f 6d t remove it from
c760: 20 63 66 6c 61 67 73 2e 20 2d 47 4c 20 6d 61 79 cflags. -GL may
c770: 20 70 72 65 76 65 6e 74 20 65 78 74 65 6e 73 69 prevent extensi
c780: 6f 6e 73 0a 23 20 63 6f 6d 70 69 6c 65 64 20 77 ons.# compiled w
c790: 69 74 68 20 6f 6e 65 20 56 43 20 76 65 72 73 69 ith one VC versi
c7a0: 6f 6e 20 74 6f 20 66 61 69 6c 20 74 6f 20 6c 69 on to fail to li
c7b0: 6e 6b 20 61 67 61 69 6e 73 74 20 73 74 75 62 73 nk against stubs
c7c0: 20 6c 69 62 72 61 72 79 0a 23 20 63 6f 6d 70 69 library.# compi
c7d0: 6c 65 64 20 77 69 74 68 20 61 6e 6f 74 68 65 72 led with another
c7e0: 20 56 43 20 76 65 72 73 69 6f 6e 2e 20 43 68 65 VC version. Che
c7f0: 63 6b 20 66 6f 72 20 74 68 69 73 20 61 6e 64 20 ck for this and
c800: 66 69 78 20 61 63 63 6f 72 64 69 6e 67 6c 79 2e fix accordingly.
c810: 0a 73 74 75 62 73 63 66 6c 61 67 73 20 3d 20 24 .stubscflags = $
c820: 28 63 66 6c 61 67 73 29 20 24 28 50 4b 47 4e 41 (cflags) $(PKGNA
c830: 4d 45 46 4c 41 47 53 29 20 24 28 50 52 4a 5f 44 MEFLAGS) $(PRJ_D
c840: 45 46 49 4e 45 53 29 20 24 28 4f 50 54 44 45 46 EFINES) $(OPTDEF
c850: 49 4e 45 53 29 20 2f 5a 6c 20 2f 47 4c 2d 20 2f INES) /Zl /GL- /
c860: 44 53 54 41 54 49 43 5f 42 55 49 4c 44 20 24 28 DSTATIC_BUILD $(
c870: 49 4e 43 4c 55 44 45 53 29 20 24 28 55 53 45 5f INCLUDES) $(USE_
c880: 53 54 55 42 53 5f 44 45 46 53 29 0a 0a 23 20 4c STUBS_DEFS)..# L
c890: 69 6e 6b 20 66 6c 61 67 73 0a 0a 21 69 66 20 24 ink flags..!if $
c8a0: 28 44 45 42 55 47 29 0a 6c 64 65 62 75 67 09 3d (DEBUG).ldebug.=
c8b0: 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67 74 79 -debug -debugty
c8c0: 70 65 3a 63 76 0a 21 65 6c 73 65 0a 6c 64 65 62 pe:cv.!else.ldeb
c8d0: 75 67 09 3d 20 2d 72 65 6c 65 61 73 65 20 2d 6f ug.= -release -o
c8e0: 70 74 3a 72 65 66 20 2d 6f 70 74 3a 69 63 66 2c pt:ref -opt:icf,
c8f0: 33 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c 53 29 3.!if $(SYMBOLS)
c900: 0a 6c 64 65 62 75 67 09 3d 20 24 28 6c 64 65 62 .ldebug.= $(ldeb
c910: 75 67 29 20 2d 64 65 62 75 67 20 2d 64 65 62 75 ug) -debug -debu
c920: 67 74 79 70 65 3a 63 76 0a 21 65 6e 64 69 66 0a gtype:cv.!endif.
c930: 21 65 6e 64 69 66 0a 0a 23 20 4e 6f 74 65 3a 20 !endif..# Note:
c940: 50 72 6f 66 69 6c 69 6e 67 20 69 73 20 63 75 72 Profiling is cur
c950: 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 70 6f 73 73 rently only poss
c960: 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 56 69 ible with the Vi
c970: 73 75 61 6c 20 53 74 75 64 69 6f 20 45 6e 74 65 sual Studio Ente
c980: 72 70 72 69 73 65 0a 21 69 66 20 24 28 50 52 4f rprise.!if $(PRO
c990: 46 49 4c 45 29 0a 6c 64 65 62 75 67 3d 20 24 28 FILE).ldebug= $(
c9a0: 6c 64 65 62 75 67 29 20 2d 70 72 6f 66 69 6c 65 ldebug) -profile
c9b0: 0a 21 65 6e 64 69 66 0a 0a 23 23 23 20 44 65 63 .!endif..### Dec
c9c0: 6c 61 72 61 74 69 6f 6e 73 20 63 6f 6d 6d 6f 6e larations common
c9d0: 20 74 6f 20 61 6c 6c 20 6c 69 6e 6b 65 72 20 76 to all linker v
c9e0: 65 72 73 69 6f 6e 73 0a 6c 66 6c 61 67 73 09 3d ersions.lflags.=
c9f0: 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 63 68 69 6e -nologo -machin
ca00: 65 3a 24 28 4d 41 43 48 49 4e 45 29 20 24 28 4c e:$(MACHINE) $(L
ca10: 49 4e 4b 45 52 46 4c 41 47 53 29 20 24 28 6c 64 INKERFLAGS) $(ld
ca20: 65 62 75 67 29 0a 0a 21 69 66 20 24 28 4d 53 56 ebug)..!if $(MSV
ca30: 43 52 54 29 20 26 26 20 21 28 24 28 44 45 42 55 CRT) && !($(DEBU
ca40: 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b G) && !$(UNCHECK
ca50: 45 44 29 29 20 26 26 20 24 28 56 43 56 45 52 53 ED)) && $(VCVERS
ca60: 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0a 6c 66 6c ION) >= 1900.lfl
ca70: 61 67 73 09 3d 20 24 28 6c 66 6c 61 67 73 29 20 ags.= $(lflags)
ca80: 2d 6e 6f 64 65 66 61 75 6c 74 6c 69 62 3a 75 63 -nodefaultlib:uc
ca90: 72 74 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 64 rt.lib.!endif..d
caa0: 6c 6c 6c 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c lllflags = $(lfl
cab0: 61 67 73 29 20 2d 64 6c 6c 0a 63 6f 6e 6c 66 6c ags) -dll.conlfl
cac0: 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 29 20 ags = $(lflags)
cad0: 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e 73 6f -subsystem:conso
cae0: 6c 65 0a 67 75 69 6c 66 6c 61 67 73 20 3d 20 24 le.guilflags = $
caf0: 28 6c 66 6c 61 67 73 29 20 2d 73 75 62 73 79 73 (lflags) -subsys
cb00: 74 65 6d 3a 77 69 6e 64 6f 77 73 0a 0a 23 20 4c tem:windows..# L
cb10: 69 62 72 61 72 69 65 73 20 74 68 61 74 20 61 72 ibraries that ar
cb20: 65 20 72 65 71 75 69 72 65 64 20 66 6f 72 20 65 e required for e
cb30: 76 65 72 79 20 69 6d 61 67 65 2e 0a 23 20 45 78 very image..# Ex
cb40: 74 65 6e 73 69 6f 6e 73 20 73 68 6f 75 6c 64 20 tensions should
cb50: 64 65 66 69 6e 65 20 61 6e 79 20 61 64 64 69 74 define any addit
cb60: 69 6f 6e 61 6c 20 6c 69 62 72 61 72 69 65 73 20 ional libraries
cb70: 77 69 74 68 20 24 28 50 52 4a 5f 4c 49 42 53 29 with $(PRJ_LIBS)
cb80: 0a 77 69 6e 6c 69 62 73 20 20 20 3d 20 6b 65 72 .winlibs = ker
cb90: 6e 65 6c 33 32 2e 6c 69 62 20 61 64 76 61 70 69 nel32.lib advapi
cba0: 33 32 2e 6c 69 62 0a 0a 21 69 66 20 24 28 4e 45 32.lib..!if $(NE
cbb0: 45 44 5f 54 4b 29 0a 77 69 6e 6c 69 62 73 20 3d ED_TK).winlibs =
cbc0: 20 24 28 77 69 6e 6c 69 62 73 29 20 67 64 69 33 $(winlibs) gdi3
cbd0: 32 2e 6c 69 62 20 75 73 65 72 33 32 2e 6c 69 62 2.lib user32.lib
cbe0: 20 75 78 74 68 65 6d 65 2e 6c 69 62 0a 21 65 6e uxtheme.lib.!en
cbf0: 64 69 66 0a 0a 23 20 41 76 6f 69 64 20 27 75 6e dif..# Avoid 'un
cc00: 72 65 73 6f 6c 76 65 64 20 65 78 74 65 72 6e 61 resolved externa
cc10: 6c 20 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 75 72 l symbol __secur
cc20: 69 74 79 5f 63 6f 6f 6b 69 65 27 20 65 72 72 6f ity_cookie' erro
cc30: 72 73 2e 0a 23 20 63 2e 66 2e 20 68 74 74 70 3a rs..# c.f. http:
cc40: 2f 2f 73 75 70 70 6f 72 74 2e 6d 69 63 72 6f 73 //support.micros
cc50: 6f 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 39 34 35 oft.com/?id=8945
cc60: 37 33 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e 73.!if "$(MACHIN
cc70: 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a 21 E)" == "AMD64".!
cc80: 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 if $(VCVERSION)
cc90: 3e 20 31 33 39 39 20 26 26 20 24 28 56 43 56 45 > 1399 && $(VCVE
cca0: 52 53 49 4f 4e 29 20 3c 20 31 35 30 30 0a 77 69 RSION) < 1500.wi
ccb0: 6e 6c 69 62 73 20 20 20 3d 20 24 28 77 69 6e 6c nlibs = $(winl
ccc0: 69 62 73 29 20 62 75 66 66 65 72 6f 76 65 72 66 ibs) bufferoverf
ccd0: 6c 6f 77 55 2e 6c 69 62 0a 21 65 6e 64 69 66 0a lowU.lib.!endif.
cce0: 21 65 6e 64 69 66 0a 0a 62 61 73 65 6c 69 62 73 !endif..baselibs
ccf0: 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 24 28 = $(winlibs) $(
cd00: 50 52 4a 5f 4c 49 42 53 29 0a 0a 21 69 66 20 24 PRJ_LIBS)..!if $
cd10: 28 4d 53 56 43 52 54 29 20 26 26 20 21 28 24 28 (MSVCRT) && !($(
cd20: 44 45 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 DEBUG) && !$(UNC
cd30: 48 45 43 4b 45 44 29 29 20 26 26 20 24 28 56 43 HECKED)) && $(VC
cd40: 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 39 30 30 VERSION) >= 1900
cd50: 0a 62 61 73 65 6c 69 62 73 20 20 20 3d 20 24 28 .baselibs = $(
cd60: 62 61 73 65 6c 69 62 73 29 20 75 63 72 74 2e 6c baselibs) ucrt.l
cd70: 69 62 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 ib.!endif..#####
cd80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cd90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cda0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cdb0: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 33 ###########.# 13
cdc0: 2e 20 44 65 66 69 6e 65 20 73 74 61 6e 64 61 72 . Define standar
cdd0: 64 20 63 6f 6d 6d 61 6e 64 73 2c 20 63 6f 6d 6d d commands, comm
cde0: 6f 6e 20 6d 61 6b 65 20 74 61 72 67 65 74 73 20 on make targets
cdf0: 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 75 6c and implicit rul
ce00: 65 73 0a 0a 43 43 50 4b 47 43 4d 44 20 3d 20 24 es..CCPKGCMD = $
ce10: 28 63 63 33 32 29 20 24 28 70 6b 67 63 66 6c 61 (cc32) $(pkgcfla
ce20: 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 gs) -Fo$(TMP_DIR
ce30: 29 5e 5c 0a 43 43 41 50 50 43 4d 44 20 3d 20 24 )^\.CCAPPCMD = $
ce40: 28 63 63 33 32 29 20 24 28 61 70 70 63 66 6c 61 (cc32) $(appcfla
ce50: 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 49 52 gs) -Fo$(TMP_DIR
ce60: 29 5e 5c 0a 43 43 53 54 55 42 53 43 4d 44 20 3d )^\.CCSTUBSCMD =
ce70: 20 24 28 63 63 33 32 29 20 24 28 73 74 75 62 73 $(cc32) $(stubs
ce80: 63 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 cflags) -Fo$(TMP
ce90: 5f 44 49 52 29 5e 5c 0a 0a 4c 49 42 43 4d 44 20 _DIR)^\..LIBCMD
cea0: 3d 20 24 28 6c 69 62 33 32 29 20 2d 6e 6f 6c 6f = $(lib32) -nolo
ceb0: 67 6f 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 go $(LINKERFLAGS
cec0: 29 20 2d 6f 75 74 3a 24 40 0a 44 4c 4c 43 4d 44 ) -out:$@.DLLCMD
ced0: 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 64 = $(link32) $(d
cee0: 6c 6c 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 lllflags) -out:$
cef0: 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 28 @ $(baselibs) $(
cf00: 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 tcllibs) $(tklib
cf10: 73 29 0a 0a 43 4f 4e 45 58 45 43 4d 44 20 3d 20 s)..CONEXECMD =
cf20: 24 28 6c 69 6e 6b 33 32 29 20 24 28 63 6f 6e 6c $(link32) $(conl
cf30: 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 flags) -out:$@ $
cf40: 28 62 61 73 65 6c 69 62 73 29 20 24 28 74 63 6c (baselibs) $(tcl
cf50: 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 73 29 0a libs) $(tklibs).
cf60: 47 55 49 45 58 45 43 4d 44 20 3d 20 24 28 6c 69 GUIEXECMD = $(li
cf70: 6e 6b 33 32 29 20 24 28 67 75 69 6c 66 6c 61 67 nk32) $(guilflag
cf80: 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 61 73 s) -out:$@ $(bas
cf90: 65 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 62 73 elibs) $(tcllibs
cfa0: 29 20 24 28 74 6b 6c 69 62 73 29 0a 52 45 53 43 ) $(tklibs).RESC
cfb0: 4d 44 20 20 3d 20 24 28 72 63 33 32 29 20 2d 66 MD = $(rc32) -f
cfc0: 6f 20 24 40 20 2d 72 20 2d 69 20 22 24 28 47 45 o $@ -r -i "$(GE
cfd0: 4e 45 52 49 43 44 49 52 29 22 20 2d 69 20 22 24 NERICDIR)" -i "$
cfe0: 28 54 4d 50 5f 44 49 52 29 22 20 5c 0a 09 20 20 (TMP_DIR)" \..
cff0: 20 20 24 28 54 43 4c 5f 49 4e 43 4c 55 44 45 53 $(TCL_INCLUDES
d000: 29 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c 44 ) /DSTATIC_BUILD
d010: 3d 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 =$(STATIC_BUILD)
d020: 20 5c 0a 09 20 20 20 20 2f 44 44 45 42 55 47 3d \.. /DDEBUG=
d030: 24 28 44 45 42 55 47 29 20 2d 64 20 55 4e 43 48 $(DEBUG) -d UNCH
d040: 45 43 4b 45 44 3d 24 28 55 4e 43 48 45 43 4b 45 ECKED=$(UNCHECKE
d050: 44 29 20 5c 0a 09 20 20 20 20 2f 44 43 4f 4d 4d D) \.. /DCOMM
d060: 41 56 45 52 53 49 4f 4e 3d 24 28 52 43 43 4f 4d AVERSION=$(RCCOM
d070: 4d 41 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 20 MAVERSION) \..
d080: 20 20 2f 44 44 4f 54 56 45 52 53 49 4f 4e 3d 5c /DDOTVERSION=\
d090: 22 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 5c 22 "$(DOTVERSION)\"
d0a0: 20 5c 0a 09 20 20 20 20 2f 44 56 45 52 53 49 4f \.. /DVERSIO
d0b0: 4e 3d 5c 22 24 28 56 45 52 53 49 4f 4e 29 5c 22 N=\"$(VERSION)\"
d0c0: 20 5c 0a 09 20 20 20 20 2f 44 53 55 46 58 3d 5c \.. /DSUFX=\
d0d0: 22 24 28 53 55 46 58 29 5c 22 20 5c 0a 09 20 20 "$(SUFX)\" \..
d0e0: 20 20 2f 44 50 52 4f 4a 45 43 54 3d 5c 22 24 28 /DPROJECT=\"$(
d0f0: 50 52 4f 4a 45 43 54 29 5c 22 20 5c 0a 09 20 20 PROJECT)\" \..
d100: 20 20 2f 44 50 52 4a 4c 49 42 4e 41 4d 45 3d 5c /DPRJLIBNAME=\
d110: 22 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 5c 22 "$(PRJLIBNAME)\"
d120: 0a 0a 21 69 66 6e 64 65 66 20 44 45 46 41 55 4c ..!ifndef DEFAUL
d130: 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 0a 44 T_BUILD_TARGET.D
d140: 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 EFAULT_BUILD_TAR
d150: 47 45 54 20 3d 20 24 28 50 52 4f 4a 45 43 54 29 GET = $(PROJECT)
d160: 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 .!endif..default
d170: 2d 74 61 72 67 65 74 3a 20 24 28 44 45 46 41 55 -target: $(DEFAU
d180: 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 29 LT_BUILD_TARGET)
d190: 0a 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 4c 41 ..!if $(MULTIPLA
d1a0: 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 0a 64 TFORM_INSTALL).d
d1b0: 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a efault-pkgindex:
d1c0: 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 ..@echo if {[pac
d1d0: 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 73 20 kage vsatisfies
d1e0: 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65 [package provide
d1f0: 20 54 63 6c 5d 20 39 2e 30 5d 7d 20 7b 20 3e 20 Tcl] 9.0]} { >
d200: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
d210: 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 dex.tcl..@echo p
d220: 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 ackage ifneeded
d230: 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 $(PRJ_PACKAGE_TC
d240: 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 LNAME) $(DOTVERS
d250: 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 ION) \.. [lis
d260: 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 t load [file joi
d270: 6e 20 24 24 64 69 72 20 24 28 50 4c 41 54 46 4f n $$dir $(PLATFO
d280: 52 4d 5f 49 44 45 4e 54 49 46 59 29 20 24 28 50 RM_IDENTIFY) $(P
d290: 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e RJLIBNAME9)]] >>
d2a0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
d2b0: 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 ndex.tcl..@echo
d2c0: 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 } else { >> $(OU
d2d0: 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e T_DIR)\pkgIndex.
d2e0: 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 tcl..@echo packa
d2f0: 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 50 52 ge ifneeded $(PR
d300: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
d310: 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 E) $(DOTVERSION)
d320: 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f \.. [list lo
d330: 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 ad [file join $$
d340: 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d 5f 49 dir $(PLATFORM_I
d350: 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a 4c 49 DENTIFY) $(PRJLI
d360: 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 28 4f BNAME8)]] >> $(O
d370: 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 UT_DIR)\pkgIndex
d380: 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 3e 3e .tcl..@echo } >>
d390: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
d3a0: 6e 64 65 78 2e 74 63 6c 0a 21 65 6c 73 65 0a 64 ndex.tcl.!else.d
d3b0: 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 78 3a efault-pkgindex:
d3c0: 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 61 63 ..@echo if {[pac
d3d0: 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 73 20 kage vsatisfies
d3e0: 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 64 65 [package provide
d3f0: 20 54 63 6c 5d 20 39 2e 30 5d 7d 20 7b 20 3e 20 Tcl] 9.0]} { >
d400: 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e $(OUT_DIR)\pkgIn
d410: 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 dex.tcl..@echo p
d420: 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 ackage ifneeded
d430: 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 $(PRJ_PACKAGE_TC
d440: 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 LNAME) $(DOTVERS
d450: 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 ION) \.. [lis
d460: 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 t load [file joi
d470: 6e 20 24 24 64 69 72 20 24 28 50 52 4a 4c 49 42 n $$dir $(PRJLIB
d480: 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 4f 55 NAME9)]] >> $(OU
d490: 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e T_DIR)\pkgIndex.
d4a0: 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 65 6c 73 tcl..@echo } els
d4b0: 65 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 e { >> $(OUT_DIR
d4c0: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 )\pkgIndex.tcl..
d4d0: 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 69 66 @echo package if
d4e0: 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 41 43 needed $(PRJ_PAC
d4f0: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 24 28 KAGE_TCLNAME) $(
d500: 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0a 09 20 DOTVERSION) \..
d510: 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 5b 66 [list load [f
d520: 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 20 24 ile join $$dir $
d530: 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 (PRJLIBNAME8)]]
d540: 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b >> $(OUT_DIR)\pk
d550: 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 gIndex.tcl..@ech
d560: 6f 20 7d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 o } >> $(OUT_DIR
d570: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 21 )\pkgIndex.tcl.!
d580: 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 2d 70 endif..default-p
d590: 6b 67 69 6e 64 65 78 2d 74 65 61 3a 0a 09 40 69 kgindex-tea:..@i
d5a0: 66 20 65 78 69 73 74 20 24 28 52 4f 4f 54 29 5c f exist $(ROOT)\
d5b0: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e 20 pkgIndex.tcl.in
d5c0: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
d5d0: 45 29 20 2d 73 20 3c 3c 20 24 28 52 4f 4f 54 29 E) -s << $(ROOT)
d5e0: 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 6e \pkgIndex.tcl.in
d5f0: 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b > $(OUT_DIR)\pk
d600: 67 49 6e 64 65 78 2e 74 63 6c 0a 40 50 41 43 4b gIndex.tcl.@PACK
d610: 41 47 45 5f 56 45 52 53 49 4f 4e 40 20 20 20 20 AGE_VERSION@
d620: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 0a 40 50 $(DOTVERSION).@P
d630: 41 43 4b 41 47 45 5f 4e 41 4d 45 40 20 20 20 20 ACKAGE_NAME@
d640: 20 20 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 $(PRJ_PACKAGE
d650: 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 41 43 4b 41 _TCLNAME).@PACKA
d660: 47 45 5f 54 43 4c 4e 41 4d 45 40 20 20 20 20 24 GE_TCLNAME@ $
d670: 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c (PRJ_PACKAGE_TCL
d680: 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c 49 42 5f 46 NAME).@PKG_LIB_F
d690: 49 4c 45 40 20 20 20 20 20 20 20 24 28 50 52 4a ILE@ $(PRJ
d6a0: 4c 49 42 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c 49 LIBNAME).@PKG_LI
d6b0: 42 5f 46 49 4c 45 38 40 20 20 20 20 20 20 24 28 B_FILE8@ $(
d6c0: 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 40 50 4b PRJLIBNAME8).@PK
d6d0: 47 5f 4c 49 42 5f 46 49 4c 45 39 40 20 20 20 20 G_LIB_FILE9@
d6e0: 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 $(PRJLIBNAME9)
d6f0: 0a 3c 3c 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 .<<..default-ins
d700: 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 2d 69 6e tall: default-in
d710: 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 20 64 stall-binaries d
d720: 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c efault-install-l
d730: 69 62 72 61 72 69 65 73 0a 21 69 66 20 24 28 53 ibraries.!if $(S
d740: 59 4d 42 4f 4c 53 29 0a 64 65 66 61 75 6c 74 2d YMBOLS).default-
d750: 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 install: default
d760: 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 0a 21 65 -install-pdbs.!e
d770: 6e 64 69 66 0a 0a 23 20 41 67 61 69 6e 20 74 6f ndif..# Again to
d780: 20 64 65 61 6c 20 77 69 74 68 20 68 69 73 74 6f deal with histo
d790: 72 69 63 61 6c 20 62 72 6f 6b 65 6e 6e 65 73 73 rical brokenness
d7a0: 2c 20 74 68 65 72 65 20 69 73 20 73 6f 6d 65 20 , there is some
d7b0: 63 6f 6e 66 75 73 69 6f 6e 0a 23 20 69 6e 20 74 confusion.# in t
d7c0: 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 6f 72 20 65 erminlogy. For e
d7d0: 78 74 65 6e 73 69 6f 6e 73 2c 20 74 68 65 20 22 xtensions, the "
d7e0: 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 install-binaries
d7f0: 22 20 77 61 73 20 75 73 65 64 20 74 6f 0a 23 20 " was used to.#
d800: 6c 6f 63 61 74 65 20 74 61 72 67 65 74 20 64 69 locate target di
d810: 72 65 63 74 6f 72 79 20 66 6f 72 20 2a 62 69 6e rectory for *bin
d820: 61 72 79 20 73 68 61 72 65 64 20 6c 69 62 72 61 ary shared libra
d830: 72 69 65 73 2a 20 61 6e 64 20 74 68 75 73 0a 23 ries* and thus.#
d840: 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 the appropriate
d850: 20 6d 61 63 72 6f 20 69 73 20 4c 49 42 5f 49 4e macro is LIB_IN
d860: 53 54 41 4c 4c 5f 44 49 52 20 73 69 6e 63 65 20 STALL_DIR since
d870: 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 20 BIN_INSTALL_DIR
d880: 69 73 0a 23 20 66 6f 72 20 65 78 65 63 75 74 61 is.# for executa
d890: 62 6c 65 73 20 28 65 78 65 73 29 2e 20 4f 6e 20 bles (exes). On
d8a0: 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 20 74 the other hand t
d8b0: 68 65 20 22 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 he "install-libr
d8c0: 61 72 69 65 73 22 0a 23 20 74 61 72 67 65 74 20 aries".# target
d8d0: 69 73 20 66 6f 72 20 2a 73 63 72 69 70 74 73 2a is for *scripts*
d8e0: 20 61 6e 64 20 73 68 6f 75 6c 64 20 68 61 76 65 and should have
d8f0: 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 22 69 6e been called "in
d900: 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 22 2e 0a stall-scripts"..
d910: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d920: 62 69 6e 61 72 69 65 73 3a 20 24 28 50 52 4a 4c binaries: $(PRJL
d930: 49 42 29 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 IB)..@echo Insta
d940: 6c 6c 69 6e 67 20 62 69 6e 61 72 69 65 73 20 74 lling binaries t
d950: 6f 20 27 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c o '$(LIB_INSTALL
d960: 5f 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 _DIR)'..@if not
d970: 65 78 69 73 74 20 22 24 28 4c 49 42 5f 49 4e 53 exist "$(LIB_INS
d980: 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 TALL_DIR)" mkdir
d990: 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f "$(LIB_INSTALL_
d9a0: 44 49 52 29 22 0a 09 40 24 28 43 50 59 29 20 24 DIR)"..@$(CPY) $
d9b0: 28 50 52 4a 4c 49 42 29 20 22 24 28 4c 49 42 5f (PRJLIB) "$(LIB_
d9c0: 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 3e 4e INSTALL_DIR)" >N
d9d0: 55 4c 0a 0a 23 20 41 6c 69 61 73 20 66 6f 72 20 UL..# Alias for
d9e0: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
d9f0: 73 63 72 69 70 74 73 0a 64 65 66 61 75 6c 74 2d scripts.default-
da00: 69 6e 73 74 61 6c 6c 2d 6c 69 62 72 61 72 69 65 install-librarie
da10: 73 3a 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 s: default-insta
da20: 6c 6c 2d 73 63 72 69 70 74 73 0a 0a 64 65 66 61 ll-scripts..defa
da30: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 69 ult-install-scri
da40: 70 74 73 3a 20 24 28 4f 55 54 5f 44 49 52 29 5c pts: $(OUT_DIR)\
da50: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 pkgIndex.tcl..@e
da60: 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 6c cho Installing l
da70: 69 62 72 61 72 69 65 73 20 74 6f 20 27 24 28 53 ibraries to '$(S
da80: 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 CRIPT_INSTALL_DI
da90: 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 R)'..@if not exi
daa0: 73 74 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 st "$(SCRIPT_INS
dab0: 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 TALL_DIR)" mkdir
dac0: 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 "$(SCRIPT_INSTA
dad0: 4c 4c 5f 44 49 52 29 22 0a 09 40 69 66 20 65 78 LL_DIR)"..@if ex
dae0: 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 24 28 ist $(LIBDIR) $(
daf0: 43 50 59 29 20 24 28 4c 49 42 44 49 52 29 5c 2a CPY) $(LIBDIR)\*
db00: 2e 74 63 6c 20 22 24 28 53 43 52 49 50 54 5f 49 .tcl "$(SCRIPT_I
db10: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 65 NSTALL_DIR)"..@e
db20: 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 20 70 cho Installing p
db30: 61 63 6b 61 67 65 20 69 6e 64 65 78 20 69 6e 20 ackage index in
db40: 27 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c '$(SCRIPT_INSTAL
db50: 4c 5f 44 49 52 29 27 0a 09 40 24 28 43 50 59 29 L_DIR)'..@$(CPY)
db60: 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 $(OUT_DIR)\pkgI
db70: 6e 64 65 78 2e 74 63 6c 20 24 28 53 43 52 49 50 ndex.tcl $(SCRIP
db80: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 0a T_INSTALL_DIR)..
db90: 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d default-install-
dba0: 73 74 75 62 73 3a 0a 09 40 65 63 68 6f 20 49 6e stubs:..@echo In
dbb0: 73 74 61 6c 6c 69 6e 67 20 73 74 75 62 73 20 6c stalling stubs l
dbc0: 69 62 72 61 72 79 20 74 6f 20 27 24 28 53 43 52 ibrary to '$(SCR
dbd0: 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 IPT_INSTALL_DIR)
dbe0: 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 '..@if not exist
dbf0: 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 "$(SCRIPT_INSTA
dc00: 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 LL_DIR)" mkdir "
dc10: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
dc20: 5f 44 49 52 29 22 0a 09 40 24 28 43 50 59 29 20 _DIR)"..@$(CPY)
dc30: 24 28 50 52 4a 53 54 55 42 4c 49 42 29 20 22 24 $(PRJSTUBLIB) "$
dc40: 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f (SCRIPT_INSTALL_
dc50: 44 49 52 29 22 20 3e 4e 55 4c 0a 0a 64 65 66 61 DIR)" >NUL..defa
dc60: 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 ult-install-pdbs
dc70: 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c :..@echo Install
dc80: 69 6e 67 20 50 44 42 73 20 74 6f 20 27 24 28 4c ing PDBs to '$(L
dc90: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 IB_INSTALL_DIR)'
dca0: 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 ..@if not exist
dcb0: 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 "$(LIB_INSTALL_D
dcc0: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 4c 49 IR)" mkdir "$(LI
dcd0: 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a B_INSTALL_DIR)".
dce0: 09 40 24 28 43 50 59 29 20 22 24 28 4f 55 54 5f .@$(CPY) "$(OUT_
dcf0: 44 49 52 29 5c 2a 2e 70 64 62 22 20 22 24 28 4c DIR)\*.pdb" "$(L
dd00: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 5c IB_INSTALL_DIR)\
dd10: 22 0a 0a 23 20 22 65 6d 61 63 73 20 66 6f 6e 74 "..# "emacs font
dd20: 2d 6c 6f 63 6b 20 68 69 67 68 6c 69 67 68 74 69 -lock highlighti
dd30: 6e 67 20 66 69 78 0a 0a 64 65 66 61 75 6c 74 2d ng fix..default-
dd40: 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d 68 74 6d install-docs-htm
dd50: 6c 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 61 6c l:..@echo Instal
dd60: 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 69 ling documentati
dd70: 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 28 44 on files to '$(D
dd80: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 OC_INSTALL_DIR)'
dd90: 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 ..@if not exist
dda0: 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 "$(DOC_INSTALL_D
ddb0: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 4f IR)" mkdir "$(DO
ddc0: 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a C_INSTALL_DIR)".
ddd0: 09 40 69 66 20 65 78 69 73 74 20 24 28 44 4f 43 .@if exist $(DOC
dde0: 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 DIR) for %f in (
ddf0: 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 68 74 6d "$(DOCDIR)\*.htm
de00: 6c 22 20 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e l" "$(DOCDIR)\*.
de10: 63 73 73 22 20 22 24 28 44 4f 43 44 49 52 29 5c css" "$(DOCDIR)\
de20: 2a 2e 70 6e 67 22 29 20 64 6f 20 40 24 28 43 4f *.png") do @$(CO
de30: 50 59 29 20 25 66 20 22 24 28 44 4f 43 5f 49 4e PY) %f "$(DOC_IN
de40: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 0a 64 65 66 STALL_DIR)"..def
de50: 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 ault-install-doc
de60: 73 2d 6e 3a 0a 09 40 65 63 68 6f 20 49 6e 73 74 s-n:..@echo Inst
de70: 61 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 alling documenta
de80: 74 69 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 tion files to '$
de90: 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (DOC_INSTALL_DIR
dea0: 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 )'..@if not exis
deb0: 74 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c t "$(DOC_INSTALL
dec0: 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 _DIR)" mkdir "$(
ded0: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 DOC_INSTALL_DIR)
dee0: 22 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 44 "..@if exist $(D
def0: 4f 43 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e OCDIR) for %f in
df00: 20 28 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 6e ("$(DOCDIR)\*.n
df10: 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 ") do @$(COPY) %
df20: 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c f "$(DOC_INSTALL
df30: 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d _DIR)"..default-
df40: 69 6e 73 74 61 6c 6c 2d 64 65 6d 6f 73 3a 0a 09 install-demos:..
df50: 40 65 63 68 6f 20 49 6e 73 74 61 6c 6c 69 6e 67 @echo Installing
df60: 20 64 65 6d 6f 73 20 74 6f 20 27 24 28 44 45 4d demos to '$(DEM
df70: 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a O_INSTALL_DIR)'.
df80: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 22 .@if not exist "
df90: 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 $(DEMO_INSTALL_D
dfa0: 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 45 IR)" mkdir "$(DE
dfb0: 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 MO_INSTALL_DIR)"
dfc0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 44 45 ..@if exist $(DE
dfd0: 4d 4f 44 49 52 29 20 24 28 43 50 59 44 49 52 29 MODIR) $(CPYDIR)
dfe0: 20 22 24 28 44 45 4d 4f 44 49 52 29 22 20 22 24 "$(DEMODIR)" "$
dff0: 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 (DEMO_INSTALL_DI
e000: 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d 63 6c 65 R)"..default-cle
e010: 61 6e 3a 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e an:..@echo Clean
e020: 69 6e 67 20 24 28 54 4d 50 5f 44 49 52 29 5c 2a ing $(TMP_DIR)\*
e030: 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 .....@if exist
e040: 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 24 $(TMP_DIR)\nul $
e050: 28 52 4d 44 49 52 29 20 24 28 54 4d 50 5f 44 49 (RMDIR) $(TMP_DI
e060: 52 29 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e 69 R)..@echo Cleani
e070: 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d ng $(WIN_DIR)\nm
e080: 61 6b 65 68 6c 70 2e 6f 62 6a 2c 20 6e 6d 61 6b akehlp.obj, nmak
e090: 65 68 6c 70 2e 65 78 65 20 2e 2e 2e 0a 09 40 69 ehlp.exe .....@i
e0a0: 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 f exist $(WIN_DI
e0b0: 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 62 6a 20 R)\nmakehlp.obj
e0c0: 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e del $(WIN_DIR)\n
e0d0: 6d 61 6b 65 68 6c 70 2e 6f 62 6a 0a 09 40 69 66 makehlp.obj..@if
e0e0: 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 exist $(WIN_DIR
e0f0: 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 20 64 )\nmakehlp.exe d
e100: 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d el $(WIN_DIR)\nm
e110: 61 6b 65 68 6c 70 2e 65 78 65 0a 09 40 69 66 20 akehlp.exe..@if
e120: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
e130: 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 20 64 65 \nmakehlp.out de
e140: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 l $(WIN_DIR)\nma
e150: 6b 65 68 6c 70 2e 6f 75 74 0a 09 40 65 63 68 6f kehlp.out..@echo
e160: 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f Cleaning $(WIN_
e170: 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 DIR)\nmhlp-out.t
e180: 78 74 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 xt .....@if exis
e190: 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 t $(WIN_DIR)\nmh
e1a0: 6c 70 2d 6f 75 74 2e 74 78 74 20 64 65 6c 20 24 lp-out.txt del $
e1b0: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d (WIN_DIR)\nmhlp-
e1c0: 6f 75 74 2e 74 78 74 0a 09 40 65 63 68 6f 20 43 out.txt..@echo C
e1d0: 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 leaning $(WIN_DI
e1e0: 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 2e 2e 2e R)\_junk.pch ...
e1f0: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 ..@if exist $(WI
e200: 4e 5f 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 N_DIR)\_junk.pch
e210: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c del $(WIN_DIR)\
e220: 5f 6a 75 6e 6b 2e 70 63 68 0a 09 40 65 63 68 6f _junk.pch..@echo
e230: 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f Cleaning $(WIN_
e240: 44 49 52 29 5c 76 65 72 63 6c 2e 78 2c 20 76 65 DIR)\vercl.x, ve
e250: 72 63 6c 2e 69 20 2e 2e 2e 0a 09 40 69 66 20 65 rcl.i .....@if e
e260: 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c xist $(WIN_DIR)\
e270: 76 65 72 63 6c 2e 78 20 64 65 6c 20 24 28 57 49 vercl.x del $(WI
e280: 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 0a 09 N_DIR)\vercl.x..
e290: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
e2a0: 44 49 52 29 5c 76 65 72 63 6c 2e 69 20 64 65 6c DIR)\vercl.i del
e2b0: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 63 $(WIN_DIR)\verc
e2c0: 6c 2e 69 0a 09 40 65 63 68 6f 20 43 6c 65 61 6e l.i..@echo Clean
e2d0: 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 ing $(WIN_DIR)\v
e2e0: 65 72 73 69 6f 6e 73 2e 76 63 2c 20 76 65 72 73 ersions.vc, vers
e2f0: 69 6f 6e 2e 76 63 20 2e 2e 2e 0a 09 40 69 66 20 ion.vc .....@if
e300: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
e310: 5c 76 65 72 73 69 6f 6e 73 2e 76 63 20 64 65 6c \versions.vc del
e320: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 $(WIN_DIR)\vers
e330: 69 6f 6e 73 2e 76 63 0a 09 40 69 66 20 65 78 69 ions.vc..@if exi
e340: 73 74 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 st $(WIN_DIR)\ve
e350: 72 73 69 6f 6e 2e 76 63 20 64 65 6c 20 24 28 57 rsion.vc del $(W
e360: 49 4e 5f 44 49 52 29 5c 76 65 72 73 69 6f 6e 2e IN_DIR)\version.
e370: 76 63 0a 0a 64 65 66 61 75 6c 74 2d 68 6f 73 65 vc..default-hose
e380: 3a 20 64 65 66 61 75 6c 74 2d 63 6c 65 61 6e 0a : default-clean.
e390: 09 40 65 63 68 6f 20 48 6f 73 69 6e 67 20 24 28 .@echo Hosing $(
e3a0: 4f 55 54 5f 44 49 52 29 5c 2a 20 2e 2e 2e 0a 09 OUT_DIR)\* .....
e3b0: 40 69 66 20 65 78 69 73 74 20 24 28 4f 55 54 5f @if exist $(OUT_
e3c0: 44 49 52 29 5c 6e 75 6c 20 24 28 52 4d 44 49 52 DIR)\nul $(RMDIR
e3d0: 29 20 24 28 4f 55 54 5f 44 49 52 29 0a 0a 23 20 ) $(OUT_DIR)..#
e3e0: 4f 6e 6c 79 20 66 6f 72 20 62 61 63 6b 77 61 72 Only for backwar
e3f0: 64 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 0a d compatibility.
e400: 64 65 66 61 75 6c 74 2d 64 69 73 74 63 6c 65 61 default-distclea
e410: 6e 3a 20 64 65 66 61 75 6c 74 2d 68 6f 73 65 0a n: default-hose.
e420: 0a 64 65 66 61 75 6c 74 2d 73 65 74 75 70 3a 0a .default-setup:.
e430: 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 24 .@if not exist $
e440: 28 4f 55 54 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b (OUT_DIR)\nul mk
e450: 64 69 72 20 24 28 4f 55 54 5f 44 49 52 29 0a 09 dir $(OUT_DIR)..
e460: 40 69 66 20 6e 6f 74 20 65 78 69 73 74 20 24 28 @if not exist $(
e470: 54 4d 50 5f 44 49 52 29 5c 6e 75 6c 20 6d 6b 64 TMP_DIR)\nul mkd
e480: 69 72 20 24 28 54 4d 50 5f 44 49 52 29 0a 0a 21 ir $(TMP_DIR)..!
e490: 69 66 20 22 24 28 54 45 53 54 50 41 54 29 22 20 if "$(TESTPAT)"
e4a0: 21 3d 20 22 22 0a 54 45 53 54 46 4c 41 47 53 20 != "".TESTFLAGS
e4b0: 3d 20 24 28 54 45 53 54 46 4c 41 47 53 29 20 2d = $(TESTFLAGS) -
e4c0: 66 69 6c 65 20 24 28 54 45 53 54 50 41 54 29 0a file $(TESTPAT).
e4d0: 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 2d !endif..default-
e4e0: 74 65 73 74 3a 20 64 65 66 61 75 6c 74 2d 73 65 test: default-se
e4f0: 74 75 70 20 24 28 50 52 4f 4a 45 43 54 29 0a 09 tup $(PROJECT)..
e500: 40 73 65 74 20 54 43 4c 4c 49 42 50 41 54 48 3d @set TCLLIBPATH=
e510: 24 28 4f 55 54 5f 44 49 52 3a 5c 3d 2f 29 0a 09 $(OUT_DIR:\=/)..
e520: 40 69 66 20 65 78 69 73 74 20 24 28 4c 49 42 44 @if exist $(LIBD
e530: 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 28 22 IR) for %f in ("
e540: 24 28 4c 49 42 44 49 52 29 5c 2a 2e 74 63 6c 22 $(LIBDIR)\*.tcl"
e550: 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66 ) do @$(COPY) %f
e560: 20 22 24 28 4f 55 54 5f 44 49 52 29 22 0a 09 63 "$(OUT_DIR)"..c
e570: 64 20 22 24 28 54 45 53 54 44 49 52 29 22 20 26 d "$(TESTDIR)" &
e580: 26 20 24 28 44 45 42 55 47 47 45 52 29 20 24 28 & $(DEBUGGER) $(
e590: 54 43 4c 53 48 29 20 61 6c 6c 2e 74 63 6c 20 24 TCLSH) all.tcl $
e5a0: 28 54 45 53 54 46 4c 41 47 53 29 0a 0a 64 65 66 (TESTFLAGS)..def
e5b0: 61 75 6c 74 2d 73 68 65 6c 6c 3a 20 64 65 66 61 ault-shell: defa
e5c0: 75 6c 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a ult-setup $(PROJ
e5d0: 45 43 54 29 0a 09 40 73 65 74 20 54 43 4c 4c 49 ECT)..@set TCLLI
e5e0: 42 50 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a BPATH=$(OUT_DIR:
e5f0: 5c 3d 2f 29 0a 09 40 69 66 20 65 78 69 73 74 20 \=/)..@if exist
e600: 24 28 4c 49 42 44 49 52 29 20 66 6f 72 20 25 66 $(LIBDIR) for %f
e610: 20 69 6e 20 28 22 24 28 4c 49 42 44 49 52 29 5c in ("$(LIBDIR)\
e620: 2a 2e 74 63 6c 22 29 20 64 6f 20 40 24 28 43 4f *.tcl") do @$(CO
e630: 50 59 29 20 25 66 20 22 24 28 4f 55 54 5f 44 49 PY) %f "$(OUT_DI
e640: 52 29 22 0a 09 24 28 44 45 42 55 47 47 45 52 29 R)"..$(DEBUGGER)
e650: 20 24 28 54 43 4c 53 48 29 0a 0a 23 20 47 65 6e $(TCLSH)..# Gen
e660: 65 72 61 74 69 6f 6e 20 6f 66 20 57 69 6e 64 6f eration of Windo
e670: 77 73 20 76 65 72 73 69 6f 6e 20 72 65 73 6f 75 ws version resou
e680: 72 63 65 0a 21 69 66 64 65 66 20 52 43 46 49 4c rce.!ifdef RCFIL
e690: 45 0a 0a 23 20 4e 6f 74 65 3a 20 64 6f 6e 27 74 E..# Note: don't
e6a0: 20 75 73 65 20 24 2a 2a 20 69 6e 20 62 65 6c 6f use $** in belo
e6b0: 77 20 72 75 6c 65 20 62 65 63 61 75 73 65 20 74 w rule because t
e6c0: 68 65 72 65 20 6d 61 79 20 62 65 20 6f 74 68 65 here may be othe
e6d0: 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 0a 23 r dependencies.#
e6e0: 20 61 6e 64 20 6f 6e 6c 79 20 74 68 65 20 22 6d and only the "m
e6f0: 61 69 6e 22 20 72 63 20 6d 75 73 74 20 62 65 20 ain" rc must be
e700: 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 72 65 passed to the re
e710: 73 6f 75 72 63 65 20 63 6f 6d 70 69 6c 65 72 0a source compiler.
e720: 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f $(TMP_DIR)\$(PRO
e730: 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 52 43 44 JECT).res: $(RCD
e740: 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 IR)\$(PROJECT).r
e750: 63 0a 09 24 28 52 45 53 43 4d 44 29 20 24 28 52 c..$(RESCMD) $(R
e760: 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 CDIR)\$(PROJECT)
e770: 2e 72 63 0a 0a 21 65 6c 73 65 0a 0a 23 20 49 66 .rc..!else..# If
e780: 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 parent makefile
e790: 20 68 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 has not defined
e7a0: 20 61 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 a resource defi
e7b0: 6e 69 74 69 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 nition file,.# w
e7c0: 65 20 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 e will generate
e7d0: 6f 6e 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 one from standar
e7e0: 64 20 74 65 6d 70 6c 61 74 65 2e 0a 24 28 54 4d d template..$(TM
e7f0: 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 P_DIR)\$(PROJECT
e800: 29 2e 72 65 73 3a 20 24 28 54 4d 50 5f 44 49 52 ).res: $(TMP_DIR
e810: 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 0a )\$(PROJECT).rc.
e820: 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 .$(TMP_DIR)\$(PR
e830: 4f 4a 45 43 54 29 2e 72 63 3a 0a 09 40 24 28 43 OJECT).rc:..@$(C
e840: 4f 50 59 29 20 3c 3c 20 24 28 54 4d 50 5f 44 49 OPY) << $(TMP_DI
e850: 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 R)\$(PROJECT).rc
e860: 0a 23 69 6e 63 6c 75 64 65 20 3c 77 69 6e 76 65 .#include <winve
e870: 72 2e 68 3e 0a 0a 56 53 5f 56 45 52 53 49 4f 4e r.h>..VS_VERSION
e880: 5f 49 4e 46 4f 20 56 45 52 53 49 4f 4e 49 4e 46 _INFO VERSIONINF
e890: 4f 0a 20 46 49 4c 45 56 45 52 53 49 4f 4e 09 43 O. FILEVERSION.C
e8a0: 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 50 52 4f OMMAVERSION. PRO
e8b0: 44 55 43 54 56 45 52 53 49 4f 4e 09 43 4f 4d 4d DUCTVERSION.COMM
e8c0: 41 56 45 52 53 49 4f 4e 0a 20 46 49 4c 45 46 4c AVERSION. FILEFL
e8d0: 41 47 53 4d 41 53 4b 09 30 78 33 66 4c 0a 23 69 AGSMASK.0x3fL.#i
e8e0: 66 64 65 66 20 44 45 42 55 47 0a 20 46 49 4c 45 fdef DEBUG. FILE
e8f0: 46 4c 41 47 53 09 56 53 5f 46 46 5f 44 45 42 55 FLAGS.VS_FF_DEBU
e900: 47 0a 23 65 6c 73 65 0a 20 46 49 4c 45 46 4c 41 G.#else. FILEFLA
e910: 47 53 09 30 78 30 4c 0a 23 65 6e 64 69 66 0a 20 GS.0x0L.#endif.
e920: 46 49 4c 45 4f 53 09 09 56 4f 53 5f 4e 54 5f 57 FILEOS..VOS_NT_W
e930: 49 4e 44 4f 57 53 33 32 0a 20 46 49 4c 45 54 59 INDOWS32. FILETY
e940: 50 45 09 56 46 54 5f 44 4c 4c 0a 20 46 49 4c 45 PE.VFT_DLL. FILE
e950: 53 55 42 54 59 50 45 09 30 78 30 4c 0a 42 45 47 SUBTYPE.0x0L.BEG
e960: 49 4e 0a 20 20 20 20 42 4c 4f 43 4b 20 22 53 74 IN. BLOCK "St
e970: 72 69 6e 67 46 69 6c 65 49 6e 66 6f 22 0a 20 20 ringFileInfo".
e980: 20 20 42 45 47 49 4e 0a 09 42 4c 4f 43 4b 20 22 BEGIN..BLOCK "
e990: 30 34 30 39 30 34 62 30 22 0a 09 42 45 47 49 4e 040904b0"..BEGIN
e9a0: 0a 09 20 20 20 20 56 41 4c 55 45 20 22 46 69 6c .. VALUE "Fil
e9b0: 65 44 65 73 63 72 69 70 74 69 6f 6e 22 2c 20 20 eDescription",
e9c0: 22 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 22 "Tcl extension "
e9d0: 20 50 52 4f 4a 45 43 54 0a 09 20 20 20 20 56 41 PROJECT.. VA
e9e0: 4c 55 45 20 22 4f 72 69 67 69 6e 61 6c 46 69 6c LUE "OriginalFil
e9f0: 65 6e 61 6d 65 22 2c 20 50 52 4a 4c 49 42 4e 41 ename", PRJLIBNA
ea00: 4d 45 0a 09 20 20 20 20 56 41 4c 55 45 20 22 46 ME.. VALUE "F
ea10: 69 6c 65 56 65 72 73 69 6f 6e 22 2c 20 20 20 20 ileVersion",
ea20: 20 20 44 4f 54 56 45 52 53 49 4f 4e 0a 09 20 20 DOTVERSION..
ea30: 20 20 56 41 4c 55 45 20 22 50 72 6f 64 75 63 74 VALUE "Product
ea40: 4e 61 6d 65 22 2c 20 20 20 20 20 20 22 50 61 63 Name", "Pac
ea50: 6b 61 67 65 20 22 20 50 52 4f 4a 45 43 54 20 22 kage " PROJECT "
ea60: 20 66 6f 72 20 54 63 6c 22 0a 09 20 20 20 20 56 for Tcl".. V
ea70: 41 4c 55 45 20 22 50 72 6f 64 75 63 74 56 65 72 ALUE "ProductVer
ea80: 73 69 6f 6e 22 2c 20 20 20 44 4f 54 56 45 52 53 sion", DOTVERS
ea90: 49 4f 4e 0a 09 45 4e 44 0a 20 20 20 20 45 4e 44 ION..END. END
eaa0: 0a 20 20 20 20 42 4c 4f 43 4b 20 22 56 61 72 46 . BLOCK "VarF
eab0: 69 6c 65 49 6e 66 6f 22 0a 20 20 20 20 42 45 47 ileInfo". BEG
eac0: 49 4e 0a 09 56 41 4c 55 45 20 22 54 72 61 6e 73 IN..VALUE "Trans
ead0: 6c 61 74 69 6f 6e 22 2c 20 30 78 34 30 39 2c 20 lation", 0x409,
eae0: 31 32 30 30 0a 20 20 20 20 45 4e 44 0a 45 4e 44 1200. END.END
eaf0: 0a 0a 3c 3c 0a 0a 21 65 6e 64 69 66 20 23 20 69 ..<<..!endif # i
eb00: 66 64 65 66 20 52 43 46 49 4c 45 0a 0a 21 69 66 fdef RCFILE..!if
eb10: 6e 64 65 66 20 44 49 53 41 42 4c 45 5f 49 4d 50 ndef DISABLE_IMP
eb20: 4c 49 43 49 54 5f 52 55 4c 45 53 0a 44 49 53 41 LICIT_RULES.DISA
eb30: 42 4c 45 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c BLE_IMPLICIT_RUL
eb40: 45 53 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 ES = 0.!endif..!
eb50: 69 66 20 21 24 28 44 49 53 41 42 4c 45 5f 49 4d if !$(DISABLE_IM
eb60: 50 4c 49 43 49 54 5f 52 55 4c 45 53 29 0a 23 20 PLICIT_RULES).#
eb70: 49 6d 70 6c 69 63 69 74 20 72 75 6c 65 20 64 65 Implicit rule de
eb80: 66 69 6e 69 74 69 6f 6e 73 20 2d 20 6f 6e 6c 79 finitions - only
eb90: 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 6c 69 for building li
eba0: 62 72 61 72 79 20 6f 62 6a 65 63 74 73 2e 20 46 brary objects. F
ebb0: 6f 72 20 73 74 75 62 73 20 61 6e 64 0a 23 20 6d or stubs and.# m
ebc0: 61 69 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 2c ain application,
ebd0: 20 74 68 65 20 6d 61 6b 65 66 69 6c 65 20 73 68 the makefile sh
ebe0: 6f 75 6c 64 20 64 65 66 69 6e 65 20 65 78 70 6c ould define expl
ebf0: 69 63 69 74 20 72 75 6c 65 73 2e 0a 0a 7b 24 28 icit rules...{$(
ec00: 52 4f 4f 54 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 ROOT)}.c{$(TMP_D
ec10: 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 IR)}.obj::..$(CC
ec20: 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c PKGCMD) @<<.$<.<
ec30: 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d 2e <..{$(WIN_DIR)}.
ec40: 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 c{$(TMP_DIR)}.ob
ec50: 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 j::..$(CCPKGCMD)
ec60: 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 47 @<<.$<.<<..{$(G
ec70: 45 4e 45 52 49 43 44 49 52 29 7d 2e 63 7b 24 28 ENERICDIR)}.c{$(
ec80: 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a TMP_DIR)}.obj::.
ec90: 09 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c .$(CCPKGCMD) @<<
eca0: 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 43 4f 4d 50 41 .$<.<<..{$(COMPA
ecb0: 54 44 49 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 TDIR)}.c{$(TMP_D
ecc0: 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 IR)}.obj::..$(CC
ecd0: 50 4b 47 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c PKGCMD) @<<.$<.<
ece0: 3c 0a 0a 7b 24 28 52 43 44 49 52 29 7d 2e 72 63 <..{$(RCDIR)}.rc
ecf0: 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 {$(TMP_DIR)}.res
ed00: 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0a :..$(RESCMD) $<.
ed10: 0a 7b 24 28 57 49 4e 5f 44 49 52 29 7d 2e 72 63 .{$(WIN_DIR)}.rc
ed20: 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 {$(TMP_DIR)}.res
ed30: 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0a :..$(RESCMD) $<.
ed40: 0a 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 63 .{$(TMP_DIR)}.rc
ed50: 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 72 65 73 {$(TMP_DIR)}.res
ed60: 3a 0a 09 24 28 52 45 53 43 4d 44 29 20 24 3c 0a :..$(RESCMD) $<.
ed70: 0a 2e 53 55 46 46 49 58 45 53 3a 0a 2e 53 55 46 ..SUFFIXES:..SUF
ed80: 46 49 58 45 53 3a 2e 63 20 2e 72 63 0a 0a 21 65 FIXES:.c .rc..!e
ed90: 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 23 23 ndif..##########
eda0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
edb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
edc0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
edd0: 23 23 23 23 23 23 0a 23 20 31 34 2e 20 53 61 6e ######.# 14. San
ede0: 69 74 79 20 63 68 65 63 6b 20 73 65 6c 65 63 74 ity check select
edf0: 65 64 20 6f 70 74 69 6f 6e 73 20 61 67 61 69 6e ed options again
ee00: 73 74 20 54 63 6c 20 62 75 69 6c 64 20 6f 70 74 st Tcl build opt
ee10: 69 6f 6e 73 0a 23 20 57 68 65 6e 20 62 75 69 6c ions.# When buil
ee20: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
ee30: 6e 2c 20 63 65 72 74 61 69 6e 20 63 6f 6e 66 69 n, certain confi
ee40: 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 guration options
ee50: 20 73 68 6f 75 6c 64 0a 23 20 6d 61 74 63 68 20 should.# match
ee60: 74 68 65 20 6f 6e 65 73 20 75 73 65 64 20 77 68 the ones used wh
ee70: 65 6e 20 54 63 6c 20 77 61 73 20 62 75 69 6c 74 en Tcl was built
ee80: 2e 20 48 65 72 65 20 77 65 20 63 68 65 63 6b 20 . Here we check
ee90: 61 6e 64 0a 23 20 77 61 72 6e 20 6f 6e 20 61 20 and.# warn on a
eea0: 6d 69 73 6d 61 74 63 68 2e 0a 21 69 66 20 21 24 mismatch..!if !$
eeb0: 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 69 66 (DOING_TCL)..!if
eec0: 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 23 $(TCLINSTALL) #
eed0: 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 Building agains
eee0: 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 54 t an installed T
eef0: 63 6c 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 cl.!if exist("$(
ef00: 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 _TCLDIR)\lib\nma
ef10: 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 29 0a 54 ke\tcl.nmake").T
ef20: 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 20 3d 20 CLNMAKECONFIG =
ef30: 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c "$(_TCLDIR)\lib\
ef40: 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 22 nmake\tcl.nmake"
ef50: 0a 21 65 6e 64 69 66 0a 21 65 6c 73 65 20 23 20 .!endif.!else #
ef60: 21 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 20 2d !$(TCLINSTALL) -
ef70: 20 62 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 building agains
ef80: 74 20 54 63 6c 20 73 6f 75 72 63 65 0a 21 69 66 t Tcl source.!if
ef90: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 exist("$(_TCLDI
efa0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
efb0: 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 RTOP)\tcl.nmake"
efc0: 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 ).TCLNMAKECONFIG
efd0: 09 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 .= "$(_TCLDIR)\w
efe0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
eff0: 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 0a 21 65 6e )\tcl.nmake".!en
f000: 64 69 66 0a 21 65 6e 64 69 66 20 23 20 54 43 4c dif.!endif # TCL
f010: 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 24 28 43 INSTALL..!if $(C
f020: 4f 4e 46 49 47 5f 43 48 45 43 4b 29 0a 21 69 66 ONFIG_CHECK).!if
f030: 64 65 66 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 def TCLNMAKECONF
f040: 49 47 0a 21 69 6e 63 6c 75 64 65 20 24 28 54 43 IG.!include $(TC
f050: 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 29 0a 0a 21 LNMAKECONFIG)..!
f060: 69 66 20 64 65 66 69 6e 65 64 28 43 4f 52 45 5f if defined(CORE_
f070: 4d 41 43 48 49 4e 45 29 20 26 26 20 22 24 28 43 MACHINE) && "$(C
f080: 4f 52 45 5f 4d 41 43 48 49 4e 45 29 22 20 21 3d ORE_MACHINE)" !=
f090: 20 22 24 28 4d 41 43 48 49 4e 45 29 22 0a 21 65 "$(MACHINE)".!e
f0a0: 72 72 6f 72 20 45 52 52 4f 52 3a 20 42 75 69 6c rror ERROR: Buil
f0b0: 64 20 74 61 72 67 65 74 20 28 24 28 4d 41 43 48 d target ($(MACH
f0c0: 49 4e 45 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d INE)) does not m
f0d0: 61 74 63 68 20 74 68 65 20 54 63 6c 20 6c 69 62 atch the Tcl lib
f0e0: 72 61 72 79 20 61 72 63 68 69 74 65 63 74 75 72 rary architectur
f0f0: 65 20 28 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e e ($(CORE_MACHIN
f100: 45 29 29 2e 0a 21 65 6e 64 69 66 0a 21 69 66 20 E))..!endif.!if
f110: 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 3c $(TCL_VERSION) <
f120: 20 38 37 20 26 26 20 64 65 66 69 6e 65 64 28 43 87 && defined(C
f130: 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 ORE_USE_THREAD_A
f140: 4c 4c 4f 43 29 20 26 26 20 24 28 43 4f 52 45 5f LLOC) && $(CORE_
f150: 55 53 45 5f 54 48 52 45 41 44 5f 41 4c 4c 4f 43 USE_THREAD_ALLOC
f160: 29 20 21 3d 20 24 28 55 53 45 5f 54 48 52 45 41 ) != $(USE_THREA
f170: 44 5f 41 4c 4c 4f 43 29 0a 21 6d 65 73 73 61 67 D_ALLOC).!messag
f180: 65 20 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 e WARNING: Value
f190: 20 6f 66 20 55 53 45 5f 54 48 52 45 41 44 5f 41 of USE_THREAD_A
f1a0: 4c 4c 4f 43 20 28 24 28 55 53 45 5f 54 48 52 45 LLOC ($(USE_THRE
f1b0: 41 44 5f 41 4c 4c 4f 43 29 29 20 64 6f 65 73 20 AD_ALLOC)) does
f1c0: 6e 6f 74 20 6d 61 74 63 68 20 69 74 73 20 54 63 not match its Tc
f1d0: 6c 20 63 6f 72 65 20 76 61 6c 75 65 20 28 24 28 l core value ($(
f1e0: 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f CORE_USE_THREAD_
f1f0: 41 4c 4c 4f 43 29 29 2e 0a 21 65 6e 64 69 66 0a ALLOC))..!endif.
f200: 21 69 66 20 64 65 66 69 6e 65 64 28 43 4f 52 45 !if defined(CORE
f210: 5f 44 45 42 55 47 29 20 26 26 20 24 28 43 4f 52 _DEBUG) && $(COR
f220: 45 5f 44 45 42 55 47 29 20 21 3d 20 24 28 44 45 E_DEBUG) != $(DE
f230: 42 55 47 29 0a 21 6d 65 73 73 61 67 65 20 57 41 BUG).!message WA
f240: 52 4e 49 4e 47 3a 20 56 61 6c 75 65 20 6f 66 20 RNING: Value of
f250: 44 45 42 55 47 20 28 24 28 44 45 42 55 47 29 29 DEBUG ($(DEBUG))
f260: 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 does not match
f270: 69 74 73 20 54 63 6c 20 6c 69 62 72 61 72 79 20 its Tcl library
f280: 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 28 24 configuration ($
f290: 28 44 45 42 55 47 29 29 2e 0a 21 65 6e 64 69 66 (DEBUG))..!endif
f2a0: 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 .!endif..!endif
f2b0: 23 20 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 # TCLNMAKECONFIG
f2c0: 0a 0a 21 65 6e 64 69 66 20 23 20 21 24 28 44 4f ..!endif # !$(DO
f2d0: 49 4e 47 5f 54 43 4c 29 0a 0a 0a 23 2d 2d 2d 2d ING_TCL)...#----
f2e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f2f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f300: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f310: 2d 2d 2d 2d 2d 2d 0a 23 20 44 69 73 70 6c 61 79 ------.# Display
f320: 20 73 74 61 74 73 20 62 65 69 6e 67 20 75 73 65 stats being use
f330: 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d d..#------------
f340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f360: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a --------------..
f370: 21 69 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c !if !$(DOING_TCL
f380: 29 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 42 ).!message *** B
f390: 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 uilding against
f3a0: 54 63 6c 20 61 74 20 27 24 28 5f 54 43 4c 44 49 Tcl at '$(_TCLDI
f3b0: 52 29 27 0a 21 65 6e 64 69 66 0a 21 69 66 20 21 R)'.!endif.!if !
f3c0: 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26 20 24 $(DOING_TK) && $
f3d0: 28 4e 45 45 44 5f 54 4b 29 0a 21 6d 65 73 73 61 (NEED_TK).!messa
f3e0: 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69 6e 67 20 ge *** Building
f3f0: 61 67 61 69 6e 73 74 20 54 6b 20 61 74 20 27 24 against Tk at '$
f400: 28 5f 54 4b 44 49 52 29 27 0a 21 65 6e 64 69 66 (_TKDIR)'.!endif
f410: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e .!message *** In
f420: 74 65 72 6d 65 64 69 61 74 65 20 64 69 72 65 63 termediate direc
f430: 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 27 24 28 tory will be '$(
f440: 54 4d 50 5f 44 49 52 29 27 0a 21 6d 65 73 73 61 TMP_DIR)'.!messa
f450: 67 65 20 2a 2a 2a 20 4f 75 74 70 75 74 20 64 69 ge *** Output di
f460: 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 rectory will be
f470: 27 24 28 4f 55 54 5f 44 49 52 29 27 0a 21 6d 65 '$(OUT_DIR)'.!me
f480: 73 73 61 67 65 20 2a 2a 2a 20 49 6e 73 74 61 6c ssage *** Instal
f490: 6c 61 74 69 6f 6e 2c 20 69 66 20 73 65 6c 65 63 lation, if selec
f4a0: 74 65 64 2c 20 77 69 6c 6c 20 62 65 20 69 6e 20 ted, will be in
f4b0: 27 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 27 '$(_INSTALLDIR)'
f4c0: 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 53 75 .!message *** Su
f4d0: 66 66 69 78 20 66 6f 72 20 62 69 6e 61 72 69 65 ffix for binarie
f4e0: 73 20 77 69 6c 6c 20 62 65 20 27 24 28 53 55 46 s will be '$(SUF
f4f0: 58 29 27 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a X)'.!message ***
f500: 20 43 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f Compiler versio
f510: 6e 20 24 28 56 43 56 45 52 29 2e 20 54 61 72 67 n $(VCVER). Targ
f520: 65 74 20 24 28 4d 41 43 48 49 4e 45 29 2c 20 68 et $(MACHINE), h
f530: 6f 73 74 20 24 28 4e 41 54 49 56 45 5f 41 52 43 ost $(NATIVE_ARC
f540: 48 29 2e 0a 0a 21 65 6e 64 69 66 20 23 20 69 66 H)...!endif # if
f550: 64 65 66 20 5f 52 55 4c 45 53 5f 56 43 0a def _RULES_VC.