From: Joe Peterson <joe@skyrush.com>
To: Btrfs Development List <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs-progs: remove hard-coding of "gcc" and "make" from Makefile
Date: Mon, 21 Sep 2009 10:18:53 -0600 [thread overview]
Message-ID: <4AB7A76D.8050902@skyrush.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
Here's a simple patch to replace "gcc" with "$(CC)" and "make" with
"$(MAKE)". This is required, for example, for Gentoo Linux ebuilds, and
it also eliminates a "jobserver unavailable" warning (make-related).
-Joe
[-- Attachment #2: btrfs-progs_use_env_gcc_make.patch --]
[-- Type: text/plain, Size: 2524 bytes --]
diff -Nurp a/Makefile b/Makefile
--- a/Makefile 2009-09-21 09:43:46.672275731 -0600
+++ b/Makefile 2009-09-21 09:44:33.221156240 -0600
@@ -36,47 +36,47 @@ version:
bash version.sh
btrfsctl: $(objects) btrfsctl.o
- gcc $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
btrfs-vol: $(objects) btrfs-vol.o
- gcc $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS)
btrfs-show: $(objects) btrfs-show.o
- gcc $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)
btrfsck: $(objects) btrfsck.o
- gcc $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS)
mkfs.btrfs: $(objects) mkfs.o
- gcc $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS)
btrfs-debug-tree: $(objects) debug-tree.o
- gcc $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS)
btrfstune: $(objects) btrfstune.o
- gcc $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
btrfs-image: $(objects) btrfs-image.o
- gcc $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS)
dir-test: $(objects) dir-test.o
- gcc $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS)
quick-test: $(objects) quick-test.o
- gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
convert: $(objects) convert.o
- gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
manpages:
- cd man; make
+ cd man; $(MAKE)
install-man:
- cd man; make install
+ cd man; $(MAKE) install
clean :
rm -f $(progs) cscope.out *.o .*.d btrfs-convert
- cd man; make clean
+ cd man; $(MAKE) clean
install: $(progs) install-man
$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
next reply other threads:[~2009-09-21 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 16:18 Joe Peterson [this message]
2009-09-21 18:25 ` [PATCH] btrfs-progs: remove hard-coding of "gcc" and "make" from Makefile Premysl Hruby
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=4AB7A76D.8050902@skyrush.com \
--to=joe@skyrush.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