scripts/see-deps
author deba
Thu, 11 Jan 2007 21:05:00 +0000
changeset 2337 9c3d44ac39fb
parent 2169 9f71586a3f74
permissions -rwxr-xr-x
Adding two heuristics
Based on:
http://www.avglab.com/andrew/pub/neci-tr-96-132.ps
alpar@2169
     1
#!/bin/bash
alpar@2169
     2
alpar@2169
     3
echo '#include<'$1'>' >seedeps_tmp.cc
alpar@2169
     4
gcc -MM -I. -I.. -I../.. $2 seedeps_tmp.cc|tr ':' ' '|tr '\' ' '|tr ' ' '\n'|
alpar@2170
     5
egrep -v '^$'|egrep -v '.o$'|egrep -v '.cc$'|grep -v '^'$1'$'|sort
alpar@2169
     6
rm seedeps_tmp.cc