All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stubdom: fix make clean and distclean on a freshly cloned tree
@ 2015-03-02 11:09 Wei Liu
  2015-03-02 11:15 ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-03-02 11:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Sander Eikelenboom, Wei Liu, Ian Campbell

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.

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>
---
 stubdom/Makefile      | 13 ++++++++-----
 stubdom/c/Makefile    |  2 ++
 stubdom/caml/Makefile |  2 ++
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 1a1f263..f339b20 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 c646c26..b252dca 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 e79c98d..f550de1 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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-02 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02 11:09 [PATCH] stubdom: fix make clean and distclean on a freshly cloned tree Wei Liu
2015-03-02 11:15 ` Wei Liu
2015-03-02 14:15   ` Ian Campbell
2015-03-02 14:25     ` Wei Liu
2015-03-02 14:34       ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.