idl/source/prj/database.cxx | 62 ++++++++++++-------------------------------- 1 file changed, 17 insertions(+), 45 deletions(-)
New commits: commit e2013e86594fe49fa1839ddb85fb3eb09bfe6998 Author: Michael Stahl <mst...@redhat.com> Date: Wed Apr 24 12:37:14 2013 +0200 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 diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index c79318b..091fba3 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; } commit a6ab5fa0e6ae9c8694902977892d7b717766e8af Author: Michael Stahl <mst...@redhat.com> Date: Wed Apr 24 12:29:42 2013 +0200 Revert "svidl: write dependencies with cygwin paths" This reverts commit a042c2a6ab29011800de55fa382740be56c2d928. A GNU make that understands native Win32 paths is required now anyway, so revert this. Conflicts: idl/source/prj/database.cxx Change-Id: I6eb77d4b02728269f8dc484444df0cabc8c29b3e diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index e0c6fe6..c79318b 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -833,49 +833,6 @@ void SvIdlDataBase::AddDepFile(String const& rFileName) m_DepFiles.insert(rFileName); } -#ifdef WNT -static OString -lcl_ConvertToCygwin(OString const& rString) -{ - sal_Int32 i = 0; - sal_Int32 const len = rString.getLength(); - OStringBuffer buf(len + 16); - if ((2 <= len) && (':' == rString[1])) - { - buf.append("/cygdrive/"); - buf.append(static_cast<sal_Char>(tolower(rString[0]))); - i = 2; - } - for (; i < len; ++i) - { - sal_Char const c(rString[i]); - switch (c) - { - case '\\': - buf.append('/'); - break; - case ' ': - buf.append("\\ "); - break; - default: - buf.append(c); - break; - } - } - return buf.makeStringAndClear(); -} -#endif - -static OString -lcl_Convert(OUString const& rString) -{ - return -#ifdef WNT - lcl_ConvertToCygwin -#endif - (OUStringToOString(rString, RTL_TEXTENCODING_UTF8)); -} - struct WriteDep { SvFileStream & m_rStream; @@ -883,14 +840,14 @@ struct WriteDep void operator() (OUString const& rItem) { m_rStream << " \\\n "; - m_rStream << lcl_Convert(rItem).getStr(); + m_rStream << OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr(); } }; bool SvIdlDataBase::WriteDepFile( SvFileStream & rStream, OUString const& rTarget) { - rStream << lcl_Convert(rTarget).getStr(); + rStream << OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr(); rStream << " :"; ::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream)); return rStream.GetError() == SVSTREAM_OK; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits