On Sat, Jul 02, 2011 at 12:44:37AM +0200, Andreas Philipp wrote:
> By adding btrfs-list.o as a seperate target which depends additionally
separate
> 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
>
> Signed-off-by: Andreas Philipp <philipp.andreas@xxxxxxxxx>
> ---
> Makefile | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 3a1e308..c60f9af 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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.
--
=== 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." ---
Attachment:
signature.asc
Description: Digital signature
