Mercurial > hg > CbC > old > device
annotate tools/find-gcc-include-path @ 636:72c4a8137fff intel-mac
String concatenation fix
author | kono |
---|---|
date | Wed, 11 Oct 2006 18:38:15 +0900 |
parents | 2dee957ef988 |
children | c14a1426cfed |
rev | line source |
---|---|
615 | 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 } |