From 125ae6b88fa2ca0efe0edc566b5a8449bd781c85 Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Mon, 25 Feb 2013 10:38:01 +0100 Subject: [PATCH] Fix doxygen doc gen. --- .gitignore | 3 +-- CMakeLists.txt | 11 ----------- doc/CMakeLists.txt | 11 +++++++++++ Doxyfile.in => doc/Doxyfile.in.in | 6 +++--- utils/make_tarball.sh | 2 +- 5 files changed, 16 insertions(+), 17 deletions(-) rename Doxyfile.in => doc/Doxyfile.in.in (99%) diff --git a/.gitignore b/.gitignore index 4c49164..4a0e369 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,4 @@ _CPack_Packages/ src/version.h src/createrepo_c.pc build/ -doc/html -doc/latex +tags diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d06109..fef5f39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,23 +93,12 @@ INCLUDE(CPack) # Other files -#SET(CMAKE_INSTALL_PREFIX "/") INSTALL(FILES README.md COPYING DESTINATION "share/doc/createrepo_c-${VERSION}") INSTALL(FILES createrepo_c.bash DESTINATION "/etc/bash_completion.d") -# Target to generate API documentation with Doxygen - -find_package(Doxygen) -if(DOXYGEN_FOUND) - add_custom_target(doc - ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in - COMMENT "Generating API documentation with Doxygen" VERBATIM) -endif(DOXYGEN_FOUND) - - # Gen manpage #message("Gen manpage") diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index a7177bc..a75fcd8 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,3 +1,14 @@ +find_package(Doxygen) +if(DOXYGEN_FOUND) + CONFIGURE_FILE("Doxyfile.in.in" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.in" @ONLY) + add_custom_target(doc-c + ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.in + COMMENT "Building C API documentation with Doxygen" VERBATIM) +endif(DOXYGEN_FOUND) + INSTALL(FILES createrepo_c.8.gz mergerepo_c.8.gz DESTINATION share/man/man8 COMPONENT bin) + +ADD_CUSTOM_TARGET (doc) +ADD_DEPENDENCIES (doc doc-c) diff --git a/Doxyfile.in b/doc/Doxyfile.in.in similarity index 99% rename from Doxyfile.in rename to doc/Doxyfile.in.in index cd8d4de..73b9153 100644 --- a/Doxyfile.in +++ b/doc/Doxyfile.in.in @@ -32,7 +32,7 @@ PROJECT_NAME = "createrepo_c library" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = @VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer @@ -52,7 +52,7 @@ PROJECT_LOGO = # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = doc/ +OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -671,7 +671,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = src +INPUT = @CMAKE_SOURCE_DIR@/src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/utils/make_tarball.sh b/utils/make_tarball.sh index 1c7871f..5496c5e 100755 --- a/utils/make_tarball.sh +++ b/utils/make_tarball.sh @@ -40,12 +40,12 @@ echo "Using root projekt dir: $PREFIX" cp --verbose README.md $DIRECTORY cp --verbose COPYING $DIRECTORY cp --verbose createrepo_c.bash $DIRECTORY - cp --verbose Doxyfile.in $DIRECTORY cp --verbose VERSION.cmake $DIRECTORY cp --verbose --parents cmake/Modules/* $DIRECTORY cp --verbose --parents doc/CMakeLists.txt $DIRECTORY + cp --verbose --parents doc/Doxyfile.in.in $DIRECTORY cp --verbose --parents doc/createrepo_c.8.* $DIRECTORY cp --verbose --parents doc/mergerepo_c.8.* $DIRECTORY -- 2.7.4