From: Eric Sandeen <sandeen@redhat.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH 1/2 (resend)] btrfs-progs: standardize tool source filenames
Date: Tue, 23 Apr 2013 15:57:25 -0500 [thread overview]
Message-ID: <5176F5B5.6010008@redhat.com> (raw)
In-Reply-To: <517463E4.7040400@redhat.com>
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 <sandeen@redhat.com>
---
vger ate my giant rename-files patch; here's the makefile bit, and
hopefully the rename-diffs at the end are something that git
knows how to apply? TBH I've never tried that before.
-Eric
diff --git a/Makefile b/Makefile
index db70981..10f5fe5 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
next prev parent reply other threads:[~2013-04-23 20:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-21 22:10 [PATCH 0/2] btrfs-progs: standardize utility filenames and add default rules to Makefile Eric Sandeen
2013-04-21 22:22 ` [PATCH 2/2] btrfs-progs: Add " Eric Sandeen
2013-04-24 12:43 ` David Sterba
2013-04-23 16:09 ` [PATCH 0/2] btrfs-progs: standardize utility filenames and add " David Sterba
2013-04-23 16:48 ` Eric Sandeen
2013-04-23 20:57 ` Eric Sandeen [this message]
2013-04-24 12:21 ` [PATCH 1/2 (resend)] btrfs-progs: standardize tool source filenames David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5176F5B5.6010008@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox