mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -05:00

Jacob reported that on Debian buster, the command sequence cmake $srcdir cmake --build . cmake --build . --target doc would fail at the third step, with the make error "No rule to make target 'doc/cmake_version.but', needed by 'doc/html/index.html'". That seems odd, because the file ${VERSION_BUT} _was_ declared as a dependency of the rule that builds doc/html/*.html, and _cmake_ knew what rule built it (namely the custom target 'cmake_version_but'). I suspect this is a bug in cmake 3.13, because the same command sequence works fine with cmake 3.20. However, it's possible to work around, by means of adding the cmake _target name_ to the dependencies for any rule that uses that file, instead of relying on it to map the output _file_ name to that target. While I'm at it, I've transformed the rules that build copy.but and licence.but in the same way, turning those too into custom targets instead of custom commands (I've found that the former are more generally reliable across a range of cmake versions), and including the target names themselves as dependencies.