IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 12:08:50 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
3 edited
3 copied

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/psconfig/psbuild

    r22697 r23352  
    1313$stop = "";
    1414$verbose = 0;
     15$use_svn = 1;
    1516
    1617$extlibs = "none";
     
    8384    if ($ARGV[0] eq "-bootstrap") {
    8485        &bootstrap ();
     86    }
     87    if ($ARGV[0] eq "-skip-svn") {
     88        $use_svn = 0;
     89        shift; next;
    8590    }
    8691    if ($ARGV[0] eq "-env") {
     
    157162sub build_distribution {
    158163
     164    # set environment variables used to supply SVN info to the compilation
     165
     166    if ($use_svn) {
     167        # example dump from svn info:
     168        # pikake: svn info
     169        # Path: .
     170        # URL: https://svn.pan-starrs.ifa.hawaii.edu/repo/ipp/branches/eam_branches/eam_branch_20090303/ppImage
     171        # Repository Root: https://svn.pan-starrs.ifa.hawaii.edu/repo/ipp
     172        # Repository UUID: 60eb6cdc-a59c-4636-a4e0-dba66a9721fd
     173        # Revision: 23158
     174        # Node Kind: directory
     175        # Schedule: normal
     176        # Last Changed Author: price
     177        # Last Changed Rev: 23125
     178        # Last Changed Date: 2009-03-03 15:41:16 -1000 (Tue, 03 Mar 2009)
     179       
     180        $svn_version = `svnversion`; chomp $svn_version;
     181        @svn_info = `svn info`;
     182
     183        # get the svn_root first:
     184        foreach $line (@svn_info) {
     185            if ($line =~ m|^Repository Root:|) {
     186                ($svn_root) = $line =~ m|^Repository Root:\s*(\S*)|;
     187                last;
     188            }
     189        }
     190
     191        # now get the branch and UUID values
     192        foreach $line (@svn_info) {
     193            if ($line =~ m|^URL:|) {
     194                ($svn_branch) = $line =~ m|^URL:\s*$svn_root/*(\S*)|;
     195            }
     196            if ($line =~ m|^Repository UUID:|) {
     197                ($svn_source) = $line =~ m|^Repository UUID:\s*(\S*)|;
     198            }
     199        }
     200       
     201        $ENV{SVN_VERSION} = $svn_version;
     202        $ENV{SVN_BRANCH}  = $svn_branch;
     203        $ENV{SVN_SOURCE}  = $svn_source;
     204    } else {
     205        # alternatively, grab these from the following files:
     206        if (! -e "SVNINFO") {
     207            print "missing SVNINFO file for repository info, skipping\n";
     208        } else {
     209            @svn_info = `cat SVNINFO`;
     210            foreach $line (@svn_info) {
     211                ($name, $value) = split (" ", $line);
     212                $ENV{$name} = $value;
     213            }
     214        }
     215    }
     216    print "SVN_VERSION $ENV{SVN_VERSION}\n";
     217    print "SVN_BRANCH  $ENV{SVN_BRANCH}\n";
     218    print "SVN_SOURCE  $ENV{SVN_SOURCE}\n";
     219
    159220    # use psconfig.csh to set needed build aliases
    160 
    161221    if ($extlibs eq "check") {
    162222        $status = vsystem ("pschecklibs");
     
    247307
    248308        if (-e "Build.PL") {
    249             vsystem ("$psperlbuild");
    250             if ($?) { &failure($module[$i], "failure in perl Build.PL"); }
    251 
    252             vsystem ("./Build");
    253             if ($?) { &failure($module[$i], "failure in Build"); }
    254 
    255             vsystem ("./Build install");
    256             if ($?) { &failure($module[$i], "failure in Build install"); }
     309            $status = vsystem ("$psperlbuild");
     310            if ($status) { &failure($module[$i], "failure in perl Build.PL"); }
     311
     312            $status = vsystem ("./Build");
     313            if ($status) { &failure($module[$i], "failure in Build"); }
     314
     315            $status = vsystem ("./Build install");
     316            if ($status) { &failure($module[$i], "failure in Build install"); }
    257317
    258318            next;
     
    272332        if ($developer && $rebuild_this && ! -e "configure" && -e "autogen.sh") {
    273333            $skip_configure = 1;
    274             vsystem ("$psautogen $psopts");
    275             if ($?) { &failure($module[$i], "failure in psautogen"); }
     334            $status = vsystem ("$psautogen $psopts");
     335            if ($status) { &failure($module[$i], "failure in psautogen"); }
    276336        }
    277337
    278338        if ($rebuild_this && -e "configure" && !$skip_configure) {
    279             vsystem ("$psconfigure $psopts");
    280             if ($?) { &failure($module[$i], "failure in psconfigure"); }
     339            $status = vsystem ("$psconfigure $psopts");
     340            if ($status) { &failure($module[$i], "failure in psconfigure"); }
    281341        }
    282342
     
    288348
    289349        if ($clean) {
    290             vsystem ("$make clean");
    291             if ($?) { &failure($module[$i], "failure in make clean"); }
     350            $status = vsystem ("$make clean");
     351            if ($status) { &failure($module[$i], "failure in make clean"); }
    292352        }
    293353
    294         vsystem ("$make");
    295         if ($?) { &failure($module[$i], "failure in make"); }
    296 
    297         vsystem ("$make install");
    298         if ($?) { &failure($module[$i], "failure in make install"); }
     354        $status = vsystem ("$make");
     355        if ($status) { &failure($module[$i], "failure in make"); }
     356
     357        $status = vsystem ("$make install");
     358        if ($status) { &failure($module[$i], "failure in make install"); }
    299359
    300360        print "*** done with $module[$i] ***\n";
  • branches/cnb_branches/cnb_branch_20090301/psconfig/pschecklibs

    r22721 r23352  
    487487
    488488sub usage {
    489     print STDERR "USAGE: pscheckperl [-version] [-build]\n";
     489    print STDERR "USAGE: pschecklibs [-version] [-build]\n";
    490490    exit 2;
    491491}
Note: See TracChangeset for help on using the changeset viewer.