Fossil SCM

Allow the Tcl source directory to be used instead of the Tcl install directory if FOSSIL_TCL_SOURCE defined. Also, add and/or modify explanatory comments.

mistachkin 2011-09-27 06:44 UTC tcl-integration
Commit 5df59eba03c9aff4b0289528ac99338f159c2e1f
1 file changed +35 -11
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -8,11 +8,10 @@
88
#
99
SRCDIR = src
1010
1111
#### The directory into which object code files should be written.
1212
#
13
-#
1413
OBJDIR = wbld
1514
1615
#### C Compiler and options for use in building executables that
1716
# will run on the platform that is doing the build. This is used
1817
# to compile code-generator programs as part of the build process.
@@ -25,24 +24,40 @@
2524
FOSSIL_ENABLE_SSL=1
2625
2726
#### Enable scripting support via Tcl/Tk
2827
#
2928
FOSSIL_ENABLE_TCL=1
29
+
30
+#### Use the Tcl source directory instead of the install directory?
31
+# This is useful when Tcl has been compiled statically with MinGW.
32
+#
33
+FOSSIL_TCL_SOURCE=1
3034
3135
#### The directory where the zlib library source code is located.
32
-#
36
+# The recommended usage here is to use the Sysinternals junction tool
37
+# to create a hard link between an "zlib-1.x.y" sub-directory of the
38
+# Fossil source code directory and the target zlib source directory.
3339
#
3440
ZLIBDIR = $(SRCDIR)/../zlib-1.2.5
3541
3642
#### The directory where the OpenSSL library source code is located.
37
-#
43
+# The recommended usage here is to use the Sysinternals junction tool
44
+# to create a hard link between an "openssl-1.x" sub-directory of the
45
+# Fossil source code directory and the target OpenSSL source directory.
3846
#
3947
OPENSSLDIR = $(SRCDIR)/../openssl-1.0.0d
4048
41
-#### The directory where the Tcl library is installed. This directory
42
-# must have "include" and "lib" sub-directories.
43
-#
49
+#### Either the directory where the Tcl library is installed or the Tcl
50
+# source code directory resides (depending on the value of the macro
51
+# FOSSIL_TCL_SOURCE). If this points to the Tcl install directory,
52
+# this directory must have "include" and "lib" sub-directories. If
53
+# this points to the Tcl source code directory, this directory must
54
+# have "generic" and "win" sub-directories. The recommended usage
55
+# here is to use the Sysinternals junction tool to create a hard
56
+# link between a "tcl-8.x" sub-directory of the Fossil source code
57
+# directory and the target Tcl directory. This removes the need to
58
+# hard-code the necessary paths in this Makefile.
4459
#
4560
TCLDIR = $(SRCDIR)/../tcl-8.6
4661
4762
#### C Compile and options for use in building executables that
4863
# will run on the target platform. This is usually the same
@@ -57,41 +72,50 @@
5772
TCC += -L$(OPENSSLDIR) -I$(OPENSSLDIR)/include
5873
endif
5974
6075
# With Tcl support
6176
ifdef FOSSIL_ENABLE_TCL
77
+ifdef FOSSIL_TCL_SOURCE
78
+TCC += -L$(TCLDIR)/win -I$(TCLDIR)/generic -I$(TCLDIR)/win
79
+else
6280
TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include
81
+endif
6382
endif
6483
6584
# With HTTPS support
6685
ifdef FOSSIL_ENABLE_SSL
6786
TCC += -DFOSSIL_ENABLE_SSL=1
6887
endif
6988
70
-# With Tcl support
89
+# With Tcl support (statically linked)
7190
ifdef FOSSIL_ENABLE_TCL
7291
TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
7392
endif
7493
7594
#### Extra arguments for linking the finished binary. Fossil needs
7695
# to link against the Z-Lib compression library. There are no
77
-# other dependencies. We sometimes add the -static option here
96
+# other mandatory dependencies. We add the -static option here
7897
# so that we can build a static executable that will run in a
7998
# chroot jail.
8099
#
81100
LIB = -static
101
+LIB += -lmingwex -lz
82102
83
-# OpenSSL:
103
+# OpenSSL: Add the necessary libaries required.
84104
ifdef FOSSIL_ENABLE_SSL
85105
LIB += -lssl -lcrypto -lgdi32
86106
endif
87107
108
+# Tcl: Which Tcl library do we want to use (8.4, 8.5, 8.6, etc)?
88109
ifdef FOSSIL_ENABLE_TCL
89
-LIB += -ltcl86s
110
+LIB += -ltcl86
90111
endif
91112
92
-LIB += -lmingwex -lz -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32
113
+#### These libraries MUST appear in the same order as they do for Tcl
114
+# or linking with it will not work (exact reason unknown).
115
+#
116
+LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32
93117
94118
#### Tcl shell for use in running the fossil testsuite. This is only
95119
# used for testing. If you do not run
96120
#
97121
TCLSH = tclsh
98122
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -8,11 +8,10 @@
8 #
9 SRCDIR = src
10
11 #### The directory into which object code files should be written.
12 #
13 #
14 OBJDIR = wbld
15
16 #### C Compiler and options for use in building executables that
17 # will run on the platform that is doing the build. This is used
18 # to compile code-generator programs as part of the build process.
@@ -25,24 +24,40 @@
25 FOSSIL_ENABLE_SSL=1
26
27 #### Enable scripting support via Tcl/Tk
28 #
29 FOSSIL_ENABLE_TCL=1
 
 
 
 
 
