Skip to contentSkip to conversation

Makefile: use $(CC) as a compilers instead of $(CC)/gcc

PATCH In review Sergei Trofimovich 2 participants 4 messages Apr 2, 2012 – Apr 16, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Makefile: use $(CC) as a compilers instead of $(CC)/gcc

From: Sergei Trofimovich <[email protected]>

---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Makefile +3 -3
index 79818e6..ebfd5c8 100644
@@ -44,13 +44,13 @@ btrfs: $(objects) btrfs.o help.o common.o $(cmds_objects)
 		$(objects) $(LDFLAGS) $(LIBS) -lpthread
 
 calc-size: $(objects) calc-size.o
-	gcc $(CFLAGS) -o calc-size calc-size.o $(objects) $(LDFLAGS) $(LIBS)
+	$(CC) $(CFLAGS) -o calc-size calc-size.o $(objects) $(LDFLAGS) $(LIBS)
 
 btrfs-find-root: $(objects) find-root.o
-	gcc $(CFLAGS) -o btrfs-find-root find-root.o $(objects) $(LDFLAGS) $(LIBS)
+	$(CC) $(CFLAGS) -o btrfs-find-root find-root.o $(objects) $(LDFLAGS) $(LIBS)
 
 btrfs-restore: $(objects) restore.o
-	gcc $(CFLAGS) -o btrfs-restore restore.o $(objects) $(LDFLAGS) $(LIBS) $(RESTORE_LIBS)
+	$(CC) $(CFLAGS) -o btrfs-restore restore.o $(objects) $(LDFLAGS) $(LIBS) $(RESTORE_LIBS)
 
 btrfsctl: $(objects) btrfsctl.o
 	$(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
Signature · 1 line
1.7.8.5
#1 lore raw

PATCH 2/2 Makefile: use $(MAKE) instead of hardcoded 'make'

From: Sergei Trofimovich <[email protected]>

---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Makefile +3 -3
index ebfd5c8..9694444 100644
@@ -101,15 +101,15 @@ ioctl-test: $(objects) ioctl-test.o
 	$(CC) $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(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 btrfs-image btrfs-select-super \
 	      btrfs-zero-log btrfstune dir-test ioctl-test quick-test version.h
-	cd man; make clean
+	cd man; $(MAKE) clean
 
 install: $(progs) install-man
 	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
Signature · 1 line
1.7.8.5
Reviewed-by on v1 2/2
#2 lore raw

Re: [btrfs-progs: PATCH 2/2] Makefile: use $(MAKE) instead of hardcoded 'make'

Quoted 22 lines · On Monday 02 of April 2012 17:10:02 Sergei Trofimovich wrote:

From: Sergei Trofimovich <[email protected]>

---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Makefile +1 -2
index ebfd5c8..9694444 100644
@@ -101,15 +101,15 @@ ioctl-test: $(objects) ioctl-test.o
 	$(CC) $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)
 
 manpages:
-	cd man; make
+	cd man; $(MAKE)
 
 install-man:
-	cd man; make install

Makefile ioctl-test: $(objects) ioctl-test.o · line 115

Quoted 10 lines
Makefile +2 -1
+	cd man; $(MAKE) install
 
 clean :
 	rm -f $(progs) cscope.out *.o .*.d btrfs-convert btrfs-image btrfs-select-super \
 	      btrfs-zero-log btrfstune dir-test ioctl-test quick-test version.h
-	cd man; make clean
+	cd man; $(MAKE) clean
 
 install: $(progs) install-man
 	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)

Resonable.

for both patches.

Thanks