summaryrefslogtreecommitdiffstats
path: root/kernel/expand_macros.pl
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/expand_macros.pl')
-rwxr-xr-xkernel/expand_macros.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/expand_macros.pl b/kernel/expand_macros.pl
new file mode 100755
index 0000000..ea0f4b6
--- /dev/null
+++ b/kernel/expand_macros.pl
@@ -0,0 +1,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;
+ \ No newline at end of file