Fossil SCM

Pick up recent autosetup changes from upstream.

mistachkin 2016-01-14 20:38 trunk
Commit b2e6a234c4d96e81d572a7597c7d0d8cf6d0777f
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -816,11 +816,11 @@
816816
817817
# Follow symlinks until we get to something which is not a symlink
818818
proc realpath {path} {
819819
while {1} {
820820
if {[catch {
821
- set path [file link $path]
821
+ set path [file readlink $path]
822822
}]} {
823823
# Not a link
824824
break
825825
}
826826
}
@@ -1188,12 +1188,18 @@
11881188
11891189
# If not already paged and stdout is a tty, pipe the output through the pager
11901190
# This is done by reinvoking autosetup with --nopager added
11911191
proc use_pager {} {
11921192
if {![opt-bool nopager] && [getenv PAGER ""] ne "" && [isatty? stdin] && [isatty? stdout]} {
1193
- catch {
1194
- exec [info nameofexecutable] $::argv0 --nopager {*}$::argv |& [getenv PAGER] >@stdout <@stdin
1193
+ if {[catch {
1194
+ exec [info nameofexecutable] $::argv0 --nopager {*}$::argv |& {*}[getenv PAGER] >@stdout <@stdin 2>@stderr
1195
+ } msg opts] == 1} {
1196
+ if {[dict get $opts -errorcode] eq "NONE"} {
1197
+ # an internal/exec error
1198
+ puts stderr $msg
1199
+ exit 1
1200
+ }
11951201
}
11961202
exit 0
11971203
}
11981204
}
11991205
12001206
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -816,11 +816,11 @@
816
817 # Follow symlinks until we get to something which is not a symlink
818 proc realpath {path} {
819 while {1} {
820 if {[catch {
821 set path [file link $path]
822 }]} {
823 # Not a link
824 break
825 }
826 }
@@ -1188,12 +1188,18 @@
1188
1189 # If not already paged and stdout is a tty, pipe the output through the pager
1190 # This is done by reinvoking autosetup with --nopager added
1191 proc use_pager {} {
1192 if {![opt-bool nopager] && [getenv PAGER ""] ne "" && [isatty? stdin] && [isatty? stdout]} {
1193 catch {
1194 exec [info nameofexecutable] $::argv0 --nopager {*}$::argv |& [getenv PAGER] >@stdout <@stdin
 
 
 
 
 
 
1195 }
1196 exit 0
1197 }
1198 }
1199
1200
--- autosetup/autosetup
+++ autosetup/autosetup
@@ -816,11 +816,11 @@
816
817 # Follow symlinks until we get to something which is not a symlink
818 proc realpath {path} {
819 while {1} {
820 if {[catch {
821 set path [file readlink $path]
822 }]} {
823 # Not a link
824 break
825 }
826 }
@@ -1188,12 +1188,18 @@
1188
1189 # If not already paged and stdout is a tty, pipe the output through the pager
1190 # This is done by reinvoking autosetup with --nopager added
1191 proc use_pager {} {
1192 if {![opt-bool nopager] && [getenv PAGER ""] ne "" && [isatty? stdin] && [isatty? stdout]} {
1193 if {[catch {
1194 exec [info nameofexecutable] $::argv0 --nopager {*}$::argv |& {*}[getenv PAGER] >@stdout <@stdin 2>@stderr
1195 } msg opts] == 1} {
1196 if {[dict get $opts -errorcode] eq "NONE"} {
1197 # an internal/exec error
1198 puts stderr $msg
1199 exit 1
1200 }
1201 }
1202 exit 0
1203 }
1204 }
1205
1206
--- autosetup/system.tcl
+++ autosetup/system.tcl
@@ -107,13 +107,14 @@
107107
# is removed to create the output file name.
108108
#
109109
# Each pattern of the form @define@ is replaced the the corresponding
110110
# define, if it exists, or left unchanged if not.
111111
#
112
-# The special value @srcdir@ is subsituted with the relative
112
+# The special value @srcdir@ is substituted with the relative
113113
# path to the source directory from the directory where the output
114
-# file is created. Use @top_srcdir@ for the absolute path.
114
+# file is created, while the special value @top_srcdir@ is substituted
115
+# with the relative path to the top level source directory.
115116
#
116117
# Conditional sections may be specified as follows:
117118
## @if name == value
118119
## lines
119120
## @else
@@ -151,12 +152,13 @@
151152
set outdir [file dirname $out]
152153
153154
# Make sure the directory exists
154155
file mkdir $outdir
155156
156
- # Set up srcdir to be relative to the target dir
157
+ # Set up srcdir and top_srcdir to be relative to the target dir
157158
define srcdir [relative-path [file join $::autosetup(srcdir) $outdir] $outdir]
159
+ define top_srcdir [relative-path $::autosetup(srcdir) $outdir]
158160
159161
set mapping {}
160162
foreach {n v} [array get ::define] {
161163
lappend mapping @$n@ $v
162164
}
163165
--- autosetup/system.tcl
+++ autosetup/system.tcl
@@ -107,13 +107,14 @@
107 # is removed to create the output file name.
108 #
109 # Each pattern of the form @define@ is replaced the the corresponding
110 # define, if it exists, or left unchanged if not.
111 #
112 # The special value @srcdir@ is subsituted with the relative
113 # path to the source directory from the directory where the output
114 # file is created. Use @top_srcdir@ for the absolute path.
 
115 #
116 # Conditional sections may be specified as follows:
117 ## @if name == value
118 ## lines
119 ## @else
@@ -151,12 +152,13 @@
151 set outdir [file dirname $out]
152
153 # Make sure the directory exists
154 file mkdir $outdir
155
156 # Set up srcdir to be relative to the target dir
157 define srcdir [relative-path [file join $::autosetup(srcdir) $outdir] $outdir]
 
158
159 set mapping {}
160 foreach {n v} [array get ::define] {
161 lappend mapping @$n@ $v
162 }
163
--- autosetup/system.tcl
+++ autosetup/system.tcl
@@ -107,13 +107,14 @@
107 # is removed to create the output file name.
108 #
109 # Each pattern of the form @define@ is replaced the the corresponding
110 # define, if it exists, or left unchanged if not.
111 #
112 # The special value @srcdir@ is substituted with the relative
113 # path to the source directory from the directory where the output
114 # file is created, while the special value @top_srcdir@ is substituted
115 # with the relative path to the top level source directory.
116 #
117 # Conditional sections may be specified as follows:
118 ## @if name == value
119 ## lines
120 ## @else
@@ -151,12 +152,13 @@
152 set outdir [file dirname $out]
153
154 # Make sure the directory exists
155 file mkdir $outdir
156
157 # Set up srcdir and top_srcdir to be relative to the target dir
158 define srcdir [relative-path [file join $::autosetup(srcdir) $outdir] $outdir]
159 define top_srcdir [relative-path $::autosetup(srcdir) $outdir]
160
161 set mapping {}
162 foreach {n v} [array get ::define] {
163 lappend mapping @$n@ $v
164 }
165

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button