Changeset 11940 for trunk/psconfig/ckperlmods
- Timestamp:
- Feb 20, 2007, 11:50:12 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psconfig/ckperlmods (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psconfig/ckperlmods
r11938 r11940 1 1 #!/usr/bin/env perl 2 2 3 $version = ""; 4 $check = 0; 5 @tARGV = (); 6 for (; @ARGV > 0; ) { 7 if ($ARGV[0] eq "-version") { 8 $version = $ARGV[1]; 9 shift; shift; next; 10 } 11 if ($ARGV[0] eq "-check") { 12 $check = 1; 13 shift; next; 14 } 15 if ($ARGV[0] eq "-h") { &usage (); } 16 if ($ARGV[0] eq "-help") { &usage (); } 17 if ($ARGV[0] eq "--help") { &usage (); } 18 @tARGV = (@tARGV, $ARGV[0]); 19 shift; 20 } 21 @ARGV = @tARGV; 22 if ( @ARGV != 0) { &usage (); } 23 24 # load the perl module list 3 25 $file = "tagsets/ipp-extperl.dst"; 4 5 26 open (FILE, $file) || die "ERROR: can't open perl module list: $file\n"; 6 27 @list = <FILE>; … … 15 36 } 16 37 17 $prefix = `csh psconfig.sh --prefix $version`; 18 $perl5lib = `csh psconfig.sh --perl5lib $version`; 19 $homedir = `pwd`; 38 print "version: $version\n"; 39 40 $prefix = `csh -f psconfig.sh --prefix $version`; chomp $prefix; 41 $perl5lib = `csh -f psconfig.sh --perl5lib $version`; chomp $perl5lib; 42 $homedir = `pwd`; chomp $homedir; 43 44 print "prefix: $prefix\n"; 20 45 21 46 foreach $line (@list) { … … 24 49 if ($line =~ m|^\s*\#|) { next; } 25 50 26 ($N, $module, $tarball ) = split (" ", $line);51 ($N, $module, $tarball, $prompts) = split (" ", $line); 27 52 28 53 if (eval "use $module; 1") { … … 31 56 } 32 57 33 # print "$module: missing\n"; 58 print "$module: missing\n"; 59 if ($check) { next; } 60 34 61 # try to build the module from ../../extperl/Module.*.tar.gz 35 62 chdir "../../extperl"; 36 63 37 64 print "extract $module from $tarball\n"; 38 system ("tar xvzf $tarball");65 vsystem ("tar xvzf $tarball"); 39 66 40 67 ($tardir) = $tarball =~ m|(\S*).tar.gz|; … … 42 69 43 70 chdir $tardir; 44 # system ("perl Makefile.PL LIB=$perl5lib");45 system ("perl Makefile.PL PREFIX=$prefix");46 system ("make");47 system ("make install");48 71 49 # system ("ls $tarball"); 72 # vsystem ("perl Makefile.PL LIB=$perl5lib"); 73 if ($prompts) { 74 @answers = split (",", $prompts); 75 open (PIPE, "|perl Makefile.PL PREFIX=$prefix LIB=$perl5lib"); 76 foreach $answer (@answers) { 77 print PIPE "$answer\n"; 78 } 79 close (PIPE); 80 } else { 81 vsystem ("perl Makefile.PL PREFIX=$prefix LIB=$perl5lib"); 82 } 83 84 vsystem ("make < /dev/null"); 85 vsystem ("make install"); 50 86 51 87 chdir $homedir; 52 88 } 89 90 sub usage { 91 print STDERR "USAGE: ckperlmods [-version] [-check]\n"; 92 exit 2; 93 } 94 95 sub vsystem { 96 print STDERR "@_\n"; 97 $status = system ("@_"); 98 $status; 99 }
Note:
See TracChangeset
for help on using the changeset viewer.
