2 # Script that reads in Makefile.in and outputs the names of all
3 # used but undefined vars and all defined but unused vars
4 # Copyright Jelmer Vernooij <jelmer@samba.org>
13 # First, make a list of defines in configure
22 while($line =~ /^\b([a-zA-Z0-9_][a-zA-Z0-9_]*)\b[ \t]*=.*/sgm) {
25 while($line =~ /\$\(([a-zA-Z0-9_][a-zA-Z0-9_]*)\)/sgm) {
28 while ($line =~ /^include (.*)/sgm) {
37 print "##### DEFINED BUT UNUSED: #####\n";
39 # print $_." defined\n";
42 if ($references{$_} != 1) {
48 print "##### USED BUT UNDEFINED: #####\n";
49 foreach(%references) {
51 if ($defines{$_} != 1) {