mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Fix for bugzilla 62660 -- Target definition for MinGW is inconsistent. I have simply removed the target. If the user wants to use MinGW, they will have to also get MSYS (which is free and recommended for MinGW developers). The problem is that the clean command for Win32 is 'del" and it does not handle front-slashes in the path properly. The effort needed to generate the makefiles in a different way is greater than the effort to answer the odd newsgroup HOWTO question, so I am simply replacing Cygwin and MinGW targets with Gnu on Windows
This commit is contained in:
parent
aec08ee34d
commit
bdf0ba7530
3 changed files with 86 additions and 232 deletions
|
@ -23,7 +23,7 @@ import org.eclipse.core.resources.IResource;
|
|||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
public class DefaultCygwinScannerInfoCollector extends DefaultGCCScannerInfoCollector {
|
||||
public class DefaultGnuWinScannerInfoCollector extends DefaultGCCScannerInfoCollector {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector#contributeToScannerConfig(org.eclipse.core.resources.IResource, java.util.List, java.util.List, java.util.List)
|
||||
|
@ -34,7 +34,12 @@ public class DefaultCygwinScannerInfoCollector extends DefaultGCCScannerInfoColl
|
|||
while (pathIter.hasNext()) {
|
||||
String path = (String) pathIter.next();
|
||||
String convertedPath = convertPath(path);
|
||||
getIncludePaths().add(convertedPath);
|
||||
// On MinGW, there is no facility for converting paths
|
||||
if (convertedPath.startsWith("/")) continue; //$NON-NLS-1$
|
||||
// Add it if it is not a duplicate
|
||||
if (!getIncludePaths().contains(convertedPath)){
|
||||
getIncludePaths().add(convertedPath);
|
||||
}
|
||||
}
|
||||
|
||||
// Now add the macros
|
|
@ -16,12 +16,10 @@ TargetName.gnu=GNU
|
|||
TargetName.gnu.exe=Executable (Gnu)
|
||||
TargetName.gnu.so=Shared Library (Gnu)
|
||||
TargetName.gnu.lib=Static Library (Gnu)
|
||||
TargetName.cygw.exe=Executable (Cygwin)
|
||||
TargetName.cygw.so=Shared Library (Cygwin)
|
||||
TargetName.cygw.lib=Static Library (Cygwin)
|
||||
TargetName.mingw.exe=Executable (MinGW)
|
||||
TargetName.mingw.so=Shared Library (MinGW)
|
||||
TargetName.mingw.lib=Static Library (MinGW)
|
||||
TargetName.cygw.exe=Executable (Gnu on Windows)
|
||||
TargetName.cygw.so=Shared Library (Gnu on Windows)
|
||||
TargetName.cygw.lib=Static Library (Gnu on Windows)
|
||||
|
||||
|
||||
# No longer needed post-2.0
|
||||
TargetName.cygw=Cygwin
|
||||
|
@ -46,6 +44,7 @@ ToolName.compiler.cpp = C++ Compiler
|
|||
ToolName.archiver = Archiver
|
||||
ToolName.linker.c = C Linker
|
||||
ToolName.linker.cpp = C++ Linker
|
||||
ToolName.windres = Resource compiler
|
||||
|
||||
# GNU tool names
|
||||
ToolName.compiler.gnu.c = GCC C Compiler
|
||||
|
@ -120,3 +119,9 @@ Option.Posix.Linker.Implib=Import Library name (-Wl,--out-implib=)
|
|||
Option.Posix.Linker.Defname=DEF file name (-Wl,--output-def=)
|
||||
|
||||
Option.Posix.Archiver.Flags=Archiver flags
|
||||
|
||||
# Platform specific option names
|
||||
Option.Windows.Windres.OutputFormat = Output format
|
||||
Option.Windows.Windres.OutputFormat.Coff = coff (--output-format coff)
|
||||
v = rc (--output-format rc)
|
||||
Option.Windows.Windres.OutputFormat.Res = res (--output-format res)
|
|
@ -372,6 +372,71 @@
|
|||
id="gnu.both.lib.option.flags">
|
||||
</option>
|
||||
</tool>
|
||||
<!-- Experimental
|
||||
<tool
|
||||
command="windres"
|
||||
sources="rc"
|
||||
outputs="res"
|
||||
headerExtensions="h,H,hpp"
|
||||
name="%ToolName.windres"
|
||||
id="cdt.managedbuild.tool.gnu.windres"
|
||||
outputFlag="-o"
|
||||
natureFilter="both">
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.windres"
|
||||
name="%OptionCategory.General"
|
||||
id="gnu.windres.category.general"/>
|
||||
<option
|
||||
valueType="enumerated"
|
||||
category="gnu.windres.category.general"
|
||||
browseType="none"
|
||||
name="%Option.Windows.Windres.OutputFormat"
|
||||
id="gnu.windres.option.output.format">
|
||||
<enumeratedOptionValue
|
||||
isDefault="true"
|
||||
command="-O coff"
|
||||
name="%Option.Windows.Windres.OutputFormat.Coff"
|
||||
id="gnu.windres.option.output.format.coff"/>
|
||||
<enumeratedOptionValue
|
||||
command="-O rc"
|
||||
name="%Option.Windows.Windres.OutputFormat.RC"
|
||||
id="gnu.windres.option.output.format.rc"/>
|
||||
<enumeratedOptionValue
|
||||
isDefault="false"
|
||||
command="-O res"
|
||||
name="%Option.Windows.Windres.OutputFormat.Res"
|
||||
id="gnu.windres.option.output.format.res"/>
|
||||
</option>
|
||||
<option
|
||||
command="-v"
|
||||
defaultValue="false"
|
||||
valueType="boolean"
|
||||
category="gnu.windres.category.general"
|
||||
name="%Option.Posix.Verbose"
|
||||
id="gnu.windres.option.verbose"/>
|
||||
<option
|
||||
command="-I"
|
||||
valueType="includePath"
|
||||
category="gnu.windres.category.general"
|
||||
browseType="directory"
|
||||
name="%Option.Posix.InclPaths"
|
||||
id="gnu.windres.option.preprocessor.include.paths"/>
|
||||
<option
|
||||
command="-D"
|
||||
valueType="definedSymbols"
|
||||
category="gnu.windres.category.general"
|
||||
browseType="none"
|
||||
name="%Option.Posix.DefSym"
|
||||
id="gnu.windres.option.preprocessor.defined.symbols"/>
|
||||
<option
|
||||
command="-U"
|
||||
valueType="stringList"
|
||||
category="gnu.windres.category.general"
|
||||
browseType="none"
|
||||
name="%Option.Posix.UndefSym"
|
||||
id="gnu.windres.option.preprocessor.undefined.symbols"/>
|
||||
</tool>
|
||||
-->
|
||||
<target
|
||||
name="%TargetName.gnu"
|
||||
id="cdt.managedbuild.target.gnu"
|
||||
|
@ -1061,7 +1126,7 @@
|
|||
id="cdt.managedbuild.target.gnu.cygwin.exe"
|
||||
isTest="false"
|
||||
defaultExtension="exe"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultCygwinScannerInfoCollector"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector"
|
||||
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
|
||||
isAbstract="false"
|
||||
binaryParser="org.eclipse.cdt.core.PE"
|
||||
|
@ -1133,7 +1198,7 @@
|
|||
id="cdt.managedbuild.target.gnu.cygwin.so"
|
||||
isTest="false"
|
||||
defaultExtension="dll"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultCygwinScannerInfoCollector"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector"
|
||||
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
|
||||
isAbstract="false"
|
||||
binaryParser="org.eclipse.cdt.core.PE"
|
||||
|
@ -1192,12 +1257,10 @@
|
|||
</toolReference>
|
||||
</configuration>
|
||||
<toolReference
|
||||
outputPrefix="cyg"
|
||||
outputs="dll,a.dll"
|
||||
id="cdt.managedbuild.tool.gnu.c.linker">
|
||||
</toolReference>
|
||||
<toolReference
|
||||
outputPrefix="cyg"
|
||||
outputs="dll,a.dll"
|
||||
id="cdt.managedbuild.tool.gnu.cpp.linker">
|
||||
</toolReference>
|
||||
|
@ -1208,7 +1271,7 @@
|
|||
isTest="false"
|
||||
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
|
||||
defaultExtension="a"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultCygwinScannerInfoCollector"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector"
|
||||
isAbstract="false"
|
||||
binaryParser="org.eclipse.cdt.core.PE"
|
||||
parent="cdt.managedbuild.target.gnu"
|
||||
|
@ -1271,225 +1334,6 @@
|
|||
id="cdt.managedbuild.tool.gnu.archiver">
|
||||
</toolReference>
|
||||
</target>
|
||||
<target
|
||||
isAbstract="false"
|
||||
defaultExtension="exe"
|
||||
osList="win32"
|
||||
makeCommand="mingw32-make"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultMinGWScannerInfoCollector"
|
||||
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
|
||||
isTest="false"
|
||||
binaryParser="org.eclipse.cdt.core.PE"
|
||||
name="%TargetName.mingw.exe"
|
||||
parent="cdt.managedbuild.target.gnu"
|
||||
id="cdt.managedbuild.target.gnu.mingw.exe"
|
||||
cleanCommand="del">
|
||||
<configuration
|
||||
name="%ConfigName.Dbg"
|
||||
id="cdt.managedbuild.config.gnu.mingw.exe.debug">
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.c.optimization.level.none"
|
||||
id="gnu.c.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.c.debugging.level.max"
|
||||
id="gnu.c.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.optimization.level.none"
|
||||
id="gnu.cpp.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.debugging.level.max"
|
||||
id="gnu.cpp.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
</configuration>
|
||||
<configuration
|
||||
name="%ConfigName.Rel"
|
||||
id="cdt.managedbuild.config.gnu.mingw.exe.release">
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.c.optimization.level.most"
|
||||
id="gnu.c.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.c.debugging.level.none"
|
||||
id="gnu.c.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.optimization.level.most"
|
||||
id="gnu.cpp.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.debugging.level.none"
|
||||
id="gnu.cpp.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
</configuration>
|
||||
<toolReference
|
||||
outputs="exe"
|
||||
id="cdt.managedbuild.tool.gnu.c.linker">
|
||||
</toolReference>
|
||||
<toolReference
|
||||
outputs="exe"
|
||||
id="cdt.managedbuild.tool.gnu.cpp.linker">
|
||||
</toolReference>
|
||||
</target>
|
||||
<target
|
||||
isAbstract="false"
|
||||
defaultExtension="dll"
|
||||
osList="win32"
|
||||
makeCommand="mingw32-make"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultMinGWScannerInfoCollector"
|
||||
isTest="false"
|
||||
binaryParser="org.eclipse.cdt.core.PE"
|
||||
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
|
||||
name="%TargetName.mingw.so"
|
||||
parent="cdt.managedbuild.target.gnu"
|
||||
id="cdt.managedbuild.target.gnu.mingw.so"
|
||||
cleanCommand="del">
|
||||
<configuration
|
||||
name="%ConfigName.Dbg"
|
||||
id="cdt.managedbuild.config.gnu.mingw.so.debug">
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.c.optimization.level.none"
|
||||
id="gnu.c.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.c.debugging.level.max"
|
||||
id="gnu.c.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.optimization.level.none"
|
||||
id="gnu.cpp.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.debugging.level.max"
|
||||
id="gnu.cpp.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
</configuration>
|
||||
<configuration
|
||||
name="%ConfigName.Rel"
|
||||
id="cdt.managedbuild.config.gnu.mingw.so.release">
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.c.optimization.level.most"
|
||||
id="gnu.c.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.c.debugging.level.none"
|
||||
id="gnu.c.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.optimization.level.most"
|
||||
id="gnu.cpp.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.debugging.level.none"
|
||||
id="gnu.cpp.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
</configuration>
|
||||
<toolReference
|
||||
outputs="dll"
|
||||
id="cdt.managedbuild.tool.gnu.c.linker">
|
||||
</toolReference>
|
||||
<toolReference
|
||||
outputs="dll"
|
||||
id="cdt.managedbuild.tool.gnu.cpp.linker">
|
||||
</toolReference>
|
||||
</target>
|
||||
<target
|
||||
isAbstract="false"
|
||||
defaultExtension="lib"
|
||||
osList="win32"
|
||||
makeCommand="mingw32-make"
|
||||
makefileGenerator="org.eclipse.cdt.managedbuilder.ui.properties.BrowseEntryDialog"
|
||||
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultMinGWScannerInfoCollector"
|
||||
isTest="false"
|
||||
binaryParser="org.eclipse.cdt.core.PE"
|
||||
name="%TargetName.mingw.lib"
|
||||
parent="cdt.managedbuild.target.gnu"
|
||||
id="cdt.managedbuild.target.gnu.mingw.lib"
|
||||
cleanCommand="del">
|
||||
<configuration
|
||||
name="%ConfigName.Dbg"
|
||||
id="cdt.managedbuild.config.gnu.mingw.lib.debug">
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.c.optimization.level.none"
|
||||
id="gnu.c.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.c.debugging.level.max"
|
||||
id="gnu.c.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.optimization.level.none"
|
||||
id="gnu.cpp.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.debugging.level.max"
|
||||
id="gnu.cpp.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
</configuration>
|
||||
<configuration
|
||||
name="%ConfigName.Rel"
|
||||
id="cdt.managedbuild.config.gnu.mingw.lib.release">
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.c.optimization.level.most"
|
||||
id="gnu.c.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.c.debugging.level.none"
|
||||
id="gnu.c.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
<toolReference
|
||||
id="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.optimization.level.most"
|
||||
id="gnu.cpp.compiler.option.optimization.level">
|
||||
</optionReference>
|
||||
<optionReference
|
||||
defaultValue="gnu.cpp.compiler.debugging.level.none"
|
||||
id="gnu.cpp.compiler.option.debugging.level">
|
||||
</optionReference>
|
||||
</toolReference>
|
||||
</configuration>
|
||||
<toolReference
|
||||
outputPrefix="lib"
|
||||
outputs="lib"
|
||||
id="cdt.managedbuild.tool.gnu.archiver">
|
||||
</toolReference>
|
||||
</target>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
Loading…
Add table
Reference in a new issue