buildrootschalter/support/dependencies/dependencies.mk
Thomas De Schampheleire db443f263a host-ccache: turn into a proper dependency
This patch moves the host-ccache build target from BASE_TARGETS in Makefile
to an actual host prerequisite in support/dependencies. This causes
host-ccache to be built as part of the dependencies, before any real package
is built.
Since the dependencies are built without ccache anyway, there is no need to
set HOST_CCACHE_CONF_ENV anymore.

Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-08-10 21:19:34 +02:00

51 lines
1.5 KiB
Makefile

################################################################################
#
# Check buildroot dependencies and bail out if the user's
# system is judged to be lacking....
#
################################################################################
DEPENDENCIES_HOST_PREREQ :=
# suitable-host-pkg: calls check-host-$(1).sh shell script. Parameter (2)
# can be the candidate to be checked. If not present, the check-host-$(1).sh
# script should use 'which' to find a candidate. The script should return
# the path to the suitable host tool, or nothing if no suitable tool was found.
define suitable-host-package
$(shell support/dependencies/check-host-$(1).sh $(2))
endef
-include support/dependencies/check-host-*.mk
ifeq ($(BR2_STRIP_sstrip),y)
DEPENDENCIES_HOST_PREREQ+=host-sstrip
endif
ifeq ($(BR2_CCACHE),y)
DEPENDENCIES_HOST_PREREQ += host-ccache
endif
core-dependencies:
@HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \
DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \
$(TOPDIR)/support/dependencies/dependencies.sh
dependencies: HOSTCC=$(HOSTCC_NOCCACHE)
dependencies: HOSTCXX=$(HOSTCXX_NOCCACHE)
dependencies: core-dependencies $(DEPENDENCIES_HOST_PREREQ)
dependencies-source:
dependencies-clean:
rm -f $(SSTRIP_TARGET)
dependencies-dirclean:
true
################################################################################
#
# Toplevel Makefile options
#
################################################################################
.PHONY: dependencies core-dependencies