Mercurial > hg > xemacs-beta
comparison src/make-src-depend @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | b8cc9ab3f761 |
children |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
27 | 27 |
28 ($myName = $0) =~ s@.*/@@; my $usage =" | 28 ($myName = $0) =~ s@.*/@@; my $usage =" |
29 Usage: $myName | 29 Usage: $myName |
30 | 30 |
31 Generates Makefile dependencies for the XEmacs src directory. | 31 Generates Makefile dependencies for the XEmacs src directory. |
32 The dependencies are written to stdout.\n"; | 32 The dependencies are written to stdout. |
33 "; | |
33 | 34 |
34 die $usage if @ARGV; | 35 die $usage if @ARGV; |
35 | 36 |
36 ($srcdir = $0) =~ s@[^/]+$@@; | 37 ($srcdir = $0) =~ s@[^/]+$@@; |
37 $srcdir = "." if $srcdir eq ""; | 38 $srcdir = "." if $srcdir eq ""; |
50 undef $/; $_ = <FILE>; | 51 undef $/; $_ = <FILE>; |
51 RemoveComments ($_); | 52 RemoveComments ($_); |
52 s/[ \t]+//g; | 53 s/[ \t]+//g; |
53 # Find include dependencies | 54 # Find include dependencies |
54 for (/^\#include([^\n]+)/gm) { | 55 for (/^\#include([^\n]+)/gm) { |
55 if (m@^\"([A-Za-z0-9._-]+\.h)\"@) { | 56 if (m@^\"([A-Za-z0-9_-]+\.h)\"@) { |
56 $uses{$file}{$1} = 1 if exists $exists{$1}; | 57 $uses{$file}{$1} = 1 if exists $exists{$1}; |
57 } elsif (m@<([A-Za-z0-9._-]+\.h)>@) { | 58 } elsif (m@<([A-Za-z0-9_-]+\.h)>@) { |
58 $uses{$file}{$1} = 1 if exists $generated_header{$1}; | 59 $uses{$file}{$1} = 1 if exists $generated_header{$1}; |
59 } elsif (m@\"../lwlib/([A-Za-z0-9._-]+\.h)\"@) { | 60 } elsif (m@\"../lwlib/([A-Za-z0-9_-]+\.h)\"@) { |
60 $uses{$file}{"\$(LWLIB_SRCDIR)/lwlib.h"} = 1; | 61 $uses{$file}{"\$(LWLIB_SRCDIR)/lwlib.h"} = 1; |
61 } | 62 } |
62 } | 63 } |
63 } | 64 } |
64 | 65 |