1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-21 16:05:25 +02:00

patch from sean see changelog

This commit is contained in:
David Inglis 2003-08-18 17:34:23 +00:00
parent dec8f5f092
commit 0f45720f3d
9 changed files with 931 additions and 107 deletions

View file

@ -1,3 +1,18 @@
2003-08-13 Sean Evoy
Changed text generated into makefile comments from the rather abstract
term 'module' to the more meaningful 'subdirectory'.
* src/org/eclipse/cdt/internal/core/CCorePluginResources.properties
Added place-holder macro for LIBS and changed the source file look-up code to
ignore source it finds in generated directories during a build, even if it has a tool
that says it builds for it.
* src/org/eclipse/cdt/internal/core/MakefileGenerator.java
Changed class to deal with build targets that do not specify an extension
(like POSIX executables).
* build/org/eclipse/cdt/internal/core/build/managed/ManagedBuildInfo.java
* build/org/eclipse/cdt/internal/core/build/managed/Tool.java
2003-08-13 Sean Evoy 2003-08-13 Sean Evoy
The major change in the increment of work is the new discovery mechanism The major change in the increment of work is the new discovery mechanism
that clients will use to find the IScannerInfoProvider for a project. that clients will use to find the IScannerInfoProvider for a project.

View file

@ -186,12 +186,15 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @see org.eclipse.cdt.core.build.managed.IResourceBuildInfo#getToolFlags(java.lang.String) * @see org.eclipse.cdt.core.build.managed.IResourceBuildInfo#getToolFlags(java.lang.String)
*/ */
public String getFlagsForTarget(String extension) { public String getFlagsForTarget(String extension) {
// Treat null extensions as an empty string
String ext = extension == null ? new String() : extension;
// Get all the tools for the current config // Get all the tools for the current config
IConfiguration config = getDefaultConfiguration(getDefaultTarget()); IConfiguration config = getDefaultConfiguration(getDefaultTarget());
ITool[] tools = config.getTools(); ITool[] tools = config.getTools();
for (int index = 0; index < tools.length; index++) { for (int index = 0; index < tools.length; index++) {
ITool tool = tools[index]; ITool tool = tools[index];
if (tool.producesFileType(extension)) { if (tool.producesFileType(ext)) {
String flags = new String(); String flags = new String();
try { try {
flags = tool.getToolFlags(); flags = tool.getToolFlags();
@ -306,13 +309,16 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#getOutputFlag() * @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#getOutputFlag()
*/ */
public String getOutputFlag(String outputExt) { public String getOutputFlag(String outputExt) {
// Treat null extension as an empty string
String ext = outputExt == null ? new String() : outputExt;
// Get all the tools for the current config // Get all the tools for the current config
String flags = new String(); String flags = new String();
IConfiguration config = getDefaultConfiguration(getDefaultTarget()); IConfiguration config = getDefaultConfiguration(getDefaultTarget());
ITool[] tools = config.getTools(); ITool[] tools = config.getTools();
for (int index = 0; index < tools.length; index++) { for (int index = 0; index < tools.length; index++) {
ITool tool = tools[index]; ITool tool = tools[index];
if (tool.producesFileType(outputExt)) { if (tool.producesFileType(ext)) {
flags = tool.getOutputFlag(); flags = tool.getOutputFlag();
} }
} }
@ -323,13 +329,16 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#getOutputPrefix(java.lang.String) * @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#getOutputPrefix(java.lang.String)
*/ */
public String getOutputPrefix(String outputExtension) { public String getOutputPrefix(String outputExtension) {
// Treat null extensions as empty string
String ext = outputExtension == null ? new String() : outputExtension;
// Get all the tools for the current config // Get all the tools for the current config
String flags = new String(); String flags = new String();
IConfiguration config = getDefaultConfiguration(getDefaultTarget()); IConfiguration config = getDefaultConfiguration(getDefaultTarget());
ITool[] tools = config.getTools(); ITool[] tools = config.getTools();
for (int index = 0; index < tools.length; index++) { for (int index = 0; index < tools.length; index++) {
ITool tool = tools[index]; ITool tool = tools[index];
if (tool.producesFileType(outputExtension)) { if (tool.producesFileType(ext)) {
flags = tool.getOutputPrefix(); flags = tool.getOutputPrefix();
} }
} }
@ -373,12 +382,14 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
* @see org.eclipse.cdt.core.build.managed.IResourceBuildInfo#getToolInvocation(java.lang.String) * @see org.eclipse.cdt.core.build.managed.IResourceBuildInfo#getToolInvocation(java.lang.String)
*/ */
public String getToolForTarget(String extension) { public String getToolForTarget(String extension) {
// Treat a null argument as an empty string
String ext = extension == null ? new String() : extension;
// Get all the tools for the current config // Get all the tools for the current config
IConfiguration config = getDefaultConfiguration(getDefaultTarget()); IConfiguration config = getDefaultConfiguration(getDefaultTarget());
ITool[] tools = config.getTools(); ITool[] tools = config.getTools();
for (int index = 0; index < tools.length; index++) { for (int index = 0; index < tools.length; index++) {
ITool tool = tools[index]; ITool tool = tools[index];
if (tool.producesFileType(extension)) { if (tool.producesFileType(ext)) {
return tool.getToolCommand(); return tool.getToolCommand();
} }
} }

View file

@ -127,6 +127,9 @@ public class Tool extends BuildObject implements ITool, IOptionCategory {
* @see org.eclipse.cdt.core.build.managed.ITool#handlesFileType(java.lang.String) * @see org.eclipse.cdt.core.build.managed.ITool#handlesFileType(java.lang.String)
*/ */
public boolean buildsFileType(String extension) { public boolean buildsFileType(String extension) {
if (extension == null) {
return false;
}
return getInputExtensions().contains(extension); return getInputExtensions().contains(extension);
} }
@ -350,7 +353,7 @@ public class Tool extends BuildObject implements ITool, IOptionCategory {
* @see org.eclipse.cdt.core.build.managed.ITool#producesFileType(java.lang.String) * @see org.eclipse.cdt.core.build.managed.ITool#producesFileType(java.lang.String)
*/ */
public boolean producesFileType(String outputExtension) { public boolean producesFileType(String outputExtension) {
return outputExtension.equals(this.outputExtension); return this.outputExtension.equals(outputExtension);
} }
} }

View file

@ -13,9 +13,9 @@ MakeBuilder.message.incremental = Updating makefiles for project {0}
MakeBuilder.message.make = Calling {0} for project {1} MakeBuilder.message.make = Calling {0} for project {1}
MakeBuilder.message.error = Build error MakeBuilder.message.error = Build error
MakeBuilder.message.finished = Build complete for project {0} MakeBuilder.message.finished = Build complete for project {0}
MakeBuilder.comment.module.list = # Every module must be described here MakeBuilder.comment.module.list = # Every subdirectory with source files must be described here
MakeBuilder.comment.source.list = # Each module must contribute its source files here MakeBuilder.comment.source.list = # Each subdirectory must contribute its source files here
MakeBuilder.comment.build.rule = # Each module must supply rules for building sources it contributes MakeBuilder.comment.build.rule = # Each subdirectory must supply rules for building sources it contributes
MakeBuilder.comment.module.make.includes = # Include the makefiles for each source module MakeBuilder.comment.module.make.includes = # Include the makefiles for each source subdirectory
MakeBuilder.comment.module.dep.includes = # Include automatically-generated dependency list: MakeBuilder.comment.module.dep.includes = # Include automatically-generated dependency list:
MakeBuilder.comment.autodeps = # Automatically-generated dependency list: MakeBuilder.comment.autodeps = # Automatically-generated dependency list:

View file

@ -196,12 +196,14 @@ public class MakefileGenerator {
// Get the clean command from the build model // Get the clean command from the build model
buffer.append("RM := "); buffer.append("RM := ");
buffer.append(info.getCleanCommand() + NEWLINE); buffer.append(info.getCleanCommand() + NEWLINE + NEWLINE);
buffer.append(CCorePlugin.getResourceString(SRC_LISTS) + NEWLINE); buffer.append(CCorePlugin.getResourceString(SRC_LISTS) + NEWLINE);
buffer.append("C_SRCS := " + NEWLINE); buffer.append("C_SRCS := " + NEWLINE);
buffer.append("CC_SRCS := " + NEWLINE); buffer.append("CC_SRCS := " + NEWLINE + NEWLINE);
// Add the libraries this project dependes on
buffer.append("LIBS := ");
buffer.append(NEWLINE + NEWLINE); buffer.append(NEWLINE + NEWLINE);
return buffer; return buffer;
} }
@ -401,6 +403,14 @@ public class MakefileGenerator {
public void appendModule(IResource resource) { public void appendModule(IResource resource) {
// The build model knows how to build this file // The build model knows how to build this file
IContainer container = resource.getParent(); IContainer container = resource.getParent();
// But is this a generated directory ...
IPath root = new Path(info.getConfigurationName());
IPath path = container.getProjectRelativePath();
if (root.isPrefixOf(path)) {
return;
}
if (!getModuleList().contains(container)) { if (!getModuleList().contains(container)) {
getModuleList().add(container); getModuleList().add(container);
} }

View file

@ -1,3 +1,14 @@
2003-08-14 Sean Evoy
Added initial toolchain description for Solaris and Linux targets using Gnu tools.
* plugin.xml
Moved tool and option category names into the properties for eventual I18N
* plugin.properties
For build targets without an extension, the new project wizard was appending a 'dot' to the
name. It no loonger does this.
* build/org/eclipse/cdt/ui/build/wizards/ManagedProjectWizard.java
2003-08-13 Sean Evoy 2003-08-13 Sean Evoy
A simple change to add transparency information to the build property page A simple change to add transparency information to the build property page
GIFs. They were not being drawn properly on Solaris/Motif and would probably GIFs. They were not being drawn properly on Solaris/Motif and would probably

View file

@ -94,7 +94,9 @@ public abstract class ManagedProjectWizard extends CProjectWizard {
ITarget newTarget = ManagedBuildManager.createTarget(project, parent); ITarget newTarget = ManagedBuildManager.createTarget(project, parent);
if (newTarget != null) { if (newTarget != null) {
// TODO add name entry field to project // TODO add name entry field to project
newTarget.setBuildArtifact(project.getName() + "." + parent.getDefaultExtension()); String artifactName = project.getName();
artifactName += parent.getDefaultExtension().length() == 0 ? "" : "." + parent.getDefaultExtension();
newTarget.setBuildArtifact(artifactName);
IConfiguration [] selectedConfigs = targetConfigurationPage.getSelectedConfigurations(); IConfiguration [] selectedConfigs = targetConfigurationPage.getSelectedConfigurations();
for (int i = 0; i < selectedConfigs.length; i++) { for (int i = 0; i < selectedConfigs.length; i++) {
IConfiguration config = selectedConfigs[i]; IConfiguration config = selectedConfigs[i];

View file

@ -88,11 +88,21 @@ CFolderActionSet.description=C Folder Action Set
DeleteTaskAction.label=Delete C/C++ Markers DeleteTaskAction.label=Delete C/C++ Markers
# Build Model Names # Build Model Names
ConfigName.Rel=Release
ConfigName.Dbg=Debug
ToolName.preprocessor = Preprocessor ToolName.preprocessor = Preprocessor
ToolName.compiler = Compiler ToolName.compiler = Compiler
ToolName.archiver = Archiver ToolName.archiver = Archiver
ToolName.linker = Linker ToolName.linker = Linker
ToolName.command = Command Line OptionCategory.Preproc = Preprocessor
OptionCategory.Dirs = Directories
OptionCategory.General = General
OptionCategory.CLSum = Command Line Summary
OptionCategory.Optimize=Optimization
OptionCategory.Debug=Debugging
OptionCategory.Warn=Warnings
OptionCategory.Misc=Miscelaneous
OptionCategory.Libs=Libraries
# C/C++ Search # C/C++ Search
CSearchPage.label= C/C++ Search CSearchPage.label= C/C++ Search

File diff suppressed because it is too large Load diff