-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
53 lines (41 loc) · 1.21 KB
/
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
48
49
50
51
52
53
SHELL = /bin/bash
export LANG = en_US.UTF-8
export LC_CTYPE = en_US.UTF-8
.DEFAULT_GOAL := build
.PHONY: test
test:
@swift test -Xswiftc -warnings-as-errors
.PHONY: codegen
codegen: update-cmake-lists update-test-manifest format
update-test-manifest:
@echo "Updating SwiftPM test manifests"
ifeq ($(shell uname),Darwin)
@rm Tests/PathosTests/XCTestManifests.swift
@touch Tests/PathosTests/XCTestManifests.swift
@swift test --generate-linuxmain
else
@echo "Skiping test manifest update: only works on macOS."
endif
update-cmake-lists:
@echo "Updating cmake config files"
@python3 Scripts/update-cmake.py Scripts/cmake_root
test-docker:
@Scripts/docker.sh Pathos 'swift test -Xswiftc -warnings-as-errors' 5.5.2 focal
test-codegen: codegen
@git diff --exit-code
build: codegen
@swift build -c release -Xswiftc -warnings-as-errors > /dev/null
clean:
@echo "Deleting build artifacts…"
@rm -rf .build tmp build
@echo "Done."
test-SwiftPM:
@swift test -Xswiftc -warnings-as-errors
format: ensure-swiftformat
ifeq ($(shell uname),Darwin)
@./tmp/swiftformat --swiftversion 5.5 .
else
@echo "Skiping formatting: only works on macOS."
endif
ensure-swiftformat:
@Scripts/ensure-swiftformat.sh