comparison tools/find-gcc-include-path @ 615:2dee957ef988

test case on undeclared name gcc include path handling
author kono
date Wed, 06 Sep 2006 15:21:06 +0900
parents
children c14a1426cfed
comparison
equal deleted inserted replaced
614:e4e007f4026d 615:2dee957ef988
1 #!/usr/bin/perl
2
3 my $CC = $ARGV[1];
4 my $gcc = `echo '#include <stddef.h>' | $CC -E - `;
5
6 $gcc =~ m=\"(/[^"]+/)stddef\.h"=;
7 my $gcc_path = $1;
8
9 if ($ARGV[0]=~/-l/) {
10 print <<EOF
11 char *l_include_path[] = {
12 "/usr/include/",
13 "$gcc_path",
14 0
15 };
16 EOF
17 } else {
18 print "$gcc_path\n";
19 }