'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.
This commit is contained in:
PatR
2023-10-14 14:36:42 -07:00
parent db48b92dd3
commit 1d0e4729bd

View File

@@ -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]++;
}
}