From 4250be6c8493b01da97d4ef2594703a772c8b2a8 Mon Sep 17 00:00:00 2001 From: wuyizhong Date: Tue, 5 Sep 2006 06:37:04 +0000 Subject: [PATCH] Add one more platform level common property "TARGET_DIR". Take Nt32 for example: TARGET_DIR=${BUILD_DIR}/${TARGET}_${TAGNAME} git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1458 6f19259b-4bc3-4df7-8a09-765794883524 --- .../build/fpd/PlatformBuildFileGenerator.java | 11 ++++++++++- .../org/tianocore/build/global/OutputManager.java | 15 +++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java b/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java index 017c4e378c..375122483f 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java +++ b/Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java @@ -531,6 +531,11 @@ public class PlatformBuildFileGenerator { fvEle.setAttribute("value", fvDir.getPath().replaceAll("(\\\\)", "/")); ele.appendChild(fvEle); + Element targetDirEle = document.createElement("var"); + targetDirEle.setAttribute("name", "TARGET_DIR"); + targetDirEle.setAttribute("value", ffsCommonDir.replaceAll("(\\\\)", "/")); + ele.appendChild(targetDirEle); + NodeList childNodes = node.getChildNodes(); for (int k = 0; k < childNodes.getLength(); k++) { Node childItem = childNodes.item(k); @@ -538,7 +543,6 @@ public class PlatformBuildFileGenerator { ele.appendChild(recursiveNode(childItem, document)); } } - } } } @@ -575,6 +579,11 @@ public class PlatformBuildFileGenerator { fvEle.setAttribute("value", fvDir.getPath().replaceAll("(\\\\)", "/")); ele.appendChild(fvEle); + Element targetDirEle = document.createElement("var"); + targetDirEle.setAttribute("name", "TARGET_DIR"); + targetDirEle.setAttribute("value", ffsCommonDir.replaceAll("(\\\\)", "/")); + ele.appendChild(targetDirEle); + NodeList childNodes = node.getChildNodes(); for (int k = 0; k < childNodes.getLength(); k++) { Node childItem = childNodes.item(k); diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/OutputManager.java b/Tools/Source/GenBuild/org/tianocore/build/global/OutputManager.java index 3aa736d400..2c70326202 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/OutputManager.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/OutputManager.java @@ -123,16 +123,18 @@ public class OutputManager { } } + // + // Define TARGET_DIR + // + String targetDir = buildDir + File.separatorChar + project.getProperty("TARGET") + + "_" + project.getProperty("TOOLCHAIN"); + // // Define BIN_DIR and FV_DIR // - String binDir = buildDir + File.separatorChar + project.getProperty("TARGET") - + "_" + project.getProperty("TOOLCHAIN") - + File.separatorChar + project.getProperty("ARCH") ; + String binDir = targetDir + File.separatorChar + project.getProperty("ARCH") ; - String fvDir = buildDir + File.separatorChar + project.getProperty("TARGET") - + "_" + project.getProperty("TOOLCHAIN") - + File.separatorChar + "FV"; + String fvDir = targetDir + File.separatorChar + "FV"; // // Define DEST_DIR_OUTPUT and DEST_DIR_DEBUG @@ -144,6 +146,7 @@ public class OutputManager { // Set properties // project.setProperty("BUILD_DIR", buildDir.replaceAll("(\\\\)", "/")); + project.setProperty("TARGET_DIR", targetDir.replaceAll("(\\\\)", "/")); project.setProperty("FV_DIR", fvDir.replaceAll("(\\\\)", "/")); project.setProperty("BIN_DIR", binDir.replaceAll("(\\\\)", "/")); project.setProperty("DEST_DIR_DEBUG", (destDir + File.separatorChar + "DEBUG").replaceAll("(\\\\)", "/")); -- 2.39.2