IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31162


Ignore:
Timestamp:
Apr 4, 2011, 1:21:33 PM (15 years ago)
Author:
eugene
Message:

updates from eam branch (tweaks for Darwin)

Location:
trunk/psconfig
Files:
3 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/pscheckmods

    r28191 r31162  
    11#!/usr/bin/env perl
    22
     3$VERBOSE = 0;
     4if (@ARGV > 2 && $ARGV[0] eq "-v") {
     5    $VERBOSE = 1;
     6    shift @ARGV;
     7}
    38if (@ARGV != 2) { die "USAGE: pscheckmods (module) (version)\n"; }
    49
    5 # print STDERR "checking in @INC\n";
     10if ($VERBOSE) { print STDERR "checking in @INC\n"; }
     11
     12# &detailed_require ($ARGV[0]);
    613
    714$x = eval "require $ARGV[0]; 1";
    815if (! $x) {
    9     # print "$ARGV[0]: missing\n";
    10     exit 1;
     16    if (! $VERBOSE) { exit 1; }
     17    print "$ARGV[0]: missing\n";
     18    &detailed_require ($ARGV[0]);
    1119}
    12 # print "x: $x\n";
     20if ($VERBOSE) { print "x: $x\n"; }
    1321
    1422$version = eval "\$$ARGV[0]::VERSION";
     
    2129
    2230exit 0;
     31
     32sub detailed_require {
     33    my ($filename) = @_;
     34    $filename =~ s|::|/|g;
     35    $filename = "$filename.pm";
     36    print "$filename\n";
     37    if (exists $INC{$filename}) {
     38        return 1 if $INC{$filename};
     39        die "Compilation failed in require";
     40    }
     41    my ($realfilename,$result);
     42  ITER: {
     43      foreach $prefix (@INC) {
     44          $realfilename = "$prefix/$filename";
     45          print "$realfilename\n";
     46          if (-f $realfilename) {
     47              $INC{$filename} = $realfilename;
     48              $result = do $realfilename;
     49              last ITER;
     50          }
     51      }
     52      die "Can't find $filename in \@INC";
     53    }
     54    if ($@) {
     55        $INC{$filename} = undef;
     56        die $@;
     57    } elsif (!$result) {
     58        delete $INC{$filename};
     59        die "$filename did not return true value";
     60    } else {
     61        return $result;
     62    }
     63}
  • trunk/psconfig/psconfig.bash.in

    r25575 r31162  
    11# this script sets the PS IPP build environment for BASH shell users
    22
    3 if [ -z $PSCONFIG_DIR ]; then
    4   # PSCONFIG_DIR=/home/eugene/src/panstarrs/ipp/psconfig
     3if [ -z $PSCONFDIR ]; then
    54  PSCONFDIR=@PSCONFDIR@
    65fi
  • trunk/psconfig/psconfig.csh.in

    r28191 r31162  
    2222set show_pkg_config_path = 0
    2323set show_aclocal_flags = 0
     24set use_fink = 0
    2425set args = ""
    2526while ($#argv)
     
    8889      set show_aclocal_flags = 1
    8990      breaksw;
     91    case --use-fink
     92      set use_fink = 1
     93      breaksw;
    9094    case -*:
    9195      echo "unknown option $1"
     
    323327 case darwin:
    324328 case darwin_x86:
    325    set xtralibs = ( $xtralibs "/sw/lib" )
    326    set xtrapath = ( $xtrapath "/sw/include" )
     329   if ($use_fink) then
     330     set xtralibs = ( $xtralibs "/sw/lib" )
     331     set xtrapath = ( $xtrapath "/sw/include" )
     332   endif
    327333   breaksw;
    328334
     
    550556  echo "       psconfig --cpath"
    551557  echo "       psconfig --aclocal_flags"
     558  echo "       psconfig --use-fink"
    552559  echo
    553560  echo "       psconfig --list    : list currently availabe configuration versions"
Note: See TracChangeset for help on using the changeset viewer.