Changeset c1a000b in rtems-eclipse-plug-in


Ignore:
Timestamp:
Dec 3, 2008, 2:59:50 PM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f4f1f44
Parents:
fdc1d39
Message:

Reverted previous change. You must translate the path manually for Cygwin.
TODO: Fix for MinGW.

Location:
org.rtems.cdt.toolchain2/org/rtems/cdt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • org.rtems.cdt.toolchain2/org/rtems/cdt/Activator.java

    rfdc1d39 rc1a000b  
    4848                        out = new BufferedWriter( new FileWriter( makefile.toFile()));
    4949                        out.write(
    50                                 "PROJECT_RELEASE = $(" + Constants.BSP_PATH_MAKE_VARIABLE + ")\n"
    51                                         + "include $(PROJECT_RELEASE)/Makefile.inc\n"
     50                                "include $(" + Constants.BSP_PATH_MAKE_VARIABLE + ")/Makefile.inc\n"
    5251                                        + "include $(RTEMS_CUSTOM)\n"
    5352                                        + "include $(PROJECT_ROOT)/make/leaf.cfg\n"
  • org.rtems.cdt.toolchain2/org/rtems/cdt/Constants.java

    rfdc1d39 rc1a000b  
    1616        public static final String PATH_SEPERATOR = System.getProperty( "path.separator");
    1717       
    18         public static final String BSP_PATH_MAKE_VARIABLE = "ENVIRONMENT_PROJECT_RELEASE";
     18        public static final String BSP_PATH_MAKE_VARIABLE = "PROJECT_RELEASE";
    1919       
    2020        public static final String DEFAULT_BASE_PATH = "/opt/rtems-4.9";
  • org.rtems.cdt.toolchain2/org/rtems/cdt/Storage.java

    rfdc1d39 rc1a000b  
    1919import java.util.LinkedList;
    2020import java.util.List;
    21 import java.util.Map;
    2221
    2322import org.eclipse.cdt.build.core.scannerconfig.CfgInfoContext;
     
    3029import org.eclipse.core.resources.IProject;
    3130import org.eclipse.core.runtime.CoreException;
     31import org.eclipse.core.runtime.Platform;
    3232import org.eclipse.core.runtime.QualifiedName;
    3333
     
    106106       
    107107        public static void updateTools( IProject project) {
     108                String path = getProperty( project, Constants.BSP_PATH_KEY);
     109
     110                // Translate path if necessary
     111                if (Platform.getOS().equals( Platform.OS_WIN32)) {
     112                        // FIXME: MinGW?
     113                       
     114                        String device = path.split( ":") [0];
     115                        path = path.replaceFirst( "^" + device + ":", "/cygdrive/" + device).replaceAll( "\\\\", "/");
     116                }
     117       
    108118                // Create make process builder
    109                 ProcessBuilder pb = new ProcessBuilder( "make");
    110                
    111                 // Use environment to pass the BSP path to enable implicit path translation
    112                 Map<String, String> env = pb.environment();
    113                 env.put( Constants.BSP_PATH_MAKE_VARIABLE, getProperty( project, Constants.BSP_PATH_KEY));
     119                ProcessBuilder pb = new ProcessBuilder(
     120                        "make",
     121                        Constants.BSP_PATH_MAKE_VARIABLE + "=" + path
     122                );
    114123               
    115124                // Change working directory to the Makefile location
Note: See TracChangeset for help on using the changeset viewer.