From e95c5bc7f1573ceb8888a90cc6632ceb83a5c0bd Mon Sep 17 00:00:00 2001 From: Liu Linhui Date: Sat, 22 Oct 2022 15:12:52 +0800 Subject: [PATCH] tools: sync with upstream remove mm-macros because it's not needed Signed-off-by: Liu Linhui --- tools/Makefile | 57 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 0890ec996..30614af9b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -22,49 +22,49 @@ ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmwar endif tools-y += autoconf autoconf-archive automake bc bison cmake cpio dosfstools -tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt +tools-y += e2fsprogs expat fakeroot findutils firmware-utils flex gengetopt tools-y += libressl libtool lzma m4 make-ext4fs meson missing-macros mkimage tools-y += mklibs mtd-utils mtools ninja padjffs2 patch-image tools-y += patchelf pkgconf quilt squashfskit4 sstrip ucl upx zip zlib zstd -tools-$(BUILD_B43_TOOLS) += b43-tools -tools-$(BUILD_ISL) += isl -tools-$(BUILD_TOOLCHAIN) += expat gmp mpc mpfr -tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs -tools-$(CONFIG_TARGET_ath79) += lzma-old squashfs -tools-$(CONFIG_TARGET_mxs) += elftosb sdimage -tools-$(CONFIG_TARGET_realtek) += 7z -tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs -tools-$(CONFIG_USES_MINOR) += kernel2minor -tools-$(CONFIG_USE_SPARSE) += sparse -tools-$(CONFIG_USE_LLVM_BUILD) += llvm-bpf +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_B43_TOOLS),y) += b43-tools +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_ISL),y) += isl +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_TOOLCHAIN),y) += gmp mpc mpfr +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini),y) += genext2fs +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_ath79),y) += lzma-old squashfs +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_mxs),y) += elftosb sdimage +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_realtek),y) += 7z +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_tegra),y) += cbootimage cbootimage-configs +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USES_MINOR),y) += kernel2minor +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_SPARSE),y) += sparse +tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_LLVM_BUILD),y) += llvm-bpf # builddir dependencies $(curdir)/autoconf/compile := $(curdir)/m4/compile -$(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkgconf/compile $(curdir)/xz/compile +$(curdir)/automake/compile := $(curdir)/autoconf/compile $(curdir)/pkgconf/compile $(curdir)/xz/compile $(curdir)/b43-tools/compile := $(curdir)/bison/compile $(curdir)/bc/compile := $(curdir)/bison/compile $(curdir)/libtool/compile $(curdir)/upx/compile := $(curdir)/ucl/compile $(curdir)/bison/compile := $(curdir)/flex/compile $(curdir)/cbootimage/compile += $(curdir)/automake/compile -$(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile -$(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile +$(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile $(curdir)/expat/compile $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/zstd/compile +$(curdir)/dosfstools/compile := $(curdir)/automake/compile $(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile $(curdir)/fakeroot/compile := $(curdir)/libtool/compile $(curdir)/findutils/compile := $(curdir)/bison/compile -$(curdir)/firmware-utils/compile += $(curdir)/cmake/compile $(curdir)/zlib/compile +$(curdir)/firmware-utils/compile += $(curdir)/cmake/compile $(curdir)/flex/compile := $(curdir)/libtool/compile $(curdir)/genext2fs/compile := $(curdir)/libtool/compile $(curdir)/gengetopt/compile := $(curdir)/libtool/compile $(curdir)/gmp/compile := $(curdir)/libtool/compile $(curdir)/isl/compile := $(curdir)/gmp/compile $(curdir)/libressl/compile := $(curdir)/pkgconf/compile -$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile +$(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile $(curdir)/lzma-old/compile := $(curdir)/zlib/compile $(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile -$(curdir)/meson/compile := $(curdir)/ninja/compile $(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile +$(curdir)/meson/compile := $(curdir)/ninja/compile $(curdir)/missing-macros/compile := $(curdir)/autoconf/compile -$(curdir)/mkimage/compile += $(curdir)/libressl/compile +$(curdir)/mkimage/compile += $(curdir)/bison/compile $(curdir)/libressl/compile $(curdir)/mklibs/compile := $(curdir)/libtool/compile $(curdir)/mpc/compile := $(curdir)/mpfr/compile $(curdir)/gmp/compile $(curdir)/mpfr/compile := $(curdir)/gmp/compile @@ -76,8 +76,7 @@ $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compil $(curdir)/sdcc/compile := $(curdir)/bison/compile $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile $(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile -$(curdir)/zlib/compile := $(curdir)/cmake/compile -$(curdir)/zstd/compile := $(curdir)/cmake/compile +$(curdir)/zstd/compile := $(curdir)/meson/compile ifneq ($(HOST_OS),Linux) $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile @@ -88,14 +87,14 @@ ifeq ($(HOST_OS),Darwin) else $(curdir)/dwarves/compile += $(curdir)/elfutils/compile $(curdir)/elfutils/compile := $(curdir)/m4/compile $(curdir)/zlib/compile - tools-$(CONFIG_DWARVES) += dwarves + tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_DWARVES),y) += dwarves tools-y += elfutils endif ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),) -$(foreach tool, $(filter-out xz zstd pkgconf patch ninja meson libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile)) +$(foreach tool, $(filter-out zstd zlib xz pkgconf patch ninja meson libressl expat cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile)) tools-y += ccache -$(curdir)/ccache/compile := $(curdir)/zstd/compile +$(curdir)/ccache/compile := $(curdir)/cmake/compile endif # in case there is no patch tool on the host we need to make patch tool a @@ -136,6 +135,9 @@ define PrepareStaging ); done endef +$(BIN_DIR): + mkdir -p $@ + # preparatory work $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build $(call PrepareStaging,$(STAGING_DIR)) @@ -156,16 +158,15 @@ endif endif -$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared -$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared +$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $(BIN_DIR) +$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $(BIN_DIR) # prerequisites for the individual targets $(curdir)/ := .config prereq $(curdir)/install: $(curdir)/compile -tools_config = CONFIG_SDK_LLVM_BPF -tools_enabled = $(foreach tool,$(sort $(tools-y) $(tools-)),$(if $(filter $(tool),$(tools-y)),y,n))$(foreach c,$(tools_config),$(if $($(c)),y,n)) +tools_enabled = $(foreach tool,$(sort $(tools-y) $(tools-)),$(if $(filter $(tool),$(tools-y)),y,n)) $(eval $(call stampfile,$(curdir),tools,compile,,_$(subst $(space),,$(tools_enabled)),$(STAGING_DIR_HOST))) $(eval $(call stampfile,$(curdir),tools,check,$(TMP_DIR)/.build,,$(STAGING_DIR_HOST))) $(eval $(call subdir,$(curdir)))