Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cycles from CMake dependency graph #2820

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -434,17 +434,17 @@ function(add_tarball targetname namever treeish)
set(distname ${tarname}.bz2)
set(docname ${namever}-doc.${distfmt})

add_custom_target(${docname}
DEPENDS man apidoc
file(GLOB man_pages docs/man/*.[1-8])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for this? AFAICS the tarball gets updated on man page changes as it is, through the "man" target.

add_custom_command(OUTPUT ${docname}
DEPENDS man apidoc docs/html/ ${man_pages}
COMMAND tar
-C ${CMAKE_BINARY_DIR}
--transform 's:^:${namever}/:'
-cf ${docname} docs/man/*.[1-8] docs/html/
)

add_custom_target(${distname}
add_custom_command(OUTPUT ${distname}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
BYPRODUCTS ${distname} ${docname}
VERBATIM
DEPENDS ChangeLog ${docname} po/rpm.pot
COMMAND git archive
Expand Down
10 changes: 6 additions & 4 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@ foreach(exe ${executables})
endforeach()

foreach(cmd rpmverify rpmquery)
add_custom_target(${cmd} ALL COMMAND
add_custom_command(OUTPUT ${cmd} COMMAND
${CMAKE_COMMAND} -E create_symlink rpm ${cmd}
BYPRODUCTS ${cmd})
)
add_custom_target(${cmd}_link ALL DEPENDS ${cmd})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${cmd} TYPE BIN)
endforeach()
if (WITH_ARCHIVE)
add_custom_target(rpm2cpio ALL COMMAND
add_custom_command(OUTPUT rpm2cpio COMMAND
${CMAKE_COMMAND} -E create_symlink rpm2archive rpm2cpio
BYPRODUCTS rpm2cpio)
)
add_custom_target(rpm2cpio_link ALL DEPENDS rpm2cpio)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rpm2cpio TYPE BIN)
endif()

Expand Down