From patchwork Wed Sep 25 08:05:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 277740 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 19B4C2C00A2 for ; Wed, 25 Sep 2013 18:06:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 39D028AB83; Wed, 25 Sep 2013 08:06:02 +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 jAvNSJ2I-5KA; Wed, 25 Sep 2013 08:05:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 18A948AC32; Wed, 25 Sep 2013 08:05:59 +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 651D71BF82F for ; Wed, 25 Sep 2013 08:05:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5BAB68AB37 for ; Wed, 25 Sep 2013 08:05:56 +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 bCYKDOmIsXTI for ; Wed, 25 Sep 2013 08:05:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by whitealder.osuosl.org (Postfix) with ESMTPS id 086C48A8BE for ; Wed, 25 Sep 2013 08:05:53 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id z10so5752915pdj.3 for ; Wed, 25 Sep 2013 01:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kZNGTqC1Xx0h3HYAEeDfrvmuwRgquhb8eknvWTiFq6A=; b=RyBr2zTGa7+O7RDJ/cqtNzjoNCjwibVL6sL8d9usieVnrktz4jK3o03nQS+w0akrlK flhuSNANDCJmqjTY7oEAXHexU72ZP8LMw1RfSjuqOt3I1sulsDu7RB8yRn6WiH6IfL6t nQnXHLbonfHow+OpSJ9Ge2AsZEIqKMCulhGNxmwrYVaNtouizTu/Hfoe5q0GZ0Adzvmj 8YvVdsQ34KsXeIaEN27RBjBcQnLT60eI0/ftikUfBvdNnkBsCviMUDXzsuq3nQQ2TDIw vCWDvl+JYzjI41/01LNiZQzw6YAmBDPnxqv2RPI0CylKABx/jBm99I2rmJXNsoPVQAM0 FsMg== X-Received: by 10.68.252.33 with SMTP id zp1mr32026847pbc.95.1380096352767; Wed, 25 Sep 2013 01:05:52 -0700 (PDT) Received: from ld2036.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPSA id gg10sm45817957pbc.46.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 25 Sep 2013 01:05:52 -0700 (PDT) From: Fabio Porcedda To: buildroot@uclibc.org Date: Wed, 25 Sep 2013 10:05:37 +0200 Message-Id: <1380096339-4686-3-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1380096339-4686-1-git-send-email-fabio.porcedda@gmail.com> References: <1380096339-4686-1-git-send-email-fabio.porcedda@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH v5 2/4] pkg-generic: fix rules 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 the uclibc package for building the toolchain. Signed-off-by: Fabio Porcedda --- package/glibc/glibc.mk | 3 ++- package/pkg-generic.mk | 38 +++++++++++++++++++++----------------- package/uclibc/uclibc.mk | 3 ++- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk index 4dd2e63..57f15dc 100644 --- a/package/glibc/glibc.mk +++ b/package/glibc/glibc.mk @@ -30,7 +30,8 @@ endif # Before (e)glibc is built, we must have the second stage # cross-compiler, for some gcc versions -glibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate) +GLIBC_BUILD_DEPENDENCIES = \ + $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate) GLIBC_SUBDIR = build diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index d7efcd3..0de1f35 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -312,6 +312,7 @@ $(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\ ifeq ($$($(2)_TYPE),target) $(2)_DEPENDENCIES += toolchain endif +$(2)_BUILD_DEPENDENCIES ?= $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO @@ -363,30 +364,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) ifeq ($$($(2)_OVERRIDE_SRCDIR),) # In the normal case (no package override), the sequence of steps is @@ -395,13 +400,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) @@ -411,10 +416,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 3993d9b..f05b647 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -24,7 +24,8 @@ UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers # Before uClibc is built, we must have the second stage # cross-compiler, for some gcc versions, and when NPTL is used. -uclibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate) +UCLIBC_BUILD_DEPENDENCIES = \ + $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate) # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config # setting.