aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/kernel.mk16
-rw-r--r--include/package-defaults.mk2
-rw-r--r--include/quilt.mk4
-rw-r--r--include/target.mk2
4 files changed, 14 insertions, 10 deletions
diff --git a/include/kernel.mk b/include/kernel.mk
index 39be10a577..5d5c9e9172 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -30,7 +30,7 @@ else
KERNEL_CROSS?=$(TARGET_CROSS)
endif
- PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+ PATCH_DIR ?= ./patches$(if $(wildcard ./patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
FILES_DIR ?= $(foreach dir,$(wildcard ./files ./files-$(KERNEL_PATCHVER)),"$(dir)")
KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
@@ -50,10 +50,10 @@ else
endif
ifneq (,$(findstring uml,$(BOARD)))
- LINUX_KARCH:=um
+ LINUX_KARCH=um
else
ifeq (,$(LINUX_KARCH))
- LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/x86/' \
+ LINUX_KARCH=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/x86/' \
-e 's/mipsel/mips/' \
-e 's/mipseb/mips/' \
-e 's/sh[234]/sh/' \
@@ -159,7 +159,11 @@ define AutoLoad
add_module $(1) "$(2)";
endef
-define CompareKernelPatchVer
- $(shell [ $$(echo $(1) | tr . 0) -$(2) $$(echo $(3) | tr . 0) ] && echo 1 || echo 0)
-endef
+ifdef DUMP
+ CompareKernelPatchVer=0
+else
+ define CompareKernelPatchVer
+ $(shell [ $$(echo $(1) | tr . 0) -$(2) $$(echo $(3) | tr . 0) ] && echo 1 || echo 0)
+ endef
+endif
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index f7f5bd0ef2..e375722af9 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -13,7 +13,7 @@ define Package/Default
PROVIDES:=
EXTRA_DEPENDS:=
MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
- SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
+ SOURCE:=$(patsubst $(TOPDIR)/%,%,$(CURDIR))
ifneq ($(PKG_VERSION),)
ifneq ($(PKG_RELEASE),)
VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
diff --git a/include/quilt.mk b/include/quilt.mk
index c5245a8aee..0d63e62fd2 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -56,7 +56,7 @@ $(call PatchDir/$(if $(strip $(QUILT)),Quilt,Default),$(strip $(1)),$(strip $(2)
endef
ifneq ($(PKG_BUILD_DIR),)
- QUILT?=$(strip $(shell test -f $(PKG_BUILD_DIR)/.quilt_used && echo y))
+ QUILT?=$(if $(wildcard $(PKG_BUILD_DIR)/.quilt_used),y)
ifneq ($(QUILT),)
STAMP_PATCHED:=$(PKG_BUILD_DIR)/.quilt_patched
STAMP_CHECKED:=$(PKG_BUILD_DIR)/.quilt_checked
@@ -67,7 +67,7 @@ ifneq ($(PKG_BUILD_DIR),)
endif
ifneq ($(HOST_BUILD_DIR),)
- HOST_QUILT?=$(strip $(shell test -f $(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(HOST_BUILD_DIR))/.quilt_used && echo y))
+ HOST_QUILT?=$(if $(wildcard $(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(HOST_BUILD_DIR))/.quilt_used),y)
ifneq ($(HOST_QUILT),)
HOST_STAMP_PATCHED:=$(HOST_BUILD_DIR)/.quilt_patched
HOST_STAMP_CHECKED:=$(HOST_BUILD_DIR)/.quilt_checked
diff --git a/include/target.mk b/include/target.mk
index d3c149aa18..ace3db0ffd 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -109,7 +109,7 @@ ifneq ($(TARGET_BUILD)$(if $(DUMP),,1),)
endif
GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic-$(KERNEL)
-GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(shell [ -d "$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard $(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
GENERIC_LINUX_CONFIG?=$(firstword $(wildcard $(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER) $(GENERIC_PLATFORM_DIR)/config-default))