configure make v3

This commit is contained in:
Mihail Preis
2019-07-12 20:21:31 +05:00
parent 3cf4b5f1df
commit 6878112c01

View File

@ -1,16 +1,35 @@
SHELL = /bin/bash
prefix ?= /usr/local prefix ?= /usr/local
bindir = $(prefix)/bin bindir ?= $(prefix)/bin
build: REPODIR = $(shell pwd)
swift build -c release --disable-sandbox BUILDDIR = $(REPODIR)/.build
install: build .DEFAULT_GOAL = all
install ".build/release/stringen" "$(bindir)"
.PHONY: all
all: stringen
stringen:
@swift build \
-c release \
--disable-sandbox \
--build-path "$(BUILDDIR)"
.PHONY: install
install: stringen
@install -d "$(bindir)"
@install "$(BUILDDIR)/release/stringen" "$(bindir)"
.PHONY: uninstall
uninstall: uninstall:
rm -rf "$(bindir)/stringen" @rm -rf "$(bindir)/stringen"
clean: .PHONY: clean
rm -rf .build distclean:
@rm -f $(BUILDDIR)/release
.PHONY: build install uninstall clean .PHONY: clean
clean: distclean
@rm -rf $(BUILDDIR)