Patchwork icecc: Don't replace non-empty PARALLEL_MAKE with empty ICECC_PARALLEL_MAKE

login
register
mail settings
Submitter Martin Jansa
Date Nov. 27, 2013, 6:46 p.m.
Message ID <1385577975-3742-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/62517/
State Accepted
Commit a7b97cbccceced9e38adf133bd4d80749213dbfc
Headers show

Comments

Martin Jansa - Nov. 27, 2013, 6:46 p.m.
* it's needed for use-case like this:
  # Inherit icecc here, so that all builders have the same sstate signatures
  INHERIT_DISTRO += "icecc"
  # and then disable its function by default (so that people still need to explicity
  # enable it in local.conf if they have configured icecc and want to use it.
  # You need to set _empty_ value in local.conf to enable icecc function:
  # ICECC_DISABLED = ""
  ICECC_DISABLED ??= "1"
* so default ICECC_PARALLEL_MAKE is still empty, but we want build
  to respect our PARALLEL_MAKE, unfortunately we cannot do something
  like ICECC_PARALLEL_MAKE ??= "${PARALLEL_MAKE}", because that would
  cause PARALLEL_MAKE to reference itself.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index ef8761a..60263a8 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -146,7 +146,7 @@  def icc_version(bb, d):
         return ""
 
     parallel = d.getVar('ICECC_PARALLEL_MAKE') or ""
-    if not d.getVar('PARALLEL_MAKE') == "":
+    if not d.getVar('PARALLEL_MAKE') == "" and parallel:
         d.setVar("PARALLEL_MAKE", parallel)
 
     if icc_is_native(bb, d):