mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
*** empty log message ***
This commit is contained in:
parent
958232dc2d
commit
9b5a3a0eb0
@ -20,31 +20,32 @@ sub CTReadVSpec {
|
|||||||
local( $ret ) = "" ;
|
local( $ret ) = "" ;
|
||||||
local( $thisproj ) = $_[0] ;
|
local( $thisproj ) = $_[0] ;
|
||||||
if ( -e "$ctvspec_path/$thisproj.vspec" ) {
|
if ( -e "$ctvspec_path/$thisproj.vspec" ) {
|
||||||
%ctvspecs = () ;
|
%ctvspecs = () ;
|
||||||
local( *SPECFILE ) ;
|
local( *SPECFILE ) ;
|
||||||
open( SPECFILE, "<$ctvspec_path/$thisproj.vspec" ) ;
|
open( SPECFILE, "<$ctvspec_path/$thisproj.vspec" ) ;
|
||||||
local( @partlist ) ;
|
local( @partlist ) ;
|
||||||
while ( $_ = <SPECFILE> ) {
|
while ( $_ = <SPECFILE> ) {
|
||||||
s/\n$// ;
|
s/\n$// ;
|
||||||
@partlist = split( /\#/ ) ;
|
@partlist = split( /\#/ ) ;
|
||||||
$_ = $partlist[0] ;
|
$_ = $partlist[0] ;
|
||||||
if ( $_ ne "" ) {
|
if ( $_ ne "" ) {
|
||||||
@partlist = split( /:/ );
|
@partlist = split( /:/ );
|
||||||
local( $tag ) = $partlist[0] ;
|
local( $tag ) = $partlist[0] ;
|
||||||
shift( @partlist ) ;
|
shift( @partlist ) ;
|
||||||
local( $spec ) = join( ":", @partlist ) ;
|
local( $spec ) = join( ":", @partlist ) ;
|
||||||
if ( &CTValidateSpec( $spec ) ) {
|
if ( &CTValidateSpec( $spec ) ) {
|
||||||
$ctvspecs{$tag} = $spec ;
|
$ctvspecs{$tag} = $spec ;
|
||||||
if ( $ctdebug ) {
|
if ( $ctdebug ) {
|
||||||
print STDERR "tag(" . $tag . ") = " . $spec . "\n" ;
|
print STDERR "tag(" . $tag . ") = " . $spec . "\n" ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close( SPECFILE ) ;
|
close( SPECFILE ) ;
|
||||||
$ctvspec_read = $_[0] ;
|
$ctvspec_read = $_[0] ;
|
||||||
} else {
|
} else {
|
||||||
print STDERR "CTReadVSpec: cannot locate '$ctvspec_path/$thisproj.vspec'\n" ;
|
print STDERR "CTReadVSpec: cannot locate '$ctvspec_path/$thisproj.vspec'\n" ;
|
||||||
|
print STDERR "(did you forget to run the \$WINTOOLS/cp_vspec script?)\n" ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,10 +76,10 @@ sub CTSpecFindOption {
|
|||||||
local( $item ) ;
|
local( $item ) ;
|
||||||
local( @itemlist ) ;
|
local( @itemlist ) ;
|
||||||
foreach $item ( @options ) {
|
foreach $item ( @options ) {
|
||||||
@itemlist = split( /=/, $item ) ;
|
@itemlist = split( /=/, $item ) ;
|
||||||
if ( $itemlist[0] eq $_[1] ) {
|
if ( $itemlist[0] eq $_[1] ) {
|
||||||
$ret = $itemlist[1] ;
|
$ret = $itemlist[1] ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ret ;
|
$ret ;
|
||||||
}
|
}
|
||||||
@ -92,33 +93,33 @@ sub CTResolveSpec {
|
|||||||
local( $proj ) = $_[0] ;
|
local( $proj ) = $_[0] ;
|
||||||
$proj =~ tr/A-Z/a-z/ ;
|
$proj =~ tr/A-Z/a-z/ ;
|
||||||
if ( $ctvspec_read ne $proj ) {
|
if ( $ctvspec_read ne $proj ) {
|
||||||
&CTReadVSpec( $proj ) ;
|
&CTReadVSpec( $proj ) ;
|
||||||
}
|
}
|
||||||
local( $spec ) = $ctvspecs{$_[1]} ;
|
local( $spec ) = $ctvspecs{$_[1]} ;
|
||||||
local( $ret ) = "" ;
|
local( $ret ) = "" ;
|
||||||
if ( $spec ne "" ) {
|
if ( $spec ne "" ) {
|
||||||
local( $type ) = &CTSpecType( $spec ) ;
|
local( $type ) = &CTSpecType( $spec ) ;
|
||||||
local( @speclist ) = split( /:/, &CTSpecOptions( $spec ) ) ;
|
local( @speclist ) = split( /:/, &CTSpecOptions( $spec ) ) ;
|
||||||
if ( $type eq "ref" ) {
|
if ( $type eq "ref" ) {
|
||||||
local( @optionlist ) = split( /=/, $speclist[0] ) ;
|
local( @optionlist ) = split( /=/, $speclist[0] ) ;
|
||||||
if ( $optionlist[0] ne "name" ) {
|
if ( $optionlist[0] ne "name" ) {
|
||||||
print STDERR "bad data attached to flavor " . $_[1] .
|
print STDERR "bad data attached to flavor " . $_[1] .
|
||||||
" of project " . $proj . "\n" ;
|
" of project " . $proj . "\n" ;
|
||||||
} else {
|
} else {
|
||||||
local( $tmp ) = &CTUShellEval( $optionlist[1] ) ;
|
local( $tmp ) = &CTUShellEval( $optionlist[1] ) ;
|
||||||
if ( $ctdebug ) {
|
if ( $ctdebug ) {
|
||||||
print STDERR "resolved a 'ref' to " . $tmp .
|
print STDERR "resolved a 'ref' to " . $tmp .
|
||||||
", recuring\n" ;
|
", recuring\n" ;
|
||||||
}
|
}
|
||||||
$ret = &CTResolveSpec( $proj, $tmp ) ;
|
$ret = &CTResolveSpec( $proj, $tmp ) ;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$ret = $spec ;
|
$ret = $spec ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $ret eq "" ) {
|
if ( $ret eq "" ) {
|
||||||
print STDERR "unknown flavor " . $_[1] . " of project " . $proj .
|
print STDERR "unknown flavor " . $_[1] . " of project " . $proj .
|
||||||
"\n" ;
|
"\n" ;
|
||||||
}
|
}
|
||||||
&CTUDebug( "out of CTResolveSpec\n" ) ;
|
&CTUDebug( "out of CTResolveSpec\n" ) ;
|
||||||
$ret ;
|
$ret ;
|
||||||
@ -133,31 +134,31 @@ sub CTResolveSpecName {
|
|||||||
local( $proj ) = $_[0] ;
|
local( $proj ) = $_[0] ;
|
||||||
$proj =~ tr/A-Z/a-z/ ;
|
$proj =~ tr/A-Z/a-z/ ;
|
||||||
if ( $ctvspec_read ne $proj ) {
|
if ( $ctvspec_read ne $proj ) {
|
||||||
&CTReadVSpec( $proj ) ;
|
&CTReadVSpec( $proj ) ;
|
||||||
}
|
}
|
||||||
local( $spec ) = $ctvspecs{$_[1]} ;
|
local( $spec ) = $ctvspecs{$_[1]} ;
|
||||||
local( $ret ) = $_[1] ;
|
local( $ret ) = $_[1] ;
|
||||||
if ( $spec ne "" ) {
|
if ( $spec ne "" ) {
|
||||||
local( $type ) = &CTSpecType( $spec ) ;
|
local( $type ) = &CTSpecType( $spec ) ;
|
||||||
local( @speclist ) = split( /:/, &CTSpecOptions( $spec ) ) ;
|
local( @speclist ) = split( /:/, &CTSpecOptions( $spec ) ) ;
|
||||||
if ( $type eq "ref" ) {
|
if ( $type eq "ref" ) {
|
||||||
local( @optionlist ) = split( /=/, $speclist[0] ) ;
|
local( @optionlist ) = split( /=/, $speclist[0] ) ;
|
||||||
if ( $optionlist[0] ne "name" ) {
|
if ( $optionlist[0] ne "name" ) {
|
||||||
print STDERR "bad data attached to flavor " . $_[1] .
|
print STDERR "bad data attached to flavor " . $_[1] .
|
||||||
" of project " . $proj . "\n" ;
|
" of project " . $proj . "\n" ;
|
||||||
} else {
|
} else {
|
||||||
local( $tmp ) = &CTUShellEval( $optionlist[1] ) ;
|
local( $tmp ) = &CTUShellEval( $optionlist[1] ) ;
|
||||||
if ( $ctdebug ) {
|
if ( $ctdebug ) {
|
||||||
print STDERR "resolved a 'ref' to " . $tmp .
|
print STDERR "resolved a 'ref' to " . $tmp .
|
||||||
", recuring\n" ;
|
", recuring\n" ;
|
||||||
}
|
}
|
||||||
$ret = &CTResolveSpecName( $proj, $tmp ) ;
|
$ret = &CTResolveSpecName( $proj, $tmp ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $ret eq "" ) {
|
if ( $ret eq "" ) {
|
||||||
print STDERR "unknown flavor " . $_[1] . " of project " . $proj .
|
print STDERR "unknown flavor " . $_[1] . " of project " . $proj .
|
||||||
"\n" ;
|
"\n" ;
|
||||||
}
|
}
|
||||||
&CTUDebug( "out of CTResolveSpecName\n" ) ;
|
&CTUDebug( "out of CTResolveSpecName\n" ) ;
|
||||||
$ret ;
|
$ret ;
|
||||||
@ -174,92 +175,92 @@ sub CTValidateSpec {
|
|||||||
local( $item ) ;
|
local( $item ) ;
|
||||||
local( @itemlist ) ;
|
local( @itemlist ) ;
|
||||||
if ( $type eq "ref" ) {
|
if ( $type eq "ref" ) {
|
||||||
local( $have_name ) = 0 ;
|
local( $have_name ) = 0 ;
|
||||||
foreach $item ( @speclist ) {
|
foreach $item ( @speclist ) {
|
||||||
@itemlist = split( /=/, $item ) ;
|
@itemlist = split( /=/, $item ) ;
|
||||||
if ( $itemlist[0] eq "name" ) {
|
if ( $itemlist[0] eq "name" ) {
|
||||||
if ( $have_name ) {
|
if ( $have_name ) {
|
||||||
$have_error = 1;
|
$have_error = 1;
|
||||||
&CTUDebug( "multiple name options on 'ref'\n" ) ;
|
&CTUDebug( "multiple name options on 'ref'\n" ) ;
|
||||||
}
|
}
|
||||||
$have_name = 1;
|
$have_name = 1;
|
||||||
} else {
|
} else {
|
||||||
&CTUDebug( "invalid option on 'ref' = " . $item . "\n" ) ;
|
&CTUDebug( "invalid option on 'ref' = " . $item . "\n" ) ;
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! $have_error ) {
|
if ( ! $have_error ) {
|
||||||
if ( $have_name ) {
|
if ( $have_name ) {
|
||||||
$ret = 1 ;
|
$ret = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elsif ( $type eq "root" ) {
|
} elsif ( $type eq "root" ) {
|
||||||
local( $have_path ) = 0 ;
|
local( $have_path ) = 0 ;
|
||||||
foreach $item ( @speclist ) {
|
foreach $item ( @speclist ) {
|
||||||
@itemlist = split( /=/, $item ) ;
|
@itemlist = split( /=/, $item ) ;
|
||||||
if ( $itemlist[0] eq "path" ) {
|
if ( $itemlist[0] eq "path" ) {
|
||||||
if ( $have_path ) {
|
if ( $have_path ) {
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
&CTUDebug( "multiple path options on 'root'\n" ) ;
|
&CTUDebug( "multiple path options on 'root'\n" ) ;
|
||||||
}
|
}
|
||||||
$have_path = 1 ;
|
$have_path = 1 ;
|
||||||
} else {
|
} else {
|
||||||
&CTUDebug( "invalid option on 'root' = " . $item . "\n" ) ;
|
&CTUDebug( "invalid option on 'root' = " . $item . "\n" ) ;
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! $have_error ) {
|
if ( ! $have_error ) {
|
||||||
if ( $have_path ) {
|
if ( $have_path ) {
|
||||||
$ret = 1 ;
|
$ret = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elsif ( $type eq "vroot" ) {
|
} elsif ( $type eq "vroot" ) {
|
||||||
local( $have_name ) = 0 ;
|
local( $have_name ) = 0 ;
|
||||||
foreach $item ( @speclist ) {
|
foreach $item ( @speclist ) {
|
||||||
@itemlist = split( /=/, $item ) ;
|
@itemlist = split( /=/, $item ) ;
|
||||||
if ( $itemlist[0] eq "name" ) {
|
if ( $itemlist[0] eq "name" ) {
|
||||||
if ( $have_name ) {
|
if ( $have_name ) {
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
&CTUDebug( "multiple name options on 'vroot'\n" ) ;
|
&CTUDebug( "multiple name options on 'vroot'\n" ) ;
|
||||||
}
|
}
|
||||||
$have_name = 1 ;
|
$have_name = 1 ;
|
||||||
} else {
|
} else {
|
||||||
&CTUDebug( "invalid option on 'vroot' = " . $item . "\n" ) ;
|
&CTUDebug( "invalid option on 'vroot' = " . $item . "\n" ) ;
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! $have_error ) {
|
if ( ! $have_error ) {
|
||||||
$ret = 1 ;
|
$ret = 1 ;
|
||||||
}
|
}
|
||||||
} elsif ( $type eq "croot" ) {
|
} elsif ( $type eq "croot" ) {
|
||||||
local( $have_path ) = 0 ;
|
local( $have_path ) = 0 ;
|
||||||
local( $have_server ) = 0 ;
|
local( $have_server ) = 0 ;
|
||||||
foreach $item ( @speclist ) {
|
foreach $item ( @speclist ) {
|
||||||
@itemlist = split( /=/, $item ) ;
|
@itemlist = split( /=/, $item ) ;
|
||||||
if ( $itemlist[0] eq "path" ) {
|
if ( $itemlist[0] eq "path" ) {
|
||||||
if ( $have_path ) {
|
if ( $have_path ) {
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
&CTUDebug( "multiple path options on 'croot'\n" ) ;
|
&CTUDebug( "multiple path options on 'croot'\n" ) ;
|
||||||
}
|
}
|
||||||
$have_path = 1 ;
|
$have_path = 1 ;
|
||||||
} elsif ( $itemlist[0] eq "server" ) {
|
} elsif ( $itemlist[0] eq "server" ) {
|
||||||
if ( $have_server ) {
|
if ( $have_server ) {
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
&CTUDebug( "multiple server options on 'croot'\n" ) ;
|
&CTUDebug( "multiple server options on 'croot'\n" ) ;
|
||||||
}
|
}
|
||||||
$have_server = 1 ;
|
$have_server = 1 ;
|
||||||
} else {
|
} else {
|
||||||
&CTUDebug( "invalid option on 'croot' = " . $item . "\n" ) ;
|
&CTUDebug( "invalid option on 'croot' = " . $item . "\n" ) ;
|
||||||
$have_error = 1 ;
|
$have_error = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ! $have_error ) {
|
if ( ! $have_error ) {
|
||||||
if ( $have_path && $have_server ) {
|
if ( $have_path && $have_server ) {
|
||||||
$ret = 1 ;
|
$ret = 1 ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
&CTUDebug( "unknow spec type '" . $speclist[0] . "'\n" ) ;
|
&CTUDebug( "unknow spec type '" . $speclist[0] . "'\n" ) ;
|
||||||
}
|
}
|
||||||
$ret ;
|
$ret ;
|
||||||
}
|
}
|
||||||
@ -273,24 +274,24 @@ sub CTListAllProjects {
|
|||||||
local( *DIRFILES ) ;
|
local( *DIRFILES ) ;
|
||||||
open( DIRFILES, "(cd $ctvspec_path ; /bin/ls -1 *.vspec ; echo blahblah) |" ) ;
|
open( DIRFILES, "(cd $ctvspec_path ; /bin/ls -1 *.vspec ; echo blahblah) |" ) ;
|
||||||
while ( ! $done ) {
|
while ( ! $done ) {
|
||||||
$_ = <DIRFILES> ;
|
$_ = <DIRFILES> ;
|
||||||
s/\n$// ;
|
s/\n$// ;
|
||||||
if ( $_ eq "blahblah" ) {
|
if ( $_ eq "blahblah" ) {
|
||||||
$done = 1 ;
|
$done = 1 ;
|
||||||
} else {
|
} else {
|
||||||
s/.vspec$// ;
|
s/.vspec$// ;
|
||||||
if ( $_ ne "" ) {
|
if ( $_ ne "" ) {
|
||||||
if ( $ret eq "" ) {
|
if ( $ret eq "" ) {
|
||||||
$ret = $_ ;
|
$ret = $_ ;
|
||||||
} else {
|
} else {
|
||||||
$ret = $ret . " " . $_ ;
|
$ret = $ret . " " . $_ ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close( DIRFILES ) ;
|
close( DIRFILES ) ;
|
||||||
&CTUDebug( "final list of projects '" . $ret . "'\n" .
|
&CTUDebug( "final list of projects '" . $ret . "'\n" .
|
||||||
"out of CTListAllProjects\n" ) ;
|
"out of CTListAllProjects\n" ) ;
|
||||||
$ret ;
|
$ret ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,16 +303,16 @@ sub CTListAllFlavors {
|
|||||||
local( $proj ) = $_[0] ;
|
local( $proj ) = $_[0] ;
|
||||||
$proj =~ tr/A-Z/a-z/ ;
|
$proj =~ tr/A-Z/a-z/ ;
|
||||||
if ( $ctvspec_read ne $proj ) {
|
if ( $ctvspec_read ne $proj ) {
|
||||||
&CTReadVSpec( $proj ) ;
|
&CTReadVSpec( $proj ) ;
|
||||||
}
|
}
|
||||||
local( $ret ) = "";
|
local( $ret ) = "";
|
||||||
local( $item ) ;
|
local( $item ) ;
|
||||||
foreach $item ( keys %ctvspecs ) {
|
foreach $item ( keys %ctvspecs ) {
|
||||||
if ( $ret eq "" ) {
|
if ( $ret eq "" ) {
|
||||||
$ret = $item ;
|
$ret = $item ;
|
||||||
} else {
|
} else {
|
||||||
$ret = $ret . " " . $item ;
|
$ret = $ret . " " . $item ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&CTUDebug( "out of CTListAllFlavors\n" ) ;
|
&CTUDebug( "out of CTListAllFlavors\n" ) ;
|
||||||
$ret ;
|
$ret ;
|
||||||
@ -327,7 +328,7 @@ sub CTComputeRoot {
|
|||||||
local( $proj ) = $_[0] ;
|
local( $proj ) = $_[0] ;
|
||||||
$proj =~ tr/A-Z/a-z/ ;
|
$proj =~ tr/A-Z/a-z/ ;
|
||||||
if ( $ctvspec_read ne $proj ) {
|
if ( $ctvspec_read ne $proj ) {
|
||||||
&CTReadVSpec( $proj ) ;
|
&CTReadVSpec( $proj ) ;
|
||||||
}
|
}
|
||||||
local( $ret ) = "" ;
|
local( $ret ) = "" ;
|
||||||
local( $type ) = &CTSpecType( $_[2] ) ;
|
local( $type ) = &CTSpecType( $_[2] ) ;
|
||||||
@ -335,18 +336,18 @@ sub CTComputeRoot {
|
|||||||
local( $vname ) = &CTResolveSpecName( $proj, $_[1] ) ;
|
local( $vname ) = &CTResolveSpecName( $proj, $_[1] ) ;
|
||||||
&CTUDebug( "type = '" . $type . "' with options '" . $options . "'\n" ) ;
|
&CTUDebug( "type = '" . $type . "' with options '" . $options . "'\n" ) ;
|
||||||
if ( $type eq "root" ) {
|
if ( $type eq "root" ) {
|
||||||
$ret = &CTSpecFindOption( $options, "path" ) ;
|
$ret = &CTSpecFindOption( $options, "path" ) ;
|
||||||
} elsif ( $type eq "vroot" ) {
|
} elsif ( $type eq "vroot" ) {
|
||||||
local( $name ) = &CTSpecFindOption( $options, "name" ) ;
|
local( $name ) = &CTSpecFindOption( $options, "name" ) ;
|
||||||
if ( $name ne "" ) {
|
if ( $name ne "" ) {
|
||||||
$ret = "/view/$name/vobs/$proj" ;
|
$ret = "/view/$name/vobs/$proj" ;
|
||||||
} else {
|
} else {
|
||||||
$ret = "/view/$vname/vobs/$proj" ;
|
$ret = "/view/$vname/vobs/$proj" ;
|
||||||
}
|
}
|
||||||
} elsif ( $type eq "croot" ) {
|
} elsif ( $type eq "croot" ) {
|
||||||
$ret = &CTSpecFindOption( $options, "path" ) ;
|
$ret = &CTSpecFindOption( $options, "path" ) ;
|
||||||
} elsif ( $ctdebug) {
|
} elsif ( $ctdebug) {
|
||||||
print STDERR "unknown flavor type '" . $type . "'\n" ;
|
print STDERR "unknown flavor type '" . $type . "'\n" ;
|
||||||
}
|
}
|
||||||
&CTUDebug( "returning '" . $ret . "'\n" ) ;
|
&CTUDebug( "returning '" . $ret . "'\n" ) ;
|
||||||
&CTUDebug( "out of CTComputeRoot\n" ) ;
|
&CTUDebug( "out of CTComputeRoot\n" ) ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user