-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (32 loc) · 1.23 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
.PHONY: all install uninstall check installcheck clean distclean format generate xcnew.pkg
PREFIX = /usr/local
BUILD_DIR = build
XCODEBUILD = xcodebuild -project xcnew.xcodeproj -scheme xcnew -configuration Release BUILD_DIR=$(BUILD_DIR)
EXECUTABLE = $(BUILD_DIR)/Release/xcnew
all: $(EXECUTABLE)
install:
$(XCODEBUILD) install DSTROOT=$(PREFIX)
uninstall:
$(RM) $(PREFIX)/bin/xcnew $(PREFIX)/share/man/man1/xcnew.1
check:
$(XCODEBUILD) -resultBundlePath ./xcnew.xcresult test
check-scripts:
env PYTHONDONTWRITEBYTECODE=1 python3 -munittest discover --verbose Package/Tests
installcheck:
xcodebuild build -project xcnew.xcodeproj -target xcnew-integration-tests
env XCNEW_TEST_TARGET_EXECUTABLE_PATH=$(PREFIX)/bin/xcnew $(XCODEBUILD) test-without-building -only-testing xcnew-integration-tests/XCNewTests
clean:
$(XCODEBUILD) clean
distclean: clean
$(RM) -R $(BUILD_DIR)
format:
find Sources Tests -type f -name '*.[hm]' -exec clang-format -i {} +
generate: README.md Sources/xcnew/XCNOptionDefinitions.c
$(EXECUTABLE):
$(XCODEBUILD) build
README.md: Sources/xcnew/xcnew.mxml
./Scripts/xml2c -HiI4 $< $@
Sources/xcnew/XCNOptionDefinitions.c: Sources/xcnew/xcnew.mxml
./Scripts/xml2c -p XCN $< $@
xcnew.pkg:
./Scripts/build-package