-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 901 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 901 Bytes
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
CONFIG = Debug
DERIVED_DATA_PATH = ~/.derivedData/$(CONFIG)
PLATFORM = macOS
DESTINATION = platform="$(PLATFORM)"
SCHEME = UndoForMacOS
XCODEBUILD_ARGUMENT = build
XCODEBUILD_FLAGS = \
-configuration $(CONFIG) \
-derivedDataPath $(DERIVED_DATA_PATH) \
-destination $(DESTINATION) \
-project Examples/Examples.xcodeproj \
-scheme "$(SCHEME)" \
-skipMacroValidation
XCODEBUILD_COMMAND = xcodebuild $(XCODEBUILD_ARGUMENT) $(XCODEBUILD_FLAGS)
ifneq ($(strip $(shell which xcbeautify)),)
XCODEBUILD = set -o pipefail && $(XCODEBUILD_COMMAND) | xcbeautify
else
XCODEBUILD = $(XCODEBUILD_COMMAND)
endif
xcodebuild:
$(XCODEBUILD)
xcodebuild-raw:
$(XCODEBUILD_COMMAND)
format:
find . \
-path '*/Documentation.docc' -prune -o \
-name '*.swift' \
-not -path '*/.*' -print0 \
| xargs -0 xcrun swift-format --ignore-unparsable-files --in-place
.PHONY: format xcodebuild xcodebuild-raw