Skip to content

Commit 5830940

Browse files
author
Thibault Wittemberg
committed
project: fix Makefile
1 parent 71e1b10 commit 5830940

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

Makefile

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
1+
SHELL = /bin/bash
2+
13
prefix ?= /usr/local
2-
bindir = $(prefix)/bin
4+
bindir ?= $(prefix)/bin
5+
srcdir = Sources
6+
7+
REPODIR = $(shell pwd)
8+
BUILDDIR = $(REPODIR)/.build
9+
SOURCES = $(wildcard $(srcdir)/**/*.swift)
10+
11+
.DEFAULT_GOAL = all
12+
13+
.PHONY: all
14+
all: Xcodecoverageconverter
315

4-
build:
5-
swift build -c release --disable-sandbox
16+
Xcodecoverageconverter: $(SOURCES)
17+
@swift build \
18+
-c release \
19+
--disable-sandbox \
20+
--build-path "$(BUILDDIR)"
621

7-
install: build
8-
install ".build/release/xcc" "$(bindir)"
22+
.PHONY: install
23+
install: Xcodecoverageconverter
24+
@install -d "$(bindir)"
25+
@install "$(BUILDDIR)/release/xcc" "$(bindir)"
926

27+
.PHONY: uninstall
1028
uninstall:
11-
rm -rf "$(bindir)/xcc"
29+
@rm -rf "$(bindir)/xcc"
1230

13-
clean:
14-
rm -rf .build
31+
.PHONY: clean
32+
distclean:
33+
@rm -f $(BUILDDIR)/release
1534

16-
.PHONY: build install uninstall clean
35+
.PHONY: clean
36+
clean: distclean
37+
@rm -rf $(BUILDDIR)

0 commit comments

Comments
 (0)