1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

set the location for the builtin files correctly

This commit is contained in:
Alain Magloire 2004-09-07 19:29:14 +00:00
parent f8a318d59e
commit 373ace7ff4
2 changed files with 10 additions and 0 deletions

View file

@ -16,6 +16,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
@ -48,6 +49,7 @@ import org.eclipse.cdt.make.internal.core.makefile.TargetRule;
import org.eclipse.cdt.make.internal.core.makefile.Util;
import org.eclipse.cdt.make.internal.core.makefile.posix.PosixMakefileUtil;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
/**
* Makefile : ( statement ) *
@ -772,6 +774,9 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
try {
InputStream stream = MakeCorePlugin.getDefault().openStream(new Path(location));
GNUMakefile gnu = new GNUMakefile();
URL url = Platform.find(MakeCorePlugin.getDefault().getBundle(), new Path(location));
url = Platform.resolve(url);
location = url.getFile();
gnu.parse(location, new InputStreamReader(stream));
builtins = gnu.getDirectives();
for (int i = 0; i < builtins.length; i++) {

View file

@ -16,6 +16,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.makefile.IDirective;
@ -42,6 +43,7 @@ import org.eclipse.cdt.make.internal.core.makefile.Target;
import org.eclipse.cdt.make.internal.core.makefile.TargetRule;
import org.eclipse.cdt.make.internal.core.makefile.Util;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
/**
* Makefile : ( statement ) *
@ -210,6 +212,9 @@ public class PosixMakefile extends AbstractMakefile {
try {
InputStream stream = MakeCorePlugin.getDefault().openStream(new Path(location));
PosixMakefile gnu = new PosixMakefile();
URL url = Platform.find(MakeCorePlugin.getDefault().getBundle(), new Path(location));
url = Platform.resolve(url);
location = url.getFile();
gnu.parse(location, new InputStreamReader(stream));
builtins = gnu.getDirectives();
for (int i = 0; i < builtins.length; i++) {