IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14427


Ignore:
Timestamp:
Aug 7, 2007, 4:39:18 PM (19 years ago)
Author:
eugene
Message:

adding -force options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/pschecklibs.pl

    r14426 r14427  
    44
    55# default system library locations
    6 # @libpath = ( "/lib", "/usr/lib", "/usr/X11R6/lib", "/usr/local/lib" );
    7 @libpath = ( "/lib/foo");
    86@binpath = ( );
     7@libpath = ( "/lib", "/usr/lib", "/usr/X11R6/lib", "/usr/local/lib" );
    98@incpath = ( "/usr/include", "/usr/local/include", "/usr/X11R6/include" );
    109
    1110$version = "";
    1211$build = 0;
     12$force = "";
    1313@tARGV = ();
    1414for (; @ARGV > 0; ) {
     
    2020        $build = 1;
    2121        shift; next;
     22    }
     23    if ($ARGV[0] eq "-force") {
     24        if (@ARGV < 2) { die "-force must be coupled to a library name\n"; }
     25        $force = $ARGV[1];
     26        shift; shift; next;
    2227    }
    2328    if ($ARGV[0] eq "-h")     { &usage (); }
     
    118123    ($type, $name, $altnames, $altpaths, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts) = split (" ", $line);
    119124    if (($use_equals ne "Y") && ($use_equals ne "N")) { die "invalid value for use_equals field\n"; }
     125
     126    if ($force ne "") {
     127        if ($force eq $name) {
     128            &buildlib ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts);
     129            exit 0;
     130        }
     131        next;
     132    }
    120133
    121134    ## check for the C library
     
    143156        next;
    144157    }
     158    &buildlib ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts);
     159}
     160if ($build) { exit 0; }
     161print "\n";
     162
     163if (@faillibs > 0) {
     164    print "The following C libraries are missing from your system\n";
     165    foreach $name (@faillibs) {
     166        print "  $name\n";
     167    }
     168    print "\n";
     169    print "you may install them in your local path by re-running pschecklibs with -build\n";
     170} else {
     171    print "no C libraries are missing from your system\n";
     172}
     173exit 0;
     174
     175sub buildlib {
     176    my ($name, $tarball, $tardir, $use_equals, $configure_opts, $make_opts, $install_opts) = @_;
    145177
    146178    if ($tarball eq "NONE") {
     
    192224
    193225    chdir $homedir;
    194 }
    195 if ($build) { exit 0; }
    196 print "\n";
    197 
    198 if (@faillibs > 0) {
    199     print "The following C libraries are missing from your system\n";
    200     foreach $name (@faillibs) {
    201         print "  $name\n";
    202     }
    203     print "\n";
    204     print "you may install them in your local path by re-running pschecklibs with -build\n";
    205 } else {
    206     print "no C libraries are missing from your system\n";
    207 }
    208 exit 0;
     226    return 1;
     227}
    209228
    210229sub checklib {
Note: See TracChangeset for help on using the changeset viewer.