docs/manual: document the br2-external desc: field
[buildroot-gz.git] / package / linux-tools / linux-tools.mk
blob7fa8d194c61a6f886418ba8e8d8a7bd4bb98fa2c
1 ################################################################################
3 # linux-tools
5 ################################################################################
7 # Vampirising sources from the kernel tree, so no source nor site specified.
8 # Instead, we directly build in the sources of the linux package. We can do
9 # that, because we're not building in the same location and the same files.
11 # So, all tools refer to $(LINUX_DIR) instead of $(@D).
13 # Note: we need individual tools .mk files to be included *before* this one
14 # to guarantee that each tool has a chance to register itself before we build
15 # the list of build and install hooks, below.
17 # This is currently guaranteed by the naming of each file:
18 # - they get included by the top-level Makefile, with $(sort $(wildcard ...))
19 # - make's $(sort) function will aways sort in the C locale
20 # - the files names correctly sort out in the C locale so that each tool's
21 # .mk file is included before this one.
23 # We only need the kernel to be extracted, not actually built
24 LINUX_TOOLS_PATCH_DEPENDENCIES = linux
26 # Install Linux kernel tools in the staging directory since some tools
27 # may install shared libraries and headers (e.g. cpupower).
28 LINUX_TOOLS_INSTALL_STAGING = YES
30 LINUX_TOOLS_DEPENDENCIES += $(foreach tool,$(LINUX_TOOLS),\
31 $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\
32 $($(call UPPERCASE,$(tool))_DEPENDENCIES)))
34 LINUX_TOOLS_POST_BUILD_HOOKS += $(foreach tool,$(LINUX_TOOLS),\
35 $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\
36 $(call UPPERCASE,$(tool))_BUILD_CMDS))
38 LINUX_TOOLS_POST_INSTALL_STAGING_HOOKS += $(foreach tool,$(LINUX_TOOLS),\
39 $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\
40 $(call UPPERCASE,$(tool))_INSTALL_STAGING_CMDS))
42 LINUX_TOOLS_POST_INSTALL_TARGET_HOOKS += $(foreach tool,$(LINUX_TOOLS),\
43 $(if $(BR2_PACKAGE_LINUX_TOOLS_$(call UPPERCASE,$(tool))),\
44 $(call UPPERCASE,$(tool))_INSTALL_TARGET_CMDS))
46 $(eval $(generic-package))