stubdom: fix make clean and distclean on a freshly cloned tree

Clean and distclean targets need not depend on existence of the mini-os
tree. Don't check for mini-os and don't try to blindly include
mini-os's Config.mk when doing clean and distclean.

Note that one subtle issue is that $(XEN_ROOT)/Config.mk tries to
include $(XEN_ROOT)/config/$(XEN_OS).mk. In stubdom's case XEN_OS is
"MiniOS". Then $(XEN_ROOT)/config/MiniOS.mk tries to include mini-os's
Config.mk.

Since clean and distclean don't enforce existence of mini-os tree, don't
include $(XEN_ROOT)/Config.mk to avoid getting error due to the
aforementioned issue.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Wei Liu authored and Ian Campbell committed 2015-03-02 16:27:38 +00:00
1 parent 588df84c0d
commit ed6dd1db77
3 files changed
+12 -5

No files matched your search

+8 -5
View File
@@ -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)
+2
View File
@@ -1,6 +1,8 @@
XEN_ROOT = $(CURDIR)/../..
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
include $(XEN_ROOT)/Config.mk
endif
all: main.a
+2
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.