[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 02/13] tools/libfsimage: Fix clean and distclean make targets



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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.