Changeset 27839 for branches/simmosaic_branches/psconfig/pschecklibs
- Timestamp:
- May 3, 2010, 8:45:22 AM (16 years ago)
- Location:
- branches/simmosaic_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simmosaic_branches
- Property svn:mergeinfo changed
-
branches/simmosaic_branches/psconfig
- Property svn:ignore
-
old new 2 2 psconfig.csh 3 3 psconfig.bash 4 build.log
-
- Property svn:ignore
-
branches/simmosaic_branches/psconfig/pschecklibs
r24068 r27839 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 … … 101 119 unshift @libpath, $libdir; 102 120 121 # XXX a temporary hack for libreadline (this failed... needed to modify libreadline/support/shobj-conf 122 # $shlib_libs = $ENV{'SHLIB_LIBS'}; 123 # unless ($shlib_libs =~ m|-lncurses|) { 124 # $shlib_libs .= " -lncurses"; 125 # } 126 # $ENV{'SHLIB_LIBS'} = $shlib_libs; 127 103 128 # add the path defined by PATH 104 129 @tmppath = split (":", $ENV{'PATH'}); … … 139 164 if (($auto_force ne "Y") && ($auto_force ne "N")) { die "invalid value for auto_force field\n"; } 140 165 166 if ($only && ($only ne lc($name))) { next; } 141 167 142 168 if ((defined $force{lc($name)} or defined $force{'all'}) and … … 494 520 495 521 sub usage { 496 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"; 497 526 exit 2; 498 527 } … … 514 543 } 515 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 516 563 sub failure { 517 564 system ("ls");
Note:
See TracChangeset
for help on using the changeset viewer.
