Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | After autosetup checks for the existence of tclsh in the PATH, it now
checks whether it's at least version 8.6, because macOS is still
shipping 8.5, despite it being nearly 6 years old. If we find an old
tclsh, try to find the Homebrew tcl-tk package, and use that version
instead. This is not a macOS or Homebrew specific change in principle:
we can extend this logic for other systems to find their best Tcl/Tk
version, as needed.
On systems where autosetup is used, this only affects "make test". There are other uses of tclsh in this tree which may also benefit from our PATH discoveries, but this checkin doesn't update those. This checkin also doesn't try to address similar problems on other platforms, such as the "TCLSH = tclsh" line in Makefile.mingw. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | tclsh-macos |
Files: | files | file ages | folders |
SHA3-256: |
e449cb09c18004ed6034f2742ad0bf91 |
User & Date: | wyoung 2018-09-02 20:33:41.707 |
References
2018-09-02
| ||
21:46 | Fixed an incorrect Tcl string comparison checked in with [e449cb09]. ... (Closed-Leaf check-in: c94617b5 user: wyoung tags: tclsh-macos) | |
Context
2018-09-02
| ||
21:00 | Explained "Why can't we use Jim Tcl for the test suite?" in the auto.def comment above the check for a suitable tclsh version. Basically, I tried it and then documented a few of the resulting failures. ... (check-in: 91eaef61 user: wyoung tags: tclsh-macos) | |
20:33 |
After autosetup checks for the existence of tclsh in the PATH, it now
checks whether it's at least version 8.6, because macOS is still
shipping 8.5, despite it being nearly 6 years old. If we find an old
tclsh, try to find the Homebrew tcl-tk package, and use that version
instead. This is not a macOS or Homebrew specific change in principle:
we can extend this logic for other systems to find their best Tcl/Tk
version, as needed.
On systems where autosetup is used, this only affects "make test". There are other uses of tclsh in this tree which may also benefit from our PATH discoveries, but this checkin doesn't update those. This checkin also doesn't try to address similar problems on other platforms, such as the "TCLSH = tclsh" line in Makefile.mingw. ... (check-in: e449cb09 user: wyoung tags: tclsh-macos) | |
10:07 | In the file browser, limit the maximum number of columns to be the number of files, so that a single file is never split across two columns. ... (check-in: e585c3e6 user: drh tags: trunk) | |
Changes
Changes to Makefile.in.
︙ | ︙ | |||
32 33 34 35 36 37 38 | E = @EXEEXT@ TCC = @CC@ #### Tcl shell for use in running the fossil testsuite. If you do not # care about testing the end result, this can be blank. # | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | E = @EXEEXT@ TCC = @CC@ #### Tcl shell for use in running the fossil testsuite. If you do not # care about testing the end result, this can be blank. # TCLSH = @TCLSH@ CFLAGS = @CFLAGS@ LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ BCCFLAGS = @CPPFLAGS@ $(CFLAGS) TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H INSTALLDIR = $(DESTDIR)@prefix@/bin USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@ |
︙ | ︙ |
Changes to auto.def.
︙ | ︙ | |||
31 32 33 34 35 36 37 | cc-with {-includes {stdint.h inttypes.h}} { cc-check-types uint32_t uint16_t int16_t uint8_t } # Use pread/pwrite system calls in place of seek + read/write if possible define USE_PREAD [cc-check-functions pread] | | > > > > > > > > > > > > > > > > > > > > > > > > | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | cc-with {-includes {stdint.h inttypes.h}} { cc-check-types uint32_t uint16_t int16_t uint8_t } # Use pread/pwrite system calls in place of seek + read/write if possible define USE_PREAD [cc-check-functions pread] # Find tclsh for the test suite. We can't use jimsh for this: the test # suite uses features of Tcl that Jim doesn't support. cc-check-progs tclsh set hbtd /usr/local/Cellar/tcl-tk if {[get-define TCLSH] != false} { set v [exec /bin/sh -c "echo 'puts \$tcl_version' | tclsh"] if {[expr $v >= 8.6]} { msg-result "Found Tclsh version $v in the PATH." define TCLSH tclsh } elseif {[file isdirectory $hbtd]} { # This is a macOS system with the Homebrew version of Tcl/Tk # installed. Select the newest version. It won't normally be # in the PATH to avoid shadowing /usr/bin/tclsh, and even if it # were in the PATH, it's bad practice to put /usr/local/bin (the # Homebrew default) ahead of /usr/bin, especially given that # it's user-writeable by default with Homebrew. Thus, we can be # pretty sure the only way to call it is with an absolute path. set v [exec ls -tr $hbtd | tail -1] set path "$hbtd/$v/bin/tclsh" define TCLSH $path msg-result "Using Homebrew Tcl/Tk version $path." } else { msg-result "WARNING: tclsh $v found; need >= 8.6 for 'make test'." define TCLSH false ;# force "make test" failure via /usr/bin/false } } define EXTRA_CFLAGS "-Wall" define EXTRA_LDFLAGS "" define USE_SYSTEM_SQLITE 0 define USE_LINENOISE 0 define FOSSIL_ENABLE_MINIZ 0 define USE_MMAN_H 0 |
︙ | ︙ |
Changes to test/tester.tcl.
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # This is the main test script. To run a regression test, do this: # # tclsh ../test/tester.tcl ../bld/fossil # # Where ../test/tester.tcl is the name of this file and ../bld/fossil # is the name of the executable to be tested. # set testfiledir [file normalize [file dirname [info script]]] set testrundir [pwd] set testdir [file normalize [file dirname $argv0]] set fossilexe [file normalize [lindex $argv 0]] if {$tcl_platform(platform) eq "windows" && \ | > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # This is the main test script. To run a regression test, do this: # # tclsh ../test/tester.tcl ../bld/fossil # # Where ../test/tester.tcl is the name of this file and ../bld/fossil # is the name of the executable to be tested. # # We use some things introduced in 8.6 such as lmap. auto.def should # have found us a suitable Tcl installation. package require Tcl 8.6 set testfiledir [file normalize [file dirname [info script]]] set testrundir [pwd] set testdir [file normalize [file dirname $argv0]] set fossilexe [file normalize [lindex $argv 0]] if {$tcl_platform(platform) eq "windows" && \ |
︙ | ︙ |