aboutsummaryrefslogtreecommitdiff
path: root/m4/chop-aclocal.pl
diff options
context:
space:
mode:
Diffstat (limited to 'm4/chop-aclocal.pl')
-rwxr-xr-xm4/chop-aclocal.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/m4/chop-aclocal.pl b/m4/chop-aclocal.pl
new file mode 100755
index 000000000000..2bf6b75f4c18
--- /dev/null
+++ b/m4/chop-aclocal.pl
@@ -0,0 +1,19 @@
+#!/bin/perl -w
+
+$seq = 1;
+$file = "";
+$file = sprintf("tmp/%02d.m4", $seq);
+open(FILE, ">$file") || die "cannot open \"$file\": $!";
+printf(STDOUT "FILE: $file\n");
+while (<>) {
+ if (/^$/) {
+ close(FILE);
+ $seq++;
+ $file = sprintf("tmp/%02d.m4", $seq);
+ open(FILE, ">$file") || die "cannot open \"$file\": $!";
+ printf(STDOUT "FILE: $file\n");
+ next;
+ }
+ printf FILE;
+}
+close(FILE);