Check-in [ff0d449b72]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com or submit via the online form
by Aug 20.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make sherpa modified and simplified as a standalone script Sherpa and Kettle re-engineered to work direct from script
Timelines: family | ancestors | descendants | both | autosetup
Files: files | file ages | folders
SHA1: ff0d449b72607650427b5703e4c338aec50d8aa7
User & Date: hypnotoad 2015-05-05 17:54:31
Context
2015-05-06
02:42
Adding in the -static-libgcc to prevent a dependency on mingw dlls check-in: ac26e907d3 user: hypnotoad tags: autosetup
2015-05-05
17:54
Make sherpa modified and simplified as a standalone script Sherpa and Kettle re-engineered to work direct from script check-in: ff0d449b72 user: hypnotoad tags: autosetup
2015-03-31
22:20
Ultimate fix for X11 on Macosx check-in: b303ef6ccc user: hypnotoad tags: autosetup
Changes
Unified Diff Ignore Whitespace Patch
Changes to Makefile.
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
49
50
51


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
reconfig:
	rm -f autosetup/jimsh0.exe autosetup/jimsh0
	ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
	${ODIE_BUILD_TCLSH} autosetup/autosetup $(ODIE_RECONFIG_OPTS)
	cp -a ${ODIE_SRC_DIR}/odieConfig.tcl ${LOCAL_REPO}/lib/odieConfig.tcl
	cp -a ${ODIE_SRC_DIR}/odieConfig.sh ${LOCAL_REPO}/lib/odieConfig.sh

install:
	$(SHELL) scripts/make_skel.sh
	$(SHELL) scripts/make_tcl.sh
	ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install all

	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl

packages:
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install all

upgrade:
	fossil update
	${ODIE_BUILD_TCLSH} scripts/upgrade.tcl
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install all

	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl

upgrade-tcl:
	fossil update
	$(SHELL) scripts/make_tcl.sh
	ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
	${ODIE_BUILD_TCLSH} scripts/upgrade.tcl
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install all

	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl

tcl:
	$(SHELL) scripts/make_tcl.sh

rebuild:
	$(SHELL) scripts/make_distclean.sh
	fossil update
	$(SHELL) scripts/make_tcl.sh
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install all
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl



distclean:
	$(SHELL) scripts/make_distclean.sh

basekit:
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl

odielib-rebuild:
	make -C src/odielib distclean
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install odielib
	
odielib:
	${ODIE_BUILD_TCLSH} scripts/sherpa.tcl install odielib

sqlite:
	${ODIE_BUILD_TCLSH} scripts/make_sqlite.tcl

sherpa: basekit sqlite odielib
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl


$(ODIE_MKHDR):
	$(CC) -o mkhdr.o scripts/mkhdr.c
	$(CC) mkhdr.o -o mkhdr${EXE_SUFFIX}
	cp -f mkhdr@EXE@ $(ODIE_MKHDR)

mkhdr: $(ODIE_MKHDR)







|



|
>

<

|
|


|

|
>

<


|



|
>

<






|

<
<

>
>







<
<
<
|
<
<

<
<
|
<

<







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


49
50
51
52
53
54
55
56
57
58



59


60


61

62

63
64
65
66
67
68
69
reconfig:
	rm -f autosetup/jimsh0.exe autosetup/jimsh0
	ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
	${ODIE_BUILD_TCLSH} autosetup/autosetup $(ODIE_RECONFIG_OPTS)
	cp -a ${ODIE_SRC_DIR}/odieConfig.tcl ${LOCAL_REPO}/lib/odieConfig.tcl
	cp -a ${ODIE_SRC_DIR}/odieConfig.sh ${LOCAL_REPO}/lib/odieConfig.sh

install: sherpa
	$(SHELL) scripts/make_skel.sh
	$(SHELL) scripts/make_tcl.sh
	ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl
	$(SHERPA) upgrade sqlite odielib tcllib
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl


packages: sherpa
	$(SHERPA) install sqlite odielib tcllib

upgrade:
	$(FOSSIL) update
	${ODIE_BUILD_TCLSH} scripts/upgrade.tcl
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl
	$(SHERPA) upgrade sqlite odielib tcllib
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl


