From f2b3b420523b8b460b85038583f43151a1078db6 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Wed, 4 Nov 2009 23:00:48 +0000 Subject: [PATCH] bug 294135: JUnit failures related to files with spaces in managedbuilder test suite Fixed regression bug and updated benchmarks. --- .../test1DepCalc2/Benchmarks/Sources/sub sources/subdir.mk | 2 +- .../Benchmarks/sub folder with spaces/subdir.mk | 2 +- .../test30Projects/test with spaces/Benchmarks/subdir.mk | 2 +- .../makegen/gnu/DefaultGCCDependencyCalculator2Commands.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/Benchmarks/Sources/sub sources/subdir.mk b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/Benchmarks/Sources/sub sources/subdir.mk index b803d8dca87..f206bdfdc25 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/Benchmarks/Sources/sub sources/subdir.mk +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/depCalcProjects/test1DepCalc2/Benchmarks/Sources/sub sources/subdir.mk @@ -17,7 +17,7 @@ C_DEPS += \ Sources/sub\ sources/func\ 3.o: ../Sources/sub\ sources/func\ 3.c @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - gcc -I../Headers -I../Sources/sub\ sources -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"Sources/sub\ sources/func\ 3.d" -o"$@" "$<" + gcc -I../Headers -I../Sources/sub\ sources -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Sources/sub sources/func 3.d" -MT"Sources/sub\ sources/func\ 3.d" -o"$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/sub folder with spaces/subdir.mk b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/sub folder with spaces/subdir.mk index 929484435c7..c879edfb549 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/sub folder with spaces/subdir.mk +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/sub folder with spaces/subdir.mk @@ -17,7 +17,7 @@ C_DEPS += \ sub\ folder\ with\ spaces/foo\ with\ spaces.o: ../sub\ folder\ with\ spaces/foo\ with\ spaces.c @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"sub\ folder\ with\ spaces/foo\ with\ spaces.d" -o"$@" "$<" + gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"sub folder with spaces/foo with spaces.d" -MT"sub\ folder\ with\ spaces/foo\ with\ spaces.d" -o"$@" "$<" @echo 'Finished building: $<' @echo ' ' diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/subdir.mk b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/subdir.mk index b21a1371ae7..f5799f10f57 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/subdir.mk +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/test with spaces/Benchmarks/subdir.mk @@ -17,7 +17,7 @@ C_DEPS += \ main\ with\ spaces.o: ../main\ with\ spaces.c @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"main\ with\ spaces.d" -o"$@" "$<" + gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main with spaces.d" -MT"main\ with\ spaces.d" -o"$@" "$<" @echo 'Finished building: $<' @echo ' ' 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 841184009c8..7d237c730fd 100755 --- 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 @@ -178,7 +178,7 @@ public class DefaultGCCDependencyCalculator2Commands implements if( buildContext instanceof IResourceConfiguration || needExplicitRuleForFile ) { IPath outPath = getDependencyFiles()[0]; // -MT"dependency-file-name" - String optTxt = "-MT\"" + outPath.toString() + "\""; //$NON-NLS-1$ //$NON-NLS-2$ + String optTxt = "-MT\"" + GnuMakefileGenerator.escapeWhitespaces(outPath.toString()) + "\""; //$NON-NLS-1$ //$NON-NLS-2$ options[3] = optTxt; } else { // -MT"$(@:%.o=%.d) %.o"