dmake: Fix check of last header file in lib.pri (#2045)

Since the number of test files is larger than the number of lib files,
this only caused an extra harmless '\' being printed after the last
header file in lib.pri. If the number of test files would have been
smaller than the number of lib files, the generated lib.pri would have
been broken.
This commit is contained in:
Rikard Falkeborn 2019-07-27 09:45:04 +02:00 committed by amai2012
parent 1c75257212
commit 0324bbf63c
2 changed files with 2 additions and 3 deletions

View File

@ -50,8 +50,7 @@ HEADERS += $${PWD}/check.h \
$${PWD}/token.h \
$${PWD}/tokenize.h \
$${PWD}/tokenlist.h \
$${PWD}/valueflow.h \
$${PWD}/valueflow.h
SOURCES += $${PWD}/analyzerinfo.cpp \
$${PWD}/astutils.cpp \

View File

@ -153,7 +153,7 @@ int main(int argc, char **argv)
continue; // shouldn't happen
fname.erase(fname.find(".cpp"));
fout1 << std::string(11, ' ') << "$${PWD}/" << fname << ".h";
if (i + 1 < testfiles.size())
if (i + 1 < libfiles.size())
fout1 << " \\\n";
}
fout1 << "\n\nSOURCES += ";