From b1031dfae128819d06f5f8a2122871a49050dbbc Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 23 Apr 2013 15:57:25 -0500 Subject: [PATCH] btrfs-progs: standardize tool source filenames For any btrfs-$FOO executable, rename the main source file from $FOO.c to to btrfs-$FOO.c This makes it slightly more obvious what's building what, and allows us to write a default rule in the Makefile for these tools. (also add btrfs-calc-size to the list of objects to remove on make clean) Signed-off-by: Eric Sandeen --- Makefile | 26 +++++++++++++------------- calc-size.c => btrfs-calc-size.c | 0 convert.c => btrfs-convert.c | 0 debug-tree.c => btrfs-debug-tree.c | 0 find-root.c => btrfs-find-root.c | 0 fragments.c => btrfs-fragments.c | 0 6 files changed, 13 insertions(+), 13 deletions(-) rename calc-size.c => btrfs-calc-size.c (100%) rename convert.c => btrfs-convert.c (100%) rename debug-tree.c => btrfs-debug-tree.c (100%) rename find-root.c => btrfs-find-root.c (100%) rename fragments.c => btrfs-fragments.c (100%) diff --git a/Makefile b/Makefile index db70981d..10f5fe53 100644 --- a/Makefile +++ b/Makefile @@ -115,17 +115,17 @@ btrfs.static: $(static_objects) btrfs.static.o help.static.o $(static_cmds_objec $(Q)$(CC) $(STATIC_CFLAGS) -o btrfs.static btrfs.static.o help.static.o $(static_cmds_objects) \ $(static_objects) $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) -calc-size: $(objects) $(libs) calc-size.o +btrfs-calc-size: $(objects) $(libs) btrfs-calc-size.o @echo " [LD] $@" - $(Q)$(CC) $(CFLAGS) -o calc-size calc-size.o $(objects) $(LDFLAGS) $(LIBS) + $(Q)$(CC) $(CFLAGS) -o btrfs-calc-size btrfs-calc-size.o $(objects) $(LDFLAGS) $(LIBS) -btrfs-find-root: $(objects) $(libs) find-root.o +btrfs-find-root: $(objects) $(libs) btrfs-find-root.o @echo " [LD] $@" - $(Q)$(CC) $(CFLAGS) -o btrfs-find-root find-root.o $(objects) $(LDFLAGS) $(LIBS) + $(Q)$(CC) $(CFLAGS) -o btrfs-find-root btrfs-find-root.o $(objects) $(LDFLAGS) $(LIBS) -btrfs-find-root.static: $(static_objects) find-root.static.o $(static_libbtrfs_objects) +btrfs-find-root.static: $(static_objects) btrfs-find-root.static.o $(static_libbtrfs_objects) @echo " [LD] $@" - $(Q)$(CC) $(STATIC_CFLAGS) -o btrfs-find-root.static find-root.static.o $(static_objects) \ + $(Q)$(CC) $(STATIC_CFLAGS) -o btrfs-find-root.static btrfs-find-root.static.o $(static_objects) \ $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) # For backward compatibility, 'btrfs' changes behaviour to fsck if it's named 'btrfsck' @@ -142,9 +142,9 @@ mkfs.btrfs.static: $(static_objects) mkfs.static.o $(static_libbtrfs_objects) $(Q)$(CC) $(STATIC_CFLAGS) -o mkfs.btrfs.static mkfs.static.o $(static_objects) \ $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) -btrfs-debug-tree: $(objects) $(libs) debug-tree.o +btrfs-debug-tree: $(objects) $(libs) btrfs-debug-tree.o @echo " [LD] $@" - $(Q)$(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS) + $(Q)$(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) btrfs-debug-tree.o $(LDFLAGS) $(LIBS) btrfs-zero-log: $(objects) $(libs) btrfs-zero-log.o @echo " [LD] $@" @@ -186,13 +186,13 @@ quick-test: $(objects) $(libs) quick-test.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS) -btrfs-convert: $(objects) $(libs) convert.o +btrfs-convert: $(objects) $(libs) btrfs-convert.o @echo " [LD] $@" - $(Q)$(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs -lcom_err $(LDFLAGS) $(LIBS) + $(Q)$(CC) $(CFLAGS) -o btrfs-convert $(objects) btrfs-convert.o -lext2fs -lcom_err $(LDFLAGS) $(LIBS) -btrfs-fragments: $(objects) $(libs) fragments.o +btrfs-fragments: $(objects) $(libs) btrfs-fragments.o @echo " [LD] $@" - $(Q)$(CC) $(CFLAGS) -o btrfs-fragments $(objects) fragments.o $(LDFLAGS) $(LIBS) -lgd -lpng -ljpeg -lfreetype + $(Q)$(CC) $(CFLAGS) -o btrfs-fragments $(objects) btrfs-fragments.o $(LDFLAGS) $(LIBS) -lgd -lpng -ljpeg -lfreetype ioctl-test: $(objects) $(libs) ioctl-test.o @echo " [LD] $@" @@ -212,7 +212,7 @@ 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 send-test btrfsck \ - btrfs.static mkfs.btrfs.static \ + btrfs.static mkfs.btrfs.static btrfs-calc-size \ version.h \ $(libs) $(lib_links) $(Q)$(MAKE) $(MAKEOPTS) -C man $@ diff --git a/calc-size.c b/btrfs-calc-size.c similarity index 100% rename from calc-size.c rename to btrfs-calc-size.c diff --git a/convert.c b/btrfs-convert.c similarity index 100% rename from convert.c rename to btrfs-convert.c diff --git a/debug-tree.c b/btrfs-debug-tree.c similarity index 100% rename from debug-tree.c rename to btrfs-debug-tree.c diff --git a/find-root.c b/btrfs-find-root.c similarity index 100% rename from find-root.c rename to btrfs-find-root.c diff --git a/fragments.c b/btrfs-fragments.c similarity index 100% rename from fragments.c rename to btrfs-fragments.c