Browse Source

Peter Kjellerstedt writes:

rm.patch:
* Define $(RM) as rm -f in Rules.mak and test/Rules.mak
  (this is the same definition as gmake uses by default).
* Change all occurrences of rm and rm -f into $(RM).
Eric Andersen 20 years ago
parent
commit
dd3fb0f8c1
96 changed files with 188 additions and 194 deletions
  1. 38 38
      Makefile
  2. 1 0
      Rules.mak
  3. 1 1
      extra/Makefile
  4. 3 3
      extra/config/Makefile
  5. 1 1
      extra/gcc-uClibc/Makefile
  6. 5 5
      extra/locale/Makefile
  7. 2 2
      ldso/Makefile
  8. 3 3
      ldso/ldso/Makefile
  9. 3 4
      ldso/libdl/Makefile
  10. 1 1
      ldso/man/Makefile
  11. 1 1
      ldso/util/Makefile
  12. 8 8
      libc/Makefile
  13. 1 1
      libc/inet/Makefile
  14. 1 1
      libc/inet/rpc/Makefile
  15. 1 1
      libc/misc/Makefile
  16. 1 1
      libc/misc/assert/Makefile
  17. 1 1
      libc/misc/ctype/Makefile
  18. 1 1
      libc/misc/dirent/Makefile
  19. 1 1
      libc/misc/error/Makefile
  20. 1 1
      libc/misc/file/Makefile
  21. 1 1
      libc/misc/fnmatch/Makefile
  22. 1 1
      libc/misc/ftw/Makefile
  23. 1 1
      libc/misc/glob/Makefile
  24. 1 1
      libc/misc/gnu/Makefile
  25. 1 1
      libc/misc/internals/Makefile
  26. 1 1
      libc/misc/intl/Makefile
  27. 1 1
      libc/misc/locale/Makefile
  28. 1 1
      libc/misc/mntent/Makefile
  29. 1 1
      libc/misc/pthread/Makefile
  30. 1 1
      libc/misc/regex/Makefile
  31. 1 1
      libc/misc/search/Makefile
  32. 1 1
      libc/misc/statfs/Makefile
  33. 1 1
      libc/misc/syslog/Makefile
  34. 1 1
      libc/misc/sysvipc/Makefile
  35. 1 1
      libc/misc/time/Makefile
  36. 1 1
      libc/misc/ttyent/Makefile
  37. 1 1
      libc/misc/utmp/Makefile
  38. 1 1
      libc/misc/wchar/Makefile
  39. 1 1
      libc/misc/wctype/Makefile
  40. 1 1
      libc/misc/wordexp/Makefile
  41. 1 1
      libc/pwd_grp/Makefile
  42. 1 1
      libc/signal/Makefile
  43. 1 1
      libc/stdio/Makefile
  44. 1 1
      libc/stdlib/Makefile
  45. 1 1
      libc/stdlib/malloc-930716/Makefile
  46. 1 1
      libc/stdlib/malloc/Makefile
  47. 1 1
      libc/string/Makefile
  48. 2 2
      libc/sysdeps/linux/alpha/Makefile
  49. 2 2
      libc/sysdeps/linux/arm/Makefile
  50. 1 1
      libc/sysdeps/linux/common/Makefile
  51. 1 1
      libc/sysdeps/linux/cris/Makefile
  52. 3 3
      libc/sysdeps/linux/e1/Makefile
  53. 2 2
      libc/sysdeps/linux/h8300/Makefile
  54. 2 2
      libc/sysdeps/linux/i386/Makefile
  55. 2 2
      libc/sysdeps/linux/i960/Makefile
  56. 3 3
      libc/sysdeps/linux/m68k/Makefile
  57. 2 2
      libc/sysdeps/linux/microblaze/Makefile
  58. 3 3
      libc/sysdeps/linux/mips/Makefile
  59. 2 2
      libc/sysdeps/linux/powerpc/Makefile
  60. 2 2
      libc/sysdeps/linux/sh/Makefile
  61. 2 2
      libc/sysdeps/linux/sh64/Makefile
  62. 2 2
      libc/sysdeps/linux/sparc/Makefile
  63. 2 2
      libc/sysdeps/linux/v850/Makefile
  64. 1 1
      libc/termios/Makefile
  65. 1 1
      libc/unistd/Makefile
  66. 3 4
      libcrypt/Makefile
  67. 3 4
      libintl/Makefile
  68. 3 4
      libm/Makefile
  69. 1 1
      libm/powerpc/Makefile
  70. 3 4
      libnsl/Makefile
  71. 5 7
      libpthread/Makefile
  72. 1 1
      libpthread/linuxthreads/Makefile
  73. 1 1
      libpthread/linuxthreads_db/Makefile
  74. 3 4
      libresolv/Makefile
  75. 3 4
      libutil/Makefile
  76. 1 1
      test/Makefile
  77. 2 0
      test/Rules.mak
  78. 1 1
      test/args/Makefile
  79. 1 1
      test/assert/Makefile
  80. 1 1
      test/crypt/Makefile
  81. 1 1
      test/ctype/Makefile
  82. 1 1
      test/dlopen/Makefile
  83. 1 1
      test/malloc/Makefile
  84. 1 1
      test/math/Makefile
  85. 2 2
      test/misc/Makefile
  86. 1 1
      test/mmap/Makefile
  87. 1 1
      test/pthread/Makefile
  88. 1 1
      test/pwd_grp/Makefile
  89. 1 1
      test/setjmp/Makefile
  90. 1 1
      test/signal/Makefile
  91. 2 2
      test/silly/Makefile
  92. 2 2
      test/stat/Makefile
  93. 1 1
      test/stdlib/Makefile
  94. 1 1
      test/string/Makefile
  95. 1 1
      test/termios/Makefile
  96. 1 1
      test/unistd/Makefile

