Subversion Repositories DevTools

Rev

Rev 227 | Rev 261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 245
Line 491... Line 491...
491
 
491
 
492
        #
492
        #
493
        #   Generate the .rel files needed by MODCRC in the generation
493
        #   Generate the .rel files needed by MODCRC in the generation
494
        #   of the .THX file
494
        #   of the .THX file
495
        #
495
        #
496
        #   Need to massage the version number
496
        #   Need to massage the version number to be a decimal representation
-
 
497
        #   of a BCD number. Required to interwork with Mug Files
-
 
498
        #   The version number consists of 4 BCD chacaters
-
 
499
        #       The  most significant 2 are the major number 0-99
-
 
500
        #       The least significant 2 are the minor number 0-99
-
 
501
        #
497
        #   Can't do this at 'make time'
502
        #   Can't do this at 'make time'
498
        #
503
        #
-
 
504
        sub convertBcdDigit
-
 
505
        {
-
 
506
            my ($num, $shift) = @_;
-
 
507
            return ($num % 10) << $shift;
-
 
508
        }
-
 
509
        
-
 
510
        if ( $ver_data[1] > 99 || $ver_data[0] > 99 )
-
 
511
        {
-
 
512
            Error ("Cannot convert the package version number to required format",
-
 
513
                   "Major and Minor numbers MUST be less that 99",
499
        my $ver = ($ver_data[0] << 8) + $ver_data[1];
514
                   "Major: $ver_data[0], Minor: $ver_data[1]");
-
 
515
        }
-
 
516
        my $ver = convertBcdDigit( $ver_data[1]     , 0 )
-
 
517
                + convertBcdDigit( $ver_data[1] / 10, 4)
-
 
518
                + convertBcdDigit( $ver_data[0]     , 8 )
-
 
519
                + convertBcdDigit( $ver_data[0] / 10, 12 );
-
 
520
        
500
 
521
 
501
        $io->Prt( "$rel_mod :" .
522
        $io->Prt( "$rel_mod :" .
502
                  "\\\n\t\t$rel_file ".
523
                  "\\\n\t\t$rel_file ".
503
                  "\\\n\t\t\$(GBE_PLATFORM).mk " .
524
                  "\\\n\t\t\$(GBE_PLATFORM).mk " .
504
                  "\n\t\t\$(XX_PRE)\$(echo) > $rel_mod \"version=$ver\"\n" );
525
                  "\n\t\t\$(XX_PRE)\$(echo) > $rel_mod \"version=$ver\"\n" );