Debian Codegraph @

win/makefile.vc

raw
1 #------------------------------------------------------------- -*- makefile -*-
2 #
3 # Microsoft Visual C++ makefile for building Tcl with nmake
4 #
5 # See the file "license.terms" for information on usage and redistribution
6 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7 #
8 # Copyright (c) 1995-1996 Sun Microsystems, Inc.
9 # Copyright (c) 1998-2000 Ajuba Solutions.
10 # Copyright (c) 2001-2005 ActiveState Corporation.
11 # Copyright (c) 2001-2004 David Gravereaux.
12 # Copyright (c) 2003-2008 Pat Thoyts.
13 # Copyright (c) 2017 Ashok P. Nadkarni
14 #------------------------------------------------------------------------------
15
16 # General usage:
17 # nmake [-nologo] -f makefile.vc [TARGET|MACRODEF [TARGET|MACRODEF] [...]]
18 #
19 # For MACRODEF, see TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md)
20 # or examine Sections 7-9 in rules.vc.
21 #
22 # Possible values for TARGET are:
23 # release -- Builds everything that ships with a release. (default)
24 # core -- Builds the core [tclXX.(dll|lib)]
25 # shell -- Builds tclsh and the core.
26 # dlls -- Just builds the windows extensions.
27 # all -- Builds everything.
28 # test -- Builds and runs the test suite.
29 # tcltest -- Just builds the test shell.
30 # install -- Installs the built binaries and libraries to $(INSTALLDIR)
31 # as the root of the install tree.
32 # tidy/clean/hose -- varying levels of cleaning.
33 # genstubs -- Rebuilds the Stubs table and support files (dev only).
34 # depend -- Generates an accurate set of source dependancies for this
35 # makefile. Helpful to avoid problems when the sources are
36 # refreshed and you rebuild, but can "overbuild" when common
37 # headers like tclInt.h just get small changes.
38 # htmlhelp -- Builds a Windows .chm help file for Tcl and Tk from the
39 # troff manual pages found in $(ROOT)\doc. You need to
40 # have installed the HTML Help Compiler package from Microsoft
41 # to produce the .chm file.
42 #
43 # The steps to setup a Visual C++ environment depend on which
44 # version of Visual Studio and/or the Windows SDK you are building
45 # against and are not described here. The simplest method is generally
46 # to start a command shell using one of the short cuts installed by
47 # Visual Studio/Windows SDK for the appropriate target architecture.
48 #
49 # NOTE: For older (Visual C++ 6 or the 2003 SDK), to use the Platform
50 # SDK (not expressly needed), run setenv.bat after vcvars32.bat
51 # according to the instructions for it. This can also turn on the
52 # 64-bit compiler, if your SDK has it.
53 #
54 # Basic macros and options usable on the commandline (see rules.vc for more info):
55 # OPTS=msvcrt,nothreads,pdbs,profile,static,staticpkg,symbols,thrdalloc,time64bit,unchecked,none
56 # Sets special options for the core. The default is for none.
57 # Any combination of the above may be used (comma separated).
58 # 'none' will over-ride everything to nothing.
59 #
60 # msvcrt = Affects the static option only to switch it from
61 # using libcmt(d) as the C runtime [by default] to
62 # msvcrt(d). This is useful for static embedding
63 # support.
64 # none = Overrides all other options to nothing.
65 # nothreads = Turns off full multithreading support (default on).
66 # pdbs = Produce separate debug symbol files.
67 # profile = Adds profiling hooks. Map file is assumed.
68 # static = Builds a static library of the core instead of a
69 # dll. The shell will be static (and large), as well.
70 # staticpkg = Affects the static option only to switch
71 # tclshXX.exe to have the dde and reg extension linked
72 # inside it.
73 # symbols = Adds symbols for step debugging.
74 # thrdalloc = Use the thread allocator (shared global free pool).
75 # time64bit = Forces a build using 64-bit time_t for 32-bit build
76 # (CRT library should support this).
77 # unchecked = Allows a symbols build to not use the debug
78 # enabled runtime (msvcrt.dll not msvcrtd.dll
79 # or libcmt.lib not libcmtd.lib).
80 #
81 # STATS=compdbg,memdbg,none
82 # Sets optional memory and bytecode compiler debugging code added
83 # to the core. The default is for none. Any combination of the
84 # above may be used (comma separated). 'none' will over-ride
85 # everything to nothing.
86 #
87 # compdbg = Enables byte compilation logging.
88 # memdbg = Enables the debugging memory allocator.
89 #
90 # CHECKS=64bit,fullwarn,nodep,none
91 # Sets special macros for checking compatibility.
92 #
93 # 64bit = Enable 64bit portability warnings (if available)
94 # fullwarn = Builds with full compiler and link warnings enabled.
95 # Very verbose.
96 # nodep = Turns off compatibility macros to ensure the core
97 # isn't being built with deprecated functions.
98 #
99 # MACHINE=(ALPHA|AMD64|ARM64|IA64|IX86)
100 # Set the machine type used for the compiler, linker, and
101 # resource compiler. This hook is needed to tell the tools
102 # when alternate platforms are requested. IX86 is the default
103 # when not specified. If the CPU environment variable has been
104 # set (ie: recent Platform SDK) then MACHINE is set from CPU.
105 #
106 # TMP_DIR=<path>
107 # OUT_DIR=<path>
108 # Hooks to allow the intermediate and output directories to be
109 # changed. $(OUT_DIR) is assumed to be
110 # $(BINROOT)\(Release|Debug) based on if symbols are requested.
111 # $(TMP_DIR) will be $(OUT_DIR)\<buildtype> by default.
112 #
113 # TESTPAT=<file>
114 # Reads the tests requested to be run from this file.
115 #
116 # Examples:
117 # c:\tcl_src\win\>nmake -f makefile.vc release
118 # c:\tcl_src\win\>nmake -f makefile.vc test
119 # c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
120 # c:\tcl_src\win\>nmake -f makefile.vc release OPTS=pdbs
121 # c:\tcl_src\win\>nmake -f makefile.vc release OPTS=symbols
122 #
123
124 # NOTE:
125 # Before modifying this file, check whether the modification is applicable
126 # to building extensions as well and if so, modify rules.vc instead.
127
128 # The PROJECT macro is used by rules.vc for generating appropriate
129 # macros and rules.
130 PROJECT = tcl
131
132 # Default target to build if no target is specified. If unspecified, the
133 # rules.vc file will set up "all" as the target.
134 DEFAULT_BUILD_TARGET = release
135
136 # We have a custom resource file
137 RCFILE = tcl.rc
138
139 # The rules.vc file does much of the hard work in terms of defining
140 # the build configuration, macros, output directories etc.
141 !include "rules.vc"
142
143 # Tcl version info based on macros set up by rules.vc
144 DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
145 VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
146
147 # We need versions of various core packages to generate appropriate
148 # file names during installation.
149 !if [echo REM = This file is generated from makefile.vc > versions.vc]
150 !endif
151 !if [echo PKG_HTTP_VER = \>> versions.vc] \
152 && [nmakehlp -V ..\library\http\pkgIndex.tcl http >> versions.vc]
153 !endif
154 !if [echo PKG_OPT_VER = \>> versions.vc] \
155 && [nmakehlp -V ..\library\opt\pkgIndex.tcl opt >> versions.vc]
156 !endif
157 !if [echo PKG_TCLTEST_VER = \>> versions.vc] \
158 && [nmakehlp -V ..\library\tcltest\pkgIndex.tcl tcltest >> versions.vc]
159 !endif
160 !if [echo PKG_MSGCAT_VER = \>> versions.vc] \
161 && [nmakehlp -V ..\library\msgcat\pkgIndex.tcl msgcat >> versions.vc]
162 !endif
163 !if [echo PKG_PLATFORM_VER = \>> versions.vc] \
164 && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform " >> versions.vc]
165 !endif
166 !if [echo PKG_SHELL_VER = \>> versions.vc] \
167 && [nmakehlp -V ..\library\platform\pkgIndex.tcl "platform::shell" >> versions.vc]
168 !endif
169 !if [echo PKG_DDE_VER = \>> versions.vc] \
170 && [nmakehlp -V ..\library\dde\pkgIndex.tcl "dde " >> versions.vc]
171 !endif
172 !if [echo PKG_REG_VER =\>> versions.vc] \
173 && [nmakehlp -V ..\library\reg\pkgIndex.tcl "registry " >> versions.vc]
174 !endif
175
176 !include versions.vc
177
178 DDEDOTVERSION = 1.4
179 DDEVERSION = $(DDEDOTVERSION:.=)
180
181 REGDOTVERSION = 1.3
182 REGVERSION = $(REGDOTVERSION:.=)
183
184 TCLREGLIBNAME = $(PROJECT)reg$(REGVERSION)$(SUFX:t=).$(EXT)
185 TCLREGLIB = $(OUT_DIR)\$(TCLREGLIBNAME)
186
187 TCLDDELIBNAME = $(PROJECT)dde$(DDEVERSION)$(SUFX:t=).$(EXT)
188 TCLDDELIB = $(OUT_DIR)\$(TCLDDELIBNAME)
189
190 TCLTEST = $(OUT_DIR)\$(PROJECT)test$(VERSION)$(SUFX:t=).exe
191 CAT32 = $(OUT_DIR)\cat32.exe
192
193 TCLSHOBJS = \
194 $(TMP_DIR)\tclAppInit.obj \
195 !if !$(STATIC_BUILD)
196 !if $(TCL_USE_STATIC_PACKAGES)
197 $(TMP_DIR)\tclWinReg.obj \
198 $(TMP_DIR)\tclWinDde.obj \
199 !endif
200 !endif
201 $(TMP_DIR)\tclsh.res
202
203 TCLTESTOBJS = \
204 $(TMP_DIR)\tclTest.obj \
205 $(TMP_DIR)\tclTestObj.obj \
206 $(TMP_DIR)\tclTestProcBodyObj.obj \
207 $(TMP_DIR)\tclThreadTest.obj \
208 $(TMP_DIR)\tclWinTest.obj \
209 !if !$(STATIC_BUILD)
210 !if $(TCL_USE_STATIC_PACKAGES)
211 $(TMP_DIR)\tclWinReg.obj \
212 $(TMP_DIR)\tclWinDde.obj \
213 !endif
214 !endif
215 $(TMP_DIR)\testMain.obj \
216 $(TMP_DIR)\tcltest.res
217
218 COREOBJS = \
219 $(TMP_DIR)\regcomp.obj \
220 $(TMP_DIR)\regerror.obj \
221 $(TMP_DIR)\regexec.obj \
222 $(TMP_DIR)\regfree.obj \
223 $(TMP_DIR)\tclAlloc.obj \
224 $(TMP_DIR)\tclAssembly.obj \
225 $(TMP_DIR)\tclAsync.obj \
226 $(TMP_DIR)\tclBasic.obj \
227 $(TMP_DIR)\tclBinary.obj \
228 $(TMP_DIR)\tclCkalloc.obj \
229 $(TMP_DIR)\tclClock.obj \
230 $(TMP_DIR)\tclCmdAH.obj \
231 $(TMP_DIR)\tclCmdIL.obj \
232 $(TMP_DIR)\tclCmdMZ.obj \
233 $(TMP_DIR)\tclCompCmds.obj \
234 $(TMP_DIR)\tclCompCmdsGR.obj \
235 $(TMP_DIR)\tclCompCmdsSZ.obj \
236 $(TMP_DIR)\tclCompExpr.obj \
237 $(TMP_DIR)\tclCompile.obj \
238 $(TMP_DIR)\tclConfig.obj \
239 $(TMP_DIR)\tclDate.obj \
240 $(TMP_DIR)\tclDictObj.obj \
241 $(TMP_DIR)\tclDisassemble.obj \
242 $(TMP_DIR)\tclEncoding.obj \
243 $(TMP_DIR)\tclEnsemble.obj \
244 $(TMP_DIR)\tclEnv.obj \
245 $(TMP_DIR)\tclEvent.obj \
246 $(TMP_DIR)\tclExecute.obj \
247 $(TMP_DIR)\tclFCmd.obj \
248 $(TMP_DIR)\tclFileName.obj \
249 $(TMP_DIR)\tclGet.obj \
250 $(TMP_DIR)\tclHash.obj \
251 $(TMP_DIR)\tclHistory.obj \
252 $(TMP_DIR)\tclIndexObj.obj \
253 $(TMP_DIR)\tclInterp.obj \
254 $(TMP_DIR)\tclIO.obj \
255 $(TMP_DIR)\tclIOCmd.obj \
256 $(TMP_DIR)\tclIOGT.obj \
257 $(TMP_DIR)\tclIOSock.obj \
258 $(TMP_DIR)\tclIOUtil.obj \
259 $(TMP_DIR)\tclIORChan.obj \
260 $(TMP_DIR)\tclIORTrans.obj \
261 $(TMP_DIR)\tclLink.obj \
262 $(TMP_DIR)\tclListObj.obj \
263 $(TMP_DIR)\tclLiteral.obj \
264 $(TMP_DIR)\tclLoad.obj \
265 $(TMP_DIR)\tclMainW.obj \
266 $(TMP_DIR)\tclMain.obj \
267 $(TMP_DIR)\tclNamesp.obj \
268 $(TMP_DIR)\tclNotify.obj \
269 $(TMP_DIR)\tclOO.obj \
270 $(TMP_DIR)\tclOOBasic.obj \
271 $(TMP_DIR)\tclOOCall.obj \
272 $(TMP_DIR)\tclOODefineCmds.obj \
273 $(TMP_DIR)\tclOOInfo.obj \
274 $(TMP_DIR)\tclOOMethod.obj \
275 $(TMP_DIR)\tclOOStubInit.obj \
276 $(TMP_DIR)\tclObj.obj \
277 $(TMP_DIR)\tclOptimize.obj \
278 $(TMP_DIR)\tclPanic.obj \
279 $(TMP_DIR)\tclParse.obj \
280 $(TMP_DIR)\tclPathObj.obj \
281 $(TMP_DIR)\tclPipe.obj \
282 $(TMP_DIR)\tclPkg.obj \
283 $(TMP_DIR)\tclPkgConfig.obj \
284 $(TMP_DIR)\tclPosixStr.obj \
285 $(TMP_DIR)\tclPreserve.obj \
286 $(TMP_DIR)\tclProc.obj \
287 $(TMP_DIR)\tclRegexp.obj \
288 $(TMP_DIR)\tclResolve.obj \
289 $(TMP_DIR)\tclResult.obj \
290 $(TMP_DIR)\tclScan.obj \
291 $(TMP_DIR)\tclStringObj.obj \
292 $(TMP_DIR)\tclStrToD.obj \
293 $(TMP_DIR)\tclStubInit.obj \
294 $(TMP_DIR)\tclThread.obj \
295 $(TMP_DIR)\tclThreadAlloc.obj \
296 $(TMP_DIR)\tclThreadJoin.obj \
297 $(TMP_DIR)\tclThreadStorage.obj \
298 $(TMP_DIR)\tclTimer.obj \
299 $(TMP_DIR)\tclTomMathInterface.obj \
300 $(TMP_DIR)\tclTrace.obj \
301 $(TMP_DIR)\tclUtf.obj \
302 $(TMP_DIR)\tclUtil.obj \
303 $(TMP_DIR)\tclVar.obj \
304 $(TMP_DIR)\tclZlib.obj
305
306 !if $(STATIC_BUILD)
307 ZLIBOBJS = \
308 $(TMP_DIR)\adler32.obj \
309 $(TMP_DIR)\compress.obj \
310 $(TMP_DIR)\crc32.obj \
311 $(TMP_DIR)\deflate.obj \
312 $(TMP_DIR)\infback.obj \
313 $(TMP_DIR)\inffast.obj \
314 $(TMP_DIR)\inflate.obj \
315 $(TMP_DIR)\inftrees.obj \
316 $(TMP_DIR)\trees.obj \
317 $(TMP_DIR)\uncompr.obj \
318 $(TMP_DIR)\zutil.obj
319 !else
320 ZLIBOBJS = $(OUT_DIR)\zdll.lib
321 !endif
322
323 TOMMATHOBJS = \
324 $(TMP_DIR)\bn_mp_add.obj \
325 $(TMP_DIR)\bn_mp_add_d.obj \
326 $(TMP_DIR)\bn_mp_and.obj \
327 $(TMP_DIR)\bn_mp_clamp.obj \
328 $(TMP_DIR)\bn_mp_clear.obj \
329 $(TMP_DIR)\bn_mp_clear_multi.obj \
330 $(TMP_DIR)\bn_mp_cmp.obj \
331 $(TMP_DIR)\bn_mp_cmp_d.obj \
332 $(TMP_DIR)\bn_mp_cmp_mag.obj \
333 $(TMP_DIR)\bn_mp_cnt_lsb.obj \
334 $(TMP_DIR)\bn_mp_copy.obj \
335 $(TMP_DIR)\bn_mp_count_bits.obj \
336 $(TMP_DIR)\bn_mp_div.obj \
337 $(TMP_DIR)\bn_mp_div_d.obj \
338 $(TMP_DIR)\bn_mp_div_2.obj \
339 $(TMP_DIR)\bn_mp_div_2d.obj \
340 $(TMP_DIR)\bn_s_mp_div_3.obj \
341 $(TMP_DIR)\bn_mp_exch.obj \
342 $(TMP_DIR)\bn_mp_expt_n.obj \
343 $(TMP_DIR)\bn_mp_grow.obj \
344 $(TMP_DIR)\bn_mp_init.obj \
345 $(TMP_DIR)\bn_mp_init_copy.obj \
346 $(TMP_DIR)\bn_mp_init_multi.obj \
347 $(TMP_DIR)\bn_mp_init_set.obj \
348 $(TMP_DIR)\bn_mp_init_size.obj \
349 $(TMP_DIR)\bn_mp_lshd.obj \
350 $(TMP_DIR)\bn_mp_mod.obj \
351 $(TMP_DIR)\bn_mp_mod_2d.obj \
352 $(TMP_DIR)\bn_mp_mul.obj \
353 $(TMP_DIR)\bn_mp_mul_2.obj \
354 $(TMP_DIR)\bn_mp_mul_2d.obj \
355 $(TMP_DIR)\bn_mp_mul_d.obj \
356 $(TMP_DIR)\bn_mp_neg.obj \
357 $(TMP_DIR)\bn_mp_or.obj \
358 $(TMP_DIR)\bn_mp_pack.obj \
359 $(TMP_DIR)\bn_mp_pack_count.obj \
360 $(TMP_DIR)\bn_mp_radix_size.obj \
361 $(TMP_DIR)\bn_mp_radix_smap.obj \
362 $(TMP_DIR)\bn_mp_read_radix.obj \
363 $(TMP_DIR)\bn_mp_rshd.obj \
364 $(TMP_DIR)\bn_mp_set.obj \
365 $(TMP_DIR)\bn_mp_shrink.obj \
366 $(TMP_DIR)\bn_mp_sqr.obj \
367 $(TMP_DIR)\bn_mp_sqrt.obj \
368 $(TMP_DIR)\bn_mp_sub.obj \
369 $(TMP_DIR)\bn_mp_sub_d.obj \
370 $(TMP_DIR)\bn_mp_signed_rsh.obj \
371 $(TMP_DIR)\bn_mp_to_ubin.obj \
372 $(TMP_DIR)\bn_mp_to_radix.obj \
373 $(TMP_DIR)\bn_mp_ubin_size.obj \
374 $(TMP_DIR)\bn_mp_unpack.obj \
375 $(TMP_DIR)\bn_mp_xor.obj \
376 $(TMP_DIR)\bn_mp_zero.obj \
377 $(TMP_DIR)\bn_s_mp_add.obj \
378 $(TMP_DIR)\bn_s_mp_balance_mul.obj \
379 $(TMP_DIR)\bn_s_mp_karatsuba_mul.obj \
380 $(TMP_DIR)\bn_s_mp_karatsuba_sqr.obj \
381 $(TMP_DIR)\bn_s_mp_mul_digs.obj \
382 $(TMP_DIR)\bn_s_mp_mul_digs_fast.obj \
383 $(TMP_DIR)\bn_s_mp_reverse.obj \
384 $(TMP_DIR)\bn_s_mp_sqr.obj \
385 $(TMP_DIR)\bn_s_mp_sqr_fast.obj \
386 $(TMP_DIR)\bn_s_mp_sub.obj \
387 $(TMP_DIR)\bn_s_mp_toom_sqr.obj \
388 $(TMP_DIR)\bn_s_mp_toom_mul.obj
389
390 PLATFORMOBJS = \
391 $(TMP_DIR)\tclWin32Dll.obj \
392 $(TMP_DIR)\tclWinChan.obj \
393 $(TMP_DIR)\tclWinConsole.obj \
394 $(TMP_DIR)\tclWinError.obj \
395 $(TMP_DIR)\tclWinFCmd.obj \
396 $(TMP_DIR)\tclWinFile.obj \
397 $(TMP_DIR)\tclWinInit.obj \
398 $(TMP_DIR)\tclWinLoad.obj \
399 $(TMP_DIR)\tclWinNotify.obj \
400 $(TMP_DIR)\tclWinPipe.obj \
401 $(TMP_DIR)\tclWinSerial.obj \
402 $(TMP_DIR)\tclWinSock.obj \
403 $(TMP_DIR)\tclWinThrd.obj \
404 $(TMP_DIR)\tclWinTime.obj \
405 !if $(STATIC_BUILD)
406 $(TMP_DIR)\tclWinReg.obj \
407 $(TMP_DIR)\tclWinDde.obj \
408 !else
409 $(TMP_DIR)\tcl.res
410 !endif
411
412 TCLOBJS = $(COREOBJS) $(ZLIBOBJS) $(TOMMATHOBJS) $(PLATFORMOBJS)
413
414 TCLSTUBOBJS = \
415 $(TMP_DIR)\tclStubLib.obj \
416 $(TMP_DIR)\tclTomMathStubLib.obj \
417 $(TMP_DIR)\tclOOStubLib.obj
418
419 ### The following paths CANNOT have spaces in them as they appear on
420 ### the left side of implicit rules.
421 TOMMATHDIR = $(ROOT)\libtommath
422 PKGSDIR = $(ROOT)\pkgs
423
424 # Additional include and C macro definitions for the implicit rules
425 # defined in rules.vc
426 PRJ_INCLUDES = -I"$(TOMMATHDIR)"
427 PRJ_DEFINES = /DMP_PREC=4 /Dinline=__inline /DHAVE_ZLIB=1 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DMP_FIXED_CUTOFFS /Dz_off_t=__int64
428
429 # Additional Link libraries needed beyond those in rules.vc
430 PRJ_LIBS = netapi32.lib user32.lib userenv.lib ws2_32.lib
431
432 #---------------------------------------------------------------------
433 # TclTest flags
434 #---------------------------------------------------------------------
435
436 !if "$(TESTPAT)" != ""
437 TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
438 !endif
439
440
441 #---------------------------------------------------------------------
442 # Project specific targets
443 # There are 4 primary build configurations to consider from the combination
444 # of static/shared and embed/noembed of the library zip. The targets are
445 # done in the following order.
446 # $(TCLLIB) - this is either the core static .lib or the .dll. The target
447 # build does not embed the library zip in the DLL irrespective
448 # of the noembed setting. A copy is made as $(TCLLIBRAW)
449 # as the $(TCLLIB) binary is potentially modified later.
450 # dlls - these are the registry and dde DLL's or static libraries
451 # $(TCLSH) - the Tcl shell. This needs $(TCLLIB) to be built first as
452 # it links against it.
453 # $(TCLSCRIPTZIP) - the zip file that is to be embedded. Note this also
454 # ships separately and needs to be built irrespective of the
455 # whether it is embedded or not. All above targets need to
456 # be built prior as they are used to build the zip (unlike
457 # Unix where the external zip program is used.)
458 # core - this virtual target builds the final release ready Tcl
459 # library. For shared, embedded builds it appends $(TCLSCRIPTZIP)
460 # to the $(TCLLIB). For other build configurations, this
461 # is a no-op.
462 # shell - this virtual target builds the final release ready tclsh shell.
463 # For static, embedded builds it appends $(TCLSCRIPTZIP)
464 # to the $(TCLSH). For other build configurations, this
465 # is a no-op.
466 # release - Everything that builds as part of a release
467 #---------------------------------------------------------------------
468
469 release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs
470 all: setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32) pkgs
471 core: setup $(TCLLIB) $(TCLSTUBLIB)
472 shell: setup $(TCLSH)
473 dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll
474 tcltest: setup $(TCLTEST) dlls $(CAT32)
475 install: install-binaries install-libraries install-docs install-pkgs
476 !if $(SYMBOLS)
477 install: install-pdbs
478 !endif
479 setup: default-setup
480
481 test: test-core test-pkgs
482 test-core: setup $(TCLTEST) dlls $(CAT32)
483 set TCL_LIBRARY=$(ROOT:\=/)/library
484 $(DEBUGGER) $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile <<
485 package ifneeded dde 1.4.6 [list load "$(TCLDDELIB:\=/)" Dde]
486 package ifneeded registry 1.3.5 [list load "$(TCLREGLIB:\=/)" Registry]
487 <<
488
489 runtest: setup $(TCLTEST) dlls $(CAT32)
490 set TCL_LIBRARY=$(ROOT:\=/)/library
491 $(DEBUGGER) $(TCLTEST) $(SCRIPT)
492
493 runshell: setup $(TCLSH) dlls
494 set TCL_LIBRARY=$(ROOT:\=/)/library
495 $(DEBUGGER) $(TCLSH) $(SCRIPT)
496
497 !if $(STATIC_BUILD)
498
499 $(TCLLIB): $(TCLOBJS)
500 $(LIBCMD) @<<
501 $**
502 <<
503
504 !else
505
506 $(TCLLIB): $(TCLOBJS)
507 $(DLLCMD) @<<
508 $**
509 <<
510 $(_VC_MANIFEST_EMBED_DLL)
511
512 $(TCLIMPLIB): $(TCLLIB)
513
514 !endif # $(STATIC_BUILD)
515
516 $(TCLSTUBLIB): $(TCLSTUBOBJS)
517 $(LIBCMD) -nodefaultlib $(TCLSTUBOBJS)
518
519 $(TCLSH): $(TCLSHOBJS) $(TCLSTUBLIB) $(TCLIMPLIB)
520 $(CONEXECMD) -stack:2300000 $**
521 copy $(TMP_DIR)\tclsh.exe.manifest $(TCLSH).manifest
522 $(_VC_MANIFEST_EMBED_EXE)
523
524 $(TCLTEST): $(TCLTESTOBJS) $(TCLSTUBLIB) $(TCLIMPLIB)
525 $(CONEXECMD) -stack:2300000 $**
526 copy $(TMP_DIR)\tclsh.exe.manifest $(TCLTEST).manifest
527 $(_VC_MANIFEST_EMBED_EXE)
528
529 !if $(STATIC_BUILD)
530 $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj
531 $(LIBCMD) $**
532 !else
533 $(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB)
534 $(DLLCMD) $**
535 $(_VC_MANIFEST_EMBED_DLL)
536 !endif
537
538 !if $(STATIC_BUILD)
539 $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj
540 $(LIBCMD) $**
541 !else
542 $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB)
543 $(DLLCMD) $**
544 $(_VC_MANIFEST_EMBED_DLL)
545 !endif
546
547 !if "$(MACHINE)" == "ARM64"
548 $(OUT_DIR)\zlib1.dll: $(COMPATDIR)\zlib\win64-arm\zlib1.dll
549 $(COPY) $(COMPATDIR)\zlib\win64-arm\zlib1.dll $(OUT_DIR)\zlib1.dll
550 $(OUT_DIR)\zdll.lib: $(COMPATDIR)\zlib\win64-arm\zdll.lib
551 $(COPY) $(COMPATDIR)\zlib\win64-arm\zdll.lib $(OUT_DIR)\zdll.lib
552 !elseif "$(MACHINE)" == "IX86"
553 $(OUT_DIR)\zlib1.dll: $(COMPATDIR)\zlib\win32\zlib1.dll
554 $(COPY) $(COMPATDIR)\zlib\win32\zlib1.dll $(OUT_DIR)\zlib1.dll
555 $(OUT_DIR)\zdll.lib: $(COMPATDIR)\zlib\win32\zdll.lib
556 $(COPY) $(COMPATDIR)\zlib\win32\zdll.lib $(OUT_DIR)\zdll.lib
557 !else
558 $(OUT_DIR)\zlib1.dll: $(COMPATDIR)\zlib\win64\zlib1.dll
559 $(COPY) $(COMPATDIR)\zlib\win64\zlib1.dll $(OUT_DIR)\zlib1.dll
560 $(OUT_DIR)\zdll.lib: $(COMPATDIR)\zlib\win64\zdll.lib
561 $(COPY) $(COMPATDIR)\zlib\win64\zdll.lib $(OUT_DIR)\zdll.lib
562 !endif
563
564 pkgs:
565 @for /d %d in ($(PKGSDIR)\*) do \
566 @if exist "%~fd\win\makefile.vc" ( \
567 pushd "%~fd\win" & \
568 $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) &\
569 popd \
570 )
571
572 test-pkgs:
573 @for /d %d in ($(PKGSDIR)\*) do \
574 @if exist "%~fd\win\makefile.vc" ( \
575 pushd "%~fd\win" & \
576 $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) test &\
577 popd \
578 )
579
580 install-pkgs:
581 @for /d %d in ($(PKGSDIR)\*) do \
582 @if exist "%~fd\win\makefile.vc" ( \
583 pushd "%~fd\win" & \
584 $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) install &\
585 popd \
586 )
587
588 clean-pkgs:
589 @for /d %d in ($(PKGSDIR)\*) do \
590 @if exist "%~fd\win\makefile.vc" ( \
591 pushd "%~fd\win" & \
592 $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) clean &\
593 popd \
594 )
595
596 hose-pkgs:
597 @for /d %d in ($(PKGSDIR)\*) do \
598 @if exist "%~fd\win\makefile.vc" ( \
599 pushd "%~fd\win" & \
600 $(MAKE) -$(MAKEFLAGS) -f makefile.vc TCLDIR=$(ROOT) hose &\
601 popd \
602 )
603
604 $(CAT32): $(WIN_DIR)\cat.c
605 $(cc32) $(cflags) $(crt) /D_CRT_NONSTDC_NO_DEPRECATE /DCONSOLE \
606 /DUNICODE /D_UNICODE -Fo$(TMP_DIR)\ $?
607 $(CONEXECMD) -stack:16384 $(TMP_DIR)\cat.obj
608 $(_VC_MANIFEST_EMBED_EXE)
609
610 #---------------------------------------------------------------------
611 # Regenerate the stubs files. [Development use only]
612 #---------------------------------------------------------------------
613
614 genstubs:
615 !if !exist($(TCLSH))
616 @echo Build tclsh first!
617 !else
618 $(TCLSH) -encoding utf-8 $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
619 $(GENERICDIR:\=/)/tcl.decls $(GENERICDIR:\=/)/tclInt.decls \
620 $(GENERICDIR:\=/)/tclTomMath.decls
621 $(TCLSH) -encoding utf-8 $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
622 $(GENERICDIR:\=/)/tclOO.decls
623 !endif
624
625
626 #----------------------------------------------------------------------
627 # The following target generates the file generic/tclTomMath.h.
628 # It needs to be run (and the results checked) after updating
629 # to a new release of libtommath.
630 #----------------------------------------------------------------------
631
632 gentommath_h:
633 !if !exist($(TCLSH))
634 @echo Build tclsh first!
635 !else
636 $(TCLSH) "$(TOOLSDIR:\=/)/fix_tommath_h.tcl" \
637 "$(TOMMATHDIR:\=/)/tommath.h" \
638 > "$(GENERICDIR)\tclTomMath.h"
639 !endif
640
641 #---------------------------------------------------------------------
642 # Build the Windows HTML help file.
643 #---------------------------------------------------------------------
644
645 # NOTE: you can define HHC on the command-line to override this.
646 # nmake does not set macro values if already set on the command line.
647 !if defined(PROCESSOR_ARCHITECTURE) && "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
648 HHC="%ProgramFiles(x86)%\HTML Help Workshop\hhc.exe"
649 !else
650 HHC="%ProgramFiles%\HTML Help Workshop\hhc.exe"
651 !endif
652 HTMLDIR=$(OUT_DIR)\html
653 HTMLBASE=TclTk$(VERSION)
654 HHPFILE=$(HTMLDIR)\$(HTMLBASE).hhp
655 CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm
656
657 htmlhelp: chmsetup $(CHMFILE)
658
659 $(CHMFILE): $(DOCDIR)\*
660 @$(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl "--htmldir=$(HTMLDIR)"
661 @echo Compiling HTML help project
662 -"$(HHC)" <<$(HHPFILE) >NUL
663 [OPTIONS]
664 Compatibility=1.1 or later
665 Compiled file=$(HTMLBASE).chm
666 Default topic=contents.htm
667 Display compile progress=no
668 Error log file=$(HTMLBASE).log
669 Full-text search=Yes
670 Language=0x409 English (United States)
671 Title=Tcl/Tk $(DOTVERSION) Help
672 [FILES]
673 contents.htm
674 docs.css
675 Keywords\*.htm
676 TclCmd\*.htm
677 TclLib\*.htm
678 TkCmd\*.htm
679 TkLib\*.htm
680 UserCmd\*.htm
681 <<
682
683 chmsetup:
684 @if not exist $(HTMLDIR)\nul mkdir $(HTMLDIR)
685
686 install-docs:
687 !if exist("$(CHMFILE)")
688 @echo Installing compiled HTML help
689 @$(CPY) "$(CHMFILE)" "$(DOC_INSTALL_DIR)\"
690 !endif
691
692 # "emacs font-lock highlighting fix
693
694 #---------------------------------------------------------------------
695 # Generate the tcl.nmake file which contains the options used to build
696 # Tcl itself. This is used when building extensions.
697 #---------------------------------------------------------------------
698 tcl-nmake: $(OUT_DIR)\tcl.nmake
699 $(OUT_DIR)\tcl.nmake:
700 @type << >$@
701 CORE_MACHINE = $(MACHINE)
702 CORE_DEBUG = $(DEBUG)
703 CORE_TCL_THREADS = $(TCL_THREADS)
704 CORE_USE_THREAD_ALLOC = $(USE_THREAD_ALLOC)
705 <<
706
707 #---------------------------------------------------------------------
708 # Build tclConfig.sh for the TEA build system.
709 #---------------------------------------------------------------------
710
711 tclConfig: $(OUT_DIR)\tclConfig.sh
712
713 # TBD - is this tclConfig.sh file ever used? The values are incorrect!
714 $(OUT_DIR)\tclConfig.sh: $(WIN_DIR)\tclConfig.sh.in
715 @echo Creating tclConfig.sh
716 @nmakehlp -s << $** >$@
717 @TCL_DLL_FILE@ $(TCLLIBNAME)
718 @TCL_VERSION@ $(DOTVERSION)
719 @TCL_MAJOR_VERSION@ $(TCL_MAJOR_VERSION)
720 @TCL_MINOR_VERSION@ $(TCL_MINOR_VERSION)
721 @TCL_PATCH_LEVEL@ $(TCL_PATCH_LEVEL)
722 @CC@ $(CC)
723 @DEFS@ $(pkgcflags)
724 @CFLAGS_DEBUG@ -nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MDd
725 @CFLAGS_OPTIMIZE@ -nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MD
726 @LDFLAGS_DEBUG@ -nologo -machine:$(MACHINE) -debug -debugtype:cv
727 @LDFLAGS_OPTIMIZE@ -nologo -machine:$(MACHINE) -release -opt:ref -opt:icf,3
728 @TCL_DBGX@ $(SUFX)
729 @TCL_LIB_FILE@ $(PROJECT)$(VERSION)$(SUFX).lib
730 @LIBS@ $(baselibs) $(PRJ_LIBS)
731 @prefix@ $(_INSTALLDIR)
732 @exec_prefix@ $(BIN_INSTALL_DIR)
733 @SHLIB_CFLAGS@
734 @STLIB_CFLAGS@
735 @CFLAGS_WARNING@ -W3
736 @EXTRA_CFLAGS@ -YX
737 @SHLIB_LD@ $(link32) $(dlllflags)
738 @STLIB_LD@ $(lib32) -nologo
739 @SHLIB_LD_LIBS@ $(baselibs) $(PRJ_LIBS)
740 @SHLIB_SUFFIX@ .dll
741 @DL_LIBS@
742 @LDFLAGS@
743 @TCL_CC_SEARCH_FLAGS@
744 @TCL_LD_SEARCH_FLAGS@
745 @LIBOBJS@
746 @RANLIB@
747 @TCL_LIB_FLAG@ $(PROJECT)$(VERSION)$(SUFX).lib
748 @TCL_BUILD_LIB_SPEC@ $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
749 @TCL_LIB_SPEC@ $(LIB_INSTALL_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
750 @TCL_INCLUDE_SPEC@ -I$(INCLUDE_INSTALL_DIR)
751 @TCL_SRC_DIR@ $(ROOT)
752 @TCL_PACKAGE_PATH@ $(LIB_INSTALL_DIR)
753 @TCL_STUB_LIB_FILE@ $(TCLSTUBLIBNAME)
754 @TCL_STUB_LIB_FLAG@ $(TCLSTUBLIBNAME)
755 @TCL_STUB_LIB_SPEC@ -L$(LIB_INSTALL_DIR) $(TCLSTUBLIBNAME)
756 @TCL_THREADS@ $(TCL_THREADS)
757 @TCL_BUILD_STUB_LIB_SPEC@ -L$(OUT_DIR) $(TCLSTUBLIBNAME)
758 @TCL_BUILD_STUB_LIB_PATH@ $(TCLSTUBLIB)
759 @TCL_STUB_LIB_PATH@ $(LIB_INSTALL_DIR)\$(TCLSTUBLIBNAME)
760 @CFG_TCL_SHARED_LIB_SUFFIX@ $(VERSION)$(SUFX).dll
761 @CFG_TCL_UNSHARED_LIB_SUFFIX@ $(VERSION)$(SUFX).lib
762 !if $(STATIC_BUILD)
763 @TCL_SHARED_BUILD@ 0
764 !else
765 @TCL_SHARED_BUILD@ 1
766 !endif
767 @TCL_ZLIB_LIB_NAME@ zdll.lib
768 <<
769
770
771 #---------------------------------------------------------------------
772 # The following target generates the file generic/tclDate.c
773 # from the yacc grammar found in generic/tclGetDate.y. This is
774 # only run by hand as yacc is not available in all environments.
775 # The name of the .c file is different than the name of the .y file
776 # so that make doesn't try to automatically regenerate the .c file.
777 #---------------------------------------------------------------------
778
779 gendate:
780 bison --output-file=$(GENERICDIR)/tclDate.c \
781 --name-prefix=TclDate \
782 $(GENERICDIR)/tclGetDate.y
783
784 #---------------------------------------------------------------------
785 # Special case object file targets
786 #---------------------------------------------------------------------
787
788 $(TMP_DIR)\testMain.obj: $(WIN_DIR)\tclAppInit.c
789 $(cc32) $(appcflags) /DTCL_TEST /DUNICODE /D_UNICODE \
790 /DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
791 -Fo$@ $?
792
793 $(TMP_DIR)\tclMainW.obj: $(GENERICDIR)\tclMain.c
794 $(cc32) $(pkgcflags) /DUNICODE /D_UNICODE \
795 -Fo$@ $?
796
797 $(ROOT)\manifest.uuid:
798 copy $(WIN_DIR)\gitmanifest.in $(ROOT)\manifest.uuid
799 git rev-parse HEAD >>$(ROOT)\manifest.uuid
800
801 $(TMP_DIR)\tclUuid.h: $(ROOT)\manifest.uuid
802 copy $(WIN_DIR)\tclUuid.h.in+$(ROOT)\manifest.uuid $(TMP_DIR)\tclUuid.h
803
804 $(TMP_DIR)\tclEvent.obj: $(GENERICDIR)\tclEvent.c $(TMP_DIR)\tclUuid.h
805 $(cc32) $(pkgcflags) -I$(TMP_DIR) \
806 -Fo$@ $(GENERICDIR)\tclEvent.c
807
808 $(TMP_DIR)\tclTest.obj: $(GENERICDIR)\tclTest.c
809 $(cc32) $(appcflags) -Fo$@ $?
810
811 $(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c
812 $(cc32) $(appcflags) -Fo$@ $?
813
814 $(TMP_DIR)\tclWinTest.obj: $(WIN_DIR)\tclWinTest.c
815 $(CCAPPCMD) $?
816
817 $(TMP_DIR)\tclZlib.obj: $(GENERICDIR)\tclZlib.c
818 $(cc32) $(pkgcflags) -I$(COMPATDIR)\zlib -Fo$@ $?
819
820 $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c
821 $(cc32) $(pkgcflags) \
822 /DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR:\=\\)\"" \
823 /DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR:\=\\)\"" \
824 /DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR:\=\\)\"" \
825 /DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR:\=\\)\"" \
826 /DCFG_INSTALL_DOCDIR="\"$(DOC_INSTALL_DIR:\=\\)\"" \
827 /DCFG_RUNTIME_LIBDIR="\"$(LIB_INSTALL_DIR:\=\\)\"" \
828 /DCFG_RUNTIME_BINDIR="\"$(BIN_INSTALL_DIR:\=\\)\"" \
829 /DCFG_RUNTIME_SCRDIR="\"$(SCRIPT_INSTALL_DIR:\=\\)\"" \
830 /DCFG_RUNTIME_INCDIR="\"$(INCLUDE_INSTALL_DIR:\=\\)\"" \
831 /DCFG_RUNTIME_DOCDIR="\"$(DOC_INSTALL_DIR:\=\\)\"" \
832 -Fo$@ $?
833
834 $(TMP_DIR)\tclAppInit.obj: $(WIN_DIR)\tclAppInit.c
835 $(cc32) $(appcflags) /DUNICODE /D_UNICODE \
836 /DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
837 -Fo$@ $?
838
839 ### The following objects should be built using the stub interfaces
840 ### *ALL* extensions need to built with /DTCL_THREADS=1
841
842 $(TMP_DIR)\tclWinReg.obj: $(WIN_DIR)\tclWinReg.c
843 $(cc32) $(appcflags) /DUSE_TCL_STUBS -Fo$@ $?
844
845
846 $(TMP_DIR)\tclWinDde.obj: $(WIN_DIR)\tclWinDde.c
847 $(cc32) $(appcflags) /DUSE_TCL_STUBS -Fo$@ $?
848
849
850 ### The following objects are part of the stub library and should not
851 ### be built as DLL objects. -Zl is used to avoid a dependency on any
852 ### specific C run-time.
853
854 $(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c
855 $(cc32) $(stubscflags) -Fo$@ $?
856
857 $(TMP_DIR)\tclTomMathStubLib.obj: $(GENERICDIR)\tclTomMathStubLib.c
858 $(cc32) $(stubscflags) -Fo$@ $?
859
860 $(TMP_DIR)\tclOOStubLib.obj: $(GENERICDIR)\tclOOStubLib.c
861 $(cc32) $(stubscflags) -Fo$@ $?
862
863 $(TMP_DIR)\tclsh.exe.manifest: $(WIN_DIR)\tclsh.exe.manifest.in
864 @nmakehlp -s << $** >$@
865 @MACHINE@ $(MACHINE:IX86=X86)
866 @TCL_WIN_VERSION@ $(DOTVERSION).0.0
867 <<
868
869 #---------------------------------------------------------------------
870 # Generate the source dependencies. Having dependency rules will
871 # improve incremental build accuracy without having to resort to a
872 # full rebuild just because some non-global header file like
873 # tclCompile.h was changed. These rules aren't needed when building
874 # from scratch.
875 #---------------------------------------------------------------------
876
877 depend:
878 !if !exist($(TCLSH))
879 @echo Build tclsh first!
880 !else
881 $(TCLSH) $(TOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
882 -passthru:"/DBUILD_tcl $(TCL_INCLUDES) $(PRJ_INCLUDES)" $(GENERICDIR),$$(GENERICDIR) \
883 $(COMPATDIR),$$(COMPATDIR) $(TOMMATHDIR),$$(TOMMATHDIR) $(WIN_DIR),$$(WIN_DIR) @<<
884 $(TCLOBJS)
885 <<
886 !endif
887
888 #---------------------------------------------------------------------
889 # Dependency rules
890 #---------------------------------------------------------------------
891
892 !if exist("$(OUT_DIR)\depend.mk")
893 !include "$(OUT_DIR)\depend.mk"
894 !message *** Dependency rules in use.
895 !else
896 !message *** Dependency rules are not being used.
897 !endif
898
899 ### add a spacer in the output
900 !message
901
902
903 #---------------------------------------------------------------------
904 # Implicit rules that are not covered by the common ones defined in
905 # rules.vc. A limitation exists with nmake that requires that
906 # source directory can not contain spaces in the path. This an
907 # absolute.
908 #---------------------------------------------------------------------
909
910 {$(TOMMATHDIR)}.c{$(TMP_DIR)}.obj::
911 $(cc32) $(pkgcflags) -Fo$(TMP_DIR)\ @<<
912 $<
913 <<
914
915 {$(COMPATDIR)\zlib}.c{$(TMP_DIR)}.obj::
916 $(cc32) $(pkgcflags) -Fo$(TMP_DIR)\ @<<
917 $<
918 <<
919
920 $(TMP_DIR)\tclsh.res: $(TMP_DIR)\tclsh.exe.manifest $(WIN_DIR)\tclsh.rc
921
922 $(TMP_DIR)\tcltest.res: $(TMP_DIR)\tclsh.exe.manifest $(WIN_DIR)\tcltest.rc
923
924 #---------------------------------------------------------------------
925 # Installation.
926 #---------------------------------------------------------------------
927
928 install-binaries:
929 @echo Installing to '$(_INSTALLDIR)'
930 @echo Installing $(TCLLIBNAME)
931 !if "$(TCLLIB)" != "$(TCLIMPLIB)"
932 @$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\"
933 !endif
934 @$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\"
935 @$(CPY) "$(OUT_DIR)\zlib1.dll" "$(BIN_INSTALL_DIR)\"
936 !if exist($(TCLSH))
937 @echo Installing $(TCLSHNAME)
938 @$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\"
939 !endif
940 @echo Installing $(TCLSTUBLIBNAME)
941 @$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\"
942
943 install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
944 @if not exist "$(SCRIPT_INSTALL_DIR)" \
945 $(MKDIR) "$(SCRIPT_INSTALL_DIR)"
946 @if not exist "$(SCRIPT_INSTALL_DIR)\opt0.4" \
947 $(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4"
948 @if not exist "$(MODULE_INSTALL_DIR)" \
949 $(MKDIR) "$(MODULE_INSTALL_DIR)"
950 @if not exist "$(MODULE_INSTALL_DIR)\8.5" \
951 $(MKDIR) "$(MODULE_INSTALL_DIR)\8.5"
952 @if not exist "$(MODULE_INSTALL_DIR)\8.6" \
953 $(MKDIR) "$(MODULE_INSTALL_DIR)\8.6"
954 @if not exist "$(MODULE_INSTALL_DIR)\8.6\platform" \
955 $(MKDIR) "$(MODULE_INSTALL_DIR)\8.6\platform"
956 @if not exist "$(LIB_INSTALL_DIR)\nmake" \
957 $(MKDIR) "$(LIB_INSTALL_DIR)\nmake"
958 @echo Installing header files
959 @$(CPY) "$(GENERICDIR)\tcl.h" "$(INCLUDE_INSTALL_DIR)\"
960 @$(CPY) "$(GENERICDIR)\tclDecls.h" "$(INCLUDE_INSTALL_DIR)\"
961 @$(CPY) "$(GENERICDIR)\tclOO.h" "$(INCLUDE_INSTALL_DIR)\"
962 @$(CPY) "$(GENERICDIR)\tclOODecls.h" "$(INCLUDE_INSTALL_DIR)\"
963 @$(CPY) "$(GENERICDIR)\tclPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\"
964 @$(CPY) "$(GENERICDIR)\tclTomMath.h" "$(INCLUDE_INSTALL_DIR)\"
965 @$(CPY) "$(GENERICDIR)\tclTomMathDecls.h" "$(INCLUDE_INSTALL_DIR)\"
966 @echo Installing library files to $(SCRIPT_INSTALL_DIR)
967 @$(CPY) "$(ROOT)\library\*.tcl" "$(SCRIPT_INSTALL_DIR)\"
968 @$(CPY) "$(ROOT)\library\tclIndex" "$(SCRIPT_INSTALL_DIR)\"
969 @$(CPY) "$(OUT_DIR)\tclConfig.sh" "$(LIB_INSTALL_DIR)\"
970 @$(CPY) "$(WIN_DIR)\tclooConfig.sh" "$(LIB_INSTALL_DIR)\"
971 @$(CPY) "$(WIN_DIR)\rules.vc" "$(LIB_INSTALL_DIR)\nmake\"
972 @$(CPY) "$(WIN_DIR)\targets.vc" "$(LIB_INSTALL_DIR)\nmake\"
973 @$(CPY) "$(WIN_DIR)\nmakehlp.c" "$(LIB_INSTALL_DIR)\nmake\"
974 @$(CPY) "$(WIN_DIR)\x86_64-w64-mingw32-nmakehlp.exe" "$(LIB_INSTALL_DIR)\nmake\"
975 @$(CPY) "$(OUT_DIR)\tcl.nmake" "$(LIB_INSTALL_DIR)\nmake\"
976 @echo Installing package http 1.0 (obsolete)
977 @$(CPY) "$(ROOT)\library\http1.0\*.tcl" \
978 "$(SCRIPT_INSTALL_DIR)\http1.0\"
979 @echo Installing package opt $(PKG_OPT_VER)
980 @$(CPY) "$(ROOT)\library\opt\*.tcl" \
981 "$(SCRIPT_INSTALL_DIR)\opt0.4\"
982 @echo Installing package http $(PKG_HTTP_VER) as a Tcl Module
983 @$(COPY) "$(ROOT)\library\http\http.tcl" \
984 "$(MODULE_INSTALL_DIR)\8.6\http-$(PKG_HTTP_VER).tm"
985 @echo Installing package msgcat $(PKG_MSGCAT_VER) as a Tcl Module
986 @$(COPY) "$(ROOT)\library\msgcat\msgcat.tcl" \
987 "$(MODULE_INSTALL_DIR)\8.5\msgcat-$(PKG_MSGCAT_VER).tm"
988 @echo Installing package tcltest $(PKG_TCLTEST_VER) as a Tcl Module
989 @$(COPY) "$(ROOT)\library\tcltest\tcltest.tcl" \
990 "$(MODULE_INSTALL_DIR)\8.5\tcltest-$(PKG_TCLTEST_VER).tm"
991 @echo Installing package platform $(PKG_PLATFORM_VER) as a Tcl Module
992 @$(COPY) "$(ROOT)\library\platform\platform.tcl" \
993 "$(MODULE_INSTALL_DIR)\8.6\platform-$(PKG_PLATFORM_VER).tm"
994 @echo Installing package platform::shell $(PKG_SHELL_VER) as a Tcl Module
995 @$(COPY) "$(ROOT)\library\platform\shell.tcl" \
996 "$(MODULE_INSTALL_DIR)\8.6\platform\shell-$(PKG_SHELL_VER).tm"
997 @echo Installing $(TCLDDELIBNAME)
998 !if $(STATIC_BUILD)
999 !if !$(TCL_USE_STATIC_PACKAGES)
1000 @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\"
1001 !endif
1002 !else
1003 @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\"
1004 @$(CPY) "$(ROOT)\library\dde\pkgIndex.tcl" \
1005 "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\"
1006 !endif
1007 @echo Installing $(TCLREGLIBNAME)
1008 !if $(STATIC_BUILD)
1009 !if !$(TCL_USE_STATIC_PACKAGES)
1010 @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\"
1011 !endif
1012 !else
1013 @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\reg$(REGDOTVERSION)\"
1014 @$(CPY) "$(ROOT)\library\reg\pkgIndex.tcl" \
1015 "$(LIB_INSTALL_DIR)\reg$(REGDOTVERSION)\"
1016 !endif
1017 @echo Installing encodings
1018 @$(CPY) "$(ROOT)\library\encoding\*.enc" \
1019 "$(SCRIPT_INSTALL_DIR)\encoding\"
1020 # "emacs font-lock highlighting fix
1021
1022 install-tzdata:
1023 @echo Installing time zone data
1024 @set TCL_LIBRARY=$(ROOT:\=/)/library
1025 @$(TCLSH_NATIVE) "$(ROOT:\=/)/tools/installData.tcl" \
1026 "$(ROOT:\=/)/library/tzdata" "$(SCRIPT_INSTALL_DIR)/tzdata"
1027
1028 install-msgs:
1029 @echo Installing message catalogs
1030 @set TCL_LIBRARY=$(ROOT:\=/)/library
1031 @$(TCLSH_NATIVE) "$(ROOT:\=/)/tools/installData.tcl" \
1032 "$(ROOT:\=/)/library/msgs" "$(SCRIPT_INSTALL_DIR)/msgs"
1033
1034 install-pdbs:
1035 @echo Installing debug symbols
1036 @$(CPY) "$(OUT_DIR)\*.pdb" "$(BIN_INSTALL_DIR)\"
1037 # "emacs font-lock highlighting fix
1038
1039 #---------------------------------------------------------------------
1040 # Clean up
1041 #---------------------------------------------------------------------
1042
1043 tidy:
1044 !if "$(TCLLIB)" != "$(TCLIMPLIB)"
1045 @echo Removing $(TCLLIB) ...
1046 @if exist $(TCLLIB) del $(TCLLIB)
1047 !endif
1048 @echo Removing $(TCLIMPLIB) ...
1049 @if exist $(TCLIMPLIB) del $(TCLIMPLIB)
1050 @echo Removing $(TCLSH) ...
1051 @if exist $(TCLSH) del $(TCLSH)
1052 @echo Removing $(TCLTEST) ...
1053 @if exist $(TCLTEST) del $(TCLTEST)
1054 @echo Removing $(TCLDDELIB) ...
1055 @if exist $(TCLDDELIB) del $(TCLDDELIB)
1056 @echo Removing $(TCLREGLIB) ...
1057 @if exist $(TCLREGLIB) del $(TCLREGLIB)
1058
1059 clean: default-clean clean-pkgs
1060 hose: default-hose hose-pkgs
1061 realclean: hose
1062 .PHONY:
1063
1064 # Local Variables:
1065 # mode: makefile
1066 # End: