Makefiles: Define dist_man_MANS before trying to add to it.
[pspp-builds.git] / doc / get-commands.pl
1 #!/usr/bin/perl
2 # Creates Texinfo documentation from the source 
3
4 use strict;
5 use warnings 'all';
6
7 my ($file) = $ARGV[0]; 
8 open(INFO, $file) || die "Cannot open \"$file\"\n" ;    
9 print "\@c Generated from $file by get-commands.pl\n";
10 print "\@c Do not modify!\n\n";
11
12 print "\@table \@asis\n";
13 while (<INFO>)
14 {
15     my ($command, $description)
16       = /^\s*UNIMPL_CMD\s*\(\s*"([^"]*)"\s*,\s*"([^"]*)"\)\s*$/
17         or next;
18     print "\@item $command\n$description\n\n";
19 }
20 print "\@end table\n";
21
22 print "\@c Local Variables:\n";
23 print "\@c buffer-read-only: t\n";
24 print "\@c End:\n";
25 close(INFO);                    # Close the file