Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorbjörn SVENSSON2021-02-22 09:39:06 -0500
committerTorbjörn Svensson2021-02-22 14:35:58 -0500
commitb063af68ad9f64406dee1a2b86fda6c06f4cd4af (patch)
tree2dd4e34deb45c85d60542c3115e0a1779ccecbd9 /build/org.eclipse.cdt.managedbuilder.core/src/org
parent07d8edaf28a99b7c390e08fbda437c7a2cc74634 (diff)
downloadorg.eclipse.cdt-b063af68ad9f64406dee1a2b86fda6c06f4cd4af.tar.gz
org.eclipse.cdt-b063af68ad9f64406dee1a2b86fda6c06f4cd4af.tar.xz
org.eclipse.cdt-b063af68ad9f64406dee1a2b86fda6c06f4cd4af.zip
Bug 571405: Generate rules with -MT"$@"
When there is a linked file in the project, the build target for the content in the .d file should be the .o file as that is what is depending on the source file. Use "$@" rather than "$(@)" as it's the usual syntax for single letter variables in make. Contributed by STMicroelectronics Change-Id: I6b024b2b3a1a8b061740e99de5e96923981c92fa Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core/src/org')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator2Commands.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator2Commands.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator2Commands.java
index e42586238ef..feb6995eba9 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator2Commands.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator2Commands.java
@@ -16,7 +16,6 @@ package org.eclipse.cdt.managedbuilder.makegen.gnu;
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
-import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.internal.macros.BuildMacroProvider;
@@ -175,15 +174,8 @@ public class DefaultGCCDependencyCalculator2Commands implements IManagedDependen
} else {
options[2] = "-MF\"$(@:%.o=%.d)\""; //$NON-NLS-1$
}
- if (buildContext instanceof IResourceConfiguration || needExplicitRuleForFile) {
- IPath outPath = getDependencyFiles()[0];
- // -MT"dependency-file-name"
- String optTxt = "-MT\"" + GnuMakefileGenerator.escapeWhitespaces(outPath.toString()) + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- options[3] = optTxt;
- } else {
- // -MT"$(@:%.o=%.d) %.o"
- options[3] = "-MT\"$(@)\""; //$NON-NLS-1$
- }
+ // -MT"$@"
+ options[3] = "-MT\"$@\""; //$NON-NLS-1$
return options;
}

Back to the top