couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r707480 - in /incubator/couchdb/trunk: Makefile.am bin/Makefile.am bin/couchdb.tpl.in configure.ac etc/couchdb/Makefile.am etc/couchdb/local_dev.ini utils/ utils/Makefile.am
Date Thu, 23 Oct 2008 21:41:37 GMT
Author: jan
Date: Thu Oct 23 14:41:37 2008
New Revision: 707480

URL: http://svn.apache.org/viewvc?rev=707480&view=rev
Log:
Add `make dev` target. Use `./utils/run` to launch CouchDB from the source tree and without
`make install`. Useful for development. Patch my Hunter Morris, thanks! Closes COUCHDB-114.

Added:
    incubator/couchdb/trunk/etc/couchdb/local_dev.ini
    incubator/couchdb/trunk/utils/
    incubator/couchdb/trunk/utils/Makefile.am
Modified:
    incubator/couchdb/trunk/Makefile.am
    incubator/couchdb/trunk/bin/Makefile.am
    incubator/couchdb/trunk/bin/couchdb.tpl.in
    incubator/couchdb/trunk/configure.ac
    incubator/couchdb/trunk/etc/couchdb/Makefile.am

Modified: incubator/couchdb/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/Makefile.am?rev=707480&r1=707479&r2=707480&view=diff
==============================================================================
--- incubator/couchdb/trunk/Makefile.am (original)
+++ incubator/couchdb/trunk/Makefile.am Thu Oct 23 14:41:37 2008
@@ -10,7 +10,7 @@
 ## License for the specific language governing permissions and limitations
 ## under the License.
 
-SUBDIRS = bin etc src/couchdb src/mochiweb share test var
+SUBDIRS = bin etc src/couchdb src/mochiweb share test var utils
 
 localdoc_DATA = AUTHORS.gz BUGS.gz CHANGES.gz NEWS.gz README.gz THANKS.gz
 
@@ -36,6 +36,14 @@
 THANKS.gz: $(top_srcdir)/THANKS
 	-gzip -9 < $< > $@
 
+dev: all
+	@echo "This command is intended for developers to use;"
+	@echo "it creates development ini files as well as a"
+	@echo "$(top_srcdir)/tmp structure for development runtime files"
+	mkdir -p $(top_srcdir)/tmp/lib
+	mkdir -p $(top_srcdir)/tmp/log
+	mkdir -p $(top_srcdir)/tmp/run
+
 .PHONY: local-clean
 local-clean: maintainer-clean
 	@echo "This command is intended for maintainers to use;"
