# You shouldn't need to mess with anything beyond this point...
#--------------------------------------------------------------
+# Trick for always running with a fixed umask
+UMASK = 0022
+ifneq ($(shell umask),$(UMASK))
+.PHONY: _all $(MAKECMDGOALS)
+
+$(MAKECMDGOALS): _all
+ @:
+
+_all:
+ @umask $(UMASK) && $(MAKE) --no-print-directory $(MAKECMDGOALS)
+
+else # umask
+
# This is our default rule, so must come first
all:
# Set and export the version string
-export BR2_VERSION := 2015.05-git
+export BR2_VERSION := 2016.02-git
+
+# Save running make version since it's clobbered by the make package
+RUNNING_MAKE_VERSION := $(MAKE_VERSION)
# Check for minimal make version (note: this check will break at make 10.x)
MIN_MAKE_VERSION = 3.81
-ifneq ($(firstword $(sort $(MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
-$(error You have make '$(MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
+ifneq ($(firstword $(sort $(RUNNING_MAKE_VERSION) $(MIN_MAKE_VERSION))),$(MIN_MAKE_VERSION))
+$(error You have make '$(RUNNING_MAKE_VERSION)' installed. GNU make >= $(MIN_MAKE_VERSION) is required)
endif
export HOSTARCH := $(shell uname -m | \
#
# Taking into account the above considerations, if you still want to execute
# this top-level Makefile in parallel comment the ".NOTPARALLEL" line and
-# build using the following command:
-# make BR2_JLEVEL= -j$((`getconf _NPROCESSORS_ONLN`+1))
+# use the -j<jobs> option when building, e.g:
+# make -j$((`getconf _NPROCESSORS_ONLN`+1))
.NOTPARALLEL:
# absolute path
noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
randpackageconfig allyespackageconfig allnopackageconfig \
- source-check print-version olddefconfig
+ print-version olddefconfig
+
+# Some global targets do not trigger a build, but are used to collect
+# metadata, or do various checks. When such targets are triggered,
+# some packages should not do their configuration sanity
+# checks. Provide them a BR_BUILDING variable set to 'y' when we're
+# actually building and they should do their sanity checks.
+#
+# We're building in two situations: when MAKECMDGOALS is empty
+# (default target is to build), or when MAKECMDGOALS contains
+# something else than one of the nobuild_targets.
+nobuild_targets := source source-check \
+ legal-info external-deps _external-deps \
+ clean distclean
+ifeq ($(MAKECMDGOALS),)
+BR_BUILDING = y
+else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
+BR_BUILDING = y
+endif
# Strip quotes and then whitespaces
qstrip = $(strip $(subst ",,$(1)))
$(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE))
endif
-# To make sure the the environment variable overrides the .config option,
+# To make sure that the environment variable overrides the .config option,
# set this before including .config.
ifneq ($(BR2_DL_DIR),)
DL_DIR := $(BR2_DL_DIR)
endif
-
+ifneq ($(BR2_CCACHE_DIR),)
+BR_CACHE_DIR := $(BR2_CCACHE_DIR)
+endif
# Need that early, before we scan packages
# Avoids doing the $(or...) everytime
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
-ifdef V
- ifeq ("$(origin V)", "command line")
- KBUILD_VERBOSE = $(V)
- endif
+ifeq ("$(origin V)", "command line")
+ KBUILD_VERBOSE = $(V)
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
ifeq ($(KBUILD_VERBOSE),1)
- quiet =
Q =
ifndef VERBOSE
VERBOSE = 1
endif
+export VERBOSE
else
- quiet = quiet_
Q = @
endif
# kconfig uses CONFIG_SHELL
CONFIG_SHELL := $(SHELL)
-export SHELL CONFIG_SHELL quiet Q KBUILD_VERBOSE VERBOSE
+export SHELL CONFIG_SHELL Q KBUILD_VERBOSE
ifndef HOSTAR
HOSTAR := ar
HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
endif
HOSTCXX_NOCCACHE := $(HOSTCXX)
-ifndef HOSTFC
-HOSTFC := gfortran
-endif
ifndef HOSTCPP
HOSTCPP := cpp
endif
endif
HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
-HOSTFC := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo || which g77 || type -p g77 || echo gfortran)
HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
-export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD
+export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD
export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE
# Make sure pkg-config doesn't look outside the buildroot tree
unexport QMAKESPEC
unexport TERMINFO
unexport MACHINE
+unexport O
GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
-TARGETS :=
+PACKAGES :=
+PACKAGES_ALL :=
# silent mode requested?
QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)
-e s/arcle/arc/ \
-e s/arceb/arc/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
- -e s/aarch64/arm64/ \
+ -e s/aarch64.*/arm64/ \
-e s/bfin/blackfin/ \
-e s/parisc64/parisc/ \
-e s/powerpc64.*/powerpc/ \
# Quotes are needed for spaces and all in the original PATH content.
BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"
-TARGET_SKELETON = $(TOPDIR)/system/skeleton
-
# Location of a file giving a big fat warning that output/target
# should not be used as the root filesystem.
TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
ifeq ($(BR2_CCACHE),y)
CCACHE := $(HOST_DIR)/usr/bin/ccache
-BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
+BR_CACHE_DIR ?= $(call qstrip,$(BR2_CCACHE_DIR))
export BR_CACHE_DIR
HOSTCC := $(CCACHE) $(HOSTCC)
HOSTCXX := $(CCACHE) $(HOSTCXX)
+else
+export BR_NO_CCACHE
endif
# Scripts in support/ or post-build scripts may need to reference
include boot/common.mk
include linux/linux.mk
-include system/system.mk
include fs/common.mk
include $(BR2_EXTERNAL)/external.mk
-TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
-TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS))
-
-# host-* dependencies have to be handled specially, as those aren't
-# visible in Kconfig and hence not added to a variable like TARGETS.
-# instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
-# variable for each enabled target.
-# Notice: this only works for newstyle gentargets/autotargets packages
-TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
- $(addsuffix _DEPENDENCIES,\
- $(call UPPERCASE,$(TARGETS) $(TARGETS_ROOTFS))),\
- $($(dep)))))
-# Host packages can in turn have their own dependencies. Likewise find
-# all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
-# host package found above. Ideally this should be done recursively until
-# no more packages are found, but that's hard to do in make, so limit to
-# 1 level for now.
-HOST_DEPS = $(sort $(foreach dep,\
- $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\
- $($(dep))))
-HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
-
-TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
- $(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))
-
dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BINARIES_DIR)
.PHONY: all world toolchain dirs clean distclean source outputmakefile \
legal-info legal-info-prepare legal-info-clean printvars help \
- list-defconfigs target-finalize target-post-image \
- $(TARGETS) $(TARGETS_ROOTFS) \
- $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO)
+ list-defconfigs target-finalize target-post-image source-check
################################################################################
#
# dependencies anywhere else
#
################################################################################
-$(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
+$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
@mkdir -p $@
# We make a symlink lib32->lib or lib64->lib as appropriate
LIB_SYMLINK = lib32
endif
+# Populating the staging with the base directories is handled by the skeleton package
$(STAGING_DIR):
- @mkdir -p $(STAGING_DIR)/bin
- @mkdir -p $(STAGING_DIR)/lib
- @ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
- @mkdir -p $(STAGING_DIR)/usr/lib
- @ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
- @mkdir -p $(STAGING_DIR)/usr/include
- @mkdir -p $(STAGING_DIR)/usr/bin
+ @mkdir -p $(STAGING_DIR)
@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
-ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
-TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
-endif
-
RSYNC_VCS_EXCLUSIONS = \
--exclude .svn --exclude .git --exclude .hg --exclude .bzr \
--exclude CVS
-$(BUILD_DIR)/.root:
- mkdir -p $(TARGET_DIR)
- rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
- --chmod=Du+w --exclude .empty --exclude '*~' \
- $(TARGET_SKELETON)/ $(TARGET_DIR)/
- $(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
- @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
- @mkdir -p $(TARGET_DIR)/usr
- @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
- touch $@
-
-$(TARGET_DIR): $(BUILD_DIR)/.root
-
STRIP_FIND_CMD = find $(TARGET_DIR)
ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
ifneq ($(GLIBC_GENERATE_LOCALES),)
-TARGETS += host-localedef
+PACKAGES += host-localedef
define GENERATE_GLIBC_LOCALES
$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
LOCALE_WHITELIST = $(BUILD_DIR)/locales.nopurge
LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
+# This piece of junk does the following:
+# First collect the whitelist in a file.
+# Then go over all the locale dirs and for each subdir, check if it exists
+# in the whitelist file. If it doesn't, kill it.
+# Finally, specifically for X11, regenerate locale.dir from the whitelist.
define PURGE_LOCALES
rm -f $(LOCALE_WHITELIST)
for i in $(LOCALE_NOPURGE) locale-archive; do echo $$i >> $(LOCALE_WHITELIST); done
- for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man /usr/lib/locale)); \
+ for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale)); \
do \
- for lang in $$(cd $$dir; ls .|grep -v man); \
+ for langdir in $$dir/*; \
do \
- grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
+ grep -qx $${langdir##*/} $(LOCALE_WHITELIST) || rm -rf $$langdir; \
done; \
done
+ if [ -d $(TARGET_DIR)/usr/share/X11/locale ]; \
+ then \
+ for lang in $(LOCALE_NOPURGE); \
+ do \
+ if [ -f $(TARGET_DIR)/usr/share/X11/locale/$$lang/XLC_LOCALE ]; \
+ then \
+ echo "$$lang/XLC_LOCALE: $$lang"; \
+ fi \
+ done > $(TARGET_DIR)/usr/share/X11/locale/locale.dir; \
+ fi
endef
TARGET_FINALIZE_HOOKS += PURGE_LOCALES
endif
$(TARGETS_ROOTFS): target-finalize
-target-finalize: $(TARGETS)
+target-finalize: $(PACKAGES)
@$(call MESSAGE,"Finalizing target directory")
$(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 \
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
- find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
- find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
+ find $(TARGET_DIR)/lib $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/libexec \
+ \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
ifneq ($(BR2_PACKAGE_GDB),y)
rm -rf $(TARGET_DIR)/usr/share/gdb
+endif
+ifneq ($(BR2_PACKAGE_BASH),y)
+ rm -rf $(TARGET_DIR)/usr/share/bash-completion
+endif
+ifneq ($(BR2_PACKAGE_ZSH),y)
+ rm -rf $(TARGET_DIR)/usr/share/zsh
endif
rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
-rmdir $(TARGET_DIR)/usr/share 2>/dev/null
$(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
if test -d $(TARGET_DIR)/lib/modules; then \
- find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
- xargs -r $(KSTRIPCMD); fi
+ find $(TARGET_DIR)/lib/modules -type f -name '*.ko' -print0 | \
+ xargs -0 -r $(KSTRIPCMD); fi
# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
# besides the one in which crash occurred; or SIGTRAP kills my program when
endif
mkdir -p $(TARGET_DIR)/etc
- # Mandatory configuration file and auxilliary cache directory
+ # Mandatory configuration file and auxiliary cache directory
# for recent versions of ldconfig
touch $(TARGET_DIR)/etc/ld.so.conf
mkdir -p $(TARGET_DIR)/var/cache/ldconfig
if [ -x "$(TARGET_CROSS)ldconfig" ]; \
then \
- $(TARGET_CROSS)ldconfig -r $(TARGET_DIR); \
+ $(TARGET_CROSS)ldconfig -r $(TARGET_DIR) \
+ -f $(TARGET_DIR)/etc/ld.so.conf; \
else \
- /sbin/ldconfig -r $(TARGET_DIR); \
+ /sbin/ldconfig -r $(TARGET_DIR) \
+ -f $(TARGET_DIR)/etc/ld.so.conf; \
fi
( \
echo "NAME=Buildroot"; \
@$(foreach d, $(call qstrip,$(BR2_ROOTFS_OVERLAY)), \
$(call MESSAGE,"Copying overlay $(d)"); \
rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
- --chmod=Du+w --exclude .empty --exclude '*~' \
+ --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
$(d)/ $(TARGET_DIR)$(sep))
@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
$(call MESSAGE,"Executing post-image script $(s)"); \
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
-source: $(TARGETS_SOURCE) $(HOST_SOURCE)
+source: $(foreach p,$(PACKAGES),$(p)-all-source)
+_external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps)
external-deps:
- @$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
+ @$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u
+
+# check if download URLs are outdated
+source-check: $(foreach p,$(PACKAGES),$(p)-all-source-check)
legal-info-clean:
@rm -fr $(LEGAL_INFO_DIR)
@$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST)
@$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPLv2+,COPYING,not saved,not saved,HOST)
@$(call legal-warning,the Buildroot source code has not been saved)
- @$(call legal-warning,the toolchain has not been saved)
@cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
-legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
+legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \
$(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
@cat support/legal-info/README.header >>$(LEGAL_REPORT)
@if [ -r $(LEGAL_WARNINGS) ]; then \
@rm -f $(LEGAL_WARNINGS)
show-targets:
- @echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(TARGETS) $(TARGETS_ROOTFS)
+ @echo $(PACKAGES) $(TARGETS_ROOTFS)
graph-build: $(O)/build/build-time.log
@install -d $(GRAPHS_DIR)
|tee $(GRAPHS_DIR)/$(@).dot \
|dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT)
+graph-size:
+ $(Q)mkdir -p $(GRAPHS_DIR)
+ $(Q)$(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \
+ --graph $(GRAPHS_DIR)/graph-size.$(BR_GRAPH_OUT) \
+ --file-size-csv $(GRAPHS_DIR)/file-size-stats.csv \
+ --package-size-csv $(GRAPHS_DIR)/package-size-stats.csv
+
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
all: menuconfig
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
BR2_CONFIG=$(BR2_CONFIG) \
- BR2_EXTERNAL=$(BR2_EXTERNAL)
+ BR2_EXTERNAL=$(BR2_EXTERNAL) \
+ SKIP_LEGACY=
xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
+# For the config targets that automatically select options, we pass
+# SKIP_LEGACY=y to disable the legacy options. However, in that case
+# no values are set for the legacy options so a subsequent oldconfig
+# will query them. Therefore, run an additional olddefconfig.
+
oldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< --oldconfig $(CONFIG_CONFIG_IN)
randconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --randconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --randconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
allyesconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --allyesconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --allyesconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --allnoconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --allnoconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
randpackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
- @grep '^config BR2_PACKAGE_' Config.in.legacy | \
- while read config pkg; do \
- echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
- @$(COMMON_CONFIG_ENV) \
+ @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
$< --randconfig $(CONFIG_CONFIG_IN)
@rm -f $(CONFIG_DIR)/.config.nopkg
+ @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
allyespackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
- @grep '^config BR2_PACKAGE_' Config.in.legacy | \
- while read config pkg; do \
- echo "# $$pkg is not set" >> $(CONFIG_DIR)/.config.nopkg; done
- @$(COMMON_CONFIG_ENV) \
+ @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
$< --allyesconfig $(CONFIG_CONFIG_IN)
@rm -f $(CONFIG_DIR)/.config.nopkg
+ @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
- @$(COMMON_CONFIG_ENV) \
+ @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y \
KCONFIG_ALLCONFIG=$(CONFIG_DIR)/.config.nopkg \
$< --allnoconfig $(CONFIG_CONFIG_IN)
@rm -f $(CONFIG_DIR)/.config.nopkg
+ @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
$(COMMON_CONFIG_ENV) $< --silentoldconfig $(CONFIG_CONFIG_IN)
olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN)
defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \
$< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \
$< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
- @mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< \
--savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
$(CONFIG_CONFIG_IN)
-
-# check if download URLs are outdated
-source-check:
- $(MAKE1) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
+ @$(SED) '/BR2_DEFCONFIG=/d' $(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig)
.PHONY: defconfig savedefconfig
$(Q)$(TOPDIR)/support/scripts/mkmakefile $(TOPDIR) $(O)
endif
-# printvars prints all the variables currently defined in our Makefiles
+# 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
+# displayed.
printvars:
@$(foreach V, \
- $(sort $(.VARIABLES)), \
+ $(sort $(if $(VARS),$(filter $(VARS),$(.VARIABLES)),$(.VARIABLES))), \
$(if $(filter-out environment% default automatic, \
$(origin $V)), \
$(info $V=$($V) ($(value $V)))))
rm -rf $(O)
endif
rm -rf $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \
- $(CONFIG_DIR)/.auto.deps
+ $(CONFIG_DIR)/.auto.deps $(BR2_EXTERNAL_FILE)
help:
@echo 'Cleaning:'
@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 ' <pkg>-legal-info - Generate license information for <pkg>'
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
@echo ' busybox-menuconfig - Run BusyBox menuconfig'
endif
ifeq ($(BR2_LINUX_KERNEL),y)
@echo ' linux-menuconfig - Run Linux kernel menuconfig'
@echo ' linux-savedefconfig - Run Linux kernel savedefconfig'
+ @echo ' linux-update-defconfig - Save the Linux configuration to the path specified'
+ @echo ' by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE'
endif
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
@echo ' uclibc-menuconfig - Run uClibc menuconfig'
@echo ' manual-epub - build manual in ePub'
@echo ' graph-build - generate graphs of the build times'
@echo ' graph-depends - generate graph of the dependency tree'
+ @echo ' graph-size - generate stats of the filesystem size'
+ @echo ' list-defconfigs - list all defconfigs (pre-configured minimal systems)'
@echo
@echo 'Miscellaneous:'
@echo ' source - download all sources needed for offline-build'
release:
git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
$(MAKE) O=$(OUT) manual-html manual-text manual-pdf
+ $(MAKE) O=$(OUT) manual-clean
tar rf $(OUT).tar $(OUT)
gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
-include $(BR2_EXTERNAL)/docs/*/*.mk
.PHONY: $(noconfig_targets)
+
+endif #umask