-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
47 lines (36 loc) · 993 Bytes
/
Makefile
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
SHELL = /bin/bash
prefix ?= /usr/local
bindir ?= $(prefix)/bin
srcdir = Sources
REPODIR = $(shell pwd)
BUILDDIR = $(REPODIR)/.build
SOURCES = $(wildcard $(srcdir)/**/*.swift)
.DEFAULT_GOAL = all
.PHONY: all
all: Xcodecoverageconverter
Xcodecoverageconverter: $(SOURCES)
@swift build \
-c release \
--disable-sandbox \
--scratch-path "$(BUILDDIR)"
.PHONY: install
install: Xcodecoverageconverter
@install -d "$(bindir)"
@install "$(BUILDDIR)/release/xcc" "$(bindir)"
.PHONY: uninstall
uninstall:
@rm -rf "$(bindir)/xcc"
.PHONY: test
test:
@swift test
.PHONY: smoke
smoke: Xcodecoverageconverter
xcodebuild -scheme XcodeCoverageConverter test -derivedDataPath DerivedData -destination "platform=macOS"
xcrun xccov view --report --json DerivedData/Logs/Test/*.xcresult > coverage.json
leaks -atExit -- "$(BUILDDIR)"/release/xcc generate coverage.json . cobertura-xml
.PHONY: clean
distclean:
@rm -f $(BUILDDIR)/release
.PHONY: clean
clean: distclean
@rm -rf $(BUILDDIR)