Skip to content

Commit 16aa891

Browse files
committed
cppcheck-opensource#5798 cfg files are not installed to CFGDIR. Extend patch to update dmake.cpp. Also fix some g++ compiler warnings
1 parent ed78835 commit 16aa891

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ install: cppcheck
261261
install -d ${BIN}
262262
install cppcheck ${BIN}
263263
install htmlreport/cppcheck-htmlreport ${BIN}
264+
ifdef CFGDIR
265+
install -d ${CFGDIR}
266+
install -m 644 cfg/* ${CFGDIR}
267+
endif
264268

265269

266270
###### Build

tools/dmake.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727

2828
#include "../cli/filelister.h"
2929

30+
static std::string builddir(std::string filename);
31+
static std::string objfile(std::string cppfile);
32+
static void getDeps(const std::string &filename, std::vector<std::string> &depfiles);
33+
34+
3035
std::string builddir(std::string filename)
3136
{
3237
if (filename.compare(0,4,"lib/") == 0)
@@ -406,7 +411,11 @@ int main(int argc, char **argv)
406411
fout << "install: cppcheck\n";
407412
fout << "\tinstall -d ${BIN}\n";
408413
fout << "\tinstall cppcheck ${BIN}\n";
409-
fout << "\tinstall htmlreport/cppcheck-htmlreport ${BIN}\n\n";
414+
fout << "\tinstall htmlreport/cppcheck-htmlreport ${BIN}\n";
415+
fout << "ifdef CFGDIR \n";
416+
fout << "\tinstall -d ${CFGDIR}\n";
417+
fout << "\tinstall -m 644 cfg/* ${CFGDIR}\n";
418+
fout << "endif\n\n";
410419

411420
fout << "\n###### Build\n\n";
412421

0 commit comments

Comments
 (0)