From 1286abd45a554c42dae8f369be9177dd7bb9eed9 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 31 Jan 2019 11:37:56 +0100 Subject: [PATCH] tools: fix build dependency upon generated header(s) Commit fd35f32b4b ("tools/x86emul: Use struct cpuid_policy in the userspace test harnesses") didn't account for the dependencies of cpuid-autogen.h to potentially change between incremental builds. Putting the make invocation to produce the header together with the directory tree creation therefore does not work. Introduce a separate goal. Signed-off-by: Jan Beulich Acked-by: Wei Liu Release-acked-by: Juergen Gross --- tools/include/Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/include/Makefile b/tools/include/Makefile index 22df221daa..d693810053 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -4,8 +4,9 @@ include $(XEN_ROOT)/tools/Rules.mk # Relative to $(XEN_ROOT)/xen/xsm/flask FLASK_H_DEPEND := policy/initial_sids -.PHONY: all build -all build: xen-foreign xen/.dir xen-xsm/.dir +.PHONY: all all-y build +all build: all-y xen-foreign xen/.dir xen-xsm/.dir +all-y: .PHONY: xen-foreign xen-foreign: @@ -27,10 +28,12 @@ ifeq ($(CONFIG_X86),y) for f in $(filter-out %autogen.h,$(patsubst $(XEN_ROOT)/xen/include/xen/lib/x86/%,%,Makefile $(wildcard $(XEN_ROOT)/xen/include/xen/lib/x86/*.h))); do \ ln -sf $(XEN_ROOT)/xen/include/xen/lib/x86/$$f xen/lib/x86/$$f; \ done - $(MAKE) -C xen/lib/x86 all XEN_ROOT=$(XEN_ROOT) endif touch $@ +all-$(CONFIG_X86): xen/.dir + $(MAKE) -C xen/lib/x86 all XEN_ROOT=$(XEN_ROOT) + # Not xen/xsm as that clashes with link to # $(XEN_ROOT)/xen/include/public/xsm above. xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \ -- 2.39.5