Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 82 lines (58 sloc) 1.928 kb
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
# Copyright (c) 2010, NorthScale, Inc.
# All rights reserved.
SHELL=/bin/sh

EFLAGS=-pa ./ebin ./deps/*/ebin ./deps/*/deps/*/ebin

TMP_DIR=./tmp

TMP_VER=$(TMP_DIR)/version_num.tmp

.PHONY: ebins ebin_app version

all: ebins deps_all

deps_menelaus:
(cd deps/menelaus && $(MAKE) all)

deps_smtp:
(cd deps/gen_smtp && $(MAKE) ebins)

deps_all: deps_menelaus deps_smtp

ebins: ebin_app
test -d ebin || mkdir ebin
erl -noinput +B $(EFLAGS) -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'

ebin_app: version
test -d ebin || mkdir ebin
sed s/0.0.0/`cat $(TMP_VER)`/g src/ns_server.app.src > ebin/ns_server.app

version:
test -d $(TMP_DIR) || mkdir $(TMP_DIR)
git describe | sed s/-/_/g > $(TMP_VER)

bdist: clean ebins deps_all
(cd .. && tar cf - \
                          ns_server/ebin \
                          ns_server/deps/*/ebin \
                          ns_server/deps/*/deps/*/ebin \
                          ns_server/deps/menelaus/priv/public | gzip -9 -c > \
                          ns_server/ns_server_`cat ns_server/$(TMP_VER)`.tar.gz )
echo created ns_server_`cat $(TMP_VER)`.tar.gz

clean clean_all:
@(cd deps/menelaus && $(MAKE) clean)
@(cd deps/gen_smtp && $(MAKE) clean)
rm -f $(TMP_VER)
rm -f $(TMP_DIR)/*.cov.html
rm -f cov.html
rm -f erl_crash.dump
rm -f ns_server_*.tar.gz
rm -f src/ns_server.app
rm -rf test/log
rm -rf ebin

test: test_$(OS)

test_: test_unit test_menelaus

test_Windows_NT: test_unit test_menelaus

test_unit: ebins
erl $(EFLAGS) -noshell -s t start -s init stop -kernel error_logger silent

test_menelaus: deps/menelaus
(cd deps/menelaus; $(MAKE) test)

# assuming exuberant-ctags
TAGS:
ctags -eR .

dialyzer: ebins
dialyzer -pa ebin -r .

features/Makefile:
(cd features && ../test/parallellize_features.rb) >features/Makefile

.PHONY : features/Makefile

parallel_cucumber: features/Makefile
$(MAKE) -k -C features all_branches
Something went wrong with that request. Please try again.