sbsv1_os/e32toolp/bldmake/bldmake.pl
branchRCL_3
changeset 16 22bdd8a90cc4
parent 2 99082257a271
equal deleted inserted replaced
13:7416fe50a180 16:22bdd8a90cc4
    14 # all variables called *Path* are set up to end with a backslash
    14 # all variables called *Path* are set up to end with a backslash
    15 # all variables called *Path or *File are stored as absolute (file)paths within makmake
    15 # all variables called *Path or *File are stored as absolute (file)paths within makmake
    16 # all variables called UpPath* are stored as relative paths within makmake
    16 # all variables called UpPath* are stored as relative paths within makmake
    17 # 
    17 # 
    18 #
    18 #
    19 
       
    20 use strict;
       
    21 
    19 
    22 use FindBin;		# for FindBin::Bin
    20 use FindBin;		# for FindBin::Bin
    23 use Getopt::Long;
    21 use Getopt::Long;
    24 
    22 
    25 my $PerlLibPath;    # fully qualified pathname of the directory containing our Perl modules
    23 my $PerlLibPath;    # fully qualified pathname of the directory containing our Perl modules
  1310 		"\n", 
  1308 		"\n", 
  1311 		"REM Bldmake-generated batch file - ABLD.BAT\n",
  1309 		"REM Bldmake-generated batch file - ABLD.BAT\n",
  1312 		"REM ** DO NOT EDIT **", 
  1310 		"REM ** DO NOT EDIT **", 
  1313 		"\n",
  1311 		"\n",
  1314 		"\n",
  1312 		"\n",
  1315 		"perl -w -S ABLD.PL \"${BldInfPath}\\\" %1 %2 %3 %4 %5 %6 %7 %8 %9\n",
  1313 		"perl -S abld.pl \"${BldInfPath}\\\" %1 %2 %3 %4 %5 %6 %7 %8 %9\n",
  1316 		"if errorlevel==1 goto CheckPerl\n",
  1314 		"if errorlevel==1 goto CheckPerl\n",
  1317 		"goto End\n",
  1315 		"goto End\n",
  1318 		"\n",
  1316 		"\n",
  1319 		":CheckPerl\n",
  1317 		":CheckPerl\n",
  1320 		"perl -v >NUL\n",
  1318 		"perl -v >NUL\n",
  1425 		"\n"
  1423 		"\n"
  1426 	);
  1424 	);
  1427 	foreach $dir (@$ExpDirsRef) {
  1425 	foreach $dir (@$ExpDirsRef) {
  1428 		&Output(
  1426 		&Output(
  1429 			"$dir :\n",
  1427 			"$dir :\n",
  1430 			    "\t\@perl -w -S emkdir.pl \"\$\@\"\n",
  1428 			    "\t\@perl -S emkdir.pl \"\$\@\"\n",
  1431 			"\n"
  1429 			"\n"
  1432 		);
  1430 		);
  1433 	}
  1431 	}
  1434 	&Output(
  1432 	&Output(
  1435 		"\n",
  1433 		"\n",
  1709 			 &Output("\t\@echo \$(UDEBx)$_ \n"); 	
  1707 			 &Output("\t\@echo \$(UDEBx)$_ \n"); 	
  1710 	}
  1708 	}
  1711 	
  1709 	
  1712     &Output("\n# Directories \n\n");  
  1710     &Output("\n# Directories \n\n");  
  1713 	&Output(join (" \\\n", @dirs)." :")       
  1711 	&Output(join (" \\\n", @dirs)." :")       
  1714 	&Output("\n\t\@perl -w -S emkdir.pl \$@\n\n");			
  1712 	&Output("\n\t\@perl -S emkdir.pl \$@\n\n");			
  1715 		   		
  1713 		   		
  1716 }
  1714 }
  1717 
  1715 
  1718 sub CreatePlatMak ($$$$$$$$$;$) {
  1716 sub CreatePlatMak ($$$$$$$$$;$) {
  1719 	my ($BatchPath, $E32MakePath, $DataRef, $Plat, $RealPlat, $RomDir, $Module, $BldInfPath, $Exports, $Test, $FeatureVariant)=@_;
  1717 	my ($BatchPath, $E32MakePath, $DataRef, $Plat, $RealPlat, $RomDir, $Module, $BldInfPath, $Exports, $Test, $FeatureVariant)=@_;
  1989 		}
  1987 		}
  1990 		&Output(
  1988 		&Output(
  1991 			"\n",
  1989 			"\n",
  1992 			"\n",
  1990 			"\n",
  1993 			"STARTROMFILE :\n",
  1991 			"STARTROMFILE :\n",
  1994 			    "\t\@perl -w -S emkdir.pl \"", &Path_Chop($RomDir), "\"\n",
  1992 			    "\t\@perl -S emkdir.pl \"", &Path_Chop($RomDir), "\"\n",
  1995 			    "\t\@echo // $OutRomFile > $OutRomFile\n",
  1993 			    "\t\@echo // $OutRomFile > $OutRomFile\n",
  1996 			    "\t\@echo // >> $OutRomFile\n"
  1994 			    "\t\@echo // >> $OutRomFile\n"
  1997 		);
  1995 		);
  1998 		if ($Test) {
  1996 		if ($Test) {
  1999 			my ($Auto, $Manual);
  1997 			my ($Auto, $Manual);
  2092 
  2090 
  2093 			&Output(
  2091 			&Output(
  2094 				"\n",
  2092 				"\n",
  2095 				"\n",
  2093 				"\n",
  2096 				"MAKEFILE$$Ref{Base} :\n",
  2094 				"MAKEFILE$$Ref{Base} :\n",
  2097 				    "\tperl -w -S makmake.pl \$(NO_DEPENDENCIES) -D $$Ref{Path}$$Ref{Base} $Plat$FeatureVariant $build_as_arm_arg $bld_flags $cmp_wrap_flag\n",
  2095 				    "\tperl -S makmake.pl \$(NO_DEPENDENCIES) -D $$Ref{Path}$$Ref{Base} $Plat$FeatureVariant $build_as_arm_arg $bld_flags $cmp_wrap_flag\n",
  2098 
  2096 
  2099 				"\n",
  2097 				"\n",
  2100 				"CLEANMAKEFILE$$Ref{Base} :\n",
  2098 				"CLEANMAKEFILE$$Ref{Base} :\n",
  2101 				    "\t-\$(ERASE) \$(MAKEFILE$$Ref{Base}_FILES)\n",
  2099 				    "\t-\$(ERASE) \$(MAKEFILE$$Ref{Base}_FILES)\n",
  2102 				"\n",
  2100 				"\n",
  2117 				"\n",
  2115 				"\n",
  2118 			);
  2116 			);
  2119 			foreach $Command (qw(CLEANALL)) {
  2117 			foreach $Command (qw(CLEANALL)) {
  2120 				&Output(
  2118 				&Output(
  2121 					"CLEANALL$$Ref{Base} :\n",
  2119 					"CLEANALL$$Ref{Base} :\n",
  2122 					"\tperl -w -S ermdir.pl $MakefilePath\n",
  2120 					"\tperl -S ermdir.pl $MakefilePath\n",
  2123 					"\n",
  2121 					"\n",
  2124 				);
  2122 				);
  2125 			}
  2123 			}
  2126 			foreach $Command (qw(CLEAN RESOURCE)) {
  2124 			foreach $Command (qw(CLEAN RESOURCE)) {
  2127 				&Output(
  2125 				&Output(