buildframework/helium/tools/compile/ec/sysdef2make.pl
branchwip
changeset 380 db59fc762214
parent 217 0f5e3a7fb6af
equal deleted inserted replaced
369:1248e8f6a72d 380:db59fc762214
    61 
    61 
    62 use lib "$ENV{EPOCROOT}epoc32/tools/build/lib";
    62 use lib "$ENV{EPOCROOT}epoc32/tools/build/lib";
    63 use XML::DOM;
    63 use XML::DOM;
    64 
    64 
    65 my @userFilters = ();
    65 my @userFilters = ();
    66 my @forceMakeCommands = ("abld.*\-(w|what|c|check)[^a-zA-Z0-9]");
    66 my @forceMakeCommands = ("abld.*\-(w|what|c|check|checkwhat|cw)[^a-zA-Z0-9]");
    67 my $file = "";
    67 my $file = "";
    68 my $pathPrefix = "";
    68 my $pathPrefix = "";
    69 
    69 
    70 my @userConfigurations = ();
    70 my @userConfigurations = ();
    71 my @configurations = ();
    71 my @configurations = ();
   201         
   201         
   202         if ( $pathPrefix &&
   202         if ( $pathPrefix &&
   203              $bldFile !~ m{^\Q$pathPrefix\E}i ) {
   203              $bldFile !~ m{^\Q$pathPrefix\E}i ) {
   204             $bldFile = $pathPrefix.$bldFile;
   204             $bldFile = $pathPrefix.$bldFile;
   205         }
   205         }
   206         # Set bldFile to the unitID
   206         if (-d $bldFile) {
   207         $bldFiles{$unitID} = $bldFile ;
   207 	        # Set bldFile to the unitID
       
   208     	    $bldFiles{$unitID} = $bldFile;
       
   209         } else {
       
   210             print(STDERR "ERROR: could not find $bldFile.\n");
       
   211             next;
       
   212         }
   208 
   213 
   209         # Set the default priority
   214         # Set the default priority
   210         if ( ! $priority ) {
   215         if ( ! $priority ) {
   211             $priority = 1000;
   216             $priority = 1000;
   212         }
   217         }
   462                     # We are ignoring the fact that abld export doesnt work with all possible
   467                     # We are ignoring the fact that abld export doesnt work with all possible
   463                     # options. 
   468                     # options. 
   464                     # It is more important to relay the -keepgoing to abld export
   469                     # It is more important to relay the -keepgoing to abld export
   465                     # than try to protect the environment from user who uses abldOption wrong
   470                     # than try to protect the environment from user who uses abldOption wrong
   466                     if ( @{$options{$executable.'Option'}} &&
   471                     if ( @{$options{$executable.'Option'}} &&
   467                          $command !~ m{abld.*\-(w|what|c|check)\s}i ) {
   472                          $command !~ m{abld.*\-(w|what|c|check|checkwhat|cw)\s}i ) {
   468                         $option =" \$(".$executable."Option)";
   473                         $option =" \$(".$executable."Option)";
   469                     }
   474                     }
   470 
   475 
   471                     if ( ! @targets ) {
   476                     if ( ! @targets ) {
   472                         my %configurationTask;
   477                         my %configurationTask;
   634 
   639 
   635 print(MAKEFILE "define STARTTASK\n");
   640 print(MAKEFILE "define STARTTASK\n");
   636 print(MAKEFILE "\@echo === \$(CONFIGURATION) == \$\*\n");
   641 print(MAKEFILE "\@echo === \$(CONFIGURATION) == \$\*\n");
   637 print(MAKEFILE "\t\@echo -- \$\(1\) \n");
   642 print(MAKEFILE "\t\@echo -- \$\(1\) \n");
   638 print(MAKEFILE "\t-\@perl -e \"print '++ Started at '.localtime().\\\"\\n\\\"\"\n");
   643 print(MAKEFILE "\t-\@perl -e \"print '++ Started at '.localtime().\\\"\\n\\\"\"\n");
   639 print(MAKEFILE "\t-\@perl -e \"use Time::HiRes; print '+++ HiRes Start '.Time::HiRes::time().\\\"\\n\\\";\"\n");
   644 print(MAKEFILE "\t-\@python -c \"import time; print '+++ HiRes Start ',time.time();\"\n");
   640 print(MAKEFILE "endef\n\n");
   645 print(MAKEFILE "endef\n\n");
   641 
   646 
   642 
   647 
   643 print(MAKEFILE "define ENDTASK\n");
   648 print(MAKEFILE "define ENDTASK\n");
   644 print(MAKEFILE "\t\-\@perl -e \"use Time::HiRes; print '+++ HiRes End '.Time::HiRes::time().\\\"\\n\\\";\"\n");
   649 print(MAKEFILE "\t\-\@python -c \"import time; print '+++ HiRes End ',time.time();\"\n");
   645 print(MAKEFILE "\t-\@perl -e \"print '++ Finished at '.localtime().\\\"\\n\\\"\"\n");
   650 print(MAKEFILE "\t-\@perl -e \"print '++ Finished at '.localtime().\\\"\\n\\\"\"\n");
   646 print(MAKEFILE "endef\n\n");
   651 print(MAKEFILE "endef\n\n");
   647 
   652 
   648 print(MAKEFILE "# Rule for starting up a configuration\n");
   653 print(MAKEFILE "# Rule for starting up a configuration\n");
   649 print(MAKEFILE ".PHONY : timestart.txt\n\n");
   654 print(MAKEFILE ".PHONY : timestart.txt\n\n");