-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (39 loc) · 1.45 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
BREW := /usr/local/bin/brew
CHILD_MAKEFILES_DIRS = $(sort $(dir $(wildcard Packages/*/Makefile)))
PACKAGE_SOURCES_DIRS = $(sort $(dir $(wildcard Packages/*/Sources/**)))
all: bootstrap
## bootstrap: Bootstrap project dependencies for development
bootstrap: homebrew
mint bootstrap
## project: Generate .xcodeproj file using XcodeGen utility
project:
mint run "yonaskolb/XcodeGen"
## gems: Install ruby dependencies
gems:
bundle install
## homebrew: Bootstrap Homebrew dependencies
homebrew: $(BREW)
brew bundle check || brew bundle
## fmt: Launch swift files code formatter
fmt:
mint run swiftformat swiftformat example exampleTests
## lint: Launch swift files linter check
lint:
mint run swiftlint --path example
@for d in $(PACKAGE_SOURCES_DIRS); do ( mint run swiftlint --path $$d; ); done
## swiftgen: Trigger code generation from assets with swiftgen tool
swiftgen: swiftgen_packages
mint run swiftgen
.PHONY:
swiftgen_packages: $(CHILD_MAKEFILES_DIRS)
@for d in $(CHILD_MAKEFILES_DIRS); do ( cd $$d && ln -s ../../Mintfile Mintfile && $(MAKE) && rm -fr Mintfile; ); done
## clean: Clean up project files
clean:
git clean -Xfd
## help: Prints help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | sort
$(BREW):
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby
.PHONY: all help bootstrap test gems certs lint fmt homebrew swiftlint icon project clean hook