upgrade-tcl:
	$(FOSSIL) update
	$(SHELL) scripts/make_tcl.sh
	ODIE_BUILD_TCLSH=`autosetup/find-tclsh`
	${ODIE_BUILD_TCLSH} scripts/upgrade.tcl
	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl
	$(SHERPA) upgrade sqlite odielib tcllib
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl


tcl:
	$(SHELL) scripts/make_tcl.sh

rebuild:
	$(SHELL) scripts/make_distclean.sh
	$(FOSSIL) update
	$(SHELL) scripts/make_tcl.sh


	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl
	$(SHERPA) upgrade sqlite odielib tcllib
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl

distclean:
	$(SHELL) scripts/make_distclean.sh

basekit:
	${ODIE_BUILD_TCLSH} scripts/make_basekit.tcl




sherpa: $ODIE_DOWNLOAD/sherpa/sherpa.tcl





$ODIE_DOWNLOAD/sherpa/sherpa.tcl:

	$(ODIE_BUILD_TCLSH) scripts/make_sherpa.tcl


$(ODIE_MKHDR):
	$(CC) -o mkhdr.o scripts/mkhdr.c
	$(CC) mkhdr.o -o mkhdr${EXE_SUFFIX}
	cp -f mkhdr@EXE@ $(ODIE_MKHDR)

mkhdr: $(ODIE_MKHDR)
Changes to auto.def.
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use odie

