[Tux3] [PATCH v2] build on systems that don't have FUSE

Daniel Phillips phillips at phunq.net
Tue Sep 9 12:05:56 PDT 2008


On Tuesday 09 September 2008 11:30, Benjamin K. Stuhl wrote:
> On Tue, September 9, 2008 12:09, Daniel Phillips wrote:
> > I would be better to do this by conditionally adding the fuse binaries
> > to the binaries variable.
> 
> How about this? I'm not very practiced a GNU make, so there may be a more
> elegant way to do the pkg-config test...

That makes two of us.  I was just reading my way through the $(shell
part of the make manual when your email arrived.

> diff -r de15ed7b3c0c user/test/Makefile
> --- a/user/test/Makefile	Tue Sep 09 02:14:13 2008 -0700
> +++ b/user/test/Makefile	Tue Sep 09 12:29:27 2008 -0600
> @@ -2,7 +2,15 @@
>  CFLAGS += -std=gnu99 -Wall -g
>  VG=valgrind
>  VGFLAGS=--error-exitcode=200
> -binaries = dleaf ileaf iattr btree dir inode tux3 tux3fs tux3fuse
> +binaries = dleaf ileaf iattr btree dir inode tux3
> +
> +ifeq ($(shell pkg-config fuse >& /dev/null && echo found), found)
> +    $(info Found FUSE, building Tux3 FUSE modules)
> +    binaries += tux3fs tux3fuse
> +else
> +    $(info FUSE not found, omitting Tux3 FUSE modules)
> +endif
> +
>  basedeps = Makefile tux3.h buffer.h trace.h
>  fsdeps = $(basedeps) buffer.c diskio.c iattr.c dir.c btree.c ileaf.c
> balloc.c dleaf.c inode.c

I committed this:

+binaries = dleaf ileaf iattr btree dir inode tux3
+
+ifeq ($(shell pkg-config fuse && echo found), found)
+	binaries += tux3fs tux3fuse
+endif

Thanks, this is tidy.

Regards,

Daniel


_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list