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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
# -*- tcl -*-
# prepare module MEMCHAN for distribution
# CVS: $Id: PREPARE,v 1.33 2002/08/21 06:35:18 andreas_kupries Exp $
## Make this script completely independent of external packages.
## Assume [pwd] == Toplevel directory of memchan distribution in
## preparation.
##
## This will be run via 'make dist'.
###
##
# ### Helper procedures.
##
###
proc LastChanges {} {
if {
[file exists ChangeLog.short] &&
![file isdirectory ChangeLog.short] &&
[file readable ChangeLog.short]
} {
set f [open ChangeLog.short r]
set t [read $f]
close $f
set start [string first "Changes from" $t]
set end $start
incr end
set offset [string first "Changes from" [string range $t $end end]]
if {$offset < 0} {
set end end
} else {
incr end $offset
incr end -1
}
return [string trim [string range $t $start $end]]
unset t
}
return {}
}
proc UpdateAnnounce {} {
set fh [open ANNOUNCE r]
set ano [read $fh]
close $fh
set fh [open ANNOUNCE w]
puts $fh [string map [list @CHANGES@ [LastChanges]] $ano]
close $fh
return
}
proc UpdateAnnounceMail {} {
set fh [open ANNOUNCE.MAIL r]
set mail [read $fh]
close $fh
set fh [open ANNOUNCE r]
set ano [read $fh]
close $fh
set fh [open ~/.signature r]
set sig [read $fh]
close $fh
set fh [open ANNOUNCE.MAIL w]
puts $fh [string map [list @ANO@ [LastChanges] @SIG@ $sig] $mail]
close $fh
return
}
###
##
#
# ### Eliminate data not required by a source distribution.
# ### Generate the official documentation in various formats.
# ### Also create the CHANGES file required by the Neosoft CS Archives.
# ### Ensure uptodate configure scripts for TEA and UNIX.
#
##
###
file delete -force patches mails tea doc/nodes
file copy ChangeLog.short CHANGES
cd doc
exec ../tools/manpage_regen > /dev/null 2>/dev/null
cd ..
file mkdir doc/art/
file rename htdocs/art/logo100.gif doc/art/
file rename htdocs/art/logo520.jpg doc/art/
file rename htdocs/art/logo64.gif doc/art/
file delete -force htdocs
cd unix ; exec autoconf
cd .. ; exec autoconf
UpdateAnnounce
UpdateAnnounceMail
file rename ANNOUNCE.MAIL [file join .. [file tail [pwd]].AMAIL]
exit
|