summaryrefslogtreecommitdiff
path: root/idl/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-04-24 12:37:14 +0200
committerMichael Stahl <mstahl@redhat.com>2013-04-24 12:38:06 +0200
commite2013e86594fe49fa1839ddb85fb3eb09bfe6998 (patch)
tree51811ec93c604ba4e7fcbad4d248faed5858ce19 /idl/source
parenta6ab5fa0e6ae9c8694902977892d7b717766e8af (diff)
svidl: make dependencies: handle removed include files:
Write dummy targets for included files, so the incremental build does not break with "No rule to make target" if the included file is removed. Change-Id: I23c4406c4d1db9a8a4a7f0ecfec1cfc9ad05028a
Diffstat (limited to 'idl/source')
-rw-r--r--idl/source/prj/database.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index c79318bc0e6e..091fba389c68 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -844,12 +844,27 @@ struct WriteDep
}
};
+// write a dummy target for one included file, so the incremental build does
+// not break with "No rule to make target" if the included file is removed
+struct WriteDummy
+{
+ SvFileStream & m_rStream;
+ explicit WriteDummy(SvFileStream & rStream) : m_rStream(rStream) { }
+ void operator() (OUString const& rItem)
+ {
+ m_rStream << OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr();
+ m_rStream << " :\n\n";
+ }
+};
+
bool SvIdlDataBase::WriteDepFile(
SvFileStream & rStream, OUString const& rTarget)
{
rStream << OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr();
rStream << " :";
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream));
+ rStream << "\n\n";
+ ::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDummy(rStream));
return rStream.GetError() == SVSTREAM_OK;
}