Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor innostore backend module to use new backend API.
Fixes: az710 This change will bring the innostore backend into sync with the rest of the backends with regard to the API including support for asynchronous folds and the delete/4 function. Additionally, the test suite has been replaced with a suite of tests that are similar to those used by the other backends.
- Loading branch information
1 parent
7041710
commit 9311415
Showing
4 changed files
with
583 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,25 +1,54 @@ | |||
INNOSTORE_TAG = $(shell hg identify -t) | INNOSTORE_TAG = $(shell git describe --tags) | ||
|
|
||
all: # Innostore only works with the SMP runtime, force it on uniprocessors | .PHONY: rel deps package pkgclean | ||
ERL_FLAGS="-smp enable" ./rebar compile eunit verbose=1 | |||
|
|
||
clean: distclean | all: deps compile test | ||
|
|||
compile: | |||
./rebar compile | |||
|
|||
clean: | |||
./rebar clean | ./rebar clean | ||
|
|
||
test: | |||
./rebar eunit | |||
|
|||
install: | install: | ||
./rebar install | ./rebar install | ||
|
|
||
# Release tarball creation | |||
# Generates a tarball that includes all the deps sources so no checkouts are necessary | |||
archivegit = git archive --format=tar --prefix=$(1)/ HEAD | (cd $(2) && tar xf -) | |||
archivehg = hg archive $(2)/$(1) | |||
archive = if [ -d ".git" ]; then \ | |||
$(call archivegit,$(1),$(2)); \ | |||
else \ | |||
$(call archivehg,$(1),$(2)); \ | |||
fi | |||
|
|||
buildtar = mkdir distdir && \ | |||
git clone . distdir/$(REPO)-clone && \ | |||
cd distdir/$(REPO)-clone && \ | |||
git checkout $(INNOSTORE_TAG) && \ | |||
$(call archive,$(INNOSTORE_TAG),..) && \ | |||
mkdir ../$(INNOSTORE_TAG)/deps && \ | |||
make deps; \ | |||
for dep in deps/*; do cd $${dep} && $(call archive,$${dep},../../../$(INNOSTORE_TAG)); cd ../..; done | |||
|
|||
distdir: | distdir: | ||
$(if $(findstring tip,$(INNOSTORE_TAG)),$(error "You can't generate a release tarball from tip")) | $(if $(INNOSTORE_TAG), $(call buildtar), $(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'")) | ||
mkdir distdir | |||
hg clone -u $(INNOSTORE_TAG) . distdir/innostore-clone | |||
cd distdir/innostore-clone; \ | |||
hg archive ../$(INNOSTORE_TAG) | |||
|
|
||
dist $(INNOSTORE_TAG).tar.gz: distdir | dist $(INNOSTORE_TAG).tar.gz: distdir | ||
cd distdir; \ | cd distdir; \ | ||
tar czf ../$(INNOSTORE_TAG).tar.gz $(INNOSTORE_TAG) | tar czf ../$(INNOSTORE_TAG).tar.gz $(INNOSTORE_TAG) | ||
|
|
||
distclean: | ballclean: | ||
rm -rf $(INNOSTORE_TAG).tar.gz distdir | rm -rf $(INNOSTORE_TAG).tar.gz distdir | ||
|
|
||
package: dist | |||
$(MAKE) -C package package | |||
|
|||
pkgclean: | |||
$(MAKE) -C package pkgclean | |||
|
|||
export INNOSTORE_TAG PKG_VERSION REPO REVISION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.