From patchwork Mon Nov 11 11:53:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 290254 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 922A12C00D1 for ; Mon, 11 Nov 2013 22:54:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4D89232F23; Mon, 11 Nov 2013 11:54:27 +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 d66lK-IHmbz1; Mon, 11 Nov 2013 11:54:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id CC34F32F51; Mon, 11 Nov 2013 11:54:10 +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 00DE81C160F for ; Mon, 11 Nov 2013 11:54:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F0B658B9D6 for ; Mon, 11 Nov 2013 11:54:07 +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 Ltpc4fc256WJ for ; Mon, 11 Nov 2013 11:54:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by whitealder.osuosl.org (Postfix) with ESMTPS id DF1718B26D for ; Mon, 11 Nov 2013 11:54:06 +0000 (UTC) Received: by mail-ee0-f48.google.com with SMTP id d49so2389052eek.35 for ; Mon, 11 Nov 2013 03:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:user-agent:date:from:to:cc; bh=8B0SJGec7WaC2wfE/ykoG6nrPUn8dn035dD+MXlhT6I=; b=CuAe6xjWCEWKAYriiLBqh7r5ATivg2A3jOJhXm42CgIRtbU9nFL7A3dDDgHP8LOkbl z+Mc0nVf/ablsuuGktAsamfhVLYoO7TbVWgq5mYu6xILXGrwTl706lG8aUt3txt3YndZ +8e75+cFCBfBZGyAJJI8i27F9B7IgR+G3AWcGx7pUIKBePqykdUPr5t7PfWMj7kHXnnX F4G6BNPme0C8/gUG3s55KtqxVaemz6K2MrPUAUgmMzwp4K2FdBjlQFQhLRWP6tmt9zYq mrjTFdasUKHJoFzmrk8lEUGllL3zdzwGQy2t5MxqA0nEjpkUjnJIjBjGXbVY6HJnkWO+ lvEg== X-Received: by 10.14.9.67 with SMTP id 43mr2065892ees.72.1384170845477; Mon, 11 Nov 2013 03:54:05 -0800 (PST) Received: from [127.0.1.1] (d54C62EEB.access.telenet.be. [84.198.46.235]) by mx.google.com with ESMTPSA id z1sm61834175eeo.14.2013.11.11.03.54.04 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Nov 2013 03:54:04 -0800 (PST) MIME-Version: 1.0 X-Mercurial-Node: 8953db252a5816d2e988342a88e84a593cde3e0a Message-Id: <8953db252a5816d2e988.1384170792@argentina> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.2.2 Date: Mon, 11 Nov 2013 12:53:12 +0100 From: Thomas De Schampheleire To: buildroot@busybox.net Subject: [Buildroot] [PATCH 2 of 2] infra: remove usage of pkgparentdir in favor of pkgdir 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net As Arnout suggested, pkgparentdir is no longer really needed. Its usage can be replaced with pkgdir. This patch makes that change, and removes the definition of pkgparentdir. Signed-off-by: Thomas De Schampheleire --- Note: as a consequence of this change, the definition of FOO_DIR_PREFIX slightly changed. I could have renamed the variable, but FOO_DIR was already taken, and it's still more or less a prefix. package/pkg-autotools.mk | 6 +++--- package/pkg-cmake.mk | 6 +++--- package/pkg-generic.mk | 10 +++++----- package/pkg-utils.mk | 1 - 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -48,7 +48,7 @@ endef # for host packages # argument 3 is the uppercase package name, without the HOST_ prefix # for host packages -# argument 4 is the package directory prefix +# argument 4 is the package directory # argument 5 is the type (target or host) ################################################################################ @@ -311,5 +311,5 @@ endef # autotools-package -- the target generator macro for autotools packages ################################################################################ -autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target) -host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host) +autotools-package = $(call inner-autotools-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target) +host-autotools-package = $(call inner-autotools-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host) diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk --- a/package/pkg-cmake.mk +++ b/package/pkg-cmake.mk @@ -31,7 +31,7 @@ # for host packages # argument 3 is the uppercase package name, without the HOST_ prefix # for host packages -# argument 4 is the package directory prefix +# argument 4 is the package directory # argument 5 is the type (target or host) ################################################################################ @@ -179,8 +179,8 @@ endef # cmake-package -- the target generator macro for CMake packages ################################################################################ -cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target) -host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host) +cmake-package = $(call inner-cmake-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target) +host-cmake-package = $(call inner-cmake-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host) ################################################################################ # Generation of the CMake toolchain file diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -89,7 +89,7 @@ endif # find the package directory (typically package/) and the # prefix of the patches $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) -$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) $(BUILD_DIR)/%/.stamp_patched: @$(call MESSAGE,"Patching") $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) @@ -197,7 +197,7 @@ endif # for host packages # argument 3 is the uppercase package name, without the HOST_ prefix # for host packages -# argument 4 is the package directory prefix +# argument 4 is the package directory # argument 5 is the type (target or host) ################################################################################ @@ -475,7 +475,7 @@ endif # kernel case, the bootloaders case, and the normal packages case. ifeq ($(1),linux) $(2)_KCONFIG_VAR = BR2_LINUX_KERNEL -else ifeq ($(4),boot/) +else ifneq ($(filter boot/%,$(4)),) $(2)_KCONFIG_VAR = BR2_TARGET_$(2) else $(2)_KCONFIG_VAR = BR2_PACKAGE_$(2) @@ -565,8 +565,8 @@ endef # inner-generic-package ################################################################################ # In the case of target packages, keep the package name "pkg" -generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),target) +generic-package = $(call inner-generic-package,$(call pkgname),$(call UPPERCASE,$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),target) # In the case of host packages, turn the package name "pkg" into "host-pkg" -host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgparentdir),host) +host-generic-package = $(call inner-generic-package,host-$(call pkgname),$(call UPPERCASE,host-$(call pkgname)),$(call UPPERCASE,$(call pkgname)),$(call pkgdir),host) # :mode=makefile: diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -60,7 +60,6 @@ endef # package, for which the package directory is an empty string. pkgdir = $(dir $(lastword $(MAKEFILE_LIST))) pkgname = $(lastword $(subst /, ,$(call pkgdir))) -pkgparentdir = $(patsubst %$(call pkgname)/,%,$(call pkgdir)) # Define extractors for different archive suffixes INFLATE.bz2 = $(BZCAT)