diff --git a/stubdom/Makefile b/stubdom/Makefile index 1a1f26330b..f339b200b8 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -1,15 +1,18 @@ XEN_ROOT = $(CURDIR)/.. MINI_OS = $(XEN_ROOT)/extras/mini-os -ifeq ($(wildcard $(MINI_OS)/Config.mk),) -$(error Please run `make mini-os-dir' in top-level directory) -endif - export XEN_OS=MiniOS export stubdom=y export debug=y -include $(XEN_ROOT)/Config.mk + +ifeq (,$(findstring clean,$(MAKECMDGOALS))) + ifeq ($(wildcard $(MINI_OS)/Config.mk),) + $(error Please run `make mini-os-dir' in top-level directory) + endif + include $(XEN_ROOT)/Config.mk +endif + -include $(XEN_ROOT)/config/Stubdom.mk GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH) diff --git a/stubdom/c/Makefile b/stubdom/c/Makefile index c646c26e74..b252dcad0b 100644 --- a/stubdom/c/Makefile +++ b/stubdom/c/Makefile @@ -1,6 +1,8 @@ XEN_ROOT = $(CURDIR)/../.. +ifeq (,$(findstring clean,$(MAKECMDGOALS))) include $(XEN_ROOT)/Config.mk +endif all: main.a diff --git a/stubdom/caml/Makefile b/stubdom/caml/Makefile index e79c98df13..f550de1680 100644 --- a/stubdom/caml/Makefile +++ b/stubdom/caml/Makefile @@ -1,6 +1,8 @@ XEN_ROOT = $(CURDIR)/../.. +ifeq (,$(findstring clean,$(MAKECMDGOALS))) include $(XEN_ROOT)/Config.mk +endif CAMLLIB = $(shell $(OCAMLC_CROSS_PREFIX)ocamlc -where) DEF_CPPFLAGS += -I$(CAMLLIB)