rakuco requested changes to this revision. rakuco added a comment. This revision now requires changes to proceed.
@kossebau's right: the problem lies in `lookandfeeltool` depending on `kcm.cpp`, while the `kcoreaddons_desktop_to_json()` call makes the `kcm_lookandfeel` target depend on the generation of the json file. It's pretty easy to reproduce this bug by running `make lookandfeeltool_autogen` with a fresh build directory. > 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. In terms of generated `Makefile`s, without the patch in this review request we have `$BUILDDIR/kcms/lookandfeel/CMakeFiles/kcm_lookandfeel_autogen.dir/build.make` with the right dependencies (`kcms/lookandfeel/CMakeFiles/kcm_lookandfeel_autogen` depends on `kcms/lookandfeel/kcm_lookandfeel.json`, which calls `desktoptojson`). With this patch applied, the difference is that the dependency is moved to `$BUILDDIR/CMakeFiles/Makefile2`, where `kcms/lookandfeel/CMakeFiles/kcm_lookandfeel_autogen.dir/all` depends on `kcms/lookandfeel/CMakeFiles/desktop_to_json_<RANDOM>.dir/all`. `kcms/lookandfeel/CMakeFiles/lookandfeeltool_autogen.dir/all` still doesn't depend on anything though, so the bug persists if I run `make lookandfeeltool_autogen` directly. REPOSITORY R244 KCoreAddons REVISION DETAIL https://phabricator.kde.org/D10450 To: tcberner, #freebsd, mpyne, bshah, dfaure, rakuco Cc: rakuco, kfunk, adridg, kossebau, #frameworks, michaelh