* [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass
@ 2018-02-11 21:51 Joshua Watt
2018-02-12 2:30 ` Robert Yang
2018-02-12 16:20 ` [meta-networking][PATCH v2] " Joshua Watt
0 siblings, 2 replies; 5+ messages in thread
From: Joshua Watt @ 2018-02-11 21:51 UTC (permalink / raw)
To: openembedded-devel; +Cc: Stefan Agner
waf-samba.bbclass uses waf in a very different way than the "standard"
method that waf.bbclass targets and ends getting very little useful
functionality from that class.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta-networking/classes/waf-samba.bbclass | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/meta-networking/classes/waf-samba.bbclass b/meta-networking/classes/waf-samba.bbclass
index e49017624..4b1499fd4 100644
--- a/meta-networking/classes/waf-samba.bbclass
+++ b/meta-networking/classes/waf-samba.bbclass
@@ -1,7 +1,7 @@
# waf is a build system which is used by samba related project.
# Obtain details from https://wiki.samba.org/index.php/Waf
-#
-inherit qemu pythonnative waf
+#
+inherit qemu pythonnative
DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
@@ -21,6 +21,31 @@ CONFIGUREOPTS = " --prefix=${prefix} \
${PACKAGECONFIG_CONFARGS} \
"
+# avoids build breaks when using no-static-libs.inc
+DISABLE_STATIC = ""
+
+def get_waf_parallel_make(d):
+ pm = d.getVar('PARALLEL_MAKE')
+ if pm:
+ # look for '-j' and throw other options (e.g. '-l') away
+ # because they might have different meaning in bjam
+ pm = pm.split()
+ while pm:
+ v = None
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ v = None
+
+ if v:
+ v = min(64, int(v))
+ return '-j' + str(v)
+
+ return ""
+
# Three methods for waf cross compile:
# 1. answers:
# Only --cross-answers - try the cross-answers file, and if
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass
2018-02-11 21:51 [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass Joshua Watt
@ 2018-02-12 2:30 ` Robert Yang
2018-02-12 3:53 ` Joshua Watt
2018-02-12 16:20 ` [meta-networking][PATCH v2] " Joshua Watt
1 sibling, 1 reply; 5+ messages in thread
From: Robert Yang @ 2018-02-12 2:30 UTC (permalink / raw)
To: Joshua Watt, openembedded-devel; +Cc: Stefan Agner
On 02/12/2018 05:51 AM, Joshua Watt wrote:
> waf-samba.bbclass uses waf in a very different way than the "standard"
> method that waf.bbclass targets and ends getting very little useful
> functionality from that class.
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta-networking/classes/waf-samba.bbclass | 29 +++++++++++++++++++++++++++--
> 1 file changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/meta-networking/classes/waf-samba.bbclass b/meta-networking/classes/waf-samba.bbclass
> index e49017624..4b1499fd4 100644
> --- a/meta-networking/classes/waf-samba.bbclass
> +++ b/meta-networking/classes/waf-samba.bbclass
> @@ -1,7 +1,7 @@
> # waf is a build system which is used by samba related project.
> # Obtain details from https://wiki.samba.org/index.php/Waf
> -#
> -inherit qemu pythonnative waf
> +#
> +inherit qemu pythonnative
>
> DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
>
> @@ -21,6 +21,31 @@ CONFIGUREOPTS = " --prefix=${prefix} \
> ${PACKAGECONFIG_CONFARGS} \
> "
>
> +# avoids build breaks when using no-static-libs.inc
> +DISABLE_STATIC = ""
> +
> +def get_waf_parallel_make(d):
> + pm = d.getVar('PARALLEL_MAKE')
> + if pm:
> + # look for '-j' and throw other options (e.g. '-l') away
> + # because they might have different meaning in bjam
> + pm = pm.split()
> + while pm:
> + v = None
> + opt = pm.pop(0)
> + if opt == '-j':
> + v = pm.pop(0)
> + elif opt.startswith('-j'):
> + v = opt[2:].strip()
> + else:
> + v = None
The "else:" block isn't needed ? The first line already set v to None.
// Robert
> +
> + if v:
> + v = min(64, int(v))
> + return '-j' + str(v)
> +
> + return ""
> +
> # Three methods for waf cross compile:
> # 1. answers:
> # Only --cross-answers - try the cross-answers file, and if
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass
2018-02-12 2:30 ` Robert Yang
@ 2018-02-12 3:53 ` Joshua Watt
0 siblings, 0 replies; 5+ messages in thread
From: Joshua Watt @ 2018-02-12 3:53 UTC (permalink / raw)
To: Robert Yang; +Cc: openembedded-devel, Stefan Agner
On Feb 11, 2018 20:29, "Robert Yang" <liezhi.yang@windriver.com> wrote:
On 02/12/2018 05:51 AM, Joshua Watt wrote:
> waf-samba.bbclass uses waf in a very different way than the "standard"
> method that waf.bbclass targets and ends getting very little useful
> functionality from that class.
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta-networking/classes/waf-samba.bbclass | 29
> +++++++++++++++++++++++++++--
> 1 file changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/meta-networking/classes/waf-samba.bbclass
> b/meta-networking/classes/waf-samba.bbclass
> index e49017624..4b1499fd4 100644
> --- a/meta-networking/classes/waf-samba.bbclass
> +++ b/meta-networking/classes/waf-samba.bbclass
> @@ -1,7 +1,7 @@
> # waf is a build system which is used by samba related project.
> # Obtain details from https://wiki.samba.org/index.php/Waf
> -#
> -inherit qemu pythonnative waf
> +#
> +inherit qemu pythonnative
> DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native
> python"
> @@ -21,6 +21,31 @@ CONFIGUREOPTS = " --prefix=${prefix} \
> ${PACKAGECONFIG_CONFARGS} \
> "
> +# avoids build breaks when using no-static-libs.inc
> +DISABLE_STATIC = ""
> +
> +def get_waf_parallel_make(d):
> + pm = d.getVar('PARALLEL_MAKE')
> + if pm:
> + # look for '-j' and throw other options (e.g. '-l') away
> + # because they might have different meaning in bjam
> + pm = pm.split()
> + while pm:
> + v = None
> + opt = pm.pop(0)
> + if opt == '-j':
> + v = pm.pop(0)
> + elif opt.startswith('-j'):
> + v = opt[2:].strip()
> + else:
> + v = None
>
The "else:" block isn't needed ? The first line already set v to None.
True. This is a straight copy from waf.bbclass, but we can optimize. I'm
planning on proposing a or.utils.get_parallel_make(), because this code is
copied (with minor variants) several places.
// Robert
+
> + if v:
> + v = min(64, int(v))
> + return '-j' + str(v)
> +
> + return ""
> +
> # Three methods for waf cross compile:
> # 1. answers:
> # Only --cross-answers - try the cross-answers file, and if
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [meta-networking][PATCH v2] waf-samba.bbclass: No longer inherit waf.bbclass
2018-02-11 21:51 [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass Joshua Watt
2018-02-12 2:30 ` Robert Yang
@ 2018-02-12 16:20 ` Joshua Watt
2018-02-14 16:28 ` Kyle Russell
1 sibling, 1 reply; 5+ messages in thread
From: Joshua Watt @ 2018-02-12 16:20 UTC (permalink / raw)
To: openembedded-devel; +Cc: Stefan Agner
waf-samba.bbclass uses waf in a very different way than the "standard"
method that waf.bbclass targets and ends getting very little useful
functionality from that class.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta-networking/classes/waf-samba.bbclass | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/meta-networking/classes/waf-samba.bbclass b/meta-networking/classes/waf-samba.bbclass
index e490176241..0ce51610f3 100644
--- a/meta-networking/classes/waf-samba.bbclass
+++ b/meta-networking/classes/waf-samba.bbclass
@@ -1,7 +1,7 @@
# waf is a build system which is used by samba related project.
# Obtain details from https://wiki.samba.org/index.php/Waf
-#
-inherit qemu pythonnative waf
+#
+inherit qemu pythonnative
DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native python"
@@ -21,6 +21,29 @@ CONFIGUREOPTS = " --prefix=${prefix} \
${PACKAGECONFIG_CONFARGS} \
"
+# avoids build breaks when using no-static-libs.inc
+DISABLE_STATIC = ""
+
+def get_waf_parallel_make(d):
+ pm = d.getVar('PARALLEL_MAKE')
+ if pm:
+ # look for '-j' and throw other options (e.g. '-l') away
+ # because they might have different meaning in bjam
+ pm = pm.split()
+ while pm:
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ continue
+
+ v = min(64, int(v))
+ return '-j' + str(v)
+
+ return ""
+
# Three methods for waf cross compile:
# 1. answers:
# Only --cross-answers - try the cross-answers file, and if
@@ -86,6 +109,7 @@ do_configure() {
fi
}
+do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
do_compile () {
python ./buildtools/bin/waf ${@get_waf_parallel_make(d)}
}
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [meta-networking][PATCH v2] waf-samba.bbclass: No longer inherit waf.bbclass
2018-02-12 16:20 ` [meta-networking][PATCH v2] " Joshua Watt
@ 2018-02-14 16:28 ` Kyle Russell
0 siblings, 0 replies; 5+ messages in thread
From: Kyle Russell @ 2018-02-14 16:28 UTC (permalink / raw)
To: Joshua Watt; +Cc: openembedded-devel, Stefan Agner
This works for me.
On Mon, Feb 12, 2018 at 11:20 AM, Joshua Watt <jpewhacker@gmail.com> wrote:
> waf-samba.bbclass uses waf in a very different way than the "standard"
> method that waf.bbclass targets and ends getting very little useful
> functionality from that class.
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta-networking/classes/waf-samba.bbclass | 28
> ++++++++++++++++++++++++++--
> 1 file changed, 26 insertions(+), 2 deletions(-)
>
> diff --git a/meta-networking/classes/waf-samba.bbclass
> b/meta-networking/classes/waf-samba.bbclass
> index e490176241..0ce51610f3 100644
> --- a/meta-networking/classes/waf-samba.bbclass
> +++ b/meta-networking/classes/waf-samba.bbclass
> @@ -1,7 +1,7 @@
> # waf is a build system which is used by samba related project.
> # Obtain details from https://wiki.samba.org/index.php/Waf
> -#
> -inherit qemu pythonnative waf
> +#
> +inherit qemu pythonnative
>
> DEPENDS += "qemu-native libxslt-native docbook-xsl-stylesheets-native
> python"
>
> @@ -21,6 +21,29 @@ CONFIGUREOPTS = " --prefix=${prefix} \
> ${PACKAGECONFIG_CONFARGS} \
> "
>
> +# avoids build breaks when using no-static-libs.inc
> +DISABLE_STATIC = ""
> +
> +def get_waf_parallel_make(d):
> + pm = d.getVar('PARALLEL_MAKE')
> + if pm:
> + # look for '-j' and throw other options (e.g. '-l') away
> + # because they might have different meaning in bjam
> + pm = pm.split()
> + while pm:
> + opt = pm.pop(0)
> + if opt == '-j':
> + v = pm.pop(0)
> + elif opt.startswith('-j'):
> + v = opt[2:].strip()
> + else:
> + continue
> +
> + v = min(64, int(v))
> + return '-j' + str(v)
> +
> + return ""
> +
> # Three methods for waf cross compile:
> # 1. answers:
> # Only --cross-answers - try the cross-answers file, and if
> @@ -86,6 +109,7 @@ do_configure() {
> fi
> }
>
> +do_compile[progress] = "outof:^\[\s*(\d+)/\s*(\d+)\]\s+"
> do_compile () {
> python ./buildtools/bin/waf ${@get_waf_parallel_make(d)}
> }
> --
> 2.14.3
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-14 16:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11 21:51 [meta-networking][PATCH] waf-samba.bbclass: No longer inherit waf.bbclass Joshua Watt
2018-02-12 2:30 ` Robert Yang
2018-02-12 3:53 ` Joshua Watt
2018-02-12 16:20 ` [meta-networking][PATCH v2] " Joshua Watt
2018-02-14 16:28 ` Kyle Russell
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.