Fossil SCM
Pick up recent autosetup changes from upstream.
Commit
b2e6a234c4d96e81d572a7597c7d0d8cf6d0777f
Parent
cc265caba7c239b…
2 files changed
+9
-3
+5
-3
+9
-3
| --- autosetup/autosetup | ||
| +++ autosetup/autosetup | ||
| @@ -816,11 +816,11 @@ | ||
| 816 | 816 | |
| 817 | 817 | # Follow symlinks until we get to something which is not a symlink |
| 818 | 818 | proc realpath {path} { |
| 819 | 819 | while {1} { |
| 820 | 820 | if {[catch { |
| 821 | - set path [file link $path] | |
| 821 | + set path [file readlink $path] | |
| 822 | 822 | }]} { |
| 823 | 823 | # Not a link |
| 824 | 824 | break |
| 825 | 825 | } |
| 826 | 826 | } |
| @@ -1188,12 +1188,18 @@ | ||
| 1188 | 1188 | |
| 1189 | 1189 | # If not already paged and stdout is a tty, pipe the output through the pager |
| 1190 | 1190 | # This is done by reinvoking autosetup with --nopager added |
| 1191 | 1191 | proc use_pager {} { |
| 1192 | 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 | |
| 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 | + } | |
| 1195 | 1201 | } |
| 1196 | 1202 | exit 0 |
| 1197 | 1203 | } |
| 1198 | 1204 | } |
| 1199 | 1205 | |
| 1200 | 1206 |
| --- 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 |
+5
-3
| --- autosetup/system.tcl | ||
| +++ autosetup/system.tcl | ||
| @@ -107,13 +107,14 @@ | ||
| 107 | 107 | # is removed to create the output file name. |
| 108 | 108 | # |
| 109 | 109 | # Each pattern of the form @define@ is replaced the the corresponding |
| 110 | 110 | # define, if it exists, or left unchanged if not. |
| 111 | 111 | # |
| 112 | -# The special value @srcdir@ is subsituted with the relative | |
| 112 | +# The special value @srcdir@ is substituted with the relative | |
| 113 | 113 | # 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. | |
| 115 | 116 | # |
| 116 | 117 | # Conditional sections may be specified as follows: |
| 117 | 118 | ## @if name == value |
| 118 | 119 | ## lines |
| 119 | 120 | ## @else |
| @@ -151,12 +152,13 @@ | ||
| 151 | 152 | set outdir [file dirname $out] |
| 152 | 153 | |
| 153 | 154 | # Make sure the directory exists |
| 154 | 155 | file mkdir $outdir |
| 155 | 156 | |
| 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 | |
| 157 | 158 | define srcdir [relative-path [file join $::autosetup(srcdir) $outdir] $outdir] |
| 159 | + define top_srcdir [relative-path $::autosetup(srcdir) $outdir] | |
| 158 | 160 | |
| 159 | 161 | set mapping {} |
| 160 | 162 | foreach {n v} [array get ::define] { |
| 161 | 163 | lappend mapping @$n@ $v |
| 162 | 164 | } |
| 163 | 165 |
| --- 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 |