30
31 #### The directory where the zlib library source code is located.
32 #
 
 
33 #
34 ZLIBDIR = $(SRCDIR)/../zlib-1.2.5
35
36 #### The directory where the OpenSSL library source code is located.
37 #
 
 
38 #
39 OPENSSLDIR = $(SRCDIR)/../openssl-1.0.0d
40
41 #### The directory where the Tcl library is installed. This directory
42 # must have "include" and "lib" sub-directories.
43 #
 
 
 
 
 
 
 
44 #
45 TCLDIR = $(SRCDIR)/../tcl-8.6
46
47 #### C Compile and options for use in building executables that
48 # will run on the target platform. This is usually the same
@@ -57,41 +72,50 @@
57 TCC += -L$(OPENSSLDIR) -I$(OPENSSLDIR)/include
58 endif
59
60 # With Tcl support
61 ifdef FOSSIL_ENABLE_TCL
 
 
 
62 TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include
 
63 endif
64
65 # With HTTPS support
66 ifdef FOSSIL_ENABLE_SSL
67 TCC += -DFOSSIL_ENABLE_SSL=1
68 endif
69
70 # With Tcl support
71 ifdef FOSSIL_ENABLE_TCL
72 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
73 endif
74
75 #### Extra arguments for linking the finished binary. Fossil needs
76 # to link against the Z-Lib compression library. There are no
77 # other dependencies. We sometimes add the -static option here
78 # so that we can build a static executable that will run in a
79 # chroot jail.
80 #
81 LIB = -static
 
82
83 # OpenSSL:
84 ifdef FOSSIL_ENABLE_SSL
85 LIB += -lssl -lcrypto -lgdi32
86 endif
87
 
88 ifdef FOSSIL_ENABLE_TCL
89 LIB += -ltcl86s
90 endif
91
92 LIB += -lmingwex -lz -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32
 
 
 
93
94 #### Tcl shell for use in running the fossil testsuite. This is only
95 # used for testing. If you do not run
96 #
97 TCLSH = tclsh
98
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -8,11 +8,10 @@
8 #
9 SRCDIR = src
10
11 #### The directory into which object code files should be written.
12 #
 
