build: add doxygen support 11/52911/1
authorJaehoon Jeong <jh01.j@samsung.com>
Tue, 24 Nov 2015 07:46:29 +0000 (16:46 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Fri, 27 Nov 2015 10:28:17 +0000 (19:28 +0900)
    - Documentation build enabled as default, so use --disable-document if do not want

Change-Id: I51c83a58d69276065323b0b33999cb987c9dbbb4

Makefile.am
configure.ac
doc/.gitignore [new file with mode: 0644]
doc/Makefile.am [new file with mode: 0644]
doc/doxygen/pepper.doxygen.in [new file with mode: 0644]
packaging/pepper.spec

index 435b1e5b916ebc9a950612cb6acaadcef03ccbf3..d992447b3693e1c554da2d1bdfc4aea20216dadf 100644 (file)
@@ -14,3 +14,7 @@ if ENABLE_X11
 pkgconfig_DATA += pkgconfig/pepper-x11.pc
 endif
 pkgconfig_DATA += pkgconfig/pepper-desktop-shell.pc
+
+if ENABLE_DOCUMENT
+SUBDIRS += doc
+endif
index 5f4387b7b516e4b451f9f02dc39f86256e0ea386..c51b58ea9e792a5dc547f0545d736b40418fad56 100644 (file)
@@ -189,6 +189,22 @@ if test x$wayland_scanner = x; then
     wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
 fi
 
+# document
+AC_ARG_ENABLE([document],
+              [AC_HELP_STRING([--disable-document],
+                              [Disable building the documentation])],
+              [],
+              [enable_document=yes])
+
+AM_CONDITIONAL(ENABLE_DOCUMENT, test x$enable_document = xyes)
+
+if test x$enable_document = xyes; then
+    AC_PATH_PROG(DOXYGEN, [doxygen])
+    if test x$DOXYGEN = x; then
+        AC_MSG_ERROR([Documentation need doxygen, but not found])
+    fi
+fi
+
 # Output files
 AC_CONFIG_FILES([
 Makefile
@@ -218,4 +234,11 @@ if test x$enable_x11 = xyes; then
     ])
 fi
 
+if test x$enable_document = xyes; then
+    AC_CONFIG_FILES([
+        doc/Makefile
+        doc/doxygen/pepper.doxygen
+    ])
+fi
+
 AC_OUTPUT
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644 (file)
index 0000000..8895bc8
--- /dev/null
@@ -0,0 +1,2 @@
+pepper.doxygen
+html
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..033e8cc
--- /dev/null
@@ -0,0 +1,7 @@
+noinst_DATA = $(top_srcdir)/doc/html/index.html
+
+$(noinst_DATA): $(top_srcdir)/doc/doxygen/pepper.doxygen
+       cd $(top_srcdir)/doc/doxygen && $(DOXYGEN) pepper.doxygen
+
+clean-local:
+       rm -rf $(top_srcdir)/doc/html
diff --git a/doc/doxygen/pepper.doxygen.in b/doc/doxygen/pepper.doxygen.in
new file mode 100644 (file)
index 0000000..6b9dca5
--- /dev/null
@@ -0,0 +1,11 @@
+PROJECT_NAME           = "Pepper"
+OUTPUT_DIRECTORY       = @top_builddir@/doc/
+JAVADOC_AUTOBRIEF      = YES
+OPTIMIZE_OUTPUT_FOR_C  = YES
+INPUT                  = @top_builddir@/src/
+FILE_PATTERNS          = *.h *.c
+EXCLUDE_PATTERNS       = */protocol/*
+RECURSIVE              = YES
+GENERATE_LATEX         = NO
+DOTFILE_DIRS           = @top_srcdir@/doc/doxygen
+STRIP_FROM_PATH        = @top_srcdir@
index 8439ae1f2f77c80562b0bda535db5c3cbfb10e43..09368a4735fdb3d41ad362b7890d21f0dd31d668 100644 (file)
@@ -20,6 +20,7 @@ BuildRequires:        pkgconfig(gbm)
 BuildRequires: pkgconfig(egl)
 BuildRequires: pkgconfig(glesv2)
 BuildRequires:  pkgconfig(xkbcommon)
+BuildRequires: doxygen
 
 %description
 Pepper is a lightweight and flexible library for developing various types of wayland compositors.