configure make v3
This commit is contained in:
37
Makefile
37
Makefile
@ -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)
|
||||||
Reference in New Issue
Block a user