From e31f6172aa1d6ec5d562f56086819a0f4bc8a914 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 12 Feb 2013 17:39:44 +0100 Subject: btrfs-progs: build btrsfck to keep compatibility The command 'btrfsck' is commonly used and we should build it by default. Signed-off-by: David Sterba --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 039f0dc3..7a679d00 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ CC = gcc +LN = ln AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 CFLAGS = -g -O1 objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ @@ -35,7 +36,7 @@ endif MAKEOPTS = --no-print-directory Q=$(Q) -progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol \ +progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \ btrfs btrfs-map-logical btrfs-image btrfs-zero-log btrfs-convert \ btrfs-find-root btrfs-restore btrfstune btrfs-show-super @@ -110,6 +111,11 @@ btrfs-show: $(objects) btrfs-show.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS) +# For backward compatibility, 'btrfs' changes behaviour to fsck if it's named 'btrfsck' +btrfsck: btrfs + @echo " [LN] $@" + $(Q)$(LN) -f btrfs btrfsck + mkfs.btrfs: $(objects) mkfs.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS) -lblkid @@ -171,7 +177,7 @@ install-man: clean : @echo "Cleaning" $(Q)rm -f $(progs) cscope.out *.o .*.d btrfs-convert btrfs-image btrfs-select-super \ - btrfs-zero-log btrfstune dir-test ioctl-test quick-test btrfs.static \ + btrfs-zero-log btrfstune dir-test ioctl-test quick-test btrfs.static btrfsck \ version.h $(Q)$(MAKE) $(MAKEOPTS) -C man $@ -- cgit v1.2.3