btrfs-progs: build, use autoconf to detect RM

Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba 2015-01-28 18:41:17 +01:00
parent 412c9c3428
commit 58f92c7caf
2 changed files with 10 additions and 6 deletions

View File

@ -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)))

View File

@ -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])])