From 0324bbf63c845b6dbf8e0d44437b28d4290fe5f7 Mon Sep 17 00:00:00 2001 From: Rikard Falkeborn Date: Sat, 27 Jul 2019 09:45:04 +0200 Subject: [PATCH] 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. --- lib/lib.pri | 3 +-- tools/dmake.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/lib.pri b/lib/lib.pri index 03855f912..57a85e244 100644 --- a/lib/lib.pri +++ b/lib/lib.pri @@ -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 \ diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 21043cd6b..52c4acb13 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -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 += ";