summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Buetow <35781042+pbuetow@users.noreply.github.com>2020-12-29 09:48:56 +0000
committerGitHub <noreply@github.com>2020-12-29 09:48:56 +0000
commit0fe3c8708634cc59d61bf47bd909ef0111f0d56a (patch)
treec9f0dfa884927079de309b68c48224f4b0f00d0d /Makefile
parent495e9f38220a6d448b15882a235e7a9c21f21d18 (diff)
parent0099a7ab9e1d28300c69c3b50b4ebe1cde9a8cbc (diff)
Merge pull request #20 from snonux/develop
Make CGo dependencies optional (e.g. Linux ACL support)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c8e5a12..6d85347 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,21 @@
GO ?= go
all: test build
build:
+ifndef USE_ACL
${GO} build -o dserver ./cmd/dserver/main.go
+else
+ ${GO} build -tags linuxacl -o dserver ./cmd/dserver/main.go
+endif
${GO} build -o dcat ./cmd/dcat/main.go
${GO} build -o dgrep ./cmd/dgrep/main.go
${GO} build -o dmap ./cmd/dmap/main.go
${GO} build -o dtail ./cmd/dtail/main.go
install:
+ifndef USE_ACL
${GO} install ./cmd/dserver/main.go
+else
+ ${GO} install -tags linuxacl ./cmd/dserver/main.go
+endif
${GO} install ./cmd/dcat/main.go
${GO} install ./cmd/dgrep/main.go
${GO} install ./cmd/dmap/main.go
@@ -17,7 +25,7 @@ clean:
test -f $$cmd && rm $$cmd; \
done
vet:
- find . -type d | while read dir; do \
+ find . -type d | egrep -v '(./samples|./log|./doc)' | while read dir; do \
echo ${GO} vet $$dir; \
${GO} vet $$dir; \
done
@@ -28,4 +36,8 @@ lint:
golint $$dir; \
done
test:
+ifndef USE_ACL
${GO} test ./... -v
+else
+ ${GO} test -tags linuxacl ./... -v
+endif