naiveproxy: fix ninja build

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2022-05-22 20:51:30 +08:00 committed by sbwml
parent 52175abb02
commit a1467a4169

View File

@ -16,21 +16,12 @@ PKG_LICENSE:=BSD 3-Clause
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org> PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_DEPENDS:=python3/host
ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),) ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),)
PKG_BUILD_DEPENDS+= ninja/host PKG_BUILD_DEPENDS+= ninja/host
endif endif
PKG_USE_MIPS16:=0 PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
ifeq ($(NINJA),)
NINJA = \
MAKEFLAGS="$(MAKE_JOBSERVER)" \
$(STAGING_DIR_HOSTPKG)/bin/ninja \
$(if $(findstring c,$(OPENWRT_VERBOSE)),-v) \
$(if $(MAKE_JOBSERVER),,-j1)
endif
ifneq ($(CONFIG_CPU_TYPE)," ") ifneq ($(CONFIG_CPU_TYPE)," ")
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE))) CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE))) CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE)))
@ -114,7 +105,7 @@ define Build/Compile
export naive_flags+=" $$$${naive_ccache_flags}" ; \ export naive_flags+=" $$$${naive_ccache_flags}" ; \
mkdir -p "out" ; \ mkdir -p "out" ; \
./gn/out/gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="$(PYTHON)" ; \ ./gn/out/gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="$(PYTHON)" ; \
$(NINJA) -C "$(PKG_BUILD_DIR)/src/out/Release" naive ; \ ninja -C "out/Release" naive ; \
) )
endef endef