13 OBJDIR = wbld
14
15 #### C Compiler and options for use in building executables that
16 # will run on the platform that is doing the build. This is used
17 # to compile code-generator programs as part of the build process.
@@ -25,24 +24,40 @@
24 FOSSIL_ENABLE_SSL=1
25
26 #### Enable scripting support via Tcl/Tk
27 #
28 FOSSIL_ENABLE_TCL=1
29
30 #### Use the Tcl source directory instead of the install directory?
31 # This is useful when Tcl has been compiled statically with MinGW.
32 #
33 FOSSIL_TCL_SOURCE=1
34
35 #### The directory where the zlib library source code is located.
36 # The recommended usage here is to use the Sysinternals junction tool
37 # to create a hard link between an "zlib-1.x.y" sub-directory of the
38 # Fossil source code directory and the target zlib source directory.
39 #
40 ZLIBDIR = $(SRCDIR)/../zlib-1.2.5
41
42 #### The directory where the OpenSSL library source code is located.
43 # The recommended usage here is to use the Sysinternals junction tool
44 # to create a hard link between an "openssl-1.x" sub-directory of the
45 # Fossil source code directory and the target OpenSSL source directory.
46 #
47 OPENSSLDIR = $(SRCDIR)/../openssl-1.0.0d
48
49 #### Either the directory where the Tcl library is installed or the Tcl
50 # source code directory resides (depending on the value of the macro
51 # FOSSIL_TCL_SOURCE). If this points to the Tcl install directory,
52 # this directory must have "include" and "lib" sub-directories. If
53 # this points to the Tcl source code directory, this directory must
54 # have "generic" and "win" sub-directories. The recommended usage
55 # here is to use the Sysinternals junction tool to create a hard
56 # link between a "tcl-8.x" sub-directory of the Fossil source code
57 # directory and the target Tcl directory. This removes the need to
58 # hard-code the necessary paths in this Makefile.
59 #
60 TCLDIR = $(SRCDIR)/../tcl-8.6
61
62 #### C Compile and options for use in building executables that
63 # will run on the target platform. This is usually the same
@@ -57,41 +72,50 @@
72 TCC += -L$(OPENSSLDIR) -I$(OPENSSLDIR)/include
73 endif
74
75 # With Tcl support
76 ifdef FOSSIL_ENABLE_TCL
77 ifdef FOSSIL_TCL_SOURCE
78 TCC += -L$(TCLDIR)/win -I$(TCLDIR)/generic -I$(TCLDIR)/win
79 else
80 TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include
81 endif
82 endif
83
84 # With HTTPS support
85 ifdef FOSSIL_ENABLE_SSL
86 TCC += -DFOSSIL_ENABLE_SSL=1
87 endif
88
89 # With Tcl support (statically linked)
90 ifdef FOSSIL_ENABLE_TCL
91 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
92 endif
93
94 #### Extra arguments for linking the finished binary. Fossil needs
95 # to link against the Z-Lib compression library. There are no
96 # other mandatory dependencies. We add the -static option here
97 # so that we can build a static executable that will run in a
98 # chroot jail.
99 #
100 LIB = -static
101 LIB += -lmingwex -lz
102
103 # OpenSSL: Add the necessary libaries required.
104 ifdef FOSSIL_ENABLE_SSL
105 LIB += -lssl -lcrypto -lgdi32
106 endif
107
108 # Tcl: Which Tcl library do we want to use (8.4, 8.5, 8.6, etc)?
109 ifdef FOSSIL_ENABLE_TCL
110 LIB += -ltcl86
111 endif
112
113 #### These libraries MUST appear in the same order as they do for Tcl
114 # or linking with it will not work (exact reason unknown).
115 #
116 LIB += -lnetapi32 -lkernel32 -luser32 -ladvapi32 -lws2_32
117
118 #### Tcl shell for use in running the fossil testsuite. This is only
119 # used for testing. If you do not run
120 #
121 TCLSH = tclsh
122

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button