From: Ian Campbell Subject: Re: [PATCH 02/13] tools/libfsimage: Fix clean and distclean make targets Date: Thu, 9 May 2013 09:17:01 +0100 Message-ID: <1368087421.17285.90.camel@zakaz.uk.xensource.com> References: <1367927508-3504-1-git-send-email-daniel.kiper@oracle.com> <1367927508-3504-3-git-send-email-daniel.kiper@oracle.com> <20873.12788.795951.761176@mariner.uk.xensource.com> <20130508192502.GB5221@debian70-amd64.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130508192502.GB5221@debian70-amd64.local.net-space.pl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel Kiper Cc: "xen-devel@lists.xensource.com" , "Keir (Xen.org)" , Stefano Stabellini , "Tim (Xen.org)" , Ian Jackson , "jbeulich@suse.com" , "samuel.thibault@ens-lyon.org" , "dgdegra@tycho.nsa.gov" List-Id: xen-devel@lists.xenproject.org On Wed, 2013-05-08 at 20:25 +0100, Daniel Kiper wrote: > On Tue, May 07, 2013 at 05:55:16PM +0100, Ian Jackson wrote: > > Daniel Kiper writes ("[PATCH 02/13] tools/libfsimage: Fix clean and distclean make targets"): > > > Define clean and distclean make targets as double-colon rules. > > > > To clarify: AIUI the effect of doing this in libfsimage/Rules.mk is > > that if other Makefiles which include libfsimage/Rules.mk also define > > clean and/or distclean, (a) they must do so with double-colon rather > > than single-colon and (b) all the commands (from libfsimage/Rules.mk > > and Makefile) will be run. > > Right. > > > Is that right ? At the moment, after your patch, the > > double-colon-ness doesn't have any effect ? > > If there is a single colon then make executes only > one target and displays following warning: > > Makefile:35: warning: overriding commands for target `clean' > tools/libfsimage/common/../../../tools/libfsimage/Rules.mk:25: > warning: ignoring old commands for target `clean' > Makefile:35: warning: overriding commands for target `distclean' > tools/libfsimage/common/../../../tools/libfsimage/Rules.mk:25: > warning: ignoring old commands for target `distclean' > > My patch fixes this issue. However, I have just realized > that I forgot about other makefiles in subdirs. I will fix > it and post new patch. The two sets of rules seem to be in fsimage/common/Makefile: clean distclean: rm -f $(PIC_OBJS) $(LIB) $(DEPS) and in tools/libfsimage/Rules.mk: clean distclean: rm -f $(PIC_OBJS) $(FSLIB) $(DEPS) Which seems a bit redundant anyway, perhaps rather than allowing both rules we should combine them and just have tools/libfsimage/Rules.mk: clean distclean: rm -f $(PIC_OBJS) $(LIB) $(FSLIB) $(DEPS) ? Ian