From patchwork Thu May 2 23:17:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16608 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 855F4238EC for ; Thu, 2 May 2013 23:18:20 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gf12sf1876126vcb.8 for ; Thu, 02 May 2013 16:18:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=b5yKrWHavQdCoJK1PKqBGe5WhSfmy3zOS/iMXFSSc5g=; b=p2cOC0xafPTiJPcPNLm9FEoKQZNaOoSZS/dj9zkn6xqQ5/zKjc9IJt6T79RfxlNeCQ 7F8iZI4DtIUVLTQzaAwBsDBgG1VdzrrRACyDVRx1xnZHmeicQ7hj/Io7a8gHxAKsS4cp hcgRiRdhwgZT81CCDkDiEKWIA8dUec0uspEaLoweEzvb2bwxgQaVG6IYWbXegglgUzTX xSCT1DcARC5U6K9OQ75K2hhpN7TqGxLYb4J+A3ebZazbf9jYA2x5x2WusOT3EBgqcNj0 1B7vaItsCcphE7g2acLUrRguMsqJmkndXs5fiCb+YEk3TBqcQm64Ccb/2vKcC8WWCFbm f3Eg== X-Received: by 10.236.36.44 with SMTP id v32mr6920473yha.33.1367536691810; Thu, 02 May 2013 16:18:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.197 with SMTP id e5ls1561741qeo.42.gmail; Thu, 02 May 2013 16:18:11 -0700 (PDT) X-Received: by 10.52.74.35 with SMTP id q3mr2525839vdv.39.1367536691364; Thu, 02 May 2013 16:18:11 -0700 (PDT) Received: from mail-vb0-x22a.google.com (mail-vb0-x22a.google.com [2607:f8b0:400c:c02::22a]) by mx.google.com with ESMTPS id iz8si3927300vdb.84.2013.05.02.16.18.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 16:18:11 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22a; Received: by mail-vb0-f42.google.com with SMTP id w16so961111vbf.15 for ; Thu, 02 May 2013 16:18:11 -0700 (PDT) X-Received: by 10.220.189.9 with SMTP id dc9mr2925248vcb.8.1367536690790; Thu, 02 May 2013 16:18:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp224049veb; Thu, 2 May 2013 16:18:10 -0700 (PDT) X-Received: by 10.194.119.202 with SMTP id kw10mr10775507wjb.26.1367536689431; Thu, 02 May 2013 16:18:09 -0700 (PDT) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [2a00:1450:400c:c00::235]) by mx.google.com with ESMTPS id gi5si2435532wjd.33.2013.05.02.16.18.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 16:18:09 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::235 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c00::235; Received: by mail-wg0-f53.google.com with SMTP id y10so1150346wgg.32 for ; Thu, 02 May 2013 16:18:08 -0700 (PDT) X-Received: by 10.180.37.101 with SMTP id x5mr126410wij.0.1367536688621; Thu, 02 May 2013 16:18:08 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id eu18sm31371275wid.1.2013.05.02.16.18.06 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 16:18:07 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, patches@linaro.org, ian.jackson@eu.citrix.com, Julien Grall Subject: [PATCH] build: Conditional build/clean/distclean targets on subsystems Date: Fri, 3 May 2013 00:17:53 +0100 Message-Id: <1367536673-26300-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQnbJQcSJRT4jaW8Bu7VoqN0DP0tuvq60hy59yo2YG6WaRGHDrluTVp8u2fv6ErzjCe3ZyMc X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Signed-off-by: Ian Campbell --- 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