Blame SOURCES/json-c-0.14-move_Doxyfile_into_doc_subdir.patch

a0bbcb
From 61e2bae5111b49a788fe4c236b473dc86250a7fe Mon Sep 17 00:00:00 2001
a0bbcb
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
a0bbcb
Date: Mon, 18 May 2020 20:32:35 +0200
a0bbcb
Subject: [PATCH 1/2] doc: Move Doxyfile into doc subdir
a0bbcb
a0bbcb
---
a0bbcb
 .gitignore                     |  2 +-
a0bbcb
 CMakeLists.txt                 | 19 +------------------
a0bbcb
 doc/CMakeLists.txt             | 16 ++++++++++++++++
a0bbcb
 Doxyfile.in => doc/Doxyfile.in |  2 +-
a0bbcb
 4 files changed, 19 insertions(+), 20 deletions(-)
a0bbcb
 create mode 100644 doc/CMakeLists.txt
a0bbcb
 rename Doxyfile.in => doc/Doxyfile.in (99%)
a0bbcb
a0bbcb
diff --git a/.gitignore b/.gitignore
a0bbcb
index 958ace3ac1..1cdaf9bdba 100644
a0bbcb
--- a/.gitignore
a0bbcb
+++ b/.gitignore
a0bbcb
@@ -83,7 +83,7 @@
a0bbcb
 /Testing/
a0bbcb
 
a0bbcb
 # ...and build artifacts.
a0bbcb
-/doc
a0bbcb
+/doc/html
a0bbcb
 /libjson-c.a
a0bbcb
 /libjson-c.so
a0bbcb
 /libjson-c.so.*
a0bbcb
diff --git a/CMakeLists.txt b/CMakeLists.txt
a0bbcb
index f58301c71a..ec17697170 100644
a0bbcb
--- a/CMakeLists.txt
a0bbcb
+++ b/CMakeLists.txt
a0bbcb
@@ -361,24 +361,7 @@ set(JSON_C_SOURCES
a0bbcb
 include_directories(${PROJECT_SOURCE_DIR})
a0bbcb
 include_directories(${PROJECT_BINARY_DIR})
a0bbcb
 
a0bbcb
-# generate doxygen documentation for json-c API
a0bbcb
-
a0bbcb
-find_package(Doxygen)
a0bbcb
-option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation(requires Doxygen)" ${DOXYGEN_FOUND})
a0bbcb
-
a0bbcb
-if (DOXYGEN_FOUND)
a0bbcb
-
a0bbcb
-	configure_file(${PROJECT_SOURCE_DIR}/Doxyfile.in
a0bbcb
-	  ${PROJECT_BINARY_DIR}/Doxyfile)
a0bbcb
-	message(STATUS "Written ${PROJECT_BINARY_DIR}/Doxyfile")
a0bbcb
-
a0bbcb
-	add_custom_target(doc
a0bbcb
-	COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
a0bbcb
-		WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
a0bbcb
-
a0bbcb
-else (DOXYGEN_FOUND)
a0bbcb
-	message("Warning: doxygen not found, the 'doc' target will not be included")
a0bbcb
-endif(DOXYGEN_FOUND)
a0bbcb
+add_subdirectory(doc)
a0bbcb
 
a0bbcb
 # uninstall
a0bbcb
 add_custom_target(uninstall
a0bbcb
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
a0bbcb
new file mode 100644
a0bbcb
index 0000000000..4872d8e8ad
a0bbcb
--- /dev/null
a0bbcb
+++ b/doc/CMakeLists.txt
a0bbcb
@@ -0,0 +1,16 @@
a0bbcb
+# generate doxygen documentation for json-c API
a0bbcb
+
a0bbcb
+find_package(Doxygen)
a0bbcb
+
a0bbcb
+if (DOXYGEN_FOUND)
a0bbcb
+
a0bbcb
+	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
a0bbcb
+	  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
a0bbcb
+	message(STATUS "Wrote ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
a0bbcb
+
a0bbcb
+	add_custom_target(doc
a0bbcb
+	COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
a0bbcb
+
a0bbcb
+else (DOXYGEN_FOUND)
a0bbcb
+	message("Warning: doxygen not found, the 'doc' target will not be included")
a0bbcb
+endif(DOXYGEN_FOUND)
a0bbcb
diff --git a/Doxyfile.in b/doc/Doxyfile.in
a0bbcb
similarity index 99%
a0bbcb
rename from Doxyfile.in
a0bbcb
rename to doc/Doxyfile.in
a0bbcb
index 42a08535c2..ce8d8ff78c 100644
a0bbcb
--- a/Doxyfile.in
a0bbcb
+++ b/doc/Doxyfile.in
a0bbcb
@@ -58,7 +58,7 @@ PROJECT_LOGO           =
a0bbcb
 # entered, it will be relative to the location where doxygen was started. If
a0bbcb
 # left blank the current directory will be used.
a0bbcb
 
a0bbcb
-OUTPUT_DIRECTORY       = doc
a0bbcb
+OUTPUT_DIRECTORY       = @CMAKE_CURRENT_BINARY_DIR@
a0bbcb
 
a0bbcb
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
a0bbcb
 # directories (in 2 levels) under the output directory of each output format and
a0bbcb
a0bbcb
From 1e94da779a9aa107690e4f2921ab4d0300aca579 Mon Sep 17 00:00:00 2001
a0bbcb
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
a0bbcb
Date: Mon, 18 May 2020 20:36:05 +0200
a0bbcb
Subject: [PATCH 2/2] CMake: Fix grammar: written -> wrote.
a0bbcb
a0bbcb
---
a0bbcb
 CMakeLists.txt | 4 ++--
a0bbcb
 1 file changed, 2 insertions(+), 2 deletions(-)
a0bbcb
a0bbcb
diff --git a/CMakeLists.txt b/CMakeLists.txt
a0bbcb
index ec17697170..333513c5e0 100644
a0bbcb
--- a/CMakeLists.txt
a0bbcb
+++ b/CMakeLists.txt
a0bbcb
@@ -237,9 +237,9 @@ endif()
a0bbcb
 
a0bbcb
 # Once we've done basic symbol/header searches let's add them in.
a0bbcb
 configure_file(${PROJECT_SOURCE_DIR}/cmake/config.h.in        ${PROJECT_BINARY_DIR}/config.h)
a0bbcb
-message(STATUS "Written ${PROJECT_BINARY_DIR}/config.h")
a0bbcb
+message(STATUS "Wrote ${PROJECT_BINARY_DIR}/config.h")
a0bbcb
 configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in   ${PROJECT_BINARY_DIR}/json_config.h)
a0bbcb
-message(STATUS "Written ${PROJECT_BINARY_DIR}/json_config.h")
a0bbcb
+message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h")
a0bbcb
 
a0bbcb
 if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
a0bbcb
     set(CMAKE_C_FLAGS           "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")