#! /usr/bin/perl -w $file = $ARGV[0]; open (TF, $file) or die "kann nicht öffnen"; my (@includes, @tempfile, $i, $j, $k); while () { if (/^#include/) { push @includes, $_; } else { push @tempfile, $_; } } open (ERG, ">>success.txt"); $CXXFLAGS = "-DHAVE_CONFIG_H -I. -I.. -I../.. -I/usr/include/libxml2"; for ($i = $j = 0; $i <= $#includes; $i++, $j++) { open(NF, ">testfile.cpp"); for ($k = 0; $k <= $#includes; $k++) { print NF $includes[$k] unless $k == $j; } print NF @tempfile; unless (system("/usr/local/gcc3.1/bin/g++ $CXXFLAGS -c -o erg testfile.cpp")) { print ERG "Success in $file without $includes[$j]"; } }