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: 0a 23 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 20 .# nmakehlp.exe
0400: 74 68 61 74 20 72 75 6e 73 20 6f 6e 20 74 68 65 that runs on the
0410: 20 62 75 69 6c 64 20 61 72 63 68 69 74 65 63 74 build architect
0420: 75 72 65 2e 0a 21 69 66 64 65 66 20 54 43 4c 53 ure..!ifdef TCLS
0430: 48 5f 4e 41 54 49 56 45 0a 21 6d 65 73 73 61 67 H_NATIVE.!messag
0440: 65 20 2a 2a 2a 20 55 73 69 6e 67 20 54 43 4c 53 e *** Using TCLS
0450: 48 5f 4e 41 54 49 56 45 3d 24 28 54 43 4c 53 48 H_NATIVE=$(TCLSH
0460: 5f 4e 41 54 49 56 45 29 0a 21 69 66 6e 64 65 66 _NATIVE).!ifndef
0470: 20 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 NMAKEHLP_NATIVE
0480: 0a 21 69 66 20 5b 24 28 54 43 4c 53 48 5f 4e 41 .!if [$(TCLSH_NA
0490: 54 49 56 45 29 20 66 69 6e 64 5f 6e 6d 61 6b 65 TIVE) find_nmake
04a0: 68 6c 70 2e 74 63 6c 20 24 28 54 43 4c 53 48 5f hlp.tcl $(TCLSH_
04b0: 4e 41 54 49 56 45 29 20 3e 20 66 69 6e 64 5f 6e NATIVE) > find_n
04c0: 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 makehlp.out].!er
04d0: 72 6f 72 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 ror TCLSH_NATIVE
04e0: 20 69 73 20 73 65 74 2c 20 62 75 74 20 75 6e 61 is set, but una
04f0: 62 6c 65 20 74 6f 20 66 69 6e 64 20 61 73 73 6f ble to find asso
0500: 63 69 61 74 65 64 20 6e 6d 61 6b 65 68 6c 70 2e ciated nmakehlp.
0510: 65 78 65 20 6e 65 61 72 62 79 2e 0a 21 65 6c 73 exe nearby..!els
0520: 65 0a 21 69 6e 63 6c 75 64 65 20 66 69 6e 64 5f e.!include find_
0530: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 21 65 6e nmakehlp.out.!en
0540: 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 dif.!endif.!endi
0550: 66 0a 0a 21 69 66 6e 64 65 66 20 4e 4d 41 4b 45 f..!ifndef NMAKE
0560: 48 4c 50 5f 4e 41 54 49 56 45 0a 4e 4d 41 4b 45 HLP_NATIVE.NMAKE
0570: 48 4c 50 5f 4e 41 54 49 56 45 3d 6e 6d 61 6b 65 HLP_NATIVE=nmake
0580: 68 6c 70 0a 21 65 6e 64 69 66 0a 0a 23 20 54 68 hlp.!endif..# Th
0590: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 e following macr
05a0: 6f 73 20 64 65 66 69 6e 65 20 74 68 65 20 76 65 os define the ve
05b0: 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 72 75 6c rsion of the rul
05c0: 65 73 2e 76 63 20 6e 6d 61 6b 65 20 62 75 69 6c es.vc nmake buil
05d0: 64 20 73 79 73 74 65 6d 0a 23 20 46 6f 72 20 6d d system.# For m
05e0: 6f 64 69 66 69 63 61 74 69 6f 6e 73 20 74 68 61 odifications tha
05f0: 74 20 61 72 65 20 6e 6f 74 20 62 61 63 6b 77 61 t are not backwa
0600: 72 64 2d 63 6f 6d 70 61 74 69 62 6c 65 2c 20 79 rd-compatible, y
0610: 6f 75 20 2a 6d 75 73 74 2a 20 63 68 61 6e 67 65 ou *must* change
0620: 0a 23 20 74 68 65 20 6d 61 6a 6f 72 20 76 65 72 .# the major ver
0630: 73 69 6f 6e 2e 0a 52 55 4c 45 53 5f 56 45 52 53 sion..RULES_VERS
0640: 49 4f 4e 5f 4d 41 4a 4f 52 20 3d 20 31 0a 52 55 ION_MAJOR = 1.RU
0650: 4c 45 53 5f 56 45 52 53 49 4f 4e 5f 4d 49 4e 4f LES_VERSION_MINO
0660: 52 20 3d 20 31 38 0a 0a 23 20 54 68 65 20 50 52 R = 18..# The PR
0670: 4f 4a 45 43 54 20 6d 61 63 72 6f 20 6d 75 73 74 OJECT macro must
0680: 20 62 65 20 64 65 66 69 6e 65 64 20 62 79 20 70 be defined by p
0690: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 2e 0a arent makefile..
06a0: 21 69 66 20 22 24 28 50 52 4f 4a 45 43 54 29 22 !if "$(PROJECT)"
06b0: 20 3d 3d 20 22 22 0a 21 65 72 72 6f 72 20 2a 2a == "".!error **
06c0: 2a 20 45 72 72 6f 72 3a 20 4d 61 63 72 6f 20 50 * Error: Macro P
06d0: 52 4f 4a 45 43 54 20 6e 6f 74 20 64 65 66 69 6e ROJECT not defin
06e0: 65 64 21 20 50 6c 65 61 73 65 20 64 65 66 69 6e ed! Please defin
06f0: 65 20 69 74 20 62 65 66 6f 72 65 20 69 6e 63 6c e it before incl
0700: 75 64 69 6e 67 20 72 75 6c 65 73 2e 76 63 0a 21 uding rules.vc.!
0710: 65 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 50 52 endif..!if "$(PR
0720: 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d J_PACKAGE_TCLNAM
0730: 45 29 22 20 3d 3d 20 22 22 0a 50 52 4a 5f 50 41 E)" == "".PRJ_PA
0740: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 20 3d 20 CKAGE_TCLNAME =
0750: 24 28 50 52 4f 4a 45 43 54 29 0a 21 65 6e 64 69 $(PROJECT).!endi
0760: 66 0a 0a 23 20 41 6c 73 6f 20 73 70 65 63 69 61 f..# Also specia
0770: 6c 20 63 61 73 65 20 54 63 6c 20 61 6e 64 20 54 l case Tcl and T
0780: 6b 20 74 6f 20 73 61 76 65 20 73 6f 6d 65 20 74 k to save some t
0790: 79 70 69 6e 67 20 6c 61 74 65 72 0a 44 4f 49 4e yping later.DOIN
07a0: 47 5f 54 43 4c 20 3d 20 30 0a 44 4f 49 4e 47 5f G_TCL = 0.DOING_
07b0: 54 4b 20 20 3d 20 30 0a 21 69 66 20 22 24 28 50 TK = 0.!if "$(P
07c0: 52 4f 4a 45 43 54 29 22 20 3d 3d 20 22 74 63 6c ROJECT)" == "tcl
07d0: 22 0a 44 4f 49 4e 47 5f 54 43 4c 20 3d 20 31 0a ".DOING_TCL = 1.
07e0: 21 65 6c 73 65 69 66 20 22 24 28 50 52 4f 4a 45 !elseif "$(PROJE
07f0: 43 54 29 22 20 3d 3d 20 22 74 6b 22 0a 44 4f 49 CT)" == "tk".DOI
0800: 4e 47 5f 54 4b 20 3d 20 31 0a 21 65 6e 64 69 66 NG_TK = 1.!endif
0810: 0a 0a 21 69 66 6e 64 65 66 20 4e 45 45 44 5f 54 ..!ifndef NEED_T
0820: 4b 0a 23 20 42 61 63 6b 77 61 72 64 73 20 63 6f K.# Backwards co
0830: 6d 70 61 74 69 62 69 6c 69 74 79 0a 21 69 66 64 mpatibility.!ifd
0840: 65 66 20 50 52 4f 4a 45 43 54 5f 52 45 51 55 49 ef PROJECT_REQUI
0850: 52 45 53 5f 54 4b 0a 4e 45 45 44 5f 54 4b 20 3d RES_TK.NEED_TK =
0860: 20 24 28 50 52 4f 4a 45 43 54 5f 52 45 51 55 49 $(PROJECT_REQUI
0870: 52 45 53 5f 54 4b 29 0a 21 65 6c 73 65 0a 4e 45 RES_TK).!else.NE
0880: 45 44 5f 54 4b 20 3d 20 30 0a 21 65 6e 64 69 66 ED_TK = 0.!endif
0890: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 6e 64 65 66 .!endif..!ifndef
08a0: 20 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 NEED_TCL_SOURCE
08b0: 0a 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 .NEED_TCL_SOURCE
08c0: 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 = 0.!endif..!if
08d0: 64 65 66 20 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 def NEED_TK_SOUR
08e0: 43 45 0a 21 69 66 20 24 28 4e 45 45 44 5f 54 4b CE.!if $(NEED_TK
08f0: 5f 53 4f 55 52 43 45 29 0a 4e 45 45 44 5f 54 4b _SOURCE).NEED_TK
0900: 20 3d 20 31 0a 21 65 6e 64 69 66 0a 21 65 6c 73 = 1.!endif.!els
0910: 65 0a 4e 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 e.NEED_TK_SOURCE
0920: 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 23 23 23 = 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 0a 23 20 #############.#
0970: 4e 6d 61 6b 65 20 69 73 20 61 20 70 72 65 74 74 Nmake is a prett
0980: 79 20 77 65 61 6b 20 65 6e 76 69 72 6f 6e 6d 65 y weak environme
0990: 6e 74 20 69 6e 20 73 79 6e 74 61 78 20 61 6e 64 nt in syntax and
09a0: 20 63 61 70 61 62 69 6c 69 74 69 65 73 0a 23 20 capabilities.#
09b0: 73 6f 20 74 68 69 73 20 66 69 6c 65 20 69 73 20 so this file is
09c0: 6e 65 63 65 73 73 61 72 69 6c 79 20 76 65 72 62 necessarily verb
09d0: 6f 73 65 2e 20 49 74 27 73 20 62 72 6f 6b 65 6e ose. It's broken
09e0: 20 64 6f 77 6e 20 69 6e 74 6f 0a 23 20 74 68 65 down into.# the
09f0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 72 74 73 following parts
0a00: 2e 0a 23 0a 23 20 30 2e 20 53 61 6e 69 74 79 20 ..#.# 0. Sanity
0a10: 63 68 65 63 6b 20 74 68 61 74 20 63 6f 6d 70 69 check that compi
0a20: 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 ler environment
0a30: 69 73 20 73 65 74 20 75 70 20 61 6e 64 20 69 6e is set up and in
0a40: 69 74 69 61 6c 69 7a 65 0a 23 20 20 20 20 61 6e itialize.# an
0a50: 79 20 62 75 69 6c 74 2d 69 6e 20 73 65 74 74 69 y built-in setti
0a60: 6e 67 73 20 66 72 6f 6d 20 74 68 65 20 70 61 72 ngs from the par
0a70: 65 6e 74 20 6d 61 6b 65 66 69 6c 65 0a 23 20 31 ent makefile.# 1
0a80: 2e 20 46 69 72 73 74 20 64 65 66 69 6e 65 20 74 . First define t
0a90: 68 65 20 65 78 74 65 72 6e 61 6c 20 74 6f 6f 6c he external tool
0aa0: 73 20 75 73 65 64 20 66 6f 72 20 63 6f 6d 70 69 s used for compi
0ab0: 6c 69 6e 67 2c 20 63 6f 70 79 69 6e 67 20 65 74 ling, copying et
0ac0: 63 2e 0a 23 20 20 20 20 61 73 20 74 68 69 73 20 c..# as this
0ad0: 69 73 20 69 6e 64 65 70 65 6e 64 65 6e 74 20 6f is independent o
0ae0: 66 20 65 76 65 72 79 74 68 69 6e 67 20 65 6c 73 f everything els
0af0: 65 2e 0a 23 20 32 2e 20 46 69 67 75 72 65 20 6f e..# 2. Figure o
0b00: 75 74 20 6f 75 72 20 62 75 69 6c 64 20 73 74 72 ut our build str
0b10: 75 63 74 75 72 65 20 69 6e 20 74 65 72 6d 73 20 ucture in terms
0b20: 6f 66 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 of the directory
0b30: 2c 20 77 68 65 74 68 65 72 0a 23 20 20 20 20 77 , whether.# w
0b40: 65 20 61 72 65 20 62 75 69 6c 64 69 6e 67 20 54 e are building T
0b50: 63 6c 20 6f 72 20 61 6e 20 65 78 74 65 6e 73 69 cl or an extensi
0b60: 6f 6e 2c 20 65 74 63 2e 0a 23 20 33 2e 20 44 65 on, etc..# 3. De
0b70: 74 65 72 6d 69 6e 65 20 74 68 65 20 63 6f 6d 70 termine the comp
0b80: 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 20 iler and linker
0b90: 76 65 72 73 69 6f 6e 73 0a 23 20 34 2e 20 42 75 versions.# 4. Bu
0ba0: 69 6c 64 20 74 68 65 20 6e 6d 61 6b 65 68 6c 70 ild the nmakehlp
0bb0: 20 68 65 6c 70 65 72 20 61 70 70 6c 69 63 61 74 helper applicat
0bc0: 69 6f 6e 0a 23 20 35 2e 20 44 65 74 65 72 6d 69 ion.# 5. Determi
0bd0: 6e 65 20 74 68 65 20 73 75 70 70 6f 72 74 65 64 ne the supported
0be0: 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e compiler option
0bf0: 73 20 61 6e 64 20 66 65 61 74 75 72 65 73 0a 23 s and features.#
0c00: 20 36 2e 20 45 78 74 72 61 63 74 20 54 63 6c 2c 6. Extract Tcl,
0c10: 20 54 6b 2c 20 61 6e 64 20 70 6f 73 73 69 62 6c Tk, and possibl
0c20: 79 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 76 65 y extensions, ve
0c30: 72 73 69 6f 6e 20 6e 75 6d 62 65 72 73 20 66 72 rsion numbers fr
0c40: 6f 6d 20 74 68 65 0a 23 20 20 20 20 68 65 61 64 om the.# head
0c50: 65 72 73 0a 23 20 37 2e 20 50 61 72 73 65 20 74 ers.# 7. Parse t
0c60: 68 65 20 4f 50 54 53 20 6d 61 63 72 6f 20 76 61 he OPTS macro va
0c70: 6c 75 65 20 66 6f 72 20 75 73 65 72 2d 73 70 65 lue for user-spe
0c80: 63 69 66 69 65 64 20 62 75 69 6c 64 20 63 6f 6e cified build con
0c90: 66 69 67 75 72 61 74 69 6f 6e 0a 23 20 38 2e 20 figuration.# 8.
0ca0: 50 61 72 73 65 20 74 68 65 20 53 54 41 54 53 20 Parse the STATS
0cb0: 6d 61 63 72 6f 20 76 61 6c 75 65 20 66 6f 72 20 macro value for
0cc0: 73 74 61 74 69 73 74 69 63 73 20 69 6e 73 74 72 statistics instr
0cd0: 75 6d 65 6e 74 61 74 69 6f 6e 0a 23 20 39 2e 20 umentation.# 9.
0ce0: 50 61 72 73 65 20 74 68 65 20 43 48 45 43 4b 53 Parse the CHECKS
0cf0: 20 6d 61 63 72 6f 20 66 6f 72 20 61 64 64 69 74 macro for addit
0d00: 69 6f 6e 61 6c 20 63 6f 6d 70 69 6c 61 74 69 6f ional compilatio
0d10: 6e 20 63 68 65 63 6b 73 0a 23 20 31 30 2e 20 42 n checks.# 10. B
0d20: 61 73 65 64 20 6f 6e 20 74 68 69 73 20 73 65 6c ased on this sel
0d30: 65 63 74 65 64 20 63 6f 6e 66 69 67 75 72 61 74 ected configurat
0d40: 69 6f 6e 2c 20 63 6f 6e 73 74 72 75 63 74 20 74 ion, construct t
0d50: 68 65 20 6f 75 74 70 75 74 0a 23 20 20 20 20 20 he output.#
0d60: 64 69 72 65 63 74 6f 72 79 20 61 6e 64 20 66 69 directory and fi
0d70: 6c 65 20 70 61 74 68 73 0a 23 20 31 31 2e 20 43 le paths.# 11. C
0d80: 6f 6e 73 74 72 75 63 74 20 74 68 65 20 70 61 74 onstruct the pat
0d90: 68 73 20 77 68 65 72 65 20 74 68 65 20 70 61 63 hs where the pac
0da0: 6b 61 67 65 20 69 73 20 74 6f 20 62 65 20 69 6e kage is to be in
0db0: 73 74 61 6c 6c 65 64 0a 23 20 31 32 2e 20 53 65 stalled.# 12. Se
0dc0: 74 20 75 70 20 74 68 65 20 61 63 74 75 61 6c 20 t up the actual
0dd0: 6f 70 74 69 6f 6e 73 20 70 61 73 73 65 64 20 74 options passed t
0de0: 6f 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c o compiler and l
0df0: 69 6e 6b 65 72 20 62 61 73 65 64 0a 23 20 20 20 inker based.#
0e00: 20 20 6f 6e 20 74 68 65 20 69 6e 66 6f 72 6d 61 on the informa
0e10: 74 69 6f 6e 20 67 61 74 68 65 72 65 64 20 61 62 tion gathered ab
0e20: 6f 76 65 2e 0a 23 20 31 33 2e 20 44 65 66 69 6e ove..# 13. Defin
0e30: 65 20 73 6f 6d 65 20 73 74 61 6e 64 61 72 64 20 e some standard
0e40: 62 75 69 6c 64 20 74 61 72 67 65 74 73 20 61 6e build targets an
0e50: 64 20 69 6d 70 6c 69 63 69 74 20 72 75 6c 65 73 d implicit rules
0e60: 2e 20 54 68 65 73 65 20 6d 61 79 0a 23 20 20 20 . These may.#
0e70: 20 20 62 65 20 6f 70 74 69 6f 6e 61 6c 6c 79 20 be optionally
0e80: 64 69 73 61 62 6c 65 64 20 62 79 20 74 68 65 20 disabled by the
0e90: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 2e parent makefile.
0ea0: 0a 23 20 31 34 2e 20 28 46 6f 72 20 65 78 74 65 .# 14. (For exte
0eb0: 6e 73 69 6f 6e 73 20 6f 6e 6c 79 2e 29 20 43 6f nsions only.) Co
0ec0: 6d 70 61 72 65 20 74 68 65 20 63 6f 6e 66 69 67 mpare the config
0ed0: 75 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 uration of the t
0ee0: 61 72 67 65 74 0a 23 20 20 20 20 20 54 63 6c 20 arget.# Tcl
0ef0: 61 6e 64 20 74 68 65 20 65 78 74 65 6e 73 69 6f and the extensio
0f00: 6e 73 20 61 6e 64 20 77 61 72 6e 20 61 67 61 69 ns and warn agai
0f10: 6e 73 74 20 64 69 73 63 72 65 70 61 6e 63 69 65 nst discrepancie
0f20: 73 2e 0a 23 0a 23 20 4f 6e 65 20 66 69 6e 61 6c s..#.# One final
0f30: 20 6e 6f 74 65 20 61 62 6f 75 74 20 74 68 65 20 note about the
0f40: 6d 61 63 72 6f 20 6e 61 6d 65 73 20 75 73 65 64 macro names used
0f50: 2e 20 54 68 65 79 20 61 72 65 20 61 73 20 74 68 . They are as th
0f60: 65 79 20 61 72 65 0a 23 20 66 6f 72 20 68 69 73 ey are.# for his
0f70: 74 6f 72 69 63 61 6c 20 72 65 61 73 6f 6e 73 2e torical reasons.
0f80: 20 57 65 20 77 6f 75 6c 64 20 6c 69 6b 65 20 6c We would like l
0f90: 65 67 61 63 79 20 65 78 74 65 6e 73 69 6f 6e 73 egacy extensions
0fa0: 20 74 6f 0a 23 20 63 6f 6e 74 69 6e 75 65 20 74 to.# continue t
0fb0: 6f 20 77 6f 72 6b 20 77 69 74 68 20 74 68 69 73 o work with this
0fc0: 20 6d 61 6b 65 20 69 6e 63 6c 75 64 65 20 66 69 make include fi
0fd0: 6c 65 20 73 6f 20 62 65 20 77 61 72 79 20 6f 66 le so be wary of
0fe0: 0a 23 20 63 68 61 6e 67 69 6e 67 20 74 68 65 6d .# changing them
0ff0: 20 66 6f 72 20 63 6f 6e 73 69 73 74 65 6e 63 79 for consistency
1000: 20 6f 72 20 63 6c 61 72 69 74 79 2e 0a 0a 23 20 or clarity...#
1010: 30 2e 20 53 61 6e 69 74 79 20 63 68 65 63 6b 20 0. Sanity check
1020: 63 6f 6d 70 69 6c 65 72 20 65 6e 76 69 72 6f 6e compiler environ
1030: 6d 65 6e 74 0a 0a 23 20 43 68 65 63 6b 20 74 6f ment..# Check to
1040: 20 73 65 65 20 77 65 20 61 72 65 20 63 6f 6e 66 see we are conf
1050: 69 67 75 72 65 64 20 74 6f 20 62 75 69 6c 64 20 igured to build
1060: 77 69 74 68 20 4d 53 56 43 20 28 4d 53 44 45 56 with MSVC (MSDEV
1070: 44 49 52 2c 20 4d 53 56 43 44 49 52 20 6f 72 0a DIR, MSVCDIR or.
1080: 23 20 56 43 49 4e 53 54 41 4c 4c 44 49 52 29 20 # VCINSTALLDIR)
1090: 6f 72 20 77 69 74 68 20 74 68 65 20 4d 53 20 50 or with the MS P
10a0: 6c 61 74 66 6f 72 6d 20 53 44 4b 20 28 4d 53 53 latform SDK (MSS
10b0: 44 4b 20 6f 72 20 57 69 6e 64 6f 77 73 53 44 4b DK or WindowsSDK
10c0: 44 69 72 29 0a 0a 21 69 66 20 21 64 65 66 69 6e Dir)..!if !defin
10d0: 65 64 28 4d 53 44 45 56 44 49 52 29 20 26 26 20 ed(MSDEVDIR) &&
10e0: 21 64 65 66 69 6e 65 64 28 4d 53 56 43 44 49 52 !defined(MSVCDIR
10f0: 29 20 26 26 20 21 64 65 66 69 6e 65 64 28 56 43 ) && !defined(VC
1100: 49 4e 53 54 41 4c 4c 44 49 52 29 20 26 26 20 21 INSTALLDIR) && !
1110: 64 65 66 69 6e 65 64 28 4d 53 53 44 4b 29 20 26 defined(MSSDK) &
1120: 26 20 21 64 65 66 69 6e 65 64 28 57 49 4e 44 4f & !defined(WINDO
1130: 57 53 53 44 4b 44 49 52 29 0a 4d 53 47 20 3d 20 WSSDKDIR).MSG =
1140: 5e 0a 56 69 73 75 61 6c 20 43 2b 2b 20 63 6f 6d ^.Visual C++ com
1150: 70 69 6c 65 72 20 65 6e 76 69 72 6f 6e 6d 65 6e piler environmen
1160: 74 20 6e 6f 74 20 69 6e 69 74 69 61 6c 69 7a 65 t not initialize
1170: 64 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 29 d..!error $(MSG)
1180: 0a 21 65 6e 64 69 66 0a 0a 23 20 57 65 20 6e 65 .!endif..# We ne
1190: 65 64 20 74 6f 20 72 75 6e 20 66 72 6f 6d 20 74 ed to run from t
11a0: 68 65 20 64 69 72 65 63 74 6f 72 79 20 74 68 65 he directory the
11b0: 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 parent makefile
11c0: 20 69 73 20 6c 6f 63 61 74 65 64 20 69 6e 2e 0a is located in..
11d0: 23 20 6e 6d 61 6b 65 20 64 6f 65 73 20 6e 6f 74 # nmake does not
11e0: 20 74 65 6c 6c 20 75 73 20 77 68 61 74 20 6d 61 tell us what ma
11f0: 6b 65 66 69 6c 65 20 77 61 73 20 75 73 65 64 20 kefile was used
1200: 74 6f 20 69 6e 76 6f 6b 65 20 69 74 20 73 6f 20 to invoke it so
1210: 70 61 72 65 6e 74 0a 23 20 6d 61 6b 65 66 69 6c parent.# makefil
1220: 65 20 68 61 73 20 74 6f 20 73 65 74 20 74 68 65 e has to set the
1230: 20 4d 41 4b 45 46 49 4c 45 56 43 20 6d 61 63 72 MAKEFILEVC macr
1240: 6f 20 6f 72 20 77 65 20 6a 75 73 74 20 6d 61 6b o or we just mak
1250: 65 20 61 20 67 75 65 73 73 20 61 6e 64 0a 23 20 e a guess and.#
1260: 77 61 72 6e 20 69 66 20 77 65 20 74 68 69 6e 6b warn if we think
1270: 20 74 68 61 74 20 69 73 20 6e 6f 74 20 74 68 65 that is not the
1280: 20 63 61 73 65 2e 0a 21 69 66 20 22 24 28 4d 41 case..!if "$(MA
1290: 4b 45 46 49 4c 45 56 43 29 22 20 3d 3d 20 22 22 KEFILEVC)" == ""
12a0: 0a 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 50 ..!if exist("$(P
12b0: 52 4f 4a 45 43 54 29 2e 76 63 22 29 0a 4d 41 4b ROJECT).vc").MAK
12c0: 45 46 49 4c 45 56 43 20 3d 20 24 28 50 52 4f 4a EFILEVC = $(PROJ
12d0: 45 43 54 29 2e 76 63 0a 21 65 6c 73 65 69 66 20 ECT).vc.!elseif
12e0: 65 78 69 73 74 28 22 6d 61 6b 65 66 69 6c 65 2e exist("makefile.
12f0: 76 63 22 29 0a 4d 41 4b 45 46 49 4c 45 56 43 20 vc").MAKEFILEVC
1300: 3d 20 6d 61 6b 65 66 69 6c 65 2e 76 63 0a 21 65 = makefile.vc.!e
1310: 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 22 24 ndif.!endif # "$
1320: 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 20 3d 3d (MAKEFILEVC)" ==
1330: 20 22 22 0a 0a 21 69 66 20 21 65 78 69 73 74 28 ""..!if !exist(
1340: 22 24 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 29 "$(MAKEFILEVC)")
1350: 0a 4d 53 47 20 3d 20 5e 0a 59 6f 75 20 6d 75 73 .MSG = ^.You mus
1360: 74 20 72 75 6e 20 6e 6d 61 6b 65 20 66 72 6f 6d t run nmake from
1370: 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 63 the directory c
1380: 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 70 72 ontaining the pr
1390: 6f 6a 65 63 74 20 6d 61 6b 65 66 69 6c 65 2e 5e oject makefile.^
13a0: 0a 49 66 20 79 6f 75 20 61 72 65 20 64 6f 69 6e .If you are doin
13b0: 67 20 74 68 61 74 20 61 6e 64 20 67 65 74 74 69 g that and getti
13c0: 6e 67 20 74 68 69 73 20 6d 65 73 73 61 67 65 2c ng this message,
13d0: 20 73 65 74 20 74 68 65 20 4d 41 4b 45 46 49 4c set the MAKEFIL
13e0: 45 56 43 5e 0a 6d 61 63 72 6f 20 74 6f 20 74 68 EVC^.macro to th
13f0: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 70 72 e name of the pr
1400: 6f 6a 65 63 74 20 6d 61 6b 65 66 69 6c 65 2e 0a oject makefile..
1410: 21 6d 65 73 73 61 67 65 20 57 41 52 4e 49 4e 47 !message WARNING
1420: 3a 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a : $(MSG).!endif.
1430: 0a 0a 23 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 0a 23 20 31 2e 20 44 65 66 69 6e 65 20 65 ##.# 1. Define e
1480: 78 74 65 72 6e 61 6c 20 70 72 6f 67 72 61 6d 73 xternal programs
1490: 20 62 65 69 6e 67 20 75 73 65 64 0a 0a 23 2d 2d 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 0a 23 20 53 65 74 20 74 --------.# Set t
14e0: 68 65 20 70 72 6f 70 65 72 20 63 6f 70 79 20 6d he proper copy m
14f0: 65 74 68 6f 64 20 74 6f 20 61 76 6f 69 64 20 6f ethod to avoid o
1500: 76 65 72 77 72 69 74 65 20 71 75 65 73 74 69 6f verwrite questio
1510: 6e 73 0a 23 20 74 6f 20 74 68 65 20 75 73 65 72 ns.# to the user
1520: 20 77 68 65 6e 20 63 6f 70 79 69 6e 67 20 66 69 when copying fi
1530: 6c 65 73 20 61 6e 64 20 73 65 6c 65 63 74 69 6e les and selectin
1540: 67 20 74 68 65 20 72 69 67 68 74 0a 23 20 22 64 g the right.# "d
1550: 65 6c 65 74 65 20 61 6c 6c 22 20 6d 65 74 68 6f elete all" metho
1560: 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d d..#------------
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 0a 23 --------------.#
15a0: 20 54 63 6c 20 42 75 67 20 62 65 34 30 62 37 33 Tcl Bug be40b73
15b0: 36 3a 20 75 73 65 20 72 64 2f 6d 64 20 69 6e 73 6: use rd/md ins
15c0: 74 65 61 64 20 72 6d 64 69 72 2f 6d 6b 64 69 72 tead rmdir/mkdir
15d0: 2e 0a 23 20 4f 74 68 65 72 77 69 73 65 2c 20 61 ..# Otherwise, a
15e0: 6e 20 65 76 65 6e 74 75 61 6c 20 63 79 67 77 69 n eventual cygwi
15f0: 6e 20 76 65 72 73 69 6f 6e 20 77 69 74 68 20 64 n version with d
1600: 69 66 66 65 72 65 6e 74 0a 23 20 70 61 72 61 6d ifferent.# param
1610: 65 74 65 72 73 20 6d 61 79 20 62 65 20 75 73 65 eters may be use
1620: 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d d..#------------
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 0a 0a --------------..
1660: 52 4d 44 49 52 09 3d 20 72 64 20 2f 53 20 2f 51 RMDIR.= rd /S /Q
1670: 0a 43 50 59 09 3d 20 78 63 6f 70 79 20 2f 69 20 .CPY.= xcopy /i
1680: 2f 79 20 3e 4e 55 4c 0a 43 50 59 44 49 52 20 20 /y >NUL.CPYDIR
1690: 3d 20 78 63 6f 70 79 20 2f 65 20 2f 69 20 2f 79 = xcopy /e /i /y
16a0: 20 3e 4e 55 4c 0a 43 4f 50 59 09 3d 20 63 6f 70 >NUL.COPY.= cop
16b0: 79 20 2f 79 20 3e 4e 55 4c 0a 4d 4b 44 49 52 20 y /y >NUL.MKDIR
16c0: 20 20 3d 20 6d 64 0a 45 43 48 4f 20 20 20 20 3d = md.ECHO =
16d0: 20 69 66 20 22 24 28 56 45 52 42 4f 53 45 29 22 if "$(VERBOSE)"
16e0: 20 3d 3d 20 22 31 22 20 65 63 68 6f 0a 0a 23 23 == "1" echo..##
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 23 ################
1710: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1720: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
1730: 23 23 23 23 0a 23 20 32 2e 20 46 69 67 75 72 65 ####.# 2. Figure
1740: 20 6f 75 74 20 6f 75 72 20 62 75 69 6c 64 20 65 out our build e
1750: 6e 76 69 72 6f 6e 6d 65 6e 74 20 69 6e 20 74 65 nvironment in te
1760: 72 6d 73 20 6f 66 20 77 68 61 74 20 77 65 27 72 rms of what we'r
1770: 65 20 62 75 69 6c 64 69 6e 67 2e 0a 23 0a 23 20 e building..#.#
1780: 28 61 29 20 54 63 6c 20 69 74 73 65 6c 66 0a 23 (a) Tcl itself.#
1790: 20 28 62 29 20 54 6b 0a 23 20 28 63 29 20 61 20 (b) Tk.# (c) a
17a0: 54 63 6c 20 65 78 74 65 6e 73 69 6f 6e 20 75 73 Tcl extension us
17b0: 69 6e 67 20 6c 69 62 72 61 72 69 65 73 2f 69 6e ing libraries/in
17c0: 63 6c 75 64 65 73 20 66 72 6f 6d 20 61 6e 20 2a cludes from an *
17d0: 69 6e 73 74 61 6c 6c 65 64 2a 20 54 63 6c 0a 23 installed* Tcl.#
17e0: 20 28 64 29 20 61 20 54 63 6c 20 65 78 74 65 6e (d) a Tcl exten
17f0: 73 69 6f 6e 20 75 73 69 6e 67 20 6c 69 62 72 61 sion using libra
1800: 72 69 65 73 2f 69 6e 63 6c 75 64 65 73 20 66 72 ries/includes fr
1810: 6f 6d 20 54 63 6c 20 73 6f 75 72 63 65 20 64 69 om Tcl source di
1820: 72 65 63 74 6f 72 79 0a 23 0a 23 20 54 68 69 73 rectory.#.# This
1830: 20 6c 61 73 74 20 69 73 20 6e 65 65 64 65 64 20 last is needed
1840: 62 65 63 61 75 73 65 20 73 6f 6d 65 20 65 78 74 because some ext
1850: 65 6e 73 69 6f 6e 73 20 73 74 69 6c 6c 20 6e 65 ensions still ne
1860: 65 64 0a 23 20 73 6f 6d 65 20 54 63 6c 20 69 6e ed.# some Tcl in
1870: 74 65 72 66 61 63 65 73 20 74 68 61 74 20 61 72 terfaces that ar
1880: 65 20 6e 6f 74 20 70 75 62 6c 69 63 6c 79 20 65 e not publicly e
1890: 78 70 6f 73 65 64 2e 0a 23 0a 23 20 54 68 65 20 xposed..#.# The
18a0: 66 72 61 67 6d 65 6e 74 20 77 69 6c 6c 20 73 65 fragment will se
18b0: 74 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 t the following
18c0: 6d 61 63 72 6f 73 3a 0a 23 20 52 4f 4f 54 20 2d macros:.# ROOT -
18d0: 20 72 6f 6f 74 20 6f 66 20 74 68 69 73 20 6d 6f root of this mo
18e0: 64 75 6c 65 20 73 6f 75 72 63 65 73 0a 23 20 43 dule sources.# C
18f0: 4f 4d 50 41 54 44 49 52 20 2d 20 73 6f 75 72 63 OMPATDIR - sourc
1900: 65 20 64 69 72 65 63 74 6f 72 79 20 74 68 61 74 e directory that
1910: 20 68 6f 6c 64 73 20 63 6f 6d 70 61 74 69 62 69 holds compatibi
1920: 6c 69 74 79 20 73 6f 75 72 63 65 73 0a 23 20 44 lity sources.# D
1930: 4f 43 44 49 52 20 2d 20 73 6f 75 72 63 65 20 64 OCDIR - source d
1940: 69 72 65 63 74 6f 72 79 20 63 6f 6e 74 61 69 6e irectory contain
1950: 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f ing documentatio
1960: 6e 20 66 69 6c 65 73 0a 23 20 47 45 4e 45 52 49 n files.# GENERI
1970: 43 44 49 52 20 2d 20 70 6c 61 74 66 6f 72 6d 2d CDIR - platform-
1980: 69 6e 64 65 70 65 6e 64 65 6e 74 20 73 6f 75 72 independent sour
1990: 63 65 20 64 69 72 65 63 74 6f 72 79 0a 23 20 57 ce directory.# W
19a0: 49 4e 5f 44 49 52 20 2d 20 57 69 6e 64 6f 77 73 IN_DIR - Windows
19b0: 2d 73 70 65 63 69 66 69 63 20 73 6f 75 72 63 65 -specific source
19c0: 20 64 69 72 65 63 74 6f 72 79 0a 23 20 54 45 53 directory.# TES
19d0: 54 44 49 52 20 2d 20 64 69 72 65 63 74 6f 72 79 TDIR - directory
19e0: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 65 73 74 containing test
19f0: 20 66 69 6c 65 73 0a 23 20 54 4f 4f 4c 53 44 49 files.# TOOLSDI
1a00: 52 20 2d 20 64 69 72 65 63 74 6f 72 79 20 63 6f R - directory co
1a10: 6e 74 61 69 6e 69 6e 67 20 62 75 69 6c 64 20 74 ntaining build t
1a20: 6f 6f 6c 73 0a 23 20 5f 54 43 4c 44 49 52 20 2d ools.# _TCLDIR -
1a30: 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 54 63 6c root of the Tcl
1a40: 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 4f 52 installation OR
1a50: 20 74 68 65 20 54 63 6c 20 73 6f 75 72 63 65 73 the Tcl sources
1a60: 2e 20 4e 6f 74 20 73 65 74 0a 23 20 20 20 20 77 . Not set.# w
1a70: 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 63 6c hen building Tcl
1a80: 20 69 74 73 65 6c 66 2e 0a 23 20 5f 49 4e 53 54 itself..# _INST
1a90: 41 4c 4c 44 49 52 20 2d 20 6e 61 74 69 76 65 20 ALLDIR - native
1aa0: 66 6f 72 6d 20 6f 66 20 74 68 65 20 69 6e 73 74 form of the inst
1ab0: 61 6c 6c 61 74 69 6f 6e 20 70 61 74 68 2e 20 46 allation path. F
1ac0: 6f 72 20 54 63 6c 0a 23 20 20 20 20 74 68 69 73 or Tcl.# this
1ad0: 20 77 69 6c 6c 20 62 65 20 74 68 65 20 72 6f 6f will be the roo
1ae0: 74 20 6f 66 20 74 68 65 20 54 63 6c 20 69 6e 73 t of the Tcl ins
1af0: 74 61 6c 6c 61 74 69 6f 6e 2e 20 46 6f 72 20 65 tallation. For e
1b00: 78 74 65 6e 73 69 6f 6e 73 0a 23 20 20 20 20 74 xtensions.# t
1b10: 68 69 73 20 77 69 6c 6c 20 62 65 20 74 68 65 20 his will be the
1b20: 6c 69 62 20 64 69 72 65 63 74 6f 72 79 20 75 6e lib directory un
1b30: 64 65 72 20 74 68 65 20 72 6f 6f 74 2e 0a 23 20 der the root..#
1b40: 54 43 4c 49 4e 53 54 41 4c 4c 20 20 2d 20 73 65 TCLINSTALL - se
1b50: 74 20 74 6f 20 31 20 69 66 20 5f 54 43 4c 44 49 t to 1 if _TCLDI
1b60: 52 20 72 65 66 65 72 73 20 74 6f 0a 23 20 20 20 R refers to.#
1b70: 20 68 65 61 64 65 72 73 20 61 6e 64 20 6c 69 62 headers and lib
1b80: 72 61 72 69 65 73 20 66 72 6f 6d 20 61 6e 20 69 raries from an i
1b90: 6e 73 74 61 6c 6c 65 64 20 54 63 6c 2c 20 61 6e nstalled Tcl, an
1ba0: 64 20 30 20 69 66 20 62 75 69 6c 74 20 61 67 61 d 0 if built aga
1bb0: 69 6e 73 74 0a 23 20 20 20 20 54 63 6c 20 73 6f inst.# Tcl so
1bc0: 75 72 63 65 73 2e 20 4e 6f 74 20 73 65 74 20 77 urces. Not set w
1bd0: 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 54 63 6c hen building Tcl
1be0: 20 69 74 73 65 6c 66 2e 20 59 65 73 2c 20 6e 6f itself. Yes, no
1bf0: 74 20 76 65 72 79 20 77 65 6c 6c 0a 23 20 20 20 t very well.#
1c00: 20 6e 61 6d 65 64 2e 0a 23 20 5f 54 43 4c 5f 48 named..# _TCL_H
1c10: 20 2d 20 6e 61 74 69 76 65 20 70 61 74 68 20 74 - native path t
1c20: 6f 20 74 68 65 20 74 63 6c 2e 68 20 66 69 6c 65 o the tcl.h file
1c30: 0a 23 0a 23 20 49 66 20 54 6b 20 69 73 20 69 6e .#.# If Tk is in
1c40: 76 6f 6c 76 65 64 2c 20 61 6c 73 6f 20 73 65 74 volved, also set
1c50: 73 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 0a s the following.
1c60: 23 20 5f 54 4b 44 49 52 20 2d 20 6e 61 74 69 76 # _TKDIR - nativ
1c70: 65 20 66 6f 72 6d 20 54 6b 20 69 6e 73 74 61 6c e form Tk instal
1c80: 6c 61 74 69 6f 6e 20 4f 52 20 54 6b 20 73 6f 75 lation OR Tk sou
1c90: 72 63 65 2e 20 4e 6f 74 20 73 65 74 20 69 66 20 rce. Not set if
1ca0: 62 75 69 6c 64 69 6e 67 0a 23 20 20 20 20 54 6b building.# Tk
1cb0: 20 69 74 73 65 6c 66 2e 0a 23 20 54 4b 49 4e 53 itself..# TKINS
1cc0: 54 41 4c 4c 20 2d 20 73 65 74 20 31 20 69 66 20 TALL - set 1 if
1cd0: 5f 54 4b 44 49 52 20 72 65 66 65 72 73 20 74 6f _TKDIR refers to
1ce0: 20 69 6e 73 74 61 6c 6c 65 64 20 54 6b 20 61 6e installed Tk an
1cf0: 64 20 30 20 69 66 20 54 6b 20 73 6f 75 72 63 65 d 0 if Tk source
1d00: 73 0a 23 20 5f 54 4b 5f 48 20 2d 20 6e 61 74 69 s.# _TK_H - nati
1d10: 76 65 20 70 61 74 68 20 74 6f 20 74 68 65 20 74 ve path to the t
1d20: 6b 2e 68 20 66 69 6c 65 0a 0a 23 20 52 6f 6f 74 k.h file..# Root
1d30: 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 73 directory for s
1d40: 6f 75 72 63 65 73 20 61 6e 64 20 61 73 73 75 6d ources and assum
1d50: 65 64 20 73 75 62 64 69 72 65 63 74 6f 72 69 65 ed subdirectorie
1d60: 73 0a 52 4f 4f 54 20 3d 20 24 28 4d 41 4b 45 44 s.ROOT = $(MAKED
1d70: 49 52 29 5c 2e 2e 0a 23 20 54 68 65 20 66 6f 6c IR)\...# The fol
1d80: 6c 6f 77 69 6e 67 20 70 61 74 68 73 20 43 41 4e lowing paths CAN
1d90: 4e 4f 54 20 68 61 76 65 20 73 70 61 63 65 73 20 NOT have spaces
1da0: 69 6e 20 74 68 65 6d 20 61 73 20 74 68 65 79 20 in them as they
1db0: 61 70 70 65 61 72 20 6f 6e 20 74 68 65 0a 23 20 appear on the.#
1dc0: 6c 65 66 74 20 73 69 64 65 20 6f 66 20 69 6d 70 left side of imp
1dd0: 6c 69 63 69 74 20 72 75 6c 65 73 2e 0a 21 69 66 licit rules..!if
1de0: 6e 64 65 66 20 43 4f 4d 50 41 54 44 49 52 0a 43 ndef COMPATDIR.C
1df0: 4f 4d 50 41 54 44 49 52 09 3d 20 24 28 52 4f 4f OMPATDIR.= $(ROO
1e00: 54 29 5c 63 6f 6d 70 61 74 0a 21 65 6e 64 69 66 T)\compat.!endif
1e10: 0a 21 69 66 6e 64 65 66 20 44 4f 43 44 49 52 0a .!ifndef DOCDIR.
1e20: 44 4f 43 44 49 52 09 09 3d 20 24 28 52 4f 4f 54 DOCDIR..= $(ROOT
1e30: 29 5c 64 6f 63 0a 21 65 6e 64 69 66 0a 21 69 66 )\doc.!endif.!if
1e40: 6e 64 65 66 20 47 45 4e 45 52 49 43 44 49 52 0a ndef GENERICDIR.
1e50: 47 45 4e 45 52 49 43 44 49 52 09 3d 20 24 28 52 GENERICDIR.= $(R
1e60: 4f 4f 54 29 5c 67 65 6e 65 72 69 63 0a 21 65 6e OOT)\generic.!en
1e70: 64 69 66 0a 21 69 66 6e 64 65 66 20 54 4f 4f 4c dif.!ifndef TOOL
1e80: 53 44 49 52 0a 54 4f 4f 4c 53 44 49 52 09 3d 20 SDIR.TOOLSDIR.=
1e90: 24 28 52 4f 4f 54 29 5c 74 6f 6f 6c 73 0a 21 65 $(ROOT)\tools.!e
1ea0: 6e 64 69 66 0a 21 69 66 6e 64 65 66 20 54 45 53 ndif.!ifndef TES
1eb0: 54 44 49 52 0a 54 45 53 54 44 49 52 09 3d 20 24 TDIR.TESTDIR.= $
1ec0: 28 52 4f 4f 54 29 5c 74 65 73 74 73 0a 21 65 6e (ROOT)\tests.!en
1ed0: 64 69 66 0a 21 69 66 6e 64 65 66 20 4c 49 42 44 dif.!ifndef LIBD
1ee0: 49 52 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 IR.!if exist("$(
1ef0: 52 4f 4f 54 29 5c 6c 69 62 72 61 72 79 22 29 0a ROOT)\library").
1f00: 4c 49 42 44 49 52 20 20 20 20 20 20 20 20 20 20 LIBDIR
1f10: 3d 20 24 28 52 4f 4f 54 29 5c 6c 69 62 72 61 72 = $(ROOT)\librar
1f20: 79 0a 21 65 6c 73 65 0a 4c 49 42 44 49 52 20 20 y.!else.LIBDIR
1f30: 20 20 20 20 20 20 20 20 3d 20 24 28 52 4f 4f 54 = $(ROOT
1f40: 29 5c 6c 69 62 0a 21 65 6e 64 69 66 0a 21 65 6e )\lib.!endif.!en
1f50: 64 69 66 0a 21 69 66 6e 64 65 66 20 44 45 4d 4f dif.!ifndef DEMO
1f60: 44 49 52 0a 21 69 66 20 65 78 69 73 74 28 22 24 DIR.!if exist("$
1f70: 28 4c 49 42 44 49 52 29 5c 64 65 6d 6f 73 22 29 (LIBDIR)\demos")
1f80: 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 28 4c 49 .DEMODIR..= $(LI
1f90: 42 44 49 52 29 5c 64 65 6d 6f 73 0a 21 65 6c 73 BDIR)\demos.!els
1fa0: 65 0a 44 45 4d 4f 44 49 52 09 09 3d 20 24 28 52 e.DEMODIR..= $(R
1fb0: 4f 4f 54 29 5c 64 65 6d 6f 73 0a 21 65 6e 64 69 OOT)\demos.!endi
1fc0: 66 0a 21 65 6e 64 69 66 20 23 20 69 66 6e 64 65 f.!endif # ifnde
1fd0: 66 20 44 45 4d 4f 44 49 52 0a 23 20 44 6f 20 4e f DEMODIR.# Do N
1fe0: 4f 54 20 75 73 65 20 57 49 4e 44 49 52 20 62 65 OT use WINDIR be
1ff0: 63 61 75 73 65 20 69 74 20 69 73 20 57 69 6e 64 cause it is Wind
2000: 6f 77 73 20 69 6e 74 65 72 6e 61 6c 20 65 6e 76 ows internal env
2010: 69 72 6f 6e 6d 65 6e 74 0a 23 20 76 61 72 69 61 ironment.# varia
2020: 62 6c 65 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 ble to point to
2030: 63 3a 5c 77 69 6e 64 6f 77 73 21 0a 57 49 4e 5f c:\windows!.WIN_
2040: 44 49 52 09 09 3d 20 24 28 52 4f 4f 54 29 5c 77 DIR..= $(ROOT)\w
2050: 69 6e 0a 0a 21 69 66 6e 64 65 66 20 52 43 44 49 in..!ifndef RCDI
2060: 52 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 57 R.!if exist("$(W
2070: 49 4e 5f 44 49 52 29 5c 72 63 22 29 0a 52 43 44 IN_DIR)\rc").RCD
2080: 49 52 20 20 20 20 20 20 20 20 20 20 20 3d 20 24 IR = $
2090: 28 57 49 4e 5f 44 49 52 29 5c 72 63 0a 21 65 6c (WIN_DIR)\rc.!el
20a0: 73 65 0a 52 43 44 49 52 20 20 20 20 20 20 20 20 se.RCDIR
20b0: 20 20 20 3d 20 24 28 57 49 4e 5f 44 49 52 29 0a = $(WIN_DIR).
20c0: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 52 43 !endif.!endif.RC
20d0: 44 49 52 20 3d 20 24 28 52 43 44 49 52 3a 2f 3d DIR = $(RCDIR:/=
20e0: 5c 29 0a 0a 23 20 54 68 65 20 74 61 72 67 65 74 \)..# The target
20f0: 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 directory where
2100: 20 74 68 65 20 62 75 69 6c 74 20 70 61 63 6b 61 the built packa
2110: 67 65 73 20 61 6e 64 20 62 69 6e 61 72 69 65 73 ges and binaries
2120: 20 77 69 6c 6c 20 62 65 20 69 6e 73 74 61 6c 6c will be install
2130: 65 64 2e 0a 23 20 49 4e 53 54 41 4c 4c 44 49 52 ed..# INSTALLDIR
2140: 20 69 73 20 74 68 65 20 28 6f 70 74 69 6f 6e 61 is the (optiona
2150: 6c 29 20 70 61 74 68 20 73 70 65 63 69 66 69 65 l) path specifie
2160: 64 20 62 79 20 74 68 65 20 75 73 65 72 2e 0a 23 d by the user..#
2170: 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 73 20 _INSTALLDIR is
2180: 49 4e 53 54 41 4c 4c 44 49 52 20 75 73 69 6e 67 INSTALLDIR using
2190: 20 74 68 65 20 62 61 63 6b 73 6c 61 73 68 20 73 the backslash s
21a0: 65 70 61 72 61 74 6f 72 20 73 79 6e 74 61 78 0a eparator syntax.
21b0: 21 69 66 64 65 66 20 49 4e 53 54 41 4c 4c 44 49 !ifdef INSTALLDI
21c0: 52 0a 23 23 23 20 46 69 78 20 74 68 65 20 70 61 R.### Fix the pa
21d0: 74 68 20 73 65 70 61 72 61 74 6f 72 73 2e 0a 5f th separators.._
21e0: 49 4e 53 54 41 4c 4c 44 49 52 09 3d 20 24 28 49 INSTALLDIR.= $(I
21f0: 4e 53 54 41 4c 4c 44 49 52 3a 2f 3d 5c 29 0a 21 NSTALLDIR:/=\).!
2200: 65 6c 73 65 0a 23 23 23 20 41 73 73 75 6d 65 20 else.### Assume
2210: 74 68 65 20 6e 6f 72 6d 61 6c 20 64 65 66 61 75 the normal defau
2220: 6c 74 2e 0a 5f 49 4e 53 54 41 4c 4c 44 49 52 09 lt.._INSTALLDIR.
2230: 3d 20 24 28 48 4f 4d 45 44 52 49 56 45 29 5c 54 = $(HOMEDRIVE)\T
2240: 63 6c 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 cl.!endif..!if $
2250: 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 23 20 42 (DOING_TCL)..# B
2260: 45 47 49 4e 20 43 61 73 65 20 32 28 61 29 20 2d EGIN Case 2(a) -
2270: 20 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 Building Tcl it
2280: 73 65 6c 66 0a 0a 23 20 4f 6e 6c 79 20 6e 65 65 self..# Only nee
2290: 64 20 74 6f 20 64 65 66 69 6e 65 20 5f 54 43 4c d to define _TCL
22a0: 5f 48 0a 5f 54 43 4c 5f 48 20 3d 20 2e 2e 5c 67 _H._TCL_H = ..\g
22b0: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 0a 23 20 eneric\tcl.h..#
22c0: 45 4e 44 20 43 61 73 65 20 32 28 61 29 20 2d 20 END Case 2(a) -
22d0: 42 75 69 6c 64 69 6e 67 20 54 63 6c 20 69 74 73 Building Tcl its
22e0: 65 6c 66 0a 0a 21 65 6c 73 65 69 66 20 24 28 44 elf..!elseif $(D
22f0: 4f 49 4e 47 5f 54 4b 29 0a 0a 23 20 42 45 47 49 OING_TK)..# BEGI
2300: 4e 20 43 61 73 65 20 32 28 62 29 20 2d 20 42 75 N Case 2(b) - Bu
2310: 69 6c 64 69 6e 67 20 54 6b 0a 0a 54 43 4c 49 4e ilding Tk..TCLIN
2320: 53 54 41 4c 4c 20 3d 20 30 20 23 20 54 6b 20 61 STALL = 0 # Tk a
2330: 6c 77 61 79 73 20 62 75 69 6c 64 73 20 61 67 61 lways builds aga
2340: 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 2c inst Tcl source,
2350: 20 6e 6f 74 20 61 6e 20 69 6e 73 74 61 6c 6c 65 not an installe
2360: 64 20 54 63 6c 0a 21 69 66 20 22 24 28 54 43 4c d Tcl.!if "$(TCL
2370: 44 49 52 29 22 20 3d 3d 20 22 22 0a 21 69 66 20 DIR)" == "".!if
2380: 5b 65 63 68 6f 20 54 43 4c 44 49 52 20 3d 20 5c [echo TCLDIR = \
2390: 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 > nmakehlp.out]
23a0: 5c 0a 20 20 20 7c 7c 20 5b 24 28 4e 4d 41 4b 45 \. || [$(NMAKE
23b0: 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 4c 20 67 HLP_NATIVE) -L g
23c0: 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 eneric\tcl.h >>
23d0: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 nmakehlp.out].!e
23e0: 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e rror *** Could n
23f0: 6f 74 20 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f ot locate Tcl so
2400: 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 2e 0a urce directory..
2410: 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 !endif.!include
2420: 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 21 65 6e nmakehlp.out.!en
2430: 64 69 66 20 23 20 54 43 4c 44 49 52 20 3d 3d 20 dif # TCLDIR ==
2440: 22 22 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 28 "".._TCLDIR.= $(
2450: 54 43 4c 44 49 52 3a 2f 3d 5c 29 0a 5f 54 43 4c TCLDIR:/=\)._TCL
2460: 5f 48 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 _H = $(_TCLDIR)
2470: 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 0a 21 \generic\tcl.h.!
2480: 69 66 20 21 65 78 69 73 74 28 22 24 28 5f 54 43 if !exist("$(_TC
2490: 4c 5f 48 29 22 29 0a 21 65 72 72 6f 72 20 43 6f L_H)").!error Co
24a0: 75 6c 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 74 uld not locate t
24b0: 63 6c 2e 68 2e 20 50 6c 65 61 73 65 20 73 65 74 cl.h. Please set
24c0: 20 74 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 the TCLDIR macr
24d0: 6f 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 o to point to th
24e0: 65 20 54 63 6c 20 2a 73 6f 75 72 63 65 2a 20 64 e Tcl *source* d
24f0: 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e 64 69 66 irectory..!endif
2500: 0a 0a 5f 54 4b 5f 48 20 3d 20 2e 2e 5c 67 65 6e .._TK_H = ..\gen
2510: 65 72 69 63 5c 74 6b 2e 68 0a 0a 23 20 45 4e 44 eric\tk.h..# END
2520: 20 43 61 73 65 20 32 28 62 29 20 2d 20 42 75 69 Case 2(b) - Bui
2530: 6c 64 69 6e 67 20 54 6b 0a 0a 21 65 6c 73 65 0a lding Tk..!else.
2540: 0a 23 20 42 45 47 49 4e 20 43 61 73 65 20 32 28 .# BEGIN Case 2(
2550: 63 29 20 6f 72 20 28 64 29 20 2d 20 42 75 69 6c c) or (d) - Buil
2560: 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 6f ding an extensio
2570: 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 6b 0a n other than Tk.
2580: 0a 23 20 49 66 20 63 6f 6d 6d 61 6e 64 20 6c 69 .# If command li
2590: 6e 65 20 68 61 73 20 73 70 65 63 69 66 69 65 64 ne has specified
25a0: 20 54 63 6c 20 6c 6f 63 61 74 69 6f 6e 20 74 68 Tcl location th
25b0: 72 6f 75 67 68 20 54 43 4c 44 49 52 2c 20 75 73 rough TCLDIR, us
25c0: 65 20 69 74 0a 23 20 65 6c 73 65 20 64 65 66 61 e it.# else defa
25d0: 75 6c 74 20 74 6f 20 74 68 65 20 49 4e 53 54 41 ult to the INSTA
25e0: 4c 4c 44 49 52 20 73 65 74 74 69 6e 67 0a 21 69 LLDIR setting.!i
25f0: 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 21 3d f "$(TCLDIR)" !=
2600: 20 22 22 0a 0a 5f 54 43 4c 44 49 52 09 3d 20 24 "".._TCLDIR.= $
2610: 28 54 43 4c 44 49 52 3a 2f 3d 5c 29 0a 21 69 66 (TCLDIR:/=\).!if
2620: 20 65 78 69 73 74 28 22 24 28 5f 54 43 4c 44 49 exist("$(_TCLDI
2630: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 R)\include\tcl.h
2640: 22 29 20 23 20 43 61 73 65 20 32 28 63 29 20 77 ") # Case 2(c) w
2650: 69 74 68 20 54 43 4c 44 49 52 20 64 65 66 69 6e ith TCLDIR defin
2660: 65 64 0a 54 43 4c 49 4e 53 54 41 4c 4c 09 3d 20 ed.TCLINSTALL.=
2670: 31 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 20 1._TCL_H
2680: 20 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 = $(_TCLDIR)\i
2690: 6e 63 6c 75 64 65 5c 74 63 6c 2e 68 0a 21 65 6c nclude\tcl.h.!el
26a0: 73 65 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 seif exist("$(_T
26b0: 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 CLDIR)\generic\t
26c0: 63 6c 2e 68 22 29 20 23 20 43 61 73 65 20 32 28 cl.h") # Case 2(
26d0: 64 29 20 77 69 74 68 20 54 43 4c 44 49 52 20 64 d) with TCLDIR d
26e0: 65 66 69 6e 65 64 0a 54 43 4c 49 4e 53 54 41 4c efined.TCLINSTAL
26f0: 4c 09 3d 20 30 0a 5f 54 43 4c 5f 48 20 20 20 20 L.= 0._TCL_H
2700: 20 20 20 20 20 20 3d 20 24 28 5f 54 43 4c 44 49 = $(_TCLDI
2710: 52 29 5c 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 R)\generic\tcl.h
2720: 0a 21 65 6e 64 69 66 0a 0a 21 65 6c 73 65 20 20 .!endif..!else
2730: 23 20 20 23 20 43 61 73 65 20 32 28 63 29 20 66 # # Case 2(c) f
2740: 6f 72 20 65 78 74 65 6e 73 69 6f 6e 73 20 77 69 or extensions wi
2750: 74 68 20 54 43 4c 44 49 52 20 75 6e 64 65 66 69 th TCLDIR undefi
2760: 6e 65 64 0a 0a 23 20 4e 65 65 64 20 74 6f 20 6c ned..# Need to l
2770: 6f 63 61 74 65 20 54 63 6c 20 64 65 70 65 6e 64 ocate Tcl depend
2780: 69 6e 67 20 6f 6e 20 77 68 65 74 68 65 72 20 69 ing on whether i
2790: 74 20 6e 65 65 64 73 20 54 63 6c 20 73 6f 75 72 t needs Tcl sour
27a0: 63 65 20 6f 72 20 6e 6f 74 2e 0a 23 20 49 66 20 ce or not..# If
27b0: 77 65 20 64 6f 6e 27 74 2c 20 63 68 65 63 6b 20 we don't, check
27c0: 74 68 65 20 49 4e 53 54 41 4c 4c 44 49 52 20 66 the INSTALLDIR f
27d0: 6f 72 20 61 6e 20 69 6e 73 74 61 6c 6c 65 64 20 or an installed
27e0: 54 63 6c 20 66 69 72 73 74 0a 0a 21 69 66 20 65 Tcl first..!if e
27f0: 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c xist("$(_INSTALL
2800: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 63 6c DIR)\include\tcl
2810: 2e 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f .h") && !$(NEED_
2820: 54 43 4c 5f 53 4f 55 52 43 45 29 0a 0a 54 43 4c TCL_SOURCE)..TCL
2830: 49 4e 53 54 41 4c 4c 09 3d 20 31 0a 54 43 4c 44 INSTALL.= 1.TCLD
2840: 49 52 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 IR = $(
2850: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e 0a _INSTALLDIR)\...
2860: 23 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c 20 # NOTE: we will
2870: 62 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49 4e be resetting _IN
2880: 53 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e 53 STALLDIR to _INS
2890: 54 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 20 TALLDIR/lib for
28a0: 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 6c 61 74 extensions.# lat
28b0: 65 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20 61 63 er so the \.. ac
28c0: 63 6f 75 6e 74 73 20 66 6f 72 20 74 68 65 20 2f counts for the /
28d0: 6c 69 62 0a 5f 54 43 4c 44 49 52 09 09 3d 20 24 lib._TCLDIR..= $
28e0: 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 2e 2e (_INSTALLDIR)\..
28f0: 0a 5f 54 43 4c 5f 48 20 20 20 20 20 20 20 20 20 ._TCL_H
2900: 20 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 69 6e = $(_TCLDIR)\in
2910: 63 6c 75 64 65 5c 74 63 6c 2e 68 0a 0a 21 65 6c clude\tcl.h..!el
2920: 73 65 20 23 20 65 78 69 73 74 28 2e 2e 2e 29 20 se # exist(...)
2930: 26 26 20 21 24 28 4e 45 45 44 5f 54 43 4c 5f 53 && !$(NEED_TCL_S
2940: 4f 55 52 43 45 29 0a 0a 21 69 66 20 5b 65 63 68 OURCE)..!if [ech
2950: 6f 20 5f 54 43 4c 44 49 52 20 3d 20 5c 3e 20 6e o _TCLDIR = \> n
2960: 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 20 5c 0a 20 makehlp.out] \.
2970: 20 20 7c 7c 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 || [$(NMAKEHLP
2980: 5f 4e 41 54 49 56 45 29 20 2d 4c 20 67 65 6e 65 _NATIVE) -L gene
2990: 72 69 63 5c 74 63 6c 2e 68 20 3e 3e 20 6e 6d 61 ric\tcl.h >> nma
29a0: 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 65 72 72 6f kehlp.out].!erro
29b0: 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 r *** Could not
29c0: 6c 6f 63 61 74 65 20 54 63 6c 20 73 6f 75 72 63 locate Tcl sourc
29d0: 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 21 65 6e e directory..!en
29e0: 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e 6d 61 dif.!include nma
29f0: 6b 65 68 6c 70 2e 6f 75 74 0a 54 43 4c 49 4e 53 kehlp.out.TCLINS
2a00: 54 41 4c 4c 20 20 20 20 20 20 3d 20 30 0a 54 43 TALL = 0.TC
2a10: 4c 44 49 52 20 20 20 20 20 20 20 20 20 3d 20 24 LDIR = $
2a20: 28 5f 54 43 4c 44 49 52 29 0a 5f 54 43 4c 5f 48 (_TCLDIR)._TCL_H
2a30: 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 = $(_T
2a40: 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 5c 74 CLDIR)\generic\t
2a50: 63 6c 2e 68 0a 0a 21 65 6e 64 69 66 20 23 20 65 cl.h..!endif # e
2a60: 78 69 73 74 28 2e 2e 2e 29 20 26 26 20 21 24 28 xist(...) && !$(
2a70: 4e 45 45 44 5f 54 43 4c 5f 53 4f 55 52 43 45 29 NEED_TCL_SOURCE)
2a80: 0a 0a 21 65 6e 64 69 66 20 23 20 54 43 4c 44 49 ..!endif # TCLDI
2a90: 52 0a 0a 21 69 66 6e 64 65 66 20 5f 54 43 4c 5f R..!ifndef _TCL_
2aa0: 48 0a 4d 53 47 20 3d 5e 0a 46 61 69 6c 65 64 20 H.MSG =^.Failed
2ab0: 74 6f 20 66 69 6e 64 20 74 63 6c 2e 68 2e 20 54 to find tcl.h. T
2ac0: 68 65 20 54 43 4c 44 49 52 20 6d 61 63 72 6f 20 he TCLDIR macro
2ad0: 69 73 20 73 65 74 20 69 6e 63 6f 72 72 65 63 74 is set incorrect
2ae0: 6c 79 20 6f 72 20 69 73 20 6e 6f 74 20 73 65 74 ly or is not set
2af0: 20 61 6e 64 20 64 65 66 61 75 6c 74 20 70 61 74 and default pat
2b00: 68 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 h does not conta
2b10: 69 6e 20 74 63 6c 2e 68 2e 0a 21 65 72 72 6f 72 in tcl.h..!error
2b20: 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a $(MSG).!endif..
2b30: 23 20 4e 6f 77 20 64 6f 20 74 68 65 20 73 61 6d # Now do the sam
2b40: 65 20 74 6f 20 6c 6f 63 61 74 65 20 54 6b 20 68 e to locate Tk h
2b50: 65 61 64 65 72 73 20 61 6e 64 20 6c 69 62 73 20 eaders and libs
2b60: 69 66 20 70 72 6f 6a 65 63 74 20 72 65 71 75 69 if project requi
2b70: 72 65 73 20 54 6b 0a 21 69 66 20 24 28 4e 45 45 res Tk.!if $(NEE
2b80: 44 5f 54 4b 29 0a 0a 21 69 66 20 22 24 28 54 4b D_TK)..!if "$(TK
2b90: 44 49 52 29 22 20 21 3d 20 22 22 0a 0a 5f 54 4b DIR)" != "".._TK
2ba0: 44 49 52 20 3d 20 24 28 54 4b 44 49 52 3a 2f 3d DIR = $(TKDIR:/=
2bb0: 5c 29 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 \).!if exist("$(
2bc0: 5f 54 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c _TKDIR)\include\
2bd0: 74 6b 2e 68 22 29 0a 54 4b 49 4e 53 54 41 4c 4c tk.h").TKINSTALL
2be0: 20 20 20 20 20 20 3d 20 31 0a 5f 54 4b 5f 48 20 = 1._TK_H
2bf0: 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b = $(_TK
2c00: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e DIR)\include\tk.
2c10: 68 0a 21 65 6c 73 65 69 66 20 65 78 69 73 74 28 h.!elseif exist(
2c20: 22 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 "$(_TKDIR)\gener
2c30: 69 63 5c 74 6b 2e 68 22 29 0a 54 4b 49 4e 53 54 ic\tk.h").TKINST
2c40: 41 4c 4c 20 20 20 20 20 20 3d 20 30 0a 5f 54 4b ALL = 0._TK
2c50: 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 _H = $(
2c60: 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 69 63 5c _TKDIR)\generic\
2c70: 74 6b 2e 68 0a 21 65 6e 64 69 66 0a 0a 21 65 6c tk.h.!endif..!el
2c80: 73 65 20 23 20 54 4b 44 49 52 20 6e 6f 74 20 64 se # TKDIR not d
2c90: 65 66 69 6e 65 64 0a 0a 23 20 4e 65 65 64 20 74 efined..# Need t
2ca0: 6f 20 6c 6f 63 61 74 65 20 54 63 6c 20 64 65 70 o locate Tcl dep
2cb0: 65 6e 64 69 6e 67 20 6f 6e 20 77 68 65 74 68 65 ending on whethe
2cc0: 72 20 69 74 20 6e 65 65 64 73 20 54 63 6c 20 73 r it needs Tcl s
2cd0: 6f 75 72 63 65 20 6f 72 20 6e 6f 74 2e 0a 23 20 ource or not..#
2ce0: 49 66 20 77 65 20 64 6f 6e 27 74 2c 20 63 68 65 If we don't, che
2cf0: 63 6b 20 74 68 65 20 49 4e 53 54 41 4c 4c 44 49 ck the INSTALLDI
2d00: 52 20 66 6f 72 20 61 6e 20 69 6e 73 74 61 6c 6c R for an install
2d10: 65 64 20 54 63 6c 20 66 69 72 73 74 0a 0a 21 69 ed Tcl first..!i
2d20: 66 20 65 78 69 73 74 28 22 24 28 5f 49 4e 53 54 f exist("$(_INST
2d30: 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c ALLDIR)\include\
2d40: 74 6b 2e 68 22 29 20 26 26 20 21 24 28 4e 45 45 tk.h") && !$(NEE
2d50: 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 0a 54 4b D_TK_SOURCE)..TK
2d60: 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 31 INSTALL = 1
2d70: 0a 23 20 4e 4f 54 45 3a 20 77 65 20 77 69 6c 6c .# NOTE: we will
2d80: 20 62 65 20 72 65 73 65 74 74 69 6e 67 20 5f 49 be resetting _I
2d90: 4e 53 54 41 4c 4c 44 49 52 20 74 6f 20 5f 49 4e NSTALLDIR to _IN
2da0: 53 54 41 4c 4c 44 49 52 2f 6c 69 62 20 66 6f 72 STALLDIR/lib for
2db0: 20 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 6c 61 extensions.# la
2dc0: 74 65 72 20 73 6f 20 74 68 65 20 5c 2e 2e 20 61 ter so the \.. a
2dd0: 63 63 6f 75 6e 74 73 20 66 6f 72 20 74 68 65 20 ccounts for the
2de0: 2f 6c 69 62 0a 5f 54 4b 44 49 52 20 20 20 20 20 /lib._TKDIR
2df0: 20 20 20 20 3d 20 24 28 5f 49 4e 53 54 41 4c 4c = $(_INSTALL
2e00: 44 49 52 29 5c 2e 2e 0a 5f 54 4b 5f 48 20 20 20 DIR)\..._TK_H
2e10: 20 20 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 49 = $(_TKDI
2e20: 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e 68 0a R)\include\tk.h.
2e30: 54 4b 44 49 52 20 20 20 20 20 20 20 20 20 20 3d TKDIR =
2e40: 20 24 28 5f 54 4b 44 49 52 29 0a 0a 21 65 6c 73 $(_TKDIR)..!els
2e50: 65 20 23 20 65 78 69 73 74 28 22 24 28 5f 49 4e e # exist("$(_IN
2e60: 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 STALLDIR)\includ
2e70: 65 5c 74 6b 2e 68 22 29 20 26 26 20 21 24 28 4e e\tk.h") && !$(N
2e80: 45 45 44 5f 54 4b 5f 53 4f 55 52 43 45 29 0a 0a EED_TK_SOURCE)..
2e90: 21 69 66 20 5b 65 63 68 6f 20 5f 54 4b 44 49 52 !if [echo _TKDIR
2ea0: 20 3d 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f = \> nmakehlp.o
2eb0: 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b 24 28 4e ut] \. || [$(N
2ec0: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
2ed0: 2d 4c 20 67 65 6e 65 72 69 63 5c 74 6b 2e 68 20 -L generic\tk.h
2ee0: 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d >> nmakehlp.out]
2ef0: 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c .!error *** Coul
2f00: 64 20 6e 6f 74 20 6c 6f 63 61 74 65 20 54 6b 20 d not locate Tk
2f10: 73 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 source directory
2f20: 2e 0a 21 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 ..!endif.!includ
2f30: 65 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 54 e nmakehlp.out.T
2f40: 4b 49 4e 53 54 41 4c 4c 20 20 20 20 20 20 3d 20 KINSTALL =
2f50: 30 0a 54 4b 44 49 52 20 20 20 20 20 20 20 20 20 0.TKDIR
2f60: 20 3d 20 24 28 5f 54 4b 44 49 52 29 0a 5f 54 4b = $(_TKDIR)._TK
2f70: 5f 48 20 20 20 20 20 20 20 20 20 20 3d 20 24 28 _H = $(
2f80: 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 69 63 5c _TKDIR)\generic\
2f90: 74 6b 2e 68 0a 0a 21 65 6e 64 69 66 20 23 20 65 tk.h..!endif # e
2fa0: 78 69 73 74 28 22 24 28 5f 49 4e 53 54 41 4c 4c xist("$(_INSTALL
2fb0: 44 49 52 29 5c 69 6e 63 6c 75 64 65 5c 74 6b 2e DIR)\include\tk.
2fc0: 68 22 29 20 26 26 20 21 24 28 4e 45 45 44 5f 54 h") && !$(NEED_T
2fd0: 4b 5f 53 4f 55 52 43 45 29 0a 0a 21 65 6e 64 69 K_SOURCE)..!endi
2fe0: 66 20 23 20 54 4b 44 49 52 0a 0a 21 69 66 6e 64 f # TKDIR..!ifnd
2ff0: 65 66 20 5f 54 4b 5f 48 0a 4d 53 47 20 3d 5e 0a ef _TK_H.MSG =^.
3000: 46 61 69 6c 65 64 20 74 6f 20 66 69 6e 64 20 74 Failed to find t
3010: 6b 2e 68 2e 20 54 68 65 20 54 4b 44 49 52 20 6d k.h. The TKDIR m
3020: 61 63 72 6f 20 69 73 20 73 65 74 20 69 6e 63 6f acro is set inco
3030: 72 72 65 63 74 6c 79 20 6f 72 20 69 73 20 6e 6f rrectly or is no
3040: 74 20 73 65 74 20 61 6e 64 20 64 65 66 61 75 6c t set and defaul
3050: 74 20 70 61 74 68 20 64 6f 65 73 20 6e 6f 74 20 t path does not
3060: 63 6f 6e 74 61 69 6e 20 74 6b 2e 68 2e 0a 21 65 contain tk.h..!e
3070: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
3080: 69 66 0a 0a 21 65 6e 64 69 66 20 23 20 4e 45 45 if..!endif # NEE
3090: 44 5f 54 4b 0a 0a 21 69 66 20 24 28 4e 45 45 44 D_TK..!if $(NEED
30a0: 5f 54 43 4c 5f 53 4f 55 52 43 45 29 20 26 26 20 _TCL_SOURCE) &&
30b0: 24 28 54 43 4c 49 4e 53 54 41 4c 4c 29 0a 4d 53 $(TCLINSTALL).MS
30c0: 47 20 3d 20 5e 0a 2a 2a 2a 20 57 61 72 6e 69 6e G = ^.*** Warnin
30d0: 67 3a 20 54 68 69 73 20 65 78 74 65 6e 73 69 6f g: This extensio
30e0: 6e 20 72 65 71 75 69 72 65 73 20 74 68 65 20 73 n requires the s
30f0: 6f 75 72 63 65 20 64 69 73 74 72 69 62 75 74 69 ource distributi
3100: 6f 6e 20 6f 66 20 54 63 6c 2e 5e 0a 2a 2a 2a 20 on of Tcl.^.***
3110: 50 6c 65 61 73 65 20 73 65 74 20 74 68 65 20 54 Please set the T
3120: 43 4c 44 49 52 20 6d 61 63 72 6f 20 74 6f 20 70 CLDIR macro to p
3130: 6f 69 6e 74 20 74 6f 20 74 68 65 20 54 63 6c 20 oint to the Tcl
3140: 73 6f 75 72 63 65 73 2e 0a 21 65 72 72 6f 72 20 sources..!error
3150: 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 0a 21 $(MSG).!endif..!
3160: 69 66 20 24 28 4e 45 45 44 5f 54 4b 5f 53 4f 55 if $(NEED_TK_SOU
3170: 52 43 45 29 0a 21 69 66 20 24 28 54 4b 49 4e 53 RCE).!if $(TKINS
3180: 54 41 4c 4c 29 0a 4d 53 47 20 3d 20 5e 0a 2a 2a TALL).MSG = ^.**
3190: 2a 20 57 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 * Warning: This
31a0: 65 78 74 65 6e 73 69 6f 6e 20 72 65 71 75 69 72 extension requir
31b0: 65 73 20 74 68 65 20 73 6f 75 72 63 65 20 64 69 es the source di
31c0: 73 74 72 69 62 75 74 69 6f 6e 20 6f 66 20 54 6b stribution of Tk
31d0: 2e 5e 0a 2a 2a 2a 20 50 6c 65 61 73 65 20 73 65 .^.*** Please se
31e0: 74 20 74 68 65 20 54 4b 44 49 52 20 6d 61 63 72 t the TKDIR macr
31f0: 6f 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 o to point to th
3200: 65 20 54 6b 20 73 6f 75 72 63 65 73 2e 0a 21 65 e Tk sources..!e
3210: 72 72 6f 72 20 24 28 4d 53 47 29 0a 21 65 6e 64 rror $(MSG).!end
3220: 69 66 0a 21 65 6e 64 69 66 0a 0a 0a 23 20 49 66 if.!endif...# If
3230: 20 49 4e 53 54 41 4c 4c 44 49 52 20 73 65 74 20 INSTALLDIR set
3240: 74 6f 20 54 63 6c 20 69 6e 73 74 61 6c 6c 61 74 to Tcl installat
3250: 69 6f 6e 20 72 6f 6f 74 20 64 69 72 20 74 68 65 ion root dir the
3260: 6e 20 72 65 73 65 74 20 74 6f 20 74 68 65 0a 23 n reset to the.#
3270: 20 6c 69 62 20 64 69 72 20 66 6f 72 20 69 6e 73 lib dir for ins
3280: 74 61 6c 6c 69 6e 67 20 65 78 74 65 6e 73 69 6f talling extensio
3290: 6e 73 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 ns.!if exist("$(
32a0: 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c 69 6e 63 _INSTALLDIR)\inc
32b0: 6c 75 64 65 5c 74 63 6c 2e 68 22 29 0a 5f 49 4e lude\tcl.h")._IN
32c0: 53 54 41 4c 4c 44 49 52 3d 24 28 5f 49 4e 53 54 STALLDIR=$(_INST
32d0: 41 4c 4c 44 49 52 29 5c 6c 69 62 0a 21 65 6e 64 ALLDIR)\lib.!end
32e0: 69 66 0a 0a 23 20 45 4e 44 20 43 61 73 65 20 32 if..# END Case 2
32f0: 28 63 29 20 6f 72 20 28 64 29 20 2d 20 42 75 69 (c) or (d) - Bui
3300: 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 6e 73 69 lding an extensi
3310: 6f 6e 0a 21 65 6e 64 69 66 20 23 20 69 66 20 24 on.!endif # if $
3320: 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 23 23 23 (DOING_TCL)..###
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 23 23 23 23 23 23 23 23 ################
3350: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
3360: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 #############.#
3370: 33 2e 20 44 65 74 65 72 6d 69 6e 65 20 63 6f 6d 3. Determine com
3380: 70 69 6c 65 72 20 76 65 72 73 69 6f 6e 20 61 6e piler version an
3390: 64 20 61 72 63 68 69 74 65 63 74 75 72 65 0a 23 d architecture.#
33a0: 20 49 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e In this section
33b0: 2c 20 77 65 20 66 69 67 75 72 65 20 6f 75 74 20 , we figure out
33c0: 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 the compiler ver
33d0: 73 69 6f 6e 20 61 6e 64 20 74 68 65 0a 23 20 61 sion and the.# a
33e0: 72 63 68 69 74 65 63 74 75 72 65 20 66 6f 72 20 rchitecture for
33f0: 77 68 69 63 68 20 77 65 20 61 72 65 20 62 75 69 which we are bui
3400: 6c 64 69 6e 67 2e 20 54 68 69 73 20 73 65 74 73 lding. This sets
3410: 20 74 68 65 0a 23 20 66 6f 6c 6c 6f 77 69 6e 67 the.# following
3420: 20 6d 61 63 72 6f 73 3a 0a 23 20 56 43 56 45 52 macros:.# VCVER
3430: 53 49 4f 4e 20 2d 20 74 68 65 20 69 6e 74 65 72 SION - the inter
3440: 6e 61 6c 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 nal compiler ver
3450: 73 69 6f 6e 20 61 73 20 31 32 30 30 2c 20 31 34 sion as 1200, 14
3460: 30 30 2c 20 31 39 31 30 20 65 74 63 2e 0a 23 20 00, 1910 etc..#
3470: 20 20 20 20 54 68 69 73 20 69 73 20 61 6c 73 6f This is also
3480: 20 70 72 69 6e 74 65 64 20 62 79 20 74 68 65 20 printed by the
3490: 63 6f 6d 70 69 6c 65 72 20 69 6e 20 64 6f 74 74 compiler in dott
34a0: 65 64 20 66 6f 72 6d 20 31 39 2e 31 30 20 65 74 ed form 19.10 et
34b0: 63 2e 0a 23 20 56 43 56 45 52 20 2d 20 74 68 65 c..# VCVER - the
34c0: 20 22 6d 61 72 6b 65 74 69 6e 67 20 76 65 72 73 "marketing vers
34d0: 69 6f 6e 22 2c 20 66 6f 72 20 65 78 61 6d 70 6c ion", for exampl
34e0: 65 20 56 69 73 75 61 6c 20 43 2b 2b 20 36 20 66 e Visual C++ 6 f
34f0: 6f 72 20 69 6e 74 65 72 6e 61 6c 0a 23 20 20 20 or internal.#
3500: 20 20 63 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 compiler versi
3510: 6f 6e 20 31 32 30 30 2e 20 54 68 69 73 20 69 73 on 1200. This is
3520: 20 6b 65 70 74 20 6f 6e 6c 79 20 66 6f 72 20 6c kept only for l
3530: 65 67 61 63 79 20 72 65 61 73 6f 6e 73 20 61 73 egacy reasons as
3540: 20 69 74 0a 23 20 20 20 20 20 64 6f 65 73 20 6e it.# does n
3550: 6f 74 20 6d 61 6b 65 20 73 65 6e 73 65 20 66 6f ot make sense fo
3560: 72 20 72 65 63 65 6e 74 20 4d 69 63 72 6f 73 6f r recent Microso
3570: 66 74 20 63 6f 6d 70 69 6c 65 72 73 2e 20 4f 6e ft compilers. On
3580: 6c 79 20 75 73 65 64 20 66 6f 72 0a 23 20 20 20 ly used for.#
3590: 20 20 6f 75 74 70 75 74 20 64 69 72 65 63 74 6f output directo
35a0: 72 79 20 6e 61 6d 65 73 2e 0a 23 20 41 52 43 48 ry names..# ARCH
35b0: 20 2d 20 73 65 74 20 74 6f 20 49 58 38 36 2c 20 - set to IX86,
35c0: 41 52 4d 36 34 20 6f 72 20 41 4d 44 36 34 20 64 ARM64 or AMD64 d
35d0: 65 70 65 6e 64 69 6e 67 20 6f 6e 20 33 32 2d 20 epending on 32-
35e0: 6f 72 20 36 34 2d 62 69 74 20 74 61 72 67 65 74 or 64-bit target
35f0: 0a 23 20 4e 41 54 49 56 45 5f 41 52 43 48 20 2d .# NATIVE_ARCH -
3600: 20 73 65 74 20 74 6f 20 49 58 38 36 2c 20 41 52 set to IX86, AR
3610: 4d 36 34 20 6f 72 20 41 4d 44 36 34 20 66 6f 72 M64 or AMD64 for
3620: 20 74 68 65 20 68 6f 73 74 20 6d 61 63 68 69 6e the host machin
3630: 65 0a 23 20 4d 41 43 48 49 4e 45 20 2d 20 73 61 e.# MACHINE - sa
3640: 6d 65 20 61 73 20 24 28 41 52 43 48 29 20 2d 20 me as $(ARCH) -
3650: 6c 65 67 61 63 79 0a 23 20 5f 56 43 5f 4d 41 4e legacy.# _VC_MAN
3660: 49 46 45 53 54 5f 45 4d 42 45 44 5f 7b 44 4c 4c IFEST_EMBED_{DLL
3670: 2c 45 58 45 7d 20 2d 20 63 6f 6d 6d 61 6e 64 73 ,EXE} - commands
3680: 20 66 6f 72 20 65 6d 62 65 64 64 69 6e 67 20 61 for embedding a
3690: 20 6d 61 6e 69 66 65 73 74 20 69 66 20 6e 65 65 manifest if nee
36a0: 64 65 64 0a 0a 63 63 33 32 09 09 3d 20 24 28 43 ded..cc32..= $(C
36b0: 43 29 20 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 C) # built-in
36c0: 64 65 66 61 75 6c 74 2e 0a 6c 69 6e 6b 33 32 09 default..link32.
36d0: 09 3d 20 6c 69 6e 6b 0a 6c 69 62 33 32 09 09 3d .= link.lib32..=
36e0: 20 6c 69 62 0a 72 63 33 32 09 09 3d 20 24 28 52 lib.rc32..= $(R
36f0: 43 29 20 20 20 23 20 62 75 69 6c 74 2d 69 6e 20 C) # built-in
3700: 64 65 66 61 75 6c 74 2e 0a 0a 23 2d 2d 2d 2d 2d default...#-----
3710: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3720: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3730: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3740: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 46 69 -----------.# Fi
3750: 67 75 72 65 20 6f 75 74 20 74 68 65 20 63 6f 6d gure out the com
3760: 70 69 6c 65 72 20 61 72 63 68 69 74 65 63 74 75 piler architectu
3770: 72 65 20 61 6e 64 20 76 65 72 73 69 6f 6e 20 62 re and version b
3780: 79 20 77 72 69 74 69 6e 67 0a 23 20 74 68 65 20 y writing.# the
3790: 43 20 6d 61 63 72 6f 73 20 74 6f 20 61 20 66 69 C macros to a fi
37a0: 6c 65 2c 20 70 72 65 70 72 6f 63 65 73 73 69 6e le, preprocessin
37b0: 67 20 74 68 65 6d 20 77 69 74 68 20 74 68 65 20 g them with the
37c0: 43 0a 23 20 70 72 65 70 72 6f 63 65 73 73 6f 72 C.# preprocessor
37d0: 20 61 6e 64 20 72 65 61 64 69 6e 67 20 62 61 63 and reading bac
37e0: 6b 20 74 68 65 20 63 72 65 61 74 65 64 20 66 69 k the created fi
37f0: 6c 65 0a 0a 5f 48 41 53 48 3d 5e 23 0a 5f 56 43 le.._HASH=^#._VC
3800: 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 5f _MANIFEST_EMBED_
3810: 45 58 45 3d 0a 5f 56 43 5f 4d 41 4e 49 46 45 53 EXE=._VC_MANIFES
3820: 54 5f 45 4d 42 45 44 5f 44 4c 4c 3d 0a 56 43 56 T_EMBED_DLL=.VCV
3830: 45 52 3d 30 0a 21 69 66 20 21 5b 65 63 68 6f 20 ER=0.!if ![echo
3840: 56 43 56 45 52 53 49 4f 4e 3d 5f 4d 53 43 5f 56 VCVERSION=_MSC_V
3850: 45 52 20 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a ER > vercl.x] \.
3860: 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28 && ![echo $(
3870: 5f 48 41 53 48 29 69 66 20 64 65 66 69 6e 65 64 _HASH)if defined
3880: 28 5f 4d 5f 49 58 38 36 29 20 3e 3e 20 76 65 72 (_M_IX86) >> ver
3890: 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 21 cl.x] \. && !
38a0: 5b 65 63 68 6f 20 41 52 43 48 3d 49 58 38 36 20 [echo ARCH=IX86
38b0: 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 >> vercl.x] \.
38c0: 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28 5f 48 && ![echo $(_H
38d0: 41 53 48 29 65 6c 69 66 20 64 65 66 69 6e 65 64 ASH)elif defined
38e0: 28 5f 4d 5f 41 4d 44 36 34 29 20 3e 3e 20 76 65 (_M_AMD64) >> ve
38f0: 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 26 20 rcl.x] \. &&
3900: 21 5b 65 63 68 6f 20 41 52 43 48 3d 41 4d 44 36 ![echo ARCH=AMD6
3910: 34 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 4 >> vercl.x] \.
3920: 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 24 28 && ![echo $(
3930: 5f 48 41 53 48 29 65 6c 69 66 20 64 65 66 69 6e _HASH)elif defin
3940: 65 64 28 5f 4d 5f 41 52 4d 36 34 29 20 3e 3e 20 ed(_M_ARM64) >>
3950: 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 26 vercl.x] \. &
3960: 26 20 21 5b 65 63 68 6f 20 41 52 43 48 3d 41 52 & ![echo ARCH=AR
3970: 4d 36 34 20 3e 3e 20 76 65 72 63 6c 2e 78 5d 20 M64 >> vercl.x]
3980: 5c 0a 20 20 20 20 26 26 20 21 5b 65 63 68 6f 20 \. && ![echo
3990: 24 28 5f 48 41 53 48 29 65 6e 64 69 66 20 3e 3e $(_HASH)endif >>
39a0: 20 76 65 72 63 6c 2e 78 5d 20 5c 0a 20 20 20 20 vercl.x] \.
39b0: 26 26 20 21 5b 24 28 63 63 33 32 29 20 2d 6e 6f && ![$(cc32) -no
39c0: 6c 6f 67 6f 20 2d 54 43 20 2d 50 20 76 65 72 63 logo -TC -P verc
39d0: 6c 2e 78 20 32 3e 4e 55 4c 5d 0a 21 69 6e 63 6c l.x 2>NUL].!incl
39e0: 75 64 65 20 76 65 72 63 6c 2e 69 0a 21 69 66 20 ude vercl.i.!if
39f0: 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3c 20 31 $(VCVERSION) < 1
3a00: 39 30 30 0a 21 69 66 20 21 5b 65 63 68 6f 20 56 900.!if ![echo V
3a10: 43 56 45 52 3d 20 5e 5c 3e 20 76 65 72 63 6c 2e CVER= ^\> vercl.
3a20: 76 63 5d 20 5c 0a 20 20 20 20 26 26 20 21 5b 73 vc] \. && ![s
3a30: 65 74 20 2f 61 20 24 28 56 43 56 45 52 53 49 4f et /a $(VCVERSIO
3a40: 4e 29 20 2f 20 31 30 30 20 2d 20 36 20 3e 3e 20 N) / 100 - 6 >>
3a50: 76 65 72 63 6c 2e 76 63 5d 0a 21 69 6e 63 6c 75 vercl.vc].!inclu
3a60: 64 65 20 76 65 72 63 6c 2e 76 63 0a 21 65 6e 64 de vercl.vc.!end
3a70: 69 66 0a 21 65 6c 73 65 0a 23 20 54 68 65 20 73 if.!else.# The s
3a80: 69 6d 70 6c 65 20 63 61 6c 63 75 6c 61 74 69 6f imple calculatio
3a90: 6e 20 61 62 6f 76 65 20 64 6f 65 73 20 6e 6f 74 n above does not
3aa0: 20 61 70 70 6c 79 20 74 6f 20 6e 65 77 20 56 69 apply to new Vi
3ab0: 73 75 61 6c 20 53 74 75 64 69 6f 20 72 65 6c 65 sual Studio rele
3ac0: 61 73 65 73 0a 23 20 4b 65 65 70 20 74 68 65 20 ases.# Keep the
3ad0: 63 6f 6d 70 69 6c 65 72 20 76 65 72 73 69 6f 6e compiler version
3ae0: 20 69 6e 20 69 74 73 20 6e 61 74 69 76 65 20 66 in its native f
3af0: 6f 72 6d 2e 0a 56 43 56 45 52 20 3d 20 24 28 56 orm..VCVER = $(V
3b00: 43 56 45 52 53 49 4f 4e 29 0a 21 65 6e 64 69 66 CVERSION).!endif
3b10: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 21 5b 64 .!endif..!if ![d
3b20: 65 6c 20 32 3e 4e 55 4c 20 2f 71 2f 66 20 76 65 el 2>NUL /q/f ve
3b30: 72 63 6c 2e 78 20 76 65 72 63 6c 2e 69 20 76 65 rcl.x vercl.i ve
3b40: 72 63 6c 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 0a rcl.vc].!endif..
3b50: 23 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 2d 2d 2d 2d ----------------
3b70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3b80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3b90: 2d 0a 23 20 54 68 65 20 4d 41 43 48 49 4e 45 20 -.# The MACHINE
3ba0: 6d 61 63 72 6f 20 69 73 20 75 73 65 64 20 62 79 macro is used by
3bb0: 20 6c 65 67 61 63 79 20 6d 61 6b 65 66 69 6c 65 legacy makefile
3bc0: 73 20 73 6f 20 73 65 74 20 69 74 20 61 73 20 77 s so set it as w
3bd0: 65 6c 6c 0a 21 69 66 64 65 66 20 4d 41 43 48 49 ell.!ifdef MACHI
3be0: 4e 45 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e NE.!if "$(MACHIN
3bf0: 45 29 22 20 3d 3d 20 22 78 38 36 22 0a 21 75 6e E)" == "x86".!un
3c00: 64 65 66 20 4d 41 43 48 49 4e 45 0a 4d 41 43 48 def MACHINE.MACH
3c10: 49 4e 45 20 3d 20 49 58 38 36 0a 21 65 6c 73 65 INE = IX86.!else
3c20: 69 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 if "$(MACHINE)"
3c30: 3d 3d 20 22 61 72 6d 36 34 22 0a 21 75 6e 64 65 == "arm64".!unde
3c40: 66 20 4d 41 43 48 49 4e 45 0a 4d 41 43 48 49 4e f MACHINE.MACHIN
3c50: 45 20 3d 20 41 52 4d 36 34 0a 21 65 6c 73 65 69 E = ARM64.!elsei
3c60: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
3c70: 3d 20 22 78 36 34 22 0a 21 75 6e 64 65 66 20 4d = "x64".!undef M
3c80: 41 43 48 49 4e 45 0a 4d 41 43 48 49 4e 45 20 3d ACHINE.MACHINE =
3c90: 20 41 4d 44 36 34 0a 21 65 6e 64 69 66 0a 21 69 AMD64.!endif.!i
3ca0: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 21 f "$(MACHINE)" !
3cb0: 3d 20 22 24 28 41 52 43 48 29 22 0a 21 65 72 72 = "$(ARCH)".!err
3cc0: 6f 72 20 53 70 65 63 69 66 69 65 64 20 4d 41 43 or Specified MAC
3cd0: 48 49 4e 45 20 6d 61 63 72 6f 20 24 28 4d 41 43 HINE macro $(MAC
3ce0: 48 49 4e 45 29 20 64 6f 65 73 20 6e 6f 74 20 6d HINE) does not m
3cf0: 61 74 63 68 20 64 65 74 65 63 74 65 64 20 74 61 atch detected ta
3d00: 72 67 65 74 20 61 72 63 68 69 74 65 63 74 75 72 rget architectur
3d10: 65 20 24 28 41 52 43 48 29 2e 0a 21 65 6e 64 69 e $(ARCH)..!endi
3d20: 66 0a 21 65 6c 73 65 0a 4d 41 43 48 49 4e 45 3d f.!else.MACHINE=
3d30: 24 28 41 52 43 48 29 0a 21 65 6e 64 69 66 0a 0a $(ARCH).!endif..
3d40: 23 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 2d 2d 2d 2d 2d ----------------
3d60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3d80: 0a 23 20 54 68 65 20 50 4c 41 54 46 4f 52 4d 5f .# The PLATFORM_
3d90: 49 44 45 4e 54 49 46 59 20 6d 61 63 72 6f 20 6d IDENTIFY macro m
3da0: 61 74 63 68 65 73 20 74 68 65 20 76 61 6c 75 65 atches the value
3db0: 73 20 72 65 74 75 72 6e 65 64 20 62 79 0a 23 20 s returned by.#
3dc0: 74 68 65 20 54 63 6c 20 70 6c 61 74 66 6f 72 6d the Tcl platform
3dd0: 3a 3a 69 64 65 6e 74 69 66 79 20 63 6f 6d 6d 61 ::identify comma
3de0: 6e 64 0a 21 69 66 20 22 24 28 4d 41 43 48 49 4e nd.!if "$(MACHIN
3df0: 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 0a 50 E)" == "AMD64".P
3e00: 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 LATFORM_IDENTIFY
3e10: 20 3d 20 77 69 6e 33 32 2d 78 38 36 5f 36 34 0a = win32-x86_64.
3e20: 21 65 6c 73 65 69 66 20 22 24 28 4d 41 43 48 49 !elseif "$(MACHI
3e30: 4e 45 29 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a NE)" == "ARM64".
3e40: 50 4c 41 54 46 4f 52 4d 5f 49 44 45 4e 54 49 46 PLATFORM_IDENTIF
3e50: 59 20 3d 20 77 69 6e 33 32 2d 61 72 6d 0a 21 65 Y = win32-arm.!e
3e60: 6c 73 65 0a 50 4c 41 54 46 4f 52 4d 5f 49 44 45 lse.PLATFORM_IDE
3e70: 4e 54 49 46 59 20 3d 20 77 69 6e 33 32 2d 69 78 NTIFY = win32-ix
3e80: 38 36 0a 21 65 6e 64 69 66 0a 0a 23 20 54 68 65 86.!endif..# The
3e90: 20 4d 55 4c 54 49 50 4c 41 54 46 4f 52 4d 20 6d MULTIPLATFORM m
3ea0: 61 63 72 6f 20 63 6f 6e 74 72 6f 6c 73 20 77 68 acro controls wh
3eb0: 65 74 68 65 72 20 62 69 6e 61 72 79 20 65 78 74 ether binary ext
3ec0: 65 6e 73 69 6f 6e 73 20 61 72 65 20 69 6e 73 74 ensions are inst
3ed0: 61 6c 6c 65 64 0a 23 20 69 6e 20 70 6c 61 74 66 alled.# in platf
3ee0: 6f 72 6d 2d 73 70 65 63 69 66 69 63 20 64 69 72 orm-specific dir
3ef0: 65 63 74 6f 72 69 65 73 2e 20 49 6e 74 65 6e 64 ectories. Intend
3f00: 65 64 20 74 6f 20 62 65 20 73 65 74 2f 75 73 65 ed to be set/use
3f10: 64 20 62 79 20 65 78 74 65 6e 73 69 6f 6e 73 2e d by extensions.
3f20: 0a 21 69 66 6e 64 65 66 20 4d 55 4c 54 49 50 4c .!ifndef MULTIPL
3f30: 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 0a 4d ATFORM_INSTALL.M
3f40: 55 4c 54 49 50 4c 41 54 46 4f 52 4d 5f 49 4e 53 ULTIPLATFORM_INS
3f50: 54 41 4c 4c 20 3d 20 30 0a 21 65 6e 64 69 66 0a TALL = 0.!endif.
3f60: 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d .#--------------
3f70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
3f90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 --------------.#
3fa0: 20 46 69 67 75 72 65 20 6f 75 74 20 74 68 65 20 Figure out the
3fb0: 2a 68 6f 73 74 2a 20 61 72 63 68 69 74 65 63 74 *host* architect
3fc0: 75 72 65 20 62 79 20 72 65 61 64 69 6e 67 20 74 ure by reading t
3fd0: 68 65 20 72 65 67 69 73 74 72 79 0a 0a 21 69 66 he registry..!if
3fe0: 20 21 5b 72 65 67 20 71 75 65 72 79 20 48 4b 4c ![reg query HKL
3ff0: 4d 5c 48 61 72 64 77 61 72 65 5c 44 65 73 63 72 M\Hardware\Descr
4000: 69 70 74 69 6f 6e 5c 53 79 73 74 65 6d 5c 43 65 iption\System\Ce
4010: 6e 74 72 61 6c 50 72 6f 63 65 73 73 6f 72 5c 30 ntralProcessor\0
4020: 20 2f 76 20 49 64 65 6e 74 69 66 69 65 72 20 7c /v Identifier |
4030: 20 66 69 6e 64 73 74 72 20 2f 69 20 78 38 36 5d findstr /i x86]
4040: 0a 4e 41 54 49 56 45 5f 41 52 43 48 3d 49 58 38 .NATIVE_ARCH=IX8
4050: 36 0a 21 65 6c 73 65 69 66 20 21 5b 72 65 67 20 6.!elseif ![reg
4060: 71 75 65 72 79 20 48 4b 4c 4d 5c 48 61 72 64 77 query HKLM\Hardw
4070: 61 72 65 5c 44 65 73 63 72 69 70 74 69 6f 6e 5c are\Description\
4080: 53 79 73 74 65 6d 5c 43 65 6e 74 72 61 6c 50 72 System\CentralPr
4090: 6f 63 65 73 73 6f 72 5c 30 20 2f 76 20 49 64 65 ocessor\0 /v Ide
40a0: 6e 74 69 66 69 65 72 20 7c 20 66 69 6e 64 73 74 ntifier | findst
40b0: 72 20 2f 69 20 41 52 4d 20 7c 20 66 69 6e 64 73 r /i ARM | finds
40c0: 74 72 20 2f 69 20 36 34 2d 62 69 74 5d 0a 4e 41 tr /i 64-bit].NA
40d0: 54 49 56 45 5f 41 52 43 48 3d 41 52 4d 36 34 0a TIVE_ARCH=ARM64.
40e0: 21 65 6c 73 65 0a 4e 41 54 49 56 45 5f 41 52 43 !else.NATIVE_ARC
40f0: 48 3d 41 4d 44 36 34 0a 21 65 6e 64 69 66 0a 0a H=AMD64.!endif..
4100: 23 20 53 69 6e 63 65 20 4d 53 56 43 38 20 77 65 # Since MSVC8 we
4110: 20 6d 75 73 74 20 64 65 61 6c 20 77 69 74 68 20 must deal with
4120: 6d 61 6e 69 66 65 73 74 20 72 65 73 6f 75 72 63 manifest resourc
4130: 65 73 2e 0a 21 69 66 20 24 28 56 43 56 45 52 53 es..!if $(VCVERS
4140: 49 4f 4e 29 20 3e 3d 20 31 34 30 30 0a 5f 56 43 ION) >= 1400._VC
4150: 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 44 5f _MANIFEST_EMBED_
4160: 45 58 45 3d 69 66 20 65 78 69 73 74 20 24 40 2e EXE=if exist $@.
4170: 6d 61 6e 69 66 65 73 74 20 6d 74 20 2d 6e 6f 6c manifest mt -nol
4180: 6f 67 6f 20 2d 6d 61 6e 69 66 65 73 74 20 24 40 ogo -manifest $@
4190: 2e 6d 61 6e 69 66 65 73 74 20 2d 6f 75 74 70 75 .manifest -outpu
41a0: 74 72 65 73 6f 75 72 63 65 3a 24 40 3b 31 0a 5f tresource:$@;1._
41b0: 56 43 5f 4d 41 4e 49 46 45 53 54 5f 45 4d 42 45 VC_MANIFEST_EMBE
41c0: 44 5f 44 4c 4c 3d 69 66 20 65 78 69 73 74 20 24 D_DLL=if exist $
41d0: 40 2e 6d 61 6e 69 66 65 73 74 20 6d 74 20 2d 6e @.manifest mt -n
41e0: 6f 6c 6f 67 6f 20 2d 6d 61 6e 69 66 65 73 74 20 ologo -manifest
41f0: 24 40 2e 6d 61 6e 69 66 65 73 74 20 2d 6f 75 74 [email protected] -out
4200: 70 75 74 72 65 73 6f 75 72 63 65 3a 24 40 3b 32 putresource:$@;2
4210: 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 .!endif..#######
4220: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4230: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4240: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4250: 23 23 23 23 23 23 23 23 23 0a 23 20 34 2e 20 42 #########.# 4. B
4260: 75 69 6c 64 20 74 68 65 20 6e 6d 61 6b 65 68 6c uild the nmakehl
4270: 70 20 70 72 6f 67 72 61 6d 0a 23 20 54 68 69 73 p program.# This
4280: 20 69 73 20 61 20 68 65 6c 70 65 72 20 61 70 70 is a helper app
4290: 20 77 65 20 6e 65 65 64 20 74 6f 20 6f 76 65 72 we need to over
42a0: 63 6f 6d 65 20 6e 6d 61 6b 65 27 73 20 6c 69 6d come nmake's lim
42b0: 69 74 69 6e 67 0a 23 20 65 6e 76 69 72 6f 6e 6d iting.# environm
42c0: 65 6e 74 2e 20 57 65 20 77 69 6c 6c 20 63 61 6c ent. We will cal
42d0: 6c 20 6f 75 74 20 74 6f 20 69 74 20 74 6f 20 67 l out to it to g
42e0: 65 74 20 76 61 72 69 6f 75 73 20 62 69 74 73 20 et various bits
42f0: 6f 66 0a 23 20 69 6e 66 6f 72 6d 61 74 69 6f 6e of.# information
4300: 20 61 62 6f 75 74 20 73 75 70 70 6f 72 74 65 64 about supported
4310: 20 63 6f 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e compiler option
4320: 73 20 65 74 63 2e 0a 23 0a 23 20 54 63 6c 20 69 s etc..#.# Tcl i
4330: 74 73 65 6c 66 20 77 69 6c 6c 20 61 6c 77 61 79 tself will alway
4340: 73 20 75 73 65 20 74 68 65 20 6e 6d 61 6b 65 68 s use the nmakeh
4350: 6c 70 2e 63 20 70 72 6f 67 72 61 6d 20 77 68 69 lp.c program whi
4360: 63 68 20 69 73 0a 23 20 69 6e 20 69 74 73 20 6f ch is.# in its o
4370: 77 6e 20 73 6f 75 72 63 65 2e 20 49 74 20 77 69 wn source. It wi
4380: 6c 6c 20 62 65 20 6b 65 70 74 20 75 70 64 61 74 ll be kept updat
4390: 65 64 20 74 68 65 72 65 2e 0a 23 0a 23 20 45 78 ed there..#.# Ex
43a0: 74 65 6e 73 69 6f 6e 73 20 62 75 69 6c 74 20 61 tensions built a
43b0: 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c gainst an instal
43c0: 6c 65 64 20 54 63 6c 20 77 69 6c 6c 20 75 73 65 led Tcl will use
43d0: 20 74 68 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 the installed.#
43e0: 20 63 6f 70 79 20 6f 66 20 54 63 6c 27 73 20 6e copy of Tcl's n
43f0: 6d 61 6b 65 68 6c 70 2e 63 20 69 66 20 74 68 65 makehlp.c if the
4400: 72 65 20 69 73 20 6f 6e 65 20 61 6e 64 20 74 68 re is one and th
4410: 65 69 72 20 6f 77 6e 20 76 65 72 73 69 6f 6e 0a eir own version.
4420: 23 20 6f 74 68 65 72 77 69 73 65 2e 20 49 6e 20 # otherwise. In
4430: 74 68 65 20 6c 61 74 74 65 72 20 63 61 73 65 2c the latter case,
4440: 20 74 68 65 79 20 77 6f 75 6c 64 20 61 6c 73 6f they would also
4450: 20 62 65 20 75 73 69 6e 67 20 74 68 65 69 72 20 be using their
4460: 6f 77 6e 0a 23 20 72 75 6c 65 73 2e 76 63 2e 20 own.# rules.vc.
4470: 4e 6f 74 65 20 74 68 61 74 20 6f 6c 64 65 72 20 Note that older
4480: 76 65 72 73 69 6f 6e 73 20 6f 66 20 54 63 6c 20 versions of Tcl
4490: 64 6f 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 20 6e do not install n
44a0: 6d 61 6b 65 68 6c 70 2e 63 0a 23 20 6f 72 20 72 makehlp.c.# or r
44b0: 75 6c 65 73 2e 76 63 2e 0a 23 0a 23 20 45 78 74 ules.vc..#.# Ext
44c0: 65 6e 73 69 6f 6e 73 20 62 75 69 6c 74 20 61 67 ensions built ag
44d0: 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 ainst Tcl source
44e0: 73 20 77 69 6c 6c 20 75 73 65 20 74 68 65 20 6f s will use the o
44f0: 6e 65 20 66 72 6f 6d 20 74 68 65 20 54 63 6c 20 ne from the Tcl
4500: 73 6f 75 72 63 65 2e 0a 23 0a 23 20 57 68 65 6e source..#.# When
4510: 20 62 75 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 building an ext
4520: 65 6e 73 69 6f 6e 20 75 73 69 6e 67 20 61 20 73 ension using a s
4530: 75 66 66 69 63 69 65 6e 74 6c 79 20 6e 65 77 20 ufficiently new
4540: 76 65 72 73 69 6f 6e 20 6f 66 20 54 63 6c 2c 0a version of Tcl,.
4550: 23 20 72 75 6c 65 73 2d 65 78 74 2e 76 63 20 77 # rules-ext.vc w
4560: 69 6c 6c 20 64 65 66 69 6e 65 20 4e 4d 41 4b 45 ill define NMAKE
4570: 48 4c 50 43 20 61 70 70 72 6f 70 72 69 61 74 65 HLPC appropriate
4580: 6c 79 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 ly to point to t
4590: 68 65 0a 23 20 63 6f 70 79 20 6f 66 20 6e 6d 61 he.# copy of nma
45a0: 6b 65 68 6c 70 2e 63 20 74 6f 20 62 65 20 75 73 kehlp.c to be us
45b0: 65 64 2e 0a 0a 21 69 66 6e 64 65 66 20 4e 4d 41 ed...!ifndef NMA
45c0: 4b 45 48 4c 50 43 0a 23 20 44 65 66 61 75 6c 74 KEHLPC.# Default
45d0: 20 74 6f 20 74 68 65 20 6f 6e 65 20 69 6e 20 74 to the one in t
45e0: 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 he current direc
45f0: 74 6f 72 79 20 28 74 68 65 20 65 78 74 65 6e 73 tory (the extens
4600: 69 6f 6e 27 73 20 6f 77 6e 20 6e 6d 61 6b 65 68 ion's own nmakeh
4610: 6c 70 2e 63 29 0a 4e 4d 41 4b 45 48 4c 50 43 20 lp.c).NMAKEHLPC
4620: 3d 20 6e 6d 61 6b 65 68 6c 70 2e 63 0a 0a 21 69 = nmakehlp.c..!i
4630: 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a f !$(DOING_TCL).
4640: 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 4c 4c !if $(TCLINSTALL
4650: 29 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f ).!if exist("$(_
4660: 54 43 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b TCLDIR)\lib\nmak
4670: 65 5c 6e 6d 61 6b 65 68 6c 70 2e 63 22 29 0a 4e e\nmakehlp.c").N
4680: 4d 41 4b 45 48 4c 50 43 20 3d 20 24 28 5f 54 43 MAKEHLPC = $(_TC
4690: 4c 44 49 52 29 5c 6c 69 62 5c 6e 6d 61 6b 65 5c LDIR)\lib\nmake\
46a0: 6e 6d 61 6b 65 68 6c 70 2e 63 0a 21 65 6e 64 69 nmakehlp.c.!endi
46b0: 66 0a 21 65 6c 73 65 20 23 20 21 24 28 54 43 4c f.!else # !$(TCL
46c0: 49 4e 53 54 41 4c 4c 29 0a 21 69 66 20 65 78 69 INSTALL).!if exi
46d0: 73 74 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 st("$(_TCLDIR)\w
46e0: 69 6e 5c 6e 6d 61 6b 65 68 6c 70 2e 63 22 29 0a in\nmakehlp.c").
46f0: 4e 4d 41 4b 45 48 4c 50 43 20 3d 20 24 28 5f 54 NMAKEHLPC = $(_T
4700: 43 4c 44 49 52 29 5c 77 69 6e 5c 6e 6d 61 6b 65 CLDIR)\win\nmake
4710: 68 6c 70 2e 63 0a 21 65 6e 64 69 66 0a 21 65 6e hlp.c.!endif.!en
4720: 64 69 66 20 23 20 24 28 54 43 4c 49 4e 53 54 41 dif # $(TCLINSTA
4730: 4c 4c 29 0a 21 65 6e 64 69 66 20 23 20 21 24 28 LL).!endif # !$(
4740: 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 21 65 6e 64 DOING_TCL)..!end
4750: 69 66 20 23 20 4e 4d 41 4b 45 48 4c 50 43 0a 0a if # NMAKEHLPC..
4760: 23 20 57 65 20 61 6c 77 61 79 73 20 62 75 69 6c # We always buil
4770: 64 20 6e 6d 61 6b 65 68 6c 70 20 65 76 65 6e 20 d nmakehlp even
4780: 69 66 20 69 74 20 65 78 69 73 74 73 20 73 69 6e if it exists sin
4790: 63 65 20 77 65 20 64 6f 20 6e 6f 74 20 6b 6e 6f ce we do not kno
47a0: 77 0a 23 20 77 68 61 74 20 73 6f 75 72 63 65 20 w.# what source
47b0: 69 74 20 77 61 73 20 62 75 69 6c 74 20 66 72 6f it was built fro
47c0: 6d 2e 0a 21 69 66 20 5b 24 28 63 63 33 32 29 20 m..!if [$(cc32)
47d0: 2d 6e 6f 6c 6f 67 6f 20 2d 44 4e 44 45 42 55 47 -nologo -DNDEBUG
47e0: 20 22 24 28 4e 4d 41 4b 45 48 4c 50 43 29 22 20 "$(NMAKEHLPC)"
47f0: 2d 6c 69 6e 6b 20 2d 73 75 62 73 79 73 74 65 6d -link -subsystem
4800: 3a 63 6f 6e 73 6f 6c 65 20 3e 20 6e 75 6c 5d 0a :console > nul].
4810: 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 !endif..########
4820: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4830: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4840: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
4850: 23 23 23 23 23 23 23 23 0a 23 20 35 2e 20 54 65 ########.# 5. Te
4860: 73 74 20 66 6f 72 20 63 6f 6d 70 69 6c 65 72 20 st for compiler
4870: 66 65 61 74 75 72 65 73 0a 23 20 56 69 73 75 61 features.# Visua
4880: 6c 20 43 2b 2b 20 63 6f 6d 70 69 6c 65 72 20 6f l C++ compiler o
4890: 70 74 69 6f 6e 73 20 68 61 76 65 20 63 68 61 6e ptions have chan
48a0: 67 65 64 20 6f 76 65 72 20 74 68 65 20 79 65 61 ged over the yea
48b0: 72 73 2e 20 43 68 65 63 6b 0a 23 20 77 68 69 63 rs. Check.# whic
48c0: 68 20 6f 70 74 69 6f 6e 73 20 61 72 65 20 73 75 h options are su
48d0: 70 70 6f 72 74 65 64 20 62 79 20 74 68 65 20 63 pported by the c
48e0: 6f 6d 70 69 6c 65 72 20 69 6e 20 75 73 65 2e 0a ompiler in use..
48f0: 23 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e #.# The followin
4900: 67 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 g macros are set
4910: 3a 0a 23 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e :.# OPTIMIZATION
4920: 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 S - the compiler
4930: 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 73 65 flags to be use
4940: 64 20 66 6f 72 20 6f 70 74 69 6d 69 7a 65 64 20 d for optimized
4950: 62 75 69 6c 64 73 0a 23 20 44 45 42 55 47 46 4c builds.# DEBUGFL
4960: 41 47 53 20 2d 20 74 68 65 20 63 6f 6d 70 69 6c AGS - the compil
4970: 65 72 20 66 6c 61 67 73 20 74 6f 20 62 65 20 75 er flags to be u
4980: 73 65 64 20 66 6f 72 20 64 65 62 75 67 20 62 75 sed for debug bu
4990: 69 6c 64 73 0a 23 20 4c 49 4e 4b 45 52 46 4c 41 ilds.# LINKERFLA
49a0: 47 53 20 2d 20 46 6c 61 67 73 20 70 61 73 73 65 GS - Flags passe
49b0: 64 20 74 6f 20 74 68 65 20 6c 69 6e 6b 65 72 0a d to the linker.
49c0: 23 0a 23 20 4e 6f 74 65 20 74 68 61 74 20 74 68 #.# Note that th
49d0: 65 73 65 20 61 72 65 20 74 68 65 20 63 6f 6d 70 ese are the comp
49e0: 69 6c 65 72 20 73 65 74 74 69 6e 67 73 20 2a 61 iler settings *a
49f0: 76 61 69 6c 61 62 6c 65 2a 2c 20 6e 6f 74 20 74 vailable*, not t
4a00: 68 6f 73 65 0a 23 20 74 68 61 74 20 77 69 6c 6c hose.# that will
4a10: 20 62 65 20 2a 75 73 65 64 2a 2e 20 54 68 65 20 be *used*. The
4a20: 6c 61 74 74 65 72 20 64 65 70 65 6e 64 73 20 6f latter depends o
4a30: 6e 20 74 68 65 20 4f 50 54 53 20 6d 61 63 72 6f n the OPTS macro
4a40: 20 73 65 74 74 69 6e 67 73 0a 23 20 77 68 69 63 settings.# whic
4a50: 68 20 77 65 20 68 61 76 65 20 6e 6f 74 20 79 65 h we have not ye
4a60: 74 20 70 61 72 73 65 64 2e 0a 23 0a 23 20 41 6c t parsed..#.# Al
4a70: 73 6f 20 6e 6f 74 65 20 74 68 61 74 20 73 6f 6d so note that som
4a80: 65 20 6f 66 20 74 68 65 20 66 6c 61 67 73 20 69 e of the flags i
4a90: 6e 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 n OPTIMIZATIONS
4aa0: 61 72 65 20 6e 6f 74 20 72 65 61 6c 6c 79 0a 23 are not really.#
4ab0: 20 72 65 6c 61 74 65 64 20 74 6f 20 6f 70 74 69 related to opti
4ac0: 6d 69 7a 61 74 69 6f 6e 2e 20 54 68 65 79 20 61 mization. They a
4ad0: 72 65 20 70 6c 61 63 65 64 20 74 68 65 72 65 20 re placed there
4ae0: 6f 6e 6c 79 20 66 6f 72 20 6c 65 67 61 63 79 20 only for legacy
4af0: 72 65 61 73 6f 6e 73 0a 23 20 61 73 20 73 6f 6d reasons.# as som
4b00: 65 20 65 78 74 65 6e 73 69 6f 6e 73 20 65 78 70 e extensions exp
4b10: 65 63 74 20 74 68 65 6d 20 74 6f 20 62 65 20 69 ect them to be i
4b20: 6e 63 6c 75 64 65 64 20 69 6e 20 74 68 61 74 20 ncluded in that
4b30: 6d 61 63 72 6f 2e 0a 0a 23 20 2d 4f 70 20 69 6d macro...# -Op im
4b40: 70 72 6f 76 65 73 20 66 6c 6f 61 74 20 63 6f 6e proves float con
4b50: 73 69 73 74 65 6e 63 79 2e 20 4e 6f 74 65 20 6f sistency. Note o
4b60: 6e 6c 79 20 6e 65 65 64 65 64 20 66 6f 72 20 6f nly needed for o
4b70: 6c 64 65 72 20 63 6f 6d 70 69 6c 65 72 73 0a 23 lder compilers.#
4b80: 20 4e 65 77 65 72 20 63 6f 6d 70 69 6c 65 72 73 Newer compilers
4b90: 20 64 6f 20 6e 6f 74 20 6e 65 65 64 20 6f 72 20 do not need or
4ba0: 73 75 70 70 6f 72 74 20 74 68 69 73 20 6f 70 74 support this opt
4bb0: 69 6f 6e 2e 0a 21 69 66 20 5b 24 28 4e 4d 41 4b ion..!if [$(NMAK
4bc0: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 63 20 EHLP_NATIVE) -c
4bd0: 2d 4f 70 5d 0a 46 50 4f 50 54 53 20 20 3d 20 2d -Op].FPOPTS = -
4be0: 4f 70 0a 21 65 6e 64 69 66 0a 0a 23 20 53 74 72 Op.!endif..# Str
4bf0: 69 63 74 20 66 6c 6f 61 74 69 6e 67 20 70 6f 69 ict floating poi
4c00: 6e 74 20 73 65 6d 61 6e 74 69 63 73 20 2d 20 70 nt semantics - p
4c10: 72 65 73 65 6e 74 20 69 6e 20 6e 65 77 65 72 20 resent in newer
4c20: 63 6f 6d 70 69 6c 65 72 73 20 69 6e 20 6c 69 65 compilers in lie
4c30: 75 20 6f 66 20 2d 4f 70 0a 21 69 66 20 5b 24 28 u of -Op.!if [$(
4c40: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
4c50: 20 2d 63 20 2d 66 70 3a 73 74 72 69 63 74 5d 0a -c -fp:strict].
4c60: 46 50 4f 50 54 53 20 20 3d 20 24 28 46 50 4f 50 FPOPTS = $(FPOP
4c70: 54 53 29 20 2d 66 70 3a 73 74 72 69 63 74 0a 21 TS) -fp:strict.!
4c80: 65 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 4d 41 endif..!if "$(MA
4c90: 43 48 49 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 CHINE)" == "IX86
4ca0: 22 0a 23 23 23 20 74 65 73 74 20 66 6f 72 20 70 ".### test for p
4cb0: 65 6e 74 69 75 6d 20 65 72 72 61 74 61 0a 21 69 entium errata.!i
4cc0: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
4cd0: 54 49 56 45 29 20 2d 63 20 2d 51 49 30 66 5d 0a TIVE) -c -QI0f].
4ce0: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d !message *** Com
4cf0: 70 69 6c 65 72 20 68 61 73 20 27 50 65 6e 74 69 piler has 'Penti
4d00: 75 6d 20 30 78 30 66 20 66 69 78 27 0a 46 50 4f um 0x0f fix'.FPO
4d10: 50 54 53 20 20 3d 20 24 28 46 50 4f 50 54 53 29 PTS = $(FPOPTS)
4d20: 20 2d 51 49 30 66 0a 21 65 6c 73 65 0a 21 6d 65 -QI0f.!else.!me
4d30: 73 73 61 67 65 20 2a 2a 2a 20 43 6f 6d 70 69 6c ssage *** Compil
4d40: 65 72 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 er does not have
4d50: 20 27 50 65 6e 74 69 75 6d 20 30 78 30 66 20 66 'Pentium 0x0f f
4d60: 69 78 27 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 ix'.!endif.!endi
4d70: 66 0a 0a 23 23 23 20 74 65 73 74 20 66 6f 72 20 f..### test for
4d80: 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73 0a 23 20 optimizations.#
4d90: 2f 4f 32 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e /O2 optimization
4da0: 20 69 6e 63 6c 75 64 65 73 20 2f 4f 67 20 2f 4f includes /Og /O
4db0: 69 20 2f 4f 74 20 2f 4f 79 20 2f 4f 62 32 20 2f i /Ot /Oy /Ob2 /
4dc0: 47 73 20 2f 47 46 20 2f 47 79 20 61 73 20 70 65 Gs /GF /Gy as pe
4dd0: 72 0a 23 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f r.# documentatio
4de0: 6e 2e 20 4e 6f 74 65 20 77 65 20 64 6f 20 4e 4f n. Note we do NO
4df0: 54 20 77 61 6e 74 20 2f 47 73 20 61 73 20 74 68 T want /Gs as th
4e00: 61 74 20 69 6e 73 65 72 74 73 20 61 20 5f 63 68 at inserts a _ch
4e10: 6b 73 74 6b 0a 23 20 73 74 61 63 6b 20 70 72 6f kstk.# stack pro
4e20: 62 65 20 61 74 20 2a 65 76 65 72 79 2a 20 66 75 be at *every* fu
4e30: 6e 63 74 69 6f 6e 20 65 6e 74 72 79 2c 20 6e 6f nction entry, no
4e40: 74 20 6a 75 73 74 20 74 68 6f 73 65 20 77 69 74 t just those wit
4e50: 68 20 6d 6f 72 65 20 74 68 61 6e 0a 23 20 61 20 h more than.# a
4e60: 70 61 67 65 20 6f 66 20 73 74 61 63 6b 20 61 6c page of stack al
4e70: 6c 6f 63 61 74 69 6f 6e 20 72 65 73 75 6c 74 69 location resulti
4e80: 6e 67 20 69 6e 20 61 20 70 65 72 66 6f 72 6d 61 ng in a performa
4e90: 6e 63 65 20 68 69 74 2e 20 20 48 6f 77 65 76 65 nce hit. Howeve
4ea0: 72 2c 0a 23 20 2f 4f 32 20 64 6f 63 75 6d 65 6e r,.# /O2 documen
4eb0: 74 61 74 69 6f 6e 20 69 73 20 6d 69 73 6c 65 61 tation is mislea
4ec0: 64 69 6e 67 20 61 73 20 69 74 73 20 73 74 61 63 ding as its stac
4ed0: 6b 20 70 72 6f 62 65 73 20 61 72 65 20 73 69 6d k probes are sim
4ee0: 70 6c 79 20 74 68 65 0a 23 20 64 65 66 61 75 6c ply the.# defaul
4ef0: 74 20 70 61 67 65 20 73 69 7a 65 20 6c 6f 63 61 t page size loca
4f00: 6c 73 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 70 72 ls allocation pr
4f10: 6f 62 65 73 20 61 6e 64 20 6e 6f 74 20 77 68 61 obes and not wha
4f20: 74 20 69 73 20 69 6d 70 6c 69 65 64 0a 23 20 62 t is implied.# b
4f30: 79 20 61 6e 20 65 78 70 6c 69 63 69 74 20 2f 47 y an explicit /G
4f40: 73 20 6f 70 74 69 6f 6e 2e 0a 0a 4f 50 54 49 4d s option...OPTIM
4f50: 49 5a 41 54 49 4f 4e 53 20 3d 20 24 28 46 50 4f IZATIONS = $(FPO
4f60: 50 54 53 29 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 PTS)..!if [$(NMA
4f70: 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 63 KEHLP_NATIVE) -c
4f80: 20 2d 4f 32 5d 0a 4f 50 54 49 4d 49 5a 49 4e 47 -O2].OPTIMIZING
4f90: 20 3d 20 31 0a 4f 50 54 49 4d 49 5a 41 54 49 4f = 1.OPTIMIZATIO
4fa0: 4e 53 20 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a NS = $(OPTIMIZ
4fb0: 41 54 49 4f 4e 53 29 20 2d 4f 32 0a 21 65 6c 73 ATIONS) -O2.!els
4fc0: 65 0a 23 20 4c 65 67 61 63 79 2c 20 72 65 61 6c e.# Legacy, real
4fd0: 6c 79 2e 20 41 6c 6c 20 6d 6f 64 65 72 6e 20 63 ly. All modern c
4fe0: 6f 6d 70 69 6c 65 72 73 20 73 75 70 70 6f 72 74 ompilers support
4ff0: 20 74 68 69 73 0a 21 6d 65 73 73 61 67 65 20 2a this.!message *
5000: 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 64 6f 65 73 ** Compiler does
5010: 20 6e 6f 74 20 68 61 76 65 20 27 4f 70 74 69 6d not have 'Optim
5020: 69 7a 61 74 69 6f 6e 73 27 0a 4f 50 54 49 4d 49 izations'.OPTIMI
5030: 5a 49 4e 47 20 3d 20 30 0a 21 65 6e 64 69 66 0a ZING = 0.!endif.
5040: 0a 23 20 43 68 65 63 6b 73 20 66 6f 72 20 62 75 .# Checks for bu
5050: 66 66 65 72 20 6f 76 65 72 66 6c 6f 77 73 20 69 ffer overflows i
5060: 6e 20 6c 6f 63 61 6c 20 61 72 72 61 79 73 0a 21 n local arrays.!
5070: 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e if [$(NMAKEHLP_N
5080: 41 54 49 56 45 29 20 2d 63 20 2d 47 53 5d 0a 4f ATIVE) -c -GS].O
5090: 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d 20 PTIMIZATIONS =
50a0: 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 29 $(OPTIMIZATIONS)
50b0: 20 2d 47 53 0a 21 65 6e 64 69 66 0a 0a 23 20 4c -GS.!endif..# L
50c0: 69 6e 6b 20 74 69 6d 65 20 6f 70 74 69 6d 69 7a ink time optimiz
50d0: 61 74 69 6f 6e 2e 20 4e 6f 74 65 20 74 68 61 74 ation. Note that
50e0: 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 28 70 6f this option (po
50f0: 74 65 6e 74 69 61 6c 6c 79 29 20 6d 61 6b 65 73 tentially) makes
5100: 0a 23 20 67 65 6e 65 72 61 74 65 64 20 6c 69 62 .# generated lib
5110: 72 61 72 69 65 73 20 6f 6e 6c 79 20 75 73 61 62 raries only usab
5120: 6c 65 20 62 79 20 74 68 65 20 73 70 65 63 69 66 le by the specif
5130: 69 63 20 56 43 2b 2b 20 76 65 72 73 69 6f 6e 20 ic VC++ version
5140: 74 68 61 74 0a 23 20 63 72 65 61 74 65 64 20 69 that.# created i
5150: 74 2e 20 52 65 71 75 69 72 65 73 20 2f 4c 54 43 t. Requires /LTC
5160: 47 20 6c 69 6e 6b 65 72 20 6f 70 74 69 6f 6e 0a G linker option.
5170: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
5180: 4e 41 54 49 56 45 29 20 2d 63 20 2d 47 4c 5d 0a NATIVE) -c -GL].
5190: 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 20 20 3d OPTIMIZATIONS =
51a0: 20 24 28 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 53 $(OPTIMIZATIONS
51b0: 29 20 2d 47 4c 0a 43 43 5f 47 4c 5f 4f 50 54 5f ) -GL.CC_GL_OPT_
51c0: 45 4e 41 42 4c 45 44 20 3d 20 31 0a 21 65 6c 73 ENABLED = 1.!els
51d0: 65 0a 23 20 49 6e 20 6e 65 77 65 72 20 63 6f 6d e.# In newer com
51e0: 70 69 6c 65 72 73 20 2d 47 4c 20 61 6e 64 20 2d pilers -GL and -
51f0: 59 58 20 61 72 65 20 69 6e 63 6f 6d 70 61 74 69 YX are incompati
5200: 62 6c 65 2e 0a 21 69 66 20 5b 24 28 4e 4d 41 4b ble..!if [$(NMAK
5210: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 63 20 EHLP_NATIVE) -c
5220: 2d 59 58 5d 0a 4f 50 54 49 4d 49 5a 41 54 49 4f -YX].OPTIMIZATIO
5230: 4e 53 20 20 3d 20 24 28 4f 50 54 49 4d 49 5a 41 NS = $(OPTIMIZA
5240: 54 49 4f 4e 53 29 20 2d 59 58 0a 21 65 6e 64 69 TIONS) -YX.!endi
5250: 66 0a 21 65 6e 64 69 66 20 23 20 5b 24 28 4e 4d f.!endif # [$(NM
5260: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
5270: 63 20 2d 47 4c 5d 0a 0a 44 45 42 55 47 46 4c 41 c -GL]..DEBUGFLA
5280: 47 53 20 20 20 20 20 3d 20 24 28 46 50 4f 50 54 GS = $(FPOPT
5290: 53 29 0a 0a 23 20 52 75 6e 20 74 69 6d 65 20 65 S)..# Run time e
52a0: 72 72 6f 72 20 63 68 65 63 6b 73 2e 20 4e 6f 74 rror checks. Not
52b0: 20 61 76 61 69 6c 61 62 6c 65 20 6f 72 20 76 61 available or va
52c0: 6c 69 64 20 69 6e 20 61 20 72 65 6c 65 61 73 65 lid in a release
52d0: 2c 20 6e 6f 6e 2d 64 65 62 75 67 20 62 75 69 6c , non-debug buil
52e0: 64 0a 23 20 52 54 43 20 69 73 20 66 6f 72 20 6d d.# RTC is for m
52f0: 6f 64 65 72 6e 20 63 6f 6d 70 69 6c 65 72 73 2c odern compilers,
5300: 20 2d 47 5a 20 69 73 20 6c 65 67 61 63 79 0a 21 -GZ is legacy.!
5310: 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e if [$(NMAKEHLP_N
5320: 41 54 49 56 45 29 20 2d 63 20 2d 52 54 43 31 5d ATIVE) -c -RTC1]
5330: 0a 44 45 42 55 47 46 4c 41 47 53 20 20 20 20 20 .DEBUGFLAGS
5340: 3d 20 24 28 44 45 42 55 47 46 4c 41 47 53 29 20 = $(DEBUGFLAGS)
5350: 2d 52 54 43 31 0a 21 65 6c 73 65 69 66 20 5b 24 -RTC1.!elseif [$
5360: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
5370: 29 20 2d 63 20 2d 47 5a 5d 0a 44 45 42 55 47 46 ) -c -GZ].DEBUGF
5380: 4c 41 47 53 20 20 20 20 20 3d 20 24 28 44 45 42 LAGS = $(DEB
5390: 55 47 46 4c 41 47 53 29 20 2d 47 5a 0a 21 65 6e UGFLAGS) -GZ.!en
53a0: 64 69 66 0a 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d dif..#----------
53b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
53c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
53d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
53e0: 2d 2d 2d 2d 2d 2d 0a 23 20 4c 69 6e 6b 65 72 20 ------.# Linker
53f0: 66 6c 61 67 73 0a 0a 23 20 4c 49 4e 4b 45 52 5f flags..# LINKER_
5400: 54 45 53 54 46 4c 41 47 53 20 61 72 65 20 66 6f TESTFLAGS are fo
5410: 72 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 77 r internal use w
5420: 68 65 6e 20 77 65 20 63 61 6c 6c 20 6e 6d 61 6b hen we call nmak
5430: 65 68 6c 70 20 74 6f 20 74 65 73 74 0a 23 20 69 ehlp to test.# i
5440: 66 20 74 68 65 20 6c 69 6e 6b 65 72 20 73 75 70 f the linker sup
5450: 70 6f 72 74 73 20 61 20 73 70 65 63 69 66 69 63 ports a specific
5460: 20 6f 70 74 69 6f 6e 2e 20 57 69 74 68 6f 75 74 option. Without
5470: 20 74 68 65 73 65 20 66 6c 61 67 73 20 6c 69 6e these flags lin
5480: 6b 20 77 69 6c 6c 0a 23 20 72 65 74 75 72 6e 20 k will.# return
5490: 22 4c 4e 4b 31 35 36 31 3a 20 65 6e 74 72 79 20 "LNK1561: entry
54a0: 70 6f 69 6e 74 20 6d 75 73 74 20 62 65 20 64 65 point must be de
54b0: 66 69 6e 65 64 22 20 65 72 72 6f 72 20 63 6f 6d fined" error com
54c0: 70 69 6c 69 6e 67 20 66 72 6f 6d 20 56 53 2d 49 piling from VS-I
54d0: 44 45 3a 0a 23 20 54 68 65 79 20 61 72 65 20 6e DE:.# They are n
54e0: 6f 74 20 70 61 73 73 65 64 20 74 68 72 6f 75 67 ot passed throug
54f0: 68 20 74 6f 20 74 68 65 20 61 63 74 75 61 6c 20 h to the actual
5500: 61 70 70 6c 69 63 61 74 69 6f 6e 20 2f 20 65 78 application / ex
5510: 74 65 6e 73 69 6f 6e 0a 23 20 6c 69 6e 6b 20 72 tension.# link r
5520: 75 6c 65 73 2e 0a 21 69 66 6e 64 65 66 20 4c 49 ules..!ifndef LI
5530: 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 0a 4c NKER_TESTFLAGS.L
5540: 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 47 53 20 INKER_TESTFLAGS
5550: 3d 20 2f 44 4c 4c 20 2f 4e 4f 45 4e 54 52 59 20 = /DLL /NOENTRY
5560: 2f 4f 55 54 3a 6e 6d 61 6b 65 68 6c 70 2e 6f 75 /OUT:nmakehlp.ou
5570: 74 0a 21 65 6e 64 69 66 0a 0a 4c 49 4e 4b 45 52 t.!endif..LINKER
5580: 46 4c 41 47 53 20 20 20 20 20 3d 0a 0a 23 20 49 FLAGS =..# I
5590: 66 20 63 6f 6d 70 69 6c 65 72 20 68 61 73 20 65 f compiler has e
55a0: 6e 61 62 6c 65 64 20 6c 69 6e 6b 20 74 69 6d 65 nabled link time
55b0: 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 2c 20 6c optimization, l
55c0: 69 6e 6b 65 72 20 6d 75 73 74 20 74 6f 6f 20 77 inker must too w
55d0: 69 74 68 20 2d 6c 74 63 67 0a 21 69 66 64 65 66 ith -ltcg.!ifdef
55e0: 20 43 43 5f 47 4c 5f 4f 50 54 5f 45 4e 41 42 4c CC_GL_OPT_ENABL
55f0: 45 44 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 ED.!if [$(NMAKEH
5600: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 6c 20 2d 6c LP_NATIVE) -l -l
5610: 74 63 67 20 24 28 4c 49 4e 4b 45 52 5f 54 45 53 tcg $(LINKER_TES
5620: 54 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 TFLAGS)].LINKERF
5630: 4c 41 47 53 20 20 20 20 20 3d 20 24 28 4c 49 4e LAGS = $(LIN
5640: 4b 45 52 46 4c 41 47 53 29 20 2d 6c 74 63 67 0a KERFLAGS) -ltcg.
5650: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 0a !endif.!endif...
5660: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5670: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5680: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
5690: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
56a0: 0a 23 20 36 2e 20 45 78 74 72 61 63 74 20 76 61 .# 6. Extract va
56b0: 72 69 6f 75 73 20 76 65 72 73 69 6f 6e 20 6e 75 rious version nu
56c0: 6d 62 65 72 73 20 66 72 6f 6d 20 68 65 61 64 65 mbers from heade
56d0: 72 73 0a 23 20 46 6f 72 20 54 63 6c 20 61 6e 64 rs.# For Tcl and
56e0: 20 54 6b 2c 20 76 65 72 73 69 6f 6e 20 6e 75 6d Tk, version num
56f0: 62 65 72 73 20 61 72 65 20 65 78 74 72 61 63 74 bers are extract
5700: 65 64 20 66 72 6f 6d 20 74 63 6c 2e 68 20 61 6e ed from tcl.h an
5710: 64 20 74 6b 2e 68 0a 23 20 72 65 73 70 65 63 74 d tk.h.# respect
5720: 69 76 65 6c 79 2e 20 46 6f 72 20 65 78 74 65 6e ively. For exten
5730: 73 69 6f 6e 73 2c 20 76 65 72 73 69 6f 6e 73 20 sions, versions
5740: 61 72 65 20 65 78 74 72 61 63 74 65 64 20 66 72 are extracted fr
5750: 6f 6d 20 74 68 65 0a 23 20 63 6f 6e 66 69 67 75 om the.# configu
5760: 72 65 2e 69 6e 20 6f 72 20 63 6f 6e 66 69 67 75 re.in or configu
5770: 72 65 2e 61 63 20 66 72 6f 6d 20 74 68 65 20 54 re.ac from the T
5780: 45 41 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e EA configuration
5790: 20 69 66 20 69 74 0a 23 20 65 78 69 73 74 73 2c if it.# exists,
57a0: 20 61 6e 64 20 75 6e 73 65 74 20 6f 74 68 65 72 and unset other
57b0: 77 69 73 65 2e 0a 23 20 53 65 74 73 20 74 68 65 wise..# Sets the
57c0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f following macro
57d0: 73 3a 0a 23 20 54 43 4c 5f 4d 41 4a 4f 52 5f 56 s:.# TCL_MAJOR_V
57e0: 45 52 53 49 4f 4e 0a 23 20 54 43 4c 5f 4d 49 4e ERSION.# TCL_MIN
57f0: 4f 52 5f 56 45 52 53 49 4f 4e 0a 23 20 54 43 4c OR_VERSION.# TCL
5800: 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 0a _RELEASE_SERIAL.
5810: 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 56 45 # TCL_PATCH_LEVE
5820: 4c 0a 23 20 54 43 4c 5f 50 41 54 43 48 5f 4c 45 L.# TCL_PATCH_LE
5830: 54 54 45 52 0a 23 20 54 43 4c 5f 56 45 52 53 49 TTER.# TCL_VERSI
5840: 4f 4e 0a 23 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 ON.# TK_MAJOR_VE
5850: 52 53 49 4f 4e 0a 23 20 54 4b 5f 4d 49 4e 4f 52 RSION.# TK_MINOR
5860: 5f 56 45 52 53 49 4f 4e 0a 23 20 54 4b 5f 52 45 _VERSION.# TK_RE
5870: 4c 45 41 53 45 5f 53 45 52 49 41 4c 0a 23 20 54 LEASE_SERIAL.# T
5880: 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 0a 23 20 K_PATCH_LEVEL.#
5890: 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 0a TK_PATCH_LETTER.
58a0: 23 20 54 4b 5f 56 45 52 53 49 4f 4e 0a 23 20 44 # TK_VERSION.# D
58b0: 4f 54 56 45 52 53 49 4f 4e 20 2d 20 73 65 74 20 OTVERSION - set
58c0: 61 73 20 28 66 6f 72 20 65 78 61 6d 70 6c 65 29 as (for example)
58d0: 20 32 2e 35 0a 23 20 56 45 52 53 49 4f 4e 20 2d 2.5.# VERSION -
58e0: 20 73 65 74 20 61 73 20 28 66 6f 72 20 65 78 61 set as (for exa
58f0: 6d 70 6c 65 20 32 35 29 0a 23 2d 2d 2d 2d 2d 2d mple 25).#------
5900: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5910: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5920: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
5930: 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 21 69 66 20 5b 65 --------..!if [e
5940: 63 68 6f 20 52 45 4d 20 3d 20 54 68 69 73 20 66 cho REM = This f
5950: 69 6c 65 20 69 73 20 67 65 6e 65 72 61 74 65 64 ile is generated
5960: 20 66 72 6f 6d 20 72 75 6c 65 73 2e 76 63 20 3e from rules.vc >
5970: 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 versions.vc].!e
5980: 6e 64 69 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 ndif.!if [echo T
5990: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
59a0: 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e = \>> versions.
59b0: 76 63 5d 20 5c 0a 20 20 20 26 26 20 5b 24 28 4e vc] \. && [$(N
59c0: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 MAKEHLP_NATIVE)
59d0: 2d 56 20 22 24 28 5f 54 43 4c 5f 48 29 22 20 22 -V "$(_TCL_H)" "
59e0: 64 65 66 69 6e 65 20 54 43 4c 5f 4d 41 4a 4f 52 define TCL_MAJOR
59f0: 5f 56 45 52 53 49 4f 4e 22 20 3e 3e 20 76 65 72 _VERSION" >> ver
5a00: 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 sions.vc].!endif
5a10: 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 4d .!if [echo TCL_M
5a20: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 20 3d 20 5c INOR_VERSION = \
5a30: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 >> versions.vc]
5a40: 5c 0a 20 20 20 26 26 20 5b 24 28 4e 4d 41 4b 45 \. && [$(NMAKE
5a50: 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 56 20 22 HLP_NATIVE) -V "
5a60: 24 28 5f 54 43 4c 5f 48 29 22 20 22 64 65 66 69 $(_TCL_H)" "defi
5a70: 6e 65 20 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 ne TCL_MINOR_VER
5a80: 53 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e SION" >> version
5a90: 73 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 s.vc].!endif.!if
5aa0: 20 5b 65 63 68 6f 20 54 43 4c 5f 52 45 4c 45 41 [echo TCL_RELEA
5ab0: 53 45 5f 53 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 SE_SERIAL = \>>
5ac0: 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 versions.vc] \.
5ad0: 20 20 26 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 && [$(NMAKEHLP
5ae0: 5f 4e 41 54 49 56 45 29 20 2d 56 20 22 24 28 5f _NATIVE) -V "$(_
5af0: 54 43 4c 5f 48 29 22 20 54 43 4c 5f 52 45 4c 45 TCL_H)" TCL_RELE
5b00: 41 53 45 5f 53 45 52 49 41 4c 20 3e 3e 20 76 65 ASE_SERIAL >> ve
5b10: 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 rsions.vc].!endi
5b20: 66 0a 21 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f f.!if [echo TCL_
5b30: 50 41 54 43 48 5f 4c 45 56 45 4c 20 3d 20 5c 3e PATCH_LEVEL = \>
5b40: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c > versions.vc] \
5b50: 0a 20 20 20 26 26 20 5b 24 28 4e 4d 41 4b 45 48 . && [$(NMAKEH
5b60: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 56 20 22 24 LP_NATIVE) -V "$
5b70: 28 5f 54 43 4c 5f 48 29 22 20 54 43 4c 5f 50 41 (_TCL_H)" TCL_PA
5b80: 54 43 48 5f 4c 45 56 45 4c 20 3e 3e 20 76 65 72 TCH_LEVEL >> ver
5b90: 73 69 6f 6e 73 2e 76 63 5d 0a 21 65 6e 64 69 66 sions.vc].!endif
5ba0: 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 5f 54 ..!if defined(_T
5bb0: 4b 5f 48 29 0a 21 69 66 20 5b 65 63 68 6f 20 54 K_H).!if [echo T
5bc0: 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 20 K_MAJOR_VERSION
5bd0: 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 = \>> versions.v
5be0: 63 5d 20 5c 0a 20 20 20 26 26 20 5b 24 28 4e 4d c] \. && [$(NM
5bf0: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
5c00: 56 20 24 28 5f 54 4b 5f 48 29 20 22 64 65 66 69 V $(_TK_H) "defi
5c10: 6e 65 20 54 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 ne TK_MAJOR_VERS
5c20: 49 4f 4e 22 20 3e 3e 20 76 65 72 73 69 6f 6e 73 ION" >> versions
5c30: 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 .vc].!endif.!if
5c40: 5b 65 63 68 6f 20 54 4b 5f 4d 49 4e 4f 52 5f 56 [echo TK_MINOR_V
5c50: 45 52 53 49 4f 4e 20 3d 20 5c 3e 3e 20 76 65 72 ERSION = \>> ver
5c60: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 sions.vc] \. &
5c70: 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 & [$(NMAKEHLP_NA
5c80: 54 49 56 45 29 20 2d 56 20 24 28 5f 54 4b 5f 48 TIVE) -V $(_TK_H
5c90: 29 20 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 ) TK_MINOR_VERSI
5ca0: 4f 4e 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 ON >> versions.v
5cb0: 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 5b 65 c].!endif.!if [e
5cc0: 63 68 6f 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 cho TK_RELEASE_S
5cd0: 45 52 49 41 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 ERIAL = \>> vers
5ce0: 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 ions.vc] \. &&
5cf0: 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 [$(NMAKEHLP_NAT
5d00: 49 56 45 29 20 2d 56 20 22 24 28 5f 54 4b 5f 48 IVE) -V "$(_TK_H
5d10: 29 22 20 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 )" TK_RELEASE_SE
5d20: 52 49 41 4c 20 3e 3e 20 76 65 72 73 69 6f 6e 73 RIAL >> versions
5d30: 2e 76 63 5d 0a 21 65 6e 64 69 66 0a 21 69 66 20 .vc].!endif.!if
5d40: 5b 65 63 68 6f 20 54 4b 5f 50 41 54 43 48 5f 4c [echo TK_PATCH_L
5d50: 45 56 45 4c 20 3d 20 5c 3e 3e 20 76 65 72 73 69 EVEL = \>> versi
5d60: 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 20 26 26 20 ons.vc] \. &&
5d70: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
5d80: 56 45 29 20 2d 56 20 24 28 5f 54 4b 5f 48 29 20 VE) -V $(_TK_H)
5d90: 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c 20 3e TK_PATCH_LEVEL >
5da0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
5db0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 20 5f endif.!endif # _
5dc0: 54 4b 5f 48 0a 0a 21 69 6e 63 6c 75 64 65 20 76 TK_H..!include v
5dd0: 65 72 73 69 6f 6e 73 2e 76 63 0a 0a 54 43 4c 5f ersions.vc..TCL_
5de0: 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 43 4c 5f VERSION.= $(TCL_
5df0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 24 28 MAJOR_VERSION)$(
5e00: 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f TCL_MINOR_VERSIO
5e10: 4e 29 0a 54 43 4c 5f 44 4f 54 56 45 52 53 49 4f N).TCL_DOTVERSIO
5e20: 4e 09 3d 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f N.= $(TCL_MAJOR_
5e30: 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 4c 5f 4d VERSION).$(TCL_M
5e40: 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 21 69 INOR_VERSION).!i
5e50: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
5e60: 54 49 56 45 29 20 2d 66 20 24 28 54 43 4c 5f 50 TIVE) -f $(TCL_P
5e70: 41 54 43 48 5f 4c 45 56 45 4c 29 20 22 61 22 5d ATCH_LEVEL) "a"]
5e80: 0a 54 43 4c 5f 50 41 54 43 48 5f 4c 45 54 54 45 .TCL_PATCH_LETTE
5e90: 52 20 3d 20 61 0a 21 65 6c 73 65 69 66 20 5b 24 R = a.!elseif [$
5ea0: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
5eb0: 29 20 2d 66 20 24 28 54 43 4c 5f 50 41 54 43 48 ) -f $(TCL_PATCH
5ec0: 5f 4c 45 56 45 4c 29 20 22 62 22 5d 0a 54 43 4c _LEVEL) "b"].TCL
5ed0: 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 _PATCH_LETTER =
5ee0: 62 0a 21 65 6c 73 65 0a 54 43 4c 5f 50 41 54 43 b.!else.TCL_PATC
5ef0: 48 5f 4c 45 54 54 45 52 20 3d 20 2e 0a 21 65 6e H_LETTER = ..!en
5f00: 64 69 66 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 dif..!if defined
5f10: 28 5f 54 4b 5f 48 29 0a 0a 54 4b 5f 56 45 52 53 (_TK_H)..TK_VERS
5f20: 49 4f 4e 09 3d 20 24 28 54 4b 5f 4d 41 4a 4f 52 ION.= $(TK_MAJOR
5f30: 5f 56 45 52 53 49 4f 4e 29 24 28 54 4b 5f 4d 49 _VERSION)$(TK_MI
5f40: 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 54 4b 5f NOR_VERSION).TK_
5f50: 44 4f 54 56 45 52 53 49 4f 4e 09 3d 20 24 28 54 DOTVERSION.= $(T
5f60: 4b 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 K_MAJOR_VERSION)
5f70: 2e 24 28 54 4b 5f 4d 49 4e 4f 52 5f 56 45 52 53 .$(TK_MINOR_VERS
5f80: 49 4f 4e 29 0a 21 69 66 20 5b 24 28 4e 4d 41 4b ION).!if [$(NMAK
5f90: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 EHLP_NATIVE) -f
5fa0: 24 28 54 4b 5f 50 41 54 43 48 5f 4c 45 56 45 4c $(TK_PATCH_LEVEL
5fb0: 29 20 22 61 22 5d 0a 54 4b 5f 50 41 54 43 48 5f ) "a"].TK_PATCH_
5fc0: 4c 45 54 54 45 52 20 3d 20 61 0a 21 65 6c 73 65 LETTER = a.!else
5fd0: 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e if [$(NMAKEHLP_N
5fe0: 41 54 49 56 45 29 20 2d 66 20 24 28 54 4b 5f 50 ATIVE) -f $(TK_P
5ff0: 41 54 43 48 5f 4c 45 56 45 4c 29 20 22 62 22 5d ATCH_LEVEL) "b"]
6000: 0a 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 .TK_PATCH_LETTER
6010: 20 3d 20 62 0a 21 65 6c 73 65 0a 54 4b 5f 50 41 = b.!else.TK_PA
6020: 54 43 48 5f 4c 45 54 54 45 52 20 3d 20 2e 0a 21 TCH_LETTER = ..!
6030: 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 0a 0a 23 endif..!endif..#
6040: 20 53 65 74 20 44 4f 54 56 45 52 53 49 4f 4e 20 Set DOTVERSION
6050: 61 6e 64 20 56 45 52 53 49 4f 4e 0a 21 69 66 20 and VERSION.!if
6060: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 44 4f $(DOING_TCL)..DO
6070: 54 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 43 4c TVERSION = $(TCL
6080: 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 2e _MAJOR_VERSION).
6090: 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 $(TCL_MINOR_VERS
60a0: 49 4f 4e 29 0a 56 45 52 53 49 4f 4e 20 3d 20 24 ION).VERSION = $
60b0: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 0a 0a 21 (TCL_VERSION)..!
60c0: 65 6c 73 65 69 66 20 24 28 44 4f 49 4e 47 5f 54 elseif $(DOING_T
60d0: 4b 29 0a 0a 44 4f 54 56 45 52 53 49 4f 4e 20 3d K)..DOTVERSION =
60e0: 20 24 28 54 4b 5f 44 4f 54 56 45 52 53 49 4f 4e $(TK_DOTVERSION
60f0: 29 0a 56 45 52 53 49 4f 4e 20 3d 20 24 28 54 4b ).VERSION = $(TK
6100: 5f 56 45 52 53 49 4f 4e 29 0a 0a 21 65 6c 73 65 _VERSION)..!else
6110: 20 23 20 44 6f 69 6e 67 20 61 20 6e 6f 6e 2d 54 # Doing a non-T
6120: 6b 20 65 78 74 65 6e 73 69 6f 6e 0a 0a 23 20 49 k extension..# I
6130: 66 20 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c f parent makefil
6140: 65 20 68 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 e has not define
6150: 64 20 44 4f 54 56 45 52 53 49 4f 4e 2c 20 74 72 d DOTVERSION, tr
6160: 79 20 74 6f 20 67 65 74 20 69 74 20 66 72 6f 6d y to get it from
6170: 20 54 45 41 0a 23 20 66 69 72 73 74 20 66 72 6f TEA.# first fro
6180: 6d 20 61 20 63 6f 6e 66 69 67 75 72 65 2e 69 6e m a configure.in
6190: 20 66 69 6c 65 2c 20 61 6e 64 20 74 68 65 6e 20 file, and then
61a0: 66 72 6f 6d 20 63 6f 6e 66 69 67 75 72 65 2e 61 from configure.a
61b0: 63 0a 21 69 66 6e 64 65 66 20 44 4f 54 56 45 52 c.!ifndef DOTVER
61c0: 53 49 4f 4e 0a 21 69 66 20 5b 65 63 68 6f 20 44 SION.!if [echo D
61d0: 4f 54 56 45 52 53 49 4f 4e 20 3d 20 5c 3e 20 76 OTVERSION = \> v
61e0: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0a 20 20 ersions.vc] \.
61f0: 20 7c 7c 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f || [$(NMAKEHLP_
6200: 4e 41 54 49 56 45 29 20 2d 56 20 24 28 52 4f 4f NATIVE) -V $(ROO
6210: 54 29 5c 63 6f 6e 66 69 67 75 72 65 2e 69 6e 20 T)\configure.in
6220: 5e 5b 24 28 50 52 4f 4a 45 43 54 29 5e 5d 20 3e ^[$(PROJECT)^] >
6230: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0a 21 > versions.vc].!
6240: 69 66 20 5b 65 63 68 6f 20 44 4f 54 56 45 52 53 if [echo DOTVERS
6250: 49 4f 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e ION = \> version
6260: 73 2e 76 63 5d 20 5c 0a 20 20 20 7c 7c 20 5b 24 s.vc] \. || [$
6270: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
6280: 29 20 2d 56 20 24 28 52 4f 4f 54 29 5c 63 6f 6e ) -V $(ROOT)\con
6290: 66 69 67 75 72 65 2e 61 63 20 5e 5b 24 28 50 52 figure.ac ^[$(PR
62a0: 4f 4a 45 43 54 29 5e 5d 20 3e 3e 20 76 65 72 73 OJECT)^] >> vers
62b0: 69 6f 6e 73 2e 76 63 5d 0a 21 65 72 72 6f 72 20 ions.vc].!error
62c0: 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 66 69 *** Could not fi
62d0: 67 75 72 65 20 6f 75 74 20 65 78 74 65 6e 73 69 gure out extensi
62e0: 6f 6e 20 76 65 72 73 69 6f 6e 2e 20 50 6c 65 61 on version. Plea
62f0: 73 65 20 64 65 66 69 6e 65 20 44 4f 54 56 45 52 se define DOTVER
6300: 53 49 4f 4e 20 69 6e 20 70 61 72 65 6e 74 20 6d SION in parent m
6310: 61 6b 65 66 69 6c 65 20 62 65 66 6f 72 65 20 69 akefile before i
6320: 6e 63 6c 75 64 69 6e 67 20 72 75 6c 65 73 2e 76 ncluding rules.v
6330: 63 2e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 c..!endif.!endif
6340: 0a 21 69 6e 63 6c 75 64 65 20 76 65 72 73 69 6f .!include versio
6350: 6e 73 2e 76 63 0a 21 65 6e 64 69 66 20 23 20 44 ns.vc.!endif # D
6360: 4f 54 56 45 52 53 49 4f 4e 0a 56 45 52 53 49 4f OTVERSION.VERSIO
6370: 4e 20 20 20 20 20 20 20 20 20 3d 20 24 28 44 4f N = $(DO
6380: 54 56 45 52 53 49 4f 4e 3a 2e 3d 29 0a 0a 21 65 TVERSION:.=)..!e
6390: 6e 64 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 ndif # $(DOING_T
63a0: 43 4c 29 20 2e 2e 2e 20 65 74 63 2e 0a 0a 23 20 CL) ... etc...#
63b0: 57 69 6e 64 6f 77 73 20 52 43 20 66 69 6c 65 73 Windows RC files
63c0: 20 68 61 76 65 20 33 20 76 65 72 73 69 6f 6e 20 have 3 version
63d0: 63 6f 6d 70 6f 6e 65 6e 74 73 2e 20 45 6e 73 75 components. Ensu
63e0: 72 65 20 74 68 69 73 20 69 72 72 65 73 70 65 63 re this irrespec
63f0: 74 69 76 65 0a 23 20 6f 66 20 68 6f 77 20 6d 61 tive.# of how ma
6400: 6e 79 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 74 68 ny components th
6410: 65 20 70 61 63 6b 61 67 65 20 68 61 73 20 73 70 e package has sp
6420: 65 63 69 66 69 65 64 2e 20 42 61 73 69 63 61 6c ecified. Basical
6430: 6c 79 2c 20 65 6e 73 75 72 65 0a 23 20 6d 69 6e ly, ensure.# min
6440: 69 6d 75 6d 20 34 20 63 6f 6d 70 6f 6e 65 6e 74 imum 4 component
6450: 73 20 62 79 20 61 70 70 65 6e 64 69 6e 67 20 34 s by appending 4
6460: 20 30 27 73 20 61 6e 64 20 74 68 65 6e 20 70 69 0's and then pi
6470: 63 6b 20 6f 75 74 20 74 68 65 20 66 69 72 73 74 ck out the first
6480: 20 34 2e 0a 23 20 41 6c 73 6f 20 74 61 6b 65 20 4..# Also take
6490: 63 61 72 65 20 6f 66 20 74 68 65 20 66 61 63 74 care of the fact
64a0: 20 74 68 61 74 20 44 4f 54 56 45 52 53 49 4f 4e that DOTVERSION
64b0: 20 6d 61 79 20 68 61 76 65 20 22 61 22 20 6f 72 may have "a" or
64c0: 20 22 62 22 20 69 6e 73 74 65 61 64 0a 23 20 6f "b" instead.# o
64d0: 66 20 22 2e 22 20 73 65 70 61 72 61 74 69 6e 67 f "." separating
64e0: 20 74 68 65 20 76 65 72 73 69 6f 6e 20 63 6f 6d the version com
64f0: 70 6f 6e 65 6e 74 73 2e 0a 44 4f 54 53 45 50 41 ponents..DOTSEPA
6500: 52 41 54 45 44 3d 24 28 44 4f 54 56 45 52 53 49 RATED=$(DOTVERSI
6510: 4f 4e 3a 61 3d 2e 29 0a 44 4f 54 53 45 50 41 52 ON:a=.).DOTSEPAR
6520: 41 54 45 44 3d 24 28 44 4f 54 53 45 50 41 52 41 ATED=$(DOTSEPARA
6530: 54 45 44 3a 62 3d 2e 29 0a 21 69 66 20 5b 65 63 TED:b=.).!if [ec
6540: 68 6f 20 52 43 43 4f 4d 4d 41 56 45 52 53 49 4f ho RCCOMMAVERSIO
6550: 4e 20 3d 20 5c 3e 20 76 65 72 73 69 6f 6e 73 2e N = \> versions.
6560: 76 63 5d 20 5c 0a 20 20 7c 7c 20 5b 66 6f 72 20 vc] \. || [for
6570: 2f 66 20 22 74 6f 6b 65 6e 73 3d 31 2c 32 2c 33 /f "tokens=1,2,3
6580: 2c 34 2c 35 2a 20 64 65 6c 69 6d 73 3d 2e 22 20 ,4,5* delims=."
6590: 25 61 20 69 6e 20 28 22 24 28 44 4f 54 53 45 50 %a in ("$(DOTSEP
65a0: 41 52 41 54 45 44 29 2e 30 2e 30 2e 30 2e 30 22 ARATED).0.0.0.0"
65b0: 29 20 64 6f 20 40 65 63 68 6f 20 25 61 2c 25 62 ) do @echo %a,%b
65c0: 2c 25 63 2c 25 64 20 3e 3e 20 76 65 72 73 69 6f ,%c,%d >> versio
65d0: 6e 73 2e 76 63 5d 0a 21 65 72 72 6f 72 20 2a 2a ns.vc].!error **
65e0: 2a 20 43 6f 75 6c 64 20 6e 6f 74 20 67 65 6e 65 * Could not gene
65f0: 72 61 74 65 20 52 43 43 4f 4d 4d 41 56 45 52 53 rate RCCOMMAVERS
6600: 49 4f 4e 20 2a 2a 2a 0a 21 65 6e 64 69 66 0a 21 ION ***.!endif.!
6610: 69 6e 63 6c 75 64 65 20 76 65 72 73 69 6f 6e 73 include versions
6620: 2e 76 63 0a 0a 23 23 23 23 23 23 23 23 23 23 23 .vc..###########
6630: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6640: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6650: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
6660: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 #############.#
6670: 37 2e 20 50 61 72 73 65 20 74 68 65 20 4f 50 54 7. Parse the OPT
6680: 53 20 6d 61 63 72 6f 20 74 6f 20 77 6f 72 6b 20 S macro to work
6690: 6f 75 74 20 74 68 65 20 72 65 71 75 65 73 74 65 out the requeste
66a0: 64 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 72 d build configur
66b0: 61 74 69 6f 6e 2e 0a 23 20 42 61 73 65 64 20 6f ation..# Based o
66c0: 6e 20 74 68 69 73 2c 20 77 65 20 77 69 6c 6c 20 n this, we will
66d0: 63 6f 6e 73 74 72 75 63 74 20 74 68 65 20 61 63 construct the ac
66e0: 74 75 61 6c 20 73 77 69 74 63 68 65 73 20 74 6f tual switches to
66f0: 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 be passed to th
6700: 65 0a 23 20 63 6f 6d 70 69 6c 65 72 20 61 6e 64 e.# compiler and
6710: 20 6c 69 6e 6b 65 72 20 75 73 69 6e 67 20 74 68 linker using th
6720: 65 20 6d 61 63 72 6f 73 20 64 65 66 69 6e 65 64 e macros defined
6730: 20 69 6e 20 74 68 65 20 70 72 65 76 69 6f 75 73 in the previous
6740: 20 73 65 63 74 69 6f 6e 2e 0a 23 20 54 68 65 20 section..# The
6750: 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 following macros
6760: 20 61 72 65 20 64 65 66 69 6e 65 64 20 62 79 20 are defined by
6770: 74 68 69 73 20 73 65 63 74 69 6f 6e 20 62 61 73 this section bas
6780: 65 64 20 6f 6e 20 4f 50 54 53 0a 23 20 53 54 41 ed on OPTS.# STA
6790: 54 49 43 5f 42 55 49 4c 44 20 2d 20 30 20 2d 3e TIC_BUILD - 0 ->
67a0: 20 54 63 6c 20 69 73 20 74 6f 20 62 65 20 62 75 Tcl is to be bu
67b0: 69 6c 74 20 61 73 20 61 20 73 68 61 72 65 64 20 ilt as a shared
67c0: 6c 69 62 72 61 72 79 0a 23 20 20 20 20 20 20 20 library.#
67d0: 20 20 20 20 20 20 20 20 20 31 20 2d 3e 20 62 75 1 -> bu
67e0: 69 6c 64 20 61 73 20 61 20 73 74 61 74 69 63 20 ild as a static
67f0: 6c 69 62 72 61 72 79 20 61 6e 64 20 73 68 65 6c library and shel
6800: 6c 0a 23 20 54 43 4c 5f 54 48 52 45 41 44 53 20 l.# TCL_THREADS
6810: 2d 20 6c 65 67 61 63 79 20 62 75 74 20 61 6c 77 - legacy but alw
6820: 61 79 73 20 31 20 6f 6e 20 57 69 6e 64 6f 77 73 ays 1 on Windows
6830: 20 73 69 6e 63 65 20 77 69 6e 73 6f 63 6b 20 72 since winsock r
6840: 65 71 75 69 72 65 73 20 69 74 2e 0a 23 20 44 45 equires it..# DE
6850: 42 55 47 20 2d 20 31 20 2d 3e 20 64 65 62 75 67 BUG - 1 -> debug
6860: 20 62 75 69 6c 64 2c 20 30 20 2d 3e 20 72 65 6c build, 0 -> rel
6870: 65 61 73 65 20 62 75 69 6c 64 73 0a 23 20 53 59 ease builds.# SY
6880: 4d 42 4f 4c 53 20 2d 20 31 20 2d 3e 20 67 65 6e MBOLS - 1 -> gen
6890: 65 72 61 74 65 20 50 44 42 27 73 2c 20 30 20 2d erate PDB's, 0 -
68a0: 3e 20 6e 6f 20 50 44 42 27 73 0a 23 20 50 52 4f > no PDB's.# PRO
68b0: 46 49 4c 45 20 2d 20 31 20 2d 3e 20 67 65 6e 65 FILE - 1 -> gene
68c0: 72 61 74 65 20 70 72 6f 66 69 6c 69 6e 67 20 69 rate profiling i
68d0: 6e 66 6f 2c 20 30 20 2d 3e 20 6e 6f 20 70 72 6f nfo, 0 -> no pro
68e0: 66 69 6c 69 6e 67 0a 23 20 50 47 4f 20 20 20 20 filing.# PGO
68f0: 20 2d 20 31 20 2d 3e 20 70 72 6f 66 69 6c 65 20 - 1 -> profile
6900: 62 61 73 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 based optimizati
6910: 6f 6e 2c 20 30 20 2d 3e 20 6e 6f 0a 23 20 4d 53 on, 0 -> no.# MS
6920: 56 43 52 54 20 20 2d 20 31 20 2d 3e 20 6c 69 6e VCRT - 1 -> lin
6930: 6b 20 74 6f 20 64 79 6e 61 6d 69 63 20 43 20 72 k to dynamic C r
6940: 75 6e 74 69 6d 65 20 65 76 65 6e 20 77 68 65 6e untime even when
6950: 20 62 75 69 6c 64 69 6e 67 20 73 74 61 74 69 63 building static
6960: 20 54 63 6c 20 62 75 69 6c 64 0a 23 20 20 20 20 Tcl build.#
6970: 20 20 20 20 20 20 20 30 20 2d 3e 20 6c 69 6e 6b 0 -> link
6980: 20 74 6f 20 73 74 61 74 69 63 20 43 20 72 75 6e to static C run
6990: 74 69 6d 65 20 66 6f 72 20 73 74 61 74 69 63 20 time for static
69a0: 54 63 6c 20 62 75 69 6c 64 2e 0a 23 20 20 20 20 Tcl build..#
69b0: 20 20 20 20 20 20 20 44 6f 65 73 20 6e 6f 74 20 Does not
69c0: 69 6d 70 61 63 74 20 73 68 61 72 65 64 20 54 63 impact shared Tc
69d0: 6c 20 62 75 69 6c 64 73 20 28 53 54 41 54 49 43 l builds (STATIC
69e0: 5f 42 55 49 4c 44 20 3d 3d 20 30 29 0a 23 20 20 _BUILD == 0).#
69f0: 20 20 20 20 20 20 20 20 20 44 65 66 61 75 6c 74 Default
6a00: 3a 20 31 20 66 6f 72 20 54 63 6c 20 39 2e 30 20 : 1 for Tcl 9.0
6a10: 61 6e 64 20 75 70 2c 20 30 20 6f 74 68 65 72 77 and up, 0 otherw
6a20: 69 73 65 2e 0a 23 20 54 43 4c 5f 55 53 45 5f 53 ise..# TCL_USE_S
6a30: 54 41 54 49 43 5f 50 41 43 4b 41 47 45 53 20 2d TATIC_PACKAGES -
6a40: 20 31 20 2d 3e 20 73 74 61 74 69 63 61 6c 6c 79 1 -> statically
6a50: 20 6c 69 6e 6b 20 74 68 65 20 72 65 67 69 73 74 link the regist
6a60: 72 79 20 61 6e 64 20 64 64 65 20 65 78 74 65 6e ry and dde exten
6a70: 73 69 6f 6e 73 0a 23 20 20 20 20 20 20 20 20 20 sions.#
6a80: 20 20 69 6e 20 74 68 65 20 54 63 6c 20 61 6e 64 in the Tcl and
6a90: 20 57 69 73 68 20 73 68 65 6c 6c 2e 20 30 20 2d Wish shell. 0 -
6aa0: 3e 20 6b 65 65 70 20 74 68 65 6d 20 61 73 20 73 > keep them as s
6ab0: 68 61 72 65 64 20 6c 69 62 72 61 72 69 65 73 2e hared libraries.
6ac0: 20 44 6f 65 73 0a 23 20 20 20 20 20 20 20 20 20 Does.#
6ad0: 20 20 6e 6f 74 20 69 6d 70 61 63 74 20 73 68 61 not impact sha
6ae0: 72 65 64 20 54 63 6c 20 62 75 69 6c 64 73 2e 20 red Tcl builds.
6af0: 49 6d 70 6c 69 65 64 20 62 79 20 53 54 41 54 49 Implied by STATI
6b00: 43 5f 42 55 49 4c 44 20 73 69 6e 63 65 20 54 63 C_BUILD since Tc
6b10: 6c 20 39 2e 30 2e 0a 23 20 55 53 45 5f 54 48 52 l 9.0..# USE_THR
6b20: 45 41 44 5f 41 4c 4c 4f 43 20 2d 20 31 20 2d 3e EAD_ALLOC - 1 ->
6b30: 20 55 73 65 20 61 20 73 68 61 72 65 64 20 67 6c Use a shared gl
6b40: 6f 62 61 6c 20 66 72 65 65 20 70 6f 6f 6c 20 66 obal free pool f
6b50: 6f 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 2e 0a 23 or allocation..#
6b60: 20 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 0 ->
6b70: 55 73 65 20 74 68 65 20 6e 6f 6e 2d 74 68 72 65 Use the non-thre
6b80: 61 64 20 61 6c 6c 6f 63 61 74 6f 72 2e 0a 23 20 ad allocator..#
6b90: 55 4e 43 48 45 43 4b 45 44 20 2d 20 31 20 2d 3e UNCHECKED - 1 ->
6ba0: 20 77 68 65 6e 20 64 6f 69 6e 67 20 61 20 64 65 when doing a de
6bb0: 62 75 67 20 62 75 69 6c 64 20 77 69 74 68 20 73 bug build with s
6bc0: 79 6d 62 6f 6c 73 2c 20 75 73 65 20 74 68 65 20 ymbols, use the
6bd0: 72 65 6c 65 61 73 65 0a 23 20 20 20 20 20 20 20 release.#
6be0: 20 20 20 20 43 20 72 75 6e 74 69 6d 65 2c 20 30 C runtime, 0
6bf0: 20 2d 3e 20 75 73 65 20 74 68 65 20 64 65 62 75 -> use the debu
6c00: 67 20 43 20 72 75 6e 74 69 6d 65 2e 0a 23 20 55 g C runtime..# U
6c10: 53 45 5f 53 54 55 42 53 20 2d 20 31 20 2d 3e 20 SE_STUBS - 1 ->
6c20: 63 6f 6d 70 69 6c 65 20 74 6f 20 75 73 65 20 73 compile to use s
6c30: 74 75 62 73 20 69 6e 74 65 72 66 61 63 65 73 2c tubs interfaces,
6c40: 20 30 20 2d 3e 20 64 69 72 65 63 74 20 6c 69 6e 0 -> direct lin
6c50: 6b 69 6e 67 0a 23 20 43 4f 4e 46 49 47 5f 43 48 king.# CONFIG_CH
6c60: 45 43 4b 20 2d 20 31 20 2d 3e 20 63 68 65 63 6b ECK - 1 -> check
6c70: 20 63 75 72 72 65 6e 74 20 62 75 69 6c 64 20 63 current build c
6c80: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 67 61 onfiguration aga
6c90: 69 6e 73 74 20 54 63 6c 0a 23 20 20 20 20 20 20 inst Tcl.#
6ca0: 20 20 20 20 20 63 6f 6e 66 69 67 75 72 61 74 69 configurati
6cb0: 6f 6e 20 28 69 67 6e 6f 72 65 64 20 66 6f 72 20 on (ignored for
6cc0: 54 63 6c 20 69 74 73 65 6c 66 29 0a 23 20 5f 55 Tcl itself).# _U
6cd0: 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 5f 54 20 SE_64BIT_TIME_T
6ce0: 2d 20 66 6f 72 63 65 73 20 61 20 62 75 69 6c 64 - forces a build
6cf0: 20 75 73 69 6e 67 20 36 34 2d 62 69 74 20 74 69 using 64-bit ti
6d00: 6d 65 5f 74 20 66 6f 72 20 33 32 2d 62 69 74 20 me_t for 32-bit
6d10: 62 75 69 6c 64 0a 23 20 20 20 20 20 20 20 20 20 build.#
6d20: 20 20 28 43 52 54 20 6c 69 62 72 61 72 79 20 73 (CRT library s
6d30: 68 6f 75 6c 64 20 73 75 70 70 6f 72 74 20 74 68 hould support th
6d40: 69 73 2c 20 6e 6f 74 20 6e 65 65 64 65 64 20 66 is, not needed f
6d50: 6f 72 20 54 63 6c 20 39 2e 78 29 0a 23 20 46 75 or Tcl 9.x).# Fu
6d60: 72 74 68 65 72 2c 20 4c 49 4e 4b 45 52 46 4c 41 rther, LINKERFLA
6d70: 47 53 20 61 72 65 20 6d 6f 64 69 66 69 65 64 20 GS are modified
6d80: 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 2e 0a based on above..
6d90: 0a 23 20 44 65 66 61 75 6c 74 20 76 61 6c 75 65 .# Default value
6da0: 73 20 66 6f 72 20 61 6c 6c 20 74 68 65 20 61 62 s for all the ab
6db0: 6f 76 65 0a 53 54 41 54 49 43 5f 42 55 49 4c 44 ove.STATIC_BUILD
6dc0: 09 3d 20 30 0a 54 43 4c 5f 54 48 52 45 41 44 53 .= 0.TCL_THREADS
6dd0: 09 3d 20 31 0a 44 45 42 55 47 09 09 3d 20 30 0a .= 1.DEBUG..= 0.
6de0: 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 50 52 4f SYMBOLS..= 0.PRO
6df0: 46 49 4c 45 09 09 3d 20 30 0a 50 47 4f 09 09 3d FILE..= 0.PGO..=
6e00: 20 30 0a 4d 53 56 43 52 54 09 09 3d 20 31 0a 54 0.MSVCRT..= 1.T
6e10: 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 41 CL_USE_STATIC_PA
6e20: 43 4b 41 47 45 53 09 3d 20 30 0a 55 53 45 5f 54 CKAGES.= 0.USE_T
6e30: 48 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 31 0a HREAD_ALLOC = 1.
6e40: 55 4e 43 48 45 43 4b 45 44 09 3d 20 30 0a 43 4f UNCHECKED.= 0.CO
6e50: 4e 46 49 47 5f 43 48 45 43 4b 20 20 20 20 3d 20 NFIG_CHECK =
6e60: 31 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 1.!if $(DOING_TC
6e70: 4c 29 0a 55 53 45 5f 53 54 55 42 53 20 20 20 20 L).USE_STUBS
6e80: 20 20 20 3d 20 30 0a 21 65 6c 73 65 0a 55 53 45 = 0.!else.USE
6e90: 5f 53 54 55 42 53 20 20 20 20 20 20 20 3d 20 31 _STUBS = 1
6ea0: 0a 21 65 6e 64 69 66 0a 56 45 52 42 4f 53 45 09 .!endif.VERBOSE.
6eb0: 09 3d 20 30 0a 0a 23 20 49 66 20 4f 50 54 53 20 .= 0..# If OPTS
6ec0: 69 73 20 6e 6f 74 20 65 6d 70 74 79 20 41 4e 44 is not empty AND
6ed0: 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 does not contai
6ee0: 6e 20 22 6e 6f 6e 65 22 20 77 68 69 63 68 20 74 n "none" which t
6ef0: 75 72 6e 73 20 6f 66 66 20 61 6c 6c 20 4f 50 54 urns off all OPT
6f00: 53 0a 23 20 73 65 74 20 74 68 65 20 61 62 6f 76 S.# set the abov
6f10: 65 20 6d 61 63 72 6f 73 20 62 61 73 65 64 20 6f e macros based o
6f20: 6e 20 4f 50 54 53 20 63 6f 6e 74 65 6e 74 0a 21 n OPTS content.!
6f30: 69 66 20 22 24 28 4f 50 54 53 29 22 20 21 3d 20 if "$(OPTS)" !=
6f40: 22 22 20 26 26 20 21 5b 24 28 4e 4d 41 4b 45 48 "" && ![$(NMAKEH
6f50: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 22 24 LP_NATIVE) -f "$
6f60: 28 4f 50 54 53 29 22 20 22 6e 6f 6e 65 22 5d 0a (OPTS)" "none"].
6f70: 0a 23 20 4f 50 54 53 20 61 72 65 20 73 70 65 63 .# OPTS are spec
6f80: 69 66 69 65 64 2c 20 70 61 72 73 65 20 74 68 65 ified, parse the
6f90: 6d 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 m..!if [$(NMAKEH
6fa0: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 LP_NATIVE) -f $(
6fb0: 4f 50 54 53 29 20 22 73 74 61 74 69 63 22 5d 0a OPTS) "static"].
6fc0: 53 54 41 54 49 43 5f 42 55 49 4c 44 09 3d 20 31 STATIC_BUILD.= 1
6fd0: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 .!endif..!if [$(
6fe0: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
6ff0: 20 2d 66 20 24 28 4f 50 54 53 29 20 22 6e 6f 73 -f $(OPTS) "nos
7000: 74 75 62 73 22 5d 0a 55 53 45 5f 53 54 55 42 53 tubs"].USE_STUBS
7010: 09 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 .= 0.!endif..!if
7020: 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 [$(NMAKEHLP_NAT
7030: 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 IVE) -f $(OPTS)
7040: 22 6e 6f 6d 73 76 63 72 74 22 5d 0a 4d 53 56 43 "nomsvcrt"].MSVC
7050: 52 54 09 09 3d 20 30 0a 21 65 6c 73 65 0a 21 69 RT..= 0.!else.!i
7060: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
7070: 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 TIVE) -f $(OPTS)
7080: 20 22 6d 73 76 63 72 74 22 5d 0a 21 65 6c 73 65 "msvcrt"].!else
7090: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 .!if $(TCL_MAJOR
70a0: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 20 26 _VERSION) == 8 &
70b0: 26 20 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f 56 45 & $(TCL_MINOR_VE
70c0: 52 53 49 4f 4e 29 20 3c 20 37 20 26 26 20 24 28 RSION) < 7 && $(
70d0: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a 4d 53 STATIC_BUILD).MS
70e0: 56 43 52 54 09 09 3d 20 30 0a 21 65 6e 64 69 66 VCRT..= 0.!endif
70f0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
7100: 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 [$(NMAKEHLP_NAT
7110: 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 IVE) -f $(OPTS)
7120: 22 6e 6f 6d 73 76 63 72 74 22 5d 0a 0a 21 69 66 "nomsvcrt"]..!if
7130: 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 [$(NMAKEHLP_NAT
7140: 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 IVE) -f $(OPTS)
7150: 22 73 74 61 74 69 63 70 6b 67 22 5d 20 26 26 20 "staticpkg"] &&
7160: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a $(STATIC_BUILD).
7170: 54 43 4c 5f 55 53 45 5f 53 54 41 54 49 43 5f 50 TCL_USE_STATIC_P
7180: 41 43 4b 41 47 45 53 09 3d 20 31 0a 21 65 6e 64 ACKAGES.= 1.!end
7190: 69 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 if..!if [$(NMAKE
71a0: 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 HLP_NATIVE) -f $
71b0: 28 4f 50 54 53 29 20 22 6e 6f 74 68 72 65 61 64 (OPTS) "nothread
71c0: 73 22 5d 0a 54 43 4c 5f 54 48 52 45 41 44 53 20 s"].TCL_THREADS
71d0: 3d 20 30 0a 55 53 45 5f 54 48 52 45 41 44 5f 41 = 0.USE_THREAD_A
71e0: 4c 4c 4f 43 3d 20 30 0a 21 65 6e 64 69 66 0a 0a LLOC= 0.!endif..
71f0: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
7200: 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 NATIVE) -f $(OPT
7210: 53 29 20 22 74 63 6c 38 22 5d 0a 54 43 4c 5f 42 S) "tcl8"].TCL_B
7220: 55 49 4c 44 5f 46 4f 52 20 3d 20 38 0a 21 65 6e UILD_FOR = 8.!en
7230: 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d dif..!if $(TCL_M
7240: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d AJOR_VERSION) ==
7250: 20 38 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 8.!if [$(NMAKEH
7260: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 LP_NATIVE) -f $(
7270: 4f 50 54 53 29 20 22 74 69 6d 65 36 34 62 69 74 OPTS) "time64bit
7280: 22 5d 0a 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 "]._USE_64BIT_TI
7290: 4d 45 5f 54 20 3d 20 31 0a 21 65 6e 64 69 66 0a ME_T = 1.!endif.
72a0: 21 65 6e 64 69 66 0a 0a 23 20 59 65 73 2c 20 69 !endif..# Yes, i
72b0: 74 27 73 20 77 65 69 72 64 20 74 68 61 74 20 74 t's weird that t
72c0: 68 65 20 22 73 79 6d 62 6f 6c 73 22 20 6f 70 74 he "symbols" opt
72d0: 69 6f 6e 20 63 6f 6e 74 72 6f 6c 73 20 44 45 42 ion controls DEB
72e0: 55 47 20 61 6e 64 0a 23 20 74 68 65 20 22 70 64 UG and.# the "pd
72f0: 62 73 22 20 6f 70 74 69 6f 6e 20 63 6f 6e 74 72 bs" option contr
7300: 6f 6c 73 20 53 59 4d 42 4f 4c 53 2e 20 54 68 61 ols SYMBOLS. Tha
7310: 74 27 73 20 68 69 73 74 6f 72 69 63 61 6c 2e 0a t's historical..
7320: 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f !if [$(NMAKEHLP_
7330: 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f 50 54 NATIVE) -f $(OPT
7340: 53 29 20 22 73 79 6d 62 6f 6c 73 22 5d 0a 44 45 S) "symbols"].DE
7350: 42 55 47 09 09 3d 20 31 0a 21 65 6c 73 65 0a 44 BUG..= 1.!else.D
7360: 45 42 55 47 09 09 3d 20 30 0a 21 65 6e 64 69 66 EBUG..= 0.!endif
7370: 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c ..!if [$(NMAKEHL
7380: 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f P_NATIVE) -f $(O
7390: 50 54 53 29 20 22 70 64 62 73 22 5d 0a 53 59 4d PTS) "pdbs"].SYM
73a0: 42 4f 4c 53 09 09 3d 20 31 0a 21 65 6c 73 65 0a BOLS..= 1.!else.
73b0: 53 59 4d 42 4f 4c 53 09 09 3d 20 30 0a 21 65 6e SYMBOLS..= 0.!en
73c0: 64 69 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b dif..!if [$(NMAK
73d0: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 EHLP_NATIVE) -f
73e0: 24 28 4f 50 54 53 29 20 22 70 72 6f 66 69 6c 65 $(OPTS) "profile
73f0: 22 5d 0a 50 52 4f 46 49 4c 45 09 09 3d 20 31 0a "].PROFILE..= 1.
7400: 21 65 6c 73 65 0a 50 52 4f 46 49 4c 45 09 09 3d !else.PROFILE..=
7410: 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b 0.!endif..!if [
7420: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
7430: 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 22 70 E) -f $(OPTS) "p
7440: 67 69 22 5d 0a 50 47 4f 09 09 3d 20 31 0a 21 65 gi"].PGO..= 1.!e
7450: 6c 73 65 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c lseif [$(NMAKEHL
7460: 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f P_NATIVE) -f $(O
7470: 50 54 53 29 20 22 70 67 6f 22 5d 0a 50 47 4f 09 PTS) "pgo"].PGO.
7480: 09 3d 20 32 0a 21 65 6c 73 65 0a 50 47 4f 09 09 .= 2.!else.PGO..
7490: 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 = 0.!endif..!if
74a0: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
74b0: 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 22 VE) -f $(OPTS) "
74c0: 6c 6f 69 6d 70 61 63 74 22 5d 0a 21 6d 65 73 73 loimpact"].!mess
74d0: 61 67 65 20 2a 2a 2a 20 57 61 72 6e 69 6e 67 3a age *** Warning:
74e0: 20 69 67 6e 6f 72 69 6e 67 20 6f 70 74 69 6f 6e ignoring option
74f0: 20 22 6c 6f 69 6d 70 61 63 74 22 20 2d 20 64 65 "loimpact" - de
7500: 70 72 65 63 61 74 65 64 20 6f 6e 20 6d 6f 64 65 precated on mode
7510: 72 6e 20 57 69 6e 64 6f 77 73 2e 0a 21 65 6e 64 rn Windows..!end
7520: 69 66 0a 0a 23 20 54 42 44 20 2d 20 73 68 6f 75 if..# TBD - shou
7530: 6c 64 20 67 65 74 20 72 69 64 20 6f 66 20 74 68 ld get rid of th
7540: 69 73 20 6f 70 74 69 6f 6e 0a 21 69 66 20 5b 24 is option.!if [$
7550: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
7560: 29 20 2d 66 20 24 28 4f 50 54 53 29 20 22 74 68 ) -f $(OPTS) "th
7570: 72 64 61 6c 6c 6f 63 22 5d 0a 55 53 45 5f 54 48 rdalloc"].USE_TH
7580: 52 45 41 44 5f 41 4c 4c 4f 43 20 3d 20 31 0a 21 READ_ALLOC = 1.!
7590: 65 6e 64 69 66 0a 0a 21 69 66 20 5b 24 28 4e 4d endif..!if [$(NM
75a0: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d AKEHLP_NATIVE) -
75b0: 66 20 24 28 4f 50 54 53 29 20 22 74 63 6c 61 6c f $(OPTS) "tclal
75c0: 6c 6f 63 22 5d 0a 55 53 45 5f 54 48 52 45 41 44 loc"].USE_THREAD
75d0: 5f 41 4c 4c 4f 43 20 3d 20 30 0a 21 65 6e 64 69 _ALLOC = 0.!endi
75e0: 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 f..!if [$(NMAKEH
75f0: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 LP_NATIVE) -f $(
7600: 4f 50 54 53 29 20 22 75 6e 63 68 65 63 6b 65 64 OPTS) "unchecked
7610: 22 5d 0a 55 4e 43 48 45 43 4b 45 44 20 3d 20 31 "].UNCHECKED = 1
7620: 0a 21 65 6c 73 65 0a 55 4e 43 48 45 43 4b 45 44 .!else.UNCHECKED
7630: 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a 21 69 66 = 0.!endif..!if
7640: 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 [$(NMAKEHLP_NAT
7650: 49 56 45 29 20 2d 66 20 24 28 4f 50 54 53 29 20 IVE) -f $(OPTS)
7660: 22 6e 6f 63 6f 6e 66 69 67 63 68 65 63 6b 22 5d "noconfigcheck"]
7670: 0a 43 4f 4e 46 49 47 5f 43 48 45 43 4b 20 3d 20 .CONFIG_CHECK =
7680: 31 0a 21 65 6c 73 65 0a 43 4f 4e 46 49 47 5f 43 1.!else.CONFIG_C
7690: 48 45 43 4b 20 3d 20 30 0a 21 65 6e 64 69 66 0a HECK = 0.!endif.
76a0: 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 .!if [$(NMAKEHLP
76b0: 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 4f 50 _NATIVE) -f $(OP
76c0: 54 53 29 20 22 76 65 72 62 6f 73 65 22 5d 0a 56 TS) "verbose"].V
76d0: 45 52 42 4f 53 45 09 09 3d 20 31 0a 21 65 6c 73 ERBOSE..= 1.!els
76e0: 65 0a 56 45 52 42 4f 53 45 09 09 3d 20 30 0a 21 e.VERBOSE..= 0.!
76f0: 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 56 45 52 endif..!if $(VER
7700: 42 4f 53 45 29 0a 21 6d 65 73 73 61 67 65 20 2a BOSE).!message *
7710: 2a 2a 20 4f 50 54 53 3d 24 28 4f 50 54 53 29 0a ** OPTS=$(OPTS).
7720: 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 20 23 !endif..!endif #
7730: 20 22 24 28 4f 50 54 53 29 22 20 21 3d 20 22 22 "$(OPTS)" != ""
7740: 20 20 26 26 20 2e 2e 2e 20 70 61 72 73 69 6e 67 && ... parsing
7750: 20 6f 66 20 4f 50 54 53 0a 0a 23 20 53 65 74 20 of OPTS..# Set
7760: 6c 69 6e 6b 65 72 20 66 6c 61 67 73 20 62 61 73 linker flags bas
7770: 65 64 20 6f 6e 20 61 62 6f 76 65 0a 0a 21 69 66 ed on above..!if
7780: 20 24 28 50 47 4f 29 20 3e 20 31 0a 21 69 66 20 $(PGO) > 1.!if
7790: 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 [$(NMAKEHLP_NATI
77a0: 56 45 29 20 2d 6c 20 2d 6c 74 63 67 3a 70 67 6f VE) -l -ltcg:pgo
77b0: 70 74 69 6d 69 7a 65 20 24 28 4c 49 4e 4b 45 52 ptimize $(LINKER
77c0: 5f 54 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 4e _TESTFLAGS)].LIN
77d0: 4b 45 52 46 4c 41 47 53 09 3d 20 24 28 4c 49 4e KERFLAGS.= $(LIN
77e0: 4b 45 52 46 4c 41 47 53 3a 2d 6c 74 63 67 3d 29 KERFLAGS:-ltcg=)
77f0: 20 2d 6c 74 63 67 3a 70 67 6f 70 74 69 6d 69 7a -ltcg:pgoptimiz
7800: 65 0a 21 65 6c 73 65 0a 4d 53 47 3d 5e 0a 54 68 e.!else.MSG=^.Th
7810: 69 73 20 63 6f 6d 70 69 6c 65 72 20 64 6f 65 73 is compiler does
7820: 20 6e 6f 74 20 73 75 70 70 6f 72 74 20 70 72 6f not support pro
7830: 66 69 6c 65 20 67 75 69 64 65 64 20 6f 70 74 69 file guided opti
7840: 6d 69 7a 61 74 69 6f 6e 2e 0a 21 65 72 72 6f 72 mization..!error
7850: 20 24 28 4d 53 47 29 0a 21 65 6e 64 69 66 0a 21 $(MSG).!endif.!
7860: 65 6c 73 65 69 66 20 24 28 50 47 4f 29 20 3e 20 elseif $(PGO) >
7870: 30 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 0.!if [$(NMAKEHL
7880: 50 5f 4e 41 54 49 56 45 29 20 2d 6c 20 2d 6c 74 P_NATIVE) -l -lt
7890: 63 67 3a 70 67 69 6e 73 74 72 75 6d 65 6e 74 20 cg:pginstrument
78a0: 24 28 4c 49 4e 4b 45 52 5f 54 45 53 54 46 4c 41 $(LINKER_TESTFLA
78b0: 47 53 29 5d 0a 4c 49 4e 4b 45 52 46 4c 41 47 53 GS)].LINKERFLAGS
78c0: 09 3d 20 24 28 4c 49 4e 4b 45 52 46 4c 41 47 53 .= $(LINKERFLAGS
78d0: 3a 2d 6c 74 63 67 3d 29 20 2d 6c 74 63 67 3a 70 :-ltcg=) -ltcg:p
78e0: 67 69 6e 73 74 72 75 6d 65 6e 74 0a 21 65 6c 73 ginstrument.!els
78f0: 65 0a 4d 53 47 3d 5e 0a 54 68 69 73 20 63 6f 6d e.MSG=^.This com
7900: 70 69 6c 65 72 20 64 6f 65 73 20 6e 6f 74 20 73 piler does not s
7910: 75 70 70 6f 72 74 20 70 72 6f 66 69 6c 65 20 67 upport profile g
7920: 75 69 64 65 64 20 6f 70 74 69 6d 69 7a 61 74 69 uided optimizati
7930: 6f 6e 2e 0a 21 65 72 72 6f 72 20 24 28 4d 53 47 on..!error $(MSG
7940: 29 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a ).!endif.!endif.
7950: 0a 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 .###############
7960: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7970: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7980: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7990: 23 0a 23 20 38 2e 20 50 61 72 73 65 20 74 68 65 #.# 8. Parse the
79a0: 20 53 54 41 54 53 20 6d 61 63 72 6f 20 74 6f 20 STATS macro to
79b0: 63 6f 6e 66 69 67 75 72 65 20 63 6f 64 65 20 69 configure code i
79c0: 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a 23 nstrumentation.#
79d0: 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d The following m
79e0: 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 62 79 acros are set by
79f0: 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a 0a 23 this section:.#
7a00: 20 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 20 2d TCL_MEM_DEBUG -
7a10: 20 31 20 2d 3e 20 65 6e 61 62 6c 65 73 20 6d 65 1 -> enables me
7a20: 6d 6f 72 79 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 mory allocation
7a30: 69 6e 73 74 72 75 6d 65 6e 74 61 74 69 6f 6e 0a instrumentation.
7a40: 23 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 #
7a50: 20 20 30 20 2d 3e 20 64 69 73 61 62 6c 65 73 0a 0 -> disables.
7a60: 23 20 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 # TCL_COMPILE_DE
7a70: 42 55 47 20 2d 20 31 20 2d 3e 20 65 6e 61 62 6c BUG - 1 -> enabl
7a80: 65 73 20 62 79 74 65 20 63 6f 6d 70 69 6c 65 72 es byte compiler
7a90: 20 6c 6f 67 67 69 6e 67 0a 23 20 20 20 20 20 20 logging.#
7aa0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 0
7ab0: 20 2d 3e 20 64 69 73 61 62 6c 65 73 0a 0a 23 20 -> disables..#
7ac0: 44 65 66 61 75 6c 74 20 62 6f 74 68 20 61 72 65 Default both are
7ad0: 20 6f 66 66 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 off.TCL_MEM_DEB
7ae0: 55 47 09 20 20 20 20 3d 20 30 0a 54 43 4c 5f 43 UG. = 0.TCL_C
7af0: 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 20 20 3d OMPILE_DEBUG =
7b00: 20 30 0a 0a 21 69 66 20 22 24 28 53 54 41 54 53 0..!if "$(STATS
7b10: 29 22 20 21 3d 20 22 22 20 26 26 20 21 5b 24 28 )" != "" && ![$(
7b20: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 NMAKEHLP_NATIVE)
7b30: 20 2d 66 20 22 24 28 53 54 41 54 53 29 22 20 22 -f "$(STATS)" "
7b40: 6e 6f 6e 65 22 5d 0a 0a 21 69 66 20 24 28 56 45 none"]..!if $(VE
7b50: 52 42 4f 53 45 29 0a 21 6d 65 73 73 61 67 65 20 RBOSE).!message
7b60: 2a 2a 2a 20 53 54 41 54 53 3d 24 28 53 54 41 54 *** STATS=$(STAT
7b70: 53 29 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 5b S).!endif..!if [
7b80: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
7b90: 45 29 20 2d 66 20 24 28 53 54 41 54 53 29 20 22 E) -f $(STATS) "
7ba0: 6d 65 6d 64 62 67 22 5d 0a 54 43 4c 5f 4d 45 4d memdbg"].TCL_MEM
7bb0: 5f 44 45 42 55 47 09 20 20 20 20 3d 20 31 0a 21 _DEBUG. = 1.!
7bc0: 65 6c 73 65 0a 54 43 4c 5f 4d 45 4d 5f 44 45 42 else.TCL_MEM_DEB
7bd0: 55 47 09 20 20 20 20 3d 20 30 0a 21 65 6e 64 69 UG. = 0.!endi
7be0: 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 f..!if [$(NMAKEH
7bf0: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 28 LP_NATIVE) -f $(
7c00: 53 54 41 54 53 29 20 22 63 6f 6d 70 64 62 67 22 STATS) "compdbg"
7c10: 5d 0a 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 ].TCL_COMPILE_DE
7c20: 42 55 47 20 20 20 3d 20 31 0a 21 65 6c 73 65 0a BUG = 1.!else.
7c30: 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 TCL_COMPILE_DEBU
7c40: 47 20 20 20 3d 20 30 0a 21 65 6e 64 69 66 0a 0a G = 0.!endif..
7c50: 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 !endif..########
7c60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7c70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7c80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
7c90: 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 39 ############.# 9
7ca0: 2e 20 50 61 72 73 65 20 74 68 65 20 43 48 45 43 . Parse the CHEC
7cb0: 4b 53 20 6d 61 63 72 6f 20 74 6f 20 63 6f 6e 66 KS macro to conf
7cc0: 69 67 75 72 65 20 61 64 64 69 74 69 6f 6e 61 6c igure additional
7cd0: 20 63 6f 6d 70 69 6c 65 72 20 63 68 65 63 6b 73 compiler checks
7ce0: 0a 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 .# The following
7cf0: 20 6d 61 63 72 6f 73 20 61 72 65 20 73 65 74 20 macros are set
7d00: 62 79 20 74 68 69 73 20 73 65 63 74 69 6f 6e 3a by this section:
7d10: 0a 23 20 57 41 52 4e 49 4e 47 53 20 2d 20 63 6f .# WARNINGS - co
7d20: 6d 70 69 6c 65 72 20 73 77 69 74 63 68 65 73 20 mpiler switches
7d30: 74 68 61 74 20 63 6f 6e 74 72 6f 6c 20 74 68 65 that control the
7d40: 20 77 61 72 6e 69 6e 67 73 20 6c 65 76 65 6c 0a warnings level.
7d50: 23 20 54 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 # TCL_NO_DEPRECA
7d60: 54 45 44 20 2d 20 31 20 2d 3e 20 64 69 73 61 62 TED - 1 -> disab
7d70: 6c 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 64 le support for d
7d80: 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 74 69 eprecated functi
7d90: 6f 6e 73 0a 23 20 20 20 20 20 20 20 20 20 20 20 ons.#
7da0: 20 20 20 20 20 20 20 20 20 20 30 20 2d 3e 20 65 0 -> e
7db0: 6e 61 62 6c 65 20 64 65 70 72 65 63 61 74 65 64 nable deprecated
7dc0: 20 66 75 6e 63 74 69 6f 6e 73 0a 0a 23 20 44 65 functions..# De
7dd0: 66 61 75 6c 74 73 20 2d 20 50 65 72 6d 69 74 20 faults - Permit
7de0: 64 65 70 72 65 63 61 74 65 64 20 66 75 6e 63 74 deprecated funct
7df0: 69 6f 6e 73 20 61 6e 64 20 77 61 72 6e 69 6e 67 ions and warning
7e00: 20 6c 65 76 65 6c 20 33 0a 54 43 4c 5f 4e 4f 5f level 3.TCL_NO_
7e10: 44 45 50 52 45 43 41 54 45 44 09 20 20 20 20 3d DEPRECATED. =
7e20: 20 30 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 0.WARNINGS..
7e30: 20 3d 20 2d 57 33 0a 0a 21 69 66 20 22 24 28 43 = -W3..!if "$(C
7e40: 48 45 43 4b 53 29 22 20 21 3d 20 22 22 20 26 26 HECKS)" != "" &&
7e50: 20 21 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 ![$(NMAKEHLP_NA
7e60: 54 49 56 45 29 20 2d 66 20 22 24 28 43 48 45 43 TIVE) -f "$(CHEC
7e70: 4b 53 29 22 20 22 6e 6f 6e 65 22 5d 0a 0a 21 69 KS)" "none"]..!i
7e80: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
7e90: 54 49 56 45 29 20 2d 66 20 24 28 43 48 45 43 4b TIVE) -f $(CHECK
7ea0: 53 29 20 22 6e 6f 64 65 70 22 5d 0a 54 43 4c 5f S) "nodep"].TCL_
7eb0: 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 09 20 20 NO_DEPRECATED.
7ec0: 20 20 3d 20 31 0a 21 65 6e 64 69 66 0a 0a 21 69 = 1.!endif..!i
7ed0: 66 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 f [$(NMAKEHLP_NA
7ee0: 54 49 56 45 29 20 2d 66 20 24 28 43 48 45 43 4b TIVE) -f $(CHECK
7ef0: 53 29 20 22 66 75 6c 6c 77 61 72 6e 22 5d 0a 57 S) "fullwarn"].W
7f00: 41 52 4e 49 4e 47 53 09 09 20 20 20 20 3d 20 2d ARNINGS.. = -
7f10: 57 34 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 48 W4.!if [$(NMAKEH
7f20: 4c 50 5f 4e 41 54 49 56 45 29 20 2d 6c 20 2d 77 LP_NATIVE) -l -w
7f30: 61 72 6e 3a 33 20 24 28 4c 49 4e 4b 45 52 5f 54 arn:3 $(LINKER_T
7f40: 45 53 54 46 4c 41 47 53 29 5d 0a 4c 49 4e 4b 45 ESTFLAGS)].LINKE
7f50: 52 46 4c 41 47 53 09 09 20 20 20 20 3d 20 24 28 RFLAGS.. = $(
7f60: 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 2d 77 61 LINKERFLAGS) -wa
7f70: 72 6e 3a 33 0a 21 65 6e 64 69 66 0a 21 65 6e 64 rn:3.!endif.!end
7f80: 69 66 0a 0a 21 69 66 20 5b 24 28 4e 4d 41 4b 45 if..!if [$(NMAKE
7f90: 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 66 20 24 HLP_NATIVE) -f $
7fa0: 28 43 48 45 43 4b 53 29 20 22 36 34 62 69 74 22 (CHECKS) "64bit"
7fb0: 5d 20 26 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 ] && [$(NMAKEHLP
7fc0: 5f 4e 41 54 49 56 45 29 20 2d 63 20 2d 57 70 36 _NATIVE) -c -Wp6
7fd0: 34 5d 0a 57 41 52 4e 49 4e 47 53 09 09 20 20 20 4].WARNINGS..
7fe0: 20 3d 20 24 28 57 41 52 4e 49 4e 47 53 29 20 2d = $(WARNINGS) -
7ff0: 57 70 36 34 0a 21 65 6e 64 69 66 0a 0a 21 65 6e Wp64.!endif..!en
8000: 64 69 66 0a 0a 0a 23 23 23 23 23 23 23 23 23 23 dif...##########
8010: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8020: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8030: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8040: 23 23 23 23 23 23 0a 23 20 31 30 2e 20 43 6f 6e ######.# 10. Con
8050: 73 74 72 75 63 74 20 6f 75 74 70 75 74 20 64 69 struct output di
8060: 72 65 63 74 6f 72 79 20 61 6e 64 20 66 69 6c 65 rectory and file
8070: 20 70 61 74 68 73 0a 23 20 46 69 67 75 72 65 2d paths.# Figure-
8080: 6f 75 74 20 68 6f 77 20 74 6f 20 6e 61 6d 65 20 out how to name
8090: 6f 75 72 20 69 6e 74 65 72 6d 65 64 69 61 74 65 our intermediate
80a0: 20 61 6e 64 20 6f 75 74 70 75 74 20 64 69 72 65 and output dire
80b0: 63 74 6f 72 69 65 73 2e 0a 23 20 49 6e 20 6f 72 ctories..# In or
80c0: 64 65 72 20 74 6f 20 61 76 6f 69 64 20 69 6e 61 der to avoid ina
80d0: 64 76 65 72 74 65 6e 74 20 6d 69 78 69 6e 67 20 dvertent mixing
80e0: 6f 66 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 of object files
80f0: 62 75 69 6c 74 20 75 73 69 6e 67 0a 23 20 64 69 built using.# di
8100: 66 66 65 72 65 6e 74 20 63 6f 6d 70 69 6c 65 72 fferent compiler
8110: 73 2c 20 62 75 69 6c 64 20 63 6f 6e 66 69 67 75 s, build configu
8120: 72 61 74 69 6f 6e 73 20 65 74 63 2e 2c 0a 23 0a rations etc.,.#.
8130: 23 20 4e 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 # Naming convent
8140: 69 6f 6e 20 28 73 75 66 66 69 78 65 73 29 3a 0a ion (suffixes):.
8150: 23 20 20 20 74 20 3d 20 66 75 6c 6c 20 74 68 72 # t = full thr
8160: 65 61 64 20 73 75 70 70 6f 72 74 2e 20 28 4e 6f ead support. (No
8170: 74 20 75 73 65 64 20 66 6f 72 20 54 63 6c 20 3e t used for Tcl >
8180: 3d 20 39 2e 30 29 0a 23 20 20 20 73 20 3d 20 73 = 9.0).# s = s
8190: 74 61 74 69 63 20 6c 69 62 72 61 72 79 20 28 61 tatic library (a
81a0: 73 20 6f 70 70 6f 73 65 64 20 74 6f 20 61 6e 20 s opposed to an
81b0: 69 6d 70 6f 72 74 20 6c 69 62 72 61 72 79 29 0a import library).
81c0: 23 20 20 20 67 20 3d 20 6c 69 6e 6b 65 64 20 74 # g = linked t
81d0: 6f 20 74 68 65 20 64 65 62 75 67 20 65 6e 61 62 o the debug enab
81e0: 6c 65 64 20 43 20 72 75 6e 2d 74 69 6d 65 2e 0a led C run-time..
81f0: 23 20 20 20 78 20 3d 20 73 70 65 63 69 61 6c 20 # x = special
8200: 73 74 61 74 69 63 20 62 75 69 6c 64 20 77 68 65 static build whe
8210: 6e 20 69 74 20 6c 69 6e 6b 73 20 74 6f 20 74 68 n it links to th
8220: 65 20 64 79 6e 61 6d 69 63 20 43 20 72 75 6e 2d e dynamic C run-
8230: 74 69 6d 65 2e 0a 23 0a 23 20 54 68 65 20 66 6f time..#.# The fo
8240: 6c 6c 6f 77 69 6e 67 20 6d 61 63 72 6f 73 20 61 llowing macros a
8250: 72 65 20 73 65 74 20 69 6e 20 74 68 69 73 20 73 re set in this s
8260: 65 63 74 69 6f 6e 3a 0a 23 20 53 55 46 58 20 2d ection:.# SUFX -
8270: 20 74 68 65 20 73 75 66 66 69 78 20 74 6f 20 75 the suffix to u
8280: 73 65 20 66 6f 72 20 62 69 6e 61 72 69 65 73 20 se for binaries
8290: 62 61 73 65 64 20 6f 6e 20 61 62 6f 76 65 20 6e based on above n
82a0: 61 6d 69 6e 67 20 63 6f 6e 76 65 6e 74 69 6f 6e aming convention
82b0: 0a 23 20 42 55 49 4c 44 44 49 52 54 4f 50 20 2d .# BUILDDIRTOP -
82c0: 20 74 68 65 20 74 6f 70 6c 65 76 65 6c 20 64 65 the toplevel de
82d0: 66 61 75 6c 74 20 6f 75 74 70 75 74 20 64 69 72 fault output dir
82e0: 65 63 74 6f 72 79 0a 23 20 20 20 20 20 20 69 73 ectory.# is
82f0: 20 6f 66 20 74 68 65 20 66 6f 72 6d 20 7b 52 65 of the form {Re
8300: 6c 65 61 73 65 2c 44 65 62 75 67 7d 5b 5f 41 4d lease,Debug}[_AM
8310: 44 36 34 5d 5b 5f 43 4f 4d 50 49 4c 45 52 56 45 D64][_COMPILERVE
8320: 52 53 49 4f 4e 5d 0a 23 20 54 4d 50 5f 44 49 52 RSION].# TMP_DIR
8330: 20 2d 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 - directory whe
8340: 72 65 20 6f 62 6a 65 63 74 20 66 69 6c 65 73 20 re object files
8350: 61 72 65 20 63 72 65 61 74 65 64 0a 23 20 4f 55 are created.# OU
8360: 54 5f 44 49 52 20 2d 20 64 69 72 65 63 74 6f 72 T_DIR - director
8370: 79 20 77 68 65 72 65 20 6f 75 74 70 75 74 20 65 y where output e
8380: 78 65 63 75 74 61 62 6c 65 73 20 61 72 65 20 63 xecutables are c
8390: 72 65 61 74 65 64 0a 23 20 42 6f 74 68 20 54 4d reated.# Both TM
83a0: 50 5f 44 49 52 20 61 6e 64 20 4f 55 54 5f 44 49 P_DIR and OUT_DI
83b0: 52 20 61 72 65 20 64 65 66 61 75 6c 74 65 64 20 R are defaulted
83c0: 6f 6e 6c 79 20 69 66 20 6e 6f 74 20 64 65 66 69 only if not defi
83d0: 6e 65 64 20 62 79 20 74 68 65 0a 23 20 70 61 72 ned by the.# par
83e0: 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 28 6f 72 ent makefile (or
83f0: 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 29 2e 20 command line).
8400: 54 68 65 20 64 65 66 61 75 6c 74 20 76 61 6c 75 The default valu
8410: 65 73 20 61 72 65 0a 23 20 62 61 73 65 64 20 6f es are.# based o
8420: 6e 20 42 55 49 4c 44 44 49 52 54 4f 50 2e 0a 23 n BUILDDIRTOP..#
8430: 20 53 54 55 42 50 52 45 46 49 58 20 2d 20 6e 61 STUBPREFIX - na
8440: 6d 65 20 6f 66 20 74 68 65 20 73 74 75 62 73 20 me of the stubs
8450: 6c 69 62 72 61 72 79 20 66 6f 72 20 74 68 69 73 library for this
8460: 20 70 72 6f 6a 65 63 74 0a 23 20 50 52 4a 49 4d project.# PRJIM
8470: 50 4c 49 42 20 2d 20 6f 75 74 70 75 74 20 70 61 PLIB - output pa
8480: 74 68 20 6f 66 20 74 68 65 20 67 65 6e 65 72 61 th of the genera
8490: 74 65 64 20 70 72 6f 6a 65 63 74 20 69 6d 70 6f ted project impo
84a0: 72 74 20 6c 69 62 72 61 72 79 0a 23 20 50 52 4a rt library.# PRJ
84b0: 4c 49 42 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f LIBNAME - name o
84c0: 66 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f 6a f generated proj
84d0: 65 63 74 20 6c 69 62 72 61 72 79 0a 23 20 50 52 ect library.# PR
84e0: 4a 4c 49 42 20 20 20 20 20 2d 20 6f 75 74 70 75 JLIB - outpu
84f0: 74 20 70 61 74 68 20 6f 66 20 67 65 6e 65 72 61 t path of genera
8500: 74 65 64 20 70 72 6f 6a 65 63 74 20 6c 69 62 72 ted project libr
8510: 61 72 79 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 ary.# PRJSTUBLIB
8520: 4e 41 4d 45 20 2d 20 6e 61 6d 65 20 6f 66 20 74 NAME - name of t
8530: 68 65 20 67 65 6e 65 72 61 74 65 64 20 70 72 6f he generated pro
8540: 6a 65 63 74 20 73 74 75 62 73 20 6c 69 62 72 61 ject stubs libra
8550: 72 79 0a 23 20 50 52 4a 53 54 55 42 4c 49 42 20 ry.# PRJSTUBLIB
8560: 2d 20 6f 75 74 70 75 74 20 70 61 74 68 20 6f 66 - output path of
8570: 20 74 68 65 20 67 65 6e 65 72 61 74 65 64 20 70 the generated p
8580: 72 6f 6a 65 63 74 20 73 74 75 62 73 20 6c 69 62 roject stubs lib
8590: 72 61 72 79 0a 23 20 52 45 53 46 49 4c 45 20 2d rary.# RESFILE -
85a0: 20 6f 75 74 70 75 74 20 72 65 73 6f 75 72 63 65 output resource
85b0: 20 66 69 6c 65 20 28 6f 6e 6c 79 20 69 66 20 6e file (only if n
85c0: 6f 74 20 73 74 61 74 69 63 20 62 75 69 6c 64 29 ot static build)
85d0: 0a 0a 53 55 46 58 09 20 20 20 20 3d 20 74 73 67 ..SUFX. = tsg
85e0: 78 0a 0a 21 69 66 20 24 28 44 45 42 55 47 29 0a x..!if $(DEBUG).
85f0: 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 20 44 65 BUILDDIRTOP = De
8600: 62 75 67 0a 21 65 6c 73 65 0a 42 55 49 4c 44 44 bug.!else.BUILDD
8610: 49 52 54 4f 50 20 3d 20 52 65 6c 65 61 73 65 0a IRTOP = Release.
8620: 21 65 6e 64 69 66 0a 0a 21 69 66 20 22 24 28 4d !endif..!if "$(M
8630: 41 43 48 49 4e 45 29 22 20 21 3d 20 22 49 58 38 ACHINE)" != "IX8
8640: 36 22 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 6".BUILDDIRTOP =
8650: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 24 $(BUILDDIRTOP)_$
8660: 28 4d 41 43 48 49 4e 45 29 0a 21 65 6e 64 69 66 (MACHINE).!endif
8670: 0a 21 69 66 20 24 28 56 43 56 45 52 29 20 3e 20 .!if $(VCVER) >
8680: 36 0a 42 55 49 4c 44 44 49 52 54 4f 50 20 3d 24 6.BUILDDIRTOP =$
8690: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5f 56 43 (BUILDDIRTOP)_VC
86a0: 24 28 56 43 56 45 52 29 0a 21 65 6e 64 69 66 0a $(VCVER).!endif.
86b0: 0a 21 69 66 20 21 24 28 44 45 42 55 47 29 20 7c .!if !$(DEBUG) |
86c0: 7c 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 | $(TCL_VERSION)
86d0: 20 3e 20 38 36 20 7c 7c 20 24 28 44 45 42 55 47 > 86 || $(DEBUG
86e0: 29 20 26 26 20 24 28 55 4e 43 48 45 43 4b 45 44 ) && $(UNCHECKED
86f0: 29 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 ).SUFX. = $(S
8700: 55 46 58 3a 67 3d 29 0a 21 65 6e 64 69 66 0a 0a UFX:g=).!endif..
8710: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 2e 5c TMP_DIRFULL = .\
8720: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 $(BUILDDIRTOP)\$
8730: 28 50 52 4f 4a 45 43 54 29 5f 54 68 72 65 61 64 (PROJECT)_Thread
8740: 65 64 44 79 6e 61 6d 69 63 53 74 61 74 69 63 58 edDynamicStaticX
8750: 0a 0a 21 69 66 20 21 24 28 53 54 41 54 49 43 5f ..!if !$(STATIC_
8760: 42 55 49 4c 44 29 0a 54 4d 50 5f 44 49 52 46 55 BUILD).TMP_DIRFU
8770: 4c 4c 20 3d 20 24 28 54 4d 50 5f 44 49 52 46 55 LL = $(TMP_DIRFU
8780: 4c 4c 3a 53 74 61 74 69 63 3d 29 0a 53 55 46 58 LL:Static=).SUFX
8790: 09 20 20 20 20 3d 20 24 28 53 55 46 58 3a 73 3d . = $(SUFX:s=
87a0: 29 0a 45 58 54 09 20 20 20 20 3d 20 64 6c 6c 0a ).EXT. = dll.
87b0: 54 4d 50 5f 44 49 52 46 55 4c 4c 20 3d 20 24 28 TMP_DIRFULL = $(
87c0: 54 4d 50 5f 44 49 52 46 55 4c 4c 3a 58 3d 29 0a TMP_DIRFULL:X=).
87d0: 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 46 SUFX. = $(SUF
87e0: 58 3a 78 3d 29 0a 21 65 6c 73 65 0a 54 4d 50 5f X:x=).!else.TMP_
87f0: 44 49 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f DIRFULL = $(TMP_
8800: 44 49 52 46 55 4c 4c 3a 44 79 6e 61 6d 69 63 3d DIRFULL:Dynamic=
8810: 29 0a 45 58 54 09 20 20 20 20 3d 20 6c 69 62 0a ).EXT. = lib.
8820: 21 69 66 20 24 28 4d 53 56 43 52 54 29 20 26 26 !if $(MSVCRT) &&
8830: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 $(TCL_VERSION)
8840: 3e 20 38 36 20 7c 7c 20 21 24 28 4d 53 56 43 52 > 86 || !$(MSVCR
8850: 54 29 20 26 26 20 24 28 54 43 4c 5f 56 45 52 53 T) && $(TCL_VERS
8860: 49 4f 4e 29 20 3c 20 38 37 0a 54 4d 50 5f 44 49 ION) < 87.TMP_DI
8870: 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f 44 49 RFULL = $(TMP_DI
8880: 52 46 55 4c 4c 3a 58 3d 29 0a 53 55 46 58 09 20 RFULL:X=).SUFX.
8890: 20 20 20 3d 20 24 28 53 55 46 58 3a 78 3d 29 0a = $(SUFX:x=).
88a0: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 21 !endif.!endif..!
88b0: 69 66 20 21 24 28 54 43 4c 5f 54 48 52 45 41 44 if !$(TCL_THREAD
88c0: 53 29 20 7c 7c 20 24 28 54 43 4c 5f 56 45 52 53 S) || $(TCL_VERS
88d0: 49 4f 4e 29 20 3e 20 38 36 0a 54 4d 50 5f 44 49 ION) > 86.TMP_DI
88e0: 52 46 55 4c 4c 20 3d 20 24 28 54 4d 50 5f 44 49 RFULL = $(TMP_DI
88f0: 52 46 55 4c 4c 3a 54 68 72 65 61 64 65 64 3d 29 RFULL:Threaded=)
8900: 0a 53 55 46 58 09 20 20 20 20 3d 20 24 28 53 55 .SUFX. = $(SU
8910: 46 58 3a 74 3d 29 0a 21 65 6e 64 69 66 0a 0a 21 FX:t=).!endif..!
8920: 69 66 6e 64 65 66 20 54 4d 50 5f 44 49 52 0a 54 ifndef TMP_DIR.T
8930: 4d 50 5f 44 49 52 09 20 20 20 20 3d 20 24 28 54 MP_DIR. = $(T
8940: 4d 50 5f 44 49 52 46 55 4c 4c 29 0a 21 69 66 6e MP_DIRFULL).!ifn
8950: 64 65 66 20 4f 55 54 5f 44 49 52 0a 4f 55 54 5f def OUT_DIR.OUT_
8960: 44 49 52 09 20 20 20 20 3d 20 2e 5c 24 28 42 55 DIR. = .\$(BU
8970: 49 4c 44 44 49 52 54 4f 50 29 0a 21 65 6e 64 69 ILDDIRTOP).!endi
8980: 66 0a 21 65 6c 73 65 0a 21 69 66 6e 64 65 66 20 f.!else.!ifndef
8990: 4f 55 54 5f 44 49 52 0a 4f 55 54 5f 44 49 52 09 OUT_DIR.OUT_DIR.
89a0: 20 20 20 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 = $(TMP_DIR)
89b0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a .!endif.!endif..
89c0: 23 20 52 65 6c 61 74 69 76 65 20 70 61 74 68 73 # Relative paths
89d0: 20 2d 3e 20 61 62 73 6f 6c 75 74 65 0a 21 69 66 -> absolute.!if
89e0: 20 5b 65 63 68 6f 20 4f 55 54 5f 44 49 52 20 3d [echo OUT_DIR =
89f0: 20 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 \> nmakehlp.out
8a00: 5d 20 5c 0a 20 20 20 7c 7c 20 5b 24 28 4e 4d 41 ] \. || [$(NMA
8a10: 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 51 KEHLP_NATIVE) -Q
8a20: 20 22 24 28 4f 55 54 5f 44 49 52 29 22 20 3e 3e "$(OUT_DIR)" >>
8a30: 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0a 21 nmakehlp.out].!
8a40: 65 72 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 error *** Could
8a50: 6e 6f 74 20 66 75 6c 6c 79 20 71 75 61 6c 69 66 not fully qualif
8a60: 79 20 70 61 74 68 20 4f 55 54 5f 44 49 52 3d 24 y path OUT_DIR=$
8a70: 28 4f 55 54 5f 44 49 52 29 0a 21 65 6e 64 69 66 (OUT_DIR).!endif
8a80: 0a 21 69 66 20 5b 65 63 68 6f 20 54 4d 50 5f 44 .!if [echo TMP_D
8a90: 49 52 20 3d 20 5c 3e 3e 20 6e 6d 61 6b 65 68 6c IR = \>> nmakehl
8aa0: 70 2e 6f 75 74 5d 20 5c 0a 20 20 20 7c 7c 20 5b p.out] \. || [
8ab0: 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 $(NMAKEHLP_NATIV
8ac0: 45 29 20 2d 51 20 22 24 28 54 4d 50 5f 44 49 52 E) -Q "$(TMP_DIR
8ad0: 29 22 20 3e 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f )" >> nmakehlp.o
8ae0: 75 74 5d 0a 21 65 72 72 6f 72 20 2a 2a 2a 20 43 ut].!error *** C
8af0: 6f 75 6c 64 20 6e 6f 74 20 66 75 6c 6c 79 20 71 ould not fully q
8b00: 75 61 6c 69 66 79 20 70 61 74 68 20 54 4d 50 5f ualify path TMP_
8b10: 44 49 52 3d 24 28 54 4d 50 5f 44 49 52 29 0a 21 DIR=$(TMP_DIR).!
8b20: 65 6e 64 69 66 0a 21 69 6e 63 6c 75 64 65 20 6e endif.!include n
8b30: 6d 61 6b 65 68 6c 70 2e 6f 75 74 0a 0a 23 20 54 makehlp.out..# T
8b40: 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 73 he name of the s
8b50: 74 75 62 73 20 6c 69 62 72 61 72 79 20 66 6f 72 tubs library for
8b60: 20 74 68 65 20 70 72 6f 6a 65 63 74 20 62 65 69 the project bei
8b70: 6e 67 20 62 75 69 6c 74 0a 53 54 55 42 50 52 45 ng built.STUBPRE
8b80: 46 49 58 20 20 20 20 20 20 3d 20 24 28 50 52 4f FIX = $(PRO
8b90: 4a 45 43 54 29 73 74 75 62 0a 0a 23 0a 23 20 53 JECT)stub..#.# S
8ba0: 65 74 20 75 70 20 70 61 74 68 73 20 74 6f 20 76 et up paths to v
8bb0: 61 72 69 6f 75 73 20 54 63 6c 20 65 78 65 63 75 arious Tcl execu
8bc0: 74 61 62 6c 65 73 20 61 6e 64 20 6c 69 62 72 61 tables and libra
8bd0: 72 69 65 73 20 6e 65 65 64 65 64 20 62 79 20 65 ries needed by e
8be0: 78 74 65 6e 73 69 6f 6e 73 0a 23 0a 0a 23 20 54 xtensions.#..# T
8bf0: 49 50 20 34 33 30 2e 20 55 6e 75 73 65 64 20 66 IP 430. Unused f
8c00: 6f 72 20 38 2e 36 20 62 75 74 20 6e 6f 20 68 61 or 8.6 but no ha
8c10: 72 6d 20 64 65 66 69 6e 69 6e 67 20 69 74 20 74 rm defining it t
8c20: 6f 20 61 6c 6c 6f 77 20 61 20 63 6f 6d 6d 6f 6e o allow a common
8c30: 20 72 75 6c 65 73 2e 76 63 0a 54 43 4c 5f 5a 49 rules.vc.TCL_ZI
8c40: 50 5f 46 49 4c 45 20 3d 20 6c 69 62 74 63 6c 24 P_FILE = libtcl$
8c50: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
8c60: 4f 4e 29 2e 24 28 54 43 4c 5f 4d 49 4e 4f 52 5f ON).$(TCL_MINOR_
8c70: 56 45 52 53 49 4f 4e 29 24 28 54 43 4c 5f 50 41 VERSION)$(TCL_PA
8c80: 54 43 48 5f 4c 45 54 54 45 52 29 24 28 54 43 4c TCH_LETTER)$(TCL
8c90: 5f 52 45 4c 45 41 53 45 5f 53 45 52 49 41 4c 29 _RELEASE_SERIAL)
8ca0: 2e 7a 69 70 0a 54 4b 5f 5a 49 50 5f 46 49 4c 45 .zip.TK_ZIP_FILE
8cb0: 20 3d 20 6c 69 62 74 6b 24 28 54 4b 5f 4d 41 4a = libtk$(TK_MAJ
8cc0: 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 4b OR_VERSION).$(TK
8cd0: 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 24 _MINOR_VERSION)$
8ce0: 28 54 4b 5f 50 41 54 43 48 5f 4c 45 54 54 45 52 (TK_PATCH_LETTER
8cf0: 29 24 28 54 4b 5f 52 45 4c 45 41 53 45 5f 53 45 )$(TK_RELEASE_SE
8d00: 52 49 41 4c 29 2e 7a 69 70 0a 0a 21 69 66 20 24 RIAL).zip..!if $
8d10: 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 54 43 4c 53 (DOING_TCL).TCLS
8d20: 48 4e 41 4d 45 20 20 20 20 20 20 20 3d 20 24 28 HNAME = $(
8d30: 50 52 4f 4a 45 43 54 29 73 68 24 28 56 45 52 53 PROJECT)sh$(VERS
8d40: 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 65 0a ION)$(SUFX).exe.
8d50: 54 43 4c 53 48 09 09 3d 20 24 28 4f 55 54 5f 44 TCLSH..= $(OUT_D
8d60: 49 52 29 5c 24 28 54 43 4c 53 48 4e 41 4d 45 29 IR)\$(TCLSHNAME)
8d70: 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 28 4f .TCLIMPLIB.= $(O
8d80: 55 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 UT_DIR)\$(PROJEC
8d90: 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 55 T)$(VERSION)$(SU
8da0: 46 58 29 2e 6c 69 62 0a 54 43 4c 4c 49 42 4e 41 FX).lib.TCLLIBNA
8db0: 4d 45 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 ME.= $(PROJECT)$
8dc0: 28 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 29 (VERSION)$(SUFX)
8dd0: 2e 24 28 45 58 54 29 0a 54 43 4c 4c 49 42 09 09 .$(EXT).TCLLIB..
8de0: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
8df0: 43 4c 4c 49 42 4e 41 4d 45 29 0a 54 43 4c 53 43 CLLIBNAME).TCLSC
8e00: 52 49 50 54 5a 49 50 20 20 20 20 3d 20 24 28 4f RIPTZIP = $(O
8e10: 55 54 5f 44 49 52 29 5c 24 28 54 43 4c 5f 5a 49 UT_DIR)\$(TCL_ZI
8e20: 50 5f 46 49 4c 45 29 0a 0a 21 69 66 20 24 28 54 P_FILE)..!if $(T
8e30: 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e CL_MAJOR_VERSION
8e40: 29 20 3d 3d 20 38 0a 54 43 4c 53 54 55 42 4c 49 ) == 8.TCLSTUBLI
8e50: 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 52 BNAME.= $(STUBPR
8e60: 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e 29 2e EFIX)$(VERSION).
8e70: 6c 69 62 0a 21 65 6c 73 65 0a 54 43 4c 53 54 55 lib.!else.TCLSTU
8e80: 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 BLIBNAME.= $(STU
8e90: 42 50 52 45 46 49 58 29 2e 6c 69 62 0a 21 65 6e BPREFIX).lib.!en
8ea0: 64 69 66 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d dif.TCLSTUBLIB.=
8eb0: 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 43 $(OUT_DIR)\$(TC
8ec0: 4c 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a 54 43 LSTUBLIBNAME).TC
8ed0: 4c 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 3d 20 L_INCLUDES =
8ee0: 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 20 2d -I"$(WIN_DIR)" -
8ef0: 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 I"$(GENERICDIR)"
8f00: 0a 0a 21 65 6c 73 65 20 23 20 21 24 28 44 4f 49 ..!else # !$(DOI
8f10: 4e 47 5f 54 43 4c 29 0a 0a 21 69 66 20 24 28 54 NG_TCL)..!if $(T
8f20: 43 4c 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 69 CLINSTALL) # Bui
8f30: 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 61 6e lding against an
8f40: 20 69 6e 73 74 61 6c 6c 65 64 20 54 63 6c 0a 0a installed Tcl..
8f50: 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 # When building
8f60: 65 78 74 65 6e 73 69 6f 6e 73 2c 20 77 65 20 6e extensions, we n
8f70: 65 65 64 20 74 6f 20 6c 6f 63 61 74 65 20 74 63 eed to locate tc
8f80: 6c 73 68 2e 20 44 65 70 65 6e 64 69 6e 67 20 6f lsh. Depending o
8f90: 6e 20 76 65 72 73 69 6f 6e 0a 23 20 6f 66 20 54 n version.# of T
8fa0: 63 6c 20 77 65 20 61 72 65 20 62 75 69 6c 64 69 cl we are buildi
8fb0: 6e 67 20 61 67 61 69 6e 73 74 2c 20 74 68 69 73 ng against, this
8fc0: 20 6d 61 79 20 6f 72 20 6d 61 79 20 6e 6f 74 20 may or may not
8fd0: 68 61 76 65 20 61 20 22 74 22 20 73 75 66 66 69 have a "t" suffi
8fe0: 78 2e 0a 23 20 54 72 79 20 76 61 72 69 6f 75 73 x..# Try various
8ff0: 20 70 6f 73 73 69 62 69 6c 69 74 69 65 73 20 69 possibilities i
9000: 6e 20 74 75 72 6e 2e 0a 54 43 4c 53 48 09 09 3d n turn..TCLSH..=
9010: 20 24 28 5f 54 43 4c 44 49 52 29 5c 62 69 6e 5c $(_TCLDIR)\bin\
9020: 74 63 6c 73 68 24 28 54 43 4c 5f 56 45 52 53 49 tclsh$(TCL_VERSI
9030: 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 65 78 ON)$(SUFX:t=).ex
9040: 65 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 28 e.!if !exist("$(
9050: 54 43 4c 53 48 29 22 29 0a 54 43 4c 53 48 20 20 TCLSH)").TCLSH
9060: 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 54 43 = $(_TC
9070: 4c 44 49 52 29 5c 62 69 6e 5c 74 63 6c 73 68 24 LDIR)\bin\tclsh$
9080: 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 24 28 (TCL_VERSION)t$(
9090: 53 55 46 58 3a 74 3d 29 2e 65 78 65 0a 21 65 6e SUFX:t=).exe.!en
90a0: 64 69 66 0a 0a 21 69 66 20 24 28 54 43 4c 5f 4d dif..!if $(TCL_M
90b0: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d 3d AJOR_VERSION) ==
90c0: 20 38 0a 54 43 4c 53 54 55 42 4c 49 42 09 3d 20 8.TCLSTUBLIB.=
90d0: 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 $(_TCLDIR)\lib\t
90e0: 63 6c 73 74 75 62 24 28 54 43 4c 5f 56 45 52 53 clstub$(TCL_VERS
90f0: 49 4f 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 ION).lib.!else.T
9100: 43 4c 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 CLSTUBLIB.= $(_T
9110: 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 6c 73 74 CLDIR)\lib\tclst
9120: 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 ub.lib.!endif.TC
9130: 4c 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 43 4c LIMPLIB.= $(_TCL
9140: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 DIR)\lib\tcl$(TC
9150: 4c 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 L_VERSION)$(SUFX
9160: 3a 74 3d 29 2e 6c 69 62 0a 23 20 57 68 65 6e 20 :t=).lib.# When
9170: 62 75 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 building extensi
9180: 6f 6e 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b ons, may be link
9190: 69 6e 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 ing against Tcl
91a0: 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 that does not ad
91b0: 64 0a 23 20 22 74 22 20 73 75 66 66 69 78 20 28 d.# "t" suffix (
91c0: 65 2e 67 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 e.g. 8.6). If li
91d0: 62 20 6e 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 b not found chec
91e0: 6b 20 66 6f 72 20 74 68 61 74 20 70 6f 73 73 69 k for that possi
91f0: 62 69 6c 69 74 79 2e 0a 21 69 66 20 21 65 78 69 bility..!if !exi
9200: 73 74 28 22 24 28 54 43 4c 49 4d 50 4c 49 42 29 st("$(TCLIMPLIB)
9210: 22 29 0a 54 43 4c 49 4d 50 4c 49 42 09 3d 20 24 ").TCLIMPLIB.= $
9220: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 (_TCLDIR)\lib\tc
9230: 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 74 l$(TCL_VERSION)t
9240: 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 21 $(SUFX:t=).lib.!
9250: 65 6e 64 69 66 0a 54 43 4c 5f 4c 49 42 52 41 52 endif.TCL_LIBRAR
9260: 59 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c Y.= $(_TCLDIR)\l
9270: 69 62 0a 54 43 4c 52 45 47 4c 49 42 09 3d 20 24 ib.TCLREGLIB.= $
9280: 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c 74 63 (_TCLDIR)\lib\tc
9290: 6c 72 65 67 31 33 24 28 53 55 46 58 3a 74 3d 29 lreg13$(SUFX:t=)
92a0: 2e 6c 69 62 0a 54 43 4c 44 44 45 4c 49 42 09 3d .lib.TCLDDELIB.=
92b0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 5c $(_TCLDIR)\lib\
92c0: 74 63 6c 64 64 65 31 34 24 28 53 55 46 58 3a 74 tcldde14$(SUFX:t
92d0: 3d 29 2e 6c 69 62 0a 54 43 4c 53 43 52 49 50 54 =).lib.TCLSCRIPT
92e0: 5a 49 50 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 ZIP.= $(_TCLDIR)
92f0: 5c 6c 69 62 5c 24 28 54 43 4c 5f 5a 49 50 5f 46 \lib\$(TCL_ZIP_F
9300: 49 4c 45 29 0a 54 43 4c 54 4f 4f 4c 53 44 49 52 ILE).TCLTOOLSDIR
9310: 09 3d 20 5c 6d 75 73 74 5c 68 61 76 65 5c 74 63 .= \must\have\tc
9320: 6c 5c 73 6f 75 72 63 65 73 5c 74 6f 5c 62 75 69 l\sources\to\bui
9330: 6c 64 5c 74 68 69 73 5c 74 61 72 67 65 74 0a 54 ld\this\target.T
9340: 43 4c 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 3d CL_INCLUDES =
9350: 20 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c 69 -I"$(_TCLDIR)\i
9360: 6e 63 6c 75 64 65 22 0a 0a 21 65 6c 73 65 20 23 nclude"..!else #
9370: 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 Building agains
9380: 74 20 54 63 6c 20 73 6f 75 72 63 65 73 0a 0a 54 t Tcl sources..T
9390: 43 4c 53 48 09 09 3d 20 24 28 5f 54 43 4c 44 49 CLSH..= $(_TCLDI
93a0: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
93b0: 52 54 4f 50 29 5c 74 63 6c 73 68 24 28 54 43 4c RTOP)\tclsh$(TCL
93c0: 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a _VERSION)$(SUFX:
93d0: 74 3d 29 2e 65 78 65 0a 21 69 66 20 21 65 78 69 t=).exe.!if !exi
93e0: 73 74 28 24 28 54 43 4c 53 48 29 29 0a 54 43 4c st($(TCLSH)).TCL
93f0: 53 48 09 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 SH..= $(_TCLDIR)
9400: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
9410: 4f 50 29 5c 74 63 6c 73 68 24 28 54 43 4c 5f 56 OP)\tclsh$(TCL_V
9420: 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 ERSION)t$(SUFX:t
9430: 3d 29 2e 65 78 65 0a 21 65 6e 64 69 66 0a 21 69 =).exe.!endif.!i
9440: 66 20 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 f $(TCL_MAJOR_VE
9450: 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 43 4c 53 RSION) == 8.TCLS
9460: 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 TUBLIB.= $(_TCLD
9470: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9480: 49 52 54 4f 50 29 5c 74 63 6c 73 74 75 62 24 28 IRTOP)\tclstub$(
9490: 54 43 4c 5f 56 45 52 53 49 4f 4e 29 2e 6c 69 62 TCL_VERSION).lib
94a0: 0a 21 65 6c 73 65 0a 54 43 4c 53 54 55 42 4c 49 .!else.TCLSTUBLI
94b0: 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 B.= $(_TCLDIR)\w
94c0: 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f 50 in\$(BUILDDIRTOP
94d0: 29 5c 74 63 6c 73 74 75 62 2e 6c 69 62 0a 21 65 )\tclstub.lib.!e
94e0: 6e 64 69 66 0a 54 43 4c 49 4d 50 4c 49 42 09 3d ndif.TCLIMPLIB.=
94f0: 20 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 6e 5c $(_TCLDIR)\win\
9500: 24 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 74 $(BUILDDIRTOP)\t
9510: 63 6c 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 cl$(TCL_VERSION)
9520: 24 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 23 $(SUFX:t=).lib.#
9530: 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 65 When building e
9540: 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 79 20 62 xtensions, may b
9550: 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 69 6e 73 e linking agains
9560: 74 20 54 63 6c 20 74 68 61 74 20 64 6f 65 73 20 t Tcl that does
9570: 6e 6f 74 20 61 64 64 0a 23 20 22 74 22 20 73 75 not add.# "t" su
9580: 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 36 29 2e ffix (e.g. 8.6).
9590: 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f 75 6e If lib not foun
95a0: 64 20 63 68 65 63 6b 20 66 6f 72 20 74 68 61 74 d check for that
95b0: 20 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a 21 69 possibility..!i
95c0: 66 20 21 65 78 69 73 74 28 22 24 28 54 43 4c 49 f !exist("$(TCLI
95d0: 4d 50 4c 49 42 29 22 29 0a 54 43 4c 49 4d 50 4c MPLIB)").TCLIMPL
95e0: 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 52 29 5c IB.= $(_TCLDIR)\
95f0: 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 4f win\$(BUILDDIRTO
9600: 50 29 5c 74 63 6c 24 28 54 43 4c 5f 56 45 52 53 P)\tcl$(TCL_VERS
9610: 49 4f 4e 29 74 24 28 53 55 46 58 3a 74 3d 29 2e ION)t$(SUFX:t=).
9620: 6c 69 62 0a 21 65 6e 64 69 66 0a 54 43 4c 5f 4c lib.!endif.TCL_L
9630: 49 42 52 41 52 59 09 3d 20 24 28 5f 54 43 4c 44 IBRARY.= $(_TCLD
9640: 49 52 29 5c 6c 69 62 72 61 72 79 0a 54 43 4c 52 IR)\library.TCLR
9650: 45 47 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 49 EGLIB.= $(_TCLDI
9660: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
9670: 52 54 4f 50 29 5c 74 63 6c 72 65 67 31 33 24 28 RTOP)\tclreg13$(
9680: 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 4c SUFX:t=).lib.TCL
9690: 44 44 45 4c 49 42 09 3d 20 24 28 5f 54 43 4c 44 DDELIB.= $(_TCLD
96a0: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
96b0: 49 52 54 4f 50 29 5c 74 63 6c 64 64 65 31 34 24 IRTOP)\tcldde14$
96c0: 28 53 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 43 (SUFX:t=).lib.TC
96d0: 4c 53 43 52 49 50 54 5a 49 50 09 3d 20 24 28 5f LSCRIPTZIP.= $(_
96e0: 54 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 TCLDIR)\win\$(BU
96f0: 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 54 43 4c ILDDIRTOP)\$(TCL
9700: 5f 5a 49 50 5f 46 49 4c 45 29 0a 54 43 4c 54 4f _ZIP_FILE).TCLTO
9710: 4f 4c 53 44 49 52 09 3d 20 24 28 5f 54 43 4c 44 OLSDIR.= $(_TCLD
9720: 49 52 29 5c 74 6f 6f 6c 73 0a 54 43 4c 5f 49 4e IR)\tools.TCL_IN
9730: 43 4c 55 44 45 53 09 3d 20 2d 49 22 24 28 5f 54 CLUDES.= -I"$(_T
9740: 43 4c 44 49 52 29 5c 67 65 6e 65 72 69 63 22 20 CLDIR)\generic"
9750: 2d 49 22 24 28 5f 54 43 4c 44 49 52 29 5c 77 69 -I"$(_TCLDIR)\wi
9760: 6e 22 0a 0a 21 65 6e 64 69 66 20 23 20 54 43 4c n"..!endif # TCL
9770: 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 20 21 24 28 INSTALL..!if !$(
9780: 53 54 41 54 49 43 5f 42 55 49 4c 44 29 20 26 26 STATIC_BUILD) &&
9790: 20 22 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f "$(TCL_BUILD_FO
97a0: 52 29 22 20 3d 3d 20 22 38 22 0a 74 63 6c 6c 69 R)" == "8".tclli
97b0: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
97c0: 49 42 29 22 0a 21 65 6c 73 65 0a 74 63 6c 6c 69 IB)".!else.tclli
97d0: 62 73 20 3d 20 22 24 28 54 43 4c 53 54 55 42 4c bs = "$(TCLSTUBL
97e0: 49 42 29 22 20 22 24 28 54 43 4c 49 4d 50 4c 49 IB)" "$(TCLIMPLI
97f0: 42 29 22 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 B)".!endif..!end
9800: 69 66 20 23 20 24 28 44 4f 49 4e 47 5f 54 43 4c if # $(DOING_TCL
9810: 29 0a 0a 23 20 57 65 20 6e 65 65 64 20 61 20 74 )..# We need a t
9820: 63 6c 73 68 20 74 68 61 74 20 77 69 6c 6c 20 72 clsh that will r
9830: 75 6e 20 6f 6e 20 74 68 65 20 68 6f 73 74 20 6d un on the host m
9840: 61 63 68 69 6e 65 20 61 73 20 70 61 72 74 20 6f achine as part o
9850: 66 20 74 68 65 20 62 75 69 6c 64 2e 0a 23 20 49 f the build..# I
9860: 58 38 36 20 72 75 6e 73 20 6f 6e 20 61 6c 6c 20 X86 runs on all
9870: 61 72 63 68 69 74 65 63 74 75 72 65 73 2e 0a 21 architectures..!
9880: 69 66 6e 64 65 66 20 54 43 4c 53 48 5f 4e 41 54 ifndef TCLSH_NAT
9890: 49 56 45 0a 21 69 66 20 22 24 28 4d 41 43 48 49 IVE.!if "$(MACHI
98a0: 4e 45 29 22 20 3d 3d 20 22 49 58 38 36 22 20 7c NE)" == "IX86" |
98b0: 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d | "$(MACHINE)" =
98c0: 3d 20 22 24 28 4e 41 54 49 56 45 5f 41 52 43 48 = "$(NATIVE_ARCH
98d0: 29 22 0a 54 43 4c 53 48 5f 4e 41 54 49 56 45 09 )".TCLSH_NATIVE.
98e0: 3d 20 24 28 54 43 4c 53 48 29 0a 21 65 6c 73 65 = $(TCLSH).!else
98f0: 0a 21 65 72 72 6f 72 20 59 6f 75 20 6d 75 73 74 .!error You must
9900: 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 explicitly set
9910: 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 66 6f 72 TCLSH_NATIVE for
9920: 20 63 72 6f 73 73 2d 63 6f 6d 70 69 6c 61 74 69 cross-compilati
9930: 6f 6e 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 on.!endif.!endif
9940: 0a 0a 23 20 44 6f 20 74 68 65 20 73 61 6d 65 20 ..# Do the same
9950: 66 6f 72 20 54 6b 20 61 6e 64 20 54 6b 20 65 78 for Tk and Tk ex
9960: 74 65 6e 73 69 6f 6e 73 20 74 68 61 74 20 72 65 tensions that re
9970: 71 75 69 72 65 20 74 68 65 20 54 6b 20 6c 69 62 quire the Tk lib
9980: 72 61 72 69 65 73 0a 21 69 66 20 24 28 44 4f 49 raries.!if $(DOI
9990: 4e 47 5f 54 4b 29 20 7c 7c 20 24 28 4e 45 45 44 NG_TK) || $(NEED
99a0: 5f 54 4b 29 0a 57 49 53 48 4e 41 4d 45 50 52 45 _TK).WISHNAMEPRE
99b0: 46 49 58 20 3d 20 77 69 73 68 0a 57 49 53 48 4e FIX = wish.WISHN
99c0: 41 4d 45 20 3d 20 24 28 57 49 53 48 4e 41 4d 45 AME = $(WISHNAME
99d0: 50 52 45 46 49 58 29 24 28 54 4b 5f 56 45 52 53 PREFIX)$(TK_VERS
99e0: 49 4f 4e 29 24 28 53 55 46 58 29 2e 65 78 65 0a ION)$(SUFX).exe.
99f0: 54 4b 4c 49 42 4e 41 4d 45 38 09 3d 20 74 6b 24 TKLIBNAME8.= tk$
9a00: 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 (TK_VERSION)$(SU
9a10: 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 4c 49 42 FX).$(EXT).TKLIB
9a20: 4e 41 4d 45 39 09 3d 20 74 63 6c 39 74 6b 24 28 NAME9.= tcl9tk$(
9a30: 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 55 46 TK_VERSION)$(SUF
9a40: 58 29 2e 24 28 45 58 54 29 0a 21 69 66 20 24 28 X).$(EXT).!if $(
9a50: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
9a60: 4e 29 20 3d 3d 20 38 20 7c 7c 20 22 24 28 54 43 N) == 8 || "$(TC
9a70: 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 22 20 3d 3d L_BUILD_FOR)" ==
9a80: 20 22 38 22 0a 54 4b 4c 49 42 4e 41 4d 45 09 3d "8".TKLIBNAME.=
9a90: 20 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 tk$(TK_VERSION)
9aa0: 24 28 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 $(SUFX).$(EXT).T
9ab0: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b KIMPLIBNAME.= tk
9ac0: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
9ad0: 55 46 58 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 UFX).lib.!else.T
9ae0: 4b 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 74 KLIBNAME.= tcl9t
9af0: 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 k$(TK_VERSION)$(
9b00: 53 55 46 58 29 2e 24 28 45 58 54 29 0a 54 4b 49 SUFX).$(EXT).TKI
9b10: 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 63 6c 39 MPLIBNAME.= tcl9
9b20: 74 6b 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 tk$(TK_VERSION)$
9b30: 28 53 55 46 58 29 2e 6c 69 62 0a 21 65 6e 64 69 (SUFX).lib.!endi
9b40: 66 0a 21 69 66 20 24 28 54 4b 5f 4d 41 4a 4f 52 f.!if $(TK_MAJOR
9b50: 5f 56 45 52 53 49 4f 4e 29 20 3d 3d 20 38 0a 54 _VERSION) == 8.T
9b60: 4b 53 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 KSTUBLIBNAME.= t
9b70: 6b 73 74 75 62 24 28 54 4b 5f 56 45 52 53 49 4f kstub$(TK_VERSIO
9b80: 4e 29 2e 6c 69 62 0a 21 65 6c 73 65 0a 54 4b 53 N).lib.!else.TKS
9b90: 54 55 42 4c 49 42 4e 41 4d 45 09 3d 20 74 6b 73 TUBLIBNAME.= tks
9ba0: 74 75 62 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a tub.lib.!endif..
9bb0: 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 4b 29 0a !if $(DOING_TK).
9bc0: 57 49 53 48 09 09 3d 20 24 28 4f 55 54 5f 44 49 WISH..= $(OUT_DI
9bd0: 52 29 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 R)\$(WISHNAME).T
9be0: 4b 53 54 55 42 4c 49 42 09 3d 20 24 28 4f 55 54 KSTUBLIB.= $(OUT
9bf0: 5f 44 49 52 29 5c 24 28 54 4b 53 54 55 42 4c 49 _DIR)\$(TKSTUBLI
9c00: 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 42 09 BNAME).TKIMPLIB.
9c10: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 54 = $(OUT_DIR)\$(T
9c20: 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a 54 4b 4c KIMPLIBNAME).TKL
9c30: 49 42 09 09 3d 20 24 28 4f 55 54 5f 44 49 52 29 IB..= $(OUT_DIR)
9c40: 5c 24 28 54 4b 4c 49 42 4e 41 4d 45 29 0a 54 4b \$(TKLIBNAME).TK
9c50: 5f 49 4e 43 4c 55 44 45 53 20 20 20 20 20 3d 20 _INCLUDES =
9c60: 2d 49 22 24 28 57 49 4e 5f 44 49 52 29 22 20 2d -I"$(WIN_DIR)" -
9c70: 49 22 24 28 47 45 4e 45 52 49 43 44 49 52 29 22 I"$(GENERICDIR)"
9c80: 0a 54 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 .TKSCRIPTZIP
9c90: 20 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 = $(OUT_DIR)\$(
9ca0: 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 65 TK_ZIP_FILE)..!e
9cb0: 6c 73 65 20 23 20 65 66 66 65 63 74 69 76 65 6c lse # effectivel
9cc0: 79 20 4e 45 45 44 5f 54 4b 0a 0a 21 69 66 20 24 y NEED_TK..!if $
9cd0: 28 54 4b 49 4e 53 54 41 4c 4c 29 20 23 20 42 75 (TKINSTALL) # Bu
9ce0: 69 6c 64 69 6e 67 20 61 67 61 69 6e 73 74 20 69 ilding against i
9cf0: 6e 73 74 61 6c 6c 65 64 20 54 6b 0a 57 49 53 48 nstalled Tk.WISH
9d00: 09 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 62 69 ..= $(_TKDIR)\bi
9d10: 6e 5c 24 28 57 49 53 48 4e 41 4d 45 29 0a 54 4b n\$(WISHNAME).TK
9d20: 53 54 55 42 4c 49 42 09 3d 20 24 28 5f 54 4b 44 STUBLIB.= $(_TKD
9d30: 49 52 29 5c 6c 69 62 5c 24 28 54 4b 53 54 55 42 IR)\lib\$(TKSTUB
9d40: 4c 49 42 4e 41 4d 45 29 0a 54 4b 49 4d 50 4c 49 LIBNAME).TKIMPLI
9d50: 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 B.= $(_TKDIR)\li
9d60: 62 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 b\$(TKIMPLIBNAME
9d70: 29 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e ).# When buildin
9d80: 67 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 6d 61 g extensions, ma
9d90: 79 20 62 65 20 6c 69 6e 6b 69 6e 67 20 61 67 61 y be linking aga
9da0: 69 6e 73 74 20 54 6b 20 74 68 61 74 20 64 6f 65 inst Tk that doe
9db0: 73 20 6e 6f 74 20 61 64 64 0a 23 20 22 74 22 20 s not add.# "t"
9dc0: 73 75 66 66 69 78 20 28 65 2e 67 2e 20 38 2e 36 suffix (e.g. 8.6
9dd0: 29 2e 20 49 66 20 6c 69 62 20 6e 6f 74 20 66 6f ). If lib not fo
9de0: 75 6e 64 20 63 68 65 63 6b 20 66 6f 72 20 74 68 und check for th
9df0: 61 74 20 70 6f 73 73 69 62 69 6c 69 74 79 2e 0a at possibility..
9e00: 21 69 66 20 21 65 78 69 73 74 28 22 24 28 54 4b !if !exist("$(TK
9e10: 49 4d 50 4c 49 42 29 22 29 0a 54 4b 49 4d 50 4c IMPLIB)").TKIMPL
9e20: 49 42 4e 41 4d 45 09 3d 20 74 6b 24 28 54 4b 5f IBNAME.= tk$(TK_
9e30: 56 45 52 53 49 4f 4e 29 24 28 53 55 46 58 3a 74 VERSION)$(SUFX:t
9e40: 3d 29 2e 6c 69 62 0a 54 4b 49 4d 50 4c 49 42 09 =).lib.TKIMPLIB.
9e50: 3d 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c = $(_TKDIR)\lib\
9e60: 24 28 54 4b 49 4d 50 4c 49 42 4e 41 4d 45 29 0a $(TKIMPLIBNAME).
9e70: 21 65 6e 64 69 66 0a 54 4b 5f 49 4e 43 4c 55 44 !endif.TK_INCLUD
9e80: 45 53 20 20 20 20 20 3d 20 2d 49 22 24 28 5f 54 ES = -I"$(_T
9e90: 4b 44 49 52 29 5c 69 6e 63 6c 75 64 65 22 0a 54 KDIR)\include".T
9ea0: 4b 53 43 52 49 50 54 5a 49 50 20 20 20 20 20 3d KSCRIPTZIP =
9eb0: 20 24 28 5f 54 4b 44 49 52 29 5c 6c 69 62 5c 24 $(_TKDIR)\lib\$
9ec0: 28 54 4b 5f 5a 49 50 5f 46 49 4c 45 29 0a 0a 21 (TK_ZIP_FILE)..!
9ed0: 65 6c 73 65 20 23 20 42 75 69 6c 64 69 6e 67 20 else # Building
9ee0: 61 67 61 69 6e 73 74 20 54 6b 20 73 6f 75 72 63 against Tk sourc
9ef0: 65 73 0a 0a 57 49 53 48 09 09 3d 20 24 28 5f 54 es..WISH..= $(_T
9f00: 4b 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c KDIR)\win\$(BUIL
9f10: 44 44 49 52 54 4f 50 29 5c 24 28 57 49 53 48 4e DDIRTOP)\$(WISHN
9f20: 41 4d 45 29 0a 54 4b 53 54 55 42 4c 49 42 09 3d AME).TKSTUBLIB.=
9f30: 20 24 28 5f 54 4b 44 49 52 29 5c 77 69 6e 5c 24 $(_TKDIR)\win\$
9f40: 28 42 55 49 4c 44 44 49 52 54 4f 50 29 5c 24 28 (BUILDDIRTOP)\$(
9f50: 54 4b 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a 54 TKSTUBLIBNAME).T
9f60: 4b 49 4d 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 KIMPLIB.= $(_TKD
9f70: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
9f80: 49 52 54 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49 IRTOP)\$(TKIMPLI
9f90: 42 4e 41 4d 45 29 0a 23 20 57 68 65 6e 20 62 75 BNAME).# When bu
9fa0: 69 6c 64 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e ilding extension
9fb0: 73 2c 20 6d 61 79 20 62 65 20 6c 69 6e 6b 69 6e s, may be linkin
9fc0: 67 20 61 67 61 69 6e 73 74 20 54 6b 20 74 68 61 g against Tk tha
9fd0: 74 20 64 6f 65 73 20 6e 6f 74 20 61 64 64 0a 23 t does not add.#
9fe0: 20 22 74 22 20 73 75 66 66 69 78 20 28 65 2e 67 "t" suffix (e.g
9ff0: 2e 20 38 2e 36 29 2e 20 49 66 20 6c 69 62 20 6e . 8.6). If lib n
a000: 6f 74 20 66 6f 75 6e 64 20 63 68 65 63 6b 20 66 ot found check f
a010: 6f 72 20 74 68 61 74 20 70 6f 73 73 69 62 69 6c or that possibil
a020: 69 74 79 2e 0a 21 69 66 20 21 65 78 69 73 74 28 ity..!if !exist(
a030: 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 29 0a 54 "$(TKIMPLIB)").T
a040: 4b 49 4d 50 4c 49 42 4e 41 4d 45 09 3d 20 74 6b KIMPLIBNAME.= tk
a050: 24 28 54 4b 5f 56 45 52 53 49 4f 4e 29 24 28 53 $(TK_VERSION)$(S
a060: 55 46 58 3a 74 3d 29 2e 6c 69 62 0a 54 4b 49 4d UFX:t=).lib.TKIM
a070: 50 4c 49 42 09 3d 20 24 28 5f 54 4b 44 49 52 29 PLIB.= $(_TKDIR)
a080: 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 52 54 \win\$(BUILDDIRT
a090: 4f 50 29 5c 24 28 54 4b 49 4d 50 4c 49 42 4e 41 OP)\$(TKIMPLIBNA
a0a0: 4d 45 29 0a 21 65 6e 64 69 66 0a 54 4b 5f 49 4e ME).!endif.TK_IN
a0b0: 43 4c 55 44 45 53 20 20 20 20 20 3d 20 2d 49 22 CLUDES = -I"
a0c0: 24 28 5f 54 4b 44 49 52 29 5c 67 65 6e 65 72 69 $(_TKDIR)\generi
a0d0: 63 22 20 2d 49 22 24 28 5f 54 4b 44 49 52 29 5c c" -I"$(_TKDIR)\
a0e0: 77 69 6e 22 20 2d 49 22 24 28 5f 54 4b 44 49 52 win" -I"$(_TKDIR
a0f0: 29 5c 78 6c 69 62 22 0a 54 4b 53 43 52 49 50 54 )\xlib".TKSCRIPT
a100: 5a 49 50 20 20 20 20 20 3d 20 24 28 5f 54 4b 44 ZIP = $(_TKD
a110: 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 IR)\win\$(BUILDD
a120: 49 52 54 4f 50 29 5c 24 28 54 4b 5f 5a 49 50 5f IRTOP)\$(TK_ZIP_
a130: 46 49 4c 45 29 0a 0a 21 65 6e 64 69 66 20 23 20 FILE)..!endif #
a140: 54 4b 49 4e 53 54 41 4c 4c 0a 0a 74 6b 6c 69 62 TKINSTALL..tklib
a150: 73 20 3d 20 22 24 28 54 4b 53 54 55 42 4c 49 42 s = "$(TKSTUBLIB
a160: 29 22 20 22 24 28 54 4b 49 4d 50 4c 49 42 29 22 )" "$(TKIMPLIB)"
a170: 0a 0a 21 65 6e 64 69 66 20 23 20 24 28 44 4f 49 ..!endif # $(DOI
a180: 4e 47 5f 54 4b 29 0a 21 65 6e 64 69 66 20 23 20 NG_TK).!endif #
a190: 24 28 44 4f 49 4e 47 5f 54 4b 29 20 7c 7c 20 24 $(DOING_TK) || $
a1a0: 28 4e 45 45 44 5f 54 4b 29 0a 0a 23 20 56 61 72 (NEED_TK)..# Var
a1b0: 69 6f 75 73 20 6f 75 74 70 75 74 20 70 61 74 68 ious output path
a1c0: 73 0a 50 52 4a 49 4d 50 4c 49 42 09 3d 20 24 28 s.PRJIMPLIB.= $(
a1d0: 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 OUT_DIR)\$(PROJE
a1e0: 43 54 29 24 28 56 45 52 53 49 4f 4e 29 24 28 53 CT)$(VERSION)$(S
a1f0: 55 46 58 29 2e 6c 69 62 0a 23 20 45 76 65 6e 20 UFX).lib.# Even
a200: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 61 67 when building ag
a210: 61 69 6e 73 74 20 54 63 6c 20 39 2c 20 50 52 4a ainst Tcl 9, PRJ
a220: 4c 49 42 4e 41 4d 45 38 20 6d 75 73 74 20 68 61 LIBNAME8 must ha
a230: 76 65 20 22 74 22 0a 50 52 4a 4c 49 42 4e 41 4d ve "t".PRJLIBNAM
a240: 45 38 09 3d 20 24 28 50 52 4f 4a 45 43 54 29 24 E8.= $(PROJECT)$
a250: 28 56 45 52 53 49 4f 4e 29 74 24 28 53 55 46 58 (VERSION)t$(SUFX
a260: 3a 74 3d 29 2e 24 28 45 58 54 29 0a 23 20 45 76 :t=).$(EXT).# Ev
a270: 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 en when building
a280: 20 61 67 61 69 6e 73 74 20 54 63 6c 20 38 2c 20 against Tcl 8,
a290: 50 52 4a 4c 49 42 4e 41 4d 45 39 20 6d 75 73 74 PRJLIBNAME9 must
a2a0: 20 6e 6f 74 20 68 61 76 65 20 22 74 22 0a 50 52 not have "t".PR
a2b0: 4a 4c 49 42 4e 41 4d 45 39 09 3d 20 74 63 6c 39 JLIBNAME9.= tcl9
a2c0: 24 28 50 52 4f 4a 45 43 54 29 24 28 56 45 52 53 $(PROJECT)$(VERS
a2d0: 49 4f 4e 29 24 28 53 55 46 58 3a 74 3d 29 2e 24 ION)$(SUFX:t=).$
a2e0: 28 45 58 54 29 0a 21 69 66 20 24 28 54 43 4c 5f (EXT).!if $(TCL_
a2f0: 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 20 3d MAJOR_VERSION) =
a300: 3d 20 38 20 7c 7c 20 22 24 28 54 43 4c 5f 42 55 = 8 || "$(TCL_BU
a310: 49 4c 44 5f 46 4f 52 29 22 20 3d 3d 20 22 38 22 ILD_FOR)" == "8"
a320: 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 24 28 .PRJLIBNAME.= $(
a330: 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 21 65 6c PRJLIBNAME8).!el
a340: 73 65 0a 50 52 4a 4c 49 42 4e 41 4d 45 09 3d 20 se.PRJLIBNAME.=
a350: 24 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 0a 21 $(PRJLIBNAME9).!
a360: 65 6e 64 69 66 0a 50 52 4a 4c 49 42 09 09 3d 20 endif.PRJLIB..=
a370: 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 52 4a $(OUT_DIR)\$(PRJ
a380: 4c 49 42 4e 41 4d 45 29 0a 0a 21 69 66 20 24 28 LIBNAME)..!if $(
a390: 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f TCL_MAJOR_VERSIO
a3a0: 4e 29 20 3d 3d 20 38 0a 50 52 4a 53 54 55 42 4c N) == 8.PRJSTUBL
a3b0: 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 55 42 50 IBNAME.= $(STUBP
a3c0: 52 45 46 49 58 29 24 28 56 45 52 53 49 4f 4e 29 REFIX)$(VERSION)
a3d0: 2e 6c 69 62 0a 21 65 6c 73 65 0a 50 52 4a 53 54 .lib.!else.PRJST
a3e0: 55 42 4c 49 42 4e 41 4d 45 09 3d 20 24 28 53 54 UBLIBNAME.= $(ST
a3f0: 55 42 50 52 45 46 49 58 29 2e 6c 69 62 0a 21 65 UBPREFIX).lib.!e
a400: 6e 64 69 66 0a 50 52 4a 53 54 55 42 4c 49 42 09 ndif.PRJSTUBLIB.
a410: 3d 20 24 28 4f 55 54 5f 44 49 52 29 5c 24 28 50 = $(OUT_DIR)\$(P
a420: 52 4a 53 54 55 42 4c 49 42 4e 41 4d 45 29 0a 0a RJSTUBLIBNAME)..
a430: 23 20 49 66 20 65 78 74 65 6e 73 69 6f 6e 20 70 # If extension p
a440: 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 68 arent makefile h
a450: 61 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 61 as not defined a
a460: 20 72 65 73 6f 75 72 63 65 20 64 65 66 69 6e 69 resource defini
a470: 74 69 6f 6e 20 66 69 6c 65 2c 0a 23 20 77 65 20 tion file,.# we
a480: 77 69 6c 6c 20 67 65 6e 65 72 61 74 65 20 6f 6e will generate on
a490: 65 20 66 72 6f 6d 20 73 74 61 6e 64 61 72 64 20 e from standard
a4a0: 74 65 6d 70 6c 61 74 65 2e 0a 21 69 66 20 21 24 template..!if !$
a4b0: 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 (DOING_TCL) && !
a4c0: 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 26 20 21 $(DOING_TK) && !
a4d0: 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 0a $(STATIC_BUILD).
a4e0: 21 69 66 64 65 66 20 52 43 46 49 4c 45 0a 52 45 !ifdef RCFILE.RE
a4f0: 53 46 49 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 SFILE = $(TMP_DI
a500: 52 29 5c 24 28 52 43 46 49 4c 45 3a 2e 72 63 3d R)\$(RCFILE:.rc=
a510: 2e 72 65 73 29 0a 21 65 6c 73 65 0a 52 45 53 46 .res).!else.RESF
a520: 49 4c 45 20 3d 20 24 28 54 4d 50 5f 44 49 52 29 ILE = $(TMP_DIR)
a530: 5c 24 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 0a \$(PROJECT).res.
a540: 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 !endif.!endif..#
a550: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a560: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a570: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a580: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
a590: 23 23 0a 23 20 31 31 2e 20 43 6f 6e 73 74 72 75 ##.# 11. Constru
a5a0: 63 74 20 74 68 65 20 70 61 74 68 73 20 66 6f 72 ct the paths for
a5b0: 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f the installatio
a5c0: 6e 20 64 69 72 65 63 74 6f 72 69 65 73 0a 23 20 n directories.#
a5d0: 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6d 61 The following ma
a5e0: 63 72 6f 73 20 67 65 74 20 64 65 66 69 6e 65 64 cros get defined
a5f0: 20 69 6e 20 74 68 69 73 20 73 65 63 74 69 6f 6e in this section
a600: 3a 0a 23 20 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f :.# LIB_INSTALL_
a610: 44 49 52 20 2d 20 77 68 65 72 65 20 6c 69 62 72 DIR - where libr
a620: 61 72 69 65 73 20 73 68 6f 75 6c 64 20 62 65 20 aries should be
a630: 69 6e 73 74 61 6c 6c 65 64 0a 23 20 42 49 4e 5f installed.# BIN_
a640: 49 4e 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 INSTALL_DIR - wh
a650: 65 72 65 20 74 68 65 20 65 78 65 63 75 74 61 62 ere the executab
a660: 6c 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e les should be in
a670: 73 74 61 6c 6c 65 64 0a 23 20 44 4f 43 5f 49 4e stalled.# DOC_IN
a680: 53 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 STALL_DIR - wher
a690: 65 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 e documentation
a6a0: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a6b0: 6c 65 64 0a 23 20 53 43 52 49 50 54 5f 49 4e 53 led.# SCRIPT_INS
a6c0: 54 41 4c 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 TALL_DIR - where
a6d0: 20 73 63 72 69 70 74 73 20 73 68 6f 75 6c 64 20 scripts should
a6e0: 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 20 49 be installed.# I
a6f0: 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 NCLUDE_INSTALL_D
a700: 49 52 20 2d 20 77 68 65 72 65 20 43 20 69 6e 63 IR - where C inc
a710: 6c 75 64 65 20 66 69 6c 65 73 20 73 68 6f 75 6c lude files shoul
a720: 64 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 0a 23 d be installed.#
a730: 20 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 DEMO_INSTALL_DI
a740: 52 20 2d 20 77 68 65 72 65 20 64 65 6d 6f 73 20 R - where demos
a750: 73 68 6f 75 6c 64 20 62 65 20 69 6e 73 74 61 6c should be instal
a760: 6c 65 64 0a 23 20 50 52 4a 5f 49 4e 53 54 41 4c led.# PRJ_INSTAL
a770: 4c 5f 44 49 52 20 2d 20 77 68 65 72 65 20 70 61 L_DIR - where pa
a780: 63 6b 61 67 65 20 77 69 6c 6c 20 62 65 20 69 6e ckage will be in
a790: 73 74 61 6c 6c 65 64 20 28 6e 6f 74 20 73 65 74 stalled (not set
a7a0: 20 66 6f 72 20 54 63 6c 20 61 6e 64 20 54 6b 29 for Tcl and Tk)
a7b0: 0a 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f 54 43 ..!if $(DOING_TC
a7c0: 4c 29 20 7c 7c 20 24 28 44 4f 49 4e 47 5f 54 4b L) || $(DOING_TK
a7d0: 29 0a 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 ).LIB_INSTALL_DI
a7e0: 52 09 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 R..= $(_INSTALLD
a7f0: 49 52 29 5c 6c 69 62 0a 42 49 4e 5f 49 4e 53 54 IR)\lib.BIN_INST
a800: 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 5f 49 4e ALL_DIR..= $(_IN
a810: 53 54 41 4c 4c 44 49 52 29 5c 62 69 6e 0a 44 4f STALLDIR)\bin.DO
a820: 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 3d C_INSTALL_DIR..=
a830: 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 29 5c $(_INSTALLDIR)\
a840: 64 6f 63 0a 21 69 66 20 24 28 44 4f 49 4e 47 5f doc.!if $(DOING_
a850: 54 43 4c 29 0a 53 43 52 49 50 54 5f 49 4e 53 54 TCL).SCRIPT_INST
a860: 41 4c 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 ALL_DIR.= $(_INS
a870: 54 41 4c 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 TALLDIR)\lib\$(P
a880: 52 4f 4a 45 43 54 29 24 28 54 43 4c 5f 4d 41 4a ROJECT)$(TCL_MAJ
a890: 4f 52 5f 56 45 52 53 49 4f 4e 29 2e 24 28 54 43 OR_VERSION).$(TC
a8a0: 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MINOR_VERSION)
a8b0: 0a 4d 4f 44 55 4c 45 5f 49 4e 53 54 41 4c 4c 5f .MODULE_INSTALL_
a8c0: 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c DIR.= $(_INSTALL
a8d0: 44 49 52 29 5c 6c 69 62 5c 74 63 6c 24 28 54 43 DIR)\lib\tcl$(TC
a8e0: 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MAJOR_VERSION)
a8f0: 0a 21 65 6c 73 65 20 23 20 44 4f 49 4e 47 5f 54 .!else # DOING_T
a900: 4b 0a 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c K.SCRIPT_INSTALL
a910: 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c _DIR.= $(_INSTAL
a920: 4c 44 49 52 29 5c 6c 69 62 5c 24 28 50 52 4f 4a LDIR)\lib\$(PROJ
a930: 45 43 54 29 24 28 54 4b 5f 4d 41 4a 4f 52 5f 56 ECT)$(TK_MAJOR_V
a940: 45 52 53 49 4f 4e 29 2e 24 28 54 4b 5f 4d 49 4e ERSION).$(TK_MIN
a950: 4f 52 5f 56 45 52 53 49 4f 4e 29 0a 21 65 6e 64 OR_VERSION).!end
a960: 69 66 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f if.DEMO_INSTALL_
a970: 44 49 52 09 3d 20 24 28 53 43 52 49 50 54 5f 49 DIR.= $(SCRIPT_I
a980: 4e 53 54 41 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f NSTALL_DIR)\demo
a990: 73 0a 49 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c s.INCLUDE_INSTAL
a9a0: 4c 5f 44 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 L_DIR.= $(_INSTA
a9b0: 4c 4c 44 49 52 29 5c 69 6e 63 6c 75 64 65 0a 0a LLDIR)\include..
a9c0: 21 65 6c 73 65 20 23 20 65 78 74 65 6e 73 69 6f !else # extensio
a9d0: 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 54 6b 0a n other than Tk.
a9e0: 0a 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 .PRJ_INSTALL_DIR
a9f0: 20 20 20 20 20 20 20 20 20 3d 20 24 28 5f 49 4e = $(_IN
aa00: 53 54 41 4c 4c 44 49 52 29 5c 24 28 50 52 4f 4a STALLDIR)\$(PROJ
aa10: 45 43 54 29 24 28 44 4f 54 56 45 52 53 49 4f 4e ECT)$(DOTVERSION
aa20: 29 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 4c 41 ).!if $(MULTIPLA
aa30: 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 0a 42 TFORM_INSTALL).B
aa40: 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 09 IN_INSTALL_DIR..
aa50: 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f = $(PRJ_INSTALL_
aa60: 44 49 52 29 5c 24 28 50 4c 41 54 46 4f 52 4d 5f DIR)\$(PLATFORM_
aa70: 49 44 45 4e 54 49 46 59 29 0a 21 65 6c 73 65 0a IDENTIFY).!else.
aa80: 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 BIN_INSTALL_DIR.
aa90: 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c .= $(PRJ_INSTALL
aaa0: 5f 44 49 52 29 0a 21 65 6e 64 69 66 0a 21 69 66 _DIR).!endif.!if
aab0: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
aac0: 0a 23 20 46 6f 72 20 65 78 74 65 6e 73 69 6f 6e .# For extension
aad0: 73 2c 20 5f 49 4e 53 54 41 4c 4c 44 49 52 20 69 s, _INSTALLDIR i
aae0: 73 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 54 63 s location of Tc
aaf0: 6c 27 73 20 73 74 61 74 69 63 20 6c 69 62 73 0a l's static libs.
ab00: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 LIB_INSTALL_DIR.
ab10: 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 49 52 .= $(_INSTALLDIR
ab20: 29 0a 21 65 6c 73 65 0a 4c 49 42 5f 49 4e 53 54 ).!else.LIB_INST
ab30: 41 4c 4c 5f 44 49 52 09 09 3d 20 24 28 42 49 4e ALL_DIR..= $(BIN
ab40: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 0a 21 65 _INSTALL_DIR).!e
ab50: 6e 64 69 66 0a 44 4f 43 5f 49 4e 53 54 41 4c 4c ndif.DOC_INSTALL
ab60: 5f 44 49 52 09 09 3d 20 24 28 50 52 4a 5f 49 4e _DIR..= $(PRJ_IN
ab70: 53 54 41 4c 4c 5f 44 49 52 29 0a 53 43 52 49 50 STALL_DIR).SCRIP
ab80: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 09 3d 20 T_INSTALL_DIR.=
ab90: 24 28 50 52 4a 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(PRJ_INSTALL_DI
aba0: 52 29 0a 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f R).DEMO_INSTALL_
abb0: 44 49 52 09 3d 20 24 28 50 52 4a 5f 49 4e 53 54 DIR.= $(PRJ_INST
abc0: 41 4c 4c 5f 44 49 52 29 5c 64 65 6d 6f 73 0a 49 ALL_DIR)\demos.I
abd0: 4e 43 4c 55 44 45 5f 49 4e 53 54 41 4c 4c 5f 44 NCLUDE_INSTALL_D
abe0: 49 52 09 3d 20 24 28 5f 49 4e 53 54 41 4c 4c 44 IR.= $(_INSTALLD
abf0: 49 52 29 5c 2e 2e 5c 69 6e 63 6c 75 64 65 0a 0a IR)\..\include..
ac00: 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 23 23 !endif..########
ac10: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ac20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ac30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ac40: 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 32 ###########.# 12
ac50: 2e 20 53 65 74 20 75 70 20 61 63 74 75 61 6c 20 . Set up actual
ac60: 6f 70 74 69 6f 6e 73 20 74 6f 20 62 65 20 70 61 options to be pa
ac70: 73 73 65 64 20 74 6f 20 74 68 65 20 63 6f 6d 70 ssed to the comp
ac80: 69 6c 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 0a iler and linker.
ac90: 23 20 4e 6f 77 20 77 65 20 68 61 76 65 20 61 6c # Now we have al
aca0: 6c 20 74 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f l the informatio
acb0: 6e 20 77 65 20 6e 65 65 64 2c 20 73 65 74 20 75 n we need, set u
acc0: 70 20 74 68 65 20 61 63 74 75 61 6c 20 66 6c 61 p the actual fla
acd0: 67 73 20 61 6e 64 0a 23 20 6f 70 74 69 6f 6e 73 gs and.# options
ace0: 20 74 68 61 74 20 77 65 20 77 69 6c 6c 20 70 61 that we will pa
acf0: 73 73 20 74 6f 20 74 68 65 20 63 6f 6d 70 69 6c ss to the compil
ad00: 65 72 20 61 6e 64 20 6c 69 6e 6b 65 72 2e 20 54 er and linker. T
ad10: 68 65 20 6d 61 69 6e 0a 23 20 6d 61 6b 65 66 69 he main.# makefi
ad20: 6c 65 20 73 68 6f 75 6c 64 20 75 73 65 20 74 68 le should use th
ad30: 65 73 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 ese in combinati
ad40: 6f 6e 20 77 69 74 68 20 77 68 61 74 65 76 65 72 on with whatever
ad50: 20 6f 74 68 65 72 20 66 6c 61 67 73 0a 23 20 61 other flags.# a
ad60: 6e 64 20 73 77 69 74 63 68 65 73 20 61 72 65 20 nd switches are
ad70: 73 70 65 63 69 66 69 63 20 74 6f 20 69 74 2e 0a specific to it..
ad80: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
ad90: 6d 61 63 72 6f 73 20 61 72 65 20 64 65 66 69 6e macros are defin
ada0: 65 64 2c 20 6e 61 6d 65 73 20 61 72 65 20 66 6f ed, names are fo
adb0: 72 20 68 69 73 74 6f 72 69 63 61 6c 20 63 6f 6d r historical com
adc0: 70 61 74 69 62 69 6c 69 74 79 3a 0a 23 20 4f 50 patibility:.# OP
add0: 54 44 45 46 49 4e 45 53 20 2d 20 2f 44 78 78 78 TDEFINES - /Dxxx
ade0: 20 43 20 6d 61 63 72 6f 20 66 6c 61 67 73 20 62 C macro flags b
adf0: 61 73 65 64 20 6f 6e 20 75 73 65 72 2d 73 70 65 ased on user-spe
ae00: 63 69 66 69 65 64 20 4f 50 54 53 0a 23 20 43 4f cified OPTS.# CO
ae10: 4d 50 49 4c 45 52 46 4c 41 47 53 20 2d 20 2f 44 MPILERFLAGS - /D
ae20: 78 78 78 20 43 20 6d 61 63 72 6f 20 66 6c 61 67 xxx C macro flag
ae30: 73 20 69 6e 64 65 70 65 6e 64 65 6e 74 20 6f 66 s independent of
ae40: 20 61 6e 79 20 63 6f 6e 66 69 67 75 72 61 74 69 any configurati
ae50: 6f 6e 20 6f 70 74 69 6f 6e 73 0a 23 20 63 72 74 on options.# crt
ae60: 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 74 - Compiler swit
ae70: 63 68 20 74 68 61 74 20 73 65 6c 65 63 74 73 20 ch that selects
ae80: 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 the appropriate
ae90: 43 20 72 75 6e 74 69 6d 65 0a 23 20 63 64 65 62 C runtime.# cdeb
aea0: 75 67 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 ug - Compiler sw
aeb0: 69 74 63 68 65 73 20 72 65 6c 61 74 65 64 20 74 itches related t
aec0: 6f 20 64 65 62 75 67 20 41 4e 44 20 6f 70 74 69 o debug AND opti
aed0: 6d 69 7a 61 74 69 6f 6e 73 0a 23 20 63 77 61 72 mizations.# cwar
aee0: 6e 20 2d 20 43 6f 6d 70 69 6c 65 72 20 73 77 69 n - Compiler swi
aef0: 74 63 68 65 73 20 74 68 61 74 20 73 65 74 20 77 tches that set w
af00: 61 72 6e 69 6e 67 20 6c 65 76 65 6c 73 0a 23 20 arning levels.#
af10: 63 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 cflags - complet
af20: 65 20 63 6f 6d 70 69 6c 65 72 20 73 77 69 74 63 e compiler switc
af30: 68 65 73 20 28 73 75 62 73 75 6d 65 73 20 63 64 hes (subsumes cd
af40: 65 62 75 67 20 61 6e 64 20 63 77 61 72 6e 29 0a ebug and cwarn).
af50: 23 20 6c 64 65 62 75 67 20 2d 20 4c 69 6e 6b 65 # ldebug - Linke
af60: 72 20 73 77 69 74 63 68 65 73 20 63 6f 6e 74 72 r switches contr
af70: 6f 6c 6c 69 6e 67 20 64 65 62 75 67 20 69 6e 66 olling debug inf
af80: 6f 72 6d 61 74 69 6f 6e 20 61 6e 64 20 6f 70 74 ormation and opt
af90: 69 6d 69 7a 61 74 69 6f 6e 0a 23 20 6c 66 6c 61 imization.# lfla
afa0: 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 gs - complete li
afb0: 6e 6b 65 72 20 73 77 69 74 63 68 65 73 20 28 73 nker switches (s
afc0: 75 62 73 75 6d 65 73 20 6c 64 65 62 75 67 29 20 ubsumes ldebug)
afd0: 65 78 63 65 70 74 20 73 75 62 73 79 73 74 65 6d except subsystem
afe0: 20 74 79 70 65 0a 23 20 64 6c 6c 6c 66 6c 61 67 type.# dlllflag
aff0: 73 20 2d 20 63 6f 6d 70 6c 65 74 65 20 6c 69 6e s - complete lin
b000: 6b 65 72 20 73 77 69 74 63 68 65 73 20 74 6f 20 ker switches to
b010: 62 75 69 6c 64 20 44 4c 4c 73 20 28 73 75 62 73 build DLLs (subs
b020: 75 6d 65 73 20 6c 66 6c 61 67 73 29 0a 23 20 63 umes lflags).# c
b030: 6f 6e 6c 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c onlflags - compl
b040: 65 74 65 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 ete linker switc
b050: 68 65 73 20 66 6f 72 20 63 6f 6e 73 6f 6c 65 20 hes for console
b060: 70 72 6f 67 72 61 6d 20 28 73 75 62 73 75 6d 65 program (subsume
b070: 73 20 6c 66 6c 61 67 73 29 0a 23 20 67 75 69 6c s lflags).# guil
b080: 66 6c 61 67 73 20 2d 20 63 6f 6d 70 6c 65 74 65 flags - complete
b090: 20 6c 69 6e 6b 65 72 20 73 77 69 74 63 68 65 73 linker switches
b0a0: 20 66 6f 72 20 47 55 49 20 70 72 6f 67 72 61 6d for GUI program
b0b0: 20 28 73 75 62 73 75 6d 65 73 20 6c 66 6c 61 67 (subsumes lflag
b0c0: 73 29 0a 23 20 62 61 73 65 6c 69 62 73 20 2d 20 s).# baselibs -
b0d0: 6d 69 6e 69 6d 75 6d 20 57 69 6e 64 6f 77 73 20 minimum Windows
b0e0: 6c 69 62 72 61 72 69 65 73 20 72 65 71 75 69 72 libraries requir
b0f0: 65 64 2e 20 50 61 72 65 6e 74 20 6d 61 6b 65 66 ed. Parent makef
b100: 69 6c 65 20 63 61 6e 0a 23 20 20 20 20 64 65 66 ile can.# def
b110: 69 6e 65 20 50 52 4a 5f 4c 49 42 53 20 62 65 66 ine PRJ_LIBS bef
b120: 6f 72 65 20 69 6e 63 6c 75 64 69 6e 67 20 72 75 ore including ru
b130: 6c 65 73 2e 72 63 20 69 66 20 61 64 64 69 74 69 les.rc if additi
b140: 6f 6e 61 6c 20 6c 69 62 73 20 61 72 65 20 6e 65 onal libs are ne
b150: 65 64 65 64 0a 0a 4f 50 54 44 45 46 49 4e 45 53 eded..OPTDEFINES
b160: 09 3d 20 2f 44 53 54 44 43 5f 48 45 41 44 45 52 .= /DSTDC_HEADER
b170: 53 20 2f 44 55 53 45 5f 4e 4d 41 4b 45 3d 31 0a S /DUSE_NMAKE=1.
b180: 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 !if $(VCVERSION)
b190: 20 3e 20 31 36 30 30 0a 4f 50 54 44 45 46 49 4e > 1600.OPTDEFIN
b1a0: 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 ES.= $(OPTDEFINE
b1b0: 53 29 20 2f 44 48 41 56 45 5f 53 54 44 49 4e 54 S) /DHAVE_STDINT
b1c0: 5f 48 3d 31 0a 21 65 6c 73 65 0a 4f 50 54 44 45 _H=1.!else.OPTDE
b1d0: 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 FINES.= $(OPTDEF
b1e0: 49 4e 45 53 29 20 2f 44 4d 50 5f 4e 4f 5f 53 54 INES) /DMP_NO_ST
b1f0: 44 49 4e 54 3d 31 0a 21 65 6e 64 69 66 0a 21 69 DINT=1.!endif.!i
b200: 66 20 24 28 56 43 56 45 52 53 49 4f 4e 29 20 3e f $(VCVERSION) >
b210: 3d 20 31 38 30 30 0a 4f 50 54 44 45 46 49 4e 45 = 1800.OPTDEFINE
b220: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b230: 29 20 2f 44 48 41 56 45 5f 49 4e 54 54 59 50 45 ) /DHAVE_INTTYPE
b240: 53 5f 48 3d 31 20 2f 44 48 41 56 45 5f 53 54 44 S_H=1 /DHAVE_STD
b250: 42 4f 4f 4c 5f 48 3d 31 0a 21 65 6e 64 69 66 0a BOOL_H=1.!endif.
b260: 0a 21 69 66 20 24 28 54 43 4c 5f 4d 45 4d 5f 44 .!if $(TCL_MEM_D
b270: 45 42 55 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 EBUG).OPTDEFINES
b280: 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 .= $(OPTDEFINES)
b290: 20 2f 44 54 43 4c 5f 4d 45 4d 5f 44 45 42 55 47 /DTCL_MEM_DEBUG
b2a0: 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 43 .!endif.!if $(TC
b2b0: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 29 L_COMPILE_DEBUG)
b2c0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
b2d0: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 OPTDEFINES) /DTC
b2e0: 4c 5f 43 4f 4d 50 49 4c 45 5f 44 45 42 55 47 20 L_COMPILE_DEBUG
b2f0: 2f 44 54 43 4c 5f 43 4f 4d 50 49 4c 45 5f 53 54 /DTCL_COMPILE_ST
b300: 41 54 53 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 ATS.!endif.!if $
b310: 28 54 43 4c 5f 54 48 52 45 41 44 53 29 20 26 26 (TCL_THREADS) &&
b320: 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e 29 20 $(TCL_VERSION)
b330: 3c 20 38 37 0a 4f 50 54 44 45 46 49 4e 45 53 09 < 87.OPTDEFINES.
b340: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b350: 2f 44 54 43 4c 5f 54 48 52 45 41 44 53 3d 31 0a /DTCL_THREADS=1.
b360: 21 69 66 20 24 28 55 53 45 5f 54 48 52 45 41 44 !if $(USE_THREAD
b370: 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 54 43 4c _ALLOC) && $(TCL
b380: 5f 56 45 52 53 49 4f 4e 29 20 3c 20 38 37 0a 4f _VERSION) < 87.O
b390: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b3a0: 54 44 45 46 49 4e 45 53 29 20 2f 44 55 53 45 5f TDEFINES) /DUSE_
b3b0: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 3d 31 0a 21 THREAD_ALLOC=1.!
b3c0: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 endif.!endif.!if
b3d0: 20 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 $(STATIC_BUILD)
b3e0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
b3f0: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 53 54 OPTDEFINES) /DST
b400: 41 54 49 43 5f 42 55 49 4c 44 0a 21 65 6c 73 65 ATIC_BUILD.!else
b410: 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f 4e if $(TCL_VERSION
b420: 29 20 3e 20 38 36 0a 4f 50 54 44 45 46 49 4e 45 ) > 86.OPTDEFINE
b430: 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 S.= $(OPTDEFINES
b440: 29 20 2f 44 54 43 4c 5f 57 49 54 48 5f 45 58 54 ) /DTCL_WITH_EXT
b450: 45 52 4e 41 4c 5f 54 4f 4d 4d 41 54 48 0a 21 69 ERNAL_TOMMATH.!i
b460: 66 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d f "$(MACHINE)" =
b470: 3d 20 22 41 4d 44 36 34 22 20 7c 7c 20 22 24 28 = "AMD64" || "$(
b480: 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 52 MACHINE)" == "AR
b490: 4d 36 34 22 0a 4f 50 54 44 45 46 49 4e 45 53 09 M64".OPTDEFINES.
b4a0: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b4b0: 2f 44 4d 50 5f 36 34 42 49 54 0a 21 65 6e 64 69 /DMP_64BIT.!endi
b4c0: 66 0a 21 65 6e 64 69 66 0a 21 69 66 20 24 28 54 f.!endif.!if $(T
b4d0: 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 CL_NO_DEPRECATED
b4e0: 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 ).OPTDEFINES.= $
b4f0: 28 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 (OPTDEFINES) /DT
b500: 43 4c 5f 4e 4f 5f 44 45 50 52 45 43 41 54 45 44 CL_NO_DEPRECATED
b510: 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 55 .!endif..!if $(U
b520: 53 45 5f 53 54 55 42 53 29 0a 23 20 4e 6f 74 65 SE_STUBS).# Note
b530: 20 77 65 20 64 6f 20 6e 6f 74 20 64 65 66 69 6e we do not defin
b540: 65 20 55 53 45 5f 54 43 4c 5f 53 54 55 42 53 20 e USE_TCL_STUBS
b550: 65 76 65 6e 20 77 68 65 6e 20 62 75 69 6c 64 69 even when buildi
b560: 6e 67 20 74 6b 20 73 69 6e 63 65 20 73 6f 6d 65 ng tk since some
b570: 0a 23 20 74 65 73 74 20 74 61 72 67 65 74 73 20 .# test targets
b580: 69 6e 20 74 6b 20 64 6f 20 6e 6f 74 20 75 73 65 in tk do not use
b590: 20 73 74 75 62 73 0a 21 69 66 20 21 24 28 44 4f stubs.!if !$(DO
b5a0: 49 4e 47 5f 54 43 4c 29 0a 55 53 45 5f 53 54 55 ING_TCL).USE_STU
b5b0: 42 53 5f 44 45 46 53 20 20 3d 20 2f 44 55 53 45 BS_DEFS = /DUSE
b5c0: 5f 54 43 4c 5f 53 54 55 42 53 20 2f 44 55 53 45 _TCL_STUBS /DUSE
b5d0: 5f 54 43 4c 4f 4f 5f 53 54 55 42 53 0a 21 69 66 _TCLOO_STUBS.!if
b5e0: 20 24 28 4e 45 45 44 5f 54 4b 29 0a 55 53 45 5f $(NEED_TK).USE_
b5f0: 53 54 55 42 53 5f 44 45 46 53 20 20 3d 20 24 28 STUBS_DEFS = $(
b600: 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 29 20 USE_STUBS_DEFS)
b610: 2f 44 55 53 45 5f 54 4b 5f 53 54 55 42 53 0a 21 /DUSE_TK_STUBS.!
b620: 65 6e 64 69 66 0a 21 65 6e 64 69 66 0a 21 65 6e endif.!endif.!en
b630: 64 69 66 20 23 20 55 53 45 5f 53 54 55 42 53 0a dif # USE_STUBS.
b640: 0a 21 69 66 20 21 24 28 44 45 42 55 47 29 0a 4f .!if !$(DEBUG).O
b650: 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 PTDEFINES.= $(OP
b660: 54 44 45 46 49 4e 45 53 29 20 2f 44 4e 44 45 42 TDEFINES) /DNDEB
b670: 55 47 0a 21 69 66 20 24 28 4f 50 54 49 4d 49 5a UG.!if $(OPTIMIZ
b680: 49 4e 47 29 0a 4f 50 54 44 45 46 49 4e 45 53 09 ING).OPTDEFINES.
b690: 3d 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 = $(OPTDEFINES)
b6a0: 2f 44 54 43 4c 5f 43 46 47 5f 4f 50 54 49 4d 49 /DTCL_CFG_OPTIMI
b6b0: 5a 45 44 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 ZED.!endif.!endi
b6c0: 66 0a 21 69 66 20 24 28 50 52 4f 46 49 4c 45 29 f.!if $(PROFILE)
b6d0: 0a 4f 50 54 44 45 46 49 4e 45 53 09 3d 20 24 28 .OPTDEFINES.= $(
b6e0: 4f 50 54 44 45 46 49 4e 45 53 29 20 2f 44 54 43 OPTDEFINES) /DTC
b6f0: 4c 5f 43 46 47 5f 50 52 4f 46 49 4c 45 44 0a 21 L_CFG_PROFILED.!
b700: 65 6e 64 69 66 0a 21 69 66 20 22 24 28 4d 41 43 endif.!if "$(MAC
b710: 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 HINE)" == "AMD64
b720: 22 20 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 " || "$(MACHINE)
b730: 22 20 3d 3d 20 22 41 52 4d 36 34 22 0a 4f 50 54 " == "ARM64".OPT
b740: 44 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 DEFINES.= $(OPTD
b750: 45 46 49 4e 45 53 29 20 2f 44 54 43 4c 5f 43 46 EFINES) /DTCL_CF
b760: 47 5f 44 4f 36 34 42 49 54 0a 21 65 6e 64 69 66 G_DO64BIT.!endif
b770: 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e .!if $(VCVERSION
b780: 29 20 3c 20 31 33 30 30 0a 4f 50 54 44 45 46 49 ) < 1300.OPTDEFI
b790: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b7a0: 45 53 29 20 2f 44 4e 4f 5f 53 54 52 54 4f 49 36 ES) /DNO_STRTOI6
b7b0: 34 3d 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 4=1.!endif..!if
b7c0: 24 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 $(TCL_MAJOR_VERS
b7d0: 49 4f 4e 29 20 3d 3d 20 38 0a 21 69 66 20 22 24 ION) == 8.!if "$
b7e0: 28 5f 55 53 45 5f 36 34 42 49 54 5f 54 49 4d 45 (_USE_64BIT_TIME
b7f0: 5f 54 29 22 20 3d 3d 20 22 31 22 0a 4f 50 54 44 _T)" == "1".OPTD
b800: 45 46 49 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 EFINES.= $(OPTDE
b810: 46 49 4e 45 53 29 20 2f 44 5f 55 53 45 5f 36 34 FINES) /D_USE_64
b820: 42 49 54 5f 54 49 4d 45 5f 54 3d 31 0a 21 65 6e BIT_TIME_T=1.!en
b830: 64 69 66 0a 21 65 6e 64 69 66 0a 21 69 66 20 22 dif.!endif.!if "
b840: 24 28 54 43 4c 5f 42 55 49 4c 44 5f 46 4f 52 29 $(TCL_BUILD_FOR)
b850: 22 20 3d 3d 20 22 38 22 0a 4f 50 54 44 45 46 49 " == "8".OPTDEFI
b860: 4e 45 53 09 3d 20 24 28 4f 50 54 44 45 46 49 4e NES.= $(OPTDEFIN
b870: 45 53 29 20 2f 44 54 43 4c 5f 4d 41 4a 4f 52 5f ES) /DTCL_MAJOR_
b880: 56 45 52 53 49 4f 4e 3d 38 20 2f 44 54 4b 5f 4d VERSION=8 /DTK_M
b890: 41 4a 4f 52 5f 56 45 52 53 49 4f 4e 3d 38 0a 21 AJOR_VERSION=8.!
b8a0: 65 6e 64 69 66 0a 0a 23 20 4c 69 6b 65 20 74 68 endif..# Like th
b8b0: 65 20 54 45 41 20 73 79 73 74 65 6d 20 6f 6e 6c e TEA system onl
b8c0: 79 20 73 65 74 20 74 68 69 73 20 6e 6f 6e 20 65 y set this non e
b8d0: 6d 70 74 79 20 66 6f 72 20 6e 6f 6e 2d 54 6b 20 mpty for non-Tk
b8e0: 65 78 74 65 6e 73 69 6f 6e 73 0a 23 20 4e 6f 74 extensions.# Not
b8f0: 65 3a 20 73 6f 6d 65 20 65 78 74 65 6e 73 69 6f e: some extensio
b900: 6e 73 20 75 73 65 20 50 41 43 4b 41 47 45 5f 4e ns use PACKAGE_N
b910: 41 4d 45 20 61 6e 64 20 6f 74 68 65 72 73 20 75 AME and others u
b920: 73 65 20 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 se PACKAGE_TCLNA
b930: 4d 45 0a 23 20 73 6f 20 77 65 20 70 61 73 73 20 ME.# so we pass
b940: 62 6f 74 68 0a 21 69 66 20 21 24 28 44 4f 49 4e both.!if !$(DOIN
b950: 47 5f 54 43 4c 29 20 26 26 20 21 24 28 44 4f 49 G_TCL) && !$(DOI
b960: 4e 47 5f 54 4b 29 0a 50 4b 47 4e 41 4d 45 46 4c NG_TK).PKGNAMEFL
b970: 41 47 53 20 3d 20 2f 44 50 41 43 4b 41 47 45 5f AGS = /DPACKAGE_
b980: 4e 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f 50 41 NAME="\"$(PRJ_PA
b990: 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 5c 22 CKAGE_TCLNAME)\"
b9a0: 22 20 5c 0a 09 2f 44 50 41 43 4b 41 47 45 5f 54 " \../DPACKAGE_T
b9b0: 43 4c 4e 41 4d 45 3d 22 5c 22 24 28 50 52 4a 5f CLNAME="\"$(PRJ_
b9c0: 50 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 PACKAGE_TCLNAME)
b9d0: 5c 22 22 20 5c 0a 09 2f 44 50 41 43 4b 41 47 45 \"" \../DPACKAGE
b9e0: 5f 56 45 52 53 49 4f 4e 3d 22 5c 22 24 28 44 4f _VERSION="\"$(DO
b9f0: 54 56 45 52 53 49 4f 4e 29 5c 22 22 20 5c 0a 09 TVERSION)\"" \..
ba00: 2f 44 4d 4f 44 55 4c 45 5f 53 43 4f 50 45 3d 65 /DMODULE_SCOPE=e
ba10: 78 74 65 72 6e 0a 21 65 6e 64 69 66 0a 0a 23 20 xtern.!endif..#
ba20: 63 72 74 20 70 69 63 6b 73 20 74 68 65 20 43 20 crt picks the C
ba30: 72 75 6e 20 74 69 6d 65 20 62 61 73 65 64 20 6f run time based o
ba40: 6e 20 73 65 6c 65 63 74 65 64 20 4f 50 54 53 0a n selected OPTS.
ba50: 21 69 66 20 24 28 4d 53 56 43 52 54 29 0a 21 69 !if $(MSVCRT).!i
ba60: 66 20 24 28 44 45 42 55 47 29 20 26 26 20 21 24 f $(DEBUG) && !$
ba70: 28 55 4e 43 48 45 43 4b 45 44 29 0a 63 72 74 20 (UNCHECKED).crt
ba80: 3d 20 2d 4d 44 64 0a 21 65 6c 73 65 0a 63 72 74 = -MDd.!else.crt
ba90: 20 3d 20 2d 4d 44 0a 21 65 6e 64 69 66 0a 21 65 = -MD.!endif.!e
baa0: 6c 73 65 0a 21 69 66 20 24 28 44 45 42 55 47 29 lse.!if $(DEBUG)
bab0: 20 26 26 20 21 24 28 55 4e 43 48 45 43 4b 45 44 && !$(UNCHECKED
bac0: 29 0a 63 72 74 20 3d 20 2d 4d 54 64 0a 21 65 6c ).crt = -MTd.!el
bad0: 73 65 0a 63 72 74 20 3d 20 2d 4d 54 0a 21 65 6e se.crt = -MT.!en
bae0: 64 69 66 0a 21 65 6e 64 69 66 0a 0a 23 20 63 64 dif.!endif..# cd
baf0: 65 62 75 67 20 69 6e 63 6c 75 64 65 73 20 63 6f ebug includes co
bb00: 6d 70 69 6c 65 72 20 6f 70 74 69 6f 6e 73 20 66 mpiler options f
bb10: 6f 72 20 64 65 62 75 67 67 69 6e 67 20 61 73 20 or debugging as
bb20: 77 65 6c 6c 20 61 73 20 6f 70 74 69 6d 69 7a 61 well as optimiza
bb30: 74 69 6f 6e 2e 0a 21 69 66 20 24 28 44 45 42 55 tion..!if $(DEBU
bb40: 47 29 0a 0a 23 20 49 6e 20 64 65 62 75 67 67 69 G)..# In debuggi
bb50: 6e 67 20 6d 6f 64 65 2c 20 6f 70 74 69 6d 69 7a ng mode, optimiz
bb60: 61 74 69 6f 6e 73 20 6e 65 65 64 20 74 6f 20 62 ations need to b
bb70: 65 20 64 69 73 61 62 6c 65 64 0a 63 64 65 62 75 e disabled.cdebu
bb80: 67 20 3d 20 2d 5a 69 20 2d 4f 64 20 24 28 44 45 g = -Zi -Od $(DE
bb90: 42 55 47 46 4c 41 47 53 29 0a 0a 21 65 6c 73 65 BUGFLAGS)..!else
bba0: 0a 0a 63 64 65 62 75 67 20 3d 20 24 28 4f 50 54 ..cdebug = $(OPT
bbb0: 49 4d 49 5a 41 54 49 4f 4e 53 29 0a 21 69 66 20 IMIZATIONS).!if
bbc0: 24 28 53 59 4d 42 4f 4c 53 29 0a 63 64 65 62 75 $(SYMBOLS).cdebu
bbd0: 67 20 3d 20 24 28 63 64 65 62 75 67 29 20 2d 5a g = $(cdebug) -Z
bbe0: 69 0a 21 65 6e 64 69 66 0a 0a 21 65 6e 64 69 66 i.!endif..!endif
bbf0: 20 23 20 24 28 44 45 42 55 47 29 0a 0a 23 20 63 # $(DEBUG)..# c
bc00: 77 61 72 6e 20 69 6e 63 6c 75 64 65 73 20 64 65 warn includes de
bc10: 66 61 75 6c 74 20 77 61 72 6e 69 6e 67 20 6c 65 fault warning le
bc20: 76 65 6c 73 2c 20 61 6c 73 6f 20 43 34 30 39 30 vels, also C4090
bc30: 20 28 62 75 67 67 79 29 20 61 6e 64 20 43 34 31 (buggy) and C41
bc40: 34 36 20 69 73 20 75 73 65 6c 65 73 73 2e 0a 63 46 is useless..c
bc50: 77 61 72 6e 20 3d 20 24 28 57 41 52 4e 49 4e 47 warn = $(WARNING
bc60: 53 29 20 2d 77 64 34 30 39 30 20 2d 77 64 34 31 S) -wd4090 -wd41
bc70: 34 36 0a 0a 21 69 66 20 22 24 28 4d 41 43 48 49 46..!if "$(MACHI
bc80: 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 20 NE)" == "AMD64"
bc90: 7c 7c 20 22 24 28 4d 41 43 48 49 4e 45 29 22 20 || "$(MACHINE)"
bca0: 3d 3d 20 22 41 52 4d 36 34 22 0a 23 20 44 69 73 == "ARM64".# Dis
bcb0: 61 62 6c 65 20 70 6f 69 6e 74 65 72 3c 2d 3e 69 able pointer<->i
bcc0: 6e 74 20 77 61 72 6e 69 6e 67 73 20 72 65 6c 61 nt warnings rela
bcd0: 74 65 64 20 74 6f 20 63 61 73 74 20 62 65 74 77 ted to cast betw
bce0: 65 65 6e 20 64 69 66 66 65 72 65 6e 74 20 73 69 een different si
bcf0: 7a 65 73 0a 23 20 54 68 65 72 65 20 61 72 65 20 zes.# There are
bd00: 61 20 67 61 64 7a 69 6c 6c 69 6f 6e 20 6f 66 20 a gadzillion of
bd10: 74 68 65 73 65 20 64 75 65 20 74 6f 20 75 73 65 these due to use
bd20: 20 6f 66 20 43 6c 69 65 6e 74 44 61 74 61 20 61 of ClientData a
bd30: 6e 64 0a 23 20 63 6c 75 74 74 65 72 20 75 70 20 nd.# clutter up
bd40: 63 6f 6d 70 69 6c 65 72 0a 23 20 6f 75 74 70 75 compiler.# outpu
bd50: 74 20 69 6e 63 72 65 61 73 69 6e 67 20 63 68 61 t increasing cha
bd60: 6e 63 65 20 6f 66 20 61 20 72 65 61 6c 20 77 61 nce of a real wa
bd70: 72 6e 69 6e 67 20 67 65 74 74 69 6e 67 20 6c 6f rning getting lo
bd80: 73 74 2e 20 53 6f 20 64 69 73 61 62 6c 65 20 74 st. So disable t
bd90: 68 65 6d 2e 0a 23 20 45 76 65 6e 74 75 61 6c 6c hem..# Eventuall
bda0: 79 20 73 6f 6d 65 20 64 61 79 2c 20 54 63 6c 20 y some day, Tcl
bdb0: 77 69 6c 6c 20 62 65 20 36 34 2d 62 69 74 20 63 will be 64-bit c
bdc0: 6c 65 61 6e 2e 0a 63 77 61 72 6e 20 3d 20 24 28 lean..cwarn = $(
bdd0: 63 77 61 72 6e 29 20 2d 77 64 34 33 31 31 20 2d cwarn) -wd4311 -
bde0: 77 64 34 33 31 32 0a 21 65 6e 64 69 66 0a 0a 23 wd4312.!endif..#
bdf0: 23 23 20 43 6f 6d 6d 6f 6e 20 63 6f 6d 70 69 6c ## Common compil
be00: 65 72 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 20 er options that
be10: 61 72 65 20 61 72 63 68 69 74 65 63 74 75 72 65 are architecture
be20: 20 73 70 65 63 69 66 69 63 0a 21 69 66 20 22 24 specific.!if "$
be30: 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 22 41 (MACHINE)" == "A
be40: 52 4d 22 0a 63 61 72 63 68 20 3d 20 2f 44 5f 41 RM".carch = /D_A
be50: 52 4d 5f 57 49 4e 41 50 49 5f 50 41 52 54 49 54 RM_WINAPI_PARTIT
be60: 49 4f 4e 5f 44 45 53 4b 54 4f 50 5f 53 44 4b 5f ION_DESKTOP_SDK_
be70: 41 56 41 49 4c 41 42 4c 45 0a 21 65 6c 73 65 0a AVAILABLE.!else.
be80: 63 61 72 63 68 20 3d 0a 21 65 6e 64 69 66 0a 0a carch =.!endif..
be90: 23 20 63 70 75 69 64 20 69 73 20 6f 6e 6c 79 20 # cpuid is only
bea0: 61 76 61 69 6c 61 62 6c 65 20 6f 6e 20 69 6e 74 available on int
beb0: 65 6c 20 6d 61 63 68 69 6e 65 73 0a 21 69 66 20 el machines.!if
bec0: 22 24 28 4d 41 43 48 49 4e 45 29 22 20 3d 3d 20 "$(MACHINE)" ==
bed0: 22 49 58 38 36 22 20 7c 7c 20 22 24 28 4d 41 43 "IX86" || "$(MAC
bee0: 48 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 HINE)" == "AMD64
bef0: 22 0a 63 61 72 63 68 20 3d 20 24 28 63 61 72 63 ".carch = $(carc
bf00: 68 29 20 2f 44 48 41 56 45 5f 43 50 55 49 44 3d h) /DHAVE_CPUID=
bf10: 31 0a 21 65 6e 64 69 66 0a 0a 21 69 66 20 24 28 1.!endif..!if $(
bf20: 44 45 42 55 47 29 0a 23 20 54 75 72 6e 20 77 61 DEBUG).# Turn wa
bf30: 72 6e 69 6e 67 73 20 69 6e 74 6f 20 65 72 72 6f rnings into erro
bf40: 72 73 0a 63 77 61 72 6e 20 3d 20 24 28 63 77 61 rs.cwarn = $(cwa
bf50: 72 6e 29 20 2d 57 58 0a 21 65 6e 64 69 66 0a 0a rn) -WX.!endif..
bf60: 49 4e 43 4c 55 44 45 53 20 3d 20 24 28 54 43 4c INCLUDES = $(TCL
bf70: 5f 49 4e 43 4c 55 44 45 53 29 20 24 28 54 4b 5f _INCLUDES) $(TK_
bf80: 49 4e 43 4c 55 44 45 53 29 20 24 28 50 52 4a 5f INCLUDES) $(PRJ_
bf90: 49 4e 43 4c 55 44 45 53 29 0a 21 69 66 20 21 24 INCLUDES).!if !$
bfa0: 28 44 4f 49 4e 47 5f 54 43 4c 29 20 26 26 20 21 (DOING_TCL) && !
bfb0: 24 28 44 4f 49 4e 47 5f 54 4b 29 0a 49 4e 43 4c $(DOING_TK).INCL
bfc0: 55 44 45 53 20 3d 20 24 28 49 4e 43 4c 55 44 45 UDES = $(INCLUDE
bfd0: 53 29 20 2d 49 22 24 28 47 45 4e 45 52 49 43 44 S) -I"$(GENERICD
bfe0: 49 52 29 22 20 2d 49 22 24 28 57 49 4e 5f 44 49 IR)" -I"$(WIN_DI
bff0: 52 29 22 20 2d 49 22 24 28 43 4f 4d 50 41 54 44 R)" -I"$(COMPATD
c000: 49 52 29 22 0a 21 65 6e 64 69 66 0a 0a 23 20 54 IR)".!endif..# T
c010: 68 65 73 65 20 66 6c 61 67 73 20 61 72 65 20 64 hese flags are d
c020: 65 66 69 6e 65 64 20 72 6f 75 67 68 6c 79 20 69 efined roughly i
c030: 6e 20 74 68 65 20 6f 72 64 65 72 20 6f 66 20 74 n the order of t
c040: 68 65 20 70 72 65 2d 72 65 66 6f 72 6d 0a 23 20 he pre-reform.#
c050: 72 75 6c 65 73 2e 76 63 2f 6d 61 6b 65 66 69 6c rules.vc/makefil
c060: 65 2e 76 63 20 74 6f 20 68 65 6c 70 20 76 69 73 e.vc to help vis
c070: 75 61 6c 6c 79 20 63 6f 6d 70 61 72 65 20 74 68 ually compare th
c080: 61 74 20 74 68 65 20 70 72 65 2d 20 61 6e 64 0a at the pre- and.
c090: 23 20 70 6f 73 74 2d 72 65 66 6f 72 6d 20 62 75 # post-reform bu
c0a0: 69 6c 64 20 6c 6f 67 73 0a 0a 23 20 63 66 6c 61 ild logs..# cfla
c0b0: 67 73 20 63 6f 6e 74 61 69 6e 73 20 67 65 6e 65 gs contains gene
c0c0: 72 69 63 20 66 6c 61 67 73 20 75 73 65 64 20 66 ric flags used f
c0d0: 6f 72 20 62 75 69 6c 64 69 6e 67 20 70 72 61 63 or building prac
c0e0: 74 69 63 61 6c 6c 79 20 61 6c 6c 20 6f 62 6a 65 tically all obje
c0f0: 63 74 20 66 69 6c 65 73 0a 63 66 6c 61 67 73 20 ct files.cflags
c100: 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d 63 20 24 28 43 = -nologo -c $(C
c110: 4f 4d 50 49 4c 45 52 46 4c 41 47 53 29 20 24 28 OMPILERFLAGS) $(
c120: 63 61 72 63 68 29 20 24 28 63 77 61 72 6e 29 20 carch) $(cwarn)
c130: 2d 46 70 24 28 54 4d 50 5f 44 49 52 29 5e 5c 20 -Fp$(TMP_DIR)^\
c140: 24 28 63 64 65 62 75 67 29 0a 0a 21 69 66 20 24 $(cdebug)..!if $
c150: 28 54 43 4c 5f 4d 41 4a 4f 52 5f 56 45 52 53 49 (TCL_MAJOR_VERSI
c160: 4f 4e 29 20 3d 3d 20 38 20 26 26 20 24 28 54 43 ON) == 8 && $(TC
c170: 4c 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 4f 4e 29 L_MINOR_VERSION)
c180: 20 3c 20 37 0a 63 66 6c 61 67 73 20 3d 20 24 28 < 7.cflags = $(
c190: 63 66 6c 61 67 73 29 20 2d 44 54 63 6c 5f 53 69 cflags) -DTcl_Si
c1a0: 7a 65 3d 69 6e 74 0a 21 65 6e 64 69 66 0a 0a 23 ze=int.!endif..#
c1b0: 20 61 70 70 63 66 6c 61 67 73 20 63 6f 6e 74 61 appcflags conta
c1c0: 69 6e 73 20 24 28 63 66 6c 61 67 73 29 20 61 6e ins $(cflags) an
c1d0: 64 20 66 6c 61 67 73 20 66 6f 72 20 62 75 69 6c d flags for buil
c1e0: 64 69 6e 67 20 74 68 65 20 61 70 70 6c 69 63 61 ding the applica
c1f0: 74 69 6f 6e 0a 23 20 6f 62 6a 65 63 74 20 66 69 tion.# object fi
c200: 6c 65 73 20 28 65 2e 67 2e 20 74 63 6c 73 68 2c les (e.g. tclsh,
c210: 20 6f 72 20 77 69 73 68 29 20 70 6b 67 63 66 6c or wish) pkgcfl
c220: 61 67 73 20 63 6f 6e 74 61 69 6e 73 20 24 28 63 ags contains $(c
c230: 66 6c 61 67 73 29 20 70 6c 75 73 0a 23 20 66 6c flags) plus.# fl
c240: 61 67 73 20 75 73 65 64 20 66 6f 72 20 62 75 69 ags used for bui
c250: 6c 64 69 6e 67 20 73 68 61 72 65 64 20 6f 62 6a lding shared obj
c260: 65 63 74 20 66 69 6c 65 73 20 54 68 65 20 74 77 ect files The tw
c270: 6f 20 64 69 66 66 65 72 20 69 6e 20 74 68 65 0a o differ in the.
c280: 23 20 42 55 49 4c 44 5f 24 28 50 52 4f 4a 45 43 # BUILD_$(PROJEC
c290: 54 29 20 6d 61 63 72 6f 20 77 68 69 63 68 20 73 T) macro which s
c2a0: 68 6f 75 6c 64 20 62 65 20 64 65 66 69 6e 65 64 hould be defined
c2b0: 20 6f 6e 6c 79 20 66 6f 72 20 74 68 65 20 73 68 only for the sh
c2c0: 61 72 65 64 0a 23 20 6c 69 62 72 61 72 79 20 2a ared.# library *
c2d0: 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 2a 20 implementation*
c2e0: 61 6e 64 20 6e 6f 74 20 66 6f 72 20 69 74 73 20 and not for its
c2f0: 63 61 6c 6c 65 72 20 69 6e 74 65 72 66 61 63 65 caller interface
c300: 0a 0a 61 70 70 63 66 6c 61 67 73 5f 6e 6f 73 74 ..appcflags_nost
c310: 75 62 73 20 3d 20 24 28 63 66 6c 61 67 73 29 20 ubs = $(cflags)
c320: 24 28 63 72 74 29 20 24 28 49 4e 43 4c 55 44 45 $(crt) $(INCLUDE
c330: 53 29 20 24 28 54 43 4c 5f 44 45 46 49 4e 45 53 S) $(TCL_DEFINES
c340: 29 20 24 28 50 52 4a 5f 44 45 46 49 4e 45 53 29 ) $(PRJ_DEFINES)
c350: 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 0a 61 $(OPTDEFINES).a
c360: 70 70 63 66 6c 61 67 73 20 3d 20 24 28 61 70 70 ppcflags = $(app
c370: 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 29 20 cflags_nostubs)
c380: 24 28 55 53 45 5f 53 54 55 42 53 5f 44 45 46 53 $(USE_STUBS_DEFS
c390: 29 0a 70 6b 67 63 66 6c 61 67 73 20 3d 20 24 28 ).pkgcflags = $(
c3a0: 61 70 70 63 66 6c 61 67 73 29 20 24 28 50 4b 47 appcflags) $(PKG
c3b0: 4e 41 4d 45 46 4c 41 47 53 29 20 2f 44 42 55 49 NAMEFLAGS) /DBUI
c3c0: 4c 44 5f 24 28 50 52 4f 4a 45 43 54 29 0a 70 6b LD_$(PROJECT).pk
c3d0: 67 63 66 6c 61 67 73 5f 6e 6f 73 74 75 62 73 20 gcflags_nostubs
c3e0: 3d 20 24 28 61 70 70 63 66 6c 61 67 73 5f 6e 6f = $(appcflags_no
c3f0: 73 74 75 62 73 29 20 24 28 50 4b 47 4e 41 4d 45 stubs) $(PKGNAME
c400: 46 4c 41 47 53 29 20 2f 44 42 55 49 4c 44 5f 24 FLAGS) /DBUILD_$
c410: 28 50 52 4f 4a 45 43 54 29 0a 0a 23 20 73 74 75 (PROJECT)..# stu
c420: 62 73 63 66 6c 61 67 73 20 63 6f 6e 74 61 69 6e bscflags contain
c430: 73 20 24 28 63 66 6c 61 67 73 29 20 70 6c 75 73 s $(cflags) plus
c440: 20 66 6c 61 67 73 20 75 73 65 64 20 66 6f 72 20 flags used for
c450: 62 75 69 6c 64 69 6e 67 20 61 20 73 74 75 62 73 building a stubs
c460: 0a 23 20 6c 69 62 72 61 72 79 20 66 6f 72 20 74 .# library for t
c470: 68 65 20 70 61 63 6b 61 67 65 2e 20 20 4e 6f 74 he package. Not
c480: 65 3a 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c e: /DSTATIC_BUIL
c490: 44 20 69 73 20 64 65 66 69 6e 65 64 20 69 6e 0a D is defined in.
c4a0: 23 20 24 28 4f 50 54 44 45 46 49 4e 45 53 29 20 # $(OPTDEFINES)
c4b0: 6f 6e 6c 79 20 69 66 20 74 68 65 20 4f 50 54 53 only if the OPTS
c4c0: 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 69 configuration i
c4d0: 6e 64 69 63 61 74 65 73 20 61 20 73 74 61 74 69 ndicates a stati
c4e0: 63 0a 23 20 6c 69 62 72 61 72 79 2e 20 48 6f 77 c.# library. How
c4f0: 65 76 65 72 20 74 68 65 20 73 74 75 62 73 20 6c ever the stubs l
c500: 69 62 72 61 72 79 20 69 73 20 41 4c 57 41 59 53 ibrary is ALWAYS
c510: 20 73 74 61 74 69 63 20 68 65 6e 63 65 20 69 6e static hence in
c520: 63 6c 75 64 65 64 0a 23 20 68 65 72 65 20 69 72 cluded.# here ir
c530: 72 65 73 70 65 63 74 69 76 65 20 6f 66 20 74 68 respective of th
c540: 65 20 4f 50 54 53 20 73 65 74 74 69 6e 67 2e 0a e OPTS setting..
c550: 23 0a 23 20 54 42 44 20 2d 20 74 63 6c 76 66 73 #.# TBD - tclvfs
c560: 20 68 61 73 20 61 20 63 6f 6d 6d 65 6e 74 20 74 has a comment t
c570: 68 61 74 20 73 74 75 62 73 20 6c 69 62 73 20 73 hat stubs libs s
c580: 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 63 6f 6d hould not be com
c590: 70 69 6c 65 64 20 77 69 74 68 20 2d 47 4c 0a 23 piled with -GL.#
c5a0: 20 77 69 74 68 6f 75 74 20 73 74 61 74 69 6e 67 without stating
c5b0: 20 77 68 79 2e 20 54 63 6c 20 69 74 73 65 6c 66 why. Tcl itself
c5c0: 20 63 6f 6d 70 69 6c 65 64 20 73 74 75 62 73 20 compiled stubs
c5d0: 6c 69 62 73 20 77 69 74 68 20 74 68 69 73 20 66 libs with this f
c5e0: 6c 61 67 2e 0a 23 20 73 6f 20 77 65 20 64 6f 20 lag..# so we do
c5f0: 6e 6f 74 20 72 65 6d 6f 76 65 20 69 74 20 66 72 not remove it fr
c600: 6f 6d 20 63 66 6c 61 67 73 2e 20 2d 47 4c 20 6d om cflags. -GL m
c610: 61 79 20 70 72 65 76 65 6e 74 20 65 78 74 65 6e ay prevent exten
c620: 73 69 6f 6e 73 0a 23 20 63 6f 6d 70 69 6c 65 64 sions.# compiled
c630: 20 77 69 74 68 20 6f 6e 65 20 56 43 20 76 65 72 with one VC ver
c640: 73 69 6f 6e 20 74 6f 20 66 61 69 6c 20 74 6f 20 sion to fail to
c650: 6c 69 6e 6b 20 61 67 61 69 6e 73 74 20 73 74 75 link against stu
c660: 62 73 20 6c 69 62 72 61 72 79 0a 23 20 63 6f 6d bs library.# com
c670: 70 69 6c 65 64 20 77 69 74 68 20 61 6e 6f 74 68 piled with anoth
c680: 65 72 20 56 43 20 76 65 72 73 69 6f 6e 2e 20 43 er VC version. C
c690: 68 65 63 6b 20 66 6f 72 20 74 68 69 73 20 61 6e heck for this an
c6a0: 64 20 66 69 78 20 61 63 63 6f 72 64 69 6e 67 6c d fix accordingl
c6b0: 79 2e 0a 73 74 75 62 73 63 66 6c 61 67 73 20 3d y..stubscflags =
c6c0: 20 24 28 63 66 6c 61 67 73 29 20 24 28 50 4b 47 $(cflags) $(PKG
c6d0: 4e 41 4d 45 46 4c 41 47 53 29 20 24 28 50 52 4a NAMEFLAGS) $(PRJ
c6e0: 5f 44 45 46 49 4e 45 53 29 20 24 28 4f 50 54 44 _DEFINES) $(OPTD
c6f0: 45 46 49 4e 45 53 29 20 2f 5a 6c 20 2f 47 4c 2d EFINES) /Zl /GL-
c700: 20 2f 44 53 54 41 54 49 43 5f 42 55 49 4c 44 20 /DSTATIC_BUILD
c710: 24 28 49 4e 43 4c 55 44 45 53 29 20 24 28 55 53 $(INCLUDES) $(US
c720: 45 5f 53 54 55 42 53 5f 44 45 46 53 29 0a 0a 23 E_STUBS_DEFS)..#
c730: 20 4c 69 6e 6b 20 66 6c 61 67 73 0a 0a 21 69 66 Link flags..!if
c740: 20 24 28 44 45 42 55 47 29 0a 6c 64 65 62 75 67 $(DEBUG).ldebug
c750: 09 3d 20 2d 64 65 62 75 67 20 2d 64 65 62 75 67 .= -debug -debug
c760: 74 79 70 65 3a 63 76 0a 21 65 6c 73 65 0a 6c 64 type:cv.!else.ld
c770: 65 62 75 67 09 3d 20 2d 72 65 6c 65 61 73 65 20 ebug.= -release
c780: 2d 6f 70 74 3a 72 65 66 20 2d 6f 70 74 3a 69 63 -opt:ref -opt:ic
c790: 66 2c 33 0a 21 69 66 20 24 28 53 59 4d 42 4f 4c f,3.!if $(SYMBOL
c7a0: 53 29 0a 6c 64 65 62 75 67 09 3d 20 24 28 6c 64 S).ldebug.= $(ld
c7b0: 65 62 75 67 29 20 2d 64 65 62 75 67 20 2d 64 65 ebug) -debug -de
c7c0: 62 75 67 74 79 70 65 3a 63 76 0a 21 65 6e 64 69 bugtype:cv.!endi
c7d0: 66 0a 21 65 6e 64 69 66 0a 0a 23 20 4e 6f 74 65 f.!endif..# Note
c7e0: 3a 20 50 72 6f 66 69 6c 69 6e 67 20 69 73 20 63 : Profiling is c
c7f0: 75 72 72 65 6e 74 6c 79 20 6f 6e 6c 79 20 70 6f urrently only po
c800: 73 73 69 62 6c 65 20 77 69 74 68 20 74 68 65 20 ssible with the
c810: 56 69 73 75 61 6c 20 53 74 75 64 69 6f 20 45 6e Visual Studio En
c820: 74 65 72 70 72 69 73 65 0a 21 69 66 20 24 28 50 terprise.!if $(P
c830: 52 4f 46 49 4c 45 29 0a 6c 64 65 62 75 67 3d 20 ROFILE).ldebug=
c840: 24 28 6c 64 65 62 75 67 29 20 2d 70 72 6f 66 69 $(ldebug) -profi
c850: 6c 65 0a 21 65 6e 64 69 66 0a 0a 23 23 23 20 44 le.!endif..### D
c860: 65 63 6c 61 72 61 74 69 6f 6e 73 20 63 6f 6d 6d eclarations comm
c870: 6f 6e 20 74 6f 20 61 6c 6c 20 6c 69 6e 6b 65 72 on to all linker
c880: 20 76 65 72 73 69 6f 6e 73 0a 6c 66 6c 61 67 73 versions.lflags
c890: 09 3d 20 2d 6e 6f 6c 6f 67 6f 20 2d 6d 61 63 68 .= -nologo -mach
c8a0: 69 6e 65 3a 24 28 4d 41 43 48 49 4e 45 29 20 24 ine:$(MACHINE) $
c8b0: 28 4c 49 4e 4b 45 52 46 4c 41 47 53 29 20 24 28 (LINKERFLAGS) $(
c8c0: 6c 64 65 62 75 67 29 0a 0a 21 69 66 20 24 28 4d ldebug)..!if $(M
c8d0: 53 56 43 52 54 29 20 26 26 20 21 28 24 28 44 45 SVCRT) && !($(DE
c8e0: 42 55 47 29 20 26 26 20 21 24 28 55 4e 43 48 45 BUG) && !$(UNCHE
c8f0: 43 4b 45 44 29 29 20 26 26 20 24 28 56 43 56 45 CKED)) && $(VCVE
c900: 52 53 49 4f 4e 29 20 3e 3d 20 31 39 30 30 0a 6c RSION) >= 1900.l
c910: 66 6c 61 67 73 09 3d 20 24 28 6c 66 6c 61 67 73 flags.= $(lflags
c920: 29 20 2d 6e 6f 64 65 66 61 75 6c 74 6c 69 62 3a ) -nodefaultlib:
c930: 75 63 72 74 2e 6c 69 62 0a 21 65 6e 64 69 66 0a ucrt.lib.!endif.
c940: 0a 64 6c 6c 6c 66 6c 61 67 73 20 3d 20 24 28 6c .dlllflags = $(l
c950: 66 6c 61 67 73 29 20 2d 64 6c 6c 0a 63 6f 6e 6c flags) -dll.conl
c960: 66 6c 61 67 73 20 3d 20 24 28 6c 66 6c 61 67 73 flags = $(lflags
c970: 29 20 2d 73 75 62 73 79 73 74 65 6d 3a 63 6f 6e ) -subsystem:con
c980: 73 6f 6c 65 0a 67 75 69 6c 66 6c 61 67 73 20 3d sole.guilflags =
c990: 20 24 28 6c 66 6c 61 67 73 29 20 2d 73 75 62 73 $(lflags) -subs
c9a0: 79 73 74 65 6d 3a 77 69 6e 64 6f 77 73 0a 0a 23 ystem:windows..#
c9b0: 20 4c 69 62 72 61 72 69 65 73 20 74 68 61 74 20 Libraries that
c9c0: 61 72 65 20 72 65 71 75 69 72 65 64 20 66 6f 72 are required for
c9d0: 20 65 76 65 72 79 20 69 6d 61 67 65 2e 0a 23 20 every image..#
c9e0: 45 78 74 65 6e 73 69 6f 6e 73 20 73 68 6f 75 6c Extensions shoul
c9f0: 64 20 64 65 66 69 6e 65 20 61 6e 79 20 61 64 64 d define any add
ca00: 69 74 69 6f 6e 61 6c 20 6c 69 62 72 61 72 69 65 itional librarie
ca10: 73 20 77 69 74 68 20 24 28 50 52 4a 5f 4c 49 42 s with $(PRJ_LIB
ca20: 53 29 0a 77 69 6e 6c 69 62 73 20 20 20 3d 20 6b S).winlibs = k
ca30: 65 72 6e 65 6c 33 32 2e 6c 69 62 20 61 64 76 61 ernel32.lib adva
ca40: 70 69 33 32 2e 6c 69 62 0a 0a 21 69 66 20 24 28 pi32.lib..!if $(
ca50: 4e 45 45 44 5f 54 4b 29 0a 77 69 6e 6c 69 62 73 NEED_TK).winlibs
ca60: 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 67 64 = $(winlibs) gd
ca70: 69 33 32 2e 6c 69 62 20 75 73 65 72 33 32 2e 6c i32.lib user32.l
ca80: 69 62 20 75 78 74 68 65 6d 65 2e 6c 69 62 0a 21 ib uxtheme.lib.!
ca90: 65 6e 64 69 66 0a 0a 23 20 41 76 6f 69 64 20 27 endif..# Avoid '
caa0: 75 6e 72 65 73 6f 6c 76 65 64 20 65 78 74 65 72 unresolved exter
cab0: 6e 61 6c 20 73 79 6d 62 6f 6c 20 5f 5f 73 65 63 nal symbol __sec
cac0: 75 72 69 74 79 5f 63 6f 6f 6b 69 65 27 20 65 72 urity_cookie' er
cad0: 72 6f 72 73 2e 0a 23 20 63 2e 66 2e 20 68 74 74 rors..# c.f. htt
cae0: 70 3a 2f 2f 73 75 70 70 6f 72 74 2e 6d 69 63 72 p://support.micr
caf0: 6f 73 6f 66 74 2e 63 6f 6d 2f 3f 69 64 3d 38 39 osoft.com/?id=89
cb00: 34 35 37 33 0a 21 69 66 20 22 24 28 4d 41 43 48 4573.!if "$(MACH
cb10: 49 4e 45 29 22 20 3d 3d 20 22 41 4d 44 36 34 22 INE)" == "AMD64"
cb20: 0a 21 69 66 20 24 28 56 43 56 45 52 53 49 4f 4e .!if $(VCVERSION
cb30: 29 20 3e 20 31 33 39 39 20 26 26 20 24 28 56 43 ) > 1399 && $(VC
cb40: 56 45 52 53 49 4f 4e 29 20 3c 20 31 35 30 30 0a VERSION) < 1500.
cb50: 77 69 6e 6c 69 62 73 20 20 20 3d 20 24 28 77 69 winlibs = $(wi
cb60: 6e 6c 69 62 73 29 20 62 75 66 66 65 72 6f 76 65 nlibs) bufferove
cb70: 72 66 6c 6f 77 55 2e 6c 69 62 0a 21 65 6e 64 69 rflowU.lib.!endi
cb80: 66 0a 21 65 6e 64 69 66 0a 0a 62 61 73 65 6c 69 f.!endif..baseli
cb90: 62 73 20 3d 20 24 28 77 69 6e 6c 69 62 73 29 20 bs = $(winlibs)
cba0: 24 28 50 52 4a 5f 4c 49 42 53 29 0a 0a 21 69 66 $(PRJ_LIBS)..!if
cbb0: 20 24 28 4d 53 56 43 52 54 29 20 26 26 20 21 28 $(MSVCRT) && !(
cbc0: 24 28 44 45 42 55 47 29 20 26 26 20 21 24 28 55 $(DEBUG) && !$(U
cbd0: 4e 43 48 45 43 4b 45 44 29 29 20 26 26 20 24 28 NCHECKED)) && $(
cbe0: 56 43 56 45 52 53 49 4f 4e 29 20 3e 3d 20 31 39 VCVERSION) >= 19
cbf0: 30 30 0a 62 61 73 65 6c 69 62 73 20 20 20 3d 20 00.baselibs =
cc00: 24 28 62 61 73 65 6c 69 62 73 29 20 75 63 72 74 $(baselibs) ucrt
cc10: 2e 6c 69 62 0a 21 65 6e 64 69 66 0a 0a 23 23 23 .lib.!endif..###
cc20: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cc30: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cc40: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
cc50: 23 23 23 23 23 23 23 23 23 23 23 23 23 0a 23 20 #############.#
cc60: 31 33 2e 20 44 65 66 69 6e 65 20 73 74 61 6e 64 13. Define stand
cc70: 61 72 64 20 63 6f 6d 6d 61 6e 64 73 2c 20 63 6f ard commands, co
cc80: 6d 6d 6f 6e 20 6d 61 6b 65 20 74 61 72 67 65 74 mmon make target
cc90: 73 20 61 6e 64 20 69 6d 70 6c 69 63 69 74 20 72 s and implicit r
cca0: 75 6c 65 73 0a 0a 43 43 50 4b 47 43 4d 44 20 3d ules..CCPKGCMD =
ccb0: 20 24 28 63 63 33 32 29 20 24 28 70 6b 67 63 66 $(cc32) $(pkgcf
ccc0: 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 lags) -Fo$(TMP_D
ccd0: 49 52 29 5e 5c 0a 43 43 41 50 50 43 4d 44 20 3d IR)^\.CCAPPCMD =
cce0: 20 24 28 63 63 33 32 29 20 24 28 61 70 70 63 66 $(cc32) $(appcf
ccf0: 6c 61 67 73 29 20 2d 46 6f 24 28 54 4d 50 5f 44 lags) -Fo$(TMP_D
cd00: 49 52 29 5e 5c 0a 43 43 53 54 55 42 53 43 4d 44 IR)^\.CCSTUBSCMD
cd10: 20 3d 20 24 28 63 63 33 32 29 20 24 28 73 74 75 = $(cc32) $(stu
cd20: 62 73 63 66 6c 61 67 73 29 20 2d 46 6f 24 28 54 bscflags) -Fo$(T
cd30: 4d 50 5f 44 49 52 29 5e 5c 0a 0a 4c 49 42 43 4d MP_DIR)^\..LIBCM
cd40: 44 20 3d 20 24 28 6c 69 62 33 32 29 20 2d 6e 6f D = $(lib32) -no
cd50: 6c 6f 67 6f 20 24 28 4c 49 4e 4b 45 52 46 4c 41 logo $(LINKERFLA
cd60: 47 53 29 20 2d 6f 75 74 3a 24 40 0a 44 4c 4c 43 GS) -out:[email protected]
cd70: 4d 44 20 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 MD = $(link32) $
cd80: 28 64 6c 6c 6c 66 6c 61 67 73 29 20 2d 6f 75 74 (dlllflags) -out
cd90: 3a 24 40 20 24 28 62 61 73 65 6c 69 62 73 29 20 :$@ $(baselibs)
cda0: 24 28 74 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c $(tcllibs) $(tkl
cdb0: 69 62 73 29 0a 0a 43 4f 4e 45 58 45 43 4d 44 20 ibs)..CONEXECMD
cdc0: 3d 20 24 28 6c 69 6e 6b 33 32 29 20 24 28 63 6f = $(link32) $(co
cdd0: 6e 6c 66 6c 61 67 73 29 20 2d 6f 75 74 3a 24 40 nlflags) -out:$@
cde0: 20 24 28 62 61 73 65 6c 69 62 73 29 20 24 28 74 $(baselibs) $(t
cdf0: 63 6c 6c 69 62 73 29 20 24 28 74 6b 6c 69 62 73 cllibs) $(tklibs
ce00: 29 0a 47 55 49 45 58 45 43 4d 44 20 3d 20 24 28 ).GUIEXECMD = $(
ce10: 6c 69 6e 6b 33 32 29 20 24 28 67 75 69 6c 66 6c link32) $(guilfl
ce20: 61 67 73 29 20 2d 6f 75 74 3a 24 40 20 24 28 62 ags) -out:$@ $(b
ce30: 61 73 65 6c 69 62 73 29 20 24 28 74 63 6c 6c 69 aselibs) $(tclli
ce40: 62 73 29 20 24 28 74 6b 6c 69 62 73 29 0a 52 45 bs) $(tklibs).RE
ce50: 53 43 4d 44 20 20 3d 20 24 28 72 63 33 32 29 20 SCMD = $(rc32)
ce60: 2d 66 6f 20 24 40 20 2d 72 20 2d 69 20 22 24 28 -fo $@ -r -i "$(
ce70: 47 45 4e 45 52 49 43 44 49 52 29 22 20 2d 69 20 GENERICDIR)" -i
ce80: 22 24 28 54 4d 50 5f 44 49 52 29 22 20 5c 0a 09 "$(TMP_DIR)" \..
ce90: 20 20 20 20 24 28 54 43 4c 5f 49 4e 43 4c 55 44 $(TCL_INCLUD
cea0: 45 53 29 20 2f 44 53 54 41 54 49 43 5f 42 55 49 ES) /DSTATIC_BUI
ceb0: 4c 44 3d 24 28 53 54 41 54 49 43 5f 42 55 49 4c LD=$(STATIC_BUIL
cec0: 44 29 20 5c 0a 09 20 20 20 20 2f 44 44 45 42 55 D) \.. /DDEBU
ced0: 47 3d 24 28 44 45 42 55 47 29 20 2d 64 20 55 4e G=$(DEBUG) -d UN
cee0: 43 48 45 43 4b 45 44 3d 24 28 55 4e 43 48 45 43 CHECKED=$(UNCHEC
cef0: 4b 45 44 29 20 5c 0a 09 20 20 20 20 2f 44 43 4f KED) \.. /DCO
cf00: 4d 4d 41 56 45 52 53 49 4f 4e 3d 24 28 52 43 43 MMAVERSION=$(RCC
cf10: 4f 4d 4d 41 56 45 52 53 49 4f 4e 29 20 5c 0a 09 OMMAVERSION) \..
cf20: 20 20 20 20 2f 44 44 4f 54 56 45 52 53 49 4f 4e /DDOTVERSION
cf30: 3d 5c 22 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 =\"$(DOTVERSION)
cf40: 5c 22 20 5c 0a 09 20 20 20 20 2f 44 56 45 52 53 \" \.. /DVERS
cf50: 49 4f 4e 3d 5c 22 24 28 56 45 52 53 49 4f 4e 29 ION=\"$(VERSION)
cf60: 5c 22 20 5c 0a 09 20 20 20 20 2f 44 53 55 46 58 \" \.. /DSUFX
cf70: 3d 5c 22 24 28 53 55 46 58 29 5c 22 20 5c 0a 09 =\"$(SUFX)\" \..
cf80: 20 20 20 20 2f 44 50 52 4f 4a 45 43 54 3d 5c 22 /DPROJECT=\"
cf90: 24 28 50 52 4f 4a 45 43 54 29 5c 22 20 5c 0a 09 $(PROJECT)\" \..
cfa0: 20 20 20 20 2f 44 50 52 4a 4c 49 42 4e 41 4d 45 /DPRJLIBNAME
cfb0: 3d 5c 22 24 28 50 52 4a 4c 49 42 4e 41 4d 45 29 =\"$(PRJLIBNAME)
cfc0: 5c 22 0a 0a 21 69 66 6e 64 65 66 20 44 45 46 41 \"..!ifndef DEFA
cfd0: 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 54 ULT_BUILD_TARGET
cfe0: 0a 44 45 46 41 55 4c 54 5f 42 55 49 4c 44 5f 54 .DEFAULT_BUILD_T
cff0: 41 52 47 45 54 20 3d 20 24 28 50 52 4f 4a 45 43 ARGET = $(PROJEC
d000: 54 29 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 T).!endif..defau
d010: 6c 74 2d 74 61 72 67 65 74 3a 20 24 28 44 45 46 lt-target: $(DEF
d020: 41 55 4c 54 5f 42 55 49 4c 44 5f 54 41 52 47 45 AULT_BUILD_TARGE
d030: 54 29 0a 0a 21 69 66 20 24 28 4d 55 4c 54 49 50 T)..!if $(MULTIP
d040: 4c 41 54 46 4f 52 4d 5f 49 4e 53 54 41 4c 4c 29 LATFORM_INSTALL)
d050: 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 .default-pkginde
d060: 78 3a 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 x:..@echo if {[p
d070: 61 63 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 ackage vsatisfie
d080: 73 20 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 s [package provi
d090: 64 65 20 54 63 6c 5d 20 39 2e 30 5d 7d 20 7b 20 de Tcl] 9.0]} {
d0a0: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
d0b0: 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f Index.tcl..@echo
d0c0: 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 package ifneede
d0d0: 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f d $(PRJ_PACKAGE_
d0e0: 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 TCLNAME) $(DOTVE
d0f0: 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c RSION) \.. [l
d100: 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a ist load [file j
d110: 6f 69 6e 20 24 24 64 69 72 20 24 28 50 4c 41 54 oin $$dir $(PLAT
d120: 46 4f 52 4d 5f 49 44 45 4e 54 49 46 59 29 20 24 FORM_IDENTIFY) $
d130: 28 50 52 4a 4c 49 42 4e 41 4d 45 39 29 5d 5d 20 (PRJLIBNAME9)]]
d140: 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b >> $(OUT_DIR)\pk
d150: 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 gIndex.tcl..@ech
d160: 6f 20 7d 20 65 6c 73 65 20 7b 20 3e 3e 20 24 28 o } else { >> $(
d170: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d180: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 70 61 63 x.tcl..@echo pac
d190: 6b 61 67 65 20 69 66 6e 65 65 64 65 64 20 24 28 kage ifneeded $(
d1a0: 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 43 4c 4e PRJ_PACKAGE_TCLN
d1b0: 41 4d 45 29 20 24 28 44 4f 54 56 45 52 53 49 4f AME) $(DOTVERSIO
d1c0: 4e 29 20 5c 0a 09 20 20 20 20 5b 6c 69 73 74 20 N) \.. [list
d1d0: 6c 6f 61 64 20 5b 66 69 6c 65 20 6a 6f 69 6e 20 load [file join
d1e0: 24 24 64 69 72 20 24 28 50 4c 41 54 46 4f 52 4d $$dir $(PLATFORM
d1f0: 5f 49 44 45 4e 54 49 46 59 29 20 24 28 50 52 4a _IDENTIFY) $(PRJ
d200: 4c 49 42 4e 41 4d 45 38 29 5d 5d 20 3e 3e 20 24 LIBNAME8)]] >> $
d210: 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 (OUT_DIR)\pkgInd
d220: 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 ex.tcl..@echo }
d230: 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b >> $(OUT_DIR)\pk
d240: 67 49 6e 64 65 78 2e 74 63 6c 0a 21 65 6c 73 65 gIndex.tcl.!else
d250: 0a 64 65 66 61 75 6c 74 2d 70 6b 67 69 6e 64 65 .default-pkginde
d260: 78 3a 0a 09 40 65 63 68 6f 20 69 66 20 7b 5b 70 x:..@echo if {[p
d270: 61 63 6b 61 67 65 20 76 73 61 74 69 73 66 69 65 ackage vsatisfie
d280: 73 20 5b 70 61 63 6b 61 67 65 20 70 72 6f 76 69 s [package provi
d290: 64 65 20 54 63 6c 5d 20 39 2e 30 5d 7d 20 7b 20 de Tcl] 9.0]} {
d2a0: 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c 70 6b 67 > $(OUT_DIR)\pkg
d2b0: 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 63 68 6f Index.tcl..@echo
d2c0: 20 70 61 63 6b 61 67 65 20 69 66 6e 65 65 64 65 package ifneede
d2d0: 64 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f d $(PRJ_PACKAGE_
d2e0: 54 43 4c 4e 41 4d 45 29 20 24 28 44 4f 54 56 45 TCLNAME) $(DOTVE
d2f0: 52 53 49 4f 4e 29 20 5c 0a 09 20 20 20 20 5b 6c RSION) \.. [l
d300: 69 73 74 20 6c 6f 61 64 20 5b 66 69 6c 65 20 6a ist load [file j
d310: 6f 69 6e 20 24 24 64 69 72 20 24 28 50 52 4a 4c oin $$dir $(PRJL
d320: 49 42 4e 41 4d 45 39 29 5d 5d 20 3e 3e 20 24 28 IBNAME9)]] >> $(
d330: 4f 55 54 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 OUT_DIR)\pkgInde
d340: 78 2e 74 63 6c 0a 09 40 65 63 68 6f 20 7d 20 65 x.tcl..@echo } e
d350: 6c 73 65 20 7b 20 3e 3e 20 24 28 4f 55 54 5f 44 lse { >> $(OUT_D
d360: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d370: 0a 09 40 65 63 68 6f 20 70 61 63 6b 61 67 65 20 ..@echo package
d380: 69 66 6e 65 65 64 65 64 20 24 28 50 52 4a 5f 50 ifneeded $(PRJ_P
d390: 41 43 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 29 20 ACKAGE_TCLNAME)
d3a0: 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 20 5c 0a $(DOTVERSION) \.
d3b0: 09 20 20 20 20 5b 6c 69 73 74 20 6c 6f 61 64 20 . [list load
d3c0: 5b 66 69 6c 65 20 6a 6f 69 6e 20 24 24 64 69 72 [file join $$dir
d3d0: 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 5d $(PRJLIBNAME8)]
d3e0: 5d 20 3e 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c ] >> $(OUT_DIR)\
d3f0: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 09 40 65 pkgIndex.tcl..@e
d400: 63 68 6f 20 7d 20 3e 3e 20 24 28 4f 55 54 5f 44 cho } >> $(OUT_D
d410: 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c IR)\pkgIndex.tcl
d420: 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 75 6c 74 .!endif..default
d430: 2d 70 6b 67 69 6e 64 65 78 2d 74 65 61 3a 0a 09 -pkgindex-tea:..
d440: 40 69 66 20 65 78 69 73 74 20 24 28 52 4f 4f 54 @if exist $(ROOT
d450: 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e 69 )\pkgIndex.tcl.i
d460: 6e 20 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 n $(NMAKEHLP_NAT
d470: 49 56 45 29 20 2d 73 20 3c 3c 20 24 28 52 4f 4f IVE) -s << $(ROO
d480: 54 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 2e T)\pkgIndex.tcl.
d490: 69 6e 20 3e 20 24 28 4f 55 54 5f 44 49 52 29 5c in > $(OUT_DIR)\
d4a0: 70 6b 67 49 6e 64 65 78 2e 74 63 6c 0a 40 50 41 pkgIndex.tcl.@PA
d4b0: 43 4b 41 47 45 5f 56 45 52 53 49 4f 4e 40 20 20 CKAGE_VERSION@
d4c0: 20 20 24 28 44 4f 54 56 45 52 53 49 4f 4e 29 0a $(DOTVERSION).
d4d0: 40 50 41 43 4b 41 47 45 5f 4e 41 4d 45 40 20 20 @PACKAGE_NAME@
d4e0: 20 20 20 20 20 24 28 50 52 4a 5f 50 41 43 4b 41 $(PRJ_PACKA
d4f0: 47 45 5f 54 43 4c 4e 41 4d 45 29 0a 40 50 41 43 GE_TCLNAME).@PAC
d500: 4b 41 47 45 5f 54 43 4c 4e 41 4d 45 40 20 20 20 KAGE_TCLNAME@
d510: 20 24 28 50 52 4a 5f 50 41 43 4b 41 47 45 5f 54 $(PRJ_PACKAGE_T
d520: 43 4c 4e 41 4d 45 29 0a 40 50 4b 47 5f 4c 49 42 CLNAME).@PKG_LIB
d530: 5f 46 49 4c 45 40 20 20 20 20 20 20 20 24 28 50 _FILE@ $(P
d540: 52 4a 4c 49 42 4e 41 4d 45 29 0a 40 50 4b 47 5f RJLIBNAME).@PKG_
d550: 4c 49 42 5f 46 49 4c 45 38 40 20 20 20 20 20 20 LIB_FILE8@
d560: 24 28 50 52 4a 4c 49 42 4e 41 4d 45 38 29 0a 40 $(PRJLIBNAME8).@
d570: 50 4b 47 5f 4c 49 42 5f 46 49 4c 45 39 40 20 20 PKG_LIB_FILE9@
d580: 20 20 20 20 24 28 50 52 4a 4c 49 42 4e 41 4d 45 $(PRJLIBNAME
d590: 39 29 0a 3c 3c 0a 0a 64 65 66 61 75 6c 74 2d 69 9).<<..default-i
d5a0: 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 6c 74 2d nstall: default-
d5b0: 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 65 73 install-binaries
d5c0: 20 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c default-install
d5d0: 2d 6c 69 62 72 61 72 69 65 73 0a 21 69 66 20 24 -libraries.!if $
d5e0: 28 53 59 4d 42 4f 4c 53 29 0a 64 65 66 61 75 6c (SYMBOLS).defaul
d5f0: 74 2d 69 6e 73 74 61 6c 6c 3a 20 64 65 66 61 75 t-install: defau
d600: 6c 74 2d 69 6e 73 74 61 6c 6c 2d 70 64 62 73 0a lt-install-pdbs.
d610: 21 65 6e 64 69 66 0a 0a 23 20 41 67 61 69 6e 20 !endif..# Again
d620: 74 6f 20 64 65 61 6c 20 77 69 74 68 20 68 69 73 to deal with his
d630: 74 6f 72 69 63 61 6c 20 62 72 6f 6b 65 6e 6e 65 torical brokenne
d640: 73 73 2c 20 74 68 65 72 65 20 69 73 20 73 6f 6d ss, there is som
d650: 65 20 63 6f 6e 66 75 73 69 6f 6e 0a 23 20 69 6e e confusion.# in
d660: 20 74 65 72 6d 69 6e 6c 6f 67 79 2e 20 46 6f 72 terminlogy. For
d670: 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 74 68 65 extensions, the
d680: 20 22 69 6e 73 74 61 6c 6c 2d 62 69 6e 61 72 69 "install-binari
d690: 65 73 22 20 77 61 73 20 75 73 65 64 20 74 6f 0a es" was used to.
d6a0: 23 20 6c 6f 63 61 74 65 20 74 61 72 67 65 74 20 # locate target
d6b0: 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 2a 62 directory for *b
d6c0: 69 6e 61 72 79 20 73 68 61 72 65 64 20 6c 69 62 inary shared lib
d6d0: 72 61 72 69 65 73 2a 20 61 6e 64 20 74 68 75 73 raries* and thus
d6e0: 0a 23 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 .# the appropria
d6f0: 74 65 20 6d 61 63 72 6f 20 69 73 20 4c 49 42 5f te macro is LIB_
d700: 49 4e 53 54 41 4c 4c 5f 44 49 52 20 73 69 6e 63 INSTALL_DIR sinc
d710: 65 20 42 49 4e 5f 49 4e 53 54 41 4c 4c 5f 44 49 e BIN_INSTALL_DI
d720: 52 20 69 73 0a 23 20 66 6f 72 20 65 78 65 63 75 R is.# for execu
d730: 74 61 62 6c 65 73 20 28 65 78 65 73 29 2e 20 4f tables (exes). O
d740: 6e 20 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 n the other hand
d750: 20 74 68 65 20 22 69 6e 73 74 61 6c 6c 2d 6c 69 the "install-li
d760: 62 72 61 72 69 65 73 22 0a 23 20 74 61 72 67 65 braries".# targe
d770: 74 20 69 73 20 66 6f 72 20 2a 73 63 72 69 70 74 t is for *script
d780: 73 2a 20 61 6e 64 20 73 68 6f 75 6c 64 20 68 61 s* and should ha
d790: 76 65 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 22 ve been called "
d7a0: 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 22 install-scripts"
d7b0: 2e 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c ..default-instal
d7c0: 6c 2d 62 69 6e 61 72 69 65 73 3a 20 24 28 50 52 l-binaries: $(PR
d7d0: 4a 4c 49 42 29 0a 09 40 24 28 45 43 48 4f 29 20 JLIB)..@$(ECHO)
d7e0: 49 6e 73 74 61 6c 6c 69 6e 67 20 24 28 50 52 4a Installing $(PRJ
d7f0: 4c 49 42 29 20 74 6f 20 27 24 28 4c 49 42 5f 49 LIB) to '$(LIB_I
d800: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 NSTALL_DIR)'..@i
d810: 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 4c f not exist "$(L
d820: 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 IB_INSTALL_DIR)"
d830: 20 6d 6b 64 69 72 20 22 24 28 4c 49 42 5f 49 4e mkdir "$(LIB_IN
d840: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 24 28 STALL_DIR)"..@$(
d850: 43 50 59 29 20 24 28 50 52 4a 4c 49 42 29 20 22 CPY) $(PRJLIB) "
d860: 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 $(LIB_INSTALL_DI
d870: 52 29 22 20 3e 4e 55 4c 0a 0a 23 20 41 6c 69 61 R)" >NUL..# Alia
d880: 73 20 66 6f 72 20 64 65 66 61 75 6c 74 2d 69 6e s for default-in
d890: 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 0a 64 65 stall-scripts.de
d8a0: 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c 2d 6c 69 fault-install-li
d8b0: 62 72 61 72 69 65 73 3a 20 64 65 66 61 75 6c 74 braries: default
d8c0: 2d 69 6e 73 74 61 6c 6c 2d 73 63 72 69 70 74 73 -install-scripts
d8d0: 0a 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c ..default-instal
d8e0: 6c 2d 73 63 72 69 70 74 73 3a 20 24 28 4f 55 54 l-scripts: $(OUT
d8f0: 5f 44 49 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 _DIR)\pkgIndex.t
d900: 63 6c 0a 09 40 24 28 45 43 48 4f 29 20 49 6e 73 cl..@$(ECHO) Ins
d910: 74 61 6c 6c 69 6e 67 20 24 28 50 52 4f 4a 45 43 talling $(PROJEC
d920: 54 29 20 73 63 72 69 70 74 73 20 74 6f 20 27 24 T) scripts to '$
d930: 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f (SCRIPT_INSTALL_
d940: 44 49 52 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 DIR)'..@if not e
d950: 78 69 73 74 20 22 24 28 53 43 52 49 50 54 5f 49 xist "$(SCRIPT_I
d960: 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 6d 6b 64 NSTALL_DIR)" mkd
d970: 69 72 20 22 24 28 53 43 52 49 50 54 5f 49 4e 53 ir "$(SCRIPT_INS
d980: 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 69 66 20 TALL_DIR)"..@if
d990: 65 78 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 exist $(LIBDIR)
d9a0: 24 28 43 50 59 29 20 24 28 4c 49 42 44 49 52 29 $(CPY) $(LIBDIR)
d9b0: 5c 2a 2e 74 63 6c 20 22 24 28 53 43 52 49 50 54 \*.tcl "$(SCRIPT
d9c0: 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 _INSTALL_DIR)"..
d9d0: 40 24 28 43 50 59 29 20 24 28 4f 55 54 5f 44 49 @$(CPY) $(OUT_DI
d9e0: 52 29 5c 70 6b 67 49 6e 64 65 78 2e 74 63 6c 20 R)\pkgIndex.tcl
d9f0: 24 28 53 43 52 49 50 54 5f 49 4e 53 54 41 4c 4c $(SCRIPT_INSTALL
da00: 5f 44 49 52 29 0a 0a 64 65 66 61 75 6c 74 2d 69 _DIR)..default-i
da10: 6e 73 74 61 6c 6c 2d 73 74 75 62 73 3a 0a 09 40 nstall-stubs:..@
da20: 24 28 45 43 48 4f 29 20 49 6e 73 74 61 6c 6c 69 $(ECHO) Installi
da30: 6e 67 20 73 74 75 62 73 20 6c 69 62 72 61 72 79 ng stubs library
da40: 20 74 6f 20 27 24 28 53 43 52 49 50 54 5f 49 4e to '$(SCRIPT_IN
da50: 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 66 STALL_DIR)'..@if
da60: 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 53 43 not exist "$(SC
da70: 52 49 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 RIPT_INSTALL_DIR
da80: 29 22 20 6d 6b 64 69 72 20 22 24 28 53 43 52 49 )" mkdir "$(SCRI
da90: 50 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 PT_INSTALL_DIR)"
daa0: 0a 09 40 24 28 43 50 59 29 20 24 28 50 52 4a 53 ..@$(CPY) $(PRJS
dab0: 54 55 42 4c 49 42 29 20 22 24 28 53 43 52 49 50 TUBLIB) "$(SCRIP
dac0: 54 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 20 T_INSTALL_DIR)"
dad0: 3e 4e 55 4c 0a 0a 64 65 66 61 75 6c 74 2d 69 6e >NUL..default-in
dae0: 73 74 61 6c 6c 2d 70 64 62 73 3a 0a 21 69 66 20 stall-pdbs:.!if
daf0: 21 24 28 53 54 41 54 49 43 5f 42 55 49 4c 44 29 !$(STATIC_BUILD)
db00: 0a 09 40 24 28 45 43 48 4f 29 20 49 6e 73 74 61 ..@$(ECHO) Insta
db10: 6c 6c 69 6e 67 20 50 44 42 73 20 74 6f 20 27 24 lling PDBs to '$
db20: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
db30: 29 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 )'..@if not exis
db40: 74 20 22 24 28 4c 49 42 5f 49 4e 53 54 41 4c 4c t "$(LIB_INSTALL
db50: 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 _DIR)" mkdir "$(
db60: 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 LIB_INSTALL_DIR)
db70: 22 0a 09 40 24 28 43 50 59 29 20 22 24 28 4f 55 "..@$(CPY) "$(OU
db80: 54 5f 44 49 52 29 5c 2a 2e 70 64 62 22 20 22 24 T_DIR)\*.pdb" "$
db90: 28 4c 49 42 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 (LIB_INSTALL_DIR
dba0: 29 5c 22 0a 21 65 6e 64 69 66 0a 0a 23 20 22 65 )\".!endif..# "e
dbb0: 6d 61 63 73 20 66 6f 6e 74 2d 6c 6f 63 6b 20 68 macs font-lock h
dbc0: 69 67 68 6c 69 67 68 74 69 6e 67 20 66 69 78 0a ighlighting fix.
dbd0: 0a 64 65 66 61 75 6c 74 2d 69 6e 73 74 61 6c 6c .default-install
dbe0: 2d 64 6f 63 73 2d 68 74 6d 6c 3a 0a 09 40 24 28 -docs-html:..@$(
dbf0: 45 43 48 4f 29 20 49 6e 73 74 61 6c 6c 69 6e 67 ECHO) Installing
dc00: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 20 66 documentation f
dc10: 69 6c 65 73 20 74 6f 20 27 24 28 44 4f 43 5f 49 iles to '$(DOC_I
dc20: 4e 53 54 41 4c 4c 5f 44 49 52 29 27 0a 09 40 69 NSTALL_DIR)'..@i
dc30: 66 20 6e 6f 74 20 65 78 69 73 74 20 22 24 28 44 f not exist "$(D
dc40: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 OC_INSTALL_DIR)"
dc50: 20 6d 6b 64 69 72 20 22 24 28 44 4f 43 5f 49 4e mkdir "$(DOC_IN
dc60: 53 54 41 4c 4c 5f 44 49 52 29 22 0a 09 40 69 66 STALL_DIR)"..@if
dc70: 20 65 78 69 73 74 20 24 28 44 4f 43 44 49 52 29 exist $(DOCDIR)
dc80: 20 66 6f 72 20 25 66 20 69 6e 20 28 22 24 28 44 for %f in ("$(D
dc90: 4f 43 44 49 52 29 5c 2a 2e 68 74 6d 6c 22 20 22 OCDIR)\*.html" "
dca0: 24 28 44 4f 43 44 49 52 29 5c 2a 2e 63 73 73 22 $(DOCDIR)\*.css"
dcb0: 20 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 70 6e "$(DOCDIR)\*.pn
dcc0: 67 22 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 g") do @$(COPY)
dcd0: 25 66 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c %f "$(DOC_INSTAL
dce0: 4c 5f 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 L_DIR)"..default
dcf0: 2d 69 6e 73 74 61 6c 6c 2d 64 6f 63 73 2d 6e 3a -install-docs-n:
dd00: 0a 09 40 24 28 45 43 48 4f 29 20 49 6e 73 74 61 ..@$(ECHO) Insta
dd10: 6c 6c 69 6e 67 20 64 6f 63 75 6d 65 6e 74 61 74 lling documentat
dd20: 69 6f 6e 20 66 69 6c 65 73 20 74 6f 20 27 24 28 ion files to '$(
dd30: 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 DOC_INSTALL_DIR)
dd40: 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 '..@if not exist
dd50: 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f "$(DOC_INSTALL_
dd60: 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 44 DIR)" mkdir "$(D
dd70: 4f 43 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 22 OC_INSTALL_DIR)"
dd80: 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 44 4f ..@if exist $(DO
dd90: 43 44 49 52 29 20 66 6f 72 20 25 66 20 69 6e 20 CDIR) for %f in
dda0: 28 22 24 28 44 4f 43 44 49 52 29 5c 2a 2e 6e 22 ("$(DOCDIR)\*.n"
ddb0: 29 20 64 6f 20 40 24 28 43 4f 50 59 29 20 25 66 ) do @$(COPY) %f
ddc0: 20 22 24 28 44 4f 43 5f 49 4e 53 54 41 4c 4c 5f "$(DOC_INSTALL_
ddd0: 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d 69 DIR)"..default-i
dde0: 6e 73 74 61 6c 6c 2d 64 65 6d 6f 73 3a 0a 09 40 nstall-demos:..@
ddf0: 24 28 45 43 48 4f 29 20 49 6e 73 74 61 6c 6c 69 $(ECHO) Installi
de00: 6e 67 20 64 65 6d 6f 73 20 74 6f 20 27 24 28 44 ng demos to '$(D
de10: 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 29 EMO_INSTALL_DIR)
de20: 27 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 74 '..@if not exist
de30: 20 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c "$(DEMO_INSTALL
de40: 5f 44 49 52 29 22 20 6d 6b 64 69 72 20 22 24 28 _DIR)" mkdir "$(
de50: 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f 44 49 52 DEMO_INSTALL_DIR
de60: 29 22 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 )"..@if exist $(
de70: 44 45 4d 4f 44 49 52 29 20 24 28 43 50 59 44 49 DEMODIR) $(CPYDI
de80: 52 29 20 22 24 28 44 45 4d 4f 44 49 52 29 22 20 R) "$(DEMODIR)"
de90: 22 24 28 44 45 4d 4f 5f 49 4e 53 54 41 4c 4c 5f "$(DEMO_INSTALL_
dea0: 44 49 52 29 22 0a 0a 64 65 66 61 75 6c 74 2d 63 DIR)"..default-c
deb0: 6c 65 61 6e 3a 0a 09 40 24 28 45 43 48 4f 29 20 lean:..@$(ECHO)
dec0: 43 6c 65 61 6e 69 6e 67 20 24 28 54 4d 50 5f 44 Cleaning $(TMP_D
ded0: 49 52 29 5c 2a 20 2e 2e 2e 0a 09 40 69 66 20 65 IR)\* .....@if e
dee0: 78 69 73 74 20 24 28 54 4d 50 5f 44 49 52 29 5c xist $(TMP_DIR)\
def0: 6e 75 6c 20 24 28 52 4d 44 49 52 29 20 24 28 54 nul $(RMDIR) $(T
df00: 4d 50 5f 44 49 52 29 0a 09 40 24 28 45 43 48 4f MP_DIR)..@$(ECHO
df10: 29 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e ) Cleaning $(WIN
df20: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f _DIR)\nmakehlp.o
df30: 62 6a 2c 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 bj, nmakehlp.exe
df40: 20 2e 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 .....@if exist
df50: 24 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 $(WIN_DIR)\nmake
df60: 68 6c 70 2e 6f 62 6a 20 64 65 6c 20 24 28 57 49 hlp.obj del $(WI
df70: 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e N_DIR)\nmakehlp.
df80: 6f 62 6a 0a 09 40 69 66 20 65 78 69 73 74 20 24 obj..@if exist $
df90: 28 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 (WIN_DIR)\nmakeh
dfa0: 6c 70 2e 65 78 65 20 64 65 6c 20 24 28 57 49 4e lp.exe del $(WIN
dfb0: 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 65 _DIR)\nmakehlp.e
dfc0: 78 65 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 xe..@if exist $(
dfd0: 57 49 4e 5f 44 49 52 29 5c 6e 6d 61 6b 65 68 6c WIN_DIR)\nmakehl
dfe0: 70 2e 6f 75 74 20 64 65 6c 20 24 28 57 49 4e 5f p.out del $(WIN_
dff0: 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 6f 75 DIR)\nmakehlp.ou
e000: 74 0a 09 40 24 28 45 43 48 4f 29 20 43 6c 65 61 t..@$(ECHO) Clea
e010: 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 5c ning $(WIN_DIR)\
e020: 6e 6d 68 6c 70 2d 6f 75 74 2e 74 78 74 20 2e 2e nmhlp-out.txt ..
e030: 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 57 ...@if exist $(W
e040: 49 4e 5f 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 IN_DIR)\nmhlp-ou
e050: 74 2e 74 78 74 20 64 65 6c 20 24 28 57 49 4e 5f t.txt del $(WIN_
e060: 44 49 52 29 5c 6e 6d 68 6c 70 2d 6f 75 74 2e 74 DIR)\nmhlp-out.t
e070: 78 74 0a 09 40 24 28 45 43 48 4f 29 20 43 6c 65 xt..@$(ECHO) Cle
e080: 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 52 29 aning $(WIN_DIR)
e090: 5c 5f 6a 75 6e 6b 2e 70 63 68 20 2e 2e 2e 0a 09 \_junk.pch .....
e0a0: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
e0b0: 44 49 52 29 5c 5f 6a 75 6e 6b 2e 70 63 68 20 64 DIR)\_junk.pch d
e0c0: 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 5f 6a el $(WIN_DIR)\_j
e0d0: 75 6e 6b 2e 70 63 68 0a 09 40 24 28 45 43 48 4f unk.pch..@$(ECHO
e0e0: 29 20 43 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e ) Cleaning $(WIN
e0f0: 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 2c 20 76 _DIR)\vercl.x, v
e100: 65 72 63 6c 2e 69 20 2e 2e 2e 0a 09 40 69 66 20 ercl.i .....@if
e110: 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 29 exist $(WIN_DIR)
e120: 5c 76 65 72 63 6c 2e 78 20 64 65 6c 20 24 28 57 \vercl.x del $(W
e130: 49 4e 5f 44 49 52 29 5c 76 65 72 63 6c 2e 78 0a IN_DIR)\vercl.x.
e140: 09 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e .@if exist $(WIN
e150: 5f 44 49 52 29 5c 76 65 72 63 6c 2e 69 20 64 65 _DIR)\vercl.i de
e160: 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 l $(WIN_DIR)\ver
e170: 63 6c 2e 69 0a 09 40 24 28 45 43 48 4f 29 20 43 cl.i..@$(ECHO) C
e180: 6c 65 61 6e 69 6e 67 20 24 28 57 49 4e 5f 44 49 leaning $(WIN_DI
e190: 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 2c 20 R)\versions.vc,
e1a0: 76 65 72 73 69 6f 6e 2e 76 63 20 2e 2e 2e 0a 09 version.vc .....
e1b0: 40 69 66 20 65 78 69 73 74 20 24 28 57 49 4e 5f @if exist $(WIN_
e1c0: 44 49 52 29 5c 76 65 72 73 69 6f 6e 73 2e 76 63 DIR)\versions.vc
e1d0: 20 64 65 6c 20 24 28 57 49 4e 5f 44 49 52 29 5c del $(WIN_DIR)\
e1e0: 76 65 72 73 69 6f 6e 73 2e 76 63 0a 09 40 69 66 versions.vc..@if
e1f0: 20 65 78 69 73 74 20 24 28 57 49 4e 5f 44 49 52 exist $(WIN_DIR
e200: 29 5c 76 65 72 73 69 6f 6e 2e 76 63 20 64 65 6c )\version.vc del
e210: 20 24 28 57 49 4e 5f 44 49 52 29 5c 76 65 72 73 $(WIN_DIR)\vers
e220: 69 6f 6e 2e 76 63 0a 0a 64 65 66 61 75 6c 74 2d ion.vc..default-
e230: 68 6f 73 65 3a 20 64 65 66 61 75 6c 74 2d 63 6c hose: default-cl
e240: 65 61 6e 0a 09 40 65 63 68 6f 20 48 6f 73 69 6e ean..@echo Hosin
e250: 67 20 24 28 4f 55 54 5f 44 49 52 29 5c 2a 20 2e g $(OUT_DIR)\* .
e260: 2e 2e 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 ....@if exist $(
e270: 4f 55 54 5f 44 49 52 29 5c 6e 75 6c 20 24 28 52 OUT_DIR)\nul $(R
e280: 4d 44 49 52 29 20 24 28 4f 55 54 5f 44 49 52 29 MDIR) $(OUT_DIR)
e290: 0a 0a 23 20 4f 6e 6c 79 20 66 6f 72 20 62 61 63 ..# Only for bac
e2a0: 6b 77 61 72 64 20 63 6f 6d 70 61 74 69 62 69 6c kward compatibil
e2b0: 69 74 79 0a 64 65 66 61 75 6c 74 2d 64 69 73 74 ity.default-dist
e2c0: 63 6c 65 61 6e 3a 20 64 65 66 61 75 6c 74 2d 68 clean: default-h
e2d0: 6f 73 65 0a 0a 64 65 66 61 75 6c 74 2d 73 65 74 ose..default-set
e2e0: 75 70 3a 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 up:..@if not exi
e2f0: 73 74 20 24 28 4f 55 54 5f 44 49 52 29 5c 6e 75 st $(OUT_DIR)\nu
e300: 6c 20 6d 6b 64 69 72 20 24 28 4f 55 54 5f 44 49 l mkdir $(OUT_DI
e310: 52 29 0a 09 40 69 66 20 6e 6f 74 20 65 78 69 73 R)..@if not exis
e320: 74 20 24 28 54 4d 50 5f 44 49 52 29 5c 6e 75 6c t $(TMP_DIR)\nul
e330: 20 6d 6b 64 69 72 20 24 28 54 4d 50 5f 44 49 52 mkdir $(TMP_DIR
e340: 29 0a 0a 21 69 66 20 22 24 28 54 45 53 54 50 41 )..!if "$(TESTPA
e350: 54 29 22 20 21 3d 20 22 22 0a 54 45 53 54 46 4c T)" != "".TESTFL
e360: 41 47 53 20 3d 20 24 28 54 45 53 54 46 4c 41 47 AGS = $(TESTFLAG
e370: 53 29 20 2d 66 69 6c 65 20 24 28 54 45 53 54 50 S) -file $(TESTP
e380: 41 54 29 0a 21 65 6e 64 69 66 0a 0a 64 65 66 61 AT).!endif..defa
e390: 75 6c 74 2d 74 65 73 74 3a 20 64 65 66 61 75 6c ult-test: defaul
e3a0: 74 2d 73 65 74 75 70 20 24 28 50 52 4f 4a 45 43 t-setup $(PROJEC
e3b0: 54 29 0a 09 40 73 65 74 20 54 43 4c 4c 49 42 50 T)..@set TCLLIBP
e3c0: 41 54 48 3d 24 28 4f 55 54 5f 44 49 52 3a 5c 3d ATH=$(OUT_DIR:\=
e3d0: 2f 29 0a 09 40 69 66 20 65 78 69 73 74 20 24 28 /)..@if exist $(
e3e0: 4c 49 42 44 49 52 29 20 66 6f 72 20 25 66 20 69 LIBDIR) for %f i
e3f0: 6e 20 28 22 24 28 4c 49 42 44 49 52 29 5c 2a 2e n ("$(LIBDIR)\*.
e400: 74 63 6c 22 29 20 64 6f 20 40 24 28 43 4f 50 59 tcl") do @$(COPY
e410: 29 20 25 66 20 22 24 28 4f 55 54 5f 44 49 52 29 ) %f "$(OUT_DIR)
e420: 22 0a 09 63 64 20 22 24 28 54 45 53 54 44 49 52 "..cd "$(TESTDIR
e430: 29 22 20 26 26 20 24 28 44 45 42 55 47 47 45 52 )" && $(DEBUGGER
e440: 29 20 24 28 54 43 4c 53 48 29 20 61 6c 6c 2e 74 ) $(TCLSH) all.t
e450: 63 6c 20 24 28 54 45 53 54 46 4c 41 47 53 29 0a cl $(TESTFLAGS).
e460: 0a 64 65 66 61 75 6c 74 2d 73 68 65 6c 6c 3a 20 .default-shell:
e470: 64 65 66 61 75 6c 74 2d 73 65 74 75 70 20 24 28 default-setup $(
e480: 50 52 4f 4a 45 43 54 29 0a 09 40 73 65 74 20 54 PROJECT)..@set T
e490: 43 4c 4c 49 42 50 41 54 48 3d 24 28 4f 55 54 5f CLLIBPATH=$(OUT_
e4a0: 44 49 52 3a 5c 3d 2f 29 0a 09 40 69 66 20 65 78 DIR:\=/)..@if ex
e4b0: 69 73 74 20 24 28 4c 49 42 44 49 52 29 20 66 6f ist $(LIBDIR) fo
e4c0: 72 20 25 66 20 69 6e 20 28 22 24 28 4c 49 42 44 r %f in ("$(LIBD
e4d0: 49 52 29 5c 2a 2e 74 63 6c 22 29 20 64 6f 20 40 IR)\*.tcl") do @
e4e0: 24 28 43 4f 50 59 29 20 25 66 20 22 24 28 4f 55 $(COPY) %f "$(OU
e4f0: 54 5f 44 49 52 29 22 0a 09 24 28 44 45 42 55 47 T_DIR)"..$(DEBUG
e500: 47 45 52 29 20 24 28 54 43 4c 53 48 29 0a 0a 23 GER) $(TCLSH)..#
e510: 20 47 65 6e 65 72 61 74 69 6f 6e 20 6f 66 20 57 Generation of W
e520: 69 6e 64 6f 77 73 20 76 65 72 73 69 6f 6e 20 72 indows version r
e530: 65 73 6f 75 72 63 65 0a 21 69 66 64 65 66 20 52 esource.!ifdef R
e540: 43 46 49 4c 45 0a 0a 23 20 4e 6f 74 65 3a 20 64 CFILE..# Note: d
e550: 6f 6e 27 74 20 75 73 65 20 24 2a 2a 20 69 6e 20 on't use $** in
e560: 62 65 6c 6f 77 20 72 75 6c 65 20 62 65 63 61 75 below rule becau
e570: 73 65 20 74 68 65 72 65 20 6d 61 79 20 62 65 20 se there may be
e580: 6f 74 68 65 72 20 64 65 70 65 6e 64 65 6e 63 69 other dependenci
e590: 65 73 0a 23 20 61 6e 64 20 6f 6e 6c 79 20 74 68 es.# and only th
e5a0: 65 20 22 6d 61 69 6e 22 20 72 63 20 6d 75 73 74 e "main" rc must
e5b0: 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 74 68 be passed to th
e5c0: 65 20 72 65 73 6f 75 72 63 65 20 63 6f 6d 70 69 e resource compi
e5d0: 6c 65 72 0a 24 28 54 4d 50 5f 44 49 52 29 5c 24 ler.$(TMP_DIR)\$
e5e0: 28 50 52 4f 4a 45 43 54 29 2e 72 65 73 3a 20 24 (PROJECT).res: $
e5f0: 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 (RCDIR)\$(PROJEC
e600: 54 29 2e 72 63 0a 09 24 28 52 45 53 43 4d 44 29 T).rc..$(RESCMD)
e610: 20 24 28 52 43 44 49 52 29 5c 24 28 50 52 4f 4a $(RCDIR)\$(PROJ
e620: 45 43 54 29 2e 72 63 0a 0a 21 65 6c 73 65 0a 0a ECT).rc..!else..
e630: 23 20 49 66 20 70 61 72 65 6e 74 20 6d 61 6b 65 # If parent make
e640: 66 69 6c 65 20 68 61 73 20 6e 6f 74 20 64 65 66 file has not def
e650: 69 6e 65 64 20 61 20 72 65 73 6f 75 72 63 65 20 ined a resource
e660: 64 65 66 69 6e 69 74 69 6f 6e 20 66 69 6c 65 2c definition file,
e670: 0a 23 20 77 65 20 77 69 6c 6c 20 67 65 6e 65 72 .# we will gener
e680: 61 74 65 20 6f 6e 65 20 66 72 6f 6d 20 73 74 61 ate one from sta
e690: 6e 64 61 72 64 20 74 65 6d 70 6c 61 74 65 2e 0a ndard template..
e6a0: 24 28 54 4d 50 5f 44 49 52 29 5c 24 28 50 52 4f $(TMP_DIR)\$(PRO
e6b0: 4a 45 43 54 29 2e 72 65 73 3a 20 24 28 54 4d 50 JECT).res: $(TMP
e6c0: 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 29 _DIR)\$(PROJECT)
e6d0: 2e 72 63 0a 0a 24 28 54 4d 50 5f 44 49 52 29 5c .rc..$(TMP_DIR)\
e6e0: 24 28 50 52 4f 4a 45 43 54 29 2e 72 63 3a 0a 09 $(PROJECT).rc:..
e6f0: 40 24 28 43 4f 50 59 29 20 3c 3c 20 24 28 54 4d @$(COPY) << $(TM
e700: 50 5f 44 49 52 29 5c 24 28 50 52 4f 4a 45 43 54 P_DIR)\$(PROJECT
e710: 29 2e 72 63 0a 23 69 6e 63 6c 75 64 65 20 3c 77 ).rc.#include <w
e720: 69 6e 76 65 72 2e 68 3e 0a 0a 56 53 5f 56 45 52 inver.h>..VS_VER
e730: 53 49 4f 4e 5f 49 4e 46 4f 20 56 45 52 53 49 4f SION_INFO VERSIO
e740: 4e 49 4e 46 4f 0a 20 46 49 4c 45 56 45 52 53 49 NINFO. FILEVERSI
e750: 4f 4e 09 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a ON.COMMAVERSION.
e760: 20 50 52 4f 44 55 43 54 56 45 52 53 49 4f 4e 09 PRODUCTVERSION.
e770: 43 4f 4d 4d 41 56 45 52 53 49 4f 4e 0a 20 46 49 COMMAVERSION. FI
e780: 4c 45 46 4c 41 47 53 4d 41 53 4b 09 30 78 33 66 LEFLAGSMASK.0x3f
e790: 4c 0a 23 69 66 64 65 66 20 44 45 42 55 47 0a 20 L.#ifdef DEBUG.
e7a0: 46 49 4c 45 46 4c 41 47 53 09 56 53 5f 46 46 5f FILEFLAGS.VS_FF_
e7b0: 44 45 42 55 47 0a 23 65 6c 73 65 0a 20 46 49 4c DEBUG.#else. FIL
e7c0: 45 46 4c 41 47 53 09 30 78 30 4c 0a 23 65 6e 64 EFLAGS.0x0L.#end
e7d0: 69 66 0a 20 46 49 4c 45 4f 53 09 09 56 4f 53 5f if. FILEOS..VOS_
e7e0: 4e 54 5f 57 49 4e 44 4f 57 53 33 32 0a 20 46 49 NT_WINDOWS32. FI
e7f0: 4c 45 54 59 50 45 09 56 46 54 5f 44 4c 4c 0a 20 LETYPE.VFT_DLL.
e800: 46 49 4c 45 53 55 42 54 59 50 45 09 30 78 30 4c FILESUBTYPE.0x0L
e810: 0a 42 45 47 49 4e 0a 20 20 20 20 42 4c 4f 43 4b .BEGIN. BLOCK
e820: 20 22 53 74 72 69 6e 67 46 69 6c 65 49 6e 66 6f "StringFileInfo
e830: 22 0a 20 20 20 20 42 45 47 49 4e 0a 09 42 4c 4f ". BEGIN..BLO
e840: 43 4b 20 22 30 34 30 39 30 34 62 30 22 0a 09 42 CK "040904b0"..B
e850: 45 47 49 4e 0a 09 20 20 20 20 56 41 4c 55 45 20 EGIN.. VALUE
e860: 22 46 69 6c 65 44 65 73 63 72 69 70 74 69 6f 6e "FileDescription
e870: 22 2c 20 20 22 54 63 6c 20 65 78 74 65 6e 73 69 ", "Tcl extensi
e880: 6f 6e 20 22 20 50 52 4f 4a 45 43 54 0a 09 20 20 on " PROJECT..
e890: 20 20 56 41 4c 55 45 20 22 4f 72 69 67 69 6e 61 VALUE "Origina
e8a0: 6c 46 69 6c 65 6e 61 6d 65 22 2c 20 50 52 4a 4c lFilename", PRJL
e8b0: 49 42 4e 41 4d 45 0a 09 20 20 20 20 56 41 4c 55 IBNAME.. VALU
e8c0: 45 20 22 46 69 6c 65 56 65 72 73 69 6f 6e 22 2c E "FileVersion",
e8d0: 20 20 20 20 20 20 44 4f 54 56 45 52 53 49 4f 4e DOTVERSION
e8e0: 0a 09 20 20 20 20 56 41 4c 55 45 20 22 50 72 6f .. VALUE "Pro
e8f0: 64 75 63 74 4e 61 6d 65 22 2c 20 20 20 20 20 20 ductName",
e900: 22 50 61 63 6b 61 67 65 20 22 20 50 52 4f 4a 45 "Package " PROJE
e910: 43 54 20 22 20 66 6f 72 20 54 63 6c 22 0a 09 20 CT " for Tcl"..
e920: 20 20 20 56 41 4c 55 45 20 22 50 72 6f 64 75 63 VALUE "Produc
e930: 74 56 65 72 73 69 6f 6e 22 2c 20 20 20 44 4f 54 tVersion", DOT
e940: 56 45 52 53 49 4f 4e 0a 09 45 4e 44 0a 20 20 20 VERSION..END.
e950: 20 45 4e 44 0a 20 20 20 20 42 4c 4f 43 4b 20 22 END. BLOCK "
e960: 56 61 72 46 69 6c 65 49 6e 66 6f 22 0a 20 20 20 VarFileInfo".
e970: 20 42 45 47 49 4e 0a 09 56 41 4c 55 45 20 22 54 BEGIN..VALUE "T
e980: 72 61 6e 73 6c 61 74 69 6f 6e 22 2c 20 30 78 34 ranslation", 0x4
e990: 30 39 2c 20 31 32 30 30 0a 20 20 20 20 45 4e 44 09, 1200. END
e9a0: 0a 45 4e 44 0a 0a 3c 3c 0a 0a 21 65 6e 64 69 66 .END..<<..!endif
e9b0: 20 23 20 69 66 64 65 66 20 52 43 46 49 4c 45 0a # ifdef RCFILE.
e9c0: 0a 21 69 66 6e 64 65 66 20 44 49 53 41 42 4c 45 .!ifndef DISABLE
e9d0: 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 0a _IMPLICIT_RULES.
e9e0: 44 49 53 41 42 4c 45 5f 49 4d 50 4c 49 43 49 54 DISABLE_IMPLICIT
e9f0: 5f 52 55 4c 45 53 20 3d 20 30 0a 21 65 6e 64 69 _RULES = 0.!endi
ea00: 66 0a 0a 21 69 66 20 21 24 28 44 49 53 41 42 4c f..!if !$(DISABL
ea10: 45 5f 49 4d 50 4c 49 43 49 54 5f 52 55 4c 45 53 E_IMPLICIT_RULES
ea20: 29 0a 23 20 49 6d 70 6c 69 63 69 74 20 72 75 6c ).# Implicit rul
ea30: 65 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 2d 20 e definitions -
ea40: 6f 6e 6c 79 20 66 6f 72 20 62 75 69 6c 64 69 6e only for buildin
ea50: 67 20 6c 69 62 72 61 72 79 20 6f 62 6a 65 63 74 g library object
ea60: 73 2e 20 46 6f 72 20 73 74 75 62 73 20 61 6e 64 s. For stubs and
ea70: 0a 23 20 6d 61 69 6e 20 61 70 70 6c 69 63 61 74 .# main applicat
ea80: 69 6f 6e 2c 20 74 68 65 20 6d 61 6b 65 66 69 6c ion, the makefil
ea90: 65 20 73 68 6f 75 6c 64 20 64 65 66 69 6e 65 20 e should define
eaa0: 65 78 70 6c 69 63 69 74 20 72 75 6c 65 73 2e 0a explicit rules..
eab0: 0a 7b 24 28 52 4f 4f 54 29 7d 2e 63 7b 24 28 54 .{$(ROOT)}.c{$(T
eac0: 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 MP_DIR)}.obj::..
ead0: 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a $(CCPKGCMD) @<<.
eae0: 24 3c 0a 3c 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 $<.<<..{$(WIN_DI
eaf0: 52 29 7d 2e 63 7b 24 28 54 4d 50 5f 44 49 52 29 R)}.c{$(TMP_DIR)
eb00: 7d 2e 6f 62 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 }.obj::..$(CCPKG
eb10: 43 4d 44 29 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a CMD) @<<.$<.<<..
eb20: 7b 24 28 47 45 4e 45 52 49 43 44 49 52 29 7d 2e {$(GENERICDIR)}.
eb30: 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d 2e 6f 62 c{$(TMP_DIR)}.ob
eb40: 6a 3a 3a 0a 09 24 28 43 43 50 4b 47 43 4d 44 29 j::..$(CCPKGCMD)
eb50: 20 40 3c 3c 0a 24 3c 0a 3c 3c 0a 0a 7b 24 28 43 @<<.$<.<<..{$(C
eb60: 4f 4d 50 41 54 44 49 52 29 7d 2e 63 7b 24 28 54 OMPATDIR)}.c{$(T
eb70: 4d 50 5f 44 49 52 29 7d 2e 6f 62 6a 3a 3a 0a 09 MP_DIR)}.obj::..
eb80: 24 28 43 43 50 4b 47 43 4d 44 29 20 40 3c 3c 0a $(CCPKGCMD) @<<.
eb90: 24 3c 0a 3c 3c 0a 0a 7b 24 28 52 43 44 49 52 29 $<.<<..{$(RCDIR)
eba0: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
ebb0: 2e 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 .res:..$(RESCMD)
ebc0: 20 24 3c 0a 0a 7b 24 28 57 49 4e 5f 44 49 52 29 $<..{$(WIN_DIR)
ebd0: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
ebe0: 2e 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 .res:..$(RESCMD)
ebf0: 20 24 3c 0a 0a 7b 24 28 54 4d 50 5f 44 49 52 29 $<..{$(TMP_DIR)
ec00: 7d 2e 72 63 7b 24 28 54 4d 50 5f 44 49 52 29 7d }.rc{$(TMP_DIR)}
ec10: 2e 72 65 73 3a 0a 09 24 28 52 45 53 43 4d 44 29 .res:..$(RESCMD)
ec20: 20 24 3c 0a 0a 2e 53 55 46 46 49 58 45 53 3a 0a $<...SUFFIXES:.
ec30: 2e 53 55 46 46 49 58 45 53 3a 2e 63 20 2e 72 63 .SUFFIXES:.c .rc
ec40: 0a 0a 21 65 6e 64 69 66 0a 0a 23 23 23 23 23 23 ..!endif..######
ec50: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ec60: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ec70: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
ec80: 23 23 23 23 23 23 23 23 23 23 0a 23 20 31 34 2e ##########.# 14.
ec90: 20 53 61 6e 69 74 79 20 63 68 65 63 6b 20 73 65 Sanity check se
eca0: 6c 65 63 74 65 64 20 6f 70 74 69 6f 6e 73 20 61 lected options a
ecb0: 67 61 69 6e 73 74 20 54 63 6c 20 62 75 69 6c 64 gainst Tcl build
ecc0: 20 6f 70 74 69 6f 6e 73 0a 23 20 57 68 65 6e 20 options.# When
ecd0: 62 75 69 6c 64 69 6e 67 20 61 6e 20 65 78 74 65 building an exte
ece0: 6e 73 69 6f 6e 2c 20 63 65 72 74 61 69 6e 20 63 nsion, certain c
ecf0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 6f 70 74 onfiguration opt
ed00: 69 6f 6e 73 20 73 68 6f 75 6c 64 0a 23 20 6d 61 ions should.# ma
ed10: 74 63 68 20 74 68 65 20 6f 6e 65 73 20 75 73 65 tch the ones use
ed20: 64 20 77 68 65 6e 20 54 63 6c 20 77 61 73 20 62 d when Tcl was b
ed30: 75 69 6c 74 2e 20 48 65 72 65 20 77 65 20 63 68 uilt. Here we ch
ed40: 65 63 6b 20 61 6e 64 0a 23 20 77 61 72 6e 20 6f eck and.# warn o
ed50: 6e 20 61 20 6d 69 73 6d 61 74 63 68 2e 0a 21 69 n a mismatch..!i
ed60: 66 20 21 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a f !$(DOING_TCL).
ed70: 0a 21 69 66 20 24 28 54 43 4c 49 4e 53 54 41 4c .!if $(TCLINSTAL
ed80: 4c 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 L) # Building ag
ed90: 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c 6c ainst an install
eda0: 65 64 20 54 63 6c 0a 21 69 66 20 65 78 69 73 74 ed Tcl.!if exist
edb0: 28 22 24 28 5f 54 43 4c 44 49 52 29 5c 6c 69 62 ("$(_TCLDIR)\lib
edc0: 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d 61 6b 65 \nmake\tcl.nmake
edd0: 22 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 ").TCLNMAKECONFI
ede0: 47 20 3d 20 22 24 28 5f 54 43 4c 44 49 52 29 5c G = "$(_TCLDIR)\
edf0: 6c 69 62 5c 6e 6d 61 6b 65 5c 74 63 6c 2e 6e 6d lib\nmake\tcl.nm
ee00: 61 6b 65 22 0a 21 65 6e 64 69 66 0a 21 65 6c 73 ake".!endif.!els
ee10: 65 20 23 20 21 24 28 54 43 4c 49 4e 53 54 41 4c e # !$(TCLINSTAL
ee20: 4c 29 20 2d 20 62 75 69 6c 64 69 6e 67 20 61 67 L) - building ag
ee30: 61 69 6e 73 74 20 54 63 6c 20 73 6f 75 72 63 65 ainst Tcl source
ee40: 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 54 .!if exist("$(_T
ee50: 43 4c 44 49 52 29 5c 77 69 6e 5c 24 28 42 55 49 CLDIR)\win\$(BUI
ee60: 4c 44 44 49 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d LDDIRTOP)\tcl.nm
ee70: 61 6b 65 22 29 0a 54 43 4c 4e 4d 41 4b 45 43 4f ake").TCLNMAKECO
ee80: 4e 46 49 47 09 3d 20 22 24 28 5f 54 43 4c 44 49 NFIG.= "$(_TCLDI
ee90: 52 29 5c 77 69 6e 5c 24 28 42 55 49 4c 44 44 49 R)\win\$(BUILDDI
eea0: 52 54 4f 50 29 5c 74 63 6c 2e 6e 6d 61 6b 65 22 RTOP)\tcl.nmake"
eeb0: 0a 21 65 6e 64 69 66 0a 21 65 6e 64 69 66 20 23 .!endif.!endif #
eec0: 20 54 43 4c 49 4e 53 54 41 4c 4c 0a 0a 21 69 66 TCLINSTALL..!if
eed0: 20 24 28 43 4f 4e 46 49 47 5f 43 48 45 43 4b 29 $(CONFIG_CHECK)
eee0: 0a 21 69 66 64 65 66 20 54 43 4c 4e 4d 41 4b 45 .!ifdef TCLNMAKE
eef0: 43 4f 4e 46 49 47 0a 21 69 6e 63 6c 75 64 65 20 CONFIG.!include
ef00: 24 28 54 43 4c 4e 4d 41 4b 45 43 4f 4e 46 49 47 $(TCLNMAKECONFIG
ef10: 29 0a 0a 21 69 66 20 64 65 66 69 6e 65 64 28 43 )..!if defined(C
ef20: 4f 52 45 5f 4d 41 43 48 49 4e 45 29 20 26 26 20 ORE_MACHINE) &&
ef30: 22 24 28 43 4f 52 45 5f 4d 41 43 48 49 4e 45 29 "$(CORE_MACHINE)
ef40: 22 20 21 3d 20 22 24 28 4d 41 43 48 49 4e 45 29 " != "$(MACHINE)
ef50: 22 0a 21 65 72 72 6f 72 20 45 52 52 4f 52 3a 20 ".!error ERROR:
ef60: 42 75 69 6c 64 20 74 61 72 67 65 74 20 28 24 28 Build target ($(
ef70: 4d 41 43 48 49 4e 45 29 29 20 64 6f 65 73 20 6e MACHINE)) does n
ef80: 6f 74 20 6d 61 74 63 68 20 74 68 65 20 54 63 6c ot match the Tcl
ef90: 20 6c 69 62 72 61 72 79 20 61 72 63 68 69 74 65 library archite
efa0: 63 74 75 72 65 20 28 24 28 43 4f 52 45 5f 4d 41 cture ($(CORE_MA
efb0: 43 48 49 4e 45 29 29 2e 0a 21 65 6e 64 69 66 0a CHINE))..!endif.
efc0: 21 69 66 20 24 28 54 43 4c 5f 56 45 52 53 49 4f !if $(TCL_VERSIO
efd0: 4e 29 20 3c 20 38 37 20 26 26 20 64 65 66 69 6e N) < 87 && defin
efe0: 65 64 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 45 ed(CORE_USE_THRE
eff0: 41 44 5f 41 4c 4c 4f 43 29 20 26 26 20 24 28 43 AD_ALLOC) && $(C
f000: 4f 52 45 5f 55 53 45 5f 54 48 52 45 41 44 5f 41 ORE_USE_THREAD_A
f010: 4c 4c 4f 43 29 20 21 3d 20 24 28 55 53 45 5f 54 LLOC) != $(USE_T
f020: 48 52 45 41 44 5f 41 4c 4c 4f 43 29 0a 21 6d 65 HREAD_ALLOC).!me
f030: 73 73 61 67 65 20 57 41 52 4e 49 4e 47 3a 20 56 ssage WARNING: V
f040: 61 6c 75 65 20 6f 66 20 55 53 45 5f 54 48 52 45 alue of USE_THRE
f050: 41 44 5f 41 4c 4c 4f 43 20 28 24 28 55 53 45 5f AD_ALLOC ($(USE_
f060: 54 48 52 45 41 44 5f 41 4c 4c 4f 43 29 29 20 64 THREAD_ALLOC)) d
f070: 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 69 74 oes not match it
f080: 73 20 54 63 6c 20 63 6f 72 65 20 76 61 6c 75 65 s Tcl core value
f090: 20 28 24 28 43 4f 52 45 5f 55 53 45 5f 54 48 52 ($(CORE_USE_THR
f0a0: 45 41 44 5f 41 4c 4c 4f 43 29 29 2e 0a 21 65 6e EAD_ALLOC))..!en
f0b0: 64 69 66 0a 21 69 66 20 64 65 66 69 6e 65 64 28 dif.!if defined(
f0c0: 43 4f 52 45 5f 44 45 42 55 47 29 20 26 26 20 24 CORE_DEBUG) && $
f0d0: 28 43 4f 52 45 5f 44 45 42 55 47 29 20 21 3d 20 (CORE_DEBUG) !=
f0e0: 24 28 44 45 42 55 47 29 0a 21 6d 65 73 73 61 67 $(DEBUG).!messag
f0f0: 65 20 57 41 52 4e 49 4e 47 3a 20 56 61 6c 75 65 e WARNING: Value
f100: 20 6f 66 20 44 45 42 55 47 20 28 24 28 44 45 42 of DEBUG ($(DEB
f110: 55 47 29 29 20 64 6f 65 73 20 6e 6f 74 20 6d 61 UG)) does not ma
f120: 74 63 68 20 69 74 73 20 54 63 6c 20 6c 69 62 72 tch its Tcl libr
f130: 61 72 79 20 63 6f 6e 66 69 67 75 72 61 74 69 6f ary configuratio
f140: 6e 20 28 24 28 44 45 42 55 47 29 29 2e 0a 21 65 n ($(DEBUG))..!e
f150: 6e 64 69 66 0a 21 65 6e 64 69 66 0a 0a 21 65 6e ndif.!endif..!en
f160: 64 69 66 20 23 20 54 43 4c 4e 4d 41 4b 45 43 4f dif # TCLNMAKECO
f170: 4e 46 49 47 0a 0a 21 65 6e 64 69 66 20 23 20 21 NFIG..!endif # !
f180: 24 28 44 4f 49 4e 47 5f 54 43 4c 29 0a 0a 0a 23 $(DOING_TCL)...#
f190: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f1a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f1b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f1c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 44 69 73 ----------.# Dis
f1d0: 70 6c 61 79 20 73 74 61 74 73 20 62 65 69 6e 67 play stats being
f1e0: 20 75 73 65 64 2e 0a 23 2d 2d 2d 2d 2d 2d 2d 2d used..#--------
f1f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f200: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f210: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
f220: 2d 2d 0a 0a 21 69 66 20 24 28 56 45 52 42 4f 53 --..!if $(VERBOS
f230: 45 29 0a 21 69 66 20 21 24 28 44 4f 49 4e 47 5f E).!if !$(DOING_
f240: 54 43 4c 29 0a 21 6d 65 73 73 61 67 65 20 2a 2a TCL).!message **
f250: 2a 20 42 75 69 6c 64 69 6e 67 20 61 67 61 69 6e * Building again
f260: 73 74 20 54 63 6c 20 61 74 20 27 24 28 5f 54 43 st Tcl at '$(_TC
f270: 4c 44 49 52 29 27 0a 21 65 6e 64 69 66 0a 21 69 LDIR)'.!endif.!i
f280: 66 20 21 24 28 44 4f 49 4e 47 5f 54 4b 29 20 26 f !$(DOING_TK) &
f290: 26 20 24 28 4e 45 45 44 5f 54 4b 29 0a 21 6d 65 & $(NEED_TK).!me
f2a0: 73 73 61 67 65 20 2a 2a 2a 20 42 75 69 6c 64 69 ssage *** Buildi
f2b0: 6e 67 20 61 67 61 69 6e 73 74 20 54 6b 20 61 74 ng against Tk at
f2c0: 20 27 24 28 5f 54 4b 44 49 52 29 27 0a 21 65 6e '$(_TKDIR)'.!en
f2d0: 64 69 66 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a dif.!message ***
f2e0: 20 49 6e 74 65 72 6d 65 64 69 61 74 65 20 64 69 Intermediate di
f2f0: 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 62 65 20 rectory will be
f300: 27 24 28 54 4d 50 5f 44 49 52 29 27 0a 21 6d 65 '$(TMP_DIR)'.!me
f310: 73 73 61 67 65 20 2a 2a 2a 20 4f 75 74 70 75 74 ssage *** Output
f320: 20 64 69 72 65 63 74 6f 72 79 20 77 69 6c 6c 20 directory will
f330: 62 65 20 27 24 28 4f 55 54 5f 44 49 52 29 27 0a be '$(OUT_DIR)'.
f340: 21 6d 65 73 73 61 67 65 20 2a 2a 2a 20 49 6e 73 !message *** Ins
f350: 74 61 6c 6c 61 74 69 6f 6e 2c 20 69 66 20 73 65 tallation, if se
f360: 6c 65 63 74 65 64 2c 20 77 69 6c 6c 20 62 65 20 lected, will be
f370: 69 6e 20 27 24 28 5f 49 4e 53 54 41 4c 4c 44 49 in '$(_INSTALLDI
f380: 52 29 27 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a R)'.!message ***
f390: 20 53 75 66 66 69 78 20 66 6f 72 20 62 69 6e 61 Suffix for bina
f3a0: 72 69 65 73 20 77 69 6c 6c 20 62 65 20 27 24 28 ries will be '$(
f3b0: 53 55 46 58 29 27 0a 21 6d 65 73 73 61 67 65 20 SUFX)'.!message
f3c0: 2a 2a 2a 20 43 6f 6d 70 69 6c 65 72 20 76 65 72 *** Compiler ver
f3d0: 73 69 6f 6e 20 24 28 56 43 56 45 52 29 2e 20 54 sion $(VCVER). T
f3e0: 61 72 67 65 74 20 24 28 4d 41 43 48 49 4e 45 29 arget $(MACHINE)
f3f0: 2c 20 68 6f 73 74 20 24 28 4e 41 54 49 56 45 5f , host $(NATIVE_
f400: 41 52 43 48 29 2e 0a 21 65 6e 64 69 66 0a 0a 21 ARCH)..!endif..!
f410: 65 6e 64 69 66 20 23 20 69 66 64 65 66 20 5f 52 endif # ifdef _R
f420: 55 4c 45 53 5f 56 43 0a ULES_VC.