summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..d80f5fbe
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+all: compile
+
+compile:
+ @echo "==> couchjs (compile)"
+ @cd couchjs && python scons/scons.py
+ @./rebar compile
+
+clean:
+ @echo "==> couchjs (clean)"
+ @cd couchjs && python scons/scons.py --clean
+ @./rebar clean
+
+check:
+ @./rebar eunit
+ @ERL_LIBS="`pwd`/apps" prove apps/couch/test/etap/*.t
+
+dist: compile
+ @rm -rf rel/dbcore
+ @./rebar generate
+ @mkdir -p rel/dbcore/var/share/server
+ @cp couchjs/build/main.js rel/dbcore/var/share/server/
+ @cp couchjs/build/couchjs rel/dbcore/bin/
+
+distclean: clean
+ @rm -rf rel/dbcore
+ @rm -f rel/overlay/etc/default.ini
+
+include install.mk
+install: dist
+ @mkdir -p $(prefix)
+ @cp -R rel/dbcore/* $(prefix)
+ @mkdir -p $(data_dir)
+ @chown $(user) $(data_dir)
+ @mkdir -p $(view_dir)
+ @chown $(user) $(view_dir)