The R Project SVN R

Rev

Rev 15331 | Rev 15889 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15331 Rev 15696
Line 31... Line 31...
31
#use strict;
31
#use strict;
32
 
32
 
33
## don't buffer output
33
## don't buffer output
34
$| = 1;
34
$| = 1;
35
 
35
 
36
my $revision = ' $Revision: 1.27 $ ';
36
my $revision = ' $Revision: 1.28 $ ';
37
my $version;
37
my $version;
38
my $name;
38
my $name;
39
$revision =~ / ([\d\.]*) /;
39
$revision =~ / ([\d\.]*) /;
40
$version = $1;
40
$version = $1;
41
($name = $0) =~ s|.*/||;
41
($name = $0) =~ s|.*/||;
42
 
42
 
43
my $MAKE = '@MAKE@';
-
 
44
 
-
 
45
my @excludepatterns = ("^.Rbuildignore\$", "\~\$", "\.swp\$",
43
my @excludepatterns = ("^.Rbuildignore\$", "\~\$", "\.swp\$",
46
		       "^.*/\.#[^/]*\$", "^.*/#[^/]*#\$");
44
		       "^.*/\.#[^/]*\$", "^.*/#[^/]*#\$");
47
 
45
 
-
 
46
my $tmpdir = R_getenv("TMPDIR", "/tmp");
-
 
47
my $R_exe = "${R_HOME}/bin/R";
-
 
48
my $MAKE = '@MAKE@';
48
my @knownoptions = ("help|h", "version|v", "binary", "no-docs",
49
my @knownoptions = ("help|h", "version|v", "binary", "no-docs",
49
		    "use-zip", "use-zip-help", "use-zip-data", "force");
50
		    "use-zip", "use-zip-help", "use-zip-data", "force");
50
 
51
 
-
 
52
## <FIXME>
51
my $WINDOWS = (R_getenv("R_OSTYPE", "") eq "windows");
53
## Currently, R_OSTYPE is always set on Unix/Windows.
52
my $tmpdir = R_getenv("TMPDIR", "/tmp");
54
my $OS = R_getenv("R_OSTYPE", "mac");
-
 
55
## </FIXME>
53
my $R_exe = "${R_HOME}/bin/R";
56
my $WINDOWS = ($OS eq "windows");
54
 
57
 
55
if($WINDOWS) {
58
if($WINDOWS) {
56
    $tmpdir = R_getenv("TMPDIR", "/TEMP");
59
    $tmpdir = R_getenv("TMPDIR", "/TEMP");
57
    die "Please set TMPDIR to a valid temporary directory\n" 
60
    die "Please set TMPDIR to a valid temporary directory\n" 
58
	unless (-e $tmpdir);
61
	unless (-e $tmpdir);
Line 90... Line 93...
90
if(!$opt_binary && $INSTALL_opts ne "") {
93
if(!$opt_binary && $INSTALL_opts ne "") {
91
    printf "** Options $INSTALL_opts for --binary ignored\n";
94
    printf "** Options $INSTALL_opts for --binary ignored\n";
92
}
95
}
93
 
96
 
94
## This is the main loop over all packages to be checked.
97
## This is the main loop over all packages to be checked.
95
my $pkg;
-
 
96
foreach $pkg (@ARGV) {
98
foreach my $pkg (@ARGV) {
97
    my $is_bundle = 0;
99
    my $is_bundle = 0;
98
    $pkg =~ s/\/$//;
100
    $pkg =~ s/\/$//;
99
    my $pkgname = basename($pkg);
101
    my $pkgname = basename($pkg);
100
    chdir($startdir);
102
    chdir($startdir);
101
 
103
 
Line 150... Line 152...
150
    else {
152
    else {
151
	if($description->{"Contains"}) {
153
	if($description->{"Contains"}) {
152
	    $log->message("Looks like \`${pkg}' is a package bundle");
154
	    $log->message("Looks like \`${pkg}' is a package bundle");
153
	    $is_bundle = 1;
155
	    $is_bundle = 1;
154
	    my @bundlepkgs = split(/\s+/, $description->{"Contains"});
156
	    my @bundlepkgs = split(/\s+/, $description->{"Contains"});
155
	    my $ppkg = "";
-
 
156
	    foreach $ppkg (@bundlepkgs) {
157
	    foreach my $ppkg (@bundlepkgs) {
157
		$log->message("preparing \`$ppkg' in bundle \`$pkg':");
158
		$log->message("preparing \`$ppkg' in bundle \`$pkg':");
158
		$log->setstars("**");
159
		$log->setstars("**");
159
		chdir($startdir);
160
		chdir($startdir);
160
		prepare_pkg("$pkg/$ppkg", $is_bundle, $description, $log);
161
		prepare_pkg("$pkg/$ppkg", $is_bundle, $description, $log);
161
		$log->setstars("*");
162
		$log->setstars("*");
Line 219... Line 220...
219
    print exclude "$File::Find::name\n" if(-d $_ && /[Oo]ld$/);
220
    print exclude "$File::Find::name\n" if(-d $_ && /[Oo]ld$/);
220
    print exclude "$File::Find::name\n" if /^GNUMakefile$/;
221
    print exclude "$File::Find::name\n" if /^GNUMakefile$/;
221
    print exclude "$File::Find::name\n" if /^CVS$/;
222
    print exclude "$File::Find::name\n" if /^CVS$/;
222
    my $filename = $File::Find::name;
223
    my $filename = $File::Find::name;
223
    $filename =~ s/^[^\/]*\///;
224
    $filename =~ s/^[^\/]*\///;
224
    foreach $p (@excludepatterns) {
225
    foreach my $p (@excludepatterns) {
225
	print exclude "$File::Find::name\n" if($filename =~ /$p/);
226
	print exclude "$File::Find::name\n" if($filename =~ /$p/);
226
    }
227
    }
227
}
228
}
228
 
229
 
229
#**********************************************************
230
#**********************************************************