osmith has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37096?usp=email )
Change subject: Makefile,contrib/jenkins: import from osmo-epdg ......................................................................
Makefile,contrib/jenkins: import from osmo-epdg
Add Makefile and contrib/jenkins.sh from osmo-epdg. Add "rebar3 asn compile" to the "build" target, as mentioned in README.md.
Change-Id: Id8d6652c9007f4d565e2e0ca318e3a7b2113ea67 Tweaked-By: Vadim Yanitskiy vyanitskiy@sysmocom.de --- A Makefile A contrib/jenkins.sh 2 files changed, 49 insertions(+), 0 deletions(-)
Approvals: osmith: Looks good to me, approved; Verified
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6d3ded2 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +all: build + +GEN_FILES = include/S1AP-*.hrl src/S1AP-*.erl + +src/S1AP-%.erl include/S1AP-%.hrl: asn1/S1AP-%.asn + rebar3 asn compile + +build: $(GEN_FILES) + rebar3 compile + rebar3 escriptize + +run: build + ERL_FLAGS='-config config/sys.config' _build/default/bin/osmo-s1gw + +shell: build + rebar3 shell --config ./config/sys.config + +check: $(GEN_FILES) + rebar3 eunit + +clean: +# Avoid running rebar3 clean if _build doesn't exist, since it would try +# to fetch deps from the Internet and that may not be avaialble when in +# OBS build. +ifneq ("$(wildcard _build/.*)", "") + rebar3 asn clean + rebar3 clean + rm -rf _build/ +else + rm -f $(GEN_FILES) +endif diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh new file mode 100755 index 0000000..df99a89 --- /dev/null +++ b/contrib/jenkins.sh @@ -0,0 +1,5 @@ +#!/bin/sh -ex + +make clean +make +make check