From 16aa891da24e627ce42c7c54a8f90278add6f935 Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Sat, 17 May 2014 11:05:42 +0200 Subject: [PATCH] #5798 cfg files are not installed to CFGDIR. Extend patch to update dmake.cpp. Also fix some g++ compiler warnings --- Makefile | 4 ++++ tools/dmake.cpp | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1f620b4ee..ab1d28045 100644 --- a/Makefile +++ b/Makefile @@ -261,6 +261,10 @@ install: cppcheck install -d ${BIN} install cppcheck ${BIN} install htmlreport/cppcheck-htmlreport ${BIN} +ifdef CFGDIR + install -d ${CFGDIR} + install -m 644 cfg/* ${CFGDIR} +endif ###### Build diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 6a0c7a130..e1bd09991 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -27,6 +27,11 @@ #include "../cli/filelister.h" +static std::string builddir(std::string filename); +static std::string objfile(std::string cppfile); +static void getDeps(const std::string &filename, std::vector &depfiles); + + std::string builddir(std::string filename) { if (filename.compare(0,4,"lib/") == 0) @@ -406,7 +411,11 @@ int main(int argc, char **argv) fout << "install: cppcheck\n"; fout << "\tinstall -d ${BIN}\n"; fout << "\tinstall cppcheck ${BIN}\n"; - fout << "\tinstall htmlreport/cppcheck-htmlreport ${BIN}\n\n"; + fout << "\tinstall htmlreport/cppcheck-htmlreport ${BIN}\n"; + fout << "ifdef CFGDIR \n"; + fout << "\tinstall -d ${CFGDIR}\n"; + fout << "\tinstall -m 644 cfg/* ${CFGDIR}\n"; + fout << "endif\n\n"; fout << "\n###### Build\n\n";