Skip to content

Commit

Permalink
Merge pull request #17 from NSHipster/master
Browse files Browse the repository at this point in the history
Update Makefile for Homebrew Formula
  • Loading branch information
kalkwarf authored Sep 26, 2019
2 parents 919afea + 0c0e41d commit c9bff08
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
# https://stackoverflow.com/a/47243701
# which came with the above license

prefix ?= /usr/local
bindir ?= $(prefix)/bin
libdir ?= $(prefix)/lib

REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build

EXECUTABLE_DIRECTORY = ./.build/x86_64-apple-macosx/debug
TEST_RESOURCES_DIRECTORY = ./.build/x86_64-apple-macosx/debug/xcprojectlintPackageTests.xctest/Contents/Resources/

Expand All @@ -30,7 +37,14 @@ build:
swift build

release:
swift build --configuration release
swift build --configuration release --disable-sandbox --build-path "$(BUILDDIR)"

install: release
@install -d "$(bindir)" "$(libdir)"
@install "$(BUILDDIR)/release/xcprojectlint" "$(bindir)"

uninstall:
@rm -rf "$(bindir)/xcprojectlint"

copyTestResources: build
mkdir -p ${TEST_RESOURCES_DIRECTORY}
Expand All @@ -49,4 +63,4 @@ xcode:
clean:
swift package reset

.PHONY: run build test copyTestResources clean xcode
.PHONY: run build install uninstall test copyTestResources clean xcode

0 comments on commit c9bff08

Please sign in to comment.