couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject [1/3] git commit: updated refs/heads/1994-merge-rcouch to c1521cb
Date Tue, 07 Jan 2014 19:49:29 GMT
Updated Branches:
  refs/heads/1994-merge-rcouch 8cb69a946 -> c1521cb81


remove Makefile.am from apps/ and fix couchspawnkillable


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5037e160
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5037e160
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5037e160

Branch: refs/heads/1994-merge-rcouch
Commit: 5037e16005bccd62720be223cab7b3d498d60b0c
Parents: 8cb69a9
Author: Benoit Chesneau <benoitc@apache.org>
Authored: Tue Jan 7 19:15:43 2014 +0100
Committer: Benoit Chesneau <benoitc@apache.org>
Committed: Tue Jan 7 19:15:43 2014 +0100

----------------------------------------------------------------------
 .gitignore                                      |   2 +
 apps/Makefile.am                                | 315 -------------------
 .../spawnkillable/couchspawnkillable_win.c      | 145 +++++++++
 apps/couch/priv/Makefile.am                     | 151 ---------
 apps/couch/priv/couchspawnkillable.sh           |  20 ++
 .../priv/spawnkillable/couchspawnkillable.sh    |  20 --
 .../priv/spawnkillable/couchspawnkillable_win.c | 145 ---------
 apps/couch/rebar.config.script                  |  13 +-
 apps/couch/src/Makefile.am                      | 198 ------------
 apps/couch_dbupdates/Makefile.am                |  33 --
 apps/couch_index/Makefile.am                    |  40 ---
 apps/couch_mrview/Makefile.am                   |  73 -----
 apps/couch_plugins/Makefile.am                  |  40 ---
 apps/couch_replicator/Makefile.am               |  78 -----
 apps/couchjs-node/Makefile.am                   |  24 --
 15 files changed, 179 insertions(+), 1118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 3d4c404..3ceb52f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -162,3 +162,5 @@ apps/couch_rel/ebin/*.beam
 apps/couch/c_src/couch_js/*.o
 apps/couch/c_src/couch_js/config.h
 apps/couch/priv/couchjs
+apps/couch/c_src/spawnkillable/*.o
+apps/couch/priv/couchspawnkillable

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/Makefile.am b/apps/Makefile.am
deleted file mode 100644
index 378f82b..0000000
--- a/apps/Makefile.am
+++ /dev/null
@@ -1,315 +0,0 @@
-## 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.
-
-SUBDIRS = \
-    couch_dbupdates \
-    couch_index \
-    couch_mrview \
-    couch_plugins \
-    couch_replicator \
-    couchdb \
-    ejson \
-    erlang-oauth \
-    etap \
-    ibrowse \
-    mochiweb \
-    snappy \
-    couchjs-node
-
-EXTRA_DIST = \
-    $(MY_FIRST_COUCHDB_PLUGIN_FILES) \
-    $(FAUXTON_FILES)
-
-MY_FIRST_COUCHDB_PLUGIN_FILES = \
-  my-first-couchdb-plugin/.gitignore \
-  my-first-couchdb-plugin/Makefile \
-  my-first-couchdb-plugin/priv/default.d/my_first_couchdb_plugin.ini \
-  my-first-couchdb-plugin/README.md \
-  my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src \
-  my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl \
-  my-first-couchdb-plugin/test/my_first_couchdb_plugin_tests.erl
-
-FAUXTON_FILES = \
-    fauxton/app/addons/activetasks/assets/less/activetasks.less \
-    fauxton/app/addons/activetasks/base.js \
-    fauxton/app/addons/activetasks/resources.js \
-    fauxton/app/addons/activetasks/routes.js \
-    fauxton/app/addons/activetasks/templates/detail.html \
-    fauxton/app/addons/activetasks/templates/table.html \
-    fauxton/app/addons/activetasks/templates/tabledetail.html \
-    fauxton/app/addons/activetasks/templates/tabs.html \
-    fauxton/app/addons/activetasks/tests/viewsSpec.js \
-    fauxton/app/addons/activetasks/views.js \
-    fauxton/app/addons/auth/assets/less/auth.less \
-    fauxton/app/addons/auth/base.js \
-    fauxton/app/addons/auth/resources.js \
-    fauxton/app/addons/auth/routes.js \
-    fauxton/app/addons/auth/templates/change_password.html \
-    fauxton/app/addons/auth/templates/create_admin.html \
-    fauxton/app/addons/auth/templates/login.html \
-    fauxton/app/addons/auth/templates/nav_dropdown.html \
-    fauxton/app/addons/auth/templates/nav_link_title.html \
-    fauxton/app/addons/auth/templates/noAccess.html \
-    fauxton/app/addons/config/base.js \
-    fauxton/app/addons/config/resources.js \
-    fauxton/app/addons/config/routes.js \
-    fauxton/app/addons/config/templates/dashboard.html \
-    fauxton/app/addons/config/templates/item.html \
-    fauxton/app/addons/contribute/base.js \
-    fauxton/app/addons/exampleAuth/base.js \
-    fauxton/app/addons/exampleAuth/templates/noAccess.html \
-    fauxton/app/addons/logs/base.js \
-    fauxton/app/addons/logs/resources.js \
-    fauxton/app/addons/logs/routes.js \
-    fauxton/app/addons/logs/templates/dashboard.html \
-    fauxton/app/addons/logs/templates/filterItem.html \
-    fauxton/app/addons/logs/templates/sidebar.html \
-    fauxton/app/addons/logs/tests/logSpec.js \
-    fauxton/app/addons/permissions/assets/less/permissions.less \
-    fauxton/app/addons/permissions/base.js \
-    fauxton/app/addons/permissions/resources.js \
-    fauxton/app/addons/permissions/routes.js \
-    fauxton/app/addons/permissions/templates/item.html \
-    fauxton/app/addons/permissions/templates/permissions.html \
-    fauxton/app/addons/permissions/templates/section.html \
-    fauxton/app/addons/permissions/tests/resourceSpec.js \
-    fauxton/app/addons/permissions/tests/viewsSpec.js \
-    fauxton/app/addons/permissions/views.js \
-    fauxton/app/addons/plugins/base.js \
-    fauxton/app/addons/plugins/resources.js \
-    fauxton/app/addons/plugins/routes.js \
-    fauxton/app/addons/plugins/templates/plugins.html \
-    fauxton/app/addons/replication/assets/less/replication.less \
-    fauxton/app/addons/replication/base.js \
-    fauxton/app/addons/replication/resources.js \
-    fauxton/app/addons/replication/route.js \
-    fauxton/app/addons/replication/templates/form.html \
-    fauxton/app/addons/replication/templates/progress.html \
-    fauxton/app/addons/replication/tests/replicationSpec.js \
-    fauxton/app/addons/replication/views.js \
-    fauxton/app/addons/stats/assets/less/stats.less \
-    fauxton/app/addons/stats/base.js \
-    fauxton/app/addons/stats/resources.js \
-    fauxton/app/addons/stats/routes.js \
-    fauxton/app/addons/stats/templates/by_method.html \
-    fauxton/app/addons/stats/templates/pie_table.html \
-    fauxton/app/addons/stats/templates/stats.html \
-    fauxton/app/addons/stats/templates/statselect.html \
-    fauxton/app/addons/stats/views.js \
-    fauxton/app/api.js \
-    fauxton/app/app.js \
-    fauxton/app/config.js \
-    fauxton/app/helpers.js \
-    fauxton/app/initialize.js.underscore \
-    fauxton/app/load_addons.js.underscore \
-    fauxton/app/main.js \
-    fauxton/app/mixins.js \
-    fauxton/app/modules/databases/base.js \
-    fauxton/app/modules/databases/resources.js \
-    fauxton/app/modules/databases/routes.js \
-    fauxton/app/modules/databases/views.js \
-    fauxton/app/modules/documents/base.js \
-    fauxton/app/modules/documents/resources.js \
-    fauxton/app/modules/documents/routes.js \
-    fauxton/app/modules/documents/tests/resourcesSpec.js \
-    fauxton/app/modules/documents/views.js \
-    fauxton/app/modules/fauxton/base.js \
-    fauxton/app/modules/fauxton/components.js \
-    fauxton/app/modules/fauxton/layout.js \
-    fauxton/app/modules/pouchdb/base.js \
-    fauxton/app/modules/pouchdb/pouch.collate.js \
-    fauxton/app/modules/pouchdb/pouchdb.mapreduce.js \
-    fauxton/app/resizeColumns.js \
-    fauxton/app/router.js \
-    fauxton/app/templates/databases/item.html \
-    fauxton/app/templates/databases/list.html \
-    fauxton/app/templates/databases/newdatabase.html \
-    fauxton/app/templates/databases/sidebar.html \
-    fauxton/app/templates/documents/all_docs_item.html \
-    fauxton/app/templates/documents/all_docs_list.html \
-    fauxton/app/templates/documents/changes.html \
-    fauxton/app/templates/documents/ddoc_info.html \
-    fauxton/app/templates/documents/doc.html \
-    fauxton/app/templates/documents/doc_field_editor.html \
-    fauxton/app/templates/documents/doc_field_editor_tabs.html \
-    fauxton/app/templates/documents/duplicate_doc_modal.html \
-    fauxton/app/templates/documents/edit_tools.html \
-    fauxton/app/templates/documents/index_menu_item.html \
-    fauxton/app/templates/documents/index_row_docular.html \
-    fauxton/app/templates/documents/index_row_tabular.html \
-    fauxton/app/templates/documents/jumpdoc.html \
-    fauxton/app/templates/documents/search.html \
-    fauxton/app/templates/documents/sidebar.html \
-    fauxton/app/templates/documents/tabs.html \
-    fauxton/app/templates/documents/upload_modal.html \
-    fauxton/app/templates/documents/view_editor.html \
-    fauxton/app/templates/fauxton/api_bar.html \
-    fauxton/app/templates/fauxton/breadcrumbs.html \
-    fauxton/app/templates/fauxton/footer.html \
-    fauxton/app/templates/fauxton/index_pagination.html \
-    fauxton/app/templates/fauxton/nav_bar.html \
-    fauxton/app/templates/fauxton/notification.html \
-    fauxton/app/templates/fauxton/pagination.html \
-    fauxton/app/templates/layouts/one_pane.html \
-    fauxton/app/templates/layouts/two_pane.html \
-    fauxton/app/templates/layouts/with_right_sidebar.html \
-    fauxton/app/templates/layouts/with_sidebar.html \
-    fauxton/app/templates/layouts/with_tabs.html \
-    fauxton/app/templates/layouts/with_tabs_sidebar.html \
-    fauxton/assets/css/nv.d3.css \
-    fauxton/assets/img/couchdb-site.png \
-    fauxton/assets/img/couchdblogo.png \
-    fauxton/assets/img/fontawesome-webfont.eot \
-    fauxton/assets/img/fontawesome-webfont.svg \
-    fauxton/assets/img/fontawesome-webfont.ttf \
-    fauxton/assets/img/fontawesome-webfont.woff \
-    fauxton/assets/img/FontAwesome.otf \
-    fauxton/assets/img/fontcustom_fauxton.eot \
-    fauxton/assets/img/fontcustom_fauxton.svg \
-    fauxton/assets/img/fontcustom_fauxton.ttf \
-    fauxton/assets/img/fontcustom_fauxton.woff \
-    fauxton/assets/img/glyphicons-halflings-white.png \
-    fauxton/assets/img/glyphicons-halflings.png \
-    fauxton/assets/img/linen.png \
-    fauxton/assets/img/loader.gif \
-    fauxton/assets/img/minilogo.png \
-    fauxton/assets/index.underscore \
-    fauxton/assets/js/libs/ace/ace.js \
-    fauxton/assets/js/libs/ace/ext-static_highlight.js \
-    fauxton/assets/js/libs/ace/ext-chromevox.js \
-    fauxton/assets/js/libs/ace/ext-statusbar.js \
-    fauxton/assets/js/libs/ace/ext-elastic_tabstops_lite.js \
-    fauxton/assets/js/libs/ace/ext-textarea.js \
-    fauxton/assets/js/libs/ace/ext-emmet.js \
-    fauxton/assets/js/libs/ace/ext-themelist.js \
-    fauxton/assets/js/libs/ace/ext-keybinding_menu.js \
-    fauxton/assets/js/libs/ace/ext-whitespace.js \
-    fauxton/assets/js/libs/ace/ext-language_tools.js \
-    fauxton/assets/js/libs/ace/mode-javascript.js \
-    fauxton/assets/js/libs/ace/ext-modelist.js \
-    fauxton/assets/js/libs/ace/mode-json.js \
-    fauxton/assets/js/libs/ace/ext-old_ie.js \
-    fauxton/assets/js/libs/ace/mode-jsoniq.js \
-    fauxton/assets/js/libs/ace/ext-options.js \
-    fauxton/assets/js/libs/ace/ext-searchbox.js \
-    fauxton/assets/js/libs/ace/theme-crimson_editor.js \
-    fauxton/assets/js/libs/ace/ext-settings_menu.js \
-    fauxton/assets/js/libs/ace/worker-javascript.js \
-    fauxton/assets/js/libs/ace/ext-spellcheck.js \
-    fauxton/assets/js/libs/ace/worker-json.js \
-    fauxton/assets/js/libs/ace/ext-split.js \
-    fauxton/assets/js/libs/ace/snippets/javascript.js \
-    fauxton/assets/js/libs/ace/snippets/json.js \
-    fauxton/assets/js/libs/ace/snippets/jsoniq.js \
-    fauxton/assets/js/libs/almond.js \
-    fauxton/assets/js/libs/backbone.js \
-    fauxton/assets/js/libs/bootstrap.js \
-    fauxton/assets/js/libs/d3.js \
-    fauxton/assets/js/libs/jquery.js \
-    fauxton/assets/js/libs/lodash.js \
-    fauxton/assets/js/libs/nv.d3.js \
-    fauxton/assets/js/libs/require.js \
-    fauxton/assets/js/libs/spin.min.js \
-    fauxton/assets/js/plugins/backbone.layoutmanager.js \
-    fauxton/assets/js/plugins/jquery.form.js \
-    fauxton/assets/js/plugins/prettify.js \
-    fauxton/assets/less/bootstrap/accordion.less \
-    fauxton/assets/less/bootstrap/alerts.less \
-    fauxton/assets/less/bootstrap/bootstrap.less \
-    fauxton/assets/less/bootstrap/breadcrumbs.less \
-    fauxton/assets/less/bootstrap/button-groups.less \
-    fauxton/assets/less/bootstrap/buttons.less \
-    fauxton/assets/less/bootstrap/carousel.less \
-    fauxton/assets/less/bootstrap/close.less \
-    fauxton/assets/less/bootstrap/code.less \
-    fauxton/assets/less/bootstrap/component-animations.less \
-    fauxton/assets/less/bootstrap/dropdowns.less \
-    fauxton/assets/less/bootstrap/font-awesome/bootstrap.less \
-    fauxton/assets/less/bootstrap/font-awesome/core.less \
-    fauxton/assets/less/bootstrap/font-awesome/extras.less \
-    fauxton/assets/less/bootstrap/font-awesome/font-awesome-ie7.less \
-    fauxton/assets/less/bootstrap/font-awesome/font-awesome.less \
-    fauxton/assets/less/bootstrap/font-awesome/icons.less \
-    fauxton/assets/less/bootstrap/font-awesome/mixins.less \
-    fauxton/assets/less/bootstrap/font-awesome/path.less \
-    fauxton/assets/less/bootstrap/font-awesome/variables.less \
-    fauxton/assets/less/bootstrap/forms.less \
-    fauxton/assets/less/bootstrap/grid.less \
-    fauxton/assets/less/bootstrap/hero-unit.less \
-    fauxton/assets/less/bootstrap/labels-badges.less \
-    fauxton/assets/less/bootstrap/layouts.less \
-    fauxton/assets/less/bootstrap/media.less \
-    fauxton/assets/less/bootstrap/mixins.less \
-    fauxton/assets/less/bootstrap/modals.less \
-    fauxton/assets/less/bootstrap/navbar.less \
-    fauxton/assets/less/bootstrap/navs.less \
-    fauxton/assets/less/bootstrap/pager.less \
-    fauxton/assets/less/bootstrap/pagination.less \
-    fauxton/assets/less/bootstrap/popovers.less \
-    fauxton/assets/less/bootstrap/progress-bars.less \
-    fauxton/assets/less/bootstrap/reset.less \
-    fauxton/assets/less/bootstrap/responsive-1200px-min.less \
-    fauxton/assets/less/bootstrap/responsive-767px-max.less \
-    fauxton/assets/less/bootstrap/responsive-768px-979px.less \
-    fauxton/assets/less/bootstrap/responsive-navbar.less \
-    fauxton/assets/less/bootstrap/responsive-utilities.less \
-    fauxton/assets/less/bootstrap/responsive.less \
-    fauxton/assets/less/bootstrap/scaffolding.less \
-    fauxton/assets/less/bootstrap/sprites.less \
-    fauxton/assets/less/bootstrap/tables.less \
-    fauxton/assets/less/bootstrap/tests/buttons.html \
-    fauxton/assets/less/bootstrap/tests/css-tests.css \
-    fauxton/assets/less/bootstrap/thumbnails.less \
-    fauxton/assets/less/bootstrap/tooltip.less \
-    fauxton/assets/less/bootstrap/type.less \
-    fauxton/assets/less/bootstrap/utilities.less \
-    fauxton/assets/less/bootstrap/variables.less \
-    fauxton/assets/less/bootstrap/wells.less \
-    fauxton/assets/less/config.less \
-    fauxton/assets/less/couchdb.less \
-    fauxton/assets/less/database.less \
-    fauxton/assets/less/fauxton.less \
-    fauxton/assets/less/icons.less \
-    fauxton/assets/less/logs.less \
-    fauxton/assets/less/prettyprint.less \
-    fauxton/assets/less/variables.less \
-    fauxton/bin/grunt \
-    fauxton/couchapp.js \
-    fauxton/favicon.ico \
-    fauxton/Gruntfile.js \
-    fauxton/index.html \
-    fauxton/package.json \
-    fauxton/readme.md \
-    fauxton/settings.json.default \
-    fauxton/settings.json.sample_external \
-    fauxton/tasks/addon/rename.json \
-    fauxton/tasks/addon/root/base.js.underscore \
-    fauxton/tasks/addon/root/resources.js.underscore \
-    fauxton/tasks/addon/root/routes.js.underscore \
-    fauxton/tasks/addon/template.js \
-    fauxton/tasks/couchserver.js \
-    fauxton/tasks/fauxton.js \
-    fauxton/tasks/helper.js \
-    fauxton/test/core/layoutSpec.js \
-    fauxton/test/core/navbarSpec.js \
-    fauxton/test/core/paginateSpec.js \
-    fauxton/test/core/routeObjectSpec.js \
-    fauxton/test/mocha/chai.js \
-    fauxton/test/mocha/mocha.css \
-    fauxton/test/mocha/mocha.js \
-    fauxton/test/mocha/sinon-chai.js \
-    fauxton/test/mocha/sinon.js \
-    fauxton/test/mocha/testUtils.js \
-    fauxton/test/runner.html \
-    fauxton/test/test.config.underscore \
-    fauxton/TODO.md \
-    fauxton/writing_addons.md

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/c_src/spawnkillable/couchspawnkillable_win.c
----------------------------------------------------------------------
diff --git a/apps/couch/c_src/spawnkillable/couchspawnkillable_win.c b/apps/couch/c_src/spawnkillable/couchspawnkillable_win.c
new file mode 100644
index 0000000..0678231
--- /dev/null
+++ b/apps/couch/c_src/spawnkillable/couchspawnkillable_win.c
@@ -0,0 +1,145 @@
+// 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.
+
+// Do what 2 lines of shell script in couchspawnkillable does...
+// * Create a new suspended process with the same (duplicated) standard 
+//   handles as us.
+// * Write a line to stdout, consisting of the path to ourselves, plus
+//   '--kill {pid}' where {pid} is the PID of the newly created process.
+// * Un-suspend the new process.
+// * Wait for the process to terminate.
+// * Terminate with the child's exit-code.
+
+// Later, couch will call us with --kill and the PID, so we dutifully
+// terminate the specified PID.
+
+#include <stdlib.h>
+#include "windows.h"
+
+char *get_child_cmdline(int argc, char **argv)
+{
+    // make a new command-line, but skipping me.
+    // XXX - todo - spaces etc in args???
+    int i;
+    char *p, *cmdline;
+    int nchars = 0;
+    int nthis = 1;
+    for (i=1;i<argc;i++)
+        nchars += strlen(argv[i])+1;
+    cmdline = p = malloc(nchars+1);
+    if (!cmdline)
+        return NULL;
+    for (i=1;i<argc;i++) {
+        nthis = strlen(argv[i]);
+        strncpy(p, argv[i], nthis);
+        p[nthis] = ' ';
+        p += nthis+1;
+    }
+    // Replace the last space we added above with a '\0'
+    cmdline[nchars-1] = '\0';
+    return cmdline;
+}
+
+// create the child process, returning 0, or the exit-code we will
+// terminate with.
+int create_child(int argc, char **argv, PROCESS_INFORMATION *pi)
+{
+    char buf[1024];
+    DWORD dwcreate;
+    STARTUPINFO si;
+    char *cmdline;
+    if (argc < 2)
+        return 1;
+    cmdline = get_child_cmdline(argc, argv);
+    if (!cmdline)
+        return 2;
+
+    memset(&si, 0, sizeof(si));
+    si.cb = sizeof(si);
+    // depending on how *our* parent is started, we may or may not have
+    // a valid stderr stream - so although we try and duplicate it, only
+    // failing to duplicate stdin and stdout are considered fatal.
+    if (!DuplicateHandle(GetCurrentProcess(),
+                       GetStdHandle(STD_INPUT_HANDLE),
+                       GetCurrentProcess(),
+                       &si.hStdInput,
+                       0,
+                       TRUE, // inheritable
+                       DUPLICATE_SAME_ACCESS) ||
+       !DuplicateHandle(GetCurrentProcess(),
+                       GetStdHandle(STD_OUTPUT_HANDLE),
+                       GetCurrentProcess(),
+                       &si.hStdOutput,
+                       0,
+                       TRUE, // inheritable
+                       DUPLICATE_SAME_ACCESS)) {
+        return 3;
+    }
+    DuplicateHandle(GetCurrentProcess(),
+                   GetStdHandle(STD_ERROR_HANDLE),
+                   GetCurrentProcess(),
+                   &si.hStdError,
+                   0,
+                   TRUE, // inheritable
+                   DUPLICATE_SAME_ACCESS);
+
+    si.dwFlags = STARTF_USESTDHANDLES;
+    dwcreate = CREATE_SUSPENDED;
+    if (!CreateProcess( NULL, cmdline,
+                        NULL,
+                        NULL,
+                        TRUE, // inherit handles
+                        dwcreate,
+                        NULL, // environ
+                        NULL, // cwd
+                        &si,
+                        pi))
+        return 4;
+    return 0;
+}
+
+// and here we go...
+int main(int argc, char **argv)
+{
+    char out_buf[1024];
+    int rc;
+    DWORD cbwritten;
+    DWORD exitcode;
+    PROCESS_INFORMATION pi;
+    if (argc==3 && strcmp(argv[1], "--kill")==0) {
+        HANDLE h = OpenProcess(PROCESS_TERMINATE, 0, atoi(argv[2]));
+        if (!h)
+            return 1;
+        if (!TerminateProcess(h, 0))
+            return 2;
+        CloseHandle(h);
+        return 0;
+    }
+    // spawn the new suspended process
+    rc = create_child(argc, argv, &pi);
+    if (rc)
+        return rc;
+    // Write the 'terminate' command, which includes this PID, back to couch.
+    // *sob* - what about spaces etc?
+    sprintf_s(out_buf, sizeof(out_buf), "%s --kill %d\n", 
+              argv[0], pi.dwProcessId);
+    WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), out_buf, strlen(out_buf), 
+              &cbwritten, NULL);
+    // Let the child process go...
+    ResumeThread(pi.hThread);
+    // Wait for the process to terminate so we can reflect the exit code
+    // back to couch.
+    WaitForSingleObject(pi.hProcess, INFINITE);
+    if (!GetExitCodeProcess(pi.hProcess, &exitcode))
+        return 6;
+    return exitcode;
+}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/priv/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch/priv/Makefile.am b/apps/couch/priv/Makefile.am
deleted file mode 100644
index 9a24222..0000000
--- a/apps/couch/priv/Makefile.am
+++ /dev/null
@@ -1,151 +0,0 @@
-## 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.
-
-MAKE_SAFE = $(MAKE)
-
-couchlibdir = $(localerlanglibdir)/couch-$(version)
-couchprivdir = $(couchlibdir)/priv
-couchprivlibdir = $(couchlibdir)/priv/lib
-man1dir = $(mandir)/man1
-
-man_file = couchjs.1
-
-if BUILD_MAN
-man_file_build = $(man_file)
-else
-man_file_build =
-endif
-
-BUILT_SOURCES = $(man_file_build)
-
-EXTRA_DIST = \
-	spawnkillable/couchspawnkillable.sh \
-	stat_descriptions.cfg.in \
-	couch_ejson_compare/erl_nif_compat.h \
-	couch_js/sm170.c \
-	couch_js/sm180.c \
-	couch_js/sm185.c \
-	$(man_file_build)
-
-CLEANFILES = $(man_file_build) stat_descriptions.cfg
-
-couchprivlib_LTLIBRARIES = couch_icu_driver.la
-if USE_EJSON_COMPARE_NIF
-couchprivlib_LTLIBRARIES += couch_ejson_compare.la
-couch_ejson_compare_la_SOURCES = couch_ejson_compare/couch_ejson_compare.c
-couch_ejson_compare_la_CPPFLAGS = -D_BSD_SOURCE $(ICU_CPPFLAGS) $(ERLANG_FLAGS)
-couch_ejson_compare_la_LDFLAGS = -module -avoid-version
-couch_ejson_compare_la_LIBADD = $(ICU_LIBS)
-if WINDOWS
-couch_ejson_compare_la_LDFLAGS += -no-undefined
-endif
-endif
-couch_icu_driver_la_SOURCES = icu_driver/couch_icu_driver.c
-couch_icu_driver_la_LDFLAGS = -module -avoid-version
-couch_icu_driver_la_CPPFLAGS = $(ICU_CPPFLAGS) $(ERLANG_FLAGS)
-couch_icu_driver_la_LIBADD = $(ICU_LIBS)
-
-if WINDOWS
-couch_icu_driver_la_LDFLAGS += -no-undefined
-endif
-
-COUCHJS_SRCS = \
-	couch_js/help.h \
-	couch_js/http.c \
-	couch_js/http.h \
-	couch_js/main.c \
-	couch_js/utf8.c \
-	couch_js/utf8.h \
-	couch_js/util.h \
-	couch_js/util.c
-
-locallibbin_PROGRAMS = couchjs
-couchjs_SOURCES = $(COUCHJS_SRCS)
-couchjs_CFLAGS = -g -Wall -Werror -D_BSD_SOURCE $(CURL_CFLAGS) $(JS_CFLAGS)
-couchjs_LDADD = $(CURL_LIBS) $(JS_LIBS)
-
-couchpriv_DATA = stat_descriptions.cfg
-couchpriv_PROGRAMS = couchspawnkillable
-
-# Depend on source files so distributed man pages are not rebuilt for end user.
-
-$(man_file): $(COUCHJS_SRCS)
-	$(MAKE_SAFE) -f Makefile couchjs; \
-	$(top_srcdir)/build-aux/missing --run \
-	    help2man \
-	        --no-info \
-	        --help-option="-h" \
-	        --version-option="-V" \
-	        --name="$(package_name) JavaScript interpreter" \
-	        ./couchjs --output $@
-
-install-data-local:
-	if test -s $(man_file); then \
-	    if test `cat $(man_file) | wc -l` -gt 1; then \
-	        $(INSTALL) -d $(DESTDIR)$(man1dir); \
-	        $(INSTALL_DATA) $(man_file) $(DESTDIR)$(man1dir)/$(man_file); \
-	    fi \
-	fi
-
-%.cfg: %.cfg.in
-	cp $< $@
-
-if WINDOWS
-couchspawnkillable_SOURCES = spawnkillable/couchspawnkillable_win.c
-endif
-
-if !WINDOWS
-couchspawnkillable: spawnkillable/couchspawnkillable.sh
-	cp $< $@
-	chmod +x $@
-endif
-
-# libtool and automake have defeated markh.  For each of our executables
-# we end up with 2 copies - one directly in the 'target' folder (eg, 'priv')
-# and another - the correct one - in .libs.  The former doesn't work but is
-# what gets installed for 'couchspawnkillable' - but the correct one for
-# couchjs.exe *does* get copied.  *shrug*  So just clobber it with the
-# correct one as the last step. See bug COUCHDB-439
-install-data-hook:
-	if test -f "$(DESTDIR)$(couchprivlibdir)/couch_icu_driver"; then \
-	    rm -f "$(DESTDIR)$(couchprivlibdir)/couch_icu_driver.so"; \
-	    cd "$(DESTDIR)$(couchprivlibdir)" && \
-	        $(LN_S) couch_icu_driver couch_icu_driver.so; \
-	fi
-	if test -f "$(DESTDIR)$(couchprivlibdir)/couch_ejson_compare_nif"; then \
-	    rm -f "$(DESTDIR)$(couchprivlibdir)/couch_ejson_compare_nif.so"; \
-	    cd "$(DESTDIR)$(couchprivlibdir)" && \
-	        $(LN_S) couch_ejson_compare_nif couch_ejson_compare_nif.so; \
-	fi
-if WINDOWS
-	$(INSTALL) $(ICU_BIN)/icuuc*.dll $(bindir)
-	$(INSTALL) $(ICU_BIN)/icudt*.dll $(bindir)
-	$(INSTALL) $(ICU_BIN)/icuin*.dll $(bindir)
-	$(INSTALL) $(JS_LIB_BINARY) $(bindir)
-	$(INSTALL) .libs/couchspawnkillable.exe \
-		"$(DESTDIR)$(couchprivdir)/couchspawnkillable.exe"
-endif
-
-uninstall-local:
-	rm -f $(DESTDIR)$(man1dir)/$(man_file)
-	if test -f "$(DESTDIR)$(couchprivlibdir)/couch_erl_driver"; then \
-	    rm -f "$(DESTDIR)$(couchprivlibdir)/couch_erl_driver.so"; \
-	fi
-
-distcheck-hook:
-	if test ! -s $(man_file); then \
-	    $(top_srcdir)/build-aux/dist-error $(man_file); \
-	else \
-	    if test ! `cat $(man_file) | wc -l` -gt 1; then \
-	        $(top_srcdir)/build-aux/dist-error $(man_file); \
-	    fi \
-	fi

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/priv/couchspawnkillable.sh
----------------------------------------------------------------------
diff --git a/apps/couch/priv/couchspawnkillable.sh b/apps/couch/priv/couchspawnkillable.sh
new file mode 100755
index 0000000..f8d042e
--- /dev/null
+++ b/apps/couch/priv/couchspawnkillable.sh
@@ -0,0 +1,20 @@
+#! /bin/sh -e
+
+# 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.
+
+# The purpose of this script is to echo an OS specific command before launching
+# the actual process. This provides a way for Erlang to hard-kill its external
+# processes.
+
+echo "kill -9 $$"
+exec $*

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/priv/spawnkillable/couchspawnkillable.sh
----------------------------------------------------------------------
diff --git a/apps/couch/priv/spawnkillable/couchspawnkillable.sh b/apps/couch/priv/spawnkillable/couchspawnkillable.sh
deleted file mode 100644
index f8d042e..0000000
--- a/apps/couch/priv/spawnkillable/couchspawnkillable.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh -e
-
-# 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.
-
-# The purpose of this script is to echo an OS specific command before launching
-# the actual process. This provides a way for Erlang to hard-kill its external
-# processes.
-
-echo "kill -9 $$"
-exec $*

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/priv/spawnkillable/couchspawnkillable_win.c
----------------------------------------------------------------------
diff --git a/apps/couch/priv/spawnkillable/couchspawnkillable_win.c b/apps/couch/priv/spawnkillable/couchspawnkillable_win.c
deleted file mode 100644
index 0678231..0000000
--- a/apps/couch/priv/spawnkillable/couchspawnkillable_win.c
+++ /dev/null
@@ -1,145 +0,0 @@
-// 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.
-
-// Do what 2 lines of shell script in couchspawnkillable does...
-// * Create a new suspended process with the same (duplicated) standard 
-//   handles as us.
-// * Write a line to stdout, consisting of the path to ourselves, plus
-//   '--kill {pid}' where {pid} is the PID of the newly created process.
-// * Un-suspend the new process.
-// * Wait for the process to terminate.
-// * Terminate with the child's exit-code.
-
-// Later, couch will call us with --kill and the PID, so we dutifully
-// terminate the specified PID.
-
-#include <stdlib.h>
-#include "windows.h"
-
-char *get_child_cmdline(int argc, char **argv)
-{
-    // make a new command-line, but skipping me.
-    // XXX - todo - spaces etc in args???
-    int i;
-    char *p, *cmdline;
-    int nchars = 0;
-    int nthis = 1;
-    for (i=1;i<argc;i++)
-        nchars += strlen(argv[i])+1;
-    cmdline = p = malloc(nchars+1);
-    if (!cmdline)
-        return NULL;
-    for (i=1;i<argc;i++) {
-        nthis = strlen(argv[i]);
-        strncpy(p, argv[i], nthis);
-        p[nthis] = ' ';
-        p += nthis+1;
-    }
-    // Replace the last space we added above with a '\0'
-    cmdline[nchars-1] = '\0';
-    return cmdline;
-}
-
-// create the child process, returning 0, or the exit-code we will
-// terminate with.
-int create_child(int argc, char **argv, PROCESS_INFORMATION *pi)
-{
-    char buf[1024];
-    DWORD dwcreate;
-    STARTUPINFO si;
-    char *cmdline;
-    if (argc < 2)
-        return 1;
-    cmdline = get_child_cmdline(argc, argv);
-    if (!cmdline)
-        return 2;
-
-    memset(&si, 0, sizeof(si));
-    si.cb = sizeof(si);
-    // depending on how *our* parent is started, we may or may not have
-    // a valid stderr stream - so although we try and duplicate it, only
-    // failing to duplicate stdin and stdout are considered fatal.
-    if (!DuplicateHandle(GetCurrentProcess(),
-                       GetStdHandle(STD_INPUT_HANDLE),
-                       GetCurrentProcess(),
-                       &si.hStdInput,
-                       0,
-                       TRUE, // inheritable
-                       DUPLICATE_SAME_ACCESS) ||
-       !DuplicateHandle(GetCurrentProcess(),
-                       GetStdHandle(STD_OUTPUT_HANDLE),
-                       GetCurrentProcess(),
-                       &si.hStdOutput,
-                       0,
-                       TRUE, // inheritable
-                       DUPLICATE_SAME_ACCESS)) {
-        return 3;
-    }
-    DuplicateHandle(GetCurrentProcess(),
-                   GetStdHandle(STD_ERROR_HANDLE),
-                   GetCurrentProcess(),
-                   &si.hStdError,
-                   0,
-                   TRUE, // inheritable
-                   DUPLICATE_SAME_ACCESS);
-
-    si.dwFlags = STARTF_USESTDHANDLES;
-    dwcreate = CREATE_SUSPENDED;
-    if (!CreateProcess( NULL, cmdline,
-                        NULL,
-                        NULL,
-                        TRUE, // inherit handles
-                        dwcreate,
-                        NULL, // environ
-                        NULL, // cwd
-                        &si,
-                        pi))
-        return 4;
-    return 0;
-}
-
-// and here we go...
-int main(int argc, char **argv)
-{
-    char out_buf[1024];
-    int rc;
-    DWORD cbwritten;
-    DWORD exitcode;
-    PROCESS_INFORMATION pi;
-    if (argc==3 && strcmp(argv[1], "--kill")==0) {
-        HANDLE h = OpenProcess(PROCESS_TERMINATE, 0, atoi(argv[2]));
-        if (!h)
-            return 1;
-        if (!TerminateProcess(h, 0))
-            return 2;
-        CloseHandle(h);
-        return 0;
-    }
-    // spawn the new suspended process
-    rc = create_child(argc, argv, &pi);
-    if (rc)
-        return rc;
-    // Write the 'terminate' command, which includes this PID, back to couch.
-    // *sob* - what about spaces etc?
-    sprintf_s(out_buf, sizeof(out_buf), "%s --kill %d\n", 
-              argv[0], pi.dwProcessId);
-    WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), out_buf, strlen(out_buf), 
-              &cbwritten, NULL);
-    // Let the child process go...
-    ResumeThread(pi.hThread);
-    // Wait for the process to terminate so we can reflect the exit code
-    // back to couch.
-    WaitForSingleObject(pi.hProcess, INFINITE);
-    if (!GetExitCodeProcess(pi.hProcess, &exitcode))
-        return 6;
-    return exitcode;
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/rebar.config.script
----------------------------------------------------------------------
diff --git a/apps/couch/rebar.config.script b/apps/couch/rebar.config.script
index fb93f97..ca79b39 100644
--- a/apps/couch/rebar.config.script
+++ b/apps/couch/rebar.config.script
@@ -85,13 +85,24 @@ end,
     _ -> {CFLAGS, LDFLAGS ++ " -lcurl"}
 end,
 
+PortSpecs0 = case os:type() of
+    {win32, _} ->
+        [{filename:join(["priv", "couchspawnkillable"]),
+            ["c_src/spawnkillable/*.c"]}];
+    _ ->
+        {ok, _} = file:copy("priv/couchspawnkillable.sh",
+                            "priv/couchspawnkillable"),
+        os:cmd("chmod +x priv/couchspawnkillable"),
+        []
+    end,
+
 PortEnv = [{port_env, [
             {"CFLAGS",  "$CFLAGS -Wall -c -g -O2 " ++ CFLAGS1},
             {"LDFLAGS", "$LDFLAGS " ++ LDFLAGS1}]},
 
            {port_specs, [
             {filename:join(["priv", CouchJSName]),
-            ["c_src/couch_js/*.c"]}]}
+            ["c_src/couch_js/*.c"]}] ++ PortSpecs0}
 ],
 
 lists:keymerge(1,lists:keysort(1, PortEnv), lists:keysort(1, CONFIG)).

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch/src/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch/src/Makefile.am b/apps/couch/src/Makefile.am
deleted file mode 100644
index 9fe19bc..0000000
--- a/apps/couch/src/Makefile.am
+++ /dev/null
@@ -1,198 +0,0 @@
-## 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.
-
-SUBDIRS = priv
-
-# devdocdir = $(localdocdir)/developer/couchdb
-couchlibdir = $(localerlanglibdir)/couch-$(version)
-couchincludedir = $(couchlibdir)/include
-couchebindir = $(couchlibdir)/ebin
-
-couchinclude_DATA = couch_db.hrl couch_js_functions.hrl
-couchebin_DATA = $(compiled_files)
-
-# dist_devdoc_DATA = $(doc_base) $(doc_modules)
-
-CLEANFILES = $(compiled_files) $(doc_base)
-
-# CLEANFILES = $(doc_modules) edoc-info
-
-source_files = \
-    couch.erl \
-    couch_app.erl \
-    couch_auth_cache.erl \
-    couch_btree.erl \
-    couch_changes.erl \
-    couch_compaction_daemon.erl \
-    couch_compress.erl \
-    couch_config.erl \
-    couch_config_writer.erl \
-    couch_db.erl \
-    couch_db_update_notifier.erl \
-    couch_db_update_notifier_sup.erl \
-    couch_doc.erl \
-    couch_drv.erl \
-    couch_ejson_compare.erl \
-    couch_event_sup.erl \
-    couch_external_manager.erl \
-    couch_external_server.erl \
-    couch_file.erl \
-    couch_httpd.erl \
-    couch_httpd_db.erl \
-    couch_httpd_auth.erl \
-    couch_httpd_cors.erl \
-    couch_httpd_oauth.erl \
-    couch_httpd_external.erl \
-    couch_httpd_misc_handlers.erl \
-    couch_httpd_proxy.erl \
-    couch_httpd_rewrite.erl \
-    couch_httpd_stats_handlers.erl \
-    couch_httpd_vhost.erl \
-    couch_key_tree.erl \
-    couch_log.erl \
-    couch_native_process.erl \
-    couch_os_daemons.erl \
-    couch_os_process.erl \
-    couch_passwords.erl \
-    couch_primary_sup.erl \
-    couch_query_servers.erl \
-    couch_ref_counter.erl \
-    couch_secondary_sup.erl \
-    couch_server.erl \
-    couch_server_sup.erl \
-    couch_stats_aggregator.erl \
-    couch_stats_collector.erl \
-    couch_stream.erl \
-    couch_task_status.erl \
-    couch_users_db.erl \
-    couch_util.erl \
-    couch_uuids.erl \
-    couch_db_updater.erl \
-    couch_work_queue.erl \
-    json_stream_parse.erl
-
-EXTRA_DIST = $(source_files) couch_db.hrl couch_js_functions.hrl
-
-compiled_files = \
-    couch.app \
-    couch.beam \
-    couch_app.beam \
-    couch_auth_cache.beam \
-    couch_btree.beam \
-    couch_changes.beam \
-    couch_compaction_daemon.beam \
-    couch_compress.beam \
-    couch_config.beam \
-    couch_config_writer.beam \
-    couch_db.beam \
-    couch_db_update_notifier.beam \
-    couch_db_update_notifier_sup.beam \
-    couch_doc.beam \
-    couch_drv.beam \
-    couch_ejson_compare.beam \
-    couch_event_sup.beam \
-    couch_external_manager.beam \
-    couch_external_server.beam \
-    couch_file.beam \
-    couch_httpd.beam \
-    couch_httpd_db.beam \
-    couch_httpd_auth.beam \
-    couch_httpd_oauth.beam \
-    couch_httpd_cors.beam \
-    couch_httpd_proxy.beam \
-    couch_httpd_external.beam \
-    couch_httpd_misc_handlers.beam \
-    couch_httpd_rewrite.beam \
-    couch_httpd_stats_handlers.beam \
-    couch_httpd_vhost.beam \
-    couch_key_tree.beam \
-    couch_log.beam \
-    couch_native_process.beam \
-    couch_os_daemons.beam \
-    couch_os_process.beam \
-    couch_passwords.beam \
-    couch_primary_sup.beam \
-    couch_query_servers.beam \
-    couch_ref_counter.beam \
-    couch_secondary_sup.beam \
-    couch_server.beam \
-    couch_server_sup.beam \
-    couch_stats_aggregator.beam \
-    couch_stats_collector.beam \
-    couch_stream.beam \
-    couch_task_status.beam \
-    couch_users_db.beam \
-    couch_util.beam \
-    couch_uuids.beam \
-    couch_db_updater.beam \
-    couch_work_queue.beam \
-    json_stream_parse.beam
-
-# doc_base = \
-#     erlang.png \
-#     index.html \
-#     modules-frame.html \
-#     overview-summary.html \
-#     packages-frame.html \
-#     stylesheet.css
-
-# doc_modules = \
-#     couch_btree.html \
-#     couch_config.html \
-#     couch_config_writer.html \
-#     couch_db.html \
-#     couch_db_update_notifier.html \
-#     couch_db_update_notifier_sup.html \
-#     couch_doc.html \
-#     couch_event_sup.html \
-#     couch_file.html \
-#     couch_httpd.html \
-#     couch_key_tree.html \
-#     couch_log.html \
-#     couch_query_servers.html \
-#     couch_rep.html \
-#     couch_rep_sup.html \
-#     couch_server.html \
-#     couch_server_sup.html \
-#     couch_stream.html \
-#     couch_util.html
-
-if WINDOWS
-couch.app: couch.app.tpl
-	modules=`find . -name "*.erl" \! -name ".*" -exec basename {} .erl \; | tr '\n' ',' | sed "s/,$$//"`; \
-	sed -e "s|%package_name%|@package_name@|g" \
-			-e "s|%version%|@version@|g" \
-			-e "s|@modules@|$$modules|g" \
-			-e "s|%localconfdir%|../etc/couchdb|g" \
-			-e "s|@defaultini@|default.ini|g" \
-			-e "s|@localini@|local.ini|g" > \
-	$@ < $<
-else
-couch.app: couch.app.tpl
-	modules=`{ find . -name "*.erl" \! -name ".*" -exec basename {} .erl \; | tr '\n' ','; echo ''; } | sed "s/,$$//"`; \
-	sed -e "s|%package_name%|@package_name@|g" \
-			-e "s|%version%|@version@|g" \
-			-e "s|@modules@|$$modules|g" \
-			-e "s|%localconfdir%|@localconfdir@|g" \
-			-e "s|@defaultini@|default.ini|g" \
-			-e "s|@localini@|local.ini|g" > \
-	$@ < $<
-	chmod +x $@
-endif
-
-# $(dist_devdoc_DATA): edoc-info
-
-# $(ERL) -noshell -run edoc_run files [\"$<\"]
-
-%.beam: %.erl couch_db.hrl couch_js_functions.hrl
-	$(ERLC) $(ERLC_FLAGS) ${TEST} $<;
-

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch_dbupdates/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch_dbupdates/Makefile.am b/apps/couch_dbupdates/Makefile.am
deleted file mode 100644
index d131b9b..0000000
--- a/apps/couch_dbupdates/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-## 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.
-
-couch_dbupdateslibdir = $(localerlanglibdir)/couch_dbupdates-0.1
-couch_dbupdatesebindir = $(couch_dbupdateslibdir)/ebin
-
-couch_dbupdatesebin_DATA = $(compiled_files)
-
-EXTRA_DIST = $(source_files)
-CLEANFILES = $(compiled_files)
-
-source_files = \
-    src/couch_dbupdates.erl \
-    src/couch_dbupdates.app.src \
-    src/couch_dbupdates_httpd.erl
-
-compiled_files = \
-    ebin/couch_dbupdates.beam \
-    ebin/couch_dbupdates_httpd.beam
-
-ebin/%.beam: src/%.erl
-	@mkdir -p ebin/
-	$(ERLC) -I$(top_srcdir)/src/couchdb -o ebin/ $(ERLC_FLAGS) ${TEST} $<;
-

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch_index/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch_index/Makefile.am b/apps/couch_index/Makefile.am
deleted file mode 100644
index 2d4c593..0000000
--- a/apps/couch_index/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-## 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.
-
-couch_indexlibdir = $(localerlanglibdir)/couch_index-0.1
-couch_indexebindir = $(couch_indexlibdir)/ebin
-
-couch_indexebin_DATA = $(compiled_files)
-
-EXTRA_DIST = $(source_files)
-CLEANFILES = $(compiled_files)
-
-source_files = \
-    src/couch_index.erl \
-    src/couch_index_api.erl \
-    src/couch_index.app.src \
-    src/couch_index_compactor.erl \
-    src/couch_index_server.erl \
-    src/couch_index_updater.erl \
-    src/couch_index_util.erl
-
-compiled_files = \
-    ebin/couch_index.beam \
-    ebin/couch_index_compactor.beam \
-    ebin/couch_index_server.beam \
-    ebin/couch_index_updater.beam \
-    ebin/couch_index_util.beam
-
-ebin/%.beam: src/%.erl
-	@mkdir -p ebin/
-	$(ERLC) -I$(top_srcdir)/src/couchdb -o ebin/ $(ERLC_FLAGS) ${TEST} $<;
-

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch_mrview/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch_mrview/Makefile.am b/apps/couch_mrview/Makefile.am
deleted file mode 100644
index 2b9ef86..0000000
--- a/apps/couch_mrview/Makefile.am
+++ /dev/null
@@ -1,73 +0,0 @@
-## 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.
-
-couch_mrviewlibdir = $(localerlanglibdir)/couch_mrview-0.1
-couch_mrviewincludedir = $(couch_mrviewlibdir)/include
-couch_mrviewebindir = $(couch_mrviewlibdir)/ebin
-
-couch_mrviewinclude_DATA = $(include_files)
-couch_mrviewebin_DATA = $(compiled_files)
-
-include_files = \
-    include/couch_mrview.hrl
-
-source_files = \
-    src/couch_mrview.app.src \
-    src/couch_mrview.erl \
-    src/couch_mrview_cleanup.erl \
-    src/couch_mrview_compactor.erl \
-    src/couch_mrview_http.erl \
-    src/couch_mrview_index.erl \
-    src/couch_mrview_show.erl \
-    src/couch_mrview_test_util.erl \
-    src/couch_mrview_updater.erl \
-    src/couch_mrview_util.erl
-
-test_files = \
-    test/01-load.t \
-    test/02-map-views.t \
-    test/03-red-views.t \
-    test/04-index-info.t \
-    test/05-collation.t \
-    test/06-all-docs.t \
-	test/07-compact-swap.t
-
-compiled_files = \
-    ebin/couch_mrview.app \
-    ebin/couch_mrview.beam \
-    ebin/couch_mrview_cleanup.beam \
-    ebin/couch_mrview_compactor.beam \
-    ebin/couch_mrview_http.beam \
-    ebin/couch_mrview_index.beam \
-    ebin/couch_mrview_show.beam \
-    ebin/couch_mrview_test_util.beam \
-    ebin/couch_mrview_updater.beam \
-    ebin/couch_mrview_util.beam
-
-EXTRA_DIST = $(include_files) $(source_files) $(test_files)
-CLEANFILES = $(compiled_files)
-
-check:
-if TESTS
-	$(abs_top_builddir)/test/etap/run $(abs_top_srcdir)/src/couch_mrview/test
-endif
-
-ebin/%.app: src/%.app.src
-	@mkdir -p ebin/
-	sed -e "s|%version%|@version@|g" \
-	< $< > $@
-
-ebin/%.beam: src/%.erl $(include_files)
-	@mkdir -p ebin/
-	$(ERLC) -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/couchdb \
-        -o ebin/ $(ERLC_FLAGS) ${TEST} $<;
-

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch_plugins/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch_plugins/Makefile.am b/apps/couch_plugins/Makefile.am
deleted file mode 100644
index 37cd9d5..0000000
--- a/apps/couch_plugins/Makefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-## 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.
-
-couch_pluginslibdir = $(localerlanglibdir)/couch_plugins-0.1
-couch_pluginsebindir = $(couch_pluginslibdir)/ebin
-
-couch_pluginsebin_DATA = $(compiled_files)
-
-
-source_files = \
-    src/couch_plugins.app.src \
-    src/couch_plugins.erl \
-    src/couch_plugins_httpd.erl
-
-compiled_files = \
-    ebin/couch_plugins.app \
-    ebin/couch_plugins.beam \
-    ebin/couch_plugins_httpd.beam
-
-EXTRA_DIST = $(source_files) README.md
-CLEANFILES = $(compiled_files)
-
-ebin/%.app: src/%.app.src
-	@mkdir -p ebin/
-	sed -e "s|%version%|@version@|g" \
-	< $< > $@
-
-ebin/%.beam: src/%.erl $(include_files)
-	@mkdir -p ebin/
-	$(ERLC) -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/couchdb \
-		-o ebin/ $(ERLC_FLAGS) ${TEST} $<;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couch_replicator/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couch_replicator/Makefile.am b/apps/couch_replicator/Makefile.am
deleted file mode 100644
index 2dcd47d..0000000
--- a/apps/couch_replicator/Makefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-## 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.
-
-couch_replicatorlibdir = $(localerlanglibdir)/couch_replicator-0.1
-couch_replicatorincludedir = $(couch_replicatorlibdir)/include
-couch_replicatorebindir = $(couch_replicatorlibdir)/ebin
-
-couch_replicatorinclude_DATA = $(include_files)
-couch_replicatorebin_DATA = $(compiled_files)
-
-include_files = \
-	src/couch_replicator_api_wrap.hrl \
-	src/couch_replicator.hrl \
-	src/couch_replicator_js_functions.hrl
-
-source_files = \
-	src/couch_replicator_api_wrap.erl \
-	src/couch_replicator_httpc_pool.erl \
-	src/couch_replicator_httpc.erl \
-	src/couch_replicator_httpd.erl \
-	src/couch_replicator_job_sup.erl \
-	src/couch_replicator_notifier.erl \
-	src/couch_replicator_manager.erl \
-	src/couch_replicator_utils.erl \
-	src/couch_replicator_worker.erl \
-	src/couch_replicator.app.src \
-	src/couch_replicator.erl
-
-test_files = \
-	test/01-load.t \
-	test/02-httpc-pool.t \
-	test/03-replication-compact.t \
-	test/04-replication-large-atts.t \
-	test/05-replication-many-leaves.t \
-	test/06-doc-missing-stubs.t \
-	test/07-use-checkpoints.t
-
-compiled_files = \
-	ebin/couch_replicator_api_wrap.beam \
-	ebin/couch_replicator_httpc_pool.beam \
-	ebin/couch_replicator_httpc.beam \
-	ebin/couch_replicator_httpd.beam \
-	ebin/couch_replicator_job_sup.beam \
-	ebin/couch_replicator_notifier.beam \
-	ebin/couch_replicator_manager.beam \
-	ebin/couch_replicator_utils.beam \
-	ebin/couch_replicator_worker.beam \
-	ebin/couch_replicator.app \
-	ebin/couch_replicator.beam
-
-EXTRA_DIST = $(include_files) $(source_files) $(test_files)
-CLEANFILES = $(compiled_files)
-
-check:
-if TESTS
-	$(abs_top_builddir)/test/etap/run $(abs_top_srcdir)/src/couch_replicator/test
-endif
-
-ebin/%.app: src/%.app.src
-	@mkdir -p ebin/
-	sed -e "s|%version%|@version@|g" \
-	< $< > $@
-
-ebin/%.beam: src/%.erl $(include_files)
-	@mkdir -p ebin/
-	$(ERLC) -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/couchdb \
-        -o ebin/ $(ERLC_FLAGS) ${TEST} $<;
-
-

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5037e160/apps/couchjs-node/Makefile.am
----------------------------------------------------------------------
diff --git a/apps/couchjs-node/Makefile.am b/apps/couchjs-node/Makefile.am
deleted file mode 100644
index 2144970..0000000
--- a/apps/couchjs-node/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-## 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.
-
-EXTRA_DIST = \
-  cli.js \
-  console.js \
-  couchdb.js \
-  couchjs.js \
-  inspector.js \
-  package.json \
-  README.md \
-  sandbox.js \
-  stream.js \
-  test/experiment.js \
-  xml.js


Mime
View raw message