From patchwork Tue Oct 1 12:55:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 279476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 365A72C008A for ; Tue, 1 Oct 2013 23:56:12 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C448F8B66A; Tue, 1 Oct 2013 13:56:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NEYtDjGU5UbN; Tue, 1 Oct 2013 13:56:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id EB2C48B1C1; Tue, 1 Oct 2013 13:56:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3BD6F1BFA6D for ; Tue, 1 Oct 2013 13:56:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 45AE332944 for ; Tue, 1 Oct 2013 13:55:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uXEY7NhQRo1q for ; Tue, 1 Oct 2013 13:55:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by silver.osuosl.org (Postfix) with ESMTPS id 867423212C for ; Tue, 1 Oct 2013 13:55:52 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id hz1so7488333pad.2 for ; Tue, 01 Oct 2013 06:55: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=WgBh9ON6QoozEctyCQl+4S1DLSaSYrgINNY1E2FbcpCeceT/idP1gtEAOjQhrTBAYU 5/3/lgYTMtsrAZcjo++/PbSePw/pC9D+TwCVoemD9FcYDVlbSXLG7H8bIYfL9LtgyTBE WdQQpRYiBtVtUBzAWjJ+wDnBavHT/nf6qiYhyeVXJSy0IGIJoi4QAJfZRNDsMkMQnRuv FUHr5eclKhgcqMhnyRYT+5bxWtsbP0vPN1cig+ZmIWP0ZCroqFIvqkSojQG0KV0y0fqt +iPSZtoSCorvB2A3TR9G35+ynlR0wbBLSQ52fHg7VDYpdsYr9CKWkqGt8WXil2qQmsZS pddg== X-Received: by 10.68.40.169 with SMTP id y9mr1444740pbk.193.1380632117391; Tue, 01 Oct 2013 05:55:17 -0700 (PDT) Received: from ld2036.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPSA id b3sm6745804pbh.7.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Oct 2013 05:55:16 -0700 (PDT) From: Fabio Porcedda To: buildroot@uclibc.org Date: Tue, 1 Oct 2013 14:55:01 +0200 Message-Id: <1380632104-10421-3-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1380632104-10421-1-git-send-email-fabio.porcedda@gmail.com> References: <1380632104-10421-1-git-send-email-fabio.porcedda@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH v6 2/5] 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.