summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Joseph Davis <davisp@apache.org>2009-08-18 01:27:03 +0000
committerPaul Joseph Davis <davisp@apache.org>2009-08-18 01:27:03 +0000
commit39a629b0d63ca675bd24844c924203d30bd3ba9b (patch)
tree3071af152be6485e53853551fa8c6e967b5e31ba /bin
parentf723cb99008f2462abec46ab9b614fb8dd2f31d1 (diff)
Applying markh's Windows build patch.
Fixes COUCHDB-406 git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@805243 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'bin')
-rw-r--r--bin/Makefile.am10
-rw-r--r--bin/couchdb.bat.tpl.in14
2 files changed, 24 insertions, 0 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am
index cb0a827a..93a53192 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -10,7 +10,12 @@
## License for the specific language governing permissions and limitations under
## the License.
+if WINDOWS
+bin_SCRIPTS = couchdb.bat
+else
bin_SCRIPTS = couchdb couchjs
+endif
+
noinst_SCRIPTS = couchjs_dev
if HELP2MAN
@@ -69,6 +74,11 @@ couchjs_dev: couchjs.tpl
$@ < $<
chmod +x $@
+couchdb.bat: couchdb.bat.tpl
+ sed -e "s|%ICU_CONFIG%|$(ICU_CONFIG)|g" \
+ -e "s|%version%|@version@|g" \
+ $< > $@
+
HELP2MAN_OPTION=--no-info --help-option="-h" --version-option="-V"
# XXX: Because the scripts are made at build time for the user we need to
diff --git a/bin/couchdb.bat.tpl.in b/bin/couchdb.bat.tpl.in
new file mode 100644
index 00000000..99c096f1
--- /dev/null
+++ b/bin/couchdb.bat.tpl.in
@@ -0,0 +1,14 @@
+@echo off
+setlocal
+rem First change to the erlang bin directory
+cd %~dp0
+
+rem Allow a different erlang executable (eg, werl) to be used.
+if "%ERL%x" == "x" set ERL=erl.exe
+
+echo CouchDB %version% - prepare to relax...
+%ERL% -smp auto -sasl errlog_type error ^
+ -eval "application:load(crypto)" ^
+ -eval "application:load(couch)" ^
+ -eval "crypto:start()" ^
+ -eval "couch_server:start([""../etc/couchdb/default.ini"", ""../etc/couchdb/local.ini""]), receive done -> done end."