OSDN Git Service

Do not recurse into ldso/libc/libpthread on clean
authorPeter S. Mazinger <ps.m@gmx.net>
Tue, 4 Oct 2005 14:47:17 +0000 (14:47 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Tue, 4 Oct 2005 14:47:17 +0000 (14:47 -0000)
Makefile
ldso/Makefile
ldso/libdl/Makefile
libpthread/Makefile

index b46518d..c54251d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -348,13 +348,13 @@ defconfig: extra/config/conf
 
 clean:
        @$(RM) -r lib include/bits
-       $(RM) */*.so */*.a
+       $(RM) libc/*.a libc/obj.* libc/nonshared_obj.*
        $(RM) libc/misc/internals/interp.c
+       $(RM) ldso/libdl/*.a
        $(RM) include/fpu_control.h
        $(MAKE) -C extra/locale clean
-       $(MAKE) -C ldso clean
-       $(MAKE) -C libc clean
-       $(MAKE) -C libpthread clean
+       $(MAKE) -C ldso headers_clean
+       $(MAKE) -C libpthread headers_clean
        $(MAKE) -C test clean
        $(MAKE) -C utils clean
        @set -e; \
@@ -370,9 +370,10 @@ clean:
        @if [ -d libc/sysdeps/linux/$(TARGET_ARCH) ]; then              \
            $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) clean;         \
        fi
-       - find . \( -name \*.o -o -name core -o -name .\#\* \) -exec $(RM) {} \;
+       -find . -name \*.o -exec $(RM) {} \;
 
 distclean: clean
+       -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\#\* \) -exec $(RM) {} \;
        $(RM) .config .config.old .config.cmd
        $(RM) extra/locale/*.txt
        $(MAKE) -C extra clean
index 340ddfa..07bf632 100644 (file)
@@ -43,9 +43,11 @@ include/dl-progname.h:
        echo '#include "$(TARGET_ARCH)/elfinterp.c"' \
                > include/dl-progname.h
 
-clean: subdirs_clean
+headers_clean:
        $(RM) $(HEADERS)
 
+clean: subdirs_clean headers_clean
+
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
 
index 8101b08..76149ad 100644 (file)
@@ -92,4 +92,4 @@ libdl_pic.o: libdl.c
        $(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-       $(RM) *.o *~ core *.a
+       $(RM) *.[oa] *~ core
index 1829291..a1cdcae 100644 (file)
@@ -67,10 +67,12 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy
 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
        $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
 
-clean: subdirs_clean
+headers_clean:
        $(RM)   $(TOPDIR)include/pthread.h $(TOPDIR)include/semaphore.h \
                $(TOPDIR)include/thread_db.h \
                $(TOPDIR)include/bits/pthreadtypes.h $(TOPDIR)include/bits/semaphore.h \
                $(TOPDIR)include/bits/libc-lock.h $(TOPDIR)include/bits/stdio-lock
 
+clean: subdirs_clean headers_clean
+
 .PHONY: dummy