linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Aaron Lehmann <aaronl@vitelus.com>,
	Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2003@gmx.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [2.5] [Cool stuff] "checking" mode for kernel builds
Date: Tue, 27 May 2003 05:16:45 -0400	[thread overview]
Message-ID: <20030527091644.GF585@michonline.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0305262159290.12230-100000@home.transmeta.com>

On Mon, May 26, 2003 at 10:07:28PM -0700, Linus Torvalds wrote:
> 
> On Mon, 26 May 2003, Aaron Lehmann wrote:
> > 
> > The output between "#include <...> search starts here:" and "End of
> > search list." seems like the combination of what you want for
> > gcc_includepath and sys_includepath. I assume the output is ordered. I
> > might send a patch if I'm bored tonight.
> 
> If it comes to parsing "gcc -v" output, I have to say that I personally
> find that to be just crazy, and I'd much rather just see the (incorrect
> but working) '-print-file-name=include' hack.

How's this for a hack that makes it work a bit better?

# This is a BitKeeper generated patch for the following project:
# Project Name: TSCT - The Silly C Tokenizer
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.344   -> 1.345  
#	       pre-process.c	1.62    -> 1.63   
#	            Makefile	1.19    -> 1.20   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/05/27	ryan@michonline.com	1.345
# This update (hopefully) will allow 'check' to find the appropriate, gcc-local 
# include headers (dependent, of course, upon the system it was built on)
# 
# It's still a hack, but at least it will work in a few more places.
# --------------------------------------------
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Tue May 27 05:10:56 2003
+++ b/Makefile	Tue May 27 05:10:56 2003
@@ -32,7 +32,7 @@
 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-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 -Nru a/pre-process.c b/pre-process.c
--- a/pre-process.c	Tue May 27 05:10:56 2003
+++ b/pre-process.c	Tue May 27 05:10:56 2003
@@ -18,6 +18,7 @@
 #include <fcntl.h>
 #include <limits.h>
 
+#include "pre-process.h"
 #include "lib.h"
 #include "parse.h"
 #include "token.h"
@@ -47,6 +48,7 @@
 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
 };
 

-- 

Ryan Anderson
  sometimes Pug Majere

  reply	other threads:[~2003-05-27  9:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-27  0:17 [2.5] [Cool stuff] "checking" mode for kernel builds Carl-Daniel Hailfinger
2003-05-27  0:25 ` John Anthony Kazos Jr.
2003-05-27  0:36 ` Linus Torvalds
2003-05-27  1:24   ` Carl-Daniel Hailfinger
2003-05-26 13:17     ` dan carpenter
2003-05-27  1:58 ` Miles Bader
2003-05-27  3:02 ` Aaron Lehmann
2003-05-27  3:23   ` Linus Torvalds
2003-05-27  4:47     ` Aaron Lehmann
2003-05-27  5:07       ` Linus Torvalds
2003-05-27  9:16         ` Ryan Anderson [this message]
2003-05-27 14:44           ` Linus Torvalds
2003-05-27 11:03 ` dep

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030527091644.GF585@michonline.com \
    --to=ryan@michonline.com \
    --cc=aaronl@vitelus.com \
    --cc=c-d.hailfinger.kernel.2003@gmx.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).