IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 9, 2009, 6:06:36 PM (17 years ago)
Author:
Paul Price
Message:

Fixed version information in builds: determined separately (and singly!) for each component

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/psbuild

    r23409 r23790  
    1313$stop = "";
    1414$verbose = 0;
    15 $use_svn = 1;
    1615$svn_trunk = "";
     16$offline = 0;
    1717
    1818$extlibs = "none";
     
    9090        &bootstrap ();
    9191    }
    92     if ($ARGV[0] eq "-skip-svn") {
    93         $use_svn = 0;
    94         shift; next;
     92    if ($ARGV[0] eq "-offline") {
     93        $offline = 1;
     94        shift; next;
    9595    }
    9696    if ($ARGV[0] eq "-env") {
     
    167167sub build_distribution {
    168168
    169     # set environment variables used to supply SVN info to the compilation
    170 
    171     if ($use_svn) {
    172         # example dump from svn info:
    173         # pikake: svn info
    174         # Path: .
    175         # URL: https://svn.pan-starrs.ifa.hawaii.edu/repo/ipp/branches/eam_branches/eam_branch_20090303/ppImage
    176         # Repository Root: https://svn.pan-starrs.ifa.hawaii.edu/repo/ipp
    177         # Repository UUID: 60eb6cdc-a59c-4636-a4e0-dba66a9721fd
    178         # Revision: 23158
    179         # Node Kind: directory
    180         # Schedule: normal
    181         # Last Changed Author: price
    182         # Last Changed Rev: 23125
    183         # Last Changed Date: 2009-03-03 15:41:16 -1000 (Tue, 03 Mar 2009)
    184        
    185         $svn_version = `svnversion`; chomp $svn_version;
    186         @svn_info = `svn info`;
    187 
    188         # get the svn_root first:
    189         foreach $line (@svn_info) {
    190             if ($line =~ m|^Repository Root:|) {
    191                 ($svn_root) = $line =~ m|^Repository Root:\s*(\S*)|;
    192                 last;
    193             }
    194         }
    195 
    196         # now get the branch and UUID values
    197         foreach $line (@svn_info) {
    198             if ($line =~ m|^URL:|) {
    199                 ($svn_branch) = $line =~ m|^URL:\s*$svn_root/*(\S*)|;
    200             }
    201             if ($line =~ m|^Repository UUID:|) {
    202                 ($svn_source) = $line =~ m|^Repository UUID:\s*(\S*)|;
    203             }
    204         }
    205        
    206         $ENV{SVN_VERSION} = $svn_version;
    207         $ENV{SVN_BRANCH}  = $svn_branch;
    208         $ENV{SVN_SOURCE}  = $svn_source;
    209     } else {
    210         # alternatively, grab these from the following files:
    211         if (! -e "SVNINFO") {
    212             print "missing SVNINFO file for repository info, skipping\n";
    213         } else {
    214             @svn_info = `cat SVNINFO`;
    215             foreach $line (@svn_info) {
    216                 ($name, $value) = split (" ", $line);
    217                 $ENV{$name} = $value;
    218             }
    219         }
    220     }
    221     print "SVN_VERSION $ENV{SVN_VERSION}\n";
    222     print "SVN_BRANCH  $ENV{SVN_BRANCH}\n";
    223     print "SVN_SOURCE  $ENV{SVN_SOURCE}\n";
    224 
    225169    # use psconfig.csh to set needed build aliases
    226170    if ($extlibs eq "check") {
     
    279223    if ($optimize) { $psopts = "$psopts --enable-optimize"; }
    280224    if ($profile)  { $psopts = "$psopts --enable-profile --disable-shared --enable-static"; }
     225    $psopts .= " --disable-version" if $offline;
    281226
    282227    $homedir = `pwd`; chomp $homedir;
     
    299244
    300245        if ($svn_trunk && (!-d $workdir || !-r $workdir || !-x $workdir)) {
    301             # try trunk instead
     246            # try trunk instead
    302247            print STDERR "$module[$i] missing from local path, trying trunk path\n";
    303             $workdir = "$svn_trunk/$module[$i]";
     248            $workdir = "$svn_trunk/$module[$i]";
    304249        }
    305250
Note: See TracChangeset for help on using the changeset viewer.