add btrfs-list.o as a seperate target
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 1Signed-off-by Andreas Philipp <[email protected]>--- Makefile | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)Makefile +0
-0
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.cbtrfs-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." ---
Re: [PATCH 1/3] add all targets to clean target
In reply to a message not in the archiveQuoted 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.
Signed-off-by Andreas Philipp <[email protected]>--- Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)Makefile +0
-0
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." ---
Re: [PATCH 3/3] some style/layout changes
In reply to a message not in the archiveQuoted 41 lines · Andreas Philipp
Just do a few simple style/layout changes to make the makefile look better.
Signed-off-by Andreas Philipp <[email protected]>--- Makefile | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-)Makefile +6
-8@@ -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." ---
-----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 1Signed-off-by Andreas Philipp <[email protected]>---
Makefile| 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)Makefile +0
-0@@ -27,6 +27,10 @@ elsecheck=ls
endifMakefile +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
bashversion.sh
lsbtrfs-list.cbtrfs-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 -cbtrfs-list.chrm@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-----