mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
1. Fix for the [Bug 189301] Regression: Build Make Target adds -k flag
2. additional small bug-fixes to the custom builder mechanism
This commit is contained in:
parent
fb0d03553c
commit
a415f36011
2 changed files with 28 additions and 6 deletions
|
@ -873,7 +873,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getArgumentsAttribute() != null) {
|
if (getArgumentsAttribute() != null) {
|
||||||
element.setAttribute(IBuilder.ARGUMENTS, getArgumentsAttribute());
|
element.setAttribute(IBuilder.ARGUMENTS, getArguments/*Attribute*/());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getAutoBuildTargetAttribute() != null)
|
if(getAutoBuildTargetAttribute() != null)
|
||||||
|
@ -990,6 +990,12 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
||||||
String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
|
String stopOnErrCmd = getStopOnErrCmd(isStopOnError());
|
||||||
String parallelBuildCmd = isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
String parallelBuildCmd = isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
||||||
|
|
||||||
|
String reversedStopOnErrCmd = getStopOnErrCmd(!isStopOnError());
|
||||||
|
String reversedParallelBuildCmd = !isParallelBuildOn() ? getParallelizationCmd(getParallelizationNum()) : EMPTY_STRING;
|
||||||
|
|
||||||
|
args = removeCmd(args, reversedStopOnErrCmd);
|
||||||
|
args = removeCmd(args, reversedParallelBuildCmd);
|
||||||
|
|
||||||
args = addCmd(args, stopOnErrCmd);
|
args = addCmd(args, stopOnErrCmd);
|
||||||
args = addCmd(args, parallelBuildCmd);
|
args = addCmd(args, parallelBuildCmd);
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ public class BuilderFactory {
|
||||||
static final String CONTENTS_BUILDER = PREFIX + ".builder"; //$NON-NLS-1$
|
static final String CONTENTS_BUILDER = PREFIX + ".builder"; //$NON-NLS-1$
|
||||||
static final String CONTENTS_BUILDER_CUSTOMIZATION = PREFIX + ".builderCustomization"; //$NON-NLS-1$
|
static final String CONTENTS_BUILDER_CUSTOMIZATION = PREFIX + ".builderCustomization"; //$NON-NLS-1$
|
||||||
static final String CONTENTS_CONFIGURATION_IDS = PREFIX + ".configurationIds"; //$NON-NLS-1$
|
static final String CONTENTS_CONFIGURATION_IDS = PREFIX + ".configurationIds"; //$NON-NLS-1$
|
||||||
|
static final String CONTENTS_ACTIVE_CFG_SETTINGS = PREFIX + ".activeConfigSettings"; //$NON-NLS-1$
|
||||||
|
|
||||||
// static final String IDS = PREFIX + ".ids"; //$NON-NLS-1$
|
// static final String IDS = PREFIX + ".ids"; //$NON-NLS-1$
|
||||||
static final String CONFIGURATION_IDS = PREFIX + ".configurationIds"; //$NON-NLS-1$
|
static final String CONFIGURATION_IDS = PREFIX + ".configurationIds"; //$NON-NLS-1$
|
||||||
|
@ -227,7 +228,10 @@ public class BuilderFactory {
|
||||||
Boolean d = Boolean.valueOf(builder.isDefaultBuildCmd());
|
Boolean d = Boolean.valueOf(builder.isDefaultBuildCmd());
|
||||||
el.setAttribute(BuilderFactory.USE_DEFAULT_BUILD_CMD, d.toString());
|
el.setAttribute(BuilderFactory.USE_DEFAULT_BUILD_CMD, d.toString());
|
||||||
|
|
||||||
return el.toStringMap();
|
Map map = el.toStringMap();
|
||||||
|
map.put(CONTENTS, CONTENTS_ACTIVE_CFG_SETTINGS);
|
||||||
|
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IBuilder createCustomBuilder(IConfiguration cfg, String builderId) throws CoreException{
|
public static IBuilder createCustomBuilder(IConfiguration cfg, String builderId) throws CoreException{
|
||||||
|
@ -311,9 +315,14 @@ public class BuilderFactory {
|
||||||
args.remove(ErrorParserManager.PREF_ERROR_PARSER);
|
args.remove(ErrorParserManager.PREF_ERROR_PARSER);
|
||||||
|
|
||||||
tmp = (String)args.get(USE_DEFAULT_BUILD_CMD);
|
tmp = (String)args.get(USE_DEFAULT_BUILD_CMD);
|
||||||
if(tmp != null && Boolean.valueOf(tmp).equals(Boolean.TRUE)){
|
if(tmp != null){
|
||||||
args.remove(IMakeCommonBuildInfo.BUILD_COMMAND);
|
if(Boolean.valueOf(tmp).equals(Boolean.TRUE)){
|
||||||
args.remove(IMakeCommonBuildInfo.BUILD_ARGUMENTS);
|
args.remove(IMakeCommonBuildInfo.BUILD_COMMAND);
|
||||||
|
args.remove(IMakeCommonBuildInfo.BUILD_ARGUMENTS);
|
||||||
|
} else {
|
||||||
|
args.put(IBuilder.ATTRIBUTE_IGNORE_ERR_CMD, "");
|
||||||
|
args.put(IBuilder.ATTRIBUTE_PARALLEL_BUILD_CMD, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//end adjusting settings
|
//end adjusting settings
|
||||||
|
|
||||||
|
@ -349,7 +358,13 @@ public class BuilderFactory {
|
||||||
builder = createBuilder(cfg, args, true);
|
builder = createBuilder(cfg, args, true);
|
||||||
}
|
}
|
||||||
builders = new IBuilder[]{builder};
|
builders = new IBuilder[]{builder};
|
||||||
//TODO:
|
} else if (CONTENTS_ACTIVE_CFG_SETTINGS.equals(type)) {
|
||||||
|
IConfiguration cfg = info.getDefaultConfiguration();
|
||||||
|
|
||||||
|
IBuilder builder = cfg.getEditableBuilder();
|
||||||
|
|
||||||
|
builders = new IBuilder[]{builder};
|
||||||
|
|
||||||
} else if (CONTENTS_BUILDER.equals(type)){
|
} else if (CONTENTS_BUILDER.equals(type)){
|
||||||
IConfiguration cfgs[] = configsFromMap(args, info);
|
IConfiguration cfgs[] = configsFromMap(args, info);
|
||||||
if(cfgs.length != 0){
|
if(cfgs.length != 0){
|
||||||
|
@ -416,6 +431,7 @@ public class BuilderFactory {
|
||||||
}
|
}
|
||||||
return NO_CHANGES;
|
return NO_CHANGES;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean applyBuilder(ICommand cmd, IBuilder builder) {
|
public static boolean applyBuilder(ICommand cmd, IBuilder builder) {
|
||||||
Map oldMap = cmd.getArguments();
|
Map oldMap = cmd.getArguments();
|
||||||
Map map = builderBuildArgsMap(builder);
|
Map map = builderBuildArgsMap(builder);
|
||||||
|
|
Loading…
Add table
Reference in a new issue