comparison src/src-headers @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents c5d627a313b1
children 697ef44129c6
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
26 my ($myName, $srcdir); 26 my ($myName, $srcdir);
27 27
28 ($myName = $0) =~ s@.*/@@; my $usage =" 28 ($myName = $0) =~ s@.*/@@; my $usage ="
29 Usage: $myName 29 Usage: $myName
30 30
31 Generates header file fragments from the Emacs sources. 31 Generates header file fragments from the Emacs sources
32 "; 32 and writes them to stdout.\n";
33 33
34 die $usage if @ARGV; 34 die $usage if @ARGV;
35 35
36 ($srcdir = $0) =~ s@[^/]+$@@; 36 ($srcdir = $0) =~ s@[^/]+$@@;
37 chdir $srcdir or die "$srcdir: $!"; 37 chdir $srcdir or die "$srcdir: $!";
41 opendir SRCDIR, "." or die "$srcdir: $!"; 41 opendir SRCDIR, "." or die "$srcdir: $!";
42 for (grep (/\.[ch]$/, readdir (SRCDIR))) { $exists{$_} = 1; } 42 for (grep (/\.[ch]$/, readdir (SRCDIR))) { $exists{$_} = 1; }
43 closedir SRCDIR; 43 closedir SRCDIR;
44 { 44 {
45 my %generated_header; 45 my %generated_header;
46 for (qw (config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h)) { 46 for (qw (config.h sheap-adjust.h paths.h Emacs.ad.h)) {
47 $generated_header{$_} = 1; 47 $generated_header{$_} = 1;
48 } 48 }
49 49
50 for my $file (keys %exists) { 50 for my $file (keys %exists) {
51 open (FILE, $file) or die "$file: $!"; 51 open (FILE, $file) or die "$file: $!";