blob: 23e0166bc7747d9baf2768624990c6d2ea1ddb9e [file] [log] [blame]
Alexandre Julliard77977231998-12-10 09:35:50 +00001#! /usr/bin/perl
2#
Alexandre Julliarda007f332000-08-09 00:54:58 +00003# Generate AUTHORS and dlls/shell32/authors.h
Alexandre Julliard77977231998-12-10 09:35:50 +00004#
5open(AUTHORS,"<AUTHORS") or die "Can't open AUTHORS";
6open(NEWAUTHORS,">AUTHORS.new");
7while(<AUTHORS>)
8 {
9 print NEWAUTHORS;
10 last if /^Wine is/;
11 }
12while(<AUTHORS>)
13 {
14 chop;
15 s/^and //;
16 s/[,.]$//;
17 push @authors, $_;
18 }
19
20# Sort them
21sub cmpnames
22 {
23 @anames = split(" ",$a);
24 @bnames = split(" ",$b);
25 $ret = $anames[-1] cmp $bnames[-1];
26 $ret = $anames[0] cmp $bnames[0] unless $ret;
27 return $ret;
28 }
29@authors = sort cmpnames @authors;
30
31# Print authors
32for ($i = 0; $i < $#authors; $i++)
33 {
34 print NEWAUTHORS "$authors[$i],\n";
35 }
36print NEWAUTHORS "and $authors[$#authors].\n";
37print "Created AUTHORS.new\n";
38
39# Build authors.h file
Alexandre Julliarda007f332000-08-09 00:54:58 +000040open(NEWAUTHORS_H,">dlls/shell32/authors.h");
Alexandre Julliard77977231998-12-10 09:35:50 +000041
42print NEWAUTHORS_H <<EOF;
43#ifndef __WINE_AUTHORS_H
44#define __WINE_AUTHORS_H
45
46static const char * const SHELL_People[] =
47{
48EOF
49
50# Print authors
51for ($i = 0; $i <= $#authors; $i++)
52 {
53 print NEWAUTHORS_H " \"$authors[$i]\",\n";
54 }
Patrik Stridvallfeb94cb1999-10-24 21:48:50 +000055print NEWAUTHORS_H " 0\n};\n";
Alexandre Julliard77977231998-12-10 09:35:50 +000056print NEWAUTHORS_H "\n#endif /* __WINE_AUTHORS_H */\n";
57
Alexandre Julliarda007f332000-08-09 00:54:58 +000058print "Created dlls/shell32/authors.h\n";