## 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.

JS_FILE = server/main.js

JS_FILE_COMPONENTS = \
    server/render.js \
    server/state.js \
    server/util.js \
    server/validate.js \
    server/views.js

JS_FILE_COMPONENTS_LAST = server/loop.js

$(JS_FILE): $(JS_FILE_COMPONENTS) $(JS_FILE_COMPONENTS_LAST)
	echo "// DO NOT EDIT THIS FILE BY HAND" > $@
	echo >> $@
	cat $^ >> $@

CLEANFILES = $(JS_FILE)

EXTRA_DIST = $(JS_FILE_COMPONENTS) $(JS_FILE_COMPONENTS_LAST)

nobase_dist_localdata_DATA = \
    $(JS_FILE) \
    server/main.js \
    www/dialog/_compact_database.html \
    www/dialog/_create_document.html \
    www/dialog/_create_database.html \
    www/dialog/_delete_database.html \
    www/dialog/_delete_document.html \
    www/dialog/_save_view_as.html \
    www/dialog/_upload_attachment.html \
    www/couch_tests.html \
    www/favicon.ico \
    www/image/add.png \
    www/image/apply.gif \
    www/image/bg.png \
    www/image/cancel.gif \
    www/image/compact.png \
    www/image/delete-mini.png \
    www/image/delete.png \
    www/image/grippie.gif \
    www/image/hgrad.gif \
    www/image/load.png \
    www/image/logo.png \
    www/image/order-asc.gif \
    www/image/order-desc.gif \
    www/image/path.gif \
    www/image/progress.gif \
    www/image/rarrow.png \
    www/image/run-mini.png \
    www/image/run.png \
    www/image/running.png \
    www/image/save.png \
    www/image/spinner.gif \
    www/image/test_failure.gif \
    www/image/test_success.gif \
    www/image/thead.gif \
    www/image/thead-key.gif \
    www/image/toggle-collapse.gif \
    www/image/toggle-expand.gif \
    www/image/twisty.gif \
    www/_sidebar.html \
    www/index.html \
    www/config.html \
    www/database.html \
    www/document.html \
    www/replicator.html \
    www/status.html \
    www/script/couch.js \
    www/script/couch_tests.js \
    www/script/couch_test_runner.js \
    www/script/futon.js \
    www/script/futon.browse.js \
    www/script/futon.format.js \
    www/script/jquery.js \
    www/script/jquery.cookies.js \
    www/script/jquery.couch.js \
    www/script/jquery.dialog.js \
    www/script/jquery.editinline.js \
    www/script/jquery.form.js \
    www/script/jquery.resizer.js \
    www/script/jquery.suggest.js \
    www/script/json2.js \
    www/script/test/basics.js \
    www/script/test/delayed_commits.js \
    www/script/test/all_docs.js \
    www/script/test/conflicts.js \
    www/script/test/recreate_doc.js \
    www/script/test/copy_doc.js \
    www/script/test/uuids.js \
    www/script/test/bulk_docs.js \
    www/script/test/lots_of_docs.js \
    www/script/test/reduce.js \
    www/script/test/reduce_false.js \
    www/script/test/design_options.js \
    www/script/test/multiple_rows.js \
    www/script/test/large_docs.js \
    www/script/test/utf8.js \
    www/script/test/jsonp.js \
    www/script/test/attachments.js \
    www/script/test/attachment_paths.js \
    www/script/test/attachment_views.js \
    www/script/test/design_paths.js \
    www/script/test/content_negotiation.js \
    www/script/test/design_docs.js \
    www/script/test/invalid_docids.js \
    www/script/test/view_collation.js \
    www/script/test/view_conflicts.js \
    www/script/test/view_errors.js \
    www/script/test/view_include_docs.js \
    www/script/test/view_multi_key_all_docs.js \
    www/script/test/view_multi_key_design.js \
    www/script/test/view_multi_key_temp.js \
    www/script/test/view_offsets.js \
    www/script/test/view_pagination.js \
    www/script/test/view_sandboxing.js \
    www/script/test/view_xml.js \
    www/script/test/replication.js \
    www/script/test/rev_stemming.js \
    www/script/test/etags_head.js \
    www/script/test/etags_views.js \
    www/script/test/show_documents.js \
    www/script/test/list_views.js \
    www/script/test/compact.js \
    www/script/test/purge.js \
    www/script/test/config.js \
    www/script/test/security_validation.js \
    www/script/test/stats.js \
    www/script/test/changes.js \
    www/style/layout.css