-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (44 loc) · 1.14 KB
/
Makefile
File metadata and controls
54 lines (44 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
PACKAGE = sargon
VERSION = 2.1
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
SOURCES = \
main.go\
access/access.go\
auth/container_create.go\
auth/volume_create.go\
auth/service_create.go\
diag/diag.go\
server/action.go\
server/authz.go\
server/ldap.go\
server/netgroup.go\
server/type.go\
wildmat/wildmat.go
all:
@go mod download
@go build
clean:
@go clean
install: sargon
@GOBIN=$(DESTDIR)$(BINDIR) go install .
DISTDIR = $(PACKAGE)-$(VERSION)
DISTFILES = go.mod $(SOURCES) $(MANPAGE) README.md LICENSE Makefile sargon.schema sargon.ldif
distdir:
@if [ "$$(sed -r -n -e '/^var[[:space:]]Version[[:space:]]*=[[:space:]]*/{' -e s/// -e 's/`//g' -e 'p}' main.go)" != "$(VERSION)" ]; then \
echo >&2 "Version mismatch between Makefile and main.go"; \
exit 1; \
fi
@test -d $(DISTDIR) || mkdir $(DISTDIR)
@tar cf - $(DISTFILES) | tar Cxf $(DISTDIR) -
dist: distdir
@tar zcf $(DISTDIR).tar.gz $(DISTDIR)
@rm -rf $(DISTDIR)
distcheck: dist
@tar xfz $(DISTDIR).tar.gz
@if $(MAKE) -C $(DISTDIR) $(DISTCHECKFLAGS); then \
echo "$(DISTDIR).tar.gz ready for distribution"; \
rm -rf $(DISTDIR); \
else \
exit 2; \
fi