tor/scripts/maint/check_config_macros.pl
Nick Mathewson 2e1ac274ab Script to detect unused autoconf outputs
Should help speed up mingw builds by a percent or two.
2014-05-07 03:56:51 -04:00

21 lines
271 B
Perl
Executable File

#!/usr/bin/perl -w
use strict;
my @macros = ();
open(F, 'orconfig.h.in');
while(<F>) {
if (/^#undef +([A-Za-z0-9_]*)/) {
push @macros, $1;
}
}
close F;
for my $m (@macros) {
my $s = `git grep '$m' src`;
if ($s eq '') {
print "Unused: $m\n";
}
}