Changeset 18806
- Timestamp:
- Jul 30, 2008, 5:22:10 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psconfig/psdist (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psconfig/psdist
r16161 r18806 16 16 for (; @ARGV > 0; ) { 17 17 if ($ARGV[0] eq "-diff") { 18 $diff = 1;18 $diff = 1; 19 19 shift; next; 20 20 } 21 21 if ($ARGV[0] eq "-update") { 22 $update = 1; shift; 23 if ($ARGV[0] eq "tags") {24 $update_mode = "tags";25 shift; next26 }27 if ($ARGV[0] eq "head") {28 $update_mode = "head";29 shift; next30 }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(); 32 32 } 33 33 if ($ARGV[0] eq "-tag") { 34 $settag = 1; shift;35 if ($ARGV[0] eq "dev") {36 $settag_mode = "dev";37 shift; next38 }39 if ($ARGV[0] eq "rev") {40 $settag_mode = "rev";41 shift; next42 }43 if ($ARGV[0] eq "branch") {44 $settag_mode = "branch";45 shift; next46 }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(); 48 48 } 49 49 if ($ARGV[0] eq "-dist") { 50 $mkdist = 1; shift;51 if ($ARGV[0] eq "cvs") {52 $mkdist_mode = "cvs";53 shift; next54 }55 if ($ARGV[0] eq "tree") {56 $mkdist_mode = "tree";57 shift; next58 }59 if ($ARGV[0] eq "autogen") {60 $mkdist_mode = "autogen";61 shift; next62 }63 if ($ARGV[0] eq "tarball") {64 $mkdist_mode = "tarball";65 shift; next66 }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(); 68 68 } 69 69 if ($ARGV[0] eq "-module") { 70 $module = $ARGV[1];70 $module = $ARGV[1]; 71 71 shift; shift; next; 72 72 } … … 101 101 102 102 for ($i = 0; $i < @cvsname; $i++) { 103 # the base component cannot be rdiffed104 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"; 109 109 } 110 110 exit 0; … … 115 115 if ($settag_mode eq "") { die "-tag mode is not set\n"; } 116 116 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"; 140 140 } 141 141 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"; 143 143 } 144 144 exit 0; … … 153 153 154 154 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 tags162 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"; 174 174 } 175 175 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"; 177 177 } 178 178 chdir $homedir; … … 188 188 chdir $distribution; 189 189 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 } 205 205 } 206 206 chdir ".."; … … 211 211 if ($mkdist_mode eq "tree") { exit 0; } 212 212 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 213 218 # run autogen.sh, if present, to build a configure script 214 219 chdir $distribution; 215 220 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 ".."; 229 234 } 230 235 chdir ".."; … … 241 246 @list = <$tagsets/*.dist>; 242 247 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"; 246 251 } 247 252 exit 2; … … 262 267 263 268 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; 285 290 } 286 291 }
Note:
See TracChangeset
for help on using the changeset viewer.
