Diff
Not logged in

Differences From Artifact [6ebbdccb5d]:

To Artifact [81bbb44263]:


1
2
3
4
5




6
7
8

9
10
11
12
13
14
15




16
17

18
19
20
21
22




23
24
25
26
27
28
29
30
31
32
33
34
35




36
37
38
39
40
41



42
43
44
45
46
47
48
1




2
3
4
5

6

7
8
9
10




11
12
13
14


15
16




17
18
19
20

21
22
23
24
25
26
27
28




29
30
31
32

33
34



35
36
37
38
39
40
41
42
43
44

-
-
-
-
+
+
+
+
-

-
+



-
-
-
-
+
+
+
+
-
-
+

-
-
-
-
+
+
+
+
-








-
-
-
-
+
+
+
+
-


-
-
-
+
+
+







#
# This file is a Makefile for Tcl.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# This file is a Makefile for Tcl.  If it has the name "Makefile.in" then it
# is a template for a Makefile; to generate the actual Makefile, run
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
# actual Makefile.
#
# RCS: @(#) $Id: Makefile.in,v 1.109 2006/11/09 16:52:31 dgp Exp $
# RCS: @(#) $Id: Makefile.in,v 1.110 2006/11/25 17:18:10 dkf Exp $

VERSION = @TCL_VERSION@

#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
#--------------------------------------------------------------------------
# Things you can change to personalize the Makefile for your own site (you can
# make these changes in either Makefile.in or Makefile, but changes to
# Makefile will get lost if you re-run the configuration script).
# the configuration script).
#----------------------------------------------------------------
#--------------------------------------------------------------------------

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# Default top-level directories in which to install architecture-specific
# files (exec_prefix) and machine-independent files such as scripts (prefix).
# The values specified here may be overridden at configure-time with the
# --exec-prefix and --prefix options to the "configure" script.
# to the "configure" script.

prefix			= @prefix@
exec_prefix		= @exec_prefix@
bindir			= @bindir@
libdir			= @libdir@
includedir		= @includedir@
mandir			= @mandir@

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# The following definition can be set to non-null for special systems like AFS
# with replication. It allows the pathnames used for installation to be
# different than those used for actually reference files at run-time.
# INSTALL_ROOT is prepended to $prefix and $exec_prefix when installing files.
# when installing files.
INSTALL_ROOT	=

# Directory from which applications will reference the library of Tcl
# scripts (note: you can set the TCL_LIBRARY environment variable at
# run-time to override this value):
# Directory from which applications will reference the library of Tcl scripts
# (note: you can set the TCL_LIBRARY environment variable at run-time to
# override this value):
TCL_LIBRARY	= $(prefix)/lib/tcl$(VERSION)

# Path to use at runtime to refer to LIB_INSTALL_DIR:
LIB_RUNTIME_DIR		= $(libdir)

# Directory in which to install the program tclsh:
BIN_INSTALL_DIR		= $(INSTALL_ROOT)$(bindir)
61
62
63
64
65
66
67
68

69
70
71
72

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94


95
96
97
98
99
100
101
57
58
59
60
61
62
63

64

65
66

67

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86


87
88
89
90
91
92
93
94
95







-
+
-


-
+
-



















-
-
+
+








# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR		= $(INSTALL_ROOT)$(mandir)

# Directory in which to install manual entry for tclsh:
MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1

# Directory in which to install manual entries for Tcl's C library
# Directory in which to install manual entries for Tcl's C library procedures:
# procedures:
MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3

# Directory in which to install manual entries for the built-in
# Directory in which to install manual entries for the built-in Tcl commands:
# Tcl commands:
MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann

# Libraries built with optimization switches have this additional extension
TCL_DBGX = @TCL_DBGX@

# warning flags
CFLAGS_WARNING = @CFLAGS_WARNING@

# The default switches for optimization or debugging
CFLAGS_DEBUG    = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE	= @CFLAGS_OPTIMIZE@

