diff --git a/Makefile b/Makefile index 3021d9d1..b30da391 100644 --- a/Makefile +++ b/Makefile @@ -51,9 +51,10 @@ GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null || true) MANPAGES_MD = $(wildcard docs/*.md) -BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) +BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) $(shell hack/btrfs_installed_tag.sh) LIBDM_BUILD_TAG = $(shell hack/libdm_tag.sh) -LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(DARWIN_BUILD_TAG) +OSTREE_BUILD_TAG = $(shell hack/ostree_tag.sh) +LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(OSTREE_BUILD_TAG) $(DARWIN_BUILD_TAG) BUILDTAGS += $(LOCAL_BUILD_TAGS) ifeq ($(DISABLE_CGO), 1) diff --git a/hack/btrfs_installed_tag.sh b/hack/btrfs_installed_tag.sh new file mode 100755 index 00000000..357f33b8 --- /dev/null +++ b/hack/btrfs_installed_tag.sh @@ -0,0 +1,7 @@ +#!/bin/bash +cc -E - > /dev/null 2> /dev/null << EOF +#include +EOF +if test $? -ne 0 ; then + echo exclude_graphdriver_btrfs +fi diff --git a/hack/ostree_tag.sh b/hack/ostree_tag.sh new file mode 100755 index 00000000..bae9d510 --- /dev/null +++ b/hack/ostree_tag.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if pkg-config ostree-1 2> /dev/null ; then + echo ostree +else + echo containers_image_ostree_stub +fi