summaryrefslogtreecommitdiffstats
path: root/kernel/expand_macros.pl
blob: ea0f4b6d4af09c7138442117723845ee1e28413e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

my $expand = 0;

while (<STDIN>) {
  if ($expand) {
    print C;
  } elsif (m,include \<(linux/netfilter_ipv4/ip_set\.h)\>,) {
      $expand = 1;
      open(C, "|gcc -D__KERNEL__ -Iinclude -E - 2>/dev/null| indent -kr -i8") || die "Can't run gcc: $!\n";
      print C;
  } else {
    print;
  }
}
close C;