aboutsummaryrefslogtreecommitdiffstats
path: root/dist-tools/makerelease
blob: 41ddf0383b6e5de33a8e8d165df2c8b612c6418c (plain)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#!/usr/bin/env perl
#
# Make a fetchmail release.  Must be run as root, to make RPMs.
# Dumps a release notice and diffs as a MIME multipart message 
# in RELEASE_NOTES
#
use POSIX qw(strftime);
$timezone = strftime('%z', localtime) || "-0500";
$tmp = $ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp";

$project = "fetchmail";
$svnrepos = "svn://svn.berlios.de/$project";
$website = "http://developer.berlios.de/projects/$project";
$mailfrom = "<$project-devel-owner\@lists.berlios.de> (Fetchmail Development Team)";

# parse options
$diffs = 0;
$verbose = 0;
$null = ">/dev/null";
$errnull = "2>/dev/null";
while ($i = shift @ARGV)
{
	if ($i =~ /^(--diffs|-d)$/i)
	{
		$diffs = 1;
		next;
	}

	if ($i =~ /^(--verbose|-v)$/i)
	{
		$verbose = 1;
		$null = "";
		next;
	}

	die "Error: Unknown option: $i\n";
}

# extract version from source
$version=`grep 'AC_INIT' configure.in`;
$version =~ /AC_INIT\([^,]*,\[?([0-9.]+)\]?\)/;
$version = $1;
die "cannot determine version" unless defined $1;
$tag = "RELEASE_$version";
$tag =~ tr/./-/;

# extract existing tags
open(ID, "svn ls $svnrepos/tags|");
while (<ID>) {
    if (m{^(RELEASE_.*)/}) {
	unshift(@versions, $1);
    }
}
close(ID);

if ($versions[0] eq $tag) {
    $tag = $versions[0];
    $oldtag = $versions[1];
} else {
    $tag = '<workfile>';
    $oldtag = $versions[0];
}

$ENV{PATH} .= ":./dist-tools:./dist-tools/shipper:.";

print "Building $version release, tag $tag, previous tag $oldtag\n";

if (-d autom4te.cache) {
    system("rm -rf autom4te.cache")
	and die "Failure in removing autom4te.cache";
}

if (system("autoreconf -isv")) {
	die("Failure in regenerating autoconf files\n");
}

if (system("./configure && make clean && make -C po update-po && make clean")) {
	die("Failure in translation-file rebuild\n");
}

print "### Test-building the software...\n";
if (system("./configure && make clean && make all check")) {
	die("Compilation failure\n");
}

print "### Building the distribution...\n";
if (system("make dist $null")) {
	die("Distribution-build failure\n");
}

print "### Building the RPMs...\n";
if (system("buildrpms $project-${version}.tar.gz $null")) {
	die("RPM-build failure\n");
}

open(REPORT, ">$tmp/$project.PREAMBLE.$$");

print REPORT <<EOF;
From: $mailfrom
Subject: The $version release of $project is available

The $version release of $project is now available at the usual locations,
including <URL:$website>.

The source archive is available at:
<URL:$website/$project-${version}.tar.gz>

Here are the release notes:

EOF

# Extract the current notes
open(NEWS, "NEWS");
while (<NEWS>) {
    if (/^$project/) {
	print REPORT $_;
	last;
    }
}
while (<NEWS>) {
    if (/^$project/) {
	last;
    }
    print REPORT $_;
}

$oldver = $oldtag;
$oldver =~ tr/-/./;
$oldver =~ s/^RELEASE_//;

if ($diffs) {
	print REPORT "Diffs from the previous ($oldver) release follow as a MIME attachment."
} else {
        print REPORT "By popular demand, diffs from the previous release have been omitted."
}

close(NEWS);

close(REPORT);

if ($tag eq '<workfile>') {
    system("svn diff -r$oldtag        $errnull >$tmp/$project.DIFFS.$$");
} else {
    system("svn diff -r$oldtag -r$tag $errnull >$tmp/$project.DIFFS.$$");
}
print "Diff size:";
system("wc <$tmp/$project.DIFFS.$$");

if ($diffs) {
	system "metasend -b"
	    ." -D '$project-$tag announcement' -m 'text/plain' -e 7bit -f $tmp/$project.PREAMBLE.$$"
	    ." -n -D 'diff between $oldver and $version' -m 'text/plain' -e 7bit -f $tmp/$project.DIFFS.$$"
	    ." -o ANNOUNCE.EMAIL";
} else {
	rename("$tmp/$project.PREAMBLE.$$", "ANNOUNCE.EMAIL");
}
#system("chown esr ANNOUNCE.EMAIL");
#chmod(0700, "ANNOUNCE.EMAIL");

#unlink("$tmp/$project.PREAMBLE.$$");
unlink("$tmp/$project.DIFFS.$$");

print "Building index page...\n";
system("rm -f index.html; indexgen.sh");

if (-r "testsites") {
	print "Building test server list...\n";
	system("rm -f testservers.html; testservers-gen.sh >testservers.html");
}

print "Making activity graph...";
system "growthplot";

print "Done\n";

