All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gtk-doc: always inherit python3native
@ 2018-03-14 11:22 Ross Burton
  2018-03-14 11:22 ` [PATCH 2/2] gtk-doc: improve calling of gtkdocize Ross Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2018-03-14 11:22 UTC (permalink / raw)
  To: openembedded-core

My attempt at only inheriting python3native if it was needed was broken and
didn't work, so back it out and always inherit.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/gtk-doc.bbclass | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index b8db4280bcd..3f731cb93bf 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -28,10 +28,8 @@ GTKDOC_DOCDIR ?= "${S}"
 
 export STAGING_DIR_HOST
 
-inherit ${@oe.utils.ifelse(d.getVar('GTKDOC_ENABLED') == 'True', 'python3native', '')}
-
-inherit pkgconfig qemu
-DEPENDS_append = "${@oe.utils.ifelse(d.getVar('GTKDOC_ENABLED') == 'True', ' qemu-native', '')}"
+inherit python3native pkgconfig qemu
+DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
 
 do_configure_prepend () {
 	( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] gtk-doc: improve calling of gtkdocize
  2018-03-14 11:22 [PATCH 1/2] gtk-doc: always inherit python3native Ross Burton
@ 2018-03-14 11:22 ` Ross Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Ross Burton @ 2018-03-14 11:22 UTC (permalink / raw)
  To: openembedded-core

gtkdocize is only needed if the recipe is using autotools, so instead of hiding
all errors from it, only run it if we're also inheriting autotools.

Also instead of cd'ing into ${S}, pass --srcdir.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/gtk-doc.bbclass | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 3f731cb93bf..cfeb49a1d00 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -31,8 +31,15 @@ export STAGING_DIR_HOST
 inherit python3native pkgconfig qemu
 DEPENDS_append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' else ''}"
 
-do_configure_prepend () {
-	( cd ${S}; gtkdocize --docdir ${GTKDOC_DOCDIR} || true )
+# Run gtkdocize if the recipe is using autotools
+run_gtkdocize () {
+	bbnote Running gtkdocize...
+	gtkdocize --srcdir ${S} --docdir ${GTKDOC_DOCDIR}
+}
+
+python () {
+    if bb.data.inherits_class("autotools", d):
+        d.appendVarFlag('do_configure', 'prefuncs', ' run_gtkdocize')
 }
 
 do_compile_prepend_class-target () {
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-14 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 11:22 [PATCH 1/2] gtk-doc: always inherit python3native Ross Burton
2018-03-14 11:22 ` [PATCH 2/2] gtk-doc: improve calling of gtkdocize Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.