Clean operations are now toolchain specific

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@542 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-01-10 13:38:13 +00:00
parent 435528e7a0
commit 0e4924079a
31 changed files with 83 additions and 49 deletions

View File

@ -16,7 +16,7 @@
</b></big> </b></big>
<p><small>by</small></p> <p><small>by</small></p>
<p>Gregory Nutt</p> <p>Gregory Nutt</p>
<p><small>Last Update: January 6, 2006</small></p> <p><small>Last Update: January 10, 2008</small></p>
</center> </center>
<center><h1>Table of Contents</h1></center> <center><h1>Table of Contents</h1></center>
@ -518,7 +518,7 @@
<ul> <ul>
<li>Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP</li> <li>Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP</li>
<li>Tool options: CFLAGS, LDFLAGS</li> <li>Tool options: CFLAGS, LDFLAGS</li>
<li>COMPILE, ASSEMBLE, ARCHIVE, and MKDEP macros</li> <li>COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros</li>
</ul> </ul>
<p> <p>
When this makefile fragment runs, it will be passed TOPDIR which When this makefile fragment runs, it will be passed TOPDIR which

View File

@ -217,7 +217,7 @@ subdir_clean:
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean @$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
clean: subdir_clean clean: subdir_clean
rm -f $(BIN) $(BIN).* mm_test *.map *~ @rm -f $(BIN) $(BIN).* mm_test *.map *~
subdir_distclean: subdir_distclean:
@for dir in $(CLEANDIRS) ; do \ @for dir in $(CLEANDIRS) ; do \
@ -227,6 +227,6 @@ subdir_distclean:
done done
distclean: clean subdir_distclean clean_context distclean: clean subdir_distclean clean_context
rm -f Make.defs setenv.sh .config @rm -f Make.defs setenv.sh .config

View File

@ -111,8 +111,8 @@ clean:
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
@rm -f libarch$(LIBEXT) *~ @rm -f libarch$(LIBEXT) *~ .*.swp
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \

View File

@ -113,7 +113,8 @@ clean:
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi fi
rm -f libarch$(LIBEXT) *.o *.obj *~ @rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \

View File

@ -113,12 +113,13 @@ clean:
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi fi
rm -f libarch$(LIBEXT) *.o *.obj *~ @rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \ $(MAKE) -C board TOPDIR=$(TOPDIR) distclean ; \
fi fi
rm -f Make.dep .depend @rm -f Make.dep .depend
-include Make.dep -include Make.dep

View File

@ -211,9 +211,8 @@ clean:
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \ $(MAKE) -C board TOPDIR=$(TOPDIR) clean ; \
fi fi
rm -f libarch$(LIBEXT) up_mem.h @rm -f libarch$(LIBEXT) up_mem.h *~ .*.swp
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~ $(call CLEAN)
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
distclean: clean distclean: clean
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \

View File

@ -101,8 +101,8 @@ nuttx$(EXEEXT): $(LINKOBJS)
depend: .depend depend: .depend
clean: clean:
@rm -f libarch$(LIBEXT) *~ @rm -f libarch$(LIBEXT) *~ .*.swp
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
@rm -f Make.dep .depend @rm -f Make.dep .depend

View File

@ -99,8 +99,8 @@ clean:
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
@rm -f libarch$(LIBEXT) *~ @rm -f libarch$(LIBEXT) *~ .*.swp
@if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \

View File

@ -234,10 +234,8 @@ clean:
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* @rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* *~ .*.swp
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex $(call CLEAN)
rm -f core *~ .*.swp *.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
distclean: clean distclean: clean
@if [ -e board/Makefile ]; then \ @if [ -e board/Makefile ]; then \

View File

@ -81,7 +81,7 @@ Make.defs -- This makefile fragment provides architecture and
Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP
Tool options: CFLAGS, LDFLAGS Tool options: CFLAGS, LDFLAGS
COMPILE, ASSEMBLE, ARCHIVE, and MKDEP macros COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros
When this makefile fragment runs, it will be passed TOPDIR which When this makefile fragment runs, it will be passed TOPDIR which
is the path to the root directory of the build. This makefile is the path to the root directory of the build. This makefile

View File

@ -84,6 +84,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.o *.a
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -68,8 +68,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) *~ @rm -f libboard$(LIBEXT) *~ .*.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -84,6 +84,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.o *.a
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -65,8 +65,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) *~ @rm -f libboard$(LIBEXT) *~ .*.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -84,6 +84,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.o *.a
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -68,8 +68,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) *~ @rm -f libboard$(LIBEXT) *~ .*.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -84,6 +84,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.o *.a
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -68,8 +68,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) *~ @rm -f libboard$(LIBEXT) *~ .*.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -77,6 +77,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -67,9 +67,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) @rm -f libboard$(LIBEXT) *~ .*.swp
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~ $(call CLEAN)
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -83,6 +83,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.o *.a
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -65,8 +65,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) *~ @rm -f libboard$(LIBEXT) *~ .*.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -131,6 +131,10 @@ define ARCHIVE
$(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; } $(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.obj *.src *.lib *.hex
endef
# This is the tool to use for dependencies (i.e., none) # This is the tool to use for dependencies (i.e., none)
MKDEP = $(TOPDIR)/tools/mknulldeps.sh MKDEP = $(TOPDIR)/tools/mknulldeps.sh

View File

@ -70,8 +70,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) *~ @rm -f libboard$(LIBEXT) *~ .*.swp
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi $(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -82,6 +82,10 @@ define ARCHIVE
$(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; } $(AR) $1 $2 || { echo "$(AR) $1 $2 FAILED!" ; exit 1 ; }
endef endef
define CLEAN
@rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex
endef
MKDEP = $(TOPDIR)/tools/mkdeps.sh MKDEP = $(TOPDIR)/tools/mkdeps.sh
HOSTCC = gcc HOSTCC = gcc

View File

@ -67,9 +67,8 @@ libboard$(LIBEXT): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f libboard$(LIBEXT) @rm -f libboard$(LIBEXT) *~ .*.swp
rm -f *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.ihx *.hex *~ $(call CLEAN)
if [ ! -z "$(OBJEXT)" ]; then rm -f *$(OBJEXT); fi
distclean: clean distclean: clean
rm -f Make.dep .depend rm -f Make.dep .depend

View File

@ -80,9 +80,10 @@ endif
depend: .depend depend: .depend
clean: clean:
rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ @rm -f $(BIN) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend @rm -f Make.dep .depend
-include Make.dep -include Make.dep

View File

@ -66,9 +66,10 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ @rm -f $(BIN) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend @rm -f Make.dep .depend
-include Make.dep -include Make.dep

View File

@ -97,9 +97,10 @@ $(HOST_BIN): $(HOST_OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f $(TARG_BIN) $(HOST_BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ @rm -f $(TARG_BIN) $(HOST_BIN) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend @rm -f Make.dep .depend
-include Make.dep -include Make.dep

View File

@ -79,9 +79,10 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ @rm -f $(BIN) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend @rm -f Make.dep .depend
-include Make.dep -include Make.dep

View File

@ -66,9 +66,10 @@ $(BIN): $(OBJS)
depend: .depend depend: .depend
clean: clean:
rm -f $(BIN) *.o *.obj *.rel *.asm *.lst *.sym *.adb *~ @rm -f $(BIN) *~ .*.swp
$(call CLEAN)
distclean: clean distclean: clean
rm -f Make.dep .depend @rm -f Make.dep .depend
-include Make.dep -include Make.dep