Changeset 27838 for branches/tap_branches/psconfig/pschecklibs
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psconfig/pschecklibs (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/psconfig/pschecklibs
r25008 r27838 11 11 $version = ""; 12 12 $build = 0; 13 $list_modules = 0; 14 my $only = ""; 13 15 my %force; 14 16 my %done; # Tarballs that have been processed … … 35 37 shift; shift; next; 36 38 } 39 if ($ARGV[0] eq "-only") { 40 if (@ARGV < 2) { die "-only must be coupled to a library name\n"; } 41 $only = lc($ARGV[1]); 42 shift; shift; next; 43 } 37 44 if ($ARGV[0] eq "-h") { &usage (); } 38 45 if ($ARGV[0] eq "help") { &usage (); } … … 40 47 if ($ARGV[0] eq "--help") { &usage (); } 41 48 if ($ARGV[0] eq "-list") { &list_distributions(); } 49 if ($ARGV[0] eq "-modules") { $list_modules = 1; shift; next; } 42 50 @tARGV = (@tARGV, $ARGV[0]); 43 51 shift; … … 59 67 close (FILE); 60 68 69 if ($list_modules) { &list_modules(); } 70 61 71 # set the psconfig version: 62 72 if ("$version" eq "") { … … 65 75 if ("$version" eq "") { 66 76 $version = "default"; 77 } 78 79 # generate new psconfig.csh if needed 80 if (! -e "psconfig.csh" || ! -e "psconfig.bash") { 81 $psconfdir = $ENV{'PSCONFDIR'}; 82 if ($psconfdir eq "") { die "PSCONFDIR not found, run psbuild -bootstrap and follow instructions\n"; } 83 vsystem ("cat psconfig.csh.in | sed 's|\@PSCONFDIR@|$psconfdir|' > psconfig.csh"); 84 vsystem ("cat psconfig.bash.in | sed 's|\@PSCONFDIR@|$psconfdir|' > psconfig.bash"); 67 85 } 68 86 … … 146 164 if (($auto_force ne "Y") && ($auto_force ne "N")) { die "invalid value for auto_force field\n"; } 147 165 166 if ($only && ($only ne lc($name))) { next; } 148 167 149 168 if ((defined $force{lc($name)} or defined $force{'all'}) and … … 501 520 502 521 sub usage { 503 print STDERR "USAGE: pschecklibs [-version] [-build]\n"; 522 print STDERR "USAGE: pschecklibs [-version] [-build] [-only module] [-force module] [-force all]\n"; 523 print STDERR " multiple [-force (module)] options may be specified\n"; 524 print STDERR "USAGE: pschecklibs [-list] : show C libraries file\n"; 525 print STDERR "USAGE: pschecklibs [-modules] : list available C modules\n"; 504 526 exit 2; 505 527 } … … 521 543 } 522 544 545 sub list_modules { 546 547 foreach $line (@list) { 548 chop $line; 549 if ($line =~ m|^\s*$|) { next; } 550 if ($line =~ m|^\s*\#|) { next; } 551 552 ($type, $name, $altnames, $altpaths, $tarball, $tardir, $auto_force, $configure_opts, $make_opts, $install_opts) = split (" ", $line); 553 if ($type eq "bin") { 554 print STDERR "bin: $name\n"; 555 } 556 if ($type eq "lib") { 557 print STDERR "lib: $name\n"; 558 } 559 } 560 exit 0; 561 } 562 523 563 sub failure { 524 564 system ("ls");
Note:
See TracChangeset
for help on using the changeset viewer.
