Lines Matching +full:fails +full:- +full:without +full:- +full:test +full:- +full:cd

3 # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4 # Copyright (C) 2006-2014 by the Buildroot developers <buildroot@uclibc.org>
5 # Copyright (C) 2014-2020 by the Buildroot developers <buildroot@buildroot.org>
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #--------------------------------------------------------------
25 #--------------------------------------------------------------
31 SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
32 else if [ -x /bin/bash ]; then echo /bin/bash; \
39 # or avoid confusing packages that can use the O=<dir> syntax for out-of-tree
40 # build by preventing it from being forwarded to sub-make calls.
64 $(shell rm -rf $(O_LATEST); mkdir -p $(CURDIR)/output)
65 $(shell ln -rsf $(O) $(O_LATEST))
68 # Check if the current Buildroot execution meets all the pre-requisites.
69 # If they are not met, Buildroot will actually do its job in a sub-make meeting
70 # its pre-requisites, which are:
71 # 1- Permissive enough umask:
74 # 2- Absolute canonical CWD (i.e. $(CURDIR)):
75 # Otherwise, some packages will use CWD as-is, others will compute its
78 # 3- Absolute canonical output location (i.e. $(O)):
86 # avoid empty CANONICAL_O in case on non-existing entry.
87 CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O))
89 # gcc fails to build when the srcdir contains a '@'
102 # Check Buildroot execution pre-requisites here.
111 $(MAKE) -C $(CANONICAL_CURDIR) --no-print-directory \
140 # Compute the full local version string so packages can use it as-is
154 print-version olddefconfig distclean manual manual-% check-package check-flake8
165 nobuild_targets := source %-source \
166 legal-info %-legal-info external-deps _external-deps \
167 clean distclean help show-targets graph-depends \
168 %-graph-depends %-show-depends %-show-version \
169 graph-build graph-size list-defconfigs \
170 savedefconfig update-defconfig printvars
173 else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
177 # We call make recursively to build packages. The command-line overrides that
179 # particular, we don't want to pass down the O=<dir> option for out-of-tree
187 # Set variables related to in-tree or out-of-tree build.
197 # bash prints the name of the directory on 'cd <dir>' if CDPATH is
208 # The value of BR2_EXTERNAL is stored in .br-external in the output directory.
211 # still be overridden on the command line, therefore the file is re-created
214 BR2_EXTERNAL_FILE = $(BASE_DIR)/.br2-external.mk
215 -include $(BR2_EXTERNAL_FILE)
216 $(shell support/scripts/br2-external -d '$(BASE_DIR)' $(BR2_EXTERNAL))
223 # Workaround bug in make-4.3: https://savannah.gnu.org/bugs/?57676
224 $(BASE_DIR)/.br2-external.mk:;
242 PER_PACKAGE_DIR := $(BASE_DIR)/per-package
243 # initial definition so that 'make clean' works for most users, even without
248 LEGAL_INFO_DIR = $(BASE_DIR)/legal-info
250 REDIST_SOURCES_DIR_HOST = $(LEGAL_INFO_DIR)/host-sources
252 LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses
254 LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv
258 CPE_UPDATES_DIR = $(BASE_DIR)/cpe-updates
264 -include $(BR2_CONFIG)
268 # Disable top-level parallel build if per-package directories is not
269 # used. Indeed, per-package directories is necessary to guarantee
270 # determinism and reproducibility with top-level parallel build.
306 …N := $(shell if [ -f "$(CUSTOM_KERNEL)/Makefile" ]; then grep -A 1 "^VERSION = " "$(CUSTOM_KERNEL)…
316 HOSTCC := $(shell which $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
321 HOSTCXX := $(shell which $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
342 HOSTAR := $(shell which $(HOSTAR) || type -p $(HOSTAR) || echo ar)
343 HOSTAS := $(shell which $(HOSTAS) || type -p $(HOSTAS) || echo as)
344 HOSTCPP := $(shell which $(HOSTCPP) || type -p $(HOSTCPP) || echo cpp)
345 HOSTLD := $(shell which $(HOSTLD) || type -p $(HOSTLD) || echo ld)
346 HOSTLN := $(shell which $(HOSTLN) || type -p $(HOSTLN) || echo ln)
347 HOSTNM := $(shell which $(HOSTNM) || type -p $(HOSTNM) || echo nm)
348 HOSTOBJCOPY := $(shell which $(HOSTOBJCOPY) || type -p $(HOSTOBJCOPY) || echo objcopy)
349 HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranlib)
350 SED := $(shell which sed || type -p sed) -i -e
359 # of the binary tools (e.g. pre-built external toolchains) can run
363 # For example, a 64-bit prebuilt toolchain will not run on a 64-bit
364 # kernel if the userland is 32-bit (e.g. in a chroot for example).
369 export HOSTARCH := $(shell LC_ALL=C $(HOSTCC_NOCCACHE) -v 2>&1 | \
370 sed -e '/^Target: \([^-]*\).*/!d' \
371 -e 's//\1/' \
372 -e 's/i.86/x86/' \
373 -e 's/sun4u/sparc64/' \
374 -e 's/arm.*/arm/' \
375 -e 's/sa110/arm/' \
376 -e 's/ppc64/powerpc64/' \
377 -e 's/ppc/powerpc/' \
378 -e 's/macppc/powerpc/' \
379 -e 's/sh.*/sh/' )
385 HOSTCC_VERSION := $(shell V=$$($(HOSTCC_NOCCACHE) --version | \
386 sed -n -r 's/^.* ([0-9]*)\.([0-9]*)\.([0-9]*)[ ]*.*/\1 \2/p'); \
387 [ "$${V%% *}" -le $(HOSTCC_MAX_VERSION) ] || V=$(HOSTCC_MAX_VERSION); \
398 # a non language-specific locale like C.UTF-8 if one is available,
403 ( echo $${LC_ALL:-$${LC_MESSAGES:-$${LANG}}}; \
404 locale -a 2>/dev/null | LC_ALL=C sort \
406 | grep -i -E 'utf-?8$$' \
407 | head -n 1)
411 # Make sure pkg-config doesn't look outside the buildroot tree
421 # Causes breakage with packages that needs host-ruby
424 include package/pkg-utils.mk
425 include package/doc-asciidoc.mk
462 QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)
473 TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf
492 ln -snf $(HOST_DIR) $(HOST_DIR_SYMLINK)
497 ln -snf $(STAGING_DIR) $(STAGING_DIR_SYMLINK)
516 # Scripts in support/ or post-build scripts may need to reference
552 # See: https://reproducible-builds.org/specs/source-date-epoch/
553 BR2_VERSION_GIT_EPOCH := $(shell $(GIT) log -1 --format=%at 2> /dev/null)
561 -include $(PACKAGE_OVERRIDE_FILE)
570 # If using a br2-external tree, the BR2_EXTERNAL_$(NAME)_PATH variables
573 # quoted. We just include the generated Makefile fragment .br2-external.mk
574 # a third time, which will set those variables to the un-quoted values.
588 # of test-pkg, as we want to make sure during testing, that a package has
603 has added it to its _DEPENDENCIES variable without selecting it or \
617 $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
621 prepare: $(BUILD_DIR)/buildroot-config/auto.conf
624 world: target-post-image
626 .PHONY: prepare-sdk
627 prepare-sdk: world
629 PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath host
630 PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath staging
631 $(INSTALL) -m 755 $(TOPDIR)/support/misc/relocate-sdk.sh $(HOST_DIR)/relocate-sdk.sh
632 mkdir -p $(HOST_DIR)/share/buildroot
633 echo $(HOST_DIR) > $(HOST_DIR)/share/buildroot/sdk-location
637 clean-for-reinstall: $(patsubst %,%-clean-for-reinstall,$(PACKAGES))
638 rm -rf $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR)
639 find $(BUILD_DIR) -name ".stamp_*_installed" -delete
641 reinstall: clean-for-reinstall all
643 BR2_SDK_PREFIX ?= $(GNU_TARGET_NAME)_sdk-buildroot
645 sdk: prepare-sdk $(BR2_TAR_HOST_DEPENDENCY)
648 $(Q)mkdir -p $(BINARIES_DIR)
650 --owner=0 --group=0 --numeric-owner \
651 --transform='s#^$(patsubst /%,%,$(HOST_DIR))#$(BR2_SDK_PREFIX)#' \
652 -C / $(patsubst /%,%,$(HOST_DIR))
655 --exclude .svn --exclude .git --exclude .hg --exclude .bzr \
656 --exclude CVS
664 -prune -o \
667 -not \( $(call findfileclauses,$(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) )
669 # Regular stripping for everything, except libpthread, ld-*.so and
671 # - libpthread.so: a non-stripped libpthread shared library is needed for
673 # - ld.so: a non-stripped dynamic linker library is needed for valgrind
674 # - kernel modules (*.ko): do not function properly when stripped like normal
680 -type f \( -perm /111 -o -name '*.so*' \) \
681 -not \( $(call findfileclauses,libpthread*.so* ld-*.so* *.ko) \) \
682 -print0
684 # Special stripping (only debugging symbols) for libpthread and ld-*.so.
687 \( -name 'ld-*.so*' -o -name 'libpthread*.so*' \) \
688 -print0
692 ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` \
702 PACKAGES += host-localedef
705 $(MAKE) -f support/misc/gen-glibc-locales.mk \
724 printf '%s\n' $(LOCALE_NOPURGE) locale-archive > $(LOCALE_WHITELIST)
728 if [ ! -d $$dir ]; then continue; fi; \
731 if [ -e "$${langdir}" ]; \
733 grep -qx "$${langdir##*/}" $(LOCALE_WHITELIST) || rm -rf $$langdir; \
737 if [ -d $(TARGET_DIR)/usr/share/X11/locale ]; \
741 if [ -f $(TARGET_DIR)/usr/share/X11/locale/$$lang/XLC_LOCALE ]; \
751 $(TARGETS_ROOTFS): target-finalize
754 target-finalize: ROOTFS=
756 TARGET_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list.txt))
757 HOST_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list-host.txt))
758 STAGING_DIR_FILES_LISTS = $(sort $(wildcard $(BUILD_DIR)/*/.files-list-staging.txt))
760 .PHONY: host-finalize
761 host-finalize: $(PACKAGES) $(HOST_DIR) $(HOST_DIR_SYMLINK)
763 $(call per-package-rsync,$(sort $(PACKAGES)),host,$(HOST_DIR))
765 .PHONY: staging-finalize
766 staging-finalize: $(STAGING_DIR_SYMLINK)
768 .PHONY: target-finalize
769 target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize
771 $(call per-package-rsync,$(sort $(PACKAGES)),target,$(TARGET_DIR))
773 rm -rf $(TARGET_DIR)/usr/share/aclocal \
776 find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
778 \( -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f
780 rm -rf $(TARGET_DIR)/usr/include \
783 -name '*.a' -print0 | xargs -0 rm -f
786 rm -rf $(TARGET_DIR)/usr/share/gdb
789 rm -rf $(TARGET_DIR)/usr/share/bash-completion
790 rm -rf $(TARGET_DIR)/etc/bash_completion.d
793 rm -rf $(TARGET_DIR)/usr/share/zsh
795 rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
796 rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
797 rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
798 rm -rf $(TARGET_DIR)/usr/share/gtk-doc
801 rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug
803 $(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
804 $(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) 2>/dev/null || true
807 test -f $(TARGET_DIR)/etc/ld.so.conf && \
809 test -d $(TARGET_DIR)/etc/ld.so.conf.d && \
813 mkdir -p $(TARGET_DIR)/etc
820 ) > $(TARGET_DIR)/usr/lib/os-release
821 ln -sf ../usr/lib/os-release $(TARGET_DIR)/etc
824 PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath target
832 $(Q)not_merged_dirs="$$(support/scripts/check-merged-usr.sh $(d))"; \
833 test -n "$$not_merged_dirs" && { \
847 cat $(TARGET_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list.txt
849 cat $(HOST_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list-host.txt
851 cat $(STAGING_DIR_FILES_LISTS)) > $(BUILD_DIR)/packages-file-list-staging.txt
854 @$(call MESSAGE,"Executing post-build script $(s)")$(sep) \
859 .PHONY: target-post-image
860 target-post-image: $(TARGETS_ROOTFS) target-finalize staging-finalize
861 @rm -f $(ROOTFS_COMMON_TAR)
862 $(Q)mkdir -p $(BINARIES_DIR)
864 $(call MESSAGE,"Executing post-image script $(s)"); \
868 source: $(foreach p,$(PACKAGES),$(p)-all-source)
870 .PHONY: _external-deps external-deps
871 _external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps)
872 external-deps:
873 @$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u
875 .PHONY: legal-info-clean
876 legal-info-clean:
877 @rm -fr $(LEGAL_INFO_DIR)
879 .PHONY: legal-info-prepare
880 legal-info-prepare: $(LEGAL_INFO_DIR)
882 …@$(call legal-license-file,buildroot,buildroot,support/legal-info/buildroot.hash,COPYING,COPYING,H…
883 …@$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEP…
884 …@$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPEN…
885 @$(call legal-manifest,HOST,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved)
886 @$(call legal-warning,the Buildroot source code has not been saved)
889 .PHONY: legal-info
890 legal-info: legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \
892 @cat support/legal-info/README.header >>$(LEGAL_REPORT)
893 @if [ -r $(LEGAL_WARNINGS) ]; then \
894 cat support/legal-info/README.warnings-header \
897 @rm -f $(LEGAL_WARNINGS)
898 @(cd $(LEGAL_INFO_DIR); \
899 find * -type f -exec sha256sum {} + | LC_ALL=C sort -k2 \
900 >.legal-info.sha256; \
901 mv .legal-info.sha256 legal-info.sha256)
904 .PHONY: show-targets
905 show-targets:
908 .PHONY: show-build-order
909 show-build-order: $(patsubst %,%-show-build-order,$(PACKAGES))
911 .PHONY: graph-build
912 graph-build: $(O)/build/build-time.log
913 @install -d $(GRAPHS_DIR)
914 $(foreach o,name build duration,./support/scripts/graph-build-time \
915 --type=histogram --order=$(o) --input=$(<) \
916 --output=$(GRAPHS_DIR)/build.hist-$(o).$(BR_GRAPH_OUT) \
917 $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
918 $(foreach t,packages steps,./support/scripts/graph-build-time \
919 --type=pie-$(t) --input=$(<) \
920 --output=$(GRAPHS_DIR)/build.pie-$(t).$(BR_GRAPH_OUT) \
921 $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep))
923 .PHONY: graph-depends-requirements
924 graph-depends-requirements:
925 @dot -? >/dev/null 2>&1 || \
926 { echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1; }
928 .PHONY: graph-depends
929 graph-depends: graph-depends-requirements
930 @$(INSTALL) -d $(GRAPHS_DIR)
931 @cd "$(CONFIG_DIR)"; \
932 $(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \
933 --direct -o $(GRAPHS_DIR)/$(@).dot
934 dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) \
935 -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT) \
938 .PHONY: graph-size
939 graph-size:
940 $(Q)mkdir -p $(GRAPHS_DIR)
941 $(Q)$(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \
942 --graph $(GRAPHS_DIR)/graph-size.$(BR_GRAPH_OUT) \
943 --file-size-csv $(GRAPHS_DIR)/file-size-stats.csv \
944 --package-size-csv $(GRAPHS_DIR)/package-size-stats.csv \
947 .PHONY: check-dependencies
948 check-dependencies:
949 @cd "$(CONFIG_DIR)"; \
950 $(TOPDIR)/support/scripts/graph-depends -C
952 .PHONY: show-info
953 show-info:
955 $(info $(call clean-json, \
962 $(call json-info,$(call UPPERCASE,$(p)))$(comma) \
967 .PHONY: pkg-stats
968 pkg-stats:
969 @cd "$(CONFIG_DIR)" ; \
970 $(TOPDIR)/support/scripts/pkg-stats -c \
971 --json $(O)/pkg-stats.json \
972 --html $(O)/pkg-stats.html \
973 --nvd-path $(DL_DIR)/buildroot-nvd
975 .PHONY: missing-cpe
976 missing-cpe:
977 $(Q)mkdir -p $(CPE_UPDATES_DIR)
978 $(Q)cd "$(CONFIG_DIR)" ; \
979 $(TOPDIR)/support/scripts/gen-missing-cpe \
980 --nvd-path $(DL_DIR)/buildroot-nvd \
981 --output $(CPE_UPDATES_DIR)
997 # ---------------------------------------------------------------------------
1002 $(BUILD_DIR)/buildroot-config/%onf:
1003 mkdir -p $(@D)/lxdialog
1005 obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
1013 KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
1014 KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
1015 KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
1022 xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
1025 gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
1028 menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
1031 nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
1034 config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
1042 randconfig allyesconfig alldefconfig allnoconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
1043 @$(COMMON_CONFIG_ENV) SKIP_LEGACY=y $< --$@ $(CONFIG_CONFIG_IN)
1044 @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
1046 randpackageconfig allyespackageconfig allnopackageconfig: $(BUILD_DIR)/buildroot-config/conf output…
1047 @grep -v BR2_PACKAGE_ $(BR2_CONFIG) > $(CONFIG_DIR)/.config.nopkg
1050 $< --$(subst package,,$@) $(CONFIG_CONFIG_IN)
1051 @rm -f $(CONFIG_DIR)/.config.nopkg
1052 @$(COMMON_CONFIG_ENV) $< --olddefconfig $(CONFIG_CONFIG_IN) >/dev/null
1054 oldconfig syncconfig olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
1055 @$(COMMON_CONFIG_ENV) $< --$@ $(CONFIG_CONFIG_IN)
1057 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
1058 @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
1062 rockchip_%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/rockchip_%_defconfig outputma…
1066 $$< --defconfig=$(BASE_DIR)/.config.in $$(CONFIG_CONFIG_IN)
1068 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(1)/configs/%_defconfig outputmakefile
1072 $$< --defconfig=$(BASE_DIR)/.config.in $$(CONFIG_CONFIG_IN)
1076 update-defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
1080 savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
1082 --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
1086 .PHONY: defconfig savedefconfig update-defconfig
1097 @mkdir -p $@
1109 # Makefiles. Alternatively, if a non-empty VARS variable is passed,
1117 $(if $(filter-out environment% default automatic, \
1126 rm -rf $(BASE_TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) $(HOST_DIR_SYMLINK) \
1129 $(O)/pkg-stats.*
1134 rm -rf $(O)
1136 rm -rf $(TOPDIR)/dl $(BR2_CONFIG) $(CONFIG_DIR)/.config.old $(CONFIG_DIR)/..config.tmp \
1137 $(CONFIG_DIR)/.auto.deps $(BASE_DIR)/.br2-external.*
1142 @echo ' clean - delete all files created by build'
1143 @echo ' distclean - delete all non-source files (including .config)'
1146 @echo ' all - make world'
1147 @echo ' toolchain - build toolchain'
1148 @echo ' sdk - build relocatable SDK'
1149 @echo ' reinstall - reinstall all'
1152 @echo ' menuconfig - interactive curses-based configurator'
1153 @echo ' nconfig - interactive ncurses-based configurator'
1154 @echo ' xconfig - interactive Qt-based configurator'
1155 @echo ' gconfig - interactive GTK-based configurator'
1156 @echo ' oldconfig - resolve any unresolved symbols in .config'
1157 @echo ' syncconfig - Same as oldconfig, but quietly, additionally update deps'
1158 @echo ' olddefconfig - Same as syncconfig but sets new symbols to their default value'
1159 @echo ' randconfig - New config with random answer to all options'
1160 @echo ' defconfig - New config with default answer to all options;'
1162 @echo ' savedefconfig - Save current config to BR2_DEFCONFIG (minimal config)'
1163 @echo ' update-defconfig - Same as savedefconfig, but with fragments'
1164 @echo ' allyesconfig - New config where all options are accepted with yes'
1165 @echo ' allnoconfig - New config where all options are answered with no'
1166 @echo ' alldefconfig - New config where all options are set to default'
1167 @echo ' randpackageconfig - New config with random answer to package options'
1168 @echo ' allyespackageconfig - New config where pkg options are accepted with yes'
1169 @echo ' allnopackageconfig - New config where package options are answered with no'
1171 @echo 'Package-specific:'
1172 @echo ' <pkg> - Build and install <pkg> and all its dependencies'
1173 @echo ' <pkg>-source - Only download the source files for <pkg>'
1174 @echo ' <pkg>-extract - Extract <pkg> sources'
1175 @echo ' <pkg>-patch - Apply patches to <pkg>'
1176 @echo ' <pkg>-depends - Build <pkg>'\''s dependencies'
1177 @echo ' <pkg>-configure - Build <pkg> up to the configure step'
1178 @echo ' <pkg>-build - Build <pkg> up to the build step'
1179 @echo ' <pkg>-show-info - generate info about <pkg>, as a JSON blurb'
1180 @echo ' <pkg>-show-depends - List packages on which <pkg> depends'
1181 @echo ' <pkg>-show-rdepends - List packages which have <pkg> as a dependency'
1182 @echo ' <pkg>-show-recursive-depends'
1183 @echo ' - Recursively list packages on which <pkg> depends'
1184 @echo ' <pkg>-show-recursive-rdepends'
1185 @echo ' - Recursively list packages which have <pkg> as a dependency'
1186 @echo ' <pkg>-graph-depends - Generate a graph of <pkg>'\''s dependencies'
1187 @echo ' <pkg>-graph-rdepends - Generate a graph of <pkg>'\''s reverse dependencies'
1188 @echo ' <pkg>-dirclean - Remove <pkg> build directory'
1189 @echo ' <pkg>-reconfigure - Restart the build from the configure step'
1190 @echo ' <pkg>-rebuild - Restart the build from the build step'
1191 @echo ' <pkg>-reinstall - Restart the build from the install step'
1198 @echo ' manual - build manual in all formats'
1199 @echo ' manual-html - build manual in HTML'
1200 @echo ' manual-split-html - build manual in split HTML'
1201 @echo ' manual-pdf - build manual in PDF'
1202 @echo ' manual-text - build manual in text'
1203 @echo ' manual-epub - build manual in ePub'
1204 @echo ' graph-build - generate graphs of the build times'
1205 @echo ' graph-depends - generate graph of the dependency tree'
1206 @echo ' graph-size - generate stats of the filesystem size'
1207 @echo ' list-defconfigs - list all defconfigs (pre-configured minimal systems)'
1210 @echo ' source - download all sources needed for offline-build'
1211 @echo ' external-deps - list external packages used'
1212 @echo ' legal-info - generate info about license compliance'
1213 @echo ' show-info - generate info about packages, as a JSON blurb'
1214 @echo ' pkg-stats - generate info about packages as JSON and HTML'
1215 @echo ' missing-cpe - generate XML snippets for missing CPE identifiers'
1216 @echo ' printvars - dump internal variables selected with VARS=...'
1218 @echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
1219 @echo ' make O=dir - Locate all output files in "dir", including .config'
1222 @echo 'it on-line at http://buildroot.org/docs.html'
1227 # $(2): br2-external name, empty for bundled
1228 define list-defconfigs
1231 [ -f "$${defconfig}" ] || continue; \
1236 printf "Built-in configs:\n"; \
1241 printf " %-35s - Build for %s\n" "$${defconfig}" "$${defconfig%_defconfig}"; \
1247 # because we want to display the name of the br2-external tree.
1248 .PHONY: list-defconfigs
1249 list-defconfigs:
1250 $(call list-defconfigs,$(TOPDIR))
1252 $(call list-defconfigs,$(BR2_EXTERNAL_$(name)_PATH),\
1255 release: OUT = buildroot-$(BR2_VERSION)
1260 git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
1261 $(MAKE) O=$(OUT) manual-html manual-text manual-pdf
1264 gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
1265 xz -9 -c < $(OUT).tar > $(OUT).tar.xz
1266 rm -rf $(OUT) $(OUT).tar
1268 print-version:
1271 check-flake8:
1272 $(Q)git ls-tree -r --name-only HEAD \
1275 | cut -d':' -f1 \
1276 | xargs -- python3 -m flake8 --statistics
1278 check-package:
1279 find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' \) \
1280 -exec ./utils/check-package {} +
1283 -include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))