From: DENX Support System Date: Fri, 31 Mar 2006 23:50:36 +0200 Subject: [DNX#2006033142000883] [U-Boot-Users] [PATCH 01/04] Allow distcleaning of [...] Message-ID: <1143841836.462489.370326743@castor.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello list, inside the automatic U-Boot patch tracking system a new ticket [DNX#2006033142000883] was created: > * Allow distcleaning of 85xx and 83xx board subdirectories. > Patch by Jon Loeliger 17-Jan-2006 > > > Signed-off-by: Jon Loeliger > > --- > > Makefile | 20 +++++++++++++++++++- > board/cds/mpc8541cds/Makefile | 3 +++ > board/cds/mpc8548cds/Makefile | 3 +++ > board/cds/mpc8555cds/Makefile | 3 +++ > board/mpc8349ads/Makefile | 3 +++ > board/mpc8540ads/Makefile | 4 +++- > board/mpc8540eval/Makefile | 3 +++ > board/mpc8560ads/Makefile | 4 +++- > board/pm854/Makefile | 3 +++ > board/pm856/Makefile | 3 +++ > board/sbc8560/Makefile | 3 +++ > board/stxgp3/Makefile | 3 +++ > board/tqm834x/Makefile | 3 +++ > board/tqm85xx/Makefile | 3 +++ > 14 files changed, 58 insertions(+), 3 deletions(-) > > > diff --git a/Makefile b/Makefile > index 9305cab..e73d618 100644 > --- a/Makefile > +++ b/Makefile > @@ -135,6 +135,14 @@ SUBDIRS = tools \ > post/cpu > .PHONY : $(SUBDIRS) > > +# Subdirectories that will be "clean" and "distclean". > +# Not all board Makefiles have "clean" and "distclean" yet, > +# so only add those that support it to this list. > +ifneq ($(filter $(CPU),mpc85xx mpc83xx),) > +CLEANDIRS = board/$(BOARDDIR) > +endif > + > + > ######################################################################### > ######################################################################### > > @@ -1846,7 +1854,17 @@ clobber: clean > rm -f include/asm/proc include/asm/arch include/asm > > mrproper \ > -distclean: clobber unconfig > +distclean: cleansubdirs clobber unconfig > + > + > +.PHONY: cleansubdirs > +cleansubdirs: > +ifneq ($(strip $(CLEANDIRS)),) > + @for dir in $(CLEANDIRS) ; do \ > + $(MAKE) -C $$dir distclean; \ > + done > +endif > + > > backup: > F=`basename $(TOPDIR)` ; cd .. ; \ > diff --git a/board/cds/mpc8541cds/Makefile > b/board/cds/mpc8541cds/Makefile > index 0d4abbd..1161532 100644 > --- a/board/cds/mpc8541cds/Makefile > +++ b/board/cds/mpc8541cds/Makefile > @@ -38,6 +38,7 @@ $(LIB): $(OBJS) $(SOBJS) > clean: > rm -f $(OBJS) $(SOBJS) > > +.PHONY: distclean > distclean: clean > rm -f $(LIB) core *.bak .depend > > @@ -46,6 +47,8 @@ distclean: clean > .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) > $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ > > +ifeq ($(filter distclean,$(MAKECMDGOALS)),) > -include .depend > +endif > > ######################################################################### > diff --git a/board/cds/mpc8548cds/Makefile > b/board/cds/mpc8548cds/Makefile > index 0d4abbd..1161532 100644 > --- a/board/cds/mpc8548cds/Makefile > +++ b/board/cds/mpc8548cds/Makefile > @@ -38,6 +38,7 @@ $(LIB): $(OBJS) $(SOBJS) > clean: > rm -f $(OBJS) $(SOBJS) > > +.PHONY: distclean > distclean: clean > rm -f $(LIB) core *.bak .depend > > @@ -46,6 +47,8 @@ distclean: clean > .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) Your U-Boot support team