aboutsummaryrefslogtreecommitdiff
path: root/scripts/maint
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-05-07 03:56:51 -0400
committerNick Mathewson <nickm@torproject.org>2014-05-07 03:56:51 -0400
commit2e1ac274abed4127a6a30b753297166caf59feb1 (patch)
treee503d26276f63e3960dfe73e937be50aabf4c3c7 /scripts/maint
parent8a2e66b623f470f8adb9c342d8b18d207be7f361 (diff)
downloadtor-2e1ac274abed4127a6a30b753297166caf59feb1.tar
tor-2e1ac274abed4127a6a30b753297166caf59feb1.tar.gz
Script to detect unused autoconf outputs
Should help speed up mingw builds by a percent or two.
Diffstat (limited to 'scripts/maint')
-rwxr-xr-xscripts/maint/check_config_macros.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/maint/check_config_macros.pl b/scripts/maint/check_config_macros.pl
new file mode 100755
index 000000000..bcde2becc
--- /dev/null
+++ b/scripts/maint/check_config_macros.pl
@@ -0,0 +1,20 @@
+#!/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";
+ }
+}