@@ -49,6 +57,7 @@
 	rm -f $(top_srcdir)/*.tar.gz.*
 	rm -fr $(top_srcdir)/build-aux
 	rm -fr $(top_srcdir)/m4
+	rm -fr $(top_srcdir)/tmp
 	find $(top_srcdir) -name Makefile.in -exec rm {} \;
 
 .PHONY: distsign

Modified: incubator/couchdb/trunk/bin/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/bin/Makefile.am?rev=707480&r1=707479&r2=707480&view=diff
==============================================================================
--- incubator/couchdb/trunk/bin/Makefile.am (original)
+++ incubator/couchdb/trunk/bin/Makefile.am Thu Oct 23 14:41:37 2008
@@ -11,12 +11,13 @@
 ## under the License.
 
 bin_SCRIPTS = couchdb couchjs
+noinst_SCRIPTS = couchjs_dev
 
 if HELP2MAN
 dist_man1_MANS = couchdb.1 couchjs.1
 endif
 
-CLEANFILES = $(bin_SCRIPTS) $(dist_man1_MANS)
+CLEANFILES = $(bin_SCRIPTS) $(dist_man1_MANS) $(noinst_SCRIPTS)
 
 transform = @program_transform_name@
 couchdb_command_name = `echo couchdb | sed '$(transform)'`
@@ -26,8 +27,11 @@
 	sed -e "s|%ERL%|$(ERL)|g" \
 	    -e "s|%ICU_CONFIG%|$(ICU_CONFIG)|g" \
 	    -e "s|%bindir%|@bindir@|g" \
-	    -e "s|%localerlangbindir%|@localerlangbindir@|g" \
 	    -e "s|%localerlanglibdir%|@localerlanglibdir@|g" \
+	    -e "s|%mochiwebebindir%|couch-@version@/ebin|g" \
+	    -e "s|%couchdbebindir%|mochiweb-r82/ebin|g" \
+	    -e "s|%defaultini%|default.ini|g" \
+	    -e "s|%localini%|local.ini|g" \
 	    -e "s|%localconfdir%|@localconfdir@|g" \
 	    -e "s|%localstatelogdir%|@localstatelogdir@|g" \
 	    -e "s|%localstatelibdir%|@localstatelibdir@|g" \
@@ -52,6 +56,17 @@
 	$@ < $<
 	chmod +x $@
 
+couchjs_dev: couchjs.tpl
+	sed -e "s|%locallibbindir%|$(abs_top_srcdir)/src/couchdb|g" \
+	    -e "s|%bug_uri%|@bug_uri@|g" \
+	    -e "s|%package_author_address%|@package_author_address@|g" \
+	    -e "s|%package_author_name%|@package_author_name@|g" \
+	    -e "s|%package_name%|@package_name@|g" \
+	    -e "s|%version%|@version@|g" \
+	    -e "s|%couchjs_command_name%|$(couchjs_command_name)|g" > \
+	$@ < $<
+	chmod +x $@
+
 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

Modified: incubator/couchdb/trunk/bin/couchdb.tpl.in
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/bin/couchdb.tpl.in?rev=707480&r1=707479&r2=707480&view=diff
==============================================================================
--- incubator/couchdb/trunk/bin/couchdb.tpl.in (original)
+++ incubator/couchdb/trunk/bin/couchdb.tpl.in Thu Oct 23 14:41:37 2008
@@ -23,8 +23,8 @@
 
 RESPAWN_TIMEOUT=0
 
-DEFAULT_INI_FILE=%localconfdir%/default.ini
-LOCAL_INI_FILE=%localconfdir%/local.ini
+DEFAULT_INI_FILE=%localconfdir%/%defaultini%
+LOCAL_INI_FILE=%localconfdir%/%localini%
 
 PID_FILE=%localstatedir%/run/couchdb.pid
 
@@ -181,8 +181,8 @@
     done
     command="`%ICU_CONFIG% --invoke` \
         %ERL% $interactive_option -smp auto -sasl errlog_type error +K true \
-        -pa %localerlanglibdir%/couch-%version%/ebin \
-            %localerlanglibdir%/mochiweb-r82/ebin \
+        -pa %localerlanglibdir%/%couchdbebindir% \
+            %localerlanglibdir%/%mochiwebebindir% \
         -eval \"application:load(inets)\" \
         -eval \"application:load(crypto)\" \
         -eval \"application:load(couch)\" \

Modified: incubator/couchdb/trunk/configure.ac
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/configure.ac?rev=707480&r1=707479&r2=707480&view=diff
==============================================================================
--- incubator/couchdb/trunk/configure.ac (original)
+++ incubator/couchdb/trunk/configure.ac Thu Oct 23 14:41:37 2008
@@ -248,6 +248,7 @@
 AC_CONFIG_FILES([src/couchdb/Makefile])
 AC_CONFIG_FILES([src/mochiweb/Makefile])
 AC_CONFIG_FILES([test/Makefile])
+AC_CONFIG_FILES([utils/Makefile])
 AC_CONFIG_FILES([var/Makefile])
 
 AC_OUTPUT

Modified: incubator/couchdb/trunk/etc/couchdb/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/etc/couchdb/Makefile.am?rev=707480&r1=707479&r2=707480&view=diff
==============================================================================
--- incubator/couchdb/trunk/etc/couchdb/Makefile.am (original)
+++ incubator/couchdb/trunk/etc/couchdb/Makefile.am Thu Oct 23 14:41:37 2008
@@ -11,14 +11,17 @@
 ## under the License.
 
 couchprivlibdir = $(localerlanglibdir)/couch-$(version)/priv/lib
+devcouchprivlibdir = $(abs_top_srcdir)/src/couchdb/.libs
 
 localconf_DATA = default.ini
 EXTRA_DIST = local.ini
+noinst_DATA = default_dev.ini
 
-CLEANFILES = $(localconf_DATA)
+CLEANFILES = $(localconf_DATA) $(noinst_DATA)
 
 transform = @program_transform_name@
 couchjs_command_name = `echo couchjs | sed '$(transform)'`
+couchjs_dev_command_name = `echo couchjs_dev | sed '$(transform)'`
 
 default.ini: default.ini.tpl
 	sed -e "s|%bindir%|$(bindir)|g" \
@@ -30,6 +33,16 @@
 	    -e "s|%couchjs_command_name%|$(couchjs_command_name)|g" \
 	< $< > $@
 
+default_dev.ini: default.ini.tpl
+	sed -e "s|%bindir%|$(abs_top_srcdir)/bin|g" \
+	    -e "s|%localconfdir%|$(abs_top_srcdir)/etc/couchdb|g" \
+	    -e "s|%localdatadir%|$(abs_top_srcdir)/share|g" \
+	    -e "s|%localstatelibdir%|$(abs_top_srcdir)/tmp/lib|g" \
+	    -e "s|%localstatelogdir%|$(abs_top_srcdir)/tmp/log|g" \
+	    -e "s|%couchprivlibdir%|$(devcouchprivlibdir)|g" \
+	    -e "s|%couchjs_command_name%|$(couchjs_dev_command_name)|g" \
+	< $< > $@
+
 install-data-hook:
 	if test ! -f "$(DESTDIR)/$(localconfdir)/local.ini"; then \
 	    cp local.ini "$(DESTDIR)/$(localconfdir)/local.ini"; \

Added: incubator/couchdb/trunk/etc/couchdb/local_dev.ini
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/etc/couchdb/local_dev.ini?rev=707480&view=auto
==============================================================================
--- incubator/couchdb/trunk/etc/couchdb/local_dev.ini (added)
+++ incubator/couchdb/trunk/etc/couchdb/local_dev.ini Thu Oct 23 14:41:37 2008
@@ -0,0 +1,26 @@
+; CouchDB Configuration Settings
+
+; Custom settings should be made in this file. They will override settings
+; in default.ini, but unlike changes made to default.ini, this file won't be
+; overwritten on server upgrade.
+
+[couchdb]
+;max_document_size = 4294967296 ; bytes
+
+[httpd]
+;port = 5984
+;bind_address = 127.0.0.1
+
+[log]
+;level = info
+
+[update_notification]
+;unique notifier name=/full/path/to/exe -with "cmd line arg"
+
+
+
+[test]
+foo = bar
+
+[test]
+foo = bar

Added: incubator/couchdb/trunk/utils/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/utils/Makefile.am?rev=707480&view=auto
==============================================================================
--- incubator/couchdb/trunk/utils/Makefile.am (added)
+++ incubator/couchdb/trunk/utils/Makefile.am Thu Oct 23 14:41:37 2008
@@ -0,0 +1,41 @@
+## Licensed under the Apache License, Version 2.0 (the "License"); you may not
+## use this file except in compliance with the License.  You may obtain a copy
+## of the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+## License for the specific language governing permissions and limitations
+## under the License.
+
+noinst_SCRIPTS = run
+
+CLEANFILES = $(noinst_SCRIPTS)
+
+transform = @program_transform_name@
+couchdb_command_name = `echo couchdb | sed '$(transform)'`
+
+run: ../bin/couchdb.tpl
+	sed -e "s|%ERL%|$(ERL)|g" \
+	    -e "s|%ICU_CONFIG%|$(ICU_CONFIG)|g" \
+	    -e "s|%bindir%|$(abs_top_srcdir)/bin|g" \
+	    -e "s|%localerlanglibdir%|$(abs_top_srcdir)/src|g" \
+	    -e "s|%mochiwebebindir%|mochiweb|g" \
+	    -e "s|%couchdbebindir%|couchdb|g" \
+	    -e "s|%defaultini%|default_dev.ini|g" \
+	    -e "s|%localini%|local_dev.ini|g" \
+	    -e "s|%localerlanglibdir%|$(abs_top_srcdir)/src|g" \
+	    -e "s|%localconfdir%|$(abs_top_srcdir)/etc/couchdb|g" \
+	    -e "s|%localstatelogdir%|$(abs_top_srcdir)/tmp/log|g" \
+	    -e "s|%localstatelibdir%|$(abs_top_srcdir)/tmp/lib|g" \
+	    -e "s|%localstatedir%|$(abs_top_srcdir)/tmp|g" \
+	    -e "s|%bug_uri%|@bug_uri@|g" \
+	    -e "s|%package_author_address%|@package_author_address@|g" \
+	    -e "s|%package_author_name%|@package_author_name@|g" \
+	    -e "s|%package_name%|@package_name@|g" \
+	    -e "s|%version%|@version@|g" \
+	    -e "s|%couchdb_command_name%|$(couchdb_command_name)|g" > \
+	$@ < $<
+	chmod +x $@



Mime
View raw message