+ 38 - 38
Makefile

@@ -116,7 +116,7 @@ include/bits/uClibc_config.h: .config
 	@if [ ! -x ./extra/config/conf ] ; then \
 	    make -C extra/config conf; \
 	fi;
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
 
@@ -198,58 +198,58 @@ install_dev:
 	tar -chf - include | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX);
 ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
 	# Remove floating point related headers since float support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/complex.h
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/fpu_control.h
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/ieee754.h
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/math.h
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/tgmath.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/complex.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/fpu_control.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/ieee754.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/math.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/tgmath.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_WCHAR)),y)
 	# Remove wide char headers since wide char support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/wctype.h
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/wchar.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/wctype.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/wchar.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_LOCALE)),y)
 	# Remove iconv header since locale support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/iconv.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/iconv.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF)),y)
 	# Remove printf header since custom print specifier support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/printf.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/printf.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_XLOCALE)),y)
 	# Remove xlocale header since extended locale support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/xlocale.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/xlocale.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_GETTEXT_AWARENESS)),y)
 	# Remove libintl header since gettext support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/libintl.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/libintl.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_REGEX)),y)
 	# Remove regex headers since regex support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/regex.h
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/regexp.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/regex.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/regexp.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_WORDEXP)),y)
 	# Remove wordexp header since wordexp support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/wordexp.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/wordexp.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_FTW)),y)
 	# Remove ftw header since ftw support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/ftw.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/ftw.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_GLOB)),y)
 	# Remove glob header since glob support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/glob.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/glob.h
 endif
 ifneq ($(strip $(UCLIBC_HAS_GNU_GETOPT)),y)
 	# Remove getopt header since gnu getopt support is disabled.
