Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (63 sloc) 2.463 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
1605ef5 remove scons cache in 'make clean'
Robert Newson authored
27 @rm -rf couchjs/.sconf_temp couchjs/.sconsign.dblite
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
28 @./rebar clean
29
435aed2 @kocolosk Fix and simplify environment for etap tests
kocolosk authored
30 # compile is required here because of cross-dependencies between apps
31 check: compile
a70b91c @kocolosk some cleanup of the Makefile template
kocolosk authored
32 @./rebar eunit
435aed2 @kocolosk Fix and simplify environment for etap tests
kocolosk authored
33 @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
34
35 dist: compile
7b0005b @kocolosk my name is BigCouch
kocolosk authored
36 @rm -rf rel/bigcouch
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
37 @./rebar generate
38
39 distclean: clean
7b0005b @kocolosk my name is BigCouch
kocolosk authored
40 @rm -rf rel/bigcouch
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
41
264cb29 @kocolosk no more rebar templates in configure
kocolosk authored
42 include install.mk
958598f @bradnoble order matters in rebar.config, esp. on clean slate
bradnoble authored
43 install: dist
264cb29 @kocolosk no more rebar templates in configure
kocolosk authored
44 @mkdir -p $(prefix)
7b0005b @kocolosk my name is BigCouch
kocolosk authored
45 @cp -R rel/bigcouch/* $(prefix)
264cb29 @kocolosk no more rebar templates in configure
kocolosk authored
46 @mkdir -p $(data_dir)
47 @chown $(user) $(data_dir)
48 @mkdir -p $(view_dir)
49 @chown $(user) $(view_dir)
7b0005b @kocolosk my name is BigCouch
kocolosk authored
50 @touch $(prefix)/var/log/bigcouch.log
51 @chown $(user) $(prefix)/var/log/bigcouch.log
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
52
53 dev: compile
54 @rm -rf rel/dev1 rel/dev2 rel/dev3
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
55 @echo "==> Building development node #1 (ports 15984/15986)"
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
56 @./rebar generate target_dir=dev1 overlay_vars=dev1.config
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
57 @echo "==> Building development node #2 (ports 25984/25986)"
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
58 @./rebar generate target_dir=dev2 overlay_vars=dev2.config
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
59 @echo "==> Building development node #3 (ports 35984/35986)"
f0d0516 @kocolosk 'make dev' generates rel/dev[123]
kocolosk authored
60 @./rebar generate target_dir=dev3 overlay_vars=dev3.config
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
61 @echo "\n\
7b0005b @kocolosk my name is BigCouch
kocolosk authored
62 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
63 Once the nodes are started, they must be joined together by editing the local\n\
64 nodes DB. For example, executing\n\
9aac091 @kocolosk instructions on starting up the dev cluster
kocolosk authored
65 \n\
66 curl localhost:15986/nodes/dev2@127.0.0.1 -X PUT -d '{}'\n\
67 curl localhost:15986/nodes/dev3@127.0.0.1 -X PUT -d '{}'\n\
68 \n\
69 will cause node 1 to immediately connect to nodes 2 and 3 and form a cluster.\n\
70 The content of the nodes database is continuously replicated throughout the\n\
71 cluster, so this is a one-time operation.\n"
Something went wrong with that request. Please try again.