switch [opt-val 64bit] {
  amd64 -
  x64 -
  x86_64 {
    set ::odie(64bit) 1

  }
  {} -
  detect {
  }
  default {
    set ::odie(64bit) [opt-bool 64bit]
  }







<







24
25
26
27
28
29
30

31
32
33
34
35
36
37
use odie

switch [opt-val 64bit] {
  amd64 -
  x64 -
  x86_64 {
    set ::odie(64bit) 1

  }
  {} -
  detect {
  }
  default {
    set ::odie(64bit) [opt-bool 64bit]
  }
Changes to autosetup/lib/odie.tcl.
272
273
274
275
276
277
278

279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308


309
310
311
312
313
314
315
  tk_config_flags {}
  64bit {}
  windows 0
  system generic
  target generic
  os generic
  os_version {}

  teacup_os generic
  cpu {}
  window_system {}
  fossil_checkout .fslckout
  teacup_profile {}
  tk_binary_platform {}
  mirror_url http://fossil.etoyoc.com/fossil
}

# Make sure srcdir is fully qualified!
set ::odie(cpu) [exec uname -m]
set ::odie(os)  [exec uname -s]
set ::odie(system) ${::odie(os)}-${::odie(cpu)}

set vfscp {cp -a}
set ::odie(windows) 0
set ::odie(64bit) [expr {$::odie(cpu) in {amd64 x64 x86_64}}]

###
# Sort out some slight differences between Visual studio
# based builds and mingw/cygwin
###
switch -glob -- [get-define build] {
  *-*-ming* - *-*-cygwin - *-*-msys {
    ###
    # Under mingw, 64 bit is not possible
    ###
    set odie(windows) 1
    set odie(os) cygwin
    set ::odie(64bit) 0


  }
  *win32* - *WIN32* {
    ###
    # With visual studio, 64 bit should be assumed
    # but is otherwise to taste
    ###
    set odie(windows) 1







>

















|









|
|

>
>







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
  tk_config_flags {}
  64bit {}
  windows 0
  system generic
  target generic
  os generic
  os_version {}
  teacup_cpu generic
  teacup_os generic
  cpu {}
  window_system {}
  fossil_checkout .fslckout
  teacup_profile {}
  tk_binary_platform {}
  mirror_url http://fossil.etoyoc.com/fossil
}

# Make sure srcdir is fully qualified!
set ::odie(cpu) [exec uname -m]
set ::odie(os)  [exec uname -s]
set ::odie(system) ${::odie(os)}-${::odie(cpu)}

set vfscp {cp -a}
set ::odie(windows) 0
set ::odie(64bit) [expr {$::odie(cpu) in {amd64 x64 x86_64}}]
set ::odie(teacup_cpu) $::odie(cpu)
###
# Sort out some slight differences between Visual studio
# based builds and mingw/cygwin
###
switch -glob -- [get-define build] {
  *-*-ming* - *-*-cygwin - *-*-msys {
    ###
    # Under mingw, 64 bit is not possible
    ###
    set ::odie(windows) 1
    set ::odie(os) cygwin
    set ::odie(64bit) 0
    set ::odie(teacup_cpu) ix86
    set ::odie(teacup_os) win32
  }
  *win32* - *WIN32* {
    ###
    # With visual studio, 64 bit should be assumed
    # but is otherwise to taste
    ###
    set odie(windows) 1
Changes to odieConfig.sh.in.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

79




80
81
82
83

ODIE_STATIC_TCLLIB=${exec_prefix}/lib/tclstaticlib.a
ODIE_STATIC_TKLIB=${exec_prefix}/lib/tkstaticlib.a

TOADKIT=@ODIE_TOADKIT@
ODIE_MKHDR=${exec_prefix}/bin/mkhdr${EXE_SUFFIX}
ZIPSETUP=${exec_prefix}/bin/zzipsetupstub${EXE_SUFFIX}
SHERPA=${exec_prefix}/bin/sherpa${EXE_SUFFIX}
KETTLE="${ODIE_BUILD_TCLSH} ${exec_prefix}/bin/kettle"
GIT_PROG=@GIT_PROG@
FOSSIL=@FOSSIL_PROG@
MKHDR=@MKHDR_PROG@
ZIP=@ZIP_PROG@
UNZIP=@UNZIP_PROG@


ODIE_RM="${ODIE_BUILD_TCLSH} ${ODIE_SRC_DIR}/scripts/rmdir.tcl"





###
# Bits generated by autosetup
###







|
<






>
|
>
>
>
>




64
65
66
67
68
69
70
71

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

ODIE_STATIC_TCLLIB=${exec_prefix}/lib/tclstaticlib.a
ODIE_STATIC_TKLIB=${exec_prefix}/lib/tkstaticlib.a

TOADKIT=@ODIE_TOADKIT@
ODIE_MKHDR=${exec_prefix}/bin/mkhdr${EXE_SUFFIX}
ZIPSETUP=${exec_prefix}/bin/zzipsetupstub${EXE_SUFFIX}


GIT_PROG=@GIT_PROG@
FOSSIL=@FOSSIL_PROG@
MKHDR=@MKHDR_PROG@
ZIP=@ZIP_PROG@
UNZIP=@UNZIP_PROG@

ODIE_RM=${ODIE_BUILD_TCLSH}
ODIE_RM+=${ODIE_SRC_DIR}/scripts/rmdir.tcl
SHERPA=${ODIE_BUILD_TCLSH}
SHERPA+=@ODIE_SANDBOX_PATH@/sherpa/sherpa.tcl
KETTLE=${ODIE_BUILD_TCLSH}
KETTLE+=${exec_prefix}/bin/kettle

###
# Bits generated by autosetup
###
Changes to odieConfig.tcl.in.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  fossil       "@FOSSIL_PROG@"
  tcl_shell    "@TCLSH_PROG@"
  wish_shell   "@WISH_PROG@"
  zzetup       "${exec_prefix}/bin/zzipsetupstub@EXEEXT@"
  wish_kit     "@TKKIT_PROG@"
  tcl_kit      "@TCLKIT_PROG@"
  toad_kit     "@TOADKIT_PROG@"
  sherpa       "${exec_prefix}/bin/sherpa@EXEEXT@"
  kettle       "${exec_prefix}/bin/kettle"
  zip_kit      "${exec_prefix}/bin/zipkit.zip"
  lib          "$prefix/lib"
  rc           "@RC@"
  res          "@RES@"
  tk_res       "@TK_RES@"
  vfs_cp       "@VFS_CP@"







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
  fossil       "@FOSSIL_PROG@"
  tcl_shell    "@TCLSH_PROG@"
  wish_shell   "@WISH_PROG@"
  zzetup       "${exec_prefix}/bin/zzipsetupstub@EXEEXT@"
  wish_kit     "@TKKIT_PROG@"
  tcl_kit      "@TCLKIT_PROG@"
  toad_kit     "@TOADKIT_PROG@"
  sherpa       "@ODIE_BUILD_TCLSH@ @ODIE_SANDBOX_PATH@/sherpa/sherpa.tcl"
  kettle       "${exec_prefix}/bin/kettle"
  zip_kit      "${exec_prefix}/bin/zipkit.zip"
  lib          "$prefix/lib"
  rc           "@RC@"
  res          "@RES@"
  tk_res       "@TK_RES@"
  vfs_cp       "@VFS_CP@"
Changes to scripts/make_sherpa.tcl.
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
#!/bin/sh
# Copyright (c) 2006-2011 WorkWare Systems http://www.workware.net.au/
# All rights reserved
# vim:se syntax=tcl:
# \
dir=`dirname "$0"`; exec "`$dir/../autosetup/find-tclsh`" "$0" "$@"

set path [file normalize [file join [file dirname [file normalize [info script]]] ..]]



source [file join $path scripts common.tcl]


proc get_distro {pkg} {
  set PKG_SRCPATH $::odie(sandbox)/$pkg
  if {![file exists $::odie(download)/$pkg.fos]} {
    puts "Fossil clone $pkg"
    doexec $::odie(fossil) clone $::odie(mirror_url)/$pkg $::odie(download)/$pkg.fos
  }

  if {![file exists ${PKG_SRCPATH}/$::odie(fossil_checkout)]} {
    puts "Fossil open $pkg"
    file mkdir ${PKG_SRCPATH}
    cd ${PKG_SRCPATH}
    doexec $::odie(fossil) open $::odie(download)/$pkg.fos
  }
  cd ${PKG_SRCPATH}
  doexec $::odie(fossil) update
  return ${PKG_SRCPATH}
}

get_distro odielib
get_distro sherpa

###
# Build supporting libraries needed by Sherpa
##

# Rebuild sherpa
set SHERPA_SRCPATH $::odie(src_dir)/../sherpa

cd ${SHERPA_SRCPATH}
if {$::odie(host) != $::odie(target) } {
  doexec [info nameofexecutable] autosetup/autosetup --prefix=$::odie(prefix) 
} else {
  doexec [info nameofexecutable] autosetup/autosetup --prefix=$::odie(prefix) --host=$::odie(target)

}
doexec make clean
doexec make install







|
>
>
>
|
>

|













|



|








>
|
|
|

|
>

<
<
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
49


#!/bin/sh
# Copyright (c) 2006-2011 WorkWare Systems http://www.workware.net.au/
# All rights reserved
# vim:se syntax=tcl:
# \
dir=`dirname "$0"`; exec "`$dir/../autosetup/find-tclsh`" "$0" "$@"

set path [file dirname [file normalize [info script]]]
proc ::doexec args {
  exec {*}$args >&@ stdout
}

source $path/../odieConfig.tcl

proc get_distro {pkg {tag trunk}} {
  set PKG_SRCPATH $::odie(sandbox)/$pkg
  if {![file exists $::odie(download)/$pkg.fos]} {
    puts "Fossil clone $pkg"
    doexec $::odie(fossil) clone $::odie(mirror_url)/$pkg $::odie(download)/$pkg.fos
  }

  if {![file exists ${PKG_SRCPATH}/$::odie(fossil_checkout)]} {
    puts "Fossil open $pkg"
    file mkdir ${PKG_SRCPATH}
    cd ${PKG_SRCPATH}
    doexec $::odie(fossil) open $::odie(download)/$pkg.fos
  }
  cd ${PKG_SRCPATH}
  doexec $::odie(fossil) update $tag
  return ${PKG_SRCPATH}
}

get_distro tcllib odie
get_distro sherpa

###
# Build supporting libraries needed by Sherpa
##

# Rebuild sherpa
set SHERPA_SRCPATH $::odie(src_dir)/../sherpa
if {$::tcl_platform(platform) eq "windows"} {
  file copy -force ${SHERPA_SRCPATH}/sherpa.cmd $::odie(prefix)/bin/sherpa.cmd
  file copy -force ${SHERPA_SRCPATH}/sherpa.tcl $::odie(prefix)/bin/sherpa.tcl
  file copy -force ${SHERPA_SRCPATH}/sherpa.tcl $::odie(prefix)/bin/sherpa
} else {
  file delete $::odie(prefix)/bin/sherpa
  file link ${SHERPA_SRCPATH}/sherpa.tcl $::odie(prefix)/bin/sherpa
}