Artifact
99b1c552190830c7c597cb22360aecc55ad8816d39ae84e4411becf5ba7abd8d:
0000: 23 20 54 68 69 73 20 66 69 6c 65 20 73 68 6f 75 # This file shou
0010: 6c 64 20 6f 6e 6c 79 20 62 65 20 69 6e 63 6c 75 ld only be inclu
0020: 64 65 64 20 69 6e 20 6d 61 6b 65 66 69 6c 65 73 ded in makefiles
0030: 20 66 6f 72 20 54 63 6c 20 65 78 74 65 6e 73 69 for Tcl extensi
0040: 6f 6e 73 2c 0d 0a 23 20 4e 4f 54 20 69 6e 20 74 ons,..# NOT in t
0050: 68 65 20 6d 61 6b 65 66 69 6c 65 20 66 6f 72 20 he makefile for
0060: 54 63 6c 20 69 74 73 65 6c 66 2e 0d 0a 0d 0a 21 Tcl itself.....!
0070: 69 66 6e 64 65 66 20 5f 52 55 4c 45 53 5f 45 58 ifndef _RULES_EX
0080: 54 5f 56 43 0d 0a 0d 0a 23 20 57 65 20 6e 65 65 T_VC....# We nee
0090: 64 20 74 6f 20 72 75 6e 20 66 72 6f 6d 20 74 68 d to run from th
00a0: 65 20 64 69 72 65 63 74 6f 72 79 20 74 68 65 20 e directory the
00b0: 70 61 72 65 6e 74 20 6d 61 6b 65 66 69 6c 65 20 parent makefile
00c0: 69 73 20 6c 6f 63 61 74 65 64 20 69 6e 2e 0d 0a is located in...
00d0: 23 20 6e 6d 61 6b 65 20 64 6f 65 73 20 6e 6f 74 # nmake does not
00e0: 20 74 65 6c 6c 20 75 73 20 77 68 61 74 20 6d 61 tell us what ma
00f0: 6b 65 66 69 6c 65 20 77 61 73 20 75 73 65 64 20 kefile was used
0100: 74 6f 20 69 6e 76 6f 6b 65 20 69 74 20 73 6f 20 to invoke it so
0110: 70 61 72 65 6e 74 0d 0a 23 20 6d 61 6b 65 66 69 parent..# makefi
0120: 6c 65 20 68 61 73 20 74 6f 20 73 65 74 20 74 68 le has to set th
0130: 65 20 4d 41 4b 45 46 49 4c 45 56 43 20 6d 61 63 e MAKEFILEVC mac
0140: 72 6f 20 6f 72 20 77 65 20 6a 75 73 74 20 6d 61 ro or we just ma
0150: 6b 65 20 61 20 67 75 65 73 73 20 61 6e 64 0d 0a ke a guess and..
0160: 23 20 77 61 72 6e 20 69 66 20 77 65 20 74 68 69 # warn if we thi
0170: 6e 6b 20 74 68 61 74 20 69 73 20 6e 6f 74 20 74 nk that is not t
0180: 68 65 20 63 61 73 65 2e 0d 0a 21 69 66 20 22 24 he case...!if "$
0190: 28 4d 41 4b 45 46 49 4c 45 56 43 29 22 20 3d 3d (MAKEFILEVC)" ==
01a0: 20 22 22 0d 0a 0d 0a 21 69 66 20 65 78 69 73 74 ""....!if exist
01b0: 28 22 24 28 50 52 4f 4a 45 43 54 29 2e 76 63 22 ("$(PROJECT).vc"
01c0: 29 0d 0a 4d 41 4b 45 46 49 4c 45 56 43 20 3d 20 )..MAKEFILEVC =
01d0: 24 28 50 52 4f 4a 45 43 54 29 2e 76 63 0d 0a 21 $(PROJECT).vc..!
01e0: 65 6c 73 65 69 66 20 65 78 69 73 74 28 22 6d 61 elseif exist("ma
01f0: 6b 65 66 69 6c 65 2e 76 63 22 29 0d 0a 4d 41 4b kefile.vc")..MAK
0200: 45 46 49 4c 45 56 43 20 3d 20 6d 61 6b 65 66 69 EFILEVC = makefi
0210: 6c 65 2e 76 63 0d 0a 21 65 6e 64 69 66 0d 0a 21 le.vc..!endif..!
0220: 65 6e 64 69 66 20 23 20 22 24 28 4d 41 4b 45 46 endif # "$(MAKEF
0230: 49 4c 45 56 43 29 22 20 3d 3d 20 22 22 0d 0a 0d ILEVC)" == ""...
0240: 0a 21 69 66 20 21 65 78 69 73 74 28 22 24 28 4d .!if !exist("$(M
0250: 41 4b 45 46 49 4c 45 56 43 29 22 29 0d 0a 4d 53 AKEFILEVC)")..MS
0260: 47 20 3d 20 5e 0d 0a 59 6f 75 20 6d 75 73 74 20 G = ^..You must
0270: 72 75 6e 20 6e 6d 61 6b 65 20 66 72 6f 6d 20 74 run nmake from t
0280: 68 65 20 64 69 72 65 63 74 6f 72 79 20 63 6f 6e he directory con
0290: 74 61 69 6e 69 6e 67 20 74 68 65 20 70 72 6f 6a taining the proj
02a0: 65 63 74 20 6d 61 6b 65 66 69 6c 65 2e 5e 0d 0a ect makefile.^..
02b0: 49 66 20 79 6f 75 20 61 72 65 20 64 6f 69 6e 67 If you are doing
02c0: 20 74 68 61 74 20 61 6e 64 20 67 65 74 74 69 6e that and gettin
02d0: 67 20 74 68 69 73 20 6d 65 73 73 61 67 65 2c 20 g this message,
02e0: 73 65 74 20 74 68 65 20 4d 41 4b 45 46 49 4c 45 set the MAKEFILE
02f0: 56 43 5e 0d 0a 6d 61 63 72 6f 20 74 6f 20 74 68 VC^..macro to th
0300: 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 70 72 e name of the pr
0310: 6f 6a 65 63 74 20 6d 61 6b 65 66 69 6c 65 2e 0d oject makefile..
0320: 0a 21 6d 65 73 73 61 67 65 20 57 41 52 4e 49 4e .!message WARNIN
0330: 47 3a 20 24 28 4d 53 47 29 0d 0a 21 65 6e 64 69 G: $(MSG)..!endi
0340: 66 0d 0a 0d 0a 21 69 66 20 22 24 28 50 52 4f 4a f....!if "$(PROJ
0350: 45 43 54 29 22 20 3d 3d 20 22 74 63 6c 22 0d 0a ECT)" == "tcl"..
0360: 21 65 72 72 6f 72 20 54 68 65 20 72 75 6c 65 73 !error The rules
0370: 2d 65 78 74 2e 76 63 20 66 69 6c 65 20 69 73 20 -ext.vc file is
0380: 6e 6f 74 20 69 6e 74 65 6e 64 65 64 20 66 6f 72 not intended for
0390: 20 54 63 6c 20 69 74 73 65 6c 66 2e 0d 0a 21 65 Tcl itself...!e
03a0: 6e 64 69 66 0d 0a 0d 0a 23 20 57 65 20 65 78 74 ndif....# We ext
03b0: 72 61 63 74 20 76 65 72 73 69 6f 6e 20 6e 75 6d ract version num
03c0: 62 65 72 73 20 75 73 69 6e 67 20 74 68 65 20 6e bers using the n
03d0: 6d 61 6b 65 68 6c 70 20 70 72 6f 67 72 61 6d 2e makehlp program.
03e0: 20 46 6f 72 20 6e 6f 77 20 75 73 65 0d 0a 23 20 For now use..#
03f0: 74 68 65 20 6c 6f 63 61 6c 20 63 6f 70 79 20 6f the local copy o
0400: 66 20 6e 6d 61 6b 65 68 6c 70 2e 20 4f 6e 63 65 f nmakehlp. Once
0410: 20 77 65 20 6c 6f 63 61 74 65 20 54 63 6c 2c 20 we locate Tcl,
0420: 77 65 20 77 69 6c 6c 20 75 73 65 20 74 68 61 74 we will use that
0430: 0d 0a 23 20 6f 6e 65 20 69 66 20 69 74 20 69 73 ..# one if it is
0440: 20 6e 65 77 65 72 2e 0d 0a 21 69 66 20 5b 24 28 newer...!if [$(
0450: 43 43 29 20 2d 6e 6f 6c 6f 67 6f 20 2d 44 4e 44 CC) -nologo -DND
0460: 45 42 55 47 20 22 6e 6d 61 6b 65 68 6c 70 2e 63 EBUG "nmakehlp.c
0470: 22 20 2d 6c 69 6e 6b 20 2d 73 75 62 73 79 73 74 " -link -subsyst
0480: 65 6d 3a 63 6f 6e 73 6f 6c 65 20 3e 20 6e 75 6c em:console > nul
0490: 5d 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 23 20 57 ]..!endif....# W
04a0: 65 20 6e 65 65 64 20 61 20 6e 6d 61 6b 65 68 6c e need a nmakehl
04b0: 70 20 74 68 61 74 20 77 69 6c 6c 20 72 75 6e 20 p that will run
04c0: 6f 6e 20 74 68 65 20 68 6f 73 74 20 6d 61 63 68 on the host mach
04d0: 69 6e 65 20 61 73 20 70 61 72 74 20 6f 66 20 74 ine as part of t
04e0: 68 65 20 62 75 69 6c 64 2e 0d 0a 23 20 69 66 20 he build...# if
04f0: 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 69 73 20 TCLSH_NATIVE is
0500: 73 65 74 20 66 6f 72 20 63 72 6f 73 73 20 63 6f set for cross co
0510: 6d 70 69 6c 61 74 69 6f 6e 2c 20 77 65 27 6c 6c mpilation, we'll
0520: 20 74 72 79 20 74 6f 20 66 69 6e 64 20 61 6e 20 try to find an
0530: 61 73 73 6f 63 69 61 74 65 64 0d 0a 23 20 6e 6d associated..# nm
0540: 61 6b 65 68 6c 70 2e 65 78 65 20 74 68 61 74 20 akehlp.exe that
0550: 72 75 6e 73 20 6f 6e 20 74 68 65 20 62 75 69 6c runs on the buil
0560: 64 20 61 72 63 68 69 74 65 63 74 75 72 65 2e 0d d architecture..
0570: 0a 21 69 66 64 65 66 20 54 43 4c 53 48 5f 4e 41 .!ifdef TCLSH_NA
0580: 54 49 56 45 0d 0a 21 69 66 6e 64 65 66 20 4e 4d TIVE..!ifndef NM
0590: 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 0d 0a 21 AKEHLP_NATIVE..!
05a0: 69 66 20 5b 24 28 54 43 4c 53 48 5f 4e 41 54 49 if [$(TCLSH_NATI
05b0: 56 45 29 20 24 28 54 43 4c 44 49 52 29 5c 77 69 VE) $(TCLDIR)\wi
05c0: 6e 5c 66 69 6e 64 5f 6e 6d 61 6b 65 68 6c 70 2e n\find_nmakehlp.
05d0: 74 63 6c 20 24 28 54 43 4c 53 48 5f 4e 41 54 49 tcl $(TCLSH_NATI
05e0: 56 45 29 20 3e 20 66 69 6e 64 5f 6e 6d 61 6b 65 VE) > find_nmake
05f0: 68 6c 70 2e 6f 75 74 5d 0d 0a 21 65 72 72 6f 72 hlp.out]..!error
0600: 20 54 43 4c 53 48 5f 4e 41 54 49 56 45 20 69 73 TCLSH_NATIVE is
0610: 20 73 65 74 2c 20 62 75 74 20 75 6e 61 62 6c 65 set, but unable
0620: 20 74 6f 20 66 69 6e 64 20 61 73 73 6f 63 69 61 to find associa
0630: 74 65 64 20 6e 6d 61 6b 65 68 6c 70 2e 65 78 65 ted nmakehlp.exe
0640: 20 6e 65 61 72 62 79 2e 0d 0a 21 65 6c 73 65 0d nearby...!else.
0650: 0a 21 69 6e 63 6c 75 64 65 20 66 69 6e 64 5f 6e .!include find_n
0660: 6d 61 6b 65 68 6c 70 2e 6f 75 74 0d 0a 21 65 6e makehlp.out..!en
0670: 64 69 66 0d 0a 21 65 6e 64 69 66 0d 0a 21 65 6e dif..!endif..!en
0680: 64 69 66 0d 0a 0d 0a 21 69 66 6e 64 65 66 20 4e dif....!ifndef N
0690: 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 0d 0a MAKEHLP_NATIVE..
06a0: 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 3d NMAKEHLP_NATIVE=
06b0: 6e 6d 61 6b 65 68 6c 70 0d 0a 21 65 6e 64 69 66 nmakehlp..!endif
06c0: 0d 0a 0d 0a 23 20 46 69 72 73 74 20 6c 6f 63 61 ....# First loca
06d0: 74 65 20 74 68 65 20 54 63 6c 20 64 69 72 65 63 te the Tcl direc
06e0: 74 6f 72 79 20 74 68 61 74 20 77 65 20 61 72 65 tory that we are
06f0: 20 77 6f 72 6b 69 6e 67 20 77 69 74 68 2e 0d 0a working with...
0700: 21 69 66 20 22 24 28 54 43 4c 44 49 52 29 22 20 !if "$(TCLDIR)"
0710: 21 3d 20 22 22 0d 0a 0d 0a 5f 52 55 4c 45 53 44 != ""...._RULESD
0720: 49 52 20 3d 20 24 28 54 43 4c 44 49 52 3a 2f 3d IR = $(TCLDIR:/=
0730: 5c 29 0d 0a 0d 0a 21 65 6c 73 65 0d 0a 0d 0a 23 \)....!else....#
0740: 20 49 66 20 61 6e 20 69 6e 73 74 61 6c 6c 61 74 If an installat
0750: 69 6f 6e 20 70 61 74 68 20 69 73 20 73 70 65 63 ion path is spec
0760: 69 66 69 65 64 2c 20 74 68 61 74 20 69 73 20 61 ified, that is a
0770: 6c 73 6f 20 74 68 65 20 54 63 6c 20 64 69 72 65 lso the Tcl dire
0780: 63 74 6f 72 79 2e 0d 0a 23 20 41 6c 73 6f 20 54 ctory...# Also T
0790: 6b 20 6e 65 76 65 72 20 62 75 69 6c 64 73 20 61 k never builds a
07a0: 67 61 69 6e 73 74 20 61 6e 20 69 6e 73 74 61 6c gainst an instal
07b0: 6c 65 64 20 54 63 6c 2c 20 69 74 20 6e 65 65 64 led Tcl, it need
07c0: 73 20 54 63 6c 20 73 6f 75 72 63 65 73 0d 0a 21 s Tcl sources..!
07d0: 69 66 20 64 65 66 69 6e 65 64 28 49 4e 53 54 41 if defined(INSTA
07e0: 4c 4c 44 49 52 29 20 26 26 20 22 24 28 50 52 4f LLDIR) && "$(PRO
07f0: 4a 45 43 54 29 22 20 21 3d 20 22 74 6b 22 0d 0a JECT)" != "tk"..
0800: 5f 52 55 4c 45 53 44 49 52 3d 24 28 49 4e 53 54 _RULESDIR=$(INST
0810: 41 4c 4c 44 49 52 3a 2f 3d 5c 29 0d 0a 21 65 6c ALLDIR:/=\)..!el
0820: 73 65 0d 0a 23 20 4c 6f 63 61 74 65 20 54 63 6c se..# Locate Tcl
0830: 20 73 6f 75 72 63 65 73 0d 0a 21 69 66 20 5b 65 sources..!if [e
0840: 63 68 6f 20 5f 52 55 4c 45 53 44 49 52 20 3d 20 cho _RULESDIR =
0850: 5c 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d \> nmakehlp.out]
0860: 20 5c 0d 0a 20 20 20 7c 7c 20 5b 24 28 4e 4d 41 \.. || [$(NMA
0870: 4b 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 4c KEHLP_NATIVE) -L
0880: 20 67 65 6e 65 72 69 63 5c 74 63 6c 2e 68 20 3e generic\tcl.h >
0890: 3e 20 6e 6d 61 6b 65 68 6c 70 2e 6f 75 74 5d 0d > nmakehlp.out].
08a0: 0a 5f 52 55 4c 45 53 44 49 52 20 3d 20 2e 2e 5c ._RULESDIR = ..\
08b0: 2e 2e 5c 74 63 6c 0d 0a 21 65 6c 73 65 0d 0a 21 ..\tcl..!else..!
08c0: 69 6e 63 6c 75 64 65 20 6e 6d 61 6b 65 68 6c 70 include nmakehlp
08d0: 2e 6f 75 74 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a .out..!endif....
08e0: 21 65 6e 64 69 66 20 23 20 64 65 66 69 6e 65 64 !endif # defined
08f0: 28 49 4e 53 54 41 4c 4c 44 49 52 29 2e 2e 2e 2e (INSTALLDIR)....
0900: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 69 66 6e ....!endif # ifn
0910: 64 65 66 20 54 43 4c 44 49 52 0d 0a 0d 0a 23 20 def TCLDIR....#
0920: 4e 6f 77 20 6c 6f 6f 6b 20 66 6f 72 20 74 68 65 Now look for the
0930: 20 74 61 72 67 65 74 73 2e 76 63 20 66 69 6c 65 targets.vc file
0940: 20 75 6e 64 65 72 20 74 68 65 20 54 63 6c 20 72 under the Tcl r
0950: 6f 6f 74 2e 20 4e 6f 74 65 20 77 65 20 63 68 65 oot. Note we che
0960: 63 6b 20 74 68 69 73 0d 0a 23 20 66 69 6c 65 20 ck this..# file
0970: 61 6e 64 20 6e 6f 74 20 72 75 6c 65 73 2e 76 63 and not rules.vc
0980: 20 62 65 63 61 75 73 65 20 74 68 65 20 6c 61 74 because the lat
0990: 74 65 72 20 61 6c 73 6f 20 65 78 69 73 74 73 20 ter also exists
09a0: 6f 6e 20 6f 6c 64 65 72 20 73 79 73 74 65 6d 73 on older systems
09b0: 2e 0d 0a 21 69 66 20 65 78 69 73 74 28 22 24 28 ...!if exist("$(
09c0: 5f 52 55 4c 45 53 44 49 52 29 5c 6c 69 62 5c 6e _RULESDIR)\lib\n
09d0: 6d 61 6b 65 5c 74 61 72 67 65 74 73 2e 76 63 22 make\targets.vc"
09e0: 29 20 23 20 42 75 69 6c 64 69 6e 67 20 61 67 61 ) # Building aga
09f0: 69 6e 73 74 20 69 6e 73 74 61 6c 6c 65 64 20 54 inst installed T
0a00: 63 6c 0d 0a 5f 52 55 4c 45 53 44 49 52 20 3d 20 cl.._RULESDIR =
0a10: 24 28 5f 52 55 4c 45 53 44 49 52 29 5c 6c 69 62 $(_RULESDIR)\lib
0a20: 5c 6e 6d 61 6b 65 0d 0a 21 65 6c 73 65 69 66 20 \nmake..!elseif
0a30: 65 78 69 73 74 28 22 24 28 5f 52 55 4c 45 53 44 exist("$(_RULESD
0a40: 49 52 29 5c 77 69 6e 5c 74 61 72 67 65 74 73 2e IR)\win\targets.
0a50: 76 63 22 29 20 20 20 23 20 42 75 69 6c 64 69 6e vc") # Buildin
0a60: 67 20 61 67 61 69 6e 73 74 20 54 63 6c 20 73 6f g against Tcl so
0a70: 75 72 63 65 73 0d 0a 5f 52 55 4c 45 53 44 49 52 urces.._RULESDIR
0a80: 20 3d 20 24 28 5f 52 55 4c 45 53 44 49 52 29 5c = $(_RULESDIR)\
0a90: 77 69 6e 0d 0a 21 65 6c 73 65 0d 0a 23 20 49 66 win..!else..# If
0aa0: 20 77 65 20 68 61 76 65 20 6e 6f 74 20 6c 6f 63 we have not loc
0ab0: 61 74 65 64 20 54 63 6c 27 73 20 74 61 72 67 65 ated Tcl's targe
0ac0: 74 73 20 66 69 6c 65 2c 20 6d 6f 73 74 20 6c 69 ts file, most li
0ad0: 6b 65 6c 79 20 77 65 20 61 72 65 20 63 6f 6d 70 kely we are comp
0ae0: 69 6c 69 6e 67 0d 0a 23 20 61 67 61 69 6e 73 74 iling..# against
0af0: 20 61 6e 20 6f 6c 64 65 72 20 76 65 72 73 69 6f an older versio
0b00: 6e 20 6f 66 20 54 63 6c 20 61 6e 64 20 73 6f 20 n of Tcl and so
0b10: 6d 75 73 74 20 75 73 65 20 6f 75 72 20 6f 77 6e must use our own
0b20: 20 73 75 70 70 6f 72 74 20 66 69 6c 65 73 2e 0d support files..
0b30: 0a 5f 52 55 4c 45 53 44 49 52 20 3d 20 2e 0d 0a ._RULESDIR = ...
0b40: 21 65 6e 64 69 66 0d 0a 0d 0a 21 69 66 20 22 24 !endif....!if "$
0b50: 28 5f 52 55 4c 45 53 44 49 52 29 22 20 21 3d 20 (_RULESDIR)" !=
0b60: 22 2e 22 0d 0a 23 20 50 6f 74 65 6e 74 69 61 6c "."..# Potential
0b70: 6c 79 20 75 73 69 6e 67 20 54 63 6c 27 73 20 73 ly using Tcl's s
0b80: 75 70 70 6f 72 74 20 66 69 6c 65 73 2e 20 49 66 upport files. If
0b90: 20 74 68 69 73 20 65 78 74 65 6e 73 69 6f 6e 20 this extension
0ba0: 68 61 73 20 69 74 73 20 6f 77 6e 0d 0a 23 20 6e has its own..# n
0bb0: 6d 61 6b 65 20 73 75 70 70 6f 72 74 20 66 69 6c make support fil
0bc0: 65 73 2c 20 6e 65 65 64 20 74 6f 20 63 6f 6d 70 es, need to comp
0bd0: 61 72 65 20 74 68 65 20 76 65 72 73 69 6f 6e 73 are the versions
0be0: 20 61 6e 64 20 70 69 63 6b 20 6e 65 77 65 72 2e and pick newer.
0bf0: 0d 0a 0d 0a 21 69 66 20 65 78 69 73 74 28 22 72 ....!if exist("r
0c00: 75 6c 65 73 2e 76 63 22 29 20 23 20 54 68 65 20 ules.vc") # The
0c10: 65 78 74 65 6e 73 69 6f 6e 20 68 61 73 20 69 74 extension has it
0c20: 73 20 6f 77 6e 20 63 6f 70 79 0d 0a 0d 0a 21 69 s own copy....!i
0c30: 66 20 5b 65 63 68 6f 20 54 43 4c 5f 52 55 4c 45 f [echo TCL_RULE
0c40: 53 5f 4d 41 4a 4f 52 20 3d 20 5c 3e 20 76 65 72 S_MAJOR = \> ver
0c50: 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 20 20 sions.vc] \..
0c60: 26 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 5f 4e && [$(NMAKEHLP_N
0c70: 41 54 49 56 45 29 20 2d 56 20 22 24 28 5f 52 55 ATIVE) -V "$(_RU
0c80: 4c 45 53 44 49 52 29 5c 72 75 6c 65 73 2e 76 63 LESDIR)\rules.vc
0c90: 22 20 52 55 4c 45 53 5f 56 45 52 53 49 4f 4e 5f " RULES_VERSION_
0ca0: 4d 41 4a 4f 52 20 3e 3e 20 76 65 72 73 69 6f 6e MAJOR >> version
0cb0: 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 s.vc]..!endif..!
0cc0: 69 66 20 5b 65 63 68 6f 20 54 43 4c 5f 52 55 4c if [echo TCL_RUL
0cd0: 45 53 5f 4d 49 4e 4f 52 20 3d 20 5c 3e 3e 20 76 ES_MINOR = \>> v
0ce0: 65 72 73 69 6f 6e 73 2e 76 63 5d 20 5c 0d 0a 20 ersions.vc] \..
0cf0: 20 20 26 26 20 5b 24 28 4e 4d 41 4b 45 48 4c 50 && [$(NMAKEHLP
0d00: 5f 4e 41 54 49 56 45 29 20 2d 56 20 22 24 28 5f _NATIVE) -V "$(_
0d10: 52 55 4c 45 53 44 49 52 29 5c 72 75 6c 65 73 2e RULESDIR)\rules.
0d20: 76 63 22 20 52 55 4c 45 53 5f 56 45 52 53 49 4f vc" RULES_VERSIO
0d30: 4e 5f 4d 49 4e 4f 52 20 3e 3e 20 76 65 72 73 69 N_MINOR >> versi
0d40: 6f 6e 73 2e 76 63 5d 0d 0a 21 65 6e 64 69 66 0d ons.vc]..!endif.
0d50: 0a 0d 0a 21 69 66 20 5b 65 63 68 6f 20 4f 55 52 ...!if [echo OUR
0d60: 5f 52 55 4c 45 53 5f 4d 41 4a 4f 52 20 3d 20 5c _RULES_MAJOR = \
0d70: 3e 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 20 >> versions.vc]
0d80: 5c 0d 0a 20 20 20 26 26 20 5b 24 28 4e 4d 41 4b \.. && [$(NMAK
0d90: 45 48 4c 50 5f 4e 41 54 49 56 45 29 20 2d 56 20 EHLP_NATIVE) -V
0da0: 22 72 75 6c 65 73 2e 76 63 22 20 52 55 4c 45 53 "rules.vc" RULES
0db0: 5f 56 45 52 53 49 4f 4e 5f 4d 41 4a 4f 52 20 3e _VERSION_MAJOR >
0dc0: 3e 20 76 65 72 73 69 6f 6e 73 2e 76 63 5d 0d 0a > versions.vc]..
0dd0: 21 65 6e 64 69 66 0d 0a 21 69 66 20 5b 65 63 68 !endif..!if [ech
0de0: 6f 20 4f 55 52 5f 52 55 4c 45 53 5f 4d 49 4e 4f o OUR_RULES_MINO
0df0: 52 20 3d 20 5c 3e 3e 20 76 65 72 73 69 6f 6e 73 R = \>> versions
0e00: 2e 76 63 5d 20 5c 0d 0a 20 20 20 26 26 20 5b 24 .vc] \.. && [$
0e10: 28 4e 4d 41 4b 45 48 4c 50 5f 4e 41 54 49 56 45 (NMAKEHLP_NATIVE
0e20: 29 20 2d 56 20 22 72 75 6c 65 73 2e 76 63 22 20 ) -V "rules.vc"
0e30: 52 55 4c 45 53 5f 56 45 52 53 49 4f 4e 5f 4d 49 RULES_VERSION_MI
0e40: 4e 4f 52 20 3e 3e 20 76 65 72 73 69 6f 6e 73 2e NOR >> versions.
0e50: 76 63 5d 0d 0a 21 65 6e 64 69 66 0d 0a 21 69 6e vc]..!endif..!in
0e60: 63 6c 75 64 65 20 76 65 72 73 69 6f 6e 73 2e 76 clude versions.v
0e70: 63 0d 0a 23 20 57 65 20 68 61 76 65 20 61 20 6e c..# We have a n
0e80: 65 77 65 72 20 76 65 72 73 69 6f 6e 20 6f 66 20 ewer version of
0e90: 74 68 65 20 73 75 70 70 6f 72 74 20 66 69 6c 65 the support file
0ea0: 73 2c 20 75 73 65 20 74 68 65 6d 0d 0a 21 69 66 s, use them..!if
0eb0: 20 28 24 28 54 43 4c 5f 52 55 4c 45 53 5f 4d 41 ($(TCL_RULES_MA
0ec0: 4a 4f 52 29 20 21 3d 20 24 28 4f 55 52 5f 52 55 JOR) != $(OUR_RU
0ed0: 4c 45 53 5f 4d 41 4a 4f 52 29 29 20 7c 7c 20 28 LES_MAJOR)) || (
0ee0: 24 28 54 43 4c 5f 52 55 4c 45 53 5f 4d 49 4e 4f $(TCL_RULES_MINO
0ef0: 52 29 20 3c 20 24 28 4f 55 52 5f 52 55 4c 45 53 R) < $(OUR_RULES
0f00: 5f 4d 49 4e 4f 52 29 29 0d 0a 5f 52 55 4c 45 53 _MINOR)).._RULES
0f10: 44 49 52 20 3d 20 2e 0d 0a 21 65 6e 64 69 66 0d DIR = ...!endif.
0f20: 0a 0d 0a 21 65 6e 64 69 66 20 23 20 69 66 20 65 ...!endif # if e
0f30: 78 69 73 74 28 22 72 75 6c 65 73 2e 76 63 22 29 xist("rules.vc")
0f40: 0d 0a 0d 0a 21 65 6e 64 69 66 20 23 20 69 66 20 ....!endif # if
0f50: 24 28 5f 52 55 4c 45 53 44 49 52 29 20 21 3d 20 $(_RULESDIR) !=
0f60: 22 2e 22 0d 0a 0d 0a 23 20 4c 65 74 20 72 75 6c "."....# Let rul
0f70: 65 73 2e 76 63 20 6b 6e 6f 77 20 77 68 61 74 20 es.vc know what
0f80: 63 6f 70 79 20 6f 66 20 6e 6d 61 6b 65 68 6c 70 copy of nmakehlp
0f90: 2e 63 20 74 6f 20 75 73 65 2e 0d 0a 4e 4d 41 4b .c to use...NMAK
0fa0: 45 48 4c 50 43 20 3d 20 24 28 5f 52 55 4c 45 53 EHLPC = $(_RULES
0fb0: 44 49 52 29 5c 6e 6d 61 6b 65 68 6c 70 2e 63 0d DIR)\nmakehlp.c.
0fc0: 0a 0d 0a 23 20 47 65 74 20 72 69 64 20 6f 66 20 ...# Get rid of
0fd0: 6f 75 72 20 69 6e 74 65 72 6e 61 6c 20 64 65 66 our internal def
0fe0: 69 6e 65 73 20 62 65 66 6f 72 65 20 63 61 6c 6c ines before call
0ff0: 69 6e 67 20 72 75 6c 65 73 2e 76 63 0d 0a 21 75 ing rules.vc..!u
1000: 6e 64 65 66 20 54 43 4c 5f 52 55 4c 45 53 5f 4d ndef TCL_RULES_M
1010: 41 4a 4f 52 0d 0a 21 75 6e 64 65 66 20 54 43 4c AJOR..!undef TCL
1020: 5f 52 55 4c 45 53 5f 4d 49 4e 4f 52 0d 0a 21 75 _RULES_MINOR..!u
1030: 6e 64 65 66 20 4f 55 52 5f 52 55 4c 45 53 5f 4d ndef OUR_RULES_M
1040: 41 4a 4f 52 0d 0a 21 75 6e 64 65 66 20 4f 55 52 AJOR..!undef OUR
1050: 5f 52 55 4c 45 53 5f 4d 49 4e 4f 52 0d 0a 0d 0a _RULES_MINOR....
1060: 21 69 66 20 65 78 69 73 74 28 22 24 28 5f 52 55 !if exist("$(_RU
1070: 4c 45 53 44 49 52 29 5c 72 75 6c 65 73 2e 76 63 LESDIR)\rules.vc
1080: 22 29 0d 0a 21 69 6e 63 6c 75 64 65 20 22 24 28 ")..!include "$(
1090: 5f 52 55 4c 45 53 44 49 52 29 5c 72 75 6c 65 73 _RULESDIR)\rules
10a0: 2e 76 63 22 0d 0a 21 69 66 6e 64 65 66 20 56 45 .vc"..!ifndef VE
10b0: 52 42 4f 53 45 0d 0a 23 20 42 61 63 6b 77 61 72 RBOSE..# Backwar
10c0: 64 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 0d d compatibility.
10d0: 0a 56 45 52 42 4f 53 45 3d 31 0d 0a 21 65 6e 64 .VERBOSE=1..!end
10e0: 69 66 0d 0a 21 69 66 20 24 28 56 45 52 42 4f 53 if..!if $(VERBOS
10f0: 45 29 0d 0a 21 6d 65 73 73 61 67 65 20 2a 2a 2a E)..!message ***
1100: 20 55 73 69 6e 67 20 24 28 5f 52 55 4c 45 53 44 Using $(_RULESD
1110: 49 52 29 5c 72 75 6c 65 73 2e 76 63 0d 0a 21 65 IR)\rules.vc..!e
1120: 6e 64 69 66 0d 0a 21 65 6c 73 65 0d 0a 21 65 72 ndif..!else..!er
1130: 72 6f 72 20 2a 2a 2a 20 43 6f 75 6c 64 20 6e 6f ror *** Could no
1140: 74 20 6c 6f 63 61 74 65 20 72 75 6c 65 73 2e 76 t locate rules.v
1150: 63 20 69 6e 20 24 28 5f 52 55 4c 45 53 44 49 52 c in $(_RULESDIR
1160: 29 0d 0a 21 65 6e 64 69 66 0d 0a 0d 0a 21 65 6e )..!endif....!en
1170: 64 69 66 20 23 20 5f 52 55 4c 45 53 5f 45 58 54 dif # _RULES_EXT
1180: 5f 56 43 0d 0a _VC..