Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

generate epgsql.app at compile time

  • Loading branch information...
commit 0cbf00e9cb5ff5a9533d95edda9387445c39d819 1 parent 122028f
@wg authored
View
1  .gitignore
@@ -1,3 +1,4 @@
*.beam
*.boot
*.script
+ebin/*.app
View
9 Makefile
@@ -15,7 +15,7 @@ RELEASE := $(NAME)-$(VERSION).tar.gz
APPDIR := $(NAME)-$(VERSION)
BEAMS := $(SRC:src/%.erl=ebin/%.beam)
-compile: $(BEAMS)
+compile: $(BEAMS) ebin/$(NAME).app
app: compile
@mkdir -p $(APPDIR)/ebin
@@ -26,11 +26,11 @@ release: app
@tar czvf $(RELEASE) $(APPDIR)
clean:
- @rm -f ebin/*.beam
+ @rm -f ebin/*.{beam,app}
@rm -rf $(NAME)-$(VERSION) $(NAME)-*.tar.gz
test: $(TESTS:test_src/%.erl=test_ebin/%.beam) $(BEAMS)
- @dialyzer --src -c src
+ @dialyzer -n --src -c src
$(ERL) -pa ebin/ -pa test_ebin/ -noshell -s pgsql_tests run_tests -s init stop
# ------------------------------------------------------------------------
@@ -41,5 +41,8 @@ test: $(TESTS:test_src/%.erl=test_ebin/%.beam) $(BEAMS)
ebin/%.beam : src/%.erl
$(ERLC) $(ERLC_FLAGS) -o $(dir $@) $<
+ebin/%.app : src/%.app.src
+ sed -e s/VERSION/$(VERSION)/g $< > $@
+
test_ebin/%.beam : test_src/%.erl
$(ERLC) $(ERLC_FLAGS) -o $(dir $@) $<
View
0  ebin/.empty
No changes.
View
1  ebin/epgsql.app
View
2  src/epgsql.app → src/epgsql.app.src
@@ -1,6 +1,6 @@
{application, epgsql,
[{description, "PostgreSQL Client"},
- {vsn, "1.2"},
+ {vsn, "VERSION"},
{modules, [pgsql, pgsql_binary, pgsql_connection, pgsql_fdatetime,
pgsql_idatetime, pgsql_sock, pgsql_types]},
{registered, []},
Please sign in to comment.
Something went wrong with that request. Please try again.