From 58f92c7cafb06ccfdc34d40ad8a9463dde01790f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 28 Jan 2015 18:41:17 +0100 Subject: [PATCH] btrfs-progs: build, use autoconf to detect RM Signed-off-by: David Sterba --- Makefile.in | 14 ++++++++------ configure.ac | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index 625b3c2e..fc8924bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,6 +4,8 @@ export CC = @CC@ LN_S = @LN_S@ AR = @AR@ +RM = @RM@ +RMDIR = @RMDIR@ INSTALL = @INSTALL@ DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@ @@ -282,7 +284,7 @@ clean-all: clean clean-doc clean-gen clean: $(CLEANDIRS) @echo "Cleaning" - $(Q)rm -f $(progs) cscope.out *.o *.o.d \ + $(Q)$(RM) -f $(progs) cscope.out *.o *.o.d \ dir-test ioctl-test quick-test send-test library-test library-test-static \ btrfs.static mkfs.btrfs.static \ $(check_defs) \ @@ -295,7 +297,7 @@ clean-doc: clean-gen: @echo "Cleaning Generated Files" - $(Q)rm -rf version.h config.status config.cache connfig.log \ + $(Q)$(RM) -rf version.h config.status config.cache connfig.log \ configure.lineno config.status.lineno Makefile \ config.log config.h config.h.in~ aclocal.m4 \ configure autom4te.cache/ config/ @@ -327,10 +329,10 @@ $(INSTALLDIRS): uninstall: $(Q)$(MAKE) $(MAKEOPTS) -C Documentation uninstall - cd $(DESTDIR)$(incdir); rm -f $(headers) - rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(incdir) - cd $(DESTDIR)$(libdir); rm -f $(lib_links) $(libs) - cd $(DESTDIR)$(bindir); rm -f btrfsck fsck.btrfs $(progs) + cd $(DESTDIR)$(incdir); $(RM) -f $(headers) + $(RMDIR) -p --ignore-fail-on-non-empty $(DESTDIR)$(incdir) + cd $(DESTDIR)$(libdir); $(RM) -f $(lib_links) $(libs) + cd $(DESTDIR)$(bindir); $(RM) -f btrfsck fsck.btrfs $(progs) ifneq ($(MAKECMDGOALS),clean) -include $(objects:.o=.o.d) $(cmd-objects:.o=.o.d) $(subst .btrfs,, $(filter-out btrfsck.o.d, $(progs:=.o.d))) diff --git a/configure.ac b/configure.ac index 79cb5919..919defe5 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,8 @@ AC_SYS_LARGEFILE AC_PROG_INSTALL AC_PROG_LN_S AC_PATH_PROG([AR], [ar]) +AC_PATH_PROG([RM], [rm], [rm]) +AC_PATH_PROG([RMDIR], [rmdir], [rmdir]) AC_CHECK_FUNCS([openat], [], [AC_MSG_ERROR([cannot find openat() function])])