From patchwork Sun Jul 22 13:28:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 172511 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 1409F2C022E for ; Sun, 22 Jul 2012 23:32:32 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9AA538F580; Sun, 22 Jul 2012 13:32:29 +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 uFTFfEAQv-WW; Sun, 22 Jul 2012 13:32:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CAA5A8F668; Sun, 22 Jul 2012 13:32:03 +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 453748F753 for ; Sun, 22 Jul 2012 13:30:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 20E278E866 for ; Sun, 22 Jul 2012 13:30:34 +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 kjo12s0UlCKm for ; Sun, 22 Jul 2012 13:30:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5FB0F8E85E for ; Sun, 22 Jul 2012 13:30:15 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id x43so7170005wey.16 for ; Sun, 22 Jul 2012 06:30:14 -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=uIBpOitISde23aUesApusnvA3VKu7l5anTfFVi5OJhc=; b=zSX/UPRdtfvp7UaHcY+AM0RJ3ecWMLn3SVgANVRLArnF+WttJq8rVzJ2rOlDyCAnKb h4oyDnDEerdMbECZGylWFRFglB8wNQrBgFv6AsaKOKXLJUYvQWtYN4oalDnpLCtvg7yN gERz0TxbQDJRkSq2ED+6TjiOellTqJtOLAZaC2o3hK/h5B8DPjRtrnRh8mhCOPNuTTIU lM0KPah0RGqPiEOzNWrSHKyCu/HNm9/zBS1yX96rQdsadR6Ig0q+0frut/bq5rusC2i2 /m3wZ+deNwti0r9GpI7JDXgQ0Ed87yGgPpx9jE5R3IfSYtc3IsWWxtGaVd7hxqitLSwW R5vA== Received: by 10.180.96.3 with SMTP id do3mr7399325wib.5.1342963814878; Sun, 22 Jul 2012 06:30:14 -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.13 (version=SSLv3 cipher=OTHER); Sun, 22 Jul 2012 06:30:13 -0700 (PDT) From: Samuel Martin To: buildroot@busybox.net Date: Sun, 22 Jul 2012 15:28:33 +0200 Message-Id: <1342963719-1810-6-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 05/11] pkg-utils.mk: fix/clean indentation 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-utils.mk b/package/pkg-utils.mk index 35abb17..293bf4f 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -17,11 +17,11 @@ [TO] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _ UPPERCASE = $(strip $(eval __tmp := $1) \ - $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \ - $(eval __tmp := \ + $(foreach c, $(join $(addsuffix :,$([FROM])),$([TO])), \ + $(eval __tmp := \ $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),\ - $(__tmp)))) \ - $(__tmp)) + $(__tmp)))) \ + $(__tmp)) # # Manipulation of .config files based on the Kconfig @@ -30,18 +30,18 @@ UPPERCASE = $(strip $(eval __tmp := $1) \ # define KCONFIG_ENABLE_OPT - $(SED) "/\\<$(1)\\>/d" $(2) - echo "$(1)=y" >> $(2) + $(SED) "/\\<$(1)\\>/d" $(2) + echo "$(1)=y" >> $(2) endef define KCONFIG_SET_OPT - $(SED) "/\\<$(1)\\>/d" $(3) - echo "$(1)=$(2)" >> $(3) + $(SED) "/\\<$(1)\\>/d" $(3) + echo "$(1)=$(2)" >> $(3) endef define KCONFIG_DISABLE_OPT - $(SED) "/\\<$(1)\\>/d" $(2) - echo "# $(1) is not set" >> $(2) + $(SED) "/\\<$(1)\\>/d" $(2) + echo "# $(1) is not set" >> $(2) endef # Helper functions to determine the name of a package and its @@ -50,17 +50,9 @@ endef # automagically find where the package is located. Note that the # pkgdir macro is carefully written to handle the case of the Linux # package, for which the package directory is an empty string. -define pkgdir -$(dir $(lastword $(MAKEFILE_LIST))) -endef - -define pkgname -$(lastword $(subst /, ,$(call pkgdir))) -endef - -define pkgparentdir -$(patsubst %$(call pkgname)/,%,$(call pkgdir)) -endef +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) @@ -72,15 +64,15 @@ INFLATE.xz = $(XZCAT) INFLATE.tar = cat # MESSAGE Macro -- display a message in bold type -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" -TERM_BOLD := $(shell tput smso) +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" +TERM_BOLD := $(shell tput smso) TERM_RESET := $(shell tput rmso) # Utility functions for 'find' # findfileclauses(filelist) => -name 'X' -o -name 'Y' findfileclauses = $(call notfirstword,$(patsubst %,-o -name '%',$(1))) # finddirclauses(base, dirlist) => -path 'base/dirX' -o -path 'base/dirY' -finddirclauses = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2))) +finddirclauses = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2))) # Miscellaneous utility functions # notfirstword(wordlist): returns all but the first word in wordlist