Skip to content

Commit e72d4bf

Browse files
author
H. Peter Anvin
committed
mkdep.pl: do not generate a selfrule for embedded dependencies
If we are using embedded dependencies, do not generate a selfrule. It is meaningless. Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 99fec7e commit e72d4bf

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tools/mkdep.pl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22
## --------------------------------------------------------------------------
33
##
4-
## Copyright 1996-2020 The NASM Authors - All Rights Reserved
4+
## Copyright 1996-2024 The NASM Authors - All Rights Reserved
55
## See the file AUTHORS included with the NASM distribution for
66
## the specific copyright holders.
77
##
@@ -127,6 +127,11 @@ ($$)
127127
sub convert_file($$) {
128128
my($file,$sep) = @_;
129129

130+
if ($file eq '' || $file eq File::Spec->curdir() ||
131+
$file eq File::Spec->rootdir()) {
132+
return undef;
133+
}
134+
130135
my @fspec = (basename($file));
131136
while ( ($file = dirname($file)) ne File::Spec->curdir() &&
132137
$file ne File::Spec->rootdir() ) {
@@ -208,7 +213,10 @@ ($)
208213
close($in);
209214

210215
$is_external = $is_external && defined($external);
211-
undef $external if ( !$is_external );
216+
if ( !$is_external ) {
217+
undef $external;
218+
$selfrule = 0;
219+
}
212220

213221
my $out;
214222
my $outpath;
@@ -228,7 +236,6 @@ ($)
228236
}
229237
unlink($external);
230238
} else {
231-
232239
my $e;
233240

234241
foreach my $dfile ($external, sort(keys(%deps)) ) {

0 commit comments

Comments
 (0)