Alexandre Julliard | 7797723 | 1998-12-10 09:35:50 +0000 | [diff] [blame] | 1 | #! /usr/bin/perl |
| 2 | # |
Alexandre Julliard | a007f33 | 2000-08-09 00:54:58 +0000 | [diff] [blame] | 3 | # Generate AUTHORS and dlls/shell32/authors.h |
Alexandre Julliard | 7797723 | 1998-12-10 09:35:50 +0000 | [diff] [blame] | 4 | # |
| 5 | open(AUTHORS,"<AUTHORS") or die "Can't open AUTHORS"; |
| 6 | open(NEWAUTHORS,">AUTHORS.new"); |
| 7 | while(<AUTHORS>) |
| 8 | { |
| 9 | print NEWAUTHORS; |
| 10 | last if /^Wine is/; |
| 11 | } |
| 12 | while(<AUTHORS>) |
| 13 | { |
| 14 | chop; |
| 15 | s/^and //; |
| 16 | s/[,.]$//; |
| 17 | push @authors, $_; |
| 18 | } |
| 19 | |
| 20 | # Sort them |
| 21 | sub 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 |
| 32 | for ($i = 0; $i < $#authors; $i++) |
| 33 | { |
| 34 | print NEWAUTHORS "$authors[$i],\n"; |
| 35 | } |
| 36 | print NEWAUTHORS "and $authors[$#authors].\n"; |
| 37 | print "Created AUTHORS.new\n"; |
| 38 | |
| 39 | # Build authors.h file |
Alexandre Julliard | a007f33 | 2000-08-09 00:54:58 +0000 | [diff] [blame] | 40 | open(NEWAUTHORS_H,">dlls/shell32/authors.h"); |
Alexandre Julliard | 7797723 | 1998-12-10 09:35:50 +0000 | [diff] [blame] | 41 | |
| 42 | print NEWAUTHORS_H <<EOF; |
| 43 | #ifndef __WINE_AUTHORS_H |
| 44 | #define __WINE_AUTHORS_H |
| 45 | |
| 46 | static const char * const SHELL_People[] = |
| 47 | { |
| 48 | EOF |
| 49 | |
| 50 | # Print authors |
| 51 | for ($i = 0; $i <= $#authors; $i++) |
| 52 | { |
| 53 | print NEWAUTHORS_H " \"$authors[$i]\",\n"; |
| 54 | } |
Patrik Stridvall | feb94cb | 1999-10-24 21:48:50 +0000 | [diff] [blame] | 55 | print NEWAUTHORS_H " 0\n};\n"; |
Alexandre Julliard | 7797723 | 1998-12-10 09:35:50 +0000 | [diff] [blame] | 56 | print NEWAUTHORS_H "\n#endif /* __WINE_AUTHORS_H */\n"; |
| 57 | |
Alexandre Julliard | a007f33 | 2000-08-09 00:54:58 +0000 | [diff] [blame] | 58 | print "Created dlls/shell32/authors.h\n"; |