Skip to contentSkip to conversation

add btrfs-list.o as a seperate target

PATCH Hugo Mills 2 participants 4 messages Jul 3, 2011 4 messages not in the archive Btrfs file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): a440a5ce963dd17cadf70cae05c9ceb661615f02.1309560079.git.philipp.andreas@gmail.com

Hugo Mills

author
#2 lore raw
Quoted 1 line · Andreas Philipp

By adding btrfs-list.o as a seperate target which depends additionally

separate

Quoted 16 lines

on version we can fix the following build error when invoking 'make btrfs'.

btrfs-list.c:37:21: error: version.h: No such file or directory
make: *** [btrfs-list.o] Error 1

---
 Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Makefile +0 -0
index 3a1e308..c60f9af 100644

Makefile else · line 36

Quoted 10 lines
Makefile +4 -0
@@ -27,6 +27,10 @@ else
 	check=ls
 endif
 
+btrfs-list.o: version
+	$(check) btrfs-list.c
+	$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c btrfs-list.c
+
 .c.o:
 	$(check) $<
 	$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $<

This breaks the use of simple "make", as it just makes btrfs-list.o
and nothing else. This new target should probably be put somewhere near the bottom of the file, not above the "all" target, where it becomes the default:

hrm@ruthven:btrfs-progs-unstable $ make
bash version.sh
ls btrfs-list.c
btrfs-list.c
gcc -Wp,-MMD,./.btrfs-list.o.d,-MT,btrfs-list.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -g -Werror -Os -c btrfs-list.c hrm@ruthven:btrfs-progs-unstable $

Hugo.

Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- "You know,  the British have always been nice to mad people." ---  
#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please ignore this patch. I found a more elegant solution just right now. Thanks,
Andreas

Quoted 36 lines · Hugo Mills
Quoted 1 line · Andreas Philipp

By adding btrfs-list.o as a seperate target which depends additionally

separate

Quoted 23 lines

on version we can fix the following build error when invoking 'make btrfs'.

btrfs-list.c:37:21: error: version.h: No such file or directory
make: *** [btrfs-list.o] Error 1

---
Makefile | 4 ++++

1 files changed, 4 insertions(+), 0 deletions(-)
Makefile +0 -0
index 3a1e308..c60f9af 100644
@@ -27,6 +27,10 @@ else

check=ls
endif

Makefile +4 -0
+btrfs-list.o: version
+ $(check) btrfs-list.c
+ $(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c btrfs-list.c
+
Quoted 3 lines

.c.o:
$(check) $<
$(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $<

This breaks the use of simple "make", as it just makes btrfs-list.o and nothing else. This new target should probably be put somewhere near the bottom of the file, not above the "all" target, where it becomes the default:

Quoted 9 lines

hrm@ruthven:btrfs-progs-unstable $ make
bash version.sh
ls btrfs-list.c
btrfs-list.c
gcc -Wp,-MMD,./.btrfs-list.o.d,-MT,btrfs-list.o -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -g -Werror -Os -c btrfs-list.c hrm@ruthven:btrfs-progs-unstable $

Hugo.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOEL88AAoJEJIcBJ3+XkgiAZ4QAIz+zHogJAs6Te/sxkttiItl uudHpZJFiPDsD9jOrynewG9w3leKbde8pr9niB8fcDWwtdRp+z3k86CTNegVmkuv 75MkH5YEOjg8dVawaamjFLC0ENJMe/u3f3Ry982Ts7HDctCiABEfF4+XZ5dkrClk igqNljcFrPS7s/X3lo3C9WNyJuPtdV1Woyy5a0u8d7NTsuLEDTq4jnup4zd6ObTd MpQNNLb28rv2l9X9tRX2bRlneoSVtKdhb4tEAWG3miVyB3wDR+/9EJiGeYZlG52v tXwbuTa8lngwJuVZsjhm+nzgJHVW3I6CXj13L4yxdQX8IKRQ+PrfR6HhEyO84Jim IKdtKEsvI5sHucAiG26YuOSp6vnkiwebDsOmxnXsfr9EVcKlPQC7yYB1Akh7jMBe BIy38RaB87nbI5m7ra4e+IGkl2stjZ7GdspjQg97wZI1WRdAu1NSsG6EbO05GZ3v v/p4llrXH0Dl1ylygz9Prwkz9w5GVOpo88Ck0XOFtf8UrQJEMEMs8BwLu65prkmY 7L1srODGe+hpYLYEjBNL3iwACcLX5Yd80nHJBb+rdwLN8N3LXve6SxPw/pLgdty2 Su5o0AU39csp427OM1fExDbqphfsFhkK3SMOOGXS52Bed+iYXAzcJFGQ7c53l3vB 3qQ4EWe7LeX3gY6yd/EO
=JgSk
-----END PGP SIGNATURE-----

A message that is not in the archive (sent off-list or not yet received): 885e4465d2dd3889dc766d079586fd91f21d51cf.1309560079.git.philipp.andreas@gmail.com

author
#5 lore raw

Re: [PATCH 1/3] add all targets to clean target

Quoted 14 lines · Andreas Philipp

When issuing 'make clean' not all files generated by the individual targets have been deleted since some files have been missing in the definition of the 'make clean' target.

---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Makefile +0 -0
index d6a77d8..3a1e308 100644

Makefile install-man: · line 100

Quoted 9 lines
Makefile +2 -1
@@ -93,7 +93,8 @@ install-man:
 	cd man; make install
 
 clean :
-	rm -f $(progs) cscope.out *.o .*.d btrfs-convert
+	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
 
 install: $(progs) install-man

I've added this to the integration stack.

Hugo.

Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- "You know,  the British have always been nice to mad people." ---  

A message that is not in the archive (sent off-list or not yet received): 3cf741192c0f5f0b92c0fc1dceba986130eca134.1309560079.git.philipp.andreas@gmail.com

author
#7 lore raw

Re: [PATCH 3/3] some style/layout changes

Quoted 41 lines · Andreas Philipp

Just do a few simple style/layout changes to make the makefile look better.

---
 Makefile |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)
Makefile +6 -8
index c60f9af..4298323 100644
@@ -1,4 +1,4 @@
-CC=gcc
+CC = gcc
 AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
 CFLAGS = -g -Werror -Os
 objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
@@ -6,25 +6,23 @@ objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
 	  inode-map.o crc32c.o rbtree.o extent-cache.o extent_io.o \
 	  volumes.o utils.o btrfs-list.o btrfslabel.o
 
-#
-CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
-		-Wuninitialized -Wshadow -Wundef
+CHECKFLAGS= -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
+	    -Wuninitialized -Wshadow -Wundef
 DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
 
-INSTALL= install
+INSTALL = install
 prefix ?= /usr/local
 bindir = $(prefix)/bin
-LIBS=-luuid
+LIBS = -luuid
 
 progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \
-	btrfs \
-	btrfs-map-logical
+	btrfs btrfs-map-logical
 

Makefile objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ · line 28

Quoted 10 lines
Makefile +2 -2
 # make C=1 to enable sparse
 ifdef C
-	check=sparse $(CHECKFLAGS)
+	check = sparse $(CHECKFLAGS)
 else
-	check=ls
+	check = ls
 endif
 
 btrfs-list.o: version

Added to the integration stack.

Hugo.

Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- "You know,  the British have always been nice to mad people." ---