aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt13
-rw-r--r--doc/reference/libcrystfel/CrystFEL-docs.sgml7
-rwxr-xr-xdoc/reference/libcrystfel/build-docs14
-rw-r--r--doc/reference/libcrystfel/xml/gtkdocentities.ent.cmake.in8
5 files changed, 38 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 7eb13baa..66194f88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-doc/reference/libcrystfel/*
libcrystfel/crystfel.pc
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce7a6e26..773d246e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,19 @@ add_subdirectory(libcrystfel)
enable_testing()
add_subdirectory(tests)
+# API docs
+find_package(GtkDoc 1.25)
+if (GTKDOC_FOUND)
+ configure_file(doc/reference/libcrystfel/xml/gtkdocentities.ent.cmake.in
+ docs/xml/gtkdocentities.ent)
+ configure_file(doc/reference/libcrystfel/CrystFEL-docs.sgml
+ docs/CrystFEL-docs.sgml COPYONLY)
+ add_custom_target(documentation VERBATIM COMMAND
+ ${CMAKE_SOURCE_DIR}/doc/reference/libcrystfel/build-docs)
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs/html
+ DESTINATION ${CMAKE_INSTALL_DOCDIR})
+endif (GTKDOC_FOUND)
+
# ----------------------------------------------------------------------
# Build Target
# partial_sim
diff --git a/doc/reference/libcrystfel/CrystFEL-docs.sgml b/doc/reference/libcrystfel/CrystFEL-docs.sgml
index 048f4167..c6131ae7 100644
--- a/doc/reference/libcrystfel/CrystFEL-docs.sgml
+++ b/doc/reference/libcrystfel/CrystFEL-docs.sgml
@@ -33,7 +33,7 @@
<chapter>
<title>Unit cells</title>
- <xi:include href="xml/unitcell.xml"/>
+ <xi:include href="xml/cell.xml"/>
<xi:include href="xml/cell-utils.xml"/>
</chapter>
@@ -59,7 +59,7 @@
<chapter>
<title>Image filters</title>
- <xi:include href="xml/filter.xml"/>
+ <xi:include href="xml/filters.xml"/>
</chapter>
<chapter>
@@ -79,7 +79,7 @@
<chapter>
<title>Indexing</title>
- <xi:include href="xml/indexing.xml"><xi:fallback /></xi:include>
+ <xi:include href="xml/index.xml"><xi:fallback /></xi:include>
</chapter>
<chapter>
@@ -119,7 +119,6 @@
<chapter>
<title>Miscellaneous</title>
- <xi:include href="xml/quaternion.xml"/>
<xi:include href="xml/histogram.xml"/>
<xi:include href="xml/utils.xml"/>
</chapter>
diff --git a/doc/reference/libcrystfel/build-docs b/doc/reference/libcrystfel/build-docs
new file mode 100755
index 00000000..adb2137a
--- /dev/null
+++ b/doc/reference/libcrystfel/build-docs
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -x
+DOC_MODULE=CrystFEL
+
+mkdir docs
+cd docs
+gtkdoc-scan --module=${DOC_MODULE} ../../libcrystfel/src/*.h
+gtkdoc-mkdb --module=${DOC_MODULE} --output-format=xml --source-dir=../../libcrystfel/src
+mkdir html
+cd html
+gtkdoc-mkhtml ${DOC_MODULE} ../CrystFEL-docs.sgml
+cd ..
+gtkdoc-fixxref --module=${DOC_MODULE} --module-dir=html
diff --git a/doc/reference/libcrystfel/xml/gtkdocentities.ent.cmake.in b/doc/reference/libcrystfel/xml/gtkdocentities.ent.cmake.in
new file mode 100644
index 00000000..3fd9b080
--- /dev/null
+++ b/doc/reference/libcrystfel/xml/gtkdocentities.ent.cmake.in
@@ -0,0 +1,8 @@
+<!ENTITY package "libcrystfel">
+<!ENTITY package_bugreport "taw@physics.org">
+<!ENTITY package_name "libcrystfel">
+<!ENTITY package_string "crystfel ${PROJECT_VERSION}+${GIT_SHA1}">
+<!ENTITY package_tarname "libcrystfel">
+<!ENTITY package_url "https://www.desy.de/~twhite/crystfel">
+<!ENTITY package_version "${PROJECT_VERSION}+${GIT_SHA1}">
+