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.
Commit
5df59eba03c9aff4b0289528ac99338f159c2e1f
Parent
6e6e55a12d471b0…
1 file changed
+35
-11
+35
-11
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -8,11 +8,10 @@ | ||
| 8 | 8 | # |
| 9 | 9 | SRCDIR = src |
| 10 | 10 | |
| 11 | 11 | #### The directory into which object code files should be written. |
| 12 | 12 | # |
| 13 | -# | |
| 14 | 13 | OBJDIR = wbld |
| 15 | 14 | |
| 16 | 15 | #### C Compiler and options for use in building executables that |
| 17 | 16 | # will run on the platform that is doing the build. This is used |
| 18 | 17 | # to compile code-generator programs as part of the build process. |
| @@ -25,24 +24,40 @@ | ||
| 25 | 24 | FOSSIL_ENABLE_SSL=1 |
| 26 | 25 | |
| 27 | 26 | #### Enable scripting support via Tcl/Tk |
| 28 | 27 | # |
| 29 | 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 | |
| 30 | 34 | |
| 31 | 35 | #### 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. | |
| 33 | 39 | # |
| 34 | 40 | ZLIBDIR = $(SRCDIR)/../zlib-1.2.5 |
| 35 | 41 | |
| 36 | 42 | #### 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. | |
| 38 | 46 | # |
| 39 | 47 | OPENSSLDIR = $(SRCDIR)/../openssl-1.0.0d |
| 40 | 48 | |
| 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. | |
| 44 | 59 | # |
| 45 | 60 | TCLDIR = $(SRCDIR)/../tcl-8.6 |
| 46 | 61 | |
| 47 | 62 | #### C Compile and options for use in building executables that |
| 48 | 63 | # will run on the target platform. This is usually the same |
| @@ -57,41 +72,50 @@ | ||
| 57 | 72 | TCC += -L$(OPENSSLDIR) -I$(OPENSSLDIR)/include |
| 58 | 73 | endif |
| 59 | 74 | |
| 60 | 75 | # With Tcl support |
| 61 | 76 | ifdef FOSSIL_ENABLE_TCL |
| 77 | +ifdef FOSSIL_TCL_SOURCE | |
| 78 | +TCC += -L$(TCLDIR)/win -I$(TCLDIR)/generic -I$(TCLDIR)/win | |
| 79 | +else | |
| 62 | 80 | TCC += -L$(TCLDIR)/lib -I$(TCLDIR)/include |
| 81 | +endif | |
| 63 | 82 | endif |
| 64 | 83 | |
| 65 | 84 | # With HTTPS support |
| 66 | 85 | ifdef FOSSIL_ENABLE_SSL |
| 67 | 86 | TCC += -DFOSSIL_ENABLE_SSL=1 |
| 68 | 87 | endif |
| 69 | 88 | |
| 70 | -# With Tcl support | |
| 89 | +# With Tcl support (statically linked) | |
| 71 | 90 | ifdef FOSSIL_ENABLE_TCL |
| 72 | 91 | TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD |
| 73 | 92 | endif |
| 74 | 93 | |
| 75 | 94 | #### Extra arguments for linking the finished binary. Fossil needs |
| 76 | 95 | # 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 | |
| 78 | 97 | # so that we can build a static executable that will run in a |
| 79 | 98 | # chroot jail. |
| 80 | 99 | # |
| 81 | 100 | LIB = -static |
| 101 | +LIB += -lmingwex -lz | |
| 82 | 102 | |
| 83 | -# OpenSSL: | |
| 103 | +# OpenSSL: Add the necessary libaries required. | |
| 84 | 104 | ifdef FOSSIL_ENABLE_SSL |
| 85 | 105 | LIB += -lssl -lcrypto -lgdi32 |
| 86 | 106 | endif |
| 87 | 107 | |
| 108 | +# Tcl: Which Tcl library do we want to use (8.4, 8.5, 8.6, etc)? | |
| 88 | 109 | ifdef FOSSIL_ENABLE_TCL |
| 89 | -LIB += -ltcl86s | |
| 110 | +LIB += -ltcl86 | |
| 90 | 111 | endif |
| 91 | 112 | |
| 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 | |
| 93 | 117 | |
| 94 | 118 | #### Tcl shell for use in running the fossil testsuite. This is only |
| 95 | 119 | # used for testing. If you do not run |
| 96 | 120 | # |
| 97 | 121 | TCLSH = tclsh |
| 98 | 122 |
| --- 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 |