# To change the compiler switches, for example to change from optimization to
# debugging symbols, change the following line:
#CFLAGS = 		$(CFLAGS_DEBUG)
#CFLAGS = 		$(CFLAGS_OPTIMIZE)
#CFLAGS = 		$(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
CFLAGS = 		@CFLAGS@ @CFLAGS_DEFAULT@

# To enable compilation debugging reverse the comment characters on
# one of the following lines.
# To enable compilation debugging reverse the comment characters on one of the
# following lines.
COMPILE_DEBUG_FLAGS =
#COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG
#COMPILE_DEBUG_FLAGS = -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS

# Special compiler flags to use when building man2tcl on Windows.
MAN2TCLFLAGS =		@MAN2TCLFLAGS@

136
137
138
139
140
141
142
143
144
145
146




147
148
149
150
151
152
153
154
155
156
157
158


159
160
161
162
163
164
165
166
130
131
132
133
134
135
136




137
138
139
140

141
142
143
144
145
146
147
148
149


150
151

152
153
154
155
156
157
158







-
-
-
-
+
+
+
+
-









-
-
+
+
-







REG_LIB_FILE		= tclreg$(REGVER)${LIBSUFFIX}
PIPE_DLL_FILE		= tclpip$(VER)${DLLSUFFIX}

SHARED_LIBRARIES 	= $(TCL_DLL_FILE) $(TCL_STUB_LIB_FILE) \
			  $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE)
STATIC_LIBRARIES	= $(TCL_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE)

# TCL_EXE is the name of a tclsh executable that is available *BEFORE*
# running make for the first time. Certain build targets (make genstubs)
# need it to be available on the PATH. This executable should *NOT* be
# required just to do a normal build although it can be required to run
# TCL_EXE is the name of a tclsh executable that is available *BEFORE* running
# make for the first time. Certain build targets (make genstubs) need it to be
# available on the PATH. This executable should *NOT* be required just to do a
# normal build although it can be required to run make dist.
# make dist.
TCL_EXE			= tclsh

TCLSH			= tclsh$(VER)${EXESUFFIX}
TCLTEST			= tcltest${EXEEXT}
CAT32			= cat32$(EXEEXT)
MAN2TCL			= man2tcl$(EXEEXT)

@SET_MAKE@

# Setting the VPATH variable to a list of paths will cause the 
# makefile to look into these paths when resolving .c to .obj
# Setting the VPATH variable to a list of paths will cause the Makefile to
# look into these paths when resolving .c to .obj dependencies.
# dependencies.

VPATH = $(GENERIC_DIR):$(TOMMATH_DIR):$(WIN_DIR):$(COMPAT_DIR)

AR		= @AR@
RANLIB		= @RANLIB@
CC		= @CC@
RC		= @RC@
246
247
248
249
250
251
252

253
254
255
256
257
258
259
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252







+







	tclIOSock.$(OBJEXT) \
	tclIOUtil.$(OBJEXT) \
	tclLink.$(OBJEXT) \
	tclLiteral.$(OBJEXT) \
	tclListObj.$(OBJEXT) \
	tclLoad.$(OBJEXT) \
	tclMain.$(OBJEXT) \
	tclMathOp.$(OBJEXT) \
	tclNamesp.$(OBJEXT) \
	tclNotify.$(OBJEXT) \
	tclObj.$(OBJEXT) \
	tclPanic.$(OBJEXT) \
	tclParse.$(OBJEXT) \
	tclPathObj.$(OBJEXT) \
	tclPipe.$(OBJEXT) \
355
356
357
358
359
360
361
362

363
364
365
366
367
368
369
348
349
350
351
352
353
354

355
356
357
358
359
360
361
362







-
+







	tclWinFile.$(OBJEXT) \
	tclWinInit.$(OBJEXT) \
	tclWinLoad.$(OBJEXT) \
	tclWinNotify.$(OBJEXT) \
	tclWinPipe.$(OBJEXT) \
	tclWinSock.$(OBJEXT) \
	tclWinThrd.$(OBJEXT) \
	tclWinTime.$(OBJEXT) 
	tclWinTime.$(OBJEXT)

