mame/scripts/depfilter.awk
Miodrag Milanovic 76803f7337 Added GAWK script to make deps more sane. thanks to OG.
For those not having latest build tools download :
http://gnuwin32.sourceforge.net/downlinks/gawk-bin-zip.php
and put in bin folder of mingw so it is in path
2015-03-28 20:54:22 +01:00

25 lines
No EOL
409 B
Awk

function base_dir(f)
{
ne = split(f, s, "/")
for(k=ne;k>=1 && s[k] != "src";k--);
r = s[k]
for(j=k+1;j<ne;j++)
r = r "/" s[j]
return r
}
{
for(i=1; i<=NF; i++) {
if($i != "\\") {
ff = $i
fd = base_dir(ff)
if(substr(ff,length(ff)) == ":") {
root_dir = fd
} else if(fd != root_dir) {
if(fd == "src/emu" || fd == "src/osd" || fd == "src/lib/util")
$i = ""
}
}
}
print
}