Skip to content

Commit

Permalink
rules.mk: sync with OpenWrt, 2021.07
Browse files Browse the repository at this point in the history
  • Loading branch information
The-BB committed Jul 8, 2021
1 parent f3ec21e commit 65f0773
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions rules.mk
Expand Up @@ -27,7 +27,7 @@ empty:=
space:= $(empty) $(empty)
comma:=,
merge=$(subst $(space),,$(1))
confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(STAGING_DIR_HOST)/bin/mkhash md5)
confvar=$(shell echo '$(foreach v,$(1),$(v)=$(subst ','\'',$($(v))))' | $(MKHASH) md5)
strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))

paren_left = (
Expand Down Expand Up @@ -323,6 +323,9 @@ TARGET_CXX:=$(TARGET_CROSS)g++
KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
ESED:=$(STAGING_DIR_HOST)/bin/sed -E -i -e
MKHASH:=$(STAGING_DIR_HOST)/bin/mkhash
# MKHASH is used in /scripts, so we export it here.
export MKHASH
CP:=cp -fpR
LN:=ln -sf
XARGS:=xargs -r
Expand Down Expand Up @@ -396,6 +399,12 @@ else
$(SCRIPT_DIR)/rstrip.sh
endif

NINJA = \
MAKEFLAGS="$(MAKE_JOBSERVER)" \
$(STAGING_DIR_HOST)/bin/ninja \
$(if $(findstring c,$(OPENWRT_VERBOSE)),-v) \
$(if $(MAKE_JOBSERVER),,-j1)

ifeq ($(CONFIG_IPV6),y)
DISABLE_IPV6:=
else
Expand Down Expand Up @@ -456,7 +465,7 @@ endef
# $(2) => If set, recurse into subdirectories
define sha256sums
(cd $(1); find . $(if $(2),,-maxdepth 1) -type f -not -name 'sha256sums' -printf "%P\n" | sort | \
xargs -r $(STAGING_DIR_HOST)/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
xargs -r $(MKHASH) -n sha256 | sed -ne 's!^\(.*\) \(.*\)$$!\1 *\2!p' > sha256sums)
endef

# file extension
Expand Down

0 comments on commit 65f0773

Please sign in to comment.