git.iko.soy/distributed-process
on master help sign in
dev-install mode can run against local copies of other repos
0d2e609Tim Watson
Makefile+31−8
@@ -3,17 +3,25 @@
3GHC ?= $(shell which ghc)
3GHC ?= $(shell which ghc)
4CABAL ?= $(shell which cabal)
4CABAL ?= $(shell which cabal)
5CABAL_DEV ?= $(shell which cabal-dev)
5CABAL_DEV ?= $(shell which cabal-dev)
6−
6+PWD = $(shell pwd)
7+SANDBOX ?= $(PWD)/cabal-dev
8+BRANCH ?= $(shell git branch | grep '*' | awk '/.*/ { print $NF }')
7−BASE_GIT := git://github.com/haskell-distributed
9+GIT_BASE ?= git://github.com/haskell-distributed
10+USE_LOCAL_UMBRELLA ?=
8REPOS=$(shell cat REPOS | sed '/^$$/d')
11REPOS=$(shell cat REPOS | sed '/^$$/d')
9
12
10.PHONY: all
13.PHONY: all
11−all: dev-install
14+all:
15+ $(info branch = ${BRANCH})
16+
17+.PHONY: clean
18+clean:
19+ rm -rf ${REPOS} ./dist ./cabal-dev
12
20
13.PHONY: dev-install
21.PHONY: dev-install
14ifneq (,$(CABAL_DEV))
22ifneq (,$(CABAL_DEV))
15−dev-install:
23+dev-install: $(REPOS)
16− $(CABAL_DEV) install
24+ $(CABAL_DEV) install --enable-tests
17else
25else
18dev-install:
26dev-install:
19 $(error install cabal-dev to proceed)
27 $(error install cabal-dev to proceed)
@@ -24,8 +32,6 @@ ci: travis-install travis-test
24
32
25.PHONY: travis-install
33.PHONY: travis-install
26travis-install: $(REPOS)
34travis-install: $(REPOS)
27− $(CABAL) install QuickCheck-2.6 --force-reinstalls
28− $(CABAL) install rematch --force-reinstalls
29 $(CABAL) install --with-ghc=$(GHC) $(REPOS) --force-reinstalls
35 $(CABAL) install --with-ghc=$(GHC) $(REPOS) --force-reinstalls
30 $(CABAL) install
36 $(CABAL) install
31
37
@@ -35,5 +41,22 @@ travis-test:
35 $(CABAL) build
41 $(CABAL) build
36 $(CABAL) test --show-details=always
42 $(CABAL) test --show-details=always
37
43
44+ifneq (,$(USE_LOCAL_UMBRELLA))
45+define clone
46+ git clone $(GIT_BASE)/$1 $1
47+endef
48+else
49+define clone
50+ git clone $(GIT_BASE)/$1.git $1
51+endef
52+endif
53+
38$(REPOS):
54$(REPOS):
39− git clone $(BASE_GIT)/$@.git
55+ $(call clone,$@)
56+ git --git-dir=$@/.git \
57+ --work-tree=$@ \
58+ checkout $(BRANCH)
59+ cd $@ && $(CABAL_DEV) install --sandbox=$(SANDBOX)
60+
61+./build:
62+ mkdir -p build