[nasm:nasm-2.16.xx] mkdep.pl: do not generate a selfrule for embedded dependencies
nasm-bot for H. Peter Anvin
hpa at zytor.com
Fri Apr 12 14:51:07 PDT 2024
Commit-ID: e72d4bf5198dc3cb279df0b22e763d72742213bd
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=e72d4bf5198dc3cb279df0b22e763d72742213bd
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Fri, 12 Apr 2024 14:47:54 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 12 Apr 2024 14:47:54 -0700
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 <hpa at zytor.com>
---
tools/mkdep.pl | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tools/mkdep.pl b/tools/mkdep.pl
index 65dac8b6..3c1b6acb 100755
--- a/tools/mkdep.pl
+++ b/tools/mkdep.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## --------------------------------------------------------------------------
##
-## Copyright 1996-2020 The NASM Authors - All Rights Reserved
+## Copyright 1996-2024 The NASM Authors - All Rights Reserved
## See the file AUTHORS included with the NASM distribution for
## the specific copyright holders.
##
@@ -127,6 +127,11 @@ sub alldeps($$) {
sub convert_file($$) {
my($file,$sep) = @_;
+ if ($file eq '' || $file eq File::Spec->curdir() ||
+ $file eq File::Spec->rootdir()) {
+ return undef;
+ }
+
my @fspec = (basename($file));
while ( ($file = dirname($file)) ne File::Spec->curdir() &&
$file ne File::Spec->rootdir() ) {
@@ -208,7 +213,10 @@ sub insert_deps($) {
close($in);
$is_external = $is_external && defined($external);
- undef $external if ( !$is_external );
+ if ( !$is_external ) {
+ undef $external;
+ $selfrule = 0;
+ }
my $out;
my $outpath;
@@ -228,7 +236,6 @@ sub insert_deps($) {
}
unlink($external);
} else {
-
my $e;
foreach my $dfile ($external, sort(keys(%deps)) ) {
More information about the Nasm-commits
mailing list