forked from ghcformacosx/ghc-dot-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 755 Bytes
/
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
STACK_VER=1.0.4
STACK_URL=https://github.com/commercialhaskell/stack/releases/download/v$(STACK_VER)/stack-$(STACK_VER)-osx-x86_64.tar.gz
STACK_DL=./dist/download/stack-$(STACK_VER).tar.gz
STACK_BIN=./dist/unpack/stack-$(STACK_VER)-osx-x86_64/stack
STACK=$(shell which stack || echo $(STACK_BIN))
all: ghc
travis: ghc
(cd GHC; xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO)
GHC.app: ghc
(cd GHC; xcodebuild)
stack-setup: $(STACK)
$(STACK) setup
ghc: $(STACK)
$(STACK) build || ($(STACK) setup && $(STACK) build)
$(STACK) exec main
$(STACK_BIN):
mkdir -p ./dist/download ./dist/unpack
curl -s -L -o $(STACK_DL) $(STACK_URL)
tar -xf $(STACK_DL) -C ./dist/unpack
clean:
rm -rf dist GHC/build
.PHONY: all clean ghc GHC.app travis