Patchwork [2/2,v2] add doxygen class

login
register
mail settings
Submitter Zongchun Yu
Date May 23, 2014, 6:09 a.m.
Message ID <1400825350-3995-1-git-send-email-b40527@freescale.com>
Download mbox | patch
Permalink /patch/72623/
State New
Headers show

Comments

Zongchun Yu - May 23, 2014, 6:09 a.m.
From: Zongchun Yu <Zongchun.Yu@freescale.com>

Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com>
---
 meta/classes/doxygen.bbclass |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 meta/classes/doxygen.bbclass

Patch

diff --git a/meta/classes/doxygen.bbclass b/meta/classes/doxygen.bbclass
new file mode 100644
index 0000000..13b9f79
--- /dev/null
+++ b/meta/classes/doxygen.bbclass
@@ -0,0 +1,16 @@ 
+# Helper class to pull in the right dependencies and generate
+# api documentation from sources code
+
+DEPENDS += "doxygen-native"
+
+# Doxygen configuration file
+DOXYGEN_CFG ?= "Doxyfile"
+
+do_generate_doc () {
+    if [ -e ${S}/${DOXYGEN_CFG} ]; then
+        doxygen ${S}/${DOXYGEN_CFG}
+    else
+        bbfatal "no doxygen configuration file found"
+    fi
+}
+addtask generate_doc before do_compile after do_patch