]> Git Repo - buildroot-mgba.git/blobdiff - Makefile
Makefile: ensure $BINARIES_DIR exist before post-image scripts
[buildroot-mgba.git] / Makefile
index f736ecfb3e2f990243fd53be29c8f4dc7225234c..f76d86a976f1c600b4b08f76bf02992ee686cf20 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -92,9 +92,9 @@ all:
 .PHONY: all
 
 # Set and export the version string
-export BR2_VERSION := 2019.02-rc1
+export BR2_VERSION := 2019.08-git
 # Actual time the release is cut (for reproducible builds)
-BR2_VERSION_EPOCH = 1550044800
+BR2_VERSION_EPOCH = 1559462000
 
 # Save running make version since it's clobbered by the make package
 RUNNING_MAKE_VERSION := $(MAKE_VERSION)
@@ -179,10 +179,9 @@ $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))
 # still be overridden on the command line, therefore the file is re-created
 # every time make is run.
 
-BR2_EXTERNAL_FILE = $(BASE_DIR)/.br-external.mk
+BR2_EXTERNAL_FILE = $(BASE_DIR)/.br2-external.mk
 -include $(BR2_EXTERNAL_FILE)
-$(shell support/scripts/br2-external \
-       -m -o '$(BR2_EXTERNAL_FILE)' $(BR2_EXTERNAL))
+$(shell support/scripts/br2-external -d '$(BASE_DIR)' $(BR2_EXTERNAL))
 BR2_EXTERNAL_ERROR =
 include $(BR2_EXTERNAL_FILE)
 ifneq ($(BR2_EXTERNAL_ERROR),)
@@ -248,7 +247,6 @@ ifeq ($(BR2_REPRODUCIBLE),y)
 export TZ = UTC
 export LANG = C
 export LC_ALL = C
-export GZIP = -n
 endif
 
 # To put more focus on warnings, be less verbose as default
@@ -439,6 +437,7 @@ KERNEL_ARCH := $(shell echo "$(ARCH)" | sed -e "s/-.*//" \
        -e s/arceb/arc/ \
        -e s/arm.*/arm/ -e s/sa110/arm/ \
        -e s/aarch64.*/arm64/ \
+       -e s/nds32.*/nds32/ \
        -e s/or1k/openrisc/ \
        -e s/parisc64/parisc/ \
        -e s/powerpc64.*/powerpc/ \
@@ -811,6 +810,7 @@ endif # merged /usr
 .PHONY: target-post-image
 target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
        @rm -f $(ROOTFS_COMMON_TAR)
+       $(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))
@@ -899,6 +899,21 @@ check-dependencies:
        @cd "$(CONFIG_DIR)"; \
        $(TOPDIR)/support/scripts/graph-depends -C
 
+.PHONY: show-info
+show-info:
+       @:
+       $(info $(call clean-json, \
+                       { $(foreach p, \
+                               $(sort $(foreach i,$(PACKAGES) $(TARGETS_ROOTFS), \
+                                               $(i) \
+                                               $($(call UPPERCASE,$(i))_FINAL_RECURSIVE_DEPENDENCIES) \
+                                       ) \
+                               ), \
+                               $(call json-info,$(call UPPERCASE,$(p)))$(comma) \
+                       ) } \
+               ) \
+       )
+
 else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 
 # Some subdirectories are also package names. To avoid that "make linux"
@@ -918,9 +933,6 @@ endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 HOSTCFLAGS = $(CFLAGS_FOR_BUILD)
 export HOSTCFLAGS
 
-.PHONY: prepare-kconfig
-prepare-kconfig: outputmakefile $(BUILD_DIR)/.br2-external.in
-
 $(BUILD_DIR)/buildroot-config/%onf:
        mkdir -p $(@D)/lxdialog
        PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \
@@ -937,22 +949,22 @@ COMMON_CONFIG_ENV = \
        KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
        BR2_CONFIG=$(BR2_CONFIG) \
        HOST_GCC_VERSION="$(HOSTCC_VERSION)" \
-       BUILD_DIR=$(BUILD_DIR) \
+       BASE_DIR=$(BASE_DIR) \
        SKIP_LEGACY=
 
-xconfig: $(BUILD_DIR)/buildroot-config/qconf prepare-kconfig
+xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
        @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
 
-gconfig: $(BUILD_DIR)/buildroot-config/gconf prepare-kconfig
+gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
        @$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
 
-menuconfig: $(BUILD_DIR)/buildroot-config/mconf prepare-kconfig
+menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
        @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
 
-nconfig: $(BUILD_DIR)/buildroot-config/nconf prepare-kconfig
+nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
        @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
 
