summaryrefslogtreecommitdiffstats
path: root/classes/openjdk-build-helper.bbclass
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2018-08-13 16:09:17 +0100
committerRichard Leitner <dev@g0hl1n.net>2018-08-13 22:52:44 +0200
commit3c710bf3a90fde0cf6d590ffefc349bfb9a1c677 (patch)
tree19ae03f9fe7ff972135093b859e0be909e40f4e9 /classes/openjdk-build-helper.bbclass
parentd359ad5ad46c77c183573ce601f03d868eb983bf (diff)
downloadmeta-java-3c710bf3a90fde0cf6d590ffefc349bfb9a1c677.tar.gz
java.bbclass: move openjdk/icedtea specific code into new class
The code moved is not relevant to anything using java, just for compiling java itself. It doesn't make sense to have here. Move it into openjdk-build-helper Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'classes/openjdk-build-helper.bbclass')
-rw-r--r--classes/openjdk-build-helper.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass
new file mode 100644
index 0000000..785ddf0
--- /dev/null
+++ b/classes/openjdk-build-helper.bbclass
@@ -0,0 +1,16 @@
1# Icedtea's makefile is not compatible to parallelization so we cannot allow
2# passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are
3# parallelizable and we need ${PARALLEL_MAKE} to derive the proper value.
4# The base for this quirk is that GNU Make only considers the last "-j" option.
5EXTRA_OEMAKE_remove_task-compile = "${PARALLEL_MAKE}"
6EXTRA_OEMAKE_remove_task-install = "${PARALLEL_MAKEINST}"
7
8# OpenJDK supports parallel compilation but uses a plain number for this.
9# In OE we have PARALLEL_MAKE which is the actual option passed to make,
10# e.g. "-j 4".
11def openjdk_build_helper_get_parallel_make(d):
12 pm = d.getVar('PARALLEL_MAKE', True);
13 if not pm or '-j' not in pm:
14 return 1
15
16 return pm.partition('-j')[2].strip().split(' ')[0]