COMPAT_OBJS = \
	strtoll.$(OBJEXT) strtoull.$(OBJEXT)

PIPE_OBJS = stub16.$(OBJEXT)

DDE_OBJS = tclWinDde.$(OBJEXT)
406
407
408
409
410
411
412
413
414


415
416
417
418
419
420
421
399
400
401
402
403
404
405


406
407
408
409
410
411
412
413
414







-
-
+
+








cat32.$(OBJEXT): cat.c
	$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)

$(CAT32): cat32.$(OBJEXT)
	$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LIBS) $(LDFLAGS_CONSOLE)

# The following targets are configured by autoconf to generate either
# a shared library or static library
# The following targets are configured by autoconf to generate either a shared
# library or static library

${TCL_STUB_LIB_FILE}: ${STUB_OBJS}
	@$(RM) ${TCL_STUB_LIB_FILE}
	@MAKE_LIB@ ${STUB_OBJS}
	@POST_MAKE_LIB@

${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES)
439
440
441
442
443
444
445
446

447
448
449
450
451
452
453

454
455
456
457
458
459
460
432
433
434
435
436
437
438

439

440
441
442
443
444

445
446
447
448
449
450
451
452







-
+
-





-
+







	@$(RM) ${REG_DLL_FILE}
	@MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)

${REG_LIB_FILE}: ${REG_OBJS} ${TCL_LIB_FILE}
	@$(RM) ${REG_LIB_FILE}
	@MAKE_LIB@ ${REG_OBJS} ${TCL_LIB_FILE}

# PIPE_DLL_FILE is actually an executable, don't build it
# PIPE_DLL_FILE is actually an executable, don't build it like a DLL.
# like a DLL.

${PIPE_DLL_FILE}: ${PIPE_OBJS}
	@$(RM) ${PIPE_DLL_FILE}
	@MAKE_EXE@ $(CFLAGS) ${PIPE_OBJS} $(LIBS) $(LDFLAGS_CONSOLE)

# Add the object extension to the implicit rules.  By default .obj is not
# Add the object extension to the implicit rules. By default .obj is not
# automatically added.

.SUFFIXES: .${OBJEXT}
.SUFFIXES: .$(RES)
.SUFFIXES: .rc

# Special case object targets
487
488
489
490
491
492
493
494
495
496



497
498
499


500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518


519
520
521
522
523
524
525
526
527
528
529
530
531
532
533


534
535
536



537
538
539
540
541
542
543
544
545


546
547
548
549
550
551
552
553
479
480
481
482
483
484
485



486
487
488



489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507


508
509
510
511
512
513
514
515
516
517
518
519
520
521
522


523
524



525
526
527
528
529
530
531
532
533
534


535
536

537
538
539
540
541
542
543







-
-
-
+
+
+
-
-
-
+
+

















-
-
+
+













-
-
+
+
-
-
-
+
+
+







-
-
+
+
-







	$(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME)

tclWinDde.${OBJEXT} : tclWinDde.c
	$(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME)

# TIP #59, embedding of configuration information into the binary library.
#
# Part of Tcl's configuration information are the paths where it was
# installed and where it will look for its libraries (which can be
# different). We derive this information from the variables which can
# Part of Tcl's configuration information are the paths where it was installed
# and where it will look for its libraries (which can be different). We derive
# this information from the variables which can be overridden by the user. As
# be overridden by the user. As every path can be configured
# separately we do not remember one general prefix/exec_prefix but all
# the different paths individually.
# every path can be configured separately we do not remember one general
# prefix/exec_prefix but all the different paths individually.

tclPkgConfig.${OBJEXT}: tclPkgConfig.c
	$(CC)	-c $(CC_SWITCHES)			\
		-DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR)\" \
		-DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR)\" \
		-DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR)\" \
		-DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR)\" \
		-DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \
		\
		-DCFG_RUNTIME_LIBDIR=\"$(libdir)\" \
		-DCFG_RUNTIME_BINDIR=\"$(bindir)\" \
		-DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY)\" \
		-DCFG_RUNTIME_INCDIR=\"$(includedir)\" \
		-DCFG_RUNTIME_DOCDIR=\"$(mandir)\" \
		-DBUILD_tcl \
		@DEPARG@ $(CC_OBJNAME)

