Patchwork [05/11] pkg-utils.mk: fix/clean indentation

login
register
mail settings
Submitter Samuel Martin
Date July 22, 2012, 1:28 p.m.
Message ID <1342963719-1810-6-git-send-email-s.martin49@gmail.com>
Download mbox | patch
Permalink /patch/172511/
State Accepted
Headers show

Comments

Samuel Martin - July 22, 2012, 1:28 p.m.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Thomas Petazzoni - July 22, 2012, 6:22 p.m.
Le Sun, 22 Jul 2012 15:28:33 +0200,
Samuel Martin <s.martin49@gmail.com> a écrit :

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Applied, thanks.

Thomas

Patch

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