@dmnks commented on this pull request.


>       if (EXISTS ${PANDOC})
                add_custom_command(OUTPUT ${man} COMMAND ${PANDOC}
                                ${CMAKE_CURRENT_SOURCE_DIR}/${man}.md
                                -s -t man -o ${man} DEPENDS ${man}.md)
-               install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${man} TYPE MAN)
+               set(fn ${CMAKE_CURRENT_BINARY_DIR}/${man})
+       else()
+               # dist tarballs have pre-built manuals in the source dir
+               if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${man})
+                       set(fn ${CMAKE_CURRENT_SOURCE_DIR}/${man})
+               endif()
+       endif()

We might want  to have a more friendly error in case you're missing pandoc 
*and* are not building from a dist tarball, now it fails like this:
```
[ 80%] Built target apidoc
make[2]: *** No rule to make target 'docs/man/gendiff.1', needed by 
'docs/man/CMakeFiles/man'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:1043: docs/man/CMakeFiles/man.dir/all] Error 
2
make: *** [Makefile:136: all] Error 2
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2467#pullrequestreview-1378631979
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2467/review/1378631...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to