forked from linux-kdevops/kdevops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.min_deps
46 lines (37 loc) · 1.38 KB
/
Makefile.min_deps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# SPDX-License-Identifier: copyleft-next-0.3.1
# These are minimal kdevops dependencies. If you don' thave this we
# won't be able to help you. This is meant to be kept simple. If you
# have something more elaborate, like a version check add it to its
# own file as we do with scripts/version_check/ansible-playbook
BINARY_DEPS :=
BINARY_DEPS += sudo
BINARY_DEPS += make
BINARY_DEPS += nc
BINARY_DEPS += ansible-playbook
ifneq (y,$(CONFIG_KDEVOPS_FIRST_RUN))
ifeq (y,$(CONFIG_GUESTFS))
BINARY_DEPS += virt-builder
endif
endif
BINARY_DEPS_VCHECKS := $(subst $(TOPDIR)/,,$(wildcard $(TOPDIR)/scripts/version_check/*))
DYNAMIC_DEPS :=
# We *have* to use .PHONY so that these dependencies get understood as rules,
# not targets. However since Make is pretty stupid we must educate it to
# *not* treat these rules as valid *if* the check has already been done once.
ifeq (,$(wildcard $(TOPDIR)/$(KDEVOPS_DEPCHECK)))
DYNAMIC_DEPS += $(BINARY_DEPS)
DYNAMIC_DEPS += $(BINARY_DEPS_VCHECKS)
endif
$(BINARY_DEPS_VCHECKS):
$(Q)echo Doing minimum kdevops version check using $@ ...
$(Q)$(TOPDIR)/$(@)
$(BINARY_DEPS):
$(Q)echo Verifying $@ ...
$(Q)set -e ; which $@ > /dev/null || ( \
echo Missing dependency: $@ ;\
false)
$(KDEVOPS_DEPCHECK): $(DYNAMIC_DEPS)
$(Q)echo The current minimum kdevops expected dependencies are met.
$(Q)touch $(KDEVOPS_DEPCHECK)
PHONY += $(BINARY_DEPS)
PHONY += $(BINARY_DEPS_VCHECKS)