[evolution-data-server] I#41 - Documentation doesn't go through gtkdoc-scangobj
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] I#41 - Documentation doesn't go through gtkdoc-scangobj
- Date: Mon, 5 Nov 2018 10:02:46 +0000 (UTC)
commit 2194b46a6fcfba30126c16e2917db2f83da40d92
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 5 11:03:09 2018 +0100
I#41 - Documentation doesn't go through gtkdoc-scangobj
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/41
CMakeLists.txt | 1 +
cmake/modules/GtkDoc.cmake | 96 +++++++++++++++++++++++++++++++
src/calendar/libecal/e-reminder-watcher.c | 2 +-
3 files changed, 98 insertions(+), 1 deletion(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3d97c2d31..c60afbd25 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -998,6 +998,7 @@ add_subdirectory(po)
add_subdirectory(src)
add_subdirectory(tests)
+# Add it as the last, because it looks for targets defined above
if(ENABLE_GTK_DOC)
add_subdirectory(docs)
endif(ENABLE_GTK_DOC)
diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake
index e82ee0a19..b3519aeb5 100644
--- a/cmake/modules/GtkDoc.cmake
+++ b/cmake/modules/GtkDoc.cmake
@@ -2,6 +2,9 @@
#
# Macros to support develper documentation build from sources with gtk-doc.
#
+# Note that every target and dependency should be defined before the macro is
+# called, because it uses information from those targets.
+#
# add_gtkdoc(_module _namespace _deprecated_guards _srcdirsvar _depsvar _ignoreheadersvar)
# Adds rules to build developer documentation using gtk-doc for some part.
# Arguments:
@@ -24,6 +27,7 @@ if(NOT ENABLE_GTK_DOC)
endif(NOT ENABLE_GTK_DOC)
find_program(GTKDOC_SCAN gtkdoc-scan)
+find_program(GTKDOC_SCANGOBJ gtkdoc-scangobj)
find_program(GTKDOC_MKDB gtkdoc-mkdb)
find_program(GTKDOC_MKHTML gtkdoc-mkhtml)
find_program(GTKDOC_FIXXREF gtkdoc-fixxref)
@@ -63,6 +67,82 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
set(_mkhtml_prefix "${CMAKE_COMMAND} -E env XML_CATALOG_FILES=\"/usr/local/etc/xml/catalog\"")
endif(APPLE)
+ set(_scangobj_deps)
+ set(_scangobj_cflags_list)
+ set(_scangobj_cflags "")
+ set(_scangobj_ldflags "")
+ set(_scangobj_ld_lib_dirs "")
+
+ list(APPEND _scangobj_cflags_list -I${INCLUDE_INSTALL_DIR})
+ list(APPEND _scangobj_ldflags -L${LIB_INSTALL_DIR})
+
+ foreach(opt IN LISTS ${_depsvar})
+ if(TARGET ${opt})
+ set(_target_type)
+ get_target_property(_target_type ${opt} TYPE)
+ if((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL
"SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
+ set(_compile_options)
+ set(_link_libraries)
+
+ get_target_property(_compile_options ${opt} COMPILE_OPTIONS)
+ get_target_property(_link_libraries ${opt} LINK_LIBRARIES)
+
+ list(APPEND _scangobj_cflags_list ${_compile_options})
+ list(APPEND _scangobj_deps ${_link_libraries})
+
+ unset(_compile_options)
+ unset(_link_libraries)
+ endif((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL
"SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
+ unset(_target_type)
+ endif(TARGET ${opt})
+
+ list(APPEND _scangobj_deps ${opt})
+ endforeach(opt)
+
+ if(_scangobj_deps)
+ list(REMOVE_DUPLICATES _scangobj_deps)
+ endif(_scangobj_deps)
+ if(_scangobj_cflags_list)
+ list(REMOVE_DUPLICATES _scangobj_cflags_list)
+ endif(_scangobj_cflags_list)
+
+ foreach(opt IN LISTS _scangobj_cflags_list)
+ set(_scangobj_cflags "${_scangobj_cflags} ${opt}")
+ endforeach(opt)
+
+ foreach(opt IN LISTS _scangobj_deps)
+ if(TARGET ${opt})
+ set(_target_type)
+ get_target_property(_target_type ${opt} TYPE)
+ if((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL
"SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
+ set(_output_name "")
+ get_target_property(_output_name ${opt} OUTPUT_NAME)
+ if(NOT _output_name)
+ set(_output_name ${opt})
+ endif(NOT _output_name)
+ set(_scangobj_ldflags "${_scangobj_ldflags} -L$<TARGET_FILE_DIR:${opt}>
-l${_output_name}")
+
+ if(_target_type STREQUAL "SHARED_LIBRARY" OR (_target_type STREQUAL
"MODULE_LIBRARY"))
+ set(_scangobj_ld_lib_dirs
"${_scangobj_ld_lib_dirs}:$<TARGET_FILE_DIR:${opt}>")
+ endif(_target_type STREQUAL "SHARED_LIBRARY" OR (_target_type STREQUAL
"MODULE_LIBRARY"))
+ unset(_output_name)
+ endif((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL
"SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
+ unset(_target_type)
+ else(TARGET ${opt})
+ set(_scangobj_ldflags "${_scangobj_ldflags} ${opt}")
+ endif(TARGET ${opt})
+ endforeach(opt)
+
+ set(_scangobj_prefix ${CMAKE_COMMAND} -E env
LD_LIBRARY_PATH="${_scangobj_ld_lib_dirs}:${LIB_INSTALL_DIR}")
+
+ if(NOT (_scangobj_cflags STREQUAL ""))
+ set(_scangobj_cflags --cflags "${_scangobj_cflags}")
+ endif(NOT (_scangobj_cflags STREQUAL ""))
+
+ if(NOT (_scangobj_ldflags STREQUAL ""))
+ set(_scangobj_ldflags --ldflags "${_scangobj_ldflags}")
+ endif(NOT (_scangobj_ldflags STREQUAL ""))
+
add_custom_command(OUTPUT html/index.html
COMMAND ${GTKDOC_SCAN}
--module=${_module}
@@ -72,6 +152,11 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
--rebuild-types
${_srcdirs}
+ COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}" ${_scangobj_prefix}
${GTKDOC_SCANGOBJ}
+ --module=${_module}
+ ${_scangobj_cflags}
+ ${_scangobj_ldflags}
+
COMMAND ${GTKDOC_MKDB}
--module=${_module}
--name-space=${_namespace}
@@ -126,6 +211,11 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
--rebuild-types
${_srcdirs}
+ COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}" ${_scangobj_prefix}
${GTKDOC_SCANGOBJ}
+ --module=${_module}
+ ${_scangobj_cflags}
+ ${_scangobj_ldflags}
+
COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/tmp"
${GTKDOC_MKDB}
--module=${_module}
@@ -142,4 +232,10 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
add_dependencies(gtkdoc-rebuild-sgmls gtkdoc-rebuild-${_module}-sgml)
+ unset(_scangobj_prefix)
+ unset(_scangobj_deps)
+ unset(_scangobj_cflags_list)
+ unset(_scangobj_cflags)
+ unset(_scangobj_ldflags)
+ unset(_scangobj_ld_lib_dirs)
endmacro(add_gtkdoc)
diff --git a/src/calendar/libecal/e-reminder-watcher.c b/src/calendar/libecal/e-reminder-watcher.c
index 2dd109b39..7db020c51 100644
--- a/src/calendar/libecal/e-reminder-watcher.c
+++ b/src/calendar/libecal/e-reminder-watcher.c
@@ -2359,7 +2359,7 @@ e_reminder_watcher_get_timers_enabled (EReminderWatcher *watcher)
/**
* e_reminder_watcher_set_timers_enabled:
* @watcher: an #EReminderWatcher
- * @enable: a value to set
+ * @enabled: a value to set
*
* The @watcher can be used both for scheduling the timers for the reminders
* and respond to them through the "triggered" signal, or only to listen for
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]