From patchwork Fri Oct 18 09:34:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 284487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 297052C0097 for ; Fri, 18 Oct 2013 20:34:37 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 053C893ADA; Fri, 18 Oct 2013 09:34:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q-3t0RSq23td; Fri, 18 Oct 2013 09:34:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 745F893B9B; Fri, 18 Oct 2013 09:34:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0BF631BFA82 for ; Fri, 18 Oct 2013 09:34:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 070AE84218 for ; Fri, 18 Oct 2013 09:34:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mGhhyc8JCbli for ; Fri, 18 Oct 2013 09:34:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7758E89873 for ; Fri, 18 Oct 2013 09:34:30 +0000 (UTC) Received: by mail-pd0-f176.google.com with SMTP id g10so3453479pdj.21 for ; Fri, 18 Oct 2013 02:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=In11zGLiY7z9L6nNkHq6YE5bp8jS4zS7dKLQsXYkUYM=; b=FcMvlF+oT0z0zaxKfVfp1LQ87nXkP1+js1nhwkjPEDp70agCTVaOAE08DZRom+T9NE Cg14nXI8axBNSm5Uw/jQhvjThtxzj6pe+F2XEc+EGOCMQ2zaMHPX8I32JYmr5+bgBoe2 /PUMEG54OM1HLfsAyzLA/sVsrFIwUS6fwnUecDdMJmXPyvVs0Ud7fynO7N+fAGSkYQV8 S7wKA+swSxbxBwSBE9OCP17acr47XXvn0L6u21esyjGEmTlJWlYIcVUjXWEzXgPXOuTY X5g/hNirN0tFyZoGFu0YU4kFQ1zKKnWlElZR8bF8lTGkhuhxqlhuwnTQFQNLYRW8nDAN u5uw== X-Received: by 10.68.203.34 with SMTP id kn2mr2153484pbc.82.1382088869132; Fri, 18 Oct 2013 02:34:29 -0700 (PDT) Received: from ld2077.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPSA id ve9sm1172498pbc.19.2013.10.18.02.34.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Oct 2013 02:34:28 -0700 (PDT) From: Fabio Porcedda To: buildroot@uclibc.org Date: Fri, 18 Oct 2013 11:34:15 +0200 Message-Id: <1382088860-30524-4-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1382088860-30524-1-git-send-email-fabio.porcedda@gmail.com> References: <1382088860-30524-1-git-send-email-fabio.porcedda@gmail.com> Subject: [Buildroot] [PATCH v8 RESEND 3/8] package: add support for top-level parallel make X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net To be able to use top-level parallel make we must not depend in a rule on the order of evaluation of the prerequisites, so instead of relyng on the left to right ordering of evaluation of the prerequisites add an explicit rule to describe the dependencies. So add explicit dependencies for the following stamp files: %/.stamp_extracted %/.stamp_patched %/.stamp_configured %/.stamp_built %/.stamp_host_installed %/.stamp_staging_installed %/.stamp_images_installed %/.stamp_target_installed Because the %-build target is not anymore part of the dependency chain, add a new variable _BUILD_DEPENDENCIES to be used instead. This new variable is used only by uclibc and glibc packages. Signed-off-by: Fabio Porcedda --- package/glibc/glibc.mk | 2 +- package/pkg-generic.mk | 38 +++++++++++++++++++++----------------- package/uclibc/uclibc.mk | 2 +- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 68b98a9..e89c12a 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -27,7 +27,7 @@ GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk # Before (e)glibc is built, we must have the second stage cross-compiler -glibc-build: host-gcc-intermediate +GLIBC_BUILD_DEPENDENCIES = host-gcc-intermediate GLIBC_SUBDIR = build diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 3f19aea..094868c 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -317,6 +317,7 @@ $(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\ ifeq ($$($(2)_TYPE)-$$($(2)_ADD_TOOLCHAIN_DEPENDENCY),target-YES) $(2)_DEPENDENCIES += toolchain endif +$(2)_BUILD_DEPENDENCIES ?= $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO @@ -368,30 +369,34 @@ $(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images endif ifeq ($$($(2)_INSTALL_TARGET),YES) -$(1)-install-target: $(1)-build \ - $$($(2)_TARGET_INSTALL_TARGET) +$(1)-install-target: $$($(2)_TARGET_INSTALL_TARGET) else $(1)-install-target: endif ifeq ($$($(2)_INSTALL_STAGING),YES) -$(1)-install-staging: $(1)-build \ - $$($(2)_TARGET_INSTALL_STAGING) +$(1)-install-staging: $$($(2)_TARGET_INSTALL_STAGING) else $(1)-install-staging: endif ifeq ($$($(2)_INSTALL_IMAGES),YES) -$(1)-install-images: $(1)-build \ - $$($(2)_TARGET_INSTALL_IMAGES) +$(1)-install-images: $$($(2)_TARGET_INSTALL_IMAGES) else $(1)-install-images: endif -$(1)-install-host: $(1)-build $$($(2)_TARGET_INSTALL_HOST) +$(1)-install-host: $$($(2)_TARGET_INSTALL_HOST) -$(1)-build: $(1)-configure \ - $$($(2)_TARGET_BUILD) +$$($(2)_TARGET_INSTALL_TARGET) $$($(2)_TARGET_INSTALL_STAGING) \ +$$($(2)_TARGET_INSTALL_IMAGES) $$($(2)_TARGET_INSTALL_HOST): \ + $$($(2)_TARGET_BUILD) + +$(1)-build: $$($(2)_TARGET_BUILD) +$$($(2)_TARGET_BUILD): $$($(2)_TARGET_CONFIGURE) | $$($(2)_BUILD_DEPENDENCIES) + +$(1)-configure: $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): | $$($(2)_DEPENDENCIES) $$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dependencies dirs prepare @@ -402,13 +407,13 @@ ifeq ($$($(2)_OVERRIDE_SRCDIR),) # extract # patch # configure -$(1)-configure: $(1)-patch $(1)-depends \ - $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): $$($(2)_TARGET_PATCH) -$(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH) +$(1)-patch: $$($(2)_TARGET_PATCH) +$$($(2)_TARGET_PATCH): $$($(2)_TARGET_EXTRACT) -$(1)-extract: $(1)-source \ - $$($(2)_TARGET_EXTRACT) +$(1)-extract: $$($(2)_TARGET_EXTRACT) +$$($(2)_TARGET_EXTRACT): $$($(2)_TARGET_SOURCE) $(1)-depends: $$($(2)_DEPENDENCIES) @@ -418,10 +423,9 @@ else # source, by rsyncing # depends # configure -$(1)-configure: $(1)-depends \ - $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): $$($(2)_TARGET_RSYNC) -$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-depends: $$($(2)_DEPENDENCIES) $(1)-patch: $(1)-rsync $(1)-extract: $(1)-rsync diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index 0d12afd..dea36e7 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -26,7 +26,7 @@ UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers # Before uClibc is built, we must have the second stage cross-compiler -uclibc-build: host-gcc-intermediate +UCLIBC_BUILD_DEPENDENCIES = host-gcc-intermediate # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config # setting.