From patchwork Sun Jul 22 13:28:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 172509 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 B4C872C013E for ; Sun, 22 Jul 2012 23:31:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 74B488F48E; Sun, 22 Jul 2012 13:31:37 +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 ZIwdtCzh41vB; Sun, 22 Jul 2012 13:31:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 25DC88F4E2; Sun, 22 Jul 2012 13:31:31 +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 D1C6B8F753 for ; Sun, 22 Jul 2012 13:30:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BCBFC8E82A for ; Sun, 22 Jul 2012 13:30:32 +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 eY9m7kvlZKpj for ; Sun, 22 Jul 2012 13:30:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by whitealder.osuosl.org (Postfix) with ESMTPS id 201968E866 for ; Sun, 22 Jul 2012 13:30:18 +0000 (UTC) Received: by wgbfm10 with SMTP id fm10so4169247wgb.10 for ; Sun, 22 Jul 2012 06:30:16 -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:x-mailer:in-reply-to:references; bh=PwULO6aVAOKihYAO/xsjvWV3Q1x6nX05wPVFohRjezc=; b=veyZbUxjt1n7294CSsF4Uq3udYjt0B/0CB7v3jpXb/lX+ci6M7JrXiHoDVSvzZNTQ+ C951ohMxDGVNiM0yhdOOL+N3thqV6m07e/mszNWB178EemgZkGq1bb0ma71XIDhLY/N9 AxC3azBu3F6MQthYM98Rb8kQB94gwVx1JPwe2C8CsLkBWo6j9EfzzCXAA3sLyNr7iVd8 /eOqGiBo87cGViMEVLSd6nmSoqhQYq7/2261kq5VSkwFQ/ElhHGmWumth46yxpNbT4vn gYQf6in+iZIIEYNEnNvmCzogjaSB8xAhJRCfcsn41o37Fr5pnT+dDWQ8vheqpYFwQnqh T59w== Received: by 10.216.135.217 with SMTP id u67mr7348129wei.115.1342963816632; Sun, 22 Jul 2012 06:30:16 -0700 (PDT) Received: from localhost.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPS id fb20sm16263469wid.1.2012.07.22.06.30.14 (version=SSLv3 cipher=OTHER); Sun, 22 Jul 2012 06:30:15 -0700 (PDT) From: Samuel Martin To: buildroot@busybox.net Date: Sun, 22 Jul 2012 15:28:34 +0200 Message-Id: <1342963719-1810-7-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.7.11.2 In-Reply-To: <1342963719-1810-1-git-send-email-s.martin49@gmail.com> References: <1342963719-1810-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [PATCH 06/11] pkg-*targets.mk: factorize and fix $(PKG)_SRCDIR and $(PKG)_BUILDDIR declaration 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 Signed-off-by: Samuel Martin diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index e454050..785daab 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -54,15 +54,6 @@ endef define inner-autotools-package -# define package-specific variables to default values -ifndef $(2)_SUBDIR - ifdef $(3)_SUBDIR - $(2)_SUBDIR = $($(3)_SUBDIR) - else - $(2)_SUBDIR ?= - endif -endif - ifndef $(2)_LIBTOOL_PATCH ifdef $(3)_LIBTOOL_PATCH $(2)_LIBTOOL_PATCH = $($(3)_LIBTOOL_PATCH) @@ -91,7 +82,6 @@ $(2)_CLEAN_OPT ?= clean $(2)_UNINSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) uninstall $(2)_UNINSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) uninstall -$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) # # Configure step. Only define it if not already defined by the package diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk index f9a5934..626a0b0 100644 --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -37,15 +37,6 @@ define inner-cmake-package -# define package-specific variables to default values -ifndef $(2)_SUBDIR - ifdef $(3)_SUBDIR - $(2)_SUBDIR = $($(3)_SUBDIR) - else - $(2)_SUBDIR ?= - endif -endif - $(2)_CONF_ENV ?= $(2)_CONF_OPT ?= $(2)_MAKE ?= $(MAKE) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index c01440e..8a730c0 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -204,6 +204,17 @@ $(2)_BASE_NAME = $(1)-$$($(2)_VERSION) $(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME) $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME) +ifndef $(3)_SUBDIR + ifdef $(2)_SUBDIR + $(3)_SUBDIR = $$($(2)_SUBDIR) + else + $(3)_SUBDIR ?= + endif +endif + +$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) +$(2)_BUILDDIR ?= $$($(2)_SRCDIR) + ifneq ($$($(2)_OVERRIDE_SRCDIR),) $(2)_VERSION = custom endif