Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 71 lines (62 sloc) 2.409 kB
4bb8f3d @kocolosk Apache 2 license, Cloudant copyright when appropriate
kocolosk authored
1 # Copyright 2010 Cloudant
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
5 # the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
13 # the License.
14
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
15 all: compile
16
97db677 @kocolosk Set couch app vsn based on deviation from last Apache tag
kocolosk authored
17 appfile = apps/couch/ebin/couch.app
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
18 compile:
96a9fa9 @kocolosk consolidate all couchjs stuff in one subdir
kocolosk authored
19 @echo "==> couchjs (compile)"
20 @cd couchjs && python scons/scons.py
a70b91c @kocolosk some cleanup of the Makefile template
kocolosk authored
21 @./rebar compile
97db677 @kocolosk Set couch app vsn based on deviation from last Apache tag
kocolosk authored
22 @cat $(appfile) | sed s/%VSN%/`git describe --match 1.*`/ > $(appfile)
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
23
24 clean:
a70b91c @kocolosk some cleanup of the Makefile template
kocolosk authored
25 @echo "==> couchjs (clean)"
26 @cd couchjs && python scons/scons.py --clean
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
27 @./rebar clean
28
435aed2 @kocolosk Fix and simplify environment for etap tests
kocolosk authored
29 # compile is required here because of cross-dependencies between apps
30 check: compile
a70b91c @kocolosk some cleanup of the Makefile template
kocolosk authored
31 @./rebar eunit
435aed2 @kocolosk Fix and simplify environment for etap tests
kocolosk authored
32 @ERL_FLAGS="-pa `pwd`/apps/couch/ebin" prove apps/couch/test/etap/*.t
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
33
34 dist: compile
7b0005b @kocolosk my name is BigCouch
kocolosk authored
35 @rm -rf rel/bigcouch
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
36 @./rebar generate
37
38 distclean: clean
7b0005b @kocolosk my name is BigCouch
kocolosk authored
39 @rm -rf rel/bigcouch
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
40
264cb29 @kocolosk no more rebar templates in configure
kocolosk authored
41 include install.mk
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
42 install: dist
264cb29 @kocolosk no more rebar templates in configure
kocolosk authored
43 @mkdir -p $(prefix)
7b0005b @kocolosk my name is BigCouch
kocolosk authored
44 @cp -R rel/bigcouch/* $(prefix)
264cb29 @kocolosk no more rebar templates in configure
kocolosk authored
45 @mkdir -p $(data_dir)
46 @chown $(user) $(data_dir)
47 @mkdir -p $(view_dir)
48 @chown $(user) $(view_dir)
7b0005b @kocolosk my name is BigCouch
kocolosk authored
49 @touch $(prefix)/var/log/bigcouch.log
50 @chown $(user) $(prefix)/var/log/bigcouch.log
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
51
52 dev: compile
53 @rm -rf rel/dev1 rel/dev2 rel/dev3
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
54 @echo "==> Building development node #1 (ports 15984/15986)"
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
55 @./rebar generate target_dir=dev1 overlay_vars=dev1.config
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
56 @echo "==> Building development node #2 (ports 25984/25986)"
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
57 @./rebar generate target_dir=dev2 overlay_vars=dev2.config
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
58 @echo "==> Building development node #3 (ports 35984/35986)"
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
59 @./rebar generate target_dir=dev3 overlay_vars=dev3.config
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
60 @echo "\n\
7b0005b @kocolosk my name is BigCouch
kocolosk authored
61 Development nodes are built, and can be started using ./rel/dev[123]/bin/bigcouch.\n\
8ac8610 @kocolosk clarify node startup procedure for 'make dev'
kocolosk authored
62 Once the nodes are started, they must be joined together by editing the local\n\
63 nodes DB. For example, executing\n\
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
64 \n\
65 curl localhost:15986/nodes/dev2@127.0.0.1 -X PUT -d '{}'\n\
66 curl localhost:15986/nodes/dev3@127.0.0.1 -X PUT -d '{}'\n\
67 \n\
68 will cause node 1 to immediately connect to nodes 2 and 3 and form a cluster.\n\
69 The content of the nodes database is continuously replicated throughout the\n\
70 cluster, so this is a one-time operation.\n"
Something went wrong with that request. Please try again.