The R Project SVN R

Rev

Rev 28220 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28220 Rev 28240
Line 35... Line 35...
35
use Text::Wrap;
35
use Text::Wrap;
36
 
36
 
37
## don't buffer output
37
## don't buffer output
38
$| = 1;
38
$| = 1;
39
 
39
 
40
my $revision = ' $Revision: 1.167 $ ';
40
my $revision = ' $Revision: 1.168 $ ';
41
my $version;
41
my $version;
42
my $name;
42
my $name;
43
$revision =~ / ([\d\.]*) /;
43
$revision =~ / ([\d\.]*) /;
44
$version = $1;
44
$version = $1;
45
($name = $0) =~ s|.*/||;
45
($name = $0) =~ s|.*/||;
Line 858... Line 858...
858
	$log->result("OK");
858
	$log->result("OK");
859
    }
859
    }
860
 
860
 
861
    ## Check package subdirectories.
861
    ## Check package subdirectories.
862
 
862
 
-
 
863
    $log->checking("package subdirectories");
-
 
864
    my $any;
-
 
865
    if($ENV{"R_CHECK_SUBDIRS_NOCASE"}) {
-
 
866
	## Argh.  We often get submissions where 'R' comes out as 'r',
-
 
867
	## or 'man' comes out as 'MAN'.  Maybe we should warn about this
-
 
868
	## unconditionally ...
-
 
869
	if((-d "r")) {
-
 
870
	    $log->warning() unless $any;
-
 
871
	    $any++;
-
 
872
	    $log->print("Found subdirectory 'r'.\n");
-
 
873
	    $log->print("Most likely, this should be 'R'.\n")
-
 
874
	}
-
 
875
	if((-d "MAN")) {
-
 
876
	    $log->warning() unless $any;
-
 
877
	    $any++;
-
 
878
	    $log->print("Found subdirectory 'MAN'.\n");
-
 
879
	    $log->print("Most likely, this should be 'man'.\n")
-
 
880
	}
-
 
881
    }
863
    if((-d "data") || (-d "demo") || (-d "src") || (-d "inst")) {
882
    if((-d "data") || (-d "demo") || (-d "src") || (-d "inst")) {
864
	$log->checking("package subdirectories");
-
 
865
	my $any;
-
 
866
	## Subdirectory 'data' without data sets?
883
	## Subdirectory 'data' without data sets?
867
	if((-d "data") && !&list_files_with_type("data", "data")) {
884
	if((-d "data") && !&list_files_with_type("data", "data")) {
868
	    $log->warning() unless $any;
885
	    $log->warning() unless $any;
869
	    $any++;
886
	    $any++;
870
	    $log->print("Subdirectory 'data' contains no data sets.\n");
887
	    $log->print("Subdirectory 'data' contains no data sets.\n");
Line 911... Line 928...
911
				 ("It is recommended not to interfere",
928
				 ("It is recommended not to interfere",
912
				  "with package subdirectories",
929
				  "with package subdirectories",
913
				  "used by R.\n")));
930
				  "used by R.\n")));
914
	    }
931
	    }
915
	}
932
	}
916
	$log->result("OK") unless $any;
-
 
917
    }
933
    }
-
 
934
    $log->result("OK") unless $any;
918
 
935
 
919
    ## Check R code for syntax errors.
936
    ## Check R code for syntax errors.
920
 
937
 
921
    if(!$is_base_pkg && (-d "R")) {
938
    if(!$is_base_pkg && (-d "R")) {
922
	$log->checking("R files for syntax errors");
939
	$log->checking("R files for syntax errors");