check_config_macros.pl 271 B

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