Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Evoy2004-05-28 00:22:10 -0400
committerSean Evoy2004-05-28 00:22:10 -0400
commit6dc35eb0c08eb4640d399038a9e0c1847204f351 (patch)
treec676664db7cffcfdca5bebacc85297fba69ce230
parentcf2a2a38e853df4ea454f7f4c2e79927200a720a (diff)
downloadorg.eclipse.cdt-6dc35eb0c08eb4640d399038a9e0c1847204f351.tar.gz
org.eclipse.cdt-6dc35eb0c08eb4640d399038a9e0c1847204f351.tar.xz
org.eclipse.cdt-6dc35eb0c08eb4640d399038a9e0c1847204f351.zip
Fix for an NPE that was occurring after a dependency makefile update
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
index 24ca5f3be7..c6a2c53552 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
@@ -316,7 +316,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
* echo -n '<relative_path>/<name>.d <relative_path>/' >> <relative_path>/<name>.d && \
* <tool> -P -MM -MG <flags> $< >> <relative_path>/<name>.d
* @echo 'Finished building: $<'
- * @echo
+ * @echo ' '
*
* Note that the macros all come from the build model and are
* resolved to a real command before writing to the module
@@ -327,7 +327,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
* echo -n 'source1/foo.d source1/' >> source1/foo.d && \
* g++ -P -MM -MG -g -O2 -c -I/cygdrive/c/eclipse/workspace/Project/headers $< >> source1/foo.d
* @echo 'Finished building: $<'
- * @echo
+ * @echo ' '
*
* @param relativePath
* @param buffer
@@ -368,6 +368,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
// Say goodbye to the nice user
buffer.append(NEWLINE);
buffer.append(TAB + AT + ECHO + WHITESPACE + SINGLE_QUOTE + MESSAGE_FINISH_FILE + WHITESPACE + IN_MACRO + SINGLE_QUOTE + NEWLINE);
+ buffer.append(TAB + AT + ECHO + WHITESPACE + SINGLE_QUOTE + WHITESPACE + SINGLE_QUOTE + NEWLINE + NEWLINE);
}
@@ -1142,7 +1143,11 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
}
// Put the generated comments in
- outBuffer = addDefaultHeader();
+ if (!firstLine.startsWith(COMMENT_SYMBOL)) {
+ outBuffer = addDefaultHeader();
+ } else {
+ outBuffer = new StringBuffer();
+ }
// Some echo implementations misbehave and put the -n and newline in the output
if (firstLine.startsWith("-n")) {

Back to the top