New build system for ddoc_cache

Project: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/commit/456913ad
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/tree/456913ad
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/diff/456913ad

Branch: refs/heads/import
Commit: 456913ad878f76701a28bba737c02563f639c17f
Parents: b0da8b3
Author: Paul J. Davis <[email protected]>
Authored: Tue Mar 5 16:39:17 2013 -0600
Committer: Paul J. Davis <[email protected]>
Committed: Fri Jan 17 13:41:06 2014 -0800

----------------------------------------------------------------------
 Makefile.am            | 42 ++++++++++++++++++++++++++++++++++++++++++
 src/ddoc_cache.app.src |  9 ++++++++-
 2 files changed, 50 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/blob/456913ad/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..6936545
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,42 @@
+## 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.
+
+ddoc_cacheebindir = $(localerlanglibdir)/ddoc_cache/ebin
+
+ddoc_cacheebin_DATA = $(compiled_files)
+
+source_files = \
+       src/ddoc_cache.app.src \
+    src/ddoc_cache.erl \
+       src/ddoc_cache_app.erl \
+       src/ddoc_cache_opener.erl \
+       src/ddoc_cache_sup.erl \
+       src/ddoc_cache_util.erl
+
+compiled_files = \
+       ebin/ddoc_cache.app \
+    ebin/ddoc_cache.beam \
+       ebin/ddoc_cache_app.beam \
+       ebin/ddoc_cache_opener.beam \
+       ebin/ddoc_cache_sup.beam \
+       ebin/ddoc_cache_util.beam
+
+EXTRA_DIST = $(source_files)
+CLEANFILES = $(compiled_files)
+
+ebin/%.app: src/%.app.src
+       @mkdir -p ebin/
+       sed -e "s|%version%|@version@|g" < $< > $@
+
+ebin/%.beam: src/%.erl
+       @mkdir -p ebin/
+       $(ERLC) -Wall -I$(top_srcdir)/src -o ebin/ $(ERLC_FLAGS) $<

http://git-wip-us.apache.org/repos/asf/couchdb-ddoc-cache/blob/456913ad/src/ddoc_cache.app.src
----------------------------------------------------------------------
diff --git a/src/ddoc_cache.app.src b/src/ddoc_cache.app.src
index 334aed5..da15382 100644
--- a/src/ddoc_cache.app.src
+++ b/src/ddoc_cache.app.src
@@ -2,7 +2,14 @@
 
 {application, ddoc_cache, [
     {description, "Design Document Cache"},
-    {vsn, git},
+    {vsn, "%version%"},
+    {modules, [
+        ddoc_cache,
+        ddoc_cache_app,
+        ddoc_cache_opener,
+        ddoc_cache_sup,
+        ddoc_cache_util
+    ]},
     {registered, [
         ddoc_cache_lru,
         ddoc_cache_opener

Reply via email to