From 1d0e4729bd563a1b6f432fc243a7332309a7cca7 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 14 Oct 2023 14:36:42 -0700 Subject: [PATCH] 'make depend' again Having source files with the same name in different subdirectories won't work because their object files would conflict, but don't allow the failure to be because depend.awk left out the conflicting rules. No change in behavior from the most recent commit. --- sys/unix/depend.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index f28c6d363..89af26d8a 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -90,7 +90,7 @@ function output_dep( base, targ, moc) if (moc || base ~ /(.+\/)*qt_.*[.]cpp$/) { deps[file] = deps[file] " $(QTn_H)" } - if ((base ~ /[.]cp*$/ || moc) && !(base in basedone)) { + if ((base ~ /[.]cp*$/ || moc) && !(file in filedone)) { #prior to very first .c|.cpp file, handle some special header file cases if (!c_count++) output_specials() @@ -100,7 +100,7 @@ function output_dep( base, targ, moc) format_dep(targ, file) #generated file tile.c can appear more than once in the list of files #so track which files have already been handled; can't reuse done[] here - basedone[base]++; + filedone[file]++; } }