From b4ca67ad3f7adc5af868c06c21445fa311931225 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 11 Apr 2012 15:29:12 -0400 Subject: [PATCH] Fix for Autotools bug #375007. - allow configure command to be specified with absolute path --- build/org.eclipse.cdt.autotools.core/ChangeLog | 7 +++++++ .../core/AutotoolsNewMakeGenerator.java | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/build/org.eclipse.cdt.autotools.core/ChangeLog b/build/org.eclipse.cdt.autotools.core/ChangeLog index 11ff4a875f8..c1697e68464 100644 --- a/build/org.eclipse.cdt.autotools.core/ChangeLog +++ b/build/org.eclipse.cdt.autotools.core/ChangeLog @@ -1,3 +1,10 @@ +2012-04-11 Jeff Johnston + + Bug #375007 fix from Anna Dushistova + * src/org/eclipse.cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java + (getConfigurePath): If configure command is specified as absolute + path, just use it. + 2012-03-30 Jeff Johnston Bug #371277 diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java index 915011efe15..7ee53d262f5 100644 --- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java +++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/AutotoolsNewMakeGenerator.java @@ -1,12 +1,13 @@ /******************************************************************************* - * Copyright (c) 2009 Red Hat Inc.. + * Copyright (c) 2009, 2012 Red Hat Inc.and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Red Hat Incorporated - initial API and implementation + * Red Hat Incorporated - initial API and implementation + * Anna Dushistova (MontaVista)- [375007] [autotools] allow absolute paths for configure scripts *******************************************************************************/ package org.eclipse.cdt.internal.autotools.core; @@ -753,10 +754,15 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator { for (int i = 1; i < tokens.length; ++i) cmdParms.add(tokens[i]); } - if (srcDir.equals("")) - configPath = project.getLocation().append(command); - else - configPath = project.getLocation().append(srcDir).append(command); + if (Path.fromOSString(command).isAbsolute()) { + configPath = new Path(command); + } else { + if (srcDir.equals("")) + configPath = project.getLocation().append(command); + else + configPath = project.getLocation().append(srcDir) + .append(command); + } return configPath; }