mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Change prefix for man pages from "le_" to "libevent_"
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
This commit is contained in:
parent
21b91692da
commit
19d0bdfe0c
@ -1,9 +1,9 @@
|
||||
# Add prefix "le_" for manual pages
|
||||
# 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} le_*)
|
||||
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})
|
||||
@ -11,7 +11,7 @@ endif()
|
||||
|
||||
# Create new
|
||||
file(GLOB LIBEVENT_MAN_PAGES RELATIVE ${CMAKE_BINARY_DIR} *)
|
||||
list(FILTER LIBEVENT_MAN_PAGES EXCLUDE REGEX ^le_.*$)
|
||||
list(FILTER LIBEVENT_MAN_PAGES EXCLUDE REGEX ^libevent_.*$)
|
||||
foreach(MAN_PAGE ${LIBEVENT_MAN_PAGES})
|
||||
file(RENAME ${CMAKE_BINARY_DIR}/${MAN_PAGE} ${CMAKE_BINARY_DIR}/le_${MAN_PAGE})
|
||||
file(RENAME ${CMAKE_BINARY_DIR}/${MAN_PAGE} ${CMAKE_BINARY_DIR}/libevent_${MAN_PAGE})
|
||||
endforeach()
|
||||
|
@ -97,7 +97,7 @@ macro(UseDoxygen)
|
||||
|
||||
if ("${DOXYGEN_GENERATE_MAN}" STREQUAL "YES")
|
||||
set(MAN_PAGES_DIR ${PROJECT_BINARY_DIR}/${DOXYGEN_OUTPUT_DIRECTORY}/man/man3)
|
||||
# Add prefix "le_" for manual pages
|
||||
# Add prefix "libevent_" for manual pages
|
||||
add_custom_target(doxygen-rename-man-pages ALL
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/RenameDoxygen.cmake
|
||||
DEPENDS doxygen
|
||||
|
@ -20,7 +20,7 @@ clean-local:
|
||||
if ENABLE_DOXYGEN_MAN
|
||||
man3_MAN_DIR = @DX_DOCDIR@/man/man3
|
||||
|
||||
# add "le_" prefix for man pages
|
||||
# add "libevent_" prefix for man pages
|
||||
#
|
||||
# XXX: we cannot clean old man pages here since
|
||||
# doxygen-rename-man-pages will be called twice:
|
||||
@ -30,14 +30,14 @@ man3_MAN_DIR = @DX_DOCDIR@/man/man3
|
||||
#
|
||||
# Once this will be solved add the following to the target:
|
||||
#
|
||||
# -rm -fr $(man3_MAN_DIR)/le_*
|
||||
# -rm -fr $(man3_MAN_DIR)/libevent_*
|
||||
doxygen-rename-man-pages: doxygen-doc
|
||||
echo "Rename man pages in $(man3_MAN_DIR)"
|
||||
@for p in $(man3_MAN_DIR)/*; do \
|
||||
p=`basename $$p`; \
|
||||
p_strip=$${p/le_/}; \
|
||||
p_strip=$${p/libevent_/}; \
|
||||
if [ ! "$$p_strip" = "$$p" ]; then continue; fi; \
|
||||
mv '$(man3_MAN_DIR)/'$$p '$(man3_MAN_DIR)/'le_$$p; \
|
||||
mv '$(man3_MAN_DIR)/'$$p '$(man3_MAN_DIR)/'libevent_$$p; \
|
||||
done
|
||||
|
||||
# integrate doxygen with automake targets
|
||||
|
Loading…
x
Reference in New Issue
Block a user