<table><tr><td style="">rakuco requested changes to this revision.<br />rakuco added a comment.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10450" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p><a href="https://phabricator.kde.org/p/kossebau/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@kossebau</a>'s right: the problem lies in <tt style="background: #ebebeb; font-size: 13px;">lookandfeeltool</tt> depending on <tt style="background: #ebebeb; font-size: 13px;">kcm.cpp</tt>, while the <tt style="background: #ebebeb; font-size: 13px;">kcoreaddons_desktop_to_json()</tt> call makes the <tt style="background: #ebebeb; font-size: 13px;">kcm_lookandfeel</tt> target depend on the generation of the json file. It's pretty easy to reproduce this bug by running <tt style="background: #ebebeb; font-size: 13px;">make lookandfeeltool_autogen</tt> with a fresh build directory.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>For this very patch, I am still lost on how cmake generates the rules for automoc stuff, so no clue if switching to an explicit intermediate target improves something.</p></blockquote>

<p>In terms of generated <tt style="background: #ebebeb; font-size: 13px;">Makefile</tt>s, without the patch in this review request we have <tt style="background: #ebebeb; font-size: 13px;">$BUILDDIR/kcms/lookandfeel/CMakeFiles/kcm_lookandfeel_autogen.dir/build.make</tt> with the right dependencies (<tt style="background: #ebebeb; font-size: 13px;">kcms/lookandfeel/CMakeFiles/kcm_lookandfeel_autogen</tt> depends on <tt style="background: #ebebeb; font-size: 13px;">kcms/lookandfeel/kcm_lookandfeel.json</tt>, which calls <tt style="background: #ebebeb; font-size: 13px;">desktoptojson</tt>). With this patch applied, the difference is that the dependency is moved to <tt style="background: #ebebeb; font-size: 13px;">$BUILDDIR/CMakeFiles/Makefile2</tt>, where <tt style="background: #ebebeb; font-size: 13px;">kcms/lookandfeel/CMakeFiles/kcm_lookandfeel_autogen.dir/all</tt> depends on <tt style="background: #ebebeb; font-size: 13px;">kcms/lookandfeel/CMakeFiles/desktop_to_json_<RANDOM>.dir/all</tt>. <tt style="background: #ebebeb; font-size: 13px;">kcms/lookandfeel/CMakeFiles/lookandfeeltool_autogen.dir/all</tt> still doesn't depend on anything though, so the bug persists if I run <tt style="background: #ebebeb; font-size: 13px;">make  lookandfeeltool_autogen</tt> directly.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10450" rel="noreferrer">https://phabricator.kde.org/D10450</a></div></div><br /><div><strong>To: </strong>tcberner, FreeBSD, mpyne, bshah, dfaure, rakuco<br /><strong>Cc: </strong>rakuco, kfunk, adridg, kossebau, Frameworks, michaelh<br /></div>