aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--Makefile7
-rw-r--r--pre-process.c4
2 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fb47d21a..7d56a18e 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ evaluate.o: $(LIB_H)
expression.o: $(LIB_H)
lib.o: $(LIB_H)
parse.o: $(LIB_H)
-pre-process.o: $(LIB_H)
+pre-process.o: $(LIB_H) pre-process.h
scope.o: $(LIB_H)
show-parse.o: $(LIB_H)
symbol.o: $(LIB_H)
@@ -40,5 +40,8 @@ test-lexing.o: $(LIB_H)
test-parsing.o: $(LIB_H)
tokenize.o: $(LIB_H)
+pre-process.h:
+ echo "#define GCC_INTERNAL_INCLUDE \"`gcc -print-file-name=include`\"" > pre-process.h
+
clean:
- rm -f *.[oasi] core core.[0-9]* $(PROGRAMS)
+ rm -f *.[oasi] core core.[0-9]* $(PROGRAMS) pre-process.h
diff --git a/pre-process.c b/pre-process.c
index ce00a869..173904d8 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -18,6 +18,7 @@
#include <fcntl.h>
#include <limits.h>
+#include "pre-process.h"
#include "lib.h"
#include "parse.h"
#include "token.h"
@@ -45,8 +46,7 @@ const char *sys_includepath[] = {
};
const char *gcc_includepath[] = {
- "/usr/lib/gcc-lib/i386-redhat-linux/3.2.1/include",
- "/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include",
+ GCC_INTERNAL_INCLUDE,
NULL
};