Skip to contentSkip to conversation

Makefile: Exclude tests/Makefile in unconfigured tree

PATCH New Andreas Färber 1 participant 1 message Jan 17, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Exclude tests/Makefile in unconfigured tree

Since commit dbfe06c62ccedc5b64e1c6466445133dd50f6de1 (build:
split unit test builds to a separate makefile fragment), in absence of config-host.mak an undefined $(SRC_PATH) breaks `make distclean' due to /tests/Makefile not being include'able.

Fix by only including when config-host.mak is present.

---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Makefile +2 -0
index 2bbc547..d356f07 100644
@@ -168,7 +168,9 @@ qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
 
 gen-out-type = $(subst .,-,$(suffix $@))
 
+ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/tests/Makefile
+endif
 
 $(qapi-dir)/qga-qapi-types.c $(qapi-dir)/qga-qapi-types.h :\
 $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
Signature · 1 line
1.7.7