From: "Jan Beulich" Subject: Re: [PATCH] build: fix clean rule to cover objects in unvisited subdirs Date: Tue, 01 Dec 2015 05:41:09 -0700 Message-ID: <565DA37502000078000BAB54@prv-mh.provo.novell.com> References: <1448904580-72413-1-git-send-email-jonathan.creekmore@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448904580-72413-1-git-send-email-jonathan.creekmore@gmail.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jonathan Creekmore Cc: Keir Fraser , Tim Deegan , Ian Jackson , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 30.11.15 at 18:29, wrote: > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -173,7 +173,7 @@ FORCE: > > .PHONY: clean > clean:: $(addprefix _clean_, $(subdir-all)) > - rm -f *.o *~ core $(DEPS) > + rm -f *.o *~ core $(DEPS) $(obj-y) While for the moment it would do, using a minimalistic approach like this will make us touch this again the moment we gain files in subdirectories that can be built just optionally. At the very least I'd therefore suggest also adding $(obj-n) and $(obj-) here. It might even be reasonable to grab subdirectories from $(obj-...) and add $(foreach d,$(filtered-subdirs), $(d)/*.o). Or, completely differently, have xen/common/Makefile just have an add-on clean:: (and require this also for future other cases like this). Jan