kumquat-buildroot/support/dependencies/dependencies.mk
Peter Korsgaard 7c09cb82b7 dependencies.mk: check for valid host-tar before other host dependencies
host-{cmake,lzip,xz} needs host-tar to extract their source code tarball, so
we need to ensure that host-tar gets added to DEPENDENCIES_HOST_PREREQ
before these in case they are both needed, otherwise the tools will fail to
extract.

With the upcoming change to blacklist modern tar versions this situation is
likely to trigger more often.

The real solution to this issue is the <foo>_EXTRACT_DEPENDENCIES rework,
but that series is a bit too intrusive to add this close to 2018.02, so
therefore this hack.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-02-27 17:01:47 +01:00

40 lines
1.5 KiB
Makefile

################################################################################
#
# Check buildroot dependencies and bail out if the user's
# system is judged to be lacking....
#
################################################################################
# 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
# host utilities needs host-tar to extract the source code tarballs, so
# ensure check-host-tar.mk is included before the rest
include support/dependencies/check-host-tar.mk
-include $(sort $(filter-out %-tar.mk,$(wildcard support/dependencies/check-host-*.mk)))
ifeq ($(BR2_CCACHE),y)
DEPENDENCIES_HOST_PREREQ += host-ccache
endif
core-dependencies:
@MAKE="$(MAKE)" DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \
$(TOPDIR)/support/dependencies/dependencies.sh
$(DEPENDENCIES_HOST_PREREQ): HOSTCC=$(HOSTCC_NOCCACHE)
$(DEPENDENCIES_HOST_PREREQ): HOSTCXX=$(HOSTCXX_NOCCACHE)
$(DEPENDENCIES_HOST_PREREQ): core-dependencies
dependencies: core-dependencies $(DEPENDENCIES_HOST_PREREQ)
################################################################################
#
# Toplevel Makefile options
#
################################################################################
.PHONY: dependencies core-dependencies