Skip to contentSkip to conversation

Allow distcleaning of [...]

PATCH New DENX Support System 1 participant 1 message Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Allow distcleaning of [...]

Hello list,

inside the automatic U-Boot patch tracking system a new ticket [DNX#2006033142000883] was created:

<snip>

Quoted 99 lines

* Allow distcleaning of 85xx and 83xx board subdirectories. Patch by Jon Loeliger 17-Jan-2006

---

 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(-)
Makefile +19 -1
index 9305cab..e73d618 100644
@@ -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 .. ; \
board/cds/mpc8541cds/Makefile +3 -0
index 0d4abbd..1161532 100644
@@ -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
 
 #########################################################################
board/cds/mpc8548cds/Makefile +1 -0
index 0d4abbd..1161532 100644
@@ -38,6 +38,7 @@ $(LIB):	$(OBJS) $(SOBJS)
 clean:
 	rm -f $(OBJS) $(SOBJS)
 
+.PHONY: distclean
 distclean:	clean
 	rm -f $(LIB) core *.bak .depend
 

board/cds/mpc8548cds/Makefile distclean: clean · line 47

Quoted 1 line
board/cds/mpc8548cds/Makefile +0 -0
@@ -46,6 +47,8 @@ distclean:	clean
 .depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)

</snip>

Your U-Boot support team