Changeset 25803
- Timestamp:
- Oct 7, 2009, 5:05:30 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psconfig/pscheckperl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psconfig/pscheckperl
r24670 r25803 9 9 for (; @ARGV > 0; ) { 10 10 if ($ARGV[0] eq "-version") { 11 $version = $ARGV[1];11 $version = $ARGV[1]; 12 12 shift; shift; next; 13 13 } 14 14 if ($ARGV[0] eq "-build") { 15 $build = 1;15 $build = 1; 16 16 shift; next; 17 17 } 18 18 if ($ARGV[0] eq "-force") { 19 $force{$ARGV[1]} = 1;20 shift; shift; next;19 $force{$ARGV[1]} = 1; 20 shift; shift; next; 21 21 } 22 22 if ($ARGV[0] eq "-h") { &usage (); } … … 31 31 if ( @ARGV > 1) { &usage(); } 32 32 33 if ( @ARGV == 0) { 33 if ( @ARGV == 0) { 34 34 @list = <$tagsets/*.perl>; 35 35 $file = $list[-1]; … … 79 79 ($N, $module, $tarball, $modver, $prompts) = split (" ", $line); 80 80 81 if ($modver eq "") { $modver = 0; } 81 if ($modver eq "") { $modver = 0; } 82 82 system ("pscheckmods $module $modver"); 83 if (($? == 0) and not defined $force{$module} and not defined $force{'all'}) { 84 # print "$module: found\n";85 next; 83 if (($? == 0) and not defined $force{$module} and not defined $force{'all'}) { 84 # print "$module: found\n"; 85 next; 86 86 } 87 87 88 88 if (defined $force{$module}) { 89 print "$module: force\n";89 print "$module: force\n"; 90 90 } else { 91 print "$module: missing\n";91 print "$module: missing\n"; 92 92 } 93 unless ($build or defined $force{$module} or defined $force{'all'}) { 94 $Nmissing ++;95 push @missing, $module;96 next; 93 unless ($build or defined $force{$module} or defined $force{'all'}) { 94 $Nmissing ++; 95 push @missing, $module; 96 next; 97 97 } 98 98 … … 102 102 print "extract $module from $tarball\n"; 103 103 vsystem ("tar xvzf $tarball"); 104 104 105 105 ($tardir) = $tarball =~ m|(\S*).tar.gz|; 106 106 print "tardir: $tardir\n"; … … 108 108 chdir $tardir; 109 109 110 # build the MakeMaker makefile, setting the output directories 111 if ($prompts) { 112 @answers = split (",", $prompts); 113 open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perldir"); 114 foreach $answer (@answers) { 115 print PIPE "$answer\n"; 116 } 117 close (PIPE); 110 if (-e "Build.PL") { 111 vsystem("psbuildperl"); 112 vsystem("Build"); 113 vsystem("Build install"); 118 114 } else { 119 vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perldir"); 115 # build the MakeMaker makefile, setting the output directories 116 if ($prompts) { 117 @answers = split (",", $prompts); 118 open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perldir"); 119 foreach $answer (@answers) { 120 print PIPE "$answer\n"; 121 } 122 close (PIPE); 123 } else { 124 vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perldir"); 125 } 126 127 vsystem ("make < /dev/null"); 128 vsystem ("make install"); 120 129 } 121 122 vsystem ("make < /dev/null");123 vsystem ("make install");124 130 125 131 chdir $homedir; … … 127 133 if (!$build) { 128 134 if ($Nmissing > 0) { 129 print "The following $Nmissing perl modules are missing from your system\n";130 foreach $name (@missing) {131 print " $name\n";132 }133 print "you may install them in your local path by re-running pscheckperl with -build\n";135 print "The following $Nmissing perl modules are missing from your system\n"; 136 foreach $name (@missing) { 137 print " $name\n"; 138 } 139 print "you may install them in your local path by re-running pscheckperl with -build\n"; 134 140 } else { 135 print "no perl modules are missing from your system\n";141 print "no perl modules are missing from your system\n"; 136 142 } 137 143 } … … 152 158 @list = <$tagsets/*.perl>; 153 159 foreach $line (@list) { 154 chomp $line;155 ($dist) = $line =~ m|$tagsets/(\S*).perl|;156 print STDERR "$dist\n";160 chomp $line; 161 ($dist) = $line =~ m|$tagsets/(\S*).perl|; 162 print STDERR "$dist\n"; 157 163 } 158 164 exit 2;
Note:
See TracChangeset
for help on using the changeset viewer.
