summaryrefslogtreecommitdiff
path: root/install-win32/m4todef.pl
blob: d2705b07e37dc7ac1174828f56c8b49243da5b26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

# used to convert version.m4 to simple
# definition format

while (<STDIN>) {
  chomp;
  if (/^\s*$/) {
    print "\n";
  } elsif (/^define\((\w+),\[(.*?)\]\)/) {
    print "!define $1 \"$2\"\n";
  } elsif (/^dnl(.*)$/) {
    print "#$1\n";
  }
}