diff options
author | Jeff Johnston | 2011-10-19 19:38:32 +0000 |
---|---|---|
committer | Jeff Johnston | 2011-10-19 20:09:47 +0000 |
commit | b5ee8eb4c49048ff052ae4c826a1b8dcc98336be (patch) | |
tree | c3d16aae160dfe18663f9137bd9bfab10bf4c0d2 | |
parent | 3e05128786e5a94eedd280d7c501b17a1084206c (diff) | |
download | org.eclipse.linuxtools-b5ee8eb4c49048ff052ae4c826a1b8dcc98336be.tar.gz org.eclipse.linuxtools-b5ee8eb4c49048ff052ae4c826a1b8dcc98336be.tar.xz org.eclipse.linuxtools-b5ee8eb4c49048ff052ae4c826a1b8dcc98336be.zip |
NEW - bug 361461: Autotools plug-in doesn't handle autogen.sh that does
no configuration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=361461
*
src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java
(regenerateMakefiles): Fix autogen.sh
case whereby autogen.sh doesn't run or create configure script.
2 files changed, 33 insertions, 9 deletions
diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog b/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog index d35dec09db..fc1b740637 100644 --- a/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog +++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/ChangeLog @@ -1,3 +1,9 @@ +2011-10-19 Jeff Johnston <jjohnstn@redhat.com> + + Bug #361461 + * src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java (regenerateMakefiles): Fix autogen.sh + case whereby autogen.sh doesn't run or create configure script. + 2011-10-03 Jeff Johnston <jjohnstn@redhat.com> * src/org/eclipse/linuxtools/internal/cdt/autotools/core/configure/FlagConfigureOption.java (getParameter): Remote diff --git a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java index c05ca75f4d..497b2cca4f 100644 --- a/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java +++ b/autotools/org.eclipse.linuxtools.cdt.autotools.core/src/org/eclipse/linuxtools/internal/cdt/autotools/core/AutotoolsNewMakeGenerator.java @@ -517,15 +517,33 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator { // autogen.sh ran configure and we should not run it // ourselves. if (configStatus == null || !configStatus.exists()) { - rc = runScript(configurePath, - buildLocation, - configArgs, - AutotoolsPlugin.getFormattedString("MakeGenerator.gen.makefile", new String[]{buildDir}), //$NON-NLS-1$ - errMsg, console, configureEnvs, false); - if (rc != IStatus.ERROR) { - File makefileFile = buildLocation.append(MAKEFILE).toFile(); - addMakeTargetsToManager(makefileFile); - toolsCfg.setDirty(false); + if (!configurePath.toFile().exists()) { + // no configure script either...try running autoreconf + String[] reconfArgs = new String[1]; + String reconfCmd = project.getPersistentProperty(AutotoolsPropertyConstants.AUTORECONF_TOOL); + if (reconfCmd == null) + reconfCmd = DEFAULT_AUTORECONF; + IPath reconfCmdPath = new Path(reconfCmd); + reconfArgs[0] = "-i"; //$NON-NLS-1$ + rc = runScript(reconfCmdPath, + project.getLocation().append(srcDir), + reconfArgs, + AutotoolsPlugin.getFormattedString("MakeGenerator.autoreconf", new String[]{buildDir}), //$NON-NLS-1$ + errMsg, console, null, consoleStart); + consoleStart = false; + } + // Check if configure generated and if yes, run it. + if (rc != IStatus.ERROR && configurePath.toFile().exists()) { + rc = runScript(configurePath, + buildLocation, + configArgs, + AutotoolsPlugin.getFormattedString("MakeGenerator.gen.makefile", new String[]{buildDir}), //$NON-NLS-1$ + errMsg, console, configureEnvs, false); + if (rc != IStatus.ERROR) { + File makefileFile = buildLocation.append(MAKEFILE).toFile(); + addMakeTargetsToManager(makefileFile); + toolsCfg.setDirty(false); + } } } else { File makefileFile = buildLocation.append(MAKEFILE).toFile(); |