Usage: $myName
Generates Makefile dependencies for the XEmacs src directory.
-The dependencies are written to stdout.
-";
+The dependencies are written to stdout.\n";
die $usage if @ARGV;
($srcdir = $0) =~ s@[^/]+$@@;
+$srcdir = "." if $srcdir eq "";
chdir $srcdir or die "$srcdir: $!";
opendir SRCDIR, "." or die "$srcdir: $!";
for (grep (/\.[ch]$/, readdir (SRCDIR))) { $exists{$_} = 1; }
closedir SRCDIR;
-for (qw (config.h puresize-adjust.h sheap-adjust.h paths.h Emacs.ad.h)) {
+for (qw (config.h sheap-adjust.h paths.h Emacs.ad.h)) {
$generated_header{$_} = 1;
}
s/[ \t]+//g;
# Find include dependencies
for (/^\#include([^\n]+)/gm) {
- if (m@^\"([A-Za-z0-9_-]+\.h)\"@) {
+ if (m@^\"([A-Za-z0-9._-]+\.h)\"@) {
$uses{$file}{$1} = 1 if exists $exists{$1};
- } elsif (m@<([A-Za-z0-9_-]+\.h)>@) {
+ } elsif (m@<([A-Za-z0-9._-]+\.h)>@) {
$uses{$file}{$1} = 1 if exists $generated_header{$1};
- } elsif (m@\"../lwlib/([A-Za-z0-9_-]+\.h)\"@) {
+ } elsif (m@\"../lwlib/([A-Za-z0-9._-]+\.h)\"@) {
$uses{$file}{"\$(LWLIB_SRCDIR)/lwlib.h"} = 1;
}
}