CANONICAL_CURDIR = $(realpath $(CURDIR))
REQ_UMASK = 0022
+CUR_UMASK := $(shell umask)
# Make sure O= is passed (with its absolute canonical path) everywhere the
# toplevel makefile is called back.
EXTRAMAKEARGS := O=$(CANONICAL_O)
# Check Buildroot execution pre-requisites here.
-ifneq ($(shell umask):$(CURDIR):$(O),$(REQ_UMASK):$(CANONICAL_CURDIR):$(CANONICAL_O))
+ifneq ($(CUR_UMASK):$(CURDIR):$(O),$(REQ_UMASK):$(CANONICAL_CURDIR):$(CANONICAL_O))
.PHONY: _all $(MAKECMDGOALS)
$(MAKECMDGOALS): _all
_all:
@umask $(REQ_UMASK) && \
$(MAKE) -C $(CANONICAL_CURDIR) --no-print-directory \
+ BR_ORIG_UMASK=$(CUR_UMASK) \
$(MAKECMDGOALS) $(EXTRAMAKEARGS)
else # umask / $(CURDIR) / $(O)
.PHONY: all
# Set and export the version string
-export BR2_VERSION := 2023.08-git
+export BR2_VERSION := 2024.11-git
# Actual time the release is cut (for reproducible builds)
-BR2_VERSION_EPOCH = 1686172000
+BR2_VERSION_EPOCH = 1725627000
# Save running make version since it's clobbered by the make package
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings
LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
-CPE_UPDATES_DIR = $(BASE_DIR)/cpe-updates
-
BR2_CONFIG = $(CONFIG_DIR)/.config
# Pull in the user's configuration file
# When adding a new host gcc version in Config.in,
# update the HOSTCC_MAX_VERSION variable:
-HOSTCC_MAX_VERSION := 9
+HOSTCC_MAX_VERSION := 11
HOSTCC_VERSION := $(shell V=$$($(HOSTCC_NOCCACHE) --version | \
sed -n -r 's/^.* ([0-9]*)\.([0-9]*)\.([0-9]*)[ ]*.*/\1 \2/p'); \
BZCAT := $(call qstrip,$(BR2_BZCAT))
XZCAT := $(call qstrip,$(BR2_XZCAT))
LZCAT := $(call qstrip,$(BR2_LZCAT))
+ZSTDCAT := $(call qstrip,$(BR2_ZSTDCAT))
TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
prepare: $(BUILD_DIR)/buildroot-config/auto.conf
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT)), \
$(call MESSAGE,"Executing pre-build script $(s)"); \
- $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
+ $(EXTRA_ENV) $(s) \
+ $(TARGET_DIR) \
+ $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
+ $(call qstrip,$(BR2_ROOTFS_PRE_BUILD_SCRIPT_ARGS))$(sep))
.PHONY: world
world: target-post-image
.PHONY: prepare-sdk
prepare-sdk: world
- @$(call MESSAGE,"Rendering the SDK relocatable")
- PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath host
- PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath staging
+ @$(call MESSAGE,"Preparing the SDK")
$(INSTALL) -m 755 $(TOPDIR)/support/misc/relocate-sdk.sh $(HOST_DIR)/relocate-sdk.sh
mkdir -p $(HOST_DIR)/share/buildroot
echo $(HOST_DIR) > $(HOST_DIR)/share/buildroot/sdk-location
.PHONY: host-finalize
host-finalize: $(PACKAGES) $(HOST_DIR) $(HOST_DIR_SYMLINK)
@$(call MESSAGE,"Finalizing host directory")
- $(call per-package-rsync,$(sort $(PACKAGES)),host,$(HOST_DIR))
+ $(call per-package-rsync,$(sort $(PACKAGES)),host,$(HOST_DIR),copy)
+ $(Q)PARALLEL_JOBS=$(PARALLEL_JOBS) \
+ PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) \
+ $(TOPDIR)/support/scripts/fix-rpath host
+ $(Q)PARALLEL_JOBS=$(PARALLEL_JOBS) \
+ PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) \
+ $(TOPDIR)/support/scripts/fix-rpath staging
+ $(call ppd-fixup-paths,$(BASE_DIR))
.PHONY: staging-finalize
staging-finalize: $(STAGING_DIR_SYMLINK)
.PHONY: target-finalize
target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize
@$(call MESSAGE,"Finalizing target directory")
- $(call per-package-rsync,$(sort $(PACKAGES)),target,$(TARGET_DIR))
+ $(call per-package-rsync,$(sort $(PACKAGES)),target,$(TARGET_DIR),copy)
$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc
@$(call MESSAGE,"Sanitizing RPATH in target tree")
- PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath target
+ PARALLEL_JOBS=$(PARALLEL_JOBS) \
+ PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) \
+ $(TOPDIR)/support/scripts/fix-rpath target
# For a merged /usr, ensure that /lib, /bin and /sbin and their /usr
# counterparts are appropriately setup as symlinks ones to the others.
$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
@$(call MESSAGE,"Executing post-build script $(s)")$(sep) \
- $(Q)$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
+ $(Q)$(EXTRA_ENV) $(s) \
+ $(TARGET_DIR) \
+ $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
+ $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS))$(sep))
touch $(TARGET_DIR)/usr
$(Q)mkdir -p $(BINARIES_DIR)
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
$(call MESSAGE,"Executing post-image script $(s)"); \
- $(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
+ $(EXTRA_ENV) $(s) \
+ $(BINARIES_DIR) \
+ $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS)) \
+ $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS))$(sep))
.PHONY: source
source: $(foreach p,$(PACKAGES),$(p)-all-source)
.PHONY: legal-info-prepare
legal-info-prepare: $(LEGAL_INFO_DIR)
@$(call MESSAGE,"Buildroot $(BR2_VERSION_FULL) Collecting legal info")
- @$(call legal-license-file,buildroot,buildroot,support/legal-info/buildroot.hash,COPYING,COPYING,HOST)
+ @$(call legal-license-file,HOST,buildroot,buildroot,COPYING,COPYING,support/legal-info/buildroot.hash)
@$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES)
@$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES)
@$(call legal-manifest,HOST,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved)
--html $(O)/pkg-stats.html \
--nvd-path $(DL_DIR)/buildroot-nvd
-.PHONY: missing-cpe
-missing-cpe:
- $(Q)mkdir -p $(CPE_UPDATES_DIR)
- $(Q)cd "$(CONFIG_DIR)" ; \
- $(TOPDIR)/support/scripts/gen-missing-cpe \
- --nvd-path $(DL_DIR)/buildroot-nvd \
- --output $(CPE_UPDATES_DIR)
-
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
# Some subdirectories are also package names. To avoid that "make linux"
clean:
rm -rf $(BASE_TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) $(HOST_DIR_SYMLINK) \
$(BUILD_DIR) $(BASE_DIR)/staging \
- $(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR) $(CPE_UPDATES_DIR) \
- $(O)/pkg-stats.*
+ $(LEGAL_INFO_DIR) $(GRAPHS_DIR) $(PER_PACKAGE_DIR) $(O)/pkg-stats.*
.PHONY: distclean
distclean: clean
@echo ' - Recursively list packages which have <pkg> as a dependency'
@echo ' <pkg>-graph-depends - Generate a graph of <pkg>'\''s dependencies'
@echo ' <pkg>-graph-rdepends - Generate a graph of <pkg>'\''s reverse dependencies'
+ @echo ' <pkg>-graph-both-depends'
+ @echo ' - Generate a graph of both <pkg>'\''s forward and'
+ @echo ' reverse dependencies.'
@echo ' <pkg>-dirclean - Remove <pkg> build directory'
@echo ' <pkg>-reconfigure - Restart the build from the configure step'
@echo ' <pkg>-rebuild - Restart the build from the build step'
@echo ' legal-info - generate info about license compliance'
@echo ' show-info - generate info about packages, as a JSON blurb'
@echo ' pkg-stats - generate info about packages as JSON and HTML'
- @echo ' missing-cpe - generate XML snippets for missing CPE identifiers'
@echo ' printvars - dump internal variables selected with VARS=...'
@echo ' show-vars - dump all internal variables as a JSON blurb; use VARS=...'
@echo ' to limit the list to variables names matching that pattern'
.PHONY: $(noconfig_targets)
+# .WAIT was introduced in make 4.4. For older make, define it as phony.
+.PHONY: .WAIT
+
endif #umask / $(CURDIR) / $(O)