From cfd3e9b7a156aa641a23f565236606084d8be0f5 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sun, 5 Aug 2012 16:46:52 +0200 Subject: [PATCH] Added: #1440 Allow wildcard in output parameter in depend log, use when input includes other files to depend all the outputs on the included files as well --HG-- branch : build_pipeline_v3 --- .../service/pipeline_process_impl_toollog.cpp | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/code/nel/tools/pipeline/service/pipeline_process_impl_toollog.cpp b/code/nel/tools/pipeline/service/pipeline_process_impl_toollog.cpp index d2fe70c4a..c32b49356 100644 --- a/code/nel/tools/pipeline/service/pipeline_process_impl_toollog.cpp +++ b/code/nel/tools/pipeline/service/pipeline_process_impl_toollog.cpp @@ -175,19 +175,15 @@ void CPipelineProcessImpl::parseToolLog(const std::string &dependLogFile, const { metaDepends[outputFile] = CFileDepend(); metaDependIt = metaDepends.find(outputFile); - CFileStatus status; - nldebug("Update status for output file '%s', calculate checksum", outputFile.c_str()); - g_DatabaseStatus->updateFileStatus(status, outputFile); // calculate the checksum of the output, this takes a while - metaDependIt->second.CRC32 = status.CRC32; - // nldebug("Checksum %i; %i", metaDependIt->second.CRC32, status.CRC32); - - /*m_ResultCurrent.MacroPaths.push_back(outputFileMacro); - CProcessResult::CFileResult prfr; - prfr.Level = STATE_SUCCESS; // dunno if still needed? - prfr.CRC32 = status.CRC32; - m_ResultCurrent.FileResults.push_back(prfr);*/ - - m_FileStatusOutputCache[outputFile] = status; + if (outputFile != "*") + { + CFileStatus status; + nldebug("Update status for output file '%s', calculate checksum", outputFile.c_str()); + g_DatabaseStatus->updateFileStatus(status, outputFile); // calculate the checksum of the output, this takes a while + metaDependIt->second.CRC32 = status.CRC32; + // nldebug("Checksum %i; %i", metaDependIt->second.CRC32, status.CRC32); + m_FileStatusOutputCache[outputFile] = status; + } } switch (type) { @@ -247,6 +243,21 @@ void CPipelineProcessImpl::parseToolLog(const std::string &dependLogFile, const file.close(); + // Allow wildcard in output parameter in depend log, use when input includes other files to depend all the outputs on the included files as well + std::map::iterator wildcard_it = metaDepends.find("*"); + if (wildcard_it != metaDepends.end()) + { + for (std::map::iterator it = metaDepends.begin(), end = metaDepends.end(); it != end; ++it) + { + for (std::vector::iterator sub_it = wildcard_it->second.Dependencies.begin(), sub_end = wildcard_it->second.Dependencies.end(); sub_it != sub_end; ++sub_it) + it->second.Dependencies.push_back(*sub_it); + for (std::vector::iterator sub_it = wildcard_it->second.DirectoryDependencies.begin(), sub_end = wildcard_it->second.DirectoryDependencies.end(); sub_it != sub_end; ++sub_it) + it->second.DirectoryDependencies.push_back(*sub_it); + for (std::vector::iterator sub_it = wildcard_it->second.RuntimeDependencies.begin(), sub_end = wildcard_it->second.RuntimeDependencies.end(); sub_it != sub_end; ++sub_it) + it->second.RuntimeDependencies.push_back(*sub_it); + } + } + // Write depend meta files for (std::map::iterator it = metaDepends.begin(), end = metaDepends.end(); it != end; ++it) {