summaryrefslogtreecommitdiff
path: root/mkdep.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-27 21:35:04 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-27 21:35:04 -0700
commitab8447ed99c2de5fffc11307883ddaf63ef02a47 (patch)
tree62a1afe299786d3d3acf05aed13d5eecabab963c /mkdep.pl
parent747a80e0d6cc04baace65cea5c266414ba487b02 (diff)
downloadnasm-ab8447ed99c2de5fffc11307883ddaf63ef02a47.tar.gz
nasm-ab8447ed99c2de5fffc11307883ddaf63ef02a47.tar.bz2
nasm-ab8447ed99c2de5fffc11307883ddaf63ef02a47.zip
Exclude config.h from the dependency list for the canned makefiles
For the canned makefiles, we almost certainly don't have config.h, and shouldn't include it in the list of dependencies.
Diffstat (limited to 'mkdep.pl')
-rwxr-xr-xmkdep.pl26
1 files changed, 18 insertions, 8 deletions
diff --git a/mkdep.pl b/mkdep.pl
index 388315d..d376287 100755
--- a/mkdep.pl
+++ b/mkdep.pl
@@ -95,6 +95,7 @@ sub insert_deps($) {
my($sep) = '/';
my($cont) = "\\";
my($maxline) = 78; # Seems like a reasonable default
+ my @exclude = (); # Don't exclude anything
while ( defined($line = <IN>) ) {
if ( $line =~ /^\s*\#\s*@([a-z0-9-]+):\s*\"([^\"]*)\"/ ) {
@@ -107,6 +108,8 @@ sub insert_deps($) {
$maxline = $val+0;
} elsif ( $parm eq 'continuation' ) {
$cont = $val;
+ } elsif ( $parm eq 'exclude' ) {
+ @exclude = split(/\,/, $val);
}
} elsif ( $line eq $barrier ) {
last; # Stop reading input at barrier line
@@ -115,6 +118,11 @@ sub insert_deps($) {
}
close(IN);
+ my $e, %do_exclude;
+ foreach $e (@exclude) {
+ $do_exclude{$e} = 1;
+ }
+
my $dfile, $ofile, $str, $sl, $len;
my @deps, $dep;
@@ -127,14 +135,16 @@ sub insert_deps($) {
$len = length($str);
print OUT $str;
foreach $dep ($dfile, alldeps($dfile)) {
- $str = convert_file($dep,$sep);
- $sl = length($str)+1;
- if ( $len+$sl > $maxline-2 ) {
- print OUT ' ', $cont, "\n ", $str;
- $len = $sl;
- } else {
- print OUT ' ', $str;
- $len += $sl;
+ unless ($do_exclude{$dep}) {
+ $str = convert_file($dep,$sep);
+ $sl = length($str)+1;
+ if ( $len+$sl > $maxline-2 ) {
+ print OUT ' ', $cont, "\n ", $str;
+ $len = $sl;
+ } else {
+ print OUT ' ', $str;
+ $len += $sl;
+ }
}
}
print OUT "\n";