X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Makefile;h=b6d9b21176df874043c5000d63528f1ab128b566;hb=f3724ea2b2b15b6bb91a6601d8f7eeccc41943df;hp=106e285ebaf0dc5a17d06d7c637c0a4b6d9ae8df;hpb=84af07cf8047d7b061dd7051db452a45fb8c1aa8;p=nbdkit-plugin-vddk.git diff --git a/Makefile b/Makefile index 106e285..b6d9b21 100644 --- a/Makefile +++ b/Makefile @@ -32,13 +32,9 @@ # See README. -# You must set this to the directory where you downloaded VDDK. -# NB. DO NOT PUT A TRAILING ‘/’ or you will get the error -# ‘canonicalization unexpectedly shrank by one character’ on RHEL 7. -VDDK_DIR := $(HOME)/tmp/vddk/vmware-vix-disklib-distrib - PWD := $(shell pwd) VERSION := $(shell grep ^Version: nbdkit-plugin-vddk.spec | awk '{print $$2}') +VDDK_DIR := $(shell grep '^%global vddkdir' nbdkit-plugin-vddk.spec | awk '{print $$3}') all: check-tools check-vddk check-source rpmbuild -ba \ @@ -48,7 +44,6 @@ all: check-tools check-vddk check-source --define "_sourcedir $(PWD)" \ --define "_specdir $(PWD)" \ --define "_srcrpmdir $(PWD)" \ - --define "vddkdir $(VDDK_DIR)" \ nbdkit-plugin-vddk.spec check-tools: @@ -56,7 +51,7 @@ check-tools: @if ! wget --help >/dev/null 2>&1; then echo "‘wget’ not installed or not working. Install the ‘wget’ package."; exit 1; fi check-vddk: - @if ! [ -d $(VDDK_DIR) ] || ! [ -d $(VDDK_DIR)/include ]; then echo -e "You must download VDDK and edit the Makefile to point $$(VDDK_DIR) to the\nlocation where you unpacked VDDK."; exit 1; fi + @if ! [ -d $(VDDK_DIR) ] || ! [ -d $(VDDK_DIR)/include ]; then echo -e "You must download VDDK and edit ‘nbdkit-plugin-vddk.spec’ to point ‘vddkdir’\nto the location where you unpacked VDDK."; exit 1; fi check-source: nbdkit-$(VERSION).tar.gz