# makerelease ends here
valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group___special_quantities.html#a5">trio_isnan</a> (double number)</td></tr> <tr><td>&nbsp;</td><td><font size=-1><em>Check for NaN.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group___special_quantities.html#a6">trio_isinf</a> (double number)</td></tr> <tr><td>&nbsp;</td><td><font size=-1><em>Check for infinity.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group___special_quantities.html#a7">trio_isfinite</a> (double number)</td></tr> <tr><td>&nbsp;</td><td><font size=-1><em>Check for finity.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group___special_quantities.html#a9">trio_signbit</a> (double number)</td></tr> <tr><td>&nbsp;</td><td><font size=-1><em>Examine the sign of a number.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group___special_quantities.html#a10">trio_fpclassify</a> (double number)</td></tr> <tr><td>&nbsp;</td><td><font size=-1><em>Examine the class of a number.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Functions to detect and fabricate special quantities in floating-point numbers. <p> <b>SYNOPSIS</b> <p> <div class="fragment"><pre> cc ... -ltrio -lm #include &lt;trionan.h&gt; </pre></div> <p> <b>DESCRIPTION</b> <p> Certain arithmetical operations does not result in normal numbers. Instead they result in special quantities that must be handled differently by the floating-point hardware. These includes Infinity and Not-A-Number (NaN). <p> For example, 0/0 (zero divided by zero) yields NaN. Any operation which involves a NaN will result in NaN. Any comparison involving NaN will be unsuccessful, even if NaN is compared to NaN. <p> These special quantities are represented with special bit patterns by the floating-point hardware, and this bit patterns depend on the hardware. There may even be hardware that does not support special quantities, so the functions in this module are not guaranteed to work on all platforms. <p> The approach used in this module is to (in decreasing order of importance) <ul> <li> Use C99 functionality when available. <li> Use IEEE 754-1985 bit patterns if possible. <li> Use platform-specific techniques.</ul> <b>NOTES</b> <p> This module does not depend on the rest of trio, and can thus be reused separately. The following files are necessary: <ul> <li> <code>triodef.h</code> <li> <code>trionan.h</code> <li> <code>trionan.c</code> </ul> <hr><h2>Function Documentation</h2> <a name="a10" doxytag="trionan.c::trio_fpclassify"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int trio_fpclassify </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">double&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; <em>number</em> </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Examine the class of a number. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>number</em>&nbsp;</td><td> An arbitrary floating-point number. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> Enumerable value indicating the class of <code>number</code> </dl> </td> </tr> </table> <a name="a7" doxytag="trionan.c::trio_isfinite"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int trio_isfinite </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">double&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; <em>number</em> </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Check for finity. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>number</em>&nbsp;</td><td> An arbitrary floating-point number. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> Boolean value indicating whether or not the number is a finite. </dl> </td> </tr> </table> <a name="a6" doxytag="trionan.c::trio_isinf"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int trio_isinf </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">double&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; <em>number</em> </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Check for infinity. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>number</em>&nbsp;</td><td> An arbitrary floating-point number. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> 1 if positive infinity, -1 if negative infinity, 0 otherwise. </dl> </td> </tr> </table> <a name="a5" doxytag="trionan.c::trio_isnan"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int trio_isnan </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">double&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; <em>number</em> </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Check for NaN. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>number</em>&nbsp;</td><td> An arbitrary floating-point number. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> Boolean value indicating whether or not the number is a NaN. </dl> </td> </tr> </table> <a name="a4" doxytag="trionan.c::trio_nan"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> double trio_nan </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">void&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Generate NaN. <p> <dl compact><dt><b> Returns: </b><dd> Floating-point representation of NaN. </dl> </td> </tr> </table> <a name="a3" doxytag="trionan.c::trio_ninf"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> double trio_ninf </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">void&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Generate negative infinity. <p> <dl compact><dt><b> Returns: </b><dd> Floating-point value of negative infinity. </dl> </td> </tr> </table> <a name="a1" doxytag="trionan.c::trio_nzero"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> double trio_nzero </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">void&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Generate negative zero. <p> <dl compact><dt><b> Returns: </b><dd> Floating-point representation of negative zero. </dl> </td> </tr> </table> <a name="a2" doxytag="trionan.c::trio_pinf"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> double trio_pinf </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">void&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Generate positive infinity. <p> <dl compact><dt><b> Returns: </b><dd> Floating-point representation of positive infinity. </dl> </td> </tr> </table> <a name="a9" doxytag="trionan.c::trio_signbit"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int trio_signbit </td> <td class="md" valign="top">(&nbsp;</td> <td class="md" nowrap valign="top">double&nbsp;</td> <td class="mdname1" valign="top" nowrap>&nbsp; <em>number</em> </td> <td class="md" valign="top">)&nbsp;</td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> &nbsp; </td> <td> <p> Examine the sign of a number. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>number</em>&nbsp;</td><td> An arbitrary floating-point number. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> Boolean value indicating whether or not the number has the sign bit set (i.e. is negative). </dl> </td> </tr> </table> <HR> <center class="copyright">Copyright (C) 2001 Bj&oslash;rn Reese and Daniel Stenberg.</center> </body> </html>