Fixes 'make distcheck' to run the test suite.

Quite a few changes to the build system to handle VPATH builds appropriately as well as make the test suite know about them.



git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@833951 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/Makefile.am b/Makefile.am
index 76262a6..510f36a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,7 @@
 ibrowseebindir = $(localerlanglibdir)/ibrowse-1.5.2/ebin
 
 ibrowse_file_collection = \
+	ibrowse.app.in \
     ibrowse.erl \
     ibrowse_app.erl \
     ibrowse_http_client.erl \
@@ -21,9 +22,8 @@
     ibrowse_sup.erl \
     ibrowse_test.erl
 
-ibrowseebin_static_file = ibrowse.app
-
 ibrowseebin_make_generated_file_list = \
+	ibrowse.app \
     ibrowse.beam \
     ibrowse_app.beam \
     ibrowse_http_client.beam \
@@ -33,16 +33,17 @@
     ibrowse_test.beam
 
 ibrowseebin_DATA = \
-    $(ibrowseebin_static_file) \
     $(ibrowseebin_make_generated_file_list)
 
 EXTRA_DIST =  \
     $(ibrowse_file_collection) \
-    $(ibrowseebin_static_file) \
     ibrowse.hrl
 
 CLEANFILES = \
     $(ibrowseebin_make_generated_file_list)
 
+%.app: %.app.in
+	cp $< $@
+
 %.beam: %.erl
 	$(ERLC) $(ERLC_FLAGS) $<
diff --git a/ibrowse.app b/ibrowse.app.in
similarity index 100%
rename from ibrowse.app
rename to ibrowse.app.in