IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18806


Ignore:
Timestamp:
Jul 30, 2008, 5:22:10 PM (18 years ago)
Author:
Paul Price
Message:

Need to ensure aclocal directory exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psconfig/psdist

    r16161 r18806  
    1616for (; @ARGV > 0; ) {
    1717    if ($ARGV[0] eq "-diff") {
    18         $diff = 1;
     18        $diff = 1;
    1919        shift; next;
    2020    }
    2121    if ($ARGV[0] eq "-update") {
    22         $update = 1; shift;
    23         if ($ARGV[0] eq "tags") {
    24             $update_mode = "tags";
    25             shift; next
    26         }
    27         if ($ARGV[0] eq "head") {
    28             $update_mode = "head";
    29             shift; next
    30         }
    31         &usage();
     22        $update = 1; shift;
     23        if ($ARGV[0] eq "tags") {
     24            $update_mode = "tags";
     25            shift; next
     26        }
     27        if ($ARGV[0] eq "head") {
     28            $update_mode = "head";
     29            shift; next
     30        }
     31        &usage();
    3232    }
    3333    if ($ARGV[0] eq "-tag") {
    34         $settag = 1; shift;
    35         if ($ARGV[0] eq "dev") {
    36             $settag_mode = "dev";
    37             shift; next
    38         }
    39         if ($ARGV[0] eq "rev") {
    40             $settag_mode = "rev";
    41             shift; next
    42         }
    43         if ($ARGV[0] eq "branch") {
    44             $settag_mode = "branch";
    45             shift; next
    46         }
    47         &usage();
     34        $settag = 1; shift;
     35        if ($ARGV[0] eq "dev") {
     36            $settag_mode = "dev";
     37            shift; next
     38        }
     39        if ($ARGV[0] eq "rev") {
     40            $settag_mode = "rev";
     41            shift; next
     42        }
     43        if ($ARGV[0] eq "branch") {
     44            $settag_mode = "branch";
     45            shift; next
     46        }
     47        &usage();
    4848    }
    4949    if ($ARGV[0] eq "-dist") {
    50         $mkdist = 1; shift;
    51         if ($ARGV[0] eq "cvs") {
    52             $mkdist_mode = "cvs";
    53             shift; next
    54         }
    55         if ($ARGV[0] eq "tree") {
    56             $mkdist_mode = "tree";
    57             shift; next
    58         }
    59         if ($ARGV[0] eq "autogen") {
    60             $mkdist_mode = "autogen";
    61             shift; next
    62         }
    63         if ($ARGV[0] eq "tarball") {
    64             $mkdist_mode = "tarball";
    65             shift; next
    66         }
    67         &usage();
     50        $mkdist = 1; shift;
     51        if ($ARGV[0] eq "cvs") {
     52            $mkdist_mode = "cvs";
     53            shift; next
     54        }
     55        if ($ARGV[0] eq "tree") {
     56            $mkdist_mode = "tree";
     57            shift; next
     58        }
     59        if ($ARGV[0] eq "autogen") {
     60            $mkdist_mode = "autogen";
     61            shift; next
     62        }
     63        if ($ARGV[0] eq "tarball") {
     64            $mkdist_mode = "tarball";
     65            shift; next
     66        }
     67        &usage();
    6868    }
    6969    if ($ARGV[0] eq "-module") {
    70         $module = $ARGV[1];
     70        $module = $ARGV[1];
    7171        shift; shift; next;
    7272    }
     
    101101
    102102    for ($i = 0; $i < @cvsname; $i++) {
    103         # the base component cannot be rdiffed
    104         print STDERR "--- $cvsname[$i] ---\n";
    105         if ($cvsname[$i] eq "base") { next; }
    106         if ($tag[$i] eq "") { next; }
    107         &vsystem ("cvs -q rdiff -s -r $tag[$i] $cvsname[$i]");
    108         print STDERR "\n\n";
     103        # the base component cannot be rdiffed
     104        print STDERR "--- $cvsname[$i] ---\n";
     105        if ($cvsname[$i] eq "base") { next; }
     106        if ($tag[$i] eq "") { next; }
     107        &vsystem ("cvs -q rdiff -s -r $tag[$i] $cvsname[$i]");
     108        print STDERR "\n\n";
    109109    }
    110110    exit 0;
     
    115115    if ($settag_mode eq "") { die "-tag mode is not set\n"; }
    116116    for ($i = 0; $i < @cvsname; $i++) {
    117         if (($module ne "") && ($module ne $cvsname[$i])) { next; }
    118         ## XXX make this backwards compatible with pre-ipp-2.4 releases (with four, not five, entries)?
    119         ($do_tag, $do_build, $do_dist, $do_update, $dev_build) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)(\S)|;
    120         if ($do_tag eq "N") {
    121             push @remind, $cvsname[$i];
    122             next;
    123         }
    124         if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
    125         if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
    126         $tag = "$branchtag[$i]$branchver[$i]";
    127         if ($settag_mode eq "branch") {
    128             &vsystem ("cvs -q rtag -b $branchtag[$i] $cvsname[$i]");
    129             next;
    130         }
    131         if ($settag_mode eq "dev") {
    132             &vsystem ("cvs -q rtag $tag $cvsname[$i]");
    133             next;
    134         }
    135         if ($settag_mode eq "rev") {
    136             &vsystem ("cvs -q rtag -r $branchtag[$i] $tag $cvsname[$i]");
    137             next;
    138         }
    139         die "programming error";
     117        if (($module ne "") && ($module ne $cvsname[$i])) { next; }
     118        ## XXX make this backwards compatible with pre-ipp-2.4 releases (with four, not five, entries)?
     119        ($do_tag, $do_build, $do_dist, $do_update, $dev_build) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)(\S)|;
     120        if ($do_tag eq "N") {
     121            push @remind, $cvsname[$i];
     122            next;
     123        }
     124        if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
     125        if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
     126        $tag = "$branchtag[$i]$branchver[$i]";
     127        if ($settag_mode eq "branch") {
     128            &vsystem ("cvs -q rtag -b $branchtag[$i] $cvsname[$i]");
     129            next;
     130        }
     131        if ($settag_mode eq "dev") {
     132            &vsystem ("cvs -q rtag $tag $cvsname[$i]");
     133            next;
     134        }
     135        if ($settag_mode eq "rev") {
     136            &vsystem ("cvs -q rtag -r $branchtag[$i] $tag $cvsname[$i]");
     137            next;
     138        }
     139        die "programming error";
    140140    }
    141141    for ($i = 0; $i < @remind; $i++) {
    142         print STDERR "remember to set tag for $remind[$i] if needed\n";
     142        print STDERR "remember to set tag for $remind[$i] if needed\n";
    143143    }
    144144    exit 0;
     
    153153
    154154    for ($i = 0; $i < @cvsname; $i++) {
    155         if (($module ne "") && ($module ne $cvsname[$i])) { next; }
    156         ($do_tag, $do_build, $do_dist, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
    157         if ($do_update eq "N") {
    158             push @remind, $cvsname[$i];
    159             next;
    160         }
    161         # only update modules with tags
    162         if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
    163         if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
    164         $tag = "$branchtag[$i]$branchver[$i]";
    165         if ($update_mode eq "tags") {
    166             &vsystem ("cvs -q co -r $tag $cvsname[$i]");
    167             next;
    168         }
    169         if ($update_mode eq "head") {
    170             &vsystem ("cvs -q co -A $cvsname[$i]");
    171             next;
    172         }
    173         die "programming error";
     155        if (($module ne "") && ($module ne $cvsname[$i])) { next; }
     156        ($do_tag, $do_build, $do_dist, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
     157        if ($do_update eq "N") {
     158            push @remind, $cvsname[$i];
     159            next;
     160        }
     161        # only update modules with tags
     162        if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
     163        if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
     164        $tag = "$branchtag[$i]$branchver[$i]";
     165        if ($update_mode eq "tags") {
     166            &vsystem ("cvs -q co -r $tag $cvsname[$i]");
     167            next;
     168        }
     169        if ($update_mode eq "head") {
     170            &vsystem ("cvs -q co -A $cvsname[$i]");
     171            next;
     172        }
     173        die "programming error";
    174174    }
    175175    for ($i = 0; $i < @remind; $i++) {
    176         print STDERR "remember to update $remind[$i] if needed\n";
     176        print STDERR "remember to update $remind[$i] if needed\n";
    177177    }
    178178    chdir $homedir;
     
    188188    chdir $distribution;
    189189    for ($i = 0; $i < @cvsname; $i++) {
    190         if (($module ne "") && ($module ne $cvsname[$i])) { next; }
    191         ($do_tag, $do_build, $do_dist, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
    192         if ($do_dist eq "N") { next; }
    193 
    194         if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
    195         if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
    196         $tag = "$branchtag[$i]$branchver[$i]";
    197 
    198         if ($mkdist_head) {
    199             &vsystem ("cvs co $cvsname[$i]");
    200             if ($status) { die "error running cvs"; }
    201         } else {
    202             &vsystem ("cvs co -r $tag $cvsname[$i]");
    203             if ($status) { die "error running cvs"; }
    204         }       
     190        if (($module ne "") && ($module ne $cvsname[$i])) { next; }
     191        ($do_tag, $do_build, $do_dist, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
     192        if ($do_dist eq "N") { next; }
     193
     194        if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; }
     195        if ($branchver[$i] eq "") { die "branch tag version missing\n"; }
     196        $tag = "$branchtag[$i]$branchver[$i]";
     197
     198        if ($mkdist_head) {
     199            &vsystem ("cvs co $cvsname[$i]");
     200            if ($status) { die "error running cvs"; }
     201        } else {
     202            &vsystem ("cvs co -r $tag $cvsname[$i]");
     203            if ($status) { die "error running cvs"; }
     204        }
    205205    }
    206206    chdir "..";
     
    211211    if ($mkdist_mode eq "tree") { exit 0; }
    212212
     213    # make sure the aclocal path exists
     214    @word = split (" ", $ENV{'ACLOCAL_FLAGS'});
     215    if (@word != 2) { &failure("setup", "ACLOCAL_FLAGS is not set"); }
     216    if (! -e $word[1]) { vsystem ("mkdir -p $word[1]"); }
     217
    213218    # run autogen.sh, if present, to build a configure script
    214219    chdir $distribution;
    215220    for ($i = 0; $i < @cvsname; $i++) {
    216         if (($module ne "") && ($module ne $cvsname[$i])) { next; }
    217         ($do_tag, $do_build, $do_dist, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
    218         if ($do_dist eq "N") { next; }
    219 
    220         if (! -e "$cvsname[$i]/autogen.sh" || -e "$cvsname[$i]/Build.PL" ) { next; }
    221         chdir $cvsname[$i];
    222 
    223         vsystem ("./autogen.sh --no-configure");
    224         if ($status) { die "error running autogen.sh"; }
    225 
    226 #       vsystem ("make distclean");
    227 #       if ($status) { die "error running make distclean"; }
    228         chdir "..";
     221        if (($module ne "") && ($module ne $cvsname[$i])) { next; }
     222        ($do_tag, $do_build, $do_dist, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|;
     223        if ($do_dist eq "N") { next; }
     224
     225        if (! -e "$cvsname[$i]/autogen.sh" || -e "$cvsname[$i]/Build.PL" ) { next; }
     226        chdir $cvsname[$i];
     227
     228        vsystem ("./autogen.sh --no-configure");
     229        if ($status) { die "error running autogen.sh"; }
     230
     231#       vsystem ("make distclean");
     232#       if ($status) { die "error running make distclean"; }
     233        chdir "..";
    229234    }
    230235    chdir "..";
     
    241246    @list = <$tagsets/*.dist>;
    242247    foreach $line (@list) {
    243         chomp $line;
    244         ($dist) = $line =~ m|$tagsets/(\S*).dist|;
    245         print STDERR "$dist\n";
     248        chomp $line;
     249        ($dist) = $line =~ m|$tagsets/(\S*).dist|;
     250        print STDERR "$dist\n";
    246251    }
    247252    exit 2;
     
    262267
    263268    foreach $line (@list) {
    264         chop $line;
    265         if ($line =~ m|^\s*$|) { next; }
    266         if ($line =~ m|^\s*\#|) { next; }
    267 
    268         ($mode, $cvsname, $branchtag, $branchver) = split (" ", $line);
    269        
    270         if ($cvsname eq "") { die "missing module name\n"; }
    271 
    272         ($do_tag, $do_build, $do_dist, $do_update) = $mode =~ m|(\S)(\S)(\S)(\S)|;
    273         if (($do_tag ne "Y") && ($do_tag ne "N")) { die "invalid tag option $do_tag\n"; }
    274         if (($do_build ne "Y") && ($do_build ne "N")) { die "invalid tag option $do_build\n"; }
    275         if (($do_dist ne "Y") && ($do_dist ne "N")) { die "invalid tag option $do_dist\n"; }
    276         if (($do_update ne "Y") && ($do_update ne "N")) { die "invalid tag option $do_update\n"; }
    277        
    278         # print "module: $cvsname, branchtag: $branchtag, branchver: $branchver ";
    279         # print "tag: $do_tag, build: $do_build, dist: $do_dist, update: $do_update\n";
    280 
    281         push @mode, $mode;
    282         push @cvsname, $cvsname;
    283         push @branchtag, $branchtag;
    284         push @branchver, $branchver;
     269        chop $line;
     270        if ($line =~ m|^\s*$|) { next; }
     271        if ($line =~ m|^\s*\#|) { next; }
     272
     273        ($mode, $cvsname, $branchtag, $branchver) = split (" ", $line);
     274
     275        if ($cvsname eq "") { die "missing module name\n"; }
     276
     277        ($do_tag, $do_build, $do_dist, $do_update) = $mode =~ m|(\S)(\S)(\S)(\S)|;
     278        if (($do_tag ne "Y") && ($do_tag ne "N")) { die "invalid tag option $do_tag\n"; }
     279        if (($do_build ne "Y") && ($do_build ne "N")) { die "invalid tag option $do_build\n"; }
     280        if (($do_dist ne "Y") && ($do_dist ne "N")) { die "invalid tag option $do_dist\n"; }
     281        if (($do_update ne "Y") && ($do_update ne "N")) { die "invalid tag option $do_update\n"; }
     282
     283        # print "module: $cvsname, branchtag: $branchtag, branchver: $branchver ";
     284        # print "tag: $do_tag, build: $do_build, dist: $do_dist, update: $do_update\n";
     285
     286        push @mode, $mode;
     287        push @cvsname, $cvsname;
     288        push @branchtag, $branchtag;
     289        push @branchver, $branchver;
    285290    }
    286291}
Note: See TracChangeset for help on using the changeset viewer.