All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build: Conditional build/clean/distclean targets on subsystems
@ 2013-05-02 23:17 Julien Grall
  2013-05-03  7:15 ` Jan Beulich
  0 siblings, 1 reply; 13+ messages in thread
From: Julien Grall @ 2013-05-02 23:17 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, ian.jackson, ian.campbell, patches

The commit 3378685 "Add conditional build of subsystems to configure.ac"
allows the user to disable/enable some components of Xen. After this commit
some targets are still called on every subsystems.

For Xen on ARM, the makefile targets build, clean and distclean will failed.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 Makefile |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 51 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 32efb70..2217c20 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,9 @@ all: dist
 SUBSYSTEMS?=xen kernels tools stubdom docs
 TARGS_DIST=$(patsubst %, dist-%, $(SUBSYSTEMS))
 TARGS_INSTALL=$(patsubst %, install-%, $(SUBSYSTEMS))
+TARGS_BUILD=$(patsubst %, install-%, $(SUBSYSTEMS))
+TARGS_CLEAN=$(patsubst %, clean-%, $(SUBSYSTEMS))
+TARGS_DISTCLEAN=$(patsubst %, distclean-%, $(SUBSYSTEMS))
 
 export XEN_ROOT=$(CURDIR)
 include Config.mk
@@ -23,15 +26,28 @@ include buildconfigs/Rules.mk
 install: $(TARGS_INSTALL)
 
 .PHONY: build
-build: kernels
+build: $(TARGS_BUILD)
+
+.PHONY: build-xen
+build-xen:
 	$(MAKE) -C xen build
+
+.PHONY: build-tools
+build-tools:
 	$(MAKE) -C tools build
+
+.PHONY: build-stubdom
 	$(MAKE) -C stubdom build
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom pv-grub
 endif
+
+.PHONY: build-docs
+build-docs:
 	$(MAKE) -C docs build
 
+build-kernels: kernels
+
 # The test target is for unit tests that can run without an installation.  Of
 # course, many tests require a machine running Xen itself, and these are
 # handled elsewhere.
@@ -146,30 +162,59 @@ debball: dist
 
 # clean doesn't do a kclean
 .PHONY: clean
-clean::
+clean:: $(TARGS_CLEAN)
+
+.PHONY: clean-xen
+clean-xen:
 	$(MAKE) -C xen clean
+
+.PHONY: clean-tools
+clean-tools:
 	$(MAKE) -C tools clean
+
+.PHONY: clean-stubdom
+clean-stubdom:
 	$(MAKE) -C stubdom crossclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom crossclean
 endif
+
+.PHONY: clean-docs
+clean-docs:
 	$(MAKE) -C docs clean
 
+clean-%:
+	@: # do nothing
+
 # clean, but blow away kernel build tree plus tarballs
 .PHONY: distclean
-distclean:
+distclean: $(TARGS_DISTCLEAN)
 	-rm config/Toplevel.mk
+	rm -rf dist patches/tmp
+	rm -rf patches/*/.makedep
+	rm -rf config.log config.status config.cache autom4te.cache
+
+.PHONY: distclean-xen
+distclean-xen:
 	$(MAKE) -C xen distclean
+
+.PHONY: distclean-tools
+tools-distclean:
 	$(MAKE) -C tools distclean
+
+.PHONY: distclean-stubdom
+distclean-stubdom:
 	$(MAKE) -C stubdom distclean
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
+
+.PHONY: distclean-docs
+distclean-docs:
 	$(MAKE) -C docs distclean
-	rm -rf dist patches/tmp
+
+distclean-kernels:
 	for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
-	rm -rf patches/*/.makedep
-	rm -rf config.log config.status config.cache autom4te.cache
 
 # Linux name for GNU distclean
 .PHONY: mrproper
-- 
1.7.10.4

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

end of thread, other threads:[~2013-05-10 14:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 23:17 [PATCH] build: Conditional build/clean/distclean targets on subsystems Julien Grall
2013-05-03  7:15 ` Jan Beulich
2013-05-03  8:43   ` Ian Campbell
2013-05-03  9:53     ` Ian Campbell
2013-05-03 10:52       ` Julien Grall
2013-05-03 11:13         ` Andrew Cooper
2013-05-07 17:27           ` Ian Jackson
2013-05-08 10:22             ` George Dunlap
2013-05-08 11:18               ` Ian Campbell
2013-05-08 12:14                 ` Andrew Cooper
2013-05-08 12:51                   ` Ian Jackson
2013-05-08 12:59                     ` George Dunlap
2013-05-10 14:02                   ` 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.