-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathos-tools-darwin.mk
101 lines (80 loc) · 3.38 KB
/
os-tools-darwin.mk
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
ifndef _MK_OS_TOOLS_DARWIN_MK_
_MK_OS_TOOLS_DARWIN_MK_ := 1
#$(info ---> .make/os-tools-darwin.mk)
ifndef GIT_ROOT
GIT_ROOT := $(shell git rev-parse --show-toplevel 2>/dev/null)
endif
ifndef MK_DIR
MK_DIR := $(GIT_ROOT)/.make
endif
SED_BIN := gsed
ifdef REQUIRES_TECTONIC
REQUIRES_TECTONIC := $(REQUIRES_TECTONIC)
else
REQUIRES_TECTONIC := 0
endif
include $(MK_DIR)/git.mk
include $(MK_DIR)/sops.mk
include $(MK_DIR)/os-tools.mk
export XCODE_SELECT_BIN := $(call where-is-binary,xcode-select)
# This assumes you have installed icu4c via brew
export PKG_CONFIG_PATH := $(HOMEBREW_CELLAR)/icu4c/73.2/lib/pkgconfig
.PHONY: xcode-os-tools-install
ifdef XCODE_SELECT_BIN
xcode-os-tools-install:
else
xcode-os-tools-install:
@(xcode-select --install || true) 2>&1 | grep -v "are already installed" || true
endif
.PHONY: darwin-tools-install
darwin-tools-install: gcc-install xcode-os-tools-install llvm-install-with-brew sops-check
.PHONY: _darwin-tools-install-info
_darwin-tools-install-info:
@printf "$(bold)Installing Darwin tools:$(normal)\n"
.PHONY: darwin-tools-install
ifeq ($(RUNNING_IN_DOCKER),1)
darwin-tools-install:
@echo "darwin-tools-install: Skipping installation of Darwin tools in Docker"
else
darwin-tools-install: _darwin-tools-install-info \
_darwin-tool-icu4c \
_darwin-tool-pkg-config \
_darwin-tool-meson \
_darwin-tool-gtk-doc \
_darwin-tool-graphite2 \
_darwin-tool-freetype2 \
_darwin-tool-cairo \
_darwin-tool-glib \
_darwin-tool-iconv \
sops-check
@echo "Darwin tools have been installed"
endif
.PHONY: _darwin-tool-icu4c
_darwin-tool-icu4c:
@if [ ! -d $(HOMEBREW_CELLAR)/icu4c/73.2 ] ; then $(BREW_BIN) install icu4c ; else printf "$(green)icu4c 73.2$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-pkg-config
_darwin-tool-pkg-config:
@if [ ! -d $(HOMEBREW_CELLAR)/pkg-config/0.29* ] ; then $(BREW_BIN) install pkg-config ; else printf "$(green)pkg-config 0.29*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-meson
_darwin-tool-meson:
@if [ ! -d $(HOMEBREW_CELLAR)/meson/1.3.* ] ; then $(BREW_BIN) install meson ; else printf "$(green)meson 1.3.*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-gtk-doc
_darwin-tool-gtk-doc:
@if [ ! -d $(HOMEBREW_CELLAR)/gtk-doc/1.33.* ] ; then $(BREW_BIN) install gtk-doc ; else printf "$(green)gtk-doc 1.33.*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-graphite2
_darwin-tool-graphite2:
@if [ ! -d $(HOMEBREW_CELLAR)/graphite2/1.3.* ] ; then $(BREW_BIN) install graphite2 ; else printf "$(green)graphite2 1.3.*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-freetype2
_darwin-tool-freetype2:
@if [ ! -d $(HOMEBREW_CELLAR)/freetype/2.13.* ] ; then $(BREW_BIN) install freetype2 ; else printf "$(green)freetype2 2.13.*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-cairo
_darwin-tool-cairo:
@if [ ! -d $(HOMEBREW_CELLAR)/cairo/1.18.* ] ; then $(BREW_BIN) install cairo ; else printf "$(green)cairo 1.18.*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-glib
_darwin-tool-glib:
@if [ ! -d $(HOMEBREW_CELLAR)/glib/2.78.* ] ; then $(BREW_BIN) install glib ; else printf "$(green)glib 2.78.*$(normal) is already installed\n" ; fi
.PHONY: _darwin-tool-iconv
_darwin-tool-iconv:
@if [ ! -d $(HOMEBREW_CELLAR)/libiconv/1.* ] ; then $(BREW_BIN) install libiconv ; else printf "$(green)libiconv 1.*$(normal) is already installed\n" ; fi
#$(info <--- .make/os-tools-darwin.mk)
endif