#!/usr/bin/perl $arch = shift(@ARGV); die "ARRRGH! No arch! We are dooooomed!" unless ($arch); while (<>) { if (m#\.(orig|rej)$#) { next; } if (m#^./drivers/s390/#) { next; } # something in there buggers cscope if ($arch ne "full") { if (m#^./include/asm-#) { next if (!m#^./include/asm-(${arch}|generic)/#); } if (m#^./arch/#) { next if (!m#^./arch/${arch}/#); } } print; }