]> Git Repo - buildroot-mgba.git/blobdiff - Makefile
package/paxtest: update the patches to be applied with fuzz 0
[buildroot-mgba.git] / Makefile
index ededfa491d1e7f8cdf697090de83cb6c2cc18812..138cfc5f8d6d2c332838dffeafa7a21b3aebbb7e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
 # Makefile for buildroot
 #
-# Copyright (C) 1999-2005 by Erik Andersen <[email protected]>
-# Copyright (C) 2006-2014 by the Buildroot developers <[email protected]>
-# Copyright (C) 2014-2020 by the Buildroot developers <[email protected]>
+# Copyright (C) the Buildroot developers <[email protected]>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -92,9 +90,9 @@ all:
 .PHONY: all
 
 # Set and export the version string
-export BR2_VERSION := 2022.11-git
+export BR2_VERSION := 2024.08-git
 # Actual time the release is cut (for reproducible builds)
-BR2_VERSION_EPOCH = 1662822000
+BR2_VERSION_EPOCH = 1718188000
 
 # Save running make version since it's clobbered by the make package
 RUNNING_MAKE_VERSION := $(MAKE_VERSION)
@@ -125,7 +123,7 @@ endif
 noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
        defconfig %_defconfig allyesconfig allnoconfig alldefconfig syncconfig release \
        randpackageconfig allyespackageconfig allnopackageconfig \
-       print-version olddefconfig distclean manual manual-% check-package check-flake8
+       print-version olddefconfig distclean manual manual-% check-package
 
 # Some global targets do not trigger a build, but are used to collect
 # metadata, or do various checks. When such targets are triggered,
@@ -229,8 +227,6 @@ LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
 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
@@ -355,7 +351,7 @@ export HOSTARCH := $(shell LC_ALL=C $(HOSTCC_NOCCACHE) -v 2>&1 | \
 
 # 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'); \
@@ -396,6 +392,9 @@ unexport DESTDIR
 # Causes breakage with packages that needs host-ruby
 unexport RUBYOPT
 
+# Compilation of perl-related packages will fail otherwise
+unexport PERL_MM_OPT
+
 include package/pkg-utils.mk
 include package/doc-asciidoc.mk
 
@@ -585,7 +584,10 @@ $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
 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
@@ -593,8 +595,13 @@ 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
+       PARALLEL_JOBS=$(PARALLEL_JOBS) \
+               PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) \
+               $(TOPDIR)/support/scripts/fix-rpath host
+       PARALLEL_JOBS=$(PARALLEL_JOBS) \
+               PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) \
+               $(TOPDIR)/support/scripts/fix-rpath staging
+       $(call ppd-fixup-paths,$(BASE_DIR))
        $(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
@@ -711,7 +718,7 @@ STAGING_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list-staging.t
 .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)
 
 .PHONY: staging-finalize
 staging-finalize: $(STAGING_DIR_SYMLINK)
@@ -719,7 +726,7 @@ 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 \
@@ -764,7 +771,9 @@ endif
        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.
@@ -795,7 +804,10 @@ endif # merged /usr
 
        $(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
 
@@ -813,7 +825,10 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
        $(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)
@@ -830,7 +845,7 @@ legal-info-clean:
 .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)
@@ -926,14 +941,6 @@ pkg-stats:
                --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"
@@ -1010,13 +1017,18 @@ oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmake
 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
        @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
 
-define percent_defconfig
-# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig
-%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile
-       @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(1)/configs/$$@ \
-               $$< --defconfig=$(1)/configs/$$@ $$(CONFIG_CONFIG_IN)
-endef
-$(eval $(foreach d,$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)),$(call percent_defconfig,$(d))$(sep)))
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf  outputmakefile
+       @defconfig=$(or \
+               $(firstword \
+                       $(foreach d, \
+                               $(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)), \
+                               $(wildcard $(d)/configs/$@) \
+                       ) \
+               ), \
+               $(error "Can't find $@") \
+       ); \
+       $(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$${defconfig} \
+               $< --defconfig=$${defconfig} $(CONFIG_CONFIG_IN)
 
 update-defconfig: savedefconfig
 
@@ -1036,7 +1048,7 @@ savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 
 # staging and target directories do NOT list these as
 # dependencies anywhere else
-$(BUILD_DIR) $(BASE_TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) $(PER_PACKAGE_DIR):
+$(BASE_DIR) $(BUILD_DIR) $(BASE_TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) $(PER_PACKAGE_DIR):
        @mkdir -p $@
 
 # outputmakefile generates a Makefile in the output directory, if using a
@@ -1099,8 +1111,7 @@ show-vars:
 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
@@ -1185,7 +1196,6 @@ help:
        @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'
@@ -1243,21 +1253,21 @@ release:
 print-version:
        @echo $(BR2_VERSION_FULL)
 
-check-flake8:
-       $(Q)git ls-tree -r --name-only HEAD \
-       | xargs file \
-       | grep 'Python script' \
-       | cut -d':' -f1 \
-       | xargs -- python3 -m flake8 --statistics
-
 check-package:
-       find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' -o -name '*.patch' \) \
-               -a -not -name '*.orig' -a -not -name '*.rej' \
-               -exec ./utils/check-package --exclude=Sob {} +
+       $(Q)./utils/check-package `git ls-tree -r --name-only HEAD` \
+               --ignore-list=$(TOPDIR)/.checkpackageignore
+
+.PHONY: .checkpackageignore
+.checkpackageignore:
+       $(Q)./utils/check-package --failed-only `git ls-tree -r --name-only HEAD` \
+               > .checkpackageignore
 
 include docs/manual/manual.mk
 -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))
 
 .PHONY: $(noconfig_targets)
 
+# .WAIT was introduced in make 4.4. For older make, define it as phony.
+.PHONY: .WAIT
+
 endif #umask / $(CURDIR) / $(O)
This page took 0.030659 seconds and 4 git commands to generate.