1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-16 12:03:03 -05:00
Simon Tatham cadd86ac49 doc/CMakeLists.txt: reorganise custom targets.
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.
2022-01-22 14:42:03 +00:00
..
2006-12-19 10:28:44 +00:00
2021-05-02 08:05:43 +01:00
2021-02-21 16:44:51 +00:00
2022-01-11 23:57:39 +00:00
2021-12-30 11:52:51 +00:00
2021-04-17 13:27:26 +01:00
2021-08-14 08:02:27 +01:00
2022-01-11 23:57:39 +00:00
2021-12-30 11:52:51 +00:00