Fix cleanall can't clean all genereated files. Now .i files generated by VfrCompile move to module out put dir and Platform_build.xml will be removed in cleanall. Also adjust some code format.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1321 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
wuyizhong 2006-08-18 08:06:02 +00:00
parent 4b5f554990
commit caa44816dd
7 changed files with 25 additions and 9 deletions

View File

@ -649,7 +649,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/> <fileset casesensitive="on" file="${DEST_DIR_DEBUG}/@{FILEPATH}/@{FILENAME}.c"/>
</command> </command>
</cc> </cc>
<delete file="${PLATFORM_DIR}/@{FILENAME}.i" />
</sequential> </sequential>
</OnDependency> </OnDependency>
<!-- Since fileset can't scan file start with ./, remove ./ in previous. --> <!-- Since fileset can't scan file start with ./, remove ./ in previous. -->

View File

@ -25,9 +25,6 @@ import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.LogStreamHandler; import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Commandline;
import org.tianocore.common.logger.EdkLog;
/** /**
FwImageTask class. FwImageTask class.

View File

@ -25,8 +25,6 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
@ -47,7 +45,6 @@ public class MakeDeps extends Task {
// private members, use set/get to access them // private members, use set/get to access them
// //
private static final String cmdName = "MakeDeps"; private static final String cmdName = "MakeDeps";
private static final String target = "dummy";
private String includePath = null; private String includePath = null;
private String depsFile = null; private String depsFile = null;
private String subDir = null; private String subDir = null;

View File

@ -38,6 +38,7 @@ import org.apache.tools.ant.types.Commandline;
public class VfrCompilerTask extends Task implements EfiDefine { public class VfrCompilerTask extends Task implements EfiDefine {
private String createListFile = ""; private String createListFile = "";
private String outPutDir = ""; private String outPutDir = "";
private File outPutFile;
private String createIfrBinFile = ""; private String createIfrBinFile = "";
private String processerArg =""; private String processerArg ="";
private String vfrFile = ""; private String vfrFile = "";
@ -79,6 +80,9 @@ public class VfrCompilerTask extends Task implements EfiDefine {
@param outPutDir The directory name for ouput file @param outPutDir The directory name for ouput file
**/ **/
public void setOutPutDir(String outPutDir) { public void setOutPutDir(String outPutDir) {
if (outPutDir != null) {
outPutFile = new File(outPutDir);
}
this.outPutDir = " -od " + outPutDir; this.outPutDir = " -od " + outPutDir;
} }
@ -204,8 +208,13 @@ public class VfrCompilerTask extends Task implements EfiDefine {
Execute runner = new Execute(streamHandler,null); Execute runner = new Execute(streamHandler,null);
runner.setAntRun(project); runner.setAntRun(project);
runner.setCommandline(commandLine.getCommandline()); runner.setCommandline(commandLine.getCommandline());
if (outPutFile != null && outPutFile.exists()) {
runner.setWorkingDirectory(outPutFile);
}
log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE); log(Commandline.toString(commandLine.getCommandline()), Project.MSG_VERBOSE);
log(vfrFileName); log(vfrFileName);
int returnVal = runner.execute(); int returnVal = runner.execute();

View File

@ -179,6 +179,18 @@ public class FrameworkBuildTask extends Task{
fpdParserTask.setProject(getProject()); fpdParserTask.setProject(getProject());
fpdParserTask.setFpdFile(buildFile); fpdParserTask.setFpdFile(buildFile);
fpdParserTask.execute(); fpdParserTask.execute();
//
// If cleanall delete the Platform_build.xml
//
if (type.compareTo("cleanall") == 0) {
File platformBuildFile =
new File(getProject().getProperty("PLATFORM_DIR")
+ File.separatorChar
+ getProject().getProperty("PLATFORM")
+ "_build.xml");
platformBuildFile.deleteOnExit();
}
} }
// //

View File

@ -540,7 +540,6 @@ public class GlobalData {
} }
} }
return null; return null;
} }
/** /**

View File

@ -328,7 +328,10 @@ public class ToolChainInfo {
@return String @return String
**/ **/
public String toString() { public String toString() {
return targets + "\n" + tagnames + "\n" + archs + "\n" + commands; return " TARGET :" + targets + "\n" +
" TAGNAME:" + tagnames + "\n" +
" ARCH :" + archs + "\n" +
" COMMAND:" + commands;
} }
/** /**