-config: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
+config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
        @$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
 
 # For the config targets that automatically select options, we pass
@@ -960,11 +972,11 @@ config: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
 # no values are set for the legacy options so a subsequent oldconfig
 # will query them. Therefore, run an additional olddefconfig.
 
-randconfig allyesconfig alldefconfig allnoconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
+randconfig allyesconfig alldefconfig allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
        @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --$@ $(CONFIG_CONFIG_IN)
        @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
 
-randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
+randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
        @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
        @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
                KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
@@ -972,15 +984,15 @@ randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot
        @rm -f $(CONFIG_DIR)/.config.nopkg
        @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
 
-oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
+oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
        @$(COMMON_CONFIG_ENV) $< --$@ $(CONFIG_CONFIG_IN)
 
-defconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
+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 prepare-kconfig
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile
        @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(1)/configs/$$@ \
                $$< --defconfig=$(1)/configs/$$@ $$(CONFIG_CONFIG_IN)
 endef
@@ -988,7 +1000,7 @@ $(eval $(foreach d,$(call reverse,$(TOPDIR) $(BR2_EXTERNAL_DIRS)),$(call percent
 
 update-defconfig: savedefconfig
 
-savedefconfig: $(BUILD_DIR)/buildroot-config/conf prepare-kconfig
+savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
        @$(COMMON_CONFIG_ENV) $< \
                --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
                $(CONFIG_CONFIG_IN)
@@ -1016,13 +1028,6 @@ ifeq ($(NEED_WRAPPER),y)
        $(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
 endif
 
-# Even though the target is a real file, we mark it as PHONY as we
-# want it to be re-generated each time make is invoked, in case the
-# value of BR2_EXTERNAL is changed.
-.PHONY: $(BUILD_DIR)/.br2-external.in
-$(BUILD_DIR)/.br2-external.in: $(BUILD_DIR)
-       $(Q)support/scripts/br2-external -k -o "$(@)" $(BR2_EXTERNAL)
-
 # printvars prints all the variables currently defined in our
 # Makefiles. Alternatively, if a non-empty VARS variable is passed,
 # only the variables matching the make pattern passed in VARS are
@@ -1031,7 +1036,7 @@ $(BUILD_DIR)/.br2-external.in: $(BUILD_DIR)
 printvars:
        @:
        $(foreach V, \
-               $(sort $(if $(VARS),$(filter $(VARS),$(.VARIABLES)),$(.VARIABLES))), \
+               $(sort $(filter $(VARS),$(.VARIABLES))), \
                $(if $(filter-out environment% default automatic, \
                                $(origin $V)), \
                $(if $(QUOTED_VARS),\
@@ -1051,7 +1056,7 @@ ifeq ($(O),$(CURDIR)/output)
        rm -rf $(O)
 endif
        rm -rf $(TOPDIR)/dl $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \
-               $(CONFIG_DIR)/.auto.deps $(BR2_EXTERNAL_FILE)
+               $(CONFIG_DIR)/.auto.deps $(BASE_DIR)/.br2-external.*
 
 .PHONY: help
 help:
@@ -1092,6 +1097,7 @@ help:
        @echo '  <pkg>-depends          - Build <pkg>'\''s dependencies'
        @echo '  <pkg>-configure        - Build <pkg> up to the configure step'
        @echo '  <pkg>-build            - Build <pkg> up to the build step'
+       @echo '  <pkg>-show-info        - generate info about <pkg>, as a JSON blurb'
        @echo '  <pkg>-show-depends     - List packages on which <pkg> depends'
        @echo '  <pkg>-show-rdepends    - List packages which have <pkg> as a dependency'
        @echo '  <pkg>-show-recursive-depends'
@@ -1124,7 +1130,8 @@ help:
        @echo '  source                 - download all sources needed for offline-build'
        @echo '  external-deps          - list external packages used'
        @echo '  legal-info             - generate info about license compliance'
-       @echo '  printvars              - dump all the internal variables'
+       @echo '  show-info              - generate info about packages, as a JSON blurb'
+       @echo '  printvars              - dump internal variables selected with VARS=...'
        @echo
        @echo '  make V=0|1             - 0 => quiet build (default), 1 => verbose build'
        @echo '  make O=dir             - Locate all output files in "dir", including .config'
@@ -1170,7 +1177,7 @@ release: OUT = buildroot-$(BR2_VERSION)
 release:
        git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
        $(MAKE) O=$(OUT) manual-html manual-text manual-pdf
-       $(MAKE) O=$(OUT) manual-clean
+       $(MAKE) O=$(OUT) clean
        tar rf $(OUT).tar $(OUT)
        gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
        bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
This page took 0.031614 seconds and 4 git commands to generate.