From 0fcba4363a0bb1acee0db37023c6dd87c0374659 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 11 Apr 2009 16:11:43 +0200 Subject: [PATCH] build: move manpages into their own directory Signed-off-by: Julien Danjou --- CMakeLists.txt | 22 ++++++++++--------- .../awesome-client.1.txt | 0 awesome.1.txt => manpages/awesome.1.txt | 0 awesomerc.5.txt => manpages/awesomerc.5.txt | 0 awsetbg.1.txt => manpages/awsetbg.1.txt | 0 5 files changed, 12 insertions(+), 10 deletions(-) rename awesome-client.1.txt => manpages/awesome-client.1.txt (100%) rename awesome.1.txt => manpages/awesome.1.txt (100%) rename awesomerc.5.txt => manpages/awesomerc.5.txt (100%) rename awsetbg.1.txt => manpages/awsetbg.1.txt (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5d4a955..a0cacd28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,10 +78,10 @@ set(AWE_SRCS ${SOURCE_DIR}/widgets/imagebox.c) set(AWE_MAN_SRCS - ${SOURCE_DIR}/awesome.1.txt - ${SOURCE_DIR}/awsetbg.1.txt - ${SOURCE_DIR}/awesome-client.1.txt - ${SOURCE_DIR}/awesomerc.5.txt) + ${SOURCE_DIR}/manpages/awesome.1.txt + ${SOURCE_DIR}/manpages/awsetbg.1.txt + ${SOURCE_DIR}/manpages/awesome-client.1.txt + ${SOURCE_DIR}/manpages/awesomerc.5.txt) add_executable(${PROJECT_AWE_NAME} ${AWE_SRCS} @@ -172,6 +172,9 @@ endif() # {{{ Manpages if(GENERATE_MANPAGES) + if(NOT BUILD_DIR STREQUAL SOURCE_DIR) + file(MAKE_DIRECTORY ${BUILD_DIR}/manpages) + endif() foreach(txtfile ${AWE_MAN_SRCS}) string(REGEX REPLACE ".txt\$" ".xml" xmlfile ${txtfile}) string(REPLACE ${SOURCE_DIR} @@ -180,21 +183,20 @@ if(GENERATE_MANPAGES) string(REGEX REPLACE ".gz\$" "" manfile ${gzfile}) add_custom_command( - COMMAND ${CAT_EXECUTABLE} ${txtfile} - | ${ASCIIDOC_EXECUTABLE} -d manpage -b docbook -o ${xmlfile} - - WORKING_DIRECTORY ${BUILD_DIR} + COMMAND ${ASCIIDOC_EXECUTABLE} -d manpage -b docbook -o ${xmlfile} - < ${txtfile} + WORKING_DIRECTORY ${BUILD_DIR}/manpages OUTPUT ${xmlfile} DEPENDS ${txtfile} VERBATIM) add_custom_command( COMMAND ${XMLTO_EXECUTABLE} man ${xmlfile} OUTPUT ${manfile} + WORKING_DIRECTORY ${BUILD_DIR}/manpages DEPENDS ${xmlfile}) add_custom_command( - COMMAND ${CAT_EXECUTABLE} ${manfile} - | ${GZIP_EXECUTABLE} - > ${gzfile} + COMMAND ${GZIP_EXECUTABLE} < ${manfile} > ${gzfile} OUTPUT ${gzfile} + WORKING_DIRECTORY ${BUILD_DIR}/manpages DEPENDS ${manfile} VERBATIM) diff --git a/awesome-client.1.txt b/manpages/awesome-client.1.txt similarity index 100% rename from awesome-client.1.txt rename to manpages/awesome-client.1.txt diff --git a/awesome.1.txt b/manpages/awesome.1.txt similarity index 100% rename from awesome.1.txt rename to manpages/awesome.1.txt diff --git a/awesomerc.5.txt b/manpages/awesomerc.5.txt similarity index 100% rename from awesomerc.5.txt rename to manpages/awesomerc.5.txt diff --git a/awsetbg.1.txt b/manpages/awsetbg.1.txt similarity index 100% rename from awsetbg.1.txt rename to manpages/awsetbg.1.txt