Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Modifications to fix file path handing for MSYS Kit building |
---|---|
Timelines: | family | ancestors | descendants | both | hypnotoad |
Files: | files | file ages | folders |
SHA3-256: |
e8ee0468c2689fe4426523ae2f4eaf45 |
User & Date: | tne 2017-11-03 19:19:06 |
Context
2017-11-04
| ||
05:58 | New version of practcl. This version eliminates the separate family of classes for "tool" vs. "subproject". Now tools are subprojects of ::practcl::LOCAL, but environment interactions are handled through a separate env-* family of methods that track with the classes independently of the normal build methods. All tools inhabit the same global namespace (::practcl::OBJECT). Tools are installed to the prefix specified by the prefix define for ::practcl::LOCAL check-in: c433cbd5e9 user: tne tags: hypnotoad | |
2017-11-03
| ||
19:19 | Modifications to fix file path handing for MSYS Kit building check-in: e8ee0468c2 user: tne tags: hypnotoad | |
2017-11-02
| ||
19:44 | Pulling changes from trunk check-in: deba870ed0 user: hypnotoad tags: hypnotoad | |
Changes
Changes to modules/practcl/build.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 | set here [file dirname [file normalize [file join [pwd] [info script]]]] set version 0.10 set module [file tail $here] set fout [open [file join $here [file tail $module].tcl] w] dict set map %module% $module dict set map %version% $version puts $fout [string map $map {### # Amalgamated package for %module% # Do not edit directly, tweak the source in src/ and rerun # build.tcl | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set here [file dirname [file normalize [file join [pwd] [info script]]]] set version 0.10 set module [file tail $here] set fout [open [file join $here [file tail $module].tcl] w] fconfigure $fout -translation lf dict set map %module% $module dict set map %version% $version puts $fout [string map $map {### # Amalgamated package for %module% # Do not edit directly, tweak the source in src/ and rerun # build.tcl |
︙ | ︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | }] close $fout ### # Build our pkgIndex.tcl file ### set fout [open [file join $here pkgIndex.tcl] w] puts $fout [string map $map {# Tcl package index file, version 1.1 # This file is generated by the "pkg_mkIndex" command # and sourced either when an application starts up or # by a "package unknown" script. It invokes the # "package ifneeded" command to set up package-related # information so that packages will be loaded automatically # in response to "package require" commands. When this | > | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | }] close $fout ### # Build our pkgIndex.tcl file ### set fout [open [file join $here pkgIndex.tcl] w] fconfigure $fout -translation lf puts $fout [string map $map {# Tcl package index file, version 1.1 # This file is generated by the "pkg_mkIndex" command # and sourced either when an application starts up or # by a "package unknown" script. It invokes the # "package ifneeded" command to set up package-related # information so that packages will be loaded automatically # in response to "package require" commands. When this |
︙ | ︙ |
Changes to modules/practcl/practcl.tcl.
︙ | ︙ | |||
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | ### # Convert an MSYS path to a windows native path ### if {$::tcl_platform(platform) eq "windows"} { proc ::practcl::msys_to_tclpath msyspath { return [exec sh -c "cd $msyspath ; pwd -W"] } } else { proc ::practcl::msys_to_tclpath msyspath { return [file normalize $msyspath] } } # Try to load a package, and failing that # retrieve tcllib proc ::practcl::tcllib_require {pkg args} { | > > > > > > > > | 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | ### # Convert an MSYS path to a windows native path ### if {$::tcl_platform(platform) eq "windows"} { proc ::practcl::msys_to_tclpath msyspath { return [exec sh -c "cd $msyspath ; pwd -W"] } proc ::practcl::tcl_to_myspath tclpath { set path [file normalize $tclpath] return "/[string index $path 0][string range $path 2 end]" #return [exec sh -c "cd $tclpath ; pwd"] } } else { proc ::practcl::msys_to_tclpath msyspath { return [file normalize $msyspath] } proc ::practcl::tcl_to_myspath msyspath { return [file normalize $msyspath] } } # Try to load a package, and failing that # retrieve tcllib proc ::practcl::tcllib_require {pkg args} { |
︙ | ︙ | |||
1571 1572 1573 1574 1575 1576 1577 | } else { set PREFIX [my <project> define get prefix] } if {[my <project> define get CONFIG_SITE] != {}} { lappend opts --host=[my <project> define get HOST] } lappend opts --with-tclsh=[info nameofexecutable] | < | < < | < | < < | | > | < | | | 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 | } else { set PREFIX [my <project> define get prefix] } if {[my <project> define get CONFIG_SITE] != {}} { lappend opts --host=[my <project> define get HOST] } lappend opts --with-tclsh=[info nameofexecutable] set obj [my <project> project TCLCORE] if {$obj ne {}} { lappend opts --with-tcl=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]] } if {[my define get tk 0]} { set obj [my <project> project tk] if {$obj ne {}} { lappend opts --with-tk=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]] } } lappend opts {*}[my define get config_opts] if {![regexp -- "--prefix" $opts]} { lappend opts --prefix=$PREFIX --exec-prefix=$PREFIX } if {[my define get debug 0]} { lappend opts --enable-symbols=true } #--exec_prefix=$PREFIX #if {$::tcl_platform(platform) eq "windows"} { # lappend opts --disable-64bit |
︙ | ︙ | |||
2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 | set TCLSRC [file normalize $TCLSRCDIR] if {[${PROJECT} define get TEACUP_OS] eq "windows"} { set windres [$PROJECT define get RC windres] set RSOBJ [file join $path build tclkit.res.o] set RCSRC [${PROJECT} define get kit_resource_file] set cmd [list $windres -o $RSOBJ -DSTATIC_BUILD --include [::practcl::file_relative $path [file join $TCLSRC generic]]] if {[$PROJECT define get static_tk]} { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TKSRCDIR win rc wish.rc] } set TKSRC [file normalize $TKSRCDIR] lappend cmd --include [::practcl::file_relative $path [file join $TKSRC generic]] \ --include [::practcl::file_relative $path [file join $TKSRC win]] \ --include [::practcl::file_relative $path [file join $TKSRC win rc]] } else { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TCLSRCDIR tclsh.rc] } } foreach item [${PROJECT} define get resource_include] { lappend cmd --include [::practcl::file_relative $path [file normalize $item]] } | > > > > > > > > | > > | 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 | set TCLSRC [file normalize $TCLSRCDIR] if {[${PROJECT} define get TEACUP_OS] eq "windows"} { set windres [$PROJECT define get RC windres] set RSOBJ [file join $path build tclkit.res.o] set RCSRC [${PROJECT} define get kit_resource_file] set RCMAN [${PROJECT} define get kit_manifest_file] set cmd [list $windres -o $RSOBJ -DSTATIC_BUILD --include [::practcl::file_relative $path [file join $TCLSRC generic]]] if {[$PROJECT define get static_tk]} { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TKSRCDIR win rc wish.rc] } if {$RCMAN eq {} || ![file exists $RCMAN]} { set RCMAN [file join [$TKOBJ define get builddir] wish.exe.manifest] } set TKSRC [file normalize $TKSRCDIR] lappend cmd --include [::practcl::file_relative $path [file join $TKSRC generic]] \ --include [::practcl::file_relative $path [file join $TKSRC win]] \ --include [::practcl::file_relative $path [file join $TKSRC win rc]] } else { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TCLSRCDIR tclsh.rc] } if {$RCMAN eq {} || ![file exists $RCMAN]} { set RCMAN [file join [$TCLOBJ define get builddir] tclsh.exe.manifest] } } foreach item [${PROJECT} define get resource_include] { lappend cmd --include [::practcl::file_relative $path [file normalize $item]] } lappend cmd [file tail $RCSRC] file copy -force $RCSRC [file join $path [file tail $RCSRC]] file copy -force $RCMAN [file join $path [file tail $RCMAN]] ::practcl::doexec {*}$cmd lappend OBJECTS $RSOBJ set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc} set LDFLAGS_WINDOW {-mwindows -pipe -static-libgcc} } else { set LDFLAGS_CONSOLE {} set LDFLAGS_WINDOW {} |
︙ | ︙ | |||
5227 5228 5229 5230 5231 5232 5233 | puts "BUILDING Static $name $srcdir" } else { puts "BUILDING Dynamic $name $srcdir" } if {[my define get USEMSVC 0]} { cd $srcdir if {[file exists [file join $srcdir make.tcl]]} { | | < < | | 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 | puts "BUILDING Static $name $srcdir" } else { puts "BUILDING Dynamic $name $srcdir" } if {[my define get USEMSVC 0]} { cd $srcdir if {[file exists [file join $srcdir make.tcl]]} { if {[my define get debug 0]} { ::practcl::domake.tcl $srcdir debug all } else { ::practcl::domake.tcl $srcdir all } } else { if {[file exists [file join $srcdir makefile.vc]]} { ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir] {*}[my NmakeOpts] release } elseif {[file exists [file join $srcdir win makefile.vc]]} { cd [file join $srcdir win] ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir] {*}[my NmakeOpts] release } else { error "No make.tcl or makefile.vc found for project $name" } } } else { cd $::CWD set builddir [file normalize [my define get builddir]] file mkdir $builddir if {![file exists [file join $builddir Makefile]]} { my Configure } if {[file exists [file join $builddir make.tcl]]} { if {[my define get debug 0]} { ::practcl::domake.tcl $builddir debug all } else { ::practcl::domake.tcl $builddir all } } else { ::practcl::domake $builddir all } |
︙ | ︙ | |||
5345 5346 5347 5348 5349 5350 5351 | if {[file exists [file join $builddir make.tcl]]} { # Practcl builds can inject right to where we need them puts "[self] VFS INSTALL $DEST (Practcl)" ::practcl::domake.tcl $builddir install-package $DEST } elseif {[my define get broken_destroot 0] == 0} { # Most modern TEA projects understand DESTROOT in the makefile puts "[self] VFS INSTALL $DEST (TEA)" | | | 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 | if {[file exists [file join $builddir make.tcl]]} { # Practcl builds can inject right to where we need them puts "[self] VFS INSTALL $DEST (Practcl)" ::practcl::domake.tcl $builddir install-package $DEST } elseif {[my define get broken_destroot 0] == 0} { # Most modern TEA projects understand DESTROOT in the makefile puts "[self] VFS INSTALL $DEST (TEA)" ::practcl::domake $builddir install DESTDIR=[::practcl::file_relative $builddir $DEST] } else { # But some require us to do an install into a fictitious filesystem # and then extract the gooey parts within. # (*cough*) TkImg set PREFIX [my <project> define get prefix] set BROKENROOT [::practcl::msys_to_tclpath [my <project> define get prefix_broken_destdir]] file delete -force $BROKENROOT |
︙ | ︙ | |||
5411 5412 5413 5414 5415 5416 5417 | superclass ::practcl::subproject.binary # On the windows platform MinGW must build # from the platform directory in the source repo #method BuildDir {PWD} { # return [my define get localsrcdir] #} | > > > > > > > | > | 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 | superclass ::practcl::subproject.binary # On the windows platform MinGW must build # from the platform directory in the source repo #method BuildDir {PWD} { # return [my define get localsrcdir] #} method BuildDir {PWD} { set name [my define get name] set debug [my define get debug 0] if {$debug} { return [my define get builddir [file join $PWD $name]] } else { return [my define get builddir [file join $PWD $name]] } } method Configure {} { if {[my define get USEMSVC 0]} { return } set opts [my ConfigureOpts] set builddir [file normalize [my define get builddir]] set localsrcdir [file normalize [my define get localsrcdir]] |
︙ | ︙ |
Changes to modules/practcl/src/buildutil.tcl.
︙ | ︙ | |||
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | ### # Convert an MSYS path to a windows native path ### if {$::tcl_platform(platform) eq "windows"} { proc ::practcl::msys_to_tclpath msyspath { return [exec sh -c "cd $msyspath ; pwd -W"] } } else { proc ::practcl::msys_to_tclpath msyspath { return [file normalize $msyspath] } } # Try to load a package, and failing that # retrieve tcllib proc ::practcl::tcllib_require {pkg args} { | > > > > > > > > | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | ### # Convert an MSYS path to a windows native path ### if {$::tcl_platform(platform) eq "windows"} { proc ::practcl::msys_to_tclpath msyspath { return [exec sh -c "cd $msyspath ; pwd -W"] } proc ::practcl::tcl_to_myspath tclpath { set path [file normalize $tclpath] return "/[string index $path 0][string range $path 2 end]" #return [exec sh -c "cd $tclpath ; pwd"] } } else { proc ::practcl::msys_to_tclpath msyspath { return [file normalize $msyspath] } proc ::practcl::tcl_to_myspath msyspath { return [file normalize $msyspath] } } # Try to load a package, and failing that # retrieve tcllib proc ::practcl::tcllib_require {pkg args} { |
︙ | ︙ |
Changes to modules/practcl/src/class/subproject/binary.tcl.
︙ | ︙ | |||
122 123 124 125 126 127 128 | puts "BUILDING Static $name $srcdir" } else { puts "BUILDING Dynamic $name $srcdir" } if {[my define get USEMSVC 0]} { cd $srcdir if {[file exists [file join $srcdir make.tcl]]} { | | < < | | 122 123 124 125 126 127 128 129 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 159 | puts "BUILDING Static $name $srcdir" } else { puts "BUILDING Dynamic $name $srcdir" } if {[my define get USEMSVC 0]} { cd $srcdir if {[file exists [file join $srcdir make.tcl]]} { if {[my define get debug 0]} { ::practcl::domake.tcl $srcdir debug all } else { ::practcl::domake.tcl $srcdir all } } else { if {[file exists [file join $srcdir makefile.vc]]} { ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir] {*}[my NmakeOpts] release } elseif {[file exists [file join $srcdir win makefile.vc]]} { cd [file join $srcdir win] ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir] {*}[my NmakeOpts] release } else { error "No make.tcl or makefile.vc found for project $name" } } } else { cd $::CWD set builddir [file normalize [my define get builddir]] file mkdir $builddir if {![file exists [file join $builddir Makefile]]} { my Configure } if {[file exists [file join $builddir make.tcl]]} { if {[my define get debug 0]} { ::practcl::domake.tcl $builddir debug all } else { ::practcl::domake.tcl $builddir all } } else { ::practcl::domake $builddir all } |
︙ | ︙ | |||
240 241 242 243 244 245 246 | if {[file exists [file join $builddir make.tcl]]} { # Practcl builds can inject right to where we need them puts "[self] VFS INSTALL $DEST (Practcl)" ::practcl::domake.tcl $builddir install-package $DEST } elseif {[my define get broken_destroot 0] == 0} { # Most modern TEA projects understand DESTROOT in the makefile puts "[self] VFS INSTALL $DEST (TEA)" | | | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | if {[file exists [file join $builddir make.tcl]]} { # Practcl builds can inject right to where we need them puts "[self] VFS INSTALL $DEST (Practcl)" ::practcl::domake.tcl $builddir install-package $DEST } elseif {[my define get broken_destroot 0] == 0} { # Most modern TEA projects understand DESTROOT in the makefile puts "[self] VFS INSTALL $DEST (TEA)" ::practcl::domake $builddir install DESTDIR=[::practcl::file_relative $builddir $DEST] } else { # But some require us to do an install into a fictitious filesystem # and then extract the gooey parts within. # (*cough*) TkImg set PREFIX [my <project> define get prefix] set BROKENROOT [::practcl::msys_to_tclpath [my <project> define get prefix_broken_destdir]] file delete -force $BROKENROOT |
︙ | ︙ |
Changes to modules/practcl/src/class/subproject/core.tcl.
1 2 3 4 5 6 7 8 9 | oo::class create ::practcl::subproject.core { superclass ::practcl::subproject.binary # On the windows platform MinGW must build # from the platform directory in the source repo #method BuildDir {PWD} { # return [my define get localsrcdir] #} | > > > > > > > | > | 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 | oo::class create ::practcl::subproject.core { superclass ::practcl::subproject.binary # On the windows platform MinGW must build # from the platform directory in the source repo #method BuildDir {PWD} { # return [my define get localsrcdir] #} method BuildDir {PWD} { set name [my define get name] set debug [my define get debug 0] if {$debug} { return [my define get builddir [file join $PWD $name]] } else { return [my define get builddir [file join $PWD $name]] } } method Configure {} { if {[my define get USEMSVC 0]} { return } set opts [my ConfigureOpts] set builddir [file normalize [my define get builddir]] set localsrcdir [file normalize [my define get localsrcdir]] |
︙ | ︙ |
Changes to modules/practcl/src/class/toolset/baseclass.tcl.
︙ | ︙ | |||
136 137 138 139 140 141 142 | } else { set PREFIX [my <project> define get prefix] } if {[my <project> define get CONFIG_SITE] != {}} { lappend opts --host=[my <project> define get HOST] } lappend opts --with-tclsh=[info nameofexecutable] | < | < < | < | < < | | > | < | | | 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 | } else { set PREFIX [my <project> define get prefix] } if {[my <project> define get CONFIG_SITE] != {}} { lappend opts --host=[my <project> define get HOST] } lappend opts --with-tclsh=[info nameofexecutable] set obj [my <project> project TCLCORE] if {$obj ne {}} { lappend opts --with-tcl=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]] } if {[my define get tk 0]} { set obj [my <project> project tk] if {$obj ne {}} { lappend opts --with-tk=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]] } } lappend opts {*}[my define get config_opts] if {![regexp -- "--prefix" $opts]} { lappend opts --prefix=$PREFIX --exec-prefix=$PREFIX } if {[my define get debug 0]} { lappend opts --enable-symbols=true } #--exec_prefix=$PREFIX #if {$::tcl_platform(platform) eq "windows"} { # lappend opts --disable-64bit |
︙ | ︙ |
Changes to modules/practcl/src/class/toolset/gcc.tcl.
︙ | ︙ | |||
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | set TCLSRC [file normalize $TCLSRCDIR] if {[${PROJECT} define get TEACUP_OS] eq "windows"} { set windres [$PROJECT define get RC windres] set RSOBJ [file join $path build tclkit.res.o] set RCSRC [${PROJECT} define get kit_resource_file] set cmd [list $windres -o $RSOBJ -DSTATIC_BUILD --include [::practcl::file_relative $path [file join $TCLSRC generic]]] if {[$PROJECT define get static_tk]} { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TKSRCDIR win rc wish.rc] } set TKSRC [file normalize $TKSRCDIR] lappend cmd --include [::practcl::file_relative $path [file join $TKSRC generic]] \ --include [::practcl::file_relative $path [file join $TKSRC win]] \ --include [::practcl::file_relative $path [file join $TKSRC win rc]] } else { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TCLSRCDIR tclsh.rc] } } foreach item [${PROJECT} define get resource_include] { lappend cmd --include [::practcl::file_relative $path [file normalize $item]] } | > > > > > > > > | > > | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | set TCLSRC [file normalize $TCLSRCDIR] if {[${PROJECT} define get TEACUP_OS] eq "windows"} { set windres [$PROJECT define get RC windres] set RSOBJ [file join $path build tclkit.res.o] set RCSRC [${PROJECT} define get kit_resource_file] set RCMAN [${PROJECT} define get kit_manifest_file] set cmd [list $windres -o $RSOBJ -DSTATIC_BUILD --include [::practcl::file_relative $path [file join $TCLSRC generic]]] if {[$PROJECT define get static_tk]} { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TKSRCDIR win rc wish.rc] } if {$RCMAN eq {} || ![file exists $RCMAN]} { set RCMAN [file join [$TKOBJ define get builddir] wish.exe.manifest] } set TKSRC [file normalize $TKSRCDIR] lappend cmd --include [::practcl::file_relative $path [file join $TKSRC generic]] \ --include [::practcl::file_relative $path [file join $TKSRC win]] \ --include [::practcl::file_relative $path [file join $TKSRC win rc]] } else { if {$RCSRC eq {} || ![file exists $RCSRC]} { set RCSRC [file join $TCLSRCDIR tclsh.rc] } if {$RCMAN eq {} || ![file exists $RCMAN]} { set RCMAN [file join [$TCLOBJ define get builddir] tclsh.exe.manifest] } } foreach item [${PROJECT} define get resource_include] { lappend cmd --include [::practcl::file_relative $path [file normalize $item]] } lappend cmd [file tail $RCSRC] file copy -force $RCSRC [file join $path [file tail $RCSRC]] file copy -force $RCMAN [file join $path [file tail $RCMAN]] ::practcl::doexec {*}$cmd lappend OBJECTS $RSOBJ set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc} set LDFLAGS_WINDOW {-mwindows -pipe -static-libgcc} } else { set LDFLAGS_CONSOLE {} set LDFLAGS_WINDOW {} |
︙ | ︙ |