-	rm $(PREFIX)$(DEVEL_PREFIX)/include/getopt.h
+	$(RM) $(PREFIX)$(DEVEL_PREFIX)/include/getopt.h
 endif
 	-@for i in `find  $(PREFIX)$(DEVEL_PREFIX) -type d` ; do \
 	    chmod -f 755 $$i; chmod -f 644 $$i/*.h; \
 	done;
-	-find $(PREFIX)$(DEVEL_PREFIX) -name CVS | xargs rm -rf;
+	-find $(PREFIX)$(DEVEL_PREFIX) -name CVS | xargs $(RM) -r;
 	-chown -R `id | sed 's/^uid=\([0-9]*\).*gid=\([0-9]*\).*$$/\1.\2/'` $(PREFIX)$(DEVEL_PREFIX)
 ifeq ($(strip $(HAVE_SHARED)),y)
 	-$(INSTALL) -m 644 lib/*.so $(PREFIX)$(DEVEL_PREFIX)/lib/
@@ -388,44 +388,44 @@ buildmconf:
 	make -C extra/config ncurses mconf
 
 menuconfig: extra/config/mconf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/mconf extra/Configs/Config.$(TARGET_ARCH)
 
 config: extra/config/conf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf extra/Configs/Config.$(TARGET_ARCH)
 
 oldconfig: extra/config/conf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf -o extra/Configs/Config.$(TARGET_ARCH)
 
 randconfig: extra/config/conf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf -r extra/Configs/Config.$(TARGET_ARCH)
 
 allyesconfig: extra/config/conf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf -y extra/Configs/Config.$(TARGET_ARCH)
 
 allnoconfig: extra/config/conf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf -n extra/Configs/Config.$(TARGET_ARCH)
 
 defconfig: extra/config/conf
-	rm -rf include/bits
+	$(RM) -r include/bits
 	$(INSTALL) -d include/bits
 	@./extra/config/conf -d extra/Configs/Config.$(TARGET_ARCH)
 
 
 clean:
-	- find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core -o -name .\#\* \) -exec rm -f {} \;
-	@rm -rf tmp lib include/bits libc/tmp _install
+	- find . \( -name \*.o -o -name \*.a -o -name \*.so -o -name core -o -name .\#\* \) -exec $(RM) {} \;
+	@$(RM) -r tmp lib include/bits libc/tmp _install
 	$(MAKE) -C test clean
 	$(MAKE) -C ldso clean
 	$(MAKE) -C libc/misc/internals clean
@@ -436,36 +436,36 @@ clean:
 	$(MAKE) -C extra/locale clean
 	@set -e; \
 	for i in `(cd $(TOPDIR)/libc/sysdeps/linux/common/sys; ls *.h)` ; do \
-		rm -f include/sys/$$i; \
+		$(RM) include/sys/$$i; \
 	done; \
 	if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
 		for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
-			rm -f include/sys/$$i; \
+			$(RM) include/sys/$$i; \
 		done; \
 	fi;
-	@rm -f include/linux include/scsi include/asm
+	@$(RM) include/linux include/scsi include/asm
 	@if [ -d libc/sysdeps/linux/$(TARGET_ARCH) ]; then		\
 	    $(MAKE) -C libc/sysdeps/linux/$(TARGET_ARCH) clean;		\
 	fi;
 	@if [ "$(TARGET_ARCH)" = "mipsel" ]; then \
 	    $(MAKE) -C libc/sysdeps/linux/mips clean; \
-	    rm -f ldso/ldso/mipsel; \
-	    rm -f libc/sysdeps/linux/mipsel; \
-	    rm -f libpthread/linuxthreads/sysdeps/mipsel; \
+	    $(RM) ldso/ldso/mipsel; \
+	    $(RM) libc/sysdeps/linux/mipsel; \
+	    $(RM) libpthread/linuxthreads/sysdeps/mipsel; \
 	fi;
 
 distclean: clean
-	rm -f .config .config.old .config.cmd
+	$(RM) .config .config.old .config.cmd
 	$(MAKE) -C extra clean
 
 release: distclean
 	cd ..;					\
-	rm -rf uClibc-$(VERSION);		\
+	$(RM) -r uClibc-$(VERSION);		\
 	cp -fa uClibc uClibc-$(VERSION);	\
 	find uClibc-$(VERSION)/ -type f		\
-	    -name .\#* -exec rm -rf {} \; ;	\
+	    -name .\#* -exec $(RM) -r {} \; ;	\
 	find uClibc-$(VERSION)/ -type d		\
-	    -name CVS  -exec rm -rf {} \; ;	\
+	    -name CVS  -exec $(RM) -r {} \; ;	\
 						\
 	tar -cvzf uClibc-$(VERSION).tar.gz uClibc-$(VERSION)/;
 

+ 1 - 0
Rules.mak

@@ -44,6 +44,7 @@ NM= $(CROSS)nm
 STRIPTOOL= $(CROSS)strip
 
 INSTALL= install
+RM= rm -f
 
 # Select the compiler needed to build binaries for your development system
 HOSTCC=gcc

+ 1 - 1
extra/Makefile

@@ -35,7 +35,7 @@ tags:
 	ctags -R
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS) $(EXTRA_DIRS_TO_CLEAN))

+ 3 - 3
extra/config/Makefile

@@ -103,9 +103,9 @@ endif
 ncurses:
 	@echo "main() {}" > lxtemp.c
 	@if $(HOSTCC) lxtemp.c $(LIBS) ; then \
-		rm -f lxtemp.c a.out; \
+		$(RM) lxtemp.c a.out; \
 	else \
-		rm -f lxtemp.c; \
+		$(RM) lxtemp.c; \
 		echo -e "\007" ;\
 		echo ">> Unable to find the Ncurses libraries." ;\
 		echo ">>" ;\
@@ -119,6 +119,6 @@ ncurses:
 	fi
 
 clean:
-	rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \
+	$(RM) *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \
 		conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h
 

+ 1 - 1
extra/gcc-uClibc/Makefile

@@ -85,4 +85,4 @@ endif
 	done
 
 clean:
-	rm -f gcc-uClibc.h *-uclibc-gcc *-uclibc-ld core
+	$(RM) gcc-uClibc.h *-uclibc-gcc *-uclibc-ld core

+ 5 - 5
extra/locale/Makefile

@@ -86,10 +86,10 @@ pregen:
 	cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f gen_wc8bit gen_wctype gen_locale gen_ldc gen_collate
-	rm -f c8tables.h wctables.h locale_tables.h lt_defines.h locale_collate.h
-	rm -f gen_mmap locale.mmap lmmtolso
-	rm -f locale_data.c uClibc_locale_data.h
+	$(RM) *.[oa] *~ core
+	$(RM) gen_wc8bit gen_wctype gen_locale gen_ldc gen_collate
+	$(RM) c8tables.h wctables.h locale_tables.h lt_defines.h locale_collate.h
+	$(RM) gen_mmap locale.mmap lmmtolso
+	$(RM) locale_data.c uClibc_locale_data.h
 
 .PHONY: pregen links-target

+ 2 - 2
ldso/Makefile

@@ -51,5 +51,5 @@ headers:
 
 clean:
 	set -e ; for d in $(ALL_SUBDIRS) ; do $(MAKE) -C $$d $@ ; done
-	-find . -name '*~' | xargs rm -f
-	rm -f include/elf.h include/boot1_arch.h include/ld_syscalls.h include/ld_sysdep.h
+	-find . -name '*~' | xargs $(RM)
+	$(RM) include/elf.h include/boot1_arch.h include/ld_syscalls.h include/ld_sysdep.h

+ 3 - 3
ldso/ldso/Makefile

@@ -44,6 +44,7 @@ endif
 XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp")
 LDFLAGS=$(CPU_LDFLAGS-y) -shared --warn-common --export-dynamic --sort-common \
 	-z combreloc --discard-locals --discard-all
+
 CSRC= ldso.c #hash.c readelflib1.c $(TARGET_ARCH)/elfinterp.c
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 ASRC=$(shell ls $(TARGET_ARCH)/*.S)
@@ -90,6 +91,5 @@ $(AOBJS): %.o : %.S
 
 ldso.o: ldso.c hash.c readelflib1.c $(TARGET_ARCH)/elfinterp.c _dl_progname.h
 
-clean::
-	$(RM) -f $(UCLIBC_LDSO)* $(OBJS) $(LDSO_FULLNAME)* core *.o *.a *.s *.i _dl_progname.h ldso.h *~
-
+clean:
+	$(RM) $(UCLIBC_LDSO)* $(OBJS) $(LDSO_FULLNAME)* core *.o *.a *.s *.i _dl_progname.h ldso.h *~

+ 3 - 4
ldso/libdl/Makefile

@@ -61,7 +61,7 @@ ar-target: $(OBJS) $(PIC_OBJS)
 	$(AR) $(ARFLAGS) $(LIBDL) ../ldso/$(TARGET_ARCH)/resolve.o $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBDL_PIC) $(PIC_OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBDL)
+	$(RM) $(TOPDIR)lib/$(LIBDL)
 	$(INSTALL) -m 644 $(LIBDL) $(TOPDIR)lib
 
 
@@ -81,11 +81,10 @@ shared:
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc;
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION)
+	$(RM) $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib
 	(cd $(TOPDIR)lib && ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED)); 
 	(cd $(TOPDIR)lib && ln -sf $(LIBDL_SHARED_FULLNAME) $(LIBDL_SHARED).$(MAJOR_VERSION)); 
 
 clean:
-	$(RM) -f .depend $(LIBDL_SHARED)* $(LIBDL_SHARED_FULLNAME) core *.o *.a *.s *.i tmp_make foo *~
-
+	$(RM) .depend $(LIBDL_SHARED)* $(LIBDL_SHARED_FULLNAME) core *.o *.a *.s *.i tmp_make foo *~

+ 1 - 1
ldso/man/Makefile

@@ -30,4 +30,4 @@ ld.so.info: ld.so.texi
 	makeinfo $<
 
 clean:
-	rm -f $(ALL) *~
+	$(RM) $(ALL) *~

+ 1 - 1
ldso/util/Makefile

@@ -95,6 +95,6 @@ ldd.target:	ldd.c
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
 clean:
-	rm -f $(TARGETS) *.o *~ core *.target elf.h
+	$(RM) $(TARGETS) *.o *~ core *.target elf.h
 
 readelf.c readsoname.c ldconfig.c ldd.c:	headers

+ 8 - 8
libc/Makefile

@@ -54,7 +54,7 @@ all: halfclean subdirs $(LIBNAME) $(DO_SHARED)
 ar-target:
 	$(CROSS)ranlib $(LIBNAME)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBNAME)
+	$(RM) $(TOPDIR)lib/$(LIBNAME)
 	$(INSTALL) -m 644 $(LIBNAME) $(TOPDIR)lib
 
 $(LIBNAME): subdirs ar-target
@@ -65,15 +65,15 @@ shared: $(TOPDIR)lib/$(LIBNAME) $(LIBGCC_NEED)
 		--whole-archive $(LIBGCC_NEED) $(LIBNAME) \
 		$(TOPDIR)/libc/misc/internals/interp.o --no-whole-archive \
 		-init __uClibc_init $(LIBGCC)
-	@true #rm -rf tmp
+	@true #$(RM) -r tmp
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(SHARED_FULLNAME)
+	$(RM) $(TOPDIR)lib/$(SHARED_FULLNAME)
 	$(INSTALL) -m 644 $(SHARED_FULLNAME) $(TOPDIR)lib
 	(cd ../lib && ln -sf $(SHARED_FULLNAME) libc.so);
 	(cd ../lib && ln -sf $(SHARED_FULLNAME) $(SHARED_MAJORNAME));
 
 $(LIBGCC_NEED): $(TOPDIR)lib/$(LIBNAME)
-	@rm -rf tmp
+	@$(RM) -r tmp
 	@mkdir tmp
 	$(AR) rv $@
 	(cd tmp && CC="$(CC)" LD="$(LD)" LDFLAGS="$(CPU_LDFLAGS-y)" \
@@ -81,15 +81,15 @@ $(LIBGCC_NEED): $(TOPDIR)lib/$(LIBNAME)
 		/bin/sh $(TOPDIR)../extra/scripts/get-needed-libgcc-objects.sh)
 
 halfclean:
-	@rm -f $(LIBNAME) uClibc_config.h
-	@rm -f $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
+	@$(RM) $(LIBNAME) uClibc_config.h
+	@$(RM) $(SHARED_FULLNAME) $(SHARED_MAJORNAME) uClibc-0.* libc.so*
 
 tags:
 	ctags -R
 
 clean: subdirs_clean halfclean
-	@rm -rf tmp
-	rm -f include/asm include/linux include/bits
+	@$(RM) -r tmp
+	$(RM) include/asm include/linux include/bits
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))

+ 1 - 1
libc/inet/Makefile

@@ -83,7 +83,7 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))

+ 1 - 1
libc/inet/rpc/Makefile

@@ -62,5 +62,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/Makefile

@@ -58,7 +58,7 @@ tags:
 	ctags -R
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))

+ 1 - 1
libc/misc/assert/Makefile

@@ -40,4 +40,4 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core

+ 1 - 1
libc/misc/ctype/Makefile

@@ -65,5 +65,5 @@ $(MOBJx): $(MSRC)
 $(OBJS): Makefile
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/dirent/Makefile

@@ -42,5 +42,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/error/Makefile

@@ -35,5 +35,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/file/Makefile

@@ -44,5 +44,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/fnmatch/Makefile

@@ -40,5 +40,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/ftw/Makefile

@@ -39,5 +39,5 @@ $(MOBJ): $(MSRC)
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/glob/Makefile

@@ -42,5 +42,5 @@ $(COBJS): %.o : %.c
 glob64.o: glob64.c glob.c
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/gnu/Makefile

@@ -40,4 +40,4 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core

+ 1 - 1
libc/misc/internals/Makefile

@@ -53,5 +53,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] interp.c *~ core
+	$(RM) *.[oa] interp.c *~ core
 

+ 1 - 1
libc/misc/intl/Makefile

@@ -46,5 +46,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/locale/Makefile

@@ -67,6 +67,6 @@ locale_data.o:
 $(OBJS): Makefile
 
 clean:
-	rm -f *.[oa] *~ core locale_data.c
+	$(RM) *.[oa] *~ core locale_data.c
 
 .PHONY: data

+ 1 - 1
libc/misc/mntent/Makefile

@@ -40,5 +40,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/pthread/Makefile

@@ -45,5 +45,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/regex/Makefile

@@ -40,5 +40,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/search/Makefile

@@ -69,5 +69,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/statfs/Makefile

@@ -43,5 +43,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/syslog/Makefile

@@ -40,5 +40,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/sysvipc/Makefile

@@ -65,7 +65,7 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))

+ 1 - 1
libc/misc/time/Makefile

@@ -65,5 +65,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/ttyent/Makefile

@@ -35,5 +35,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/utmp/Makefile

@@ -40,4 +40,4 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core

+ 1 - 1
libc/misc/wchar/Makefile

@@ -66,5 +66,5 @@ iconv.target: wchar.c
 	$(STRIPTOOL) -x -R .note -R .comment $@
 
 clean:
-	rm -f *.[oa] *~ core iconv.target
+	$(RM) *.[oa] *~ core iconv.target
 

+ 1 - 1
libc/misc/wctype/Makefile

@@ -57,5 +57,5 @@ $(MOBJx): $(MSRC)
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/misc/wordexp/Makefile

@@ -35,5 +35,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/pwd_grp/Makefile

@@ -53,4 +53,4 @@ __getgrent_r.c: config.h
 initgroups.c: config.h
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core

+ 1 - 1
libc/signal/Makefile

@@ -40,5 +40,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/stdio/Makefile

@@ -107,5 +107,5 @@ $(COBJS): %.o : %.c
 $(OBJ): Makefile
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/stdlib/Makefile

@@ -134,7 +134,7 @@ $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
 	$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 .PHONY: dummy
 

+ 1 - 1
libc/stdlib/malloc-930716/Makefile

@@ -42,5 +42,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/stdlib/malloc/Makefile

@@ -56,4 +56,4 @@ $(COBJS): %.o : %.c ../../../include/bits/uClibc_config.h
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core

+ 1 - 1
libc/string/Makefile

@@ -86,5 +86,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 2 - 2
libc/sysdeps/linux/alpha/Makefile

@@ -58,6 +58,6 @@ headers:
 
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 2 - 2
libc/sysdeps/linux/arm/Makefile

@@ -66,6 +66,6 @@ headers:
 
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 1 - 1
libc/sysdeps/linux/common/Makefile

@@ -102,5 +102,5 @@ headers:
 	cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/common/fpu_control.h .
 
 clean:
-	rm -f *.[oa] *~ core crt[in].* *.S
+	$(RM) *.[oa] *~ core crt[in].* *.S
 

+ 1 - 1
libc/sysdeps/linux/cris/Makefile

@@ -58,5 +58,5 @@ $(COBJS): %.o : %.c
 headers:
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 3 - 3
libc/sysdeps/linux/e1/Makefile

@@ -58,9 +58,9 @@ headers:
 
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 ifneq ($(strip $(HAVE_ELF)),y)
-	rm -f $(TOPDIR)/include/float.h
+	$(RM) $(TOPDIR)/include/float.h
 endif
 

+ 2 - 2
libc/sysdeps/linux/h8300/Makefile

@@ -56,8 +56,8 @@ $(COBJS): %.o : %.c
 headers:
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 ifneq ($(strip $(HAVE_ELF)),y)
-	rm -f $(TOPDIR)/include/float.h
+	$(RM) $(TOPDIR)/include/float.h
 endif
 

+ 2 - 2
libc/sysdeps/linux/i386/Makefile

@@ -69,6 +69,6 @@ headers:
 
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 2 - 2
libc/sysdeps/linux/i960/Makefile

@@ -56,6 +56,6 @@ headers:
 
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 3 - 3
libc/sysdeps/linux/m68k/Makefile

@@ -69,9 +69,9 @@ endif
 
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 ifneq ($(strip $(HAVE_ELF)),y)
-	rm -f $(TOPDIR)/include/float.h
+	$(RM) $(TOPDIR)/include/float.h
 endif
 

+ 2 - 2
libc/sysdeps/linux/microblaze/Makefile

@@ -60,6 +60,6 @@ $(COBJS): %.o : %.c
 headers:
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 3 - 3
libc/sysdeps/linux/mips/Makefile

@@ -58,7 +58,7 @@ headers:
 	cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/mips/fpu_control.h .
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
-	rm -f $(TOPDIR)/include/sgidefs.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
+	$(RM) $(TOPDIR)/include/sgidefs.h
 

+ 2 - 2
libc/sysdeps/linux/powerpc/Makefile

@@ -68,6 +68,6 @@ headers:
 	cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/powerpc/fpu_control.h .
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 2 - 2
libc/sysdeps/linux/sh/Makefile

@@ -67,6 +67,6 @@ headers:
 	cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/sh/fpu_control.h .
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 2 - 2
libc/sysdeps/linux/sh64/Makefile

@@ -60,6 +60,6 @@ $(COBJS): %.o : %.c
 headers:
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 2 - 2
libc/sysdeps/linux/sparc/Makefile

@@ -58,6 +58,6 @@ headers:
 	cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/sparc/fpu_control.h .
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 2 - 2
libc/sysdeps/linux/v850/Makefile

@@ -60,6 +60,6 @@ $(COBJS): %.o : %.c
 headers:
 
 clean:
-	rm -f *.[oa] *~ core
-	rm -f bits/sysnum.h
+	$(RM) *.[oa] *~ core
+	$(RM) bits/sysnum.h
 

+ 1 - 1
libc/termios/Makefile

@@ -51,5 +51,5 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 1 - 1
libc/unistd/Makefile

@@ -115,5 +115,5 @@ $(patsubst %, _dirclean_%, $(DIRS)) : dummy
 dummy:
 
 clean:
-	rm -f *.[oa] *~ core gen_sysconf sysconf_*.c
+	$(RM) *.[oa] *~ core gen_sysconf sysconf_*.c
 

+ 3 - 4
libcrypt/Makefile

@@ -38,7 +38,7 @@ $(LIBCRYPT): ar-target
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBCRYPT) $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBCRYPT)
+	$(RM) $(TOPDIR)lib/$(LIBCRYPT)
 	$(INSTALL) -m 644 $(LIBCRYPT) $(TOPDIR)lib
 
 $(OBJS): %.o : %.c
@@ -53,11 +53,10 @@ shared: all
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc;
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION)
+	$(RM) $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib;
 	(cd $(TOPDIR)lib && ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED)); 
 	(cd $(TOPDIR)lib && ln -sf $(LIBCRYPT_SHARED_FULLNAME) $(LIBCRYPT_SHARED).$(MAJOR_VERSION)); 
 
 clean: 
-	rm -f *.[oa] *~ core $(LIBCRYPT_SHARED)* $(LIBCRYPT_SHARED_FULLNAME)*
-
+	$(RM) *.[oa] *~ core $(LIBCRYPT_SHARED)* $(LIBCRYPT_SHARED_FULLNAME)*

+ 3 - 4
libintl/Makefile

@@ -43,7 +43,7 @@ $(LIBC): ar-target
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBINTL) $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBINTL)
+	$(RM) $(TOPDIR)lib/$(LIBINTL)
 	$(INSTALL) -m 644 $(LIBINTL) $(TOPDIR)lib/
 
 $(MOBJ): $(MSRC)
@@ -56,11 +56,10 @@ shared: all
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc;
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBINTL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBINTL_SHARED).$(MAJOR_VERSION)
+	$(RM) $(TOPDIR)lib/$(LIBINTL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBINTL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBINTL_SHARED_FULLNAME) $(TOPDIR)lib
 	(cd $(TOPDIR)lib && ln -sf $(LIBINTL_SHARED_FULLNAME) $(LIBINTL_SHARED)); 
 	(cd $(TOPDIR)lib && ln -sf $(LIBINTL_SHARED_FULLNAME) $(LIBINTL_SHARED).$(MAJOR_VERSION)); 
 
 clean:
-	rm -f *.[oa] *~ core $(LIBINTL_SHARED)* $(LIBINTL_SHARED_FULLNAME)*
-
+	$(RM) *.[oa] *~ core $(LIBINTL_SHARED)* $(LIBINTL_SHARED_FULLNAME)*

+ 3 - 4
libm/Makefile

@@ -89,7 +89,7 @@ $(LIBM): ar-target
 	@if [ -f $(LIBM) ] ; then \
 		set -x -e; \
 		$(INSTALL) -d $(TOPDIR)lib; \
-		rm -f $(TOPDIR)lib/$(LIBM); \
+		$(RM) $(TOPDIR)lib/$(LIBM); \
 		$(INSTALL) -m 644 $(LIBM) $(TOPDIR)lib; \
 	fi;
 
@@ -101,7 +101,7 @@ shared: all
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc; \
 	    $(INSTALL) -d $(TOPDIR)lib; \
-	    rm -f $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \
+	    $(RM) $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \
 	    $(INSTALL) -m 644 $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib; \
 	    (cd $(TOPDIR)lib && ln -sf $(LIBM_SHARED_FULLNAME) $(LIBM_SHARED)); \
 	    (cd $(TOPDIR)lib && ln -sf $(LIBM_SHARED_FULLNAME) $(LIBM_SHARED).$(MAJOR_VERSION)); \
@@ -120,7 +120,7 @@ tags:
 	ctags -R
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core $(LIBM_SHARED)* $(LIBM_SHARED_FULLNAME)*
+	$(RM) *.[oa] *~ core $(LIBM_SHARED)* $(LIBM_SHARED_FULLNAME)*
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
@@ -132,4 +132,3 @@ $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
 	$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
 
 .PHONY: dummy
-

+ 1 - 1
libm/powerpc/Makefile

@@ -67,5 +67,5 @@ tags:
 	ctags -R
 
 clean: 
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 

+ 3 - 4
libnsl/Makefile

@@ -33,7 +33,7 @@ $(LIBNSL): ar-target
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBNSL) $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBNSL)
+	$(RM) $(TOPDIR)lib/$(LIBNSL)
 	$(INSTALL) -m 644 $(LIBNSL) $(TOPDIR)lib
 
 $(OBJS): %.o : %.c
@@ -48,11 +48,10 @@ shared: all
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc;
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBNSL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBNSL_SHARED).$(MAJOR_VERSION)
+	$(RM) $(TOPDIR)lib/$(LIBNSL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBNSL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBNSL_SHARED_FULLNAME) $(TOPDIR)lib
 	(cd $(TOPDIR)lib && ln -sf $(LIBNSL_SHARED_FULLNAME) $(LIBNSL_SHARED)); 
 	(cd $(TOPDIR)lib && ln -sf $(LIBNSL_SHARED_FULLNAME) $(LIBNSL_SHARED).$(MAJOR_VERSION)); 
 
 clean: 
-	rm -f *.[oa] *~ core $(LIBNSL_SHARED)* $(LIBNSL_SHARED_FULLNAME)*
-
+	$(RM) *.[oa] *~ core $(LIBNSL_SHARED)* $(LIBNSL_SHARED_FULLNAME)*

+ 5 - 7
libpthread/Makefile

@@ -56,7 +56,7 @@ $(LIBPTHREAD): subdirs
 	@if [ -f $(LIBPTHREAD) ] ; then \
 		set -e; \
 		$(INSTALL) -d $(TOPDIR)lib; \
-		rm -f $(TOPDIR)lib/$(LIBPTHREAD); \
+		$(RM) $(TOPDIR)lib/$(LIBPTHREAD); \
 		$(INSTALL) -m 644 $(LIBPTHREAD) $(TOPDIR)lib; \
 	fi;
 
@@ -64,7 +64,7 @@ $(LIBTHREAD_DB): subdirs
 	@if [ -f $(LIBTHREAD_DB) ] ; then \
 		set -e; \
 		$(INSTALL) -d $(TOPDIR)lib; \
-		rm -f $(TOPDIR)lib/$(LIBTHREAD_DB); \
+		$(RM) $(TOPDIR)lib/$(LIBTHREAD_DB); \
 		$(INSTALL) -m 644 $(LIBTHREAD_DB) $(TOPDIR)lib; \
 	fi;
 
@@ -83,7 +83,7 @@ shared: all
 			--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 			-L$(TOPDIR)/lib -lc $(END_FILES); \
 		$(INSTALL) -d $(TOPDIR)lib; \
-		rm -f $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) \
+		$(RM) $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) \
 			$(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION); \
 		$(INSTALL) -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib; \
 		(cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) \
@@ -98,7 +98,7 @@ shared: all
 			--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 			-L$(TOPDIR)/lib -lc $(END_FILES); \
 		$(INSTALL) -d $(TOPDIR)lib; \
-		rm -f $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED_FULLNAME) \
+		$(RM) $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED_FULLNAME) \
 			$(TOPDIR)lib/$(LIBTHREAD_DB_SHARED).$(MAJOR_VERSION); \
 		$(INSTALL) -m 644 $(LIBTHREAD_DB_SHARED_FULLNAME) $(TOPDIR)lib; \
 		(cd $(TOPDIR)lib && ln -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
@@ -120,9 +120,7 @@ $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
 	$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
 
 clean: subdirs_clean
-	rm -f *.[oa] *~ core $(LIBPTHREAD) $(LIBPTHREAD_SHARED_FULLNAME) \
+	$(RM) *.[oa] *~ core $(LIBPTHREAD) $(LIBPTHREAD_SHARED_FULLNAME) \
 		$(LIBTHREAD_DB) $(LIBTHREAD_DB_SHARED_FULLNAME)
 
 .PHONY: dummy
-
-

+ 1 - 1
libpthread/linuxthreads/Makefile

@@ -70,6 +70,6 @@ else
 endif
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 

+ 1 - 1
libpthread/linuxthreads_db/Makefile

@@ -69,6 +69,6 @@ $(COBJS): %.o : %.c
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 

+ 3 - 4
libresolv/Makefile

@@ -39,7 +39,7 @@ $(LIBRESOLV): ar-target
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBRESOLV) $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBRESOLV)
+	$(RM) $(TOPDIR)lib/$(LIBRESOLV)
 	$(INSTALL) -m 644 $(LIBRESOLV) $(TOPDIR)lib
 
 $(OBJS): %.o : %.c
@@ -54,11 +54,10 @@ shared: all
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc;
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRESOLV_SHARED).$(MAJOR_VERSION)
+	$(RM) $(TOPDIR)lib/$(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRESOLV_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib
 	(cd $(TOPDIR)lib && ln -sf $(LIBRESOLV_SHARED_FULLNAME) $(LIBRESOLV_SHARED)); 
 	(cd $(TOPDIR)lib && ln -sf $(LIBRESOLV_SHARED_FULLNAME) $(LIBRESOLV_SHARED).$(MAJOR_VERSION)); 
 
 clean: 
-	rm -f *.[oa] *~ core $(LIBRESOLV_SHARED)* $(LIBRESOLV_SHARED_FULLNAME)*
-
+	$(RM) *.[oa] *~ core $(LIBRESOLV_SHARED)* $(LIBRESOLV_SHARED_FULLNAME)*

+ 3 - 4
libutil/Makefile

@@ -42,7 +42,7 @@ $(LIBC): ar-target
 ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBUTIL) $(OBJS)
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBUTIL)
+	$(RM) $(TOPDIR)lib/$(LIBUTIL)
 	$(INSTALL) -m 644 $(LIBUTIL) $(TOPDIR)lib/
 
 $(OBJS): %.o : %.c
@@ -55,11 +55,10 @@ shared: all
 		--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
 		-L$(TOPDIR)/lib -lc;
 	$(INSTALL) -d $(TOPDIR)lib
-	rm -f $(TOPDIR)lib/$(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION)
+	$(RM) $(TOPDIR)lib/$(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION)
 	$(INSTALL) -m 644 $(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib
 	(cd $(TOPDIR)lib && ln -sf $(LIBUTIL_SHARED_FULLNAME) $(LIBUTIL_SHARED)); 
 	(cd $(TOPDIR)lib && ln -sf $(LIBUTIL_SHARED_FULLNAME) $(LIBUTIL_SHARED).$(MAJOR_VERSION)); 
 
 clean:
-	rm -f *.[oa] *~ core $(LIBUTIL_SHARED)* $(LIBUTIL_SHARED_FULLNAME)*
-
+	$(RM) *.[oa] *~ core $(LIBUTIL_SHARED)* $(LIBUTIL_SHARED_FULLNAME)*

+ 1 - 1
test/Makefile

@@ -44,7 +44,7 @@ tags:
 	ctags -R
 	
 clean: subdirs_clean
-	rm -f *.[oa] *~ core
+	$(RM) *.[oa] *~ core
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))

+ 2 - 0
test/Rules.mak

@@ -46,6 +46,8 @@ CC= $(CROSS)gcc
 STRIPTOOL=strip
 LDD=../$(TESTDIR)ldso/util/ldd
 
+RM= rm -f
+
 # Select the compiler needed to build binaries for your development system
 HOSTCC=gcc
 HOSTCFLAGS=-O2 -Wall

+ 1 - 1
test/args/Makefile

@@ -35,6 +35,6 @@ arg_test: arg_test.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/assert/Makefile

@@ -35,6 +35,6 @@ assert: assert.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/crypt/Makefile

@@ -68,6 +68,6 @@ md5c-test: md5c-test.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core crypt_glibc crypt crypt_glibc.out crypt.out md5c-test
+	$(RM) *.[oa] *~ core crypt_glibc crypt crypt_glibc.out crypt.out md5c-test
 
 

+ 1 - 1
test/ctype/Makefile

@@ -35,6 +35,6 @@ ctype_run:
 	./ctype
 	-@ echo " "
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/dlopen/Makefile

@@ -71,6 +71,6 @@ run: libtest2.so libtest1.so test1 test2 test3 dltest libtest.so dltest2 libtest
 	-$(DEBUG_LIBS)=all ./dltest
 
 clean:
-	rm -f *.o libtest1.so* libtest2.so* test1 test2 test3 \
+	$(RM) *.o libtest1.so* libtest2.so* test1 test2 test3 \
 		dltest dltest2 libtest.so libtest3.so
 

+ 1 - 1
test/malloc/Makefile

@@ -124,6 +124,6 @@ realloc0_glibc: realloc0.c Makefile
 
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/math/Makefile

@@ -100,6 +100,6 @@ libm-test.c: $(ulps-file) libm-test.inc gen-libm-test.pl
 	$(PERL) ./gen-libm-test.pl -u $< ./libm-test.inc -o "." 2>&1 > /dev/null
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS) $(generated) rint_glibc.out rint.out
+	$(RM) *.[oa] *~ core $(TARGETS) $(generated) rint_glibc.out rint.out
 
 

+ 2 - 2
test/misc/Makefile

@@ -58,7 +58,7 @@ fdopen: fdopen.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 dirent_source:
-	-@ rm -f $(TARGETS)
+	-@ $(RM) $(TARGETS)
 	-@ echo "-------"
 	-@ echo "dirent.c source: "
 	-@ echo " "
@@ -126,7 +126,7 @@ dirent64_diff: dirent64 dirent64_glibc
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core dirent dirent_glibc dirent_glibc.out dirent.out \
+	$(RM) *.[oa] *~ core dirent dirent_glibc dirent_glibc.out dirent.out \
 		dirent64 dirent64_glibc dirent64_glibc.out dirent64.out \
 		outb sem fdopen
 

+ 1 - 1
test/mmap/Makefile

@@ -35,6 +35,6 @@ mmap: mmap.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/pthread/Makefile

@@ -86,5 +86,5 @@ ex7: ex7.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(TESTCC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 

+ 1 - 1
test/pwd_grp/Makefile

@@ -87,6 +87,6 @@ test_grp_diff: test_grp_glibc test_grp
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS) *.out
+	$(RM) *.[oa] *~ core $(TARGETS) *.out
 
 

+ 1 - 1
test/setjmp/Makefile

@@ -35,6 +35,6 @@ setjmp_test: setjmp_test.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/signal/Makefile

@@ -69,6 +69,6 @@ sigchld_glibc: sigchld.c Makefile
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 2 - 2
test/silly/Makefile

@@ -26,7 +26,7 @@ TARGETS=hello_source hello hello_glibc tiny
 all: $(TARGETS)
 
 hello_source:
-	-@ rm -f $(TARGETS)
+	-@ $(RM) $(TARGETS)
 	-@ echo "-------"
 	-@ echo "hello.c source: "
 	-@ echo " "
@@ -75,6 +75,6 @@ tiny: tiny.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 2 - 2
test/stat/Makefile

@@ -27,7 +27,7 @@ TARGETS=stat_diff stat64_diff
 all: $(TARGETS)
 
 stat_source:
-	-@ rm -f $(TARGETS)
+	-@ $(RM) $(TARGETS)
 	-@ echo "-------"
 	-@ echo "stat.c source: "
 	-@ echo " "
@@ -95,7 +95,7 @@ stat64_diff: stat64 stat64_glibc
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core stat stat_glibc stat_glibc.out stat.out \
+	$(RM) *.[oa] *~ core stat stat_glibc stat_glibc.out stat.out \
 		stat64 stat64_glibc stat64_glibc.out stat64.out
 
 

+ 1 - 1
test/stdlib/Makefile

@@ -187,6 +187,6 @@ ptytest: ptytest.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS) *.out
+	$(RM) *.[oa] *~ core $(TARGETS) *.out
 
 

+ 1 - 1
test/string/Makefile

@@ -103,6 +103,6 @@ strsignal: ../../libc/string/strsignal.c
 
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS) testcopy.gnu.out testcopy.out
+	$(RM) *.[oa] *~ core $(TARGETS) testcopy.gnu.out testcopy.out
 
 

+ 1 - 1
test/termios/Makefile

@@ -52,6 +52,6 @@ termios_glibc: termios.c Makefile
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)
 
 

+ 1 - 1
test/unistd/Makefile

@@ -101,6 +101,6 @@ preadwrite: preadwrite.c Makefile $(TESTDIR)/Config $(TESTDIR)/Rules.mak $(CC)
 	-@ echo " "
 
 clean:
-	rm -f *.[oa] *~ core $(TARGETS)
+	$(RM) *.[oa] *~ core $(TARGETS)