Browse Source

add Make case when epgsql_errcodes.erl is missing

Richard Jones 10 years ago
parent
commit
9ff8876af4
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Makefile

+ 4 - 1
Makefile

@@ -3,12 +3,15 @@ LASTVERSION = $(shell git rev-parse HEAD )
 
 all: compile
 
-compile:
+compile: src/epgsql_errcodes.erl
 	@$(REBAR) compile
 
 clean:
 	@$(REBAR) clean
 
+src/epgsql_errcodes.erl:
+	(cd scripts/ && ./generate.sh) > src/epgsql_errcodes.erl
+
 # The INSERT is used to make sure the schema_version matches the tests
 # being run.
 create_testdbs: