blob: 21af3f5c962add9d62b1364dfd69cd8860fd66f2 (
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
|
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
& eval 'exec perl -S $0 $argv:q'
if 0;
# $Id$
use strict;
require Cwd;
###########
###### Sanity Checks
##########
my $hostname;
chomp ($hostname = $ENV{'HOSTNAME'} || `uname -n`);
unless ("$hostname" eq 'naboo') {
#### For efficiency sake . . .
die "$0: must run on host naboo.dre.vanderbilt.edu\n";
}
my $perl_path = '/usr/bin/perl';
my $status= 0;
&can_run($perl_path.' -V') ||
die "$0: perl path is incorrect, please fix the script\n";
my $dot_path = '/usr/bin';
&can_run($dot_path.'/dot -V') ||
die "$0: dot path is incorrect, please fix the script\n";
my $doxy_path = '/usr/bin';
my $doxy_version = '1.4.7-1';
&can_run($doxy_path.'/doxygen --version | grep '.$doxy_version.' >/dev/null') ||
die "$0: doxygen path or version incorrect, please fix the script\n";
$ENV{'PATH'} = $ENV{'PATH'}.':'.$doxy_path;
print "Starting doxygen document generation \n";
my $chgrp = 'chgrp';
my $cpio = 'cpio';
my $cvs = 'cvs';
my $date = 'date';
my $egrep = 'egrep';
my $find = 'find';
my $gzip = 'gzip';
my $bzip = 'bzip2';
my $make = 'make -f Release -s';
my $mv = 'mv -f';
my $scp = 'scp ';
my $rm = 'rm -f';
my $cp = 'cp -f';
my $md5sum = 'md5sum';
my $shell_cd = 'cd';
my $cksum_ext = 'md5';
my $redirect = '>';
my $checksum = '$md5sum';
$SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup';
my $release_filter = '\\( -name CVS -o -name build \\) -prune -o ' .
'! -name \'.\#*\' ! -name \'\#*\' ! -name \'*~\' ' .
'! -name \'*.MAK\' -print';
my $bin_files =
"\"\\.dsp|\\.dsw|\\.mak|\\.mdp|\\.ide|\\.exe\|\\.ico\|\\.gz\|\\.zip\|" .
"\\.gif|\\.vcp|\\.vcproj|\\.vcw|\\.sln\"";
my $dest = 'bugzilla@deuce.doc.wustl.edu:/project/deuce/ftp/pub/ACE+TAO-distribution';
my $release_files = '';
chomp ($release_files = `$make show_release_files`);
########
######## Main execution thread.
########
&ex ("bin/generate_doxygen.pl -is_release -perl_path $perl_path -dot_path $dot_path")
&& die "$0: failed to generate ACE man pages\n";
my $build_command =
"$find html $release_filter | $cpio -o -H tar | " .
"$gzip -9 > ACE-html.tar.gz && ".
"$find html $release_filter | $cpio -o -H tar | " .
"$bzip -9 > ACE-html.tar.bz2 && ".
"$find html $release_filter | $egrep -v $bin_files | " .
"zip ACE-html.zip -q9@ &&" .
"$scp ACE-html.tar.gz ACE-html.tar.bz2 ACE-html.zip $dest;";
&ex ($build_command)
&& die "$0: failed to move ACE man pages to $dest\n";
exit $status;
########
######## Verify that a command can be executed, return 1 on sucess
########
sub can_run {
my $command = shift;
open (RUN, "$command 2>&1 |")
|| return 0;
while (<RUN>) {}
close(RUN)
|| return 0;
return 1;
}
########
######## Execute a command, unless -n had been specified. Return value
######## of 0 indicates success.
########
sub ex ()
{
my ($command) = @_;
print "Command is $command \n";
system ("$command");
}
|