|
From: <ai...@us...> - 2013-11-17 00:45:38
|
Revision: 12709
http://sourceforge.net/p/plplot/code/12709
Author: airwin
Date: 2013-11-17 00:45:35 +0000 (Sun, 17 Nov 2013)
Log Message:
-----------
Make Tcl logic much more robust for discovering whether the path to the relevant
pkgIndex.tcl file is a subdirectory of the build tree.
This fixes an issue with the old logic which was based on whether
the current directory was a subdirectory of the build tree. That old
logic obviously failed for the common case when the build tree for the installed examples
was actually a subdirectory of the core build tree. The new logic is
independent of the current directory which is a good thing.
Modified Paths:
--------------
trunk/bindings/tcl/pkgIndex.tcl.in
trunk/bindings/tk/pkgIndex.tcl.in
trunk/bindings/tk-x-plat/pkgIndex.tcl.in
Modified: trunk/bindings/tcl/pkgIndex.tcl.in
===================================================================
--- trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-16 22:21:59 UTC (rev 12708)
+++ trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-17 00:45:35 UTC (rev 12709)
@@ -34,9 +34,14 @@
if {$tcl_platform(platform) == "unix"} {
set thisDir [pwd]
+ # Find absolute path of $dir
+ cd $dir
+ set pkgIndexDir [pwd]
+ cd $thisDir
set buildDir "@BUILD_DIR@"
set bLen [string length $buildDir]
- if {![string compare -length $bLen $buildDir $thisDir]} then {
+ # If pkgIndexDir is in the build tree...
+ if {![string compare -length $bLen $buildDir $pkgIndexDir]} then {
set searchdirs "."} else {
set searchdirs [list "@LIB_HARDDIR@"]}
#puts $searchdirs
Modified: trunk/bindings/tk/pkgIndex.tcl.in
===================================================================
--- trunk/bindings/tk/pkgIndex.tcl.in 2013-11-16 22:21:59 UTC (rev 12708)
+++ trunk/bindings/tk/pkgIndex.tcl.in 2013-11-17 00:45:35 UTC (rev 12709)
@@ -35,9 +35,14 @@
if {$tcl_platform(platform) == "unix"} {
set stem tk
set thisDir [pwd]
+ # Find absolute path of $dir
+ cd $dir
+ set pkgIndexDir [pwd]
+ cd $thisDir
set buildDir "@BUILD_DIR@"
set bLen [string length $buildDir]
- if {![string compare -length $bLen $buildDir $thisDir]} then {
+ # If pkgIndexDir is in the build tree...
+ if {![string compare -length $bLen $buildDir $pkgIndexDir]} then {
set searchdirs "../../drivers"} else {
set searchdirs [list "@DRV_HARDDIR@"]}
#puts $searchdirs
Modified: trunk/bindings/tk-x-plat/pkgIndex.tcl.in
===================================================================
--- trunk/bindings/tk-x-plat/pkgIndex.tcl.in 2013-11-16 22:21:59 UTC (rev 12708)
+++ trunk/bindings/tk-x-plat/pkgIndex.tcl.in 2013-11-17 00:45:35 UTC (rev 12709)
@@ -35,9 +35,14 @@
if {$tcl_platform(platform) == "unix"} {
set stem tkwin
set thisDir [pwd]
+ # Find absolute path of $dir
+ cd $dir
+ set pkgIndexDir [pwd]
+ cd $thisDir
set buildDir "@BUILD_DIR@"
set bLen [string length $buildDir]
- if {![string compare -length $bLen $buildDir $thisDir]} then {
+ # If pkgIndexDir is in the build tree...
+ if {![string compare -length $bLen $buildDir $pkgIndexDir]} then {
set searchdirs "../../drivers"} else {
set searchdirs [list "@DRV_HARDDIR@"]}
#puts $searchdirs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|