My favorites | Sign in
Repository Home Source
Checkout   Browse   Changes   Clones    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/dis/sh
c = $1
locals = `{sed -n -f /lib/sed/findhlocal $c}
systems = `{sed -n -f /lib/sed/findhsystem $c}
if {no $cpp} {
if {ftest -r $c.cpp.env} {
cpp = `{cat $c.cpp.env}
} {
if {ftest -r default.cpp.env} {
cpp = `{cat default.cpp.env}
}
}
}

gccstdinlocal = . `{echo $srcdir | sed 's,/$,,'} `{os -T $cpp -v </dev/null >[2=1] | sed -n '/^#include "..." search starts here:$/,/^End of search list.$/p' | sed '1d;$d;/^#include <...> search starts here:$/d;s,^ *,,'}
apply {
local = $1
apply {
file = $1/$local
if {ftest -r $file} {echo $file}
} $gccstdinlocal
} $locals

gccstdincsystem = `{os -T $cpp -v </dev/null >[2=1] | sed -n '/^#include <...> search starts here:$/,/^End of search list.$/p' | sed '1d;$d;s,^ *,,'}
apply {
system = $1
apply {
file = /n/C/cygwin$1/$system
if {ftest -r $file} {echo $file}
} $gccstdincsystem
} $systems

exit

Change log

1fd2f88fd3c5 by Jason Catena <jason.catena> on Jun 14, 2011   Diff
findh tries harder to figure out which cpp
to use.
Go to: 
Project members, sign in to write a code review

Older revisions

c8f2f123a086 by Jason Catena <jason.catena> on Jun 14, 2011   Diff
findh searches local (cwd and $srcdir)
and system header directories (cpp -v)
for headers listed in c files (not yet
other headers).
All revisions of this file

File info

Size: 875 bytes, 33 lines
Powered by Google Project Hosting