summaryrefslogtreecommitdiffstats
path: root/unix/mkLinks.tcl
diff options
context:
space:
mode:
authorericm <ericm>2000-04-26 22:36:10 (GMT)
committerericm <ericm>2000-04-26 22:36:10 (GMT)
commit0efff5ec3b5a0504d9f5c1f8a5f38bd6e98262e7 (patch)
tree024092e4a7dbf7cfd18dc80c7c0cdb45a9ee7ce6 /unix/mkLinks.tcl
parent736ac02e4cc0bb9ef5b2b8798c87180c93e50330 (diff)
downloadtcl-0efff5ec3b5a0504d9f5c1f8a5f38bd6e98262e7.zip
tcl-0efff5ec3b5a0504d9f5c1f8a5f38bd6e98262e7.tar.gz
tcl-0efff5ec3b5a0504d9f5c1f8a5f38bd6e98262e7.tar.bz2
* unix/mkLinks: Regen'd with new mkLinks.tcl.
* unix/mkLinks.tcl: Fixed indentation, made link setup more intelligent (only do one existance test per man page, instead of one per function). * doc/library.n: Fixed .SH NAME macro to include each function documented on the page, so that mkLinks will know about the functions listed there, and so that the Windows help file index will get set up correctly [Bug: 1898, 5273].
Diffstat (limited to 'unix/mkLinks.tcl')
-rw-r--r--unix/mkLinks.tcl34
1 files changed, 21 insertions, 13 deletions
diff --git a/unix/mkLinks.tcl b/unix/mkLinks.tcl
index 22f54f3..45a6131 100644
--- a/unix/mkLinks.tcl
+++ b/unix/mkLinks.tcl
@@ -47,23 +47,31 @@ foreach file $argv {
if {[regexp "^.SH NAME" $line]} {
set state name
}
- }
- name {
- regsub {\\-.*} $line {} line
- foreach name [split $line ,] {
- regsub -all { } $name "" name
- if {![string match $name*$ext $tail]} {
+ }
+ name {
+ regsub {\\-.*} $line {} line
+ set rmOutput ""
+ set lnOutput ""
+ set namelist {}
+ foreach name [split $line ,] {
+ regsub -all {(\\)? } $name "" name
+ if {![string match $name*$ext $tail]} {
+ lappend namelist $name$ext
+ append rmOutput " rm -f $name$ext\n"
+ append lnOutput " ln $tail $name$ext\n"
+ }
+ }
+ if { [llength $namelist] } {
puts "if test -r $tail; then"
- puts " rm -f $name$ext"
- puts " ln $tail $name$ext"
+ puts -nonewline $rmOutput
+ puts -nonewline $lnOutput
puts "fi"
}
+ set state end
+ }
+ end {
+ break
}
- set state end
- }
- end {
- break
- }
}
}
close $in