# The following objects are part of the stub library and should not
# be built as DLL objects but none of the symbols should be exported
# The following objects are part of the stub library and should not be built
# as DLL objects but none of the symbols should be exported

tclStubLib.${OBJEXT}: tclStubLib.c
	$(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME)


# Implicit rule for all object files that will end up in the Tcl library

.c.${OBJEXT}:
	$(CC) -c $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME)

.rc.$(RES):
	$(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(WIN_DIR_NATIVE)" @DEPARG@

# The following target generates the file generic/tclDate.c 
# from the yacc grammar found in generic/tclGetDate.y.  This is
# The following target generates the file generic/tclDate.c from the yacc
# grammar found in generic/tclGetDate.y. This is only run by hand as yacc is
# only run by hand as yacc is not available in all environments.
# The name of the .c file is different than the name of the .y file
# so that make doesn't try to automatically regenerate the .c file.
# not available in all environments. The name of the .c file is different than
# the name of the .y file so that make doesn't try to automatically regenerate
# the .c file.

gendate:
	bison --output-file=$(GENERIC_DIR)/tclDate.c \
	--name-prefix=TclDate \
	--no-lines \
	$(GENERIC_DIR)/tclGetDate.y

# The following target generates the file generic/tclTomMath.h.
# It needs to be run (and the results checked) after updating
# The following target generates the file generic/tclTomMath.h. It needs to be
# run (and the results checked) after updating to a new release of libtommath.
# to a new release of libtommath.

gentommath_h:
	$(TCL_EXE) "$(ROOT_DIR_NATIVE)\tools\fix_tommath_h.tcl" \
		"$(TOMMATH_DIR_NATIVE)\tommath.h" \
		> "$(GENERIC_DIR_NATIVE)\tclTomMath.h"

install: all install-binaries install-libraries install-doc
687
688
689
690
691
692
693
694
695


696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711


712
713
714
715
716
717
718
677
678
679
680
681
682
683


684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699


700
701
702
703
704
705
706
707
708







-
-
+
+














-
-
+
+







	@for i in "$(GENERIC_DIR)/tclInt.h" "$(GENERIC_DIR)/tclIntDecls.h" \
		"$(GENERIC_DIR)/tclIntPlatDecls.h" "$(GENERIC_DIR)/tclPort.h" \
		"$(WIN_DIR)/tclWinPort.h" ; \
	    do \
	    $(COPY) "$$i" "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \
	    done;

# Specifying TESTFLAGS on the command line is the standard way to pass
# args to tcltest, ie:
# Specifying TESTFLAGS on the command line is the standard way to pass args to
# tcltest, i.e.:
#	% make test TESTFLAGS="-verbose bps -file fileName.test"

test: binaries $(TCLTEST)
	TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
	./$(TCLTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \
	-load "set ::ddelib [file normalize ${DDE_DLL_FILE}]; \
	set ::reglib [file normalize ${REG_DLL_FILE}]" | ./$(CAT32)

# Useful target to launch a built tcltest with the proper path,...
runtest: binaries $(TCLTEST)
	@TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
	./$(TCLTEST) $(TESTFLAGS) -load "set ::ddelib [file normalize ${DDE_DLL_FILE}]; \
	set ::reglib [file normalize ${REG_DLL_FILE}]" $(SCRIPT)

# This target can be used to run tclsh from the build directory
# via `make shell SCRIPT=foo.tcl`
# This target can be used to run tclsh from the build directory via
# `make shell SCRIPT=foo.tcl`
shell: binaries
	@TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
	./$(TCLSH) $(SCRIPT)

# This target can be used to run tclsh inside either gdb or insight
gdb: binaries
	@echo "set env TCL_LIBRARY=$(LIBRARY_DIR)" > gdb.run