mirror of
https://github.com/libevent/libevent.git
synced 2025-01-20 05:02:55 +08:00
19d0bdfe0c
As pointed by @kloczek: "With only two characters it would be harder to guess under what kind of name are libevent lvl 3 man pages. Longer name with bash/fix/zsh tab competition should not be a problem :)" Refs: #1099
18 lines
596 B
CMake
18 lines
596 B
CMake
# Add prefix "libevent_" for manual pages
|
|
|
|
message(STATUS "Rename man pages in ${CMAKE_BINARY_DIR}")
|
|
|
|
# Remove old pages to avoid stalled copies
|
|
file(GLOB LIBEVENT_MAN_PAGES RELATIVE ${CMAKE_BINARY_DIR} libevent_*)
|
|
list(LENGTH LIBEVENT_MAN_PAGES LEN)
|
|
if (${LEN} GREATER 0)
|
|
file(REMOVE ${LIBEVENT_MAN_PAGES})
|
|
endif()
|
|
|
|
# Create new
|
|
file(GLOB LIBEVENT_MAN_PAGES RELATIVE ${CMAKE_BINARY_DIR} *)
|
|
list(FILTER LIBEVENT_MAN_PAGES EXCLUDE REGEX ^libevent_.*$)
|
|
foreach(MAN_PAGE ${LIBEVENT_MAN_PAGES})
|
|
file(RENAME ${CMAKE_BINARY_DIR}/${MAN_PAGE} ${CMAKE_BINARY_DIR}/libevent_${MAN_PAGE})
|
|
endforeach()
|