mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-01-23 02:49:07 +00:00
erlang: add Makefile and rebar.config for building with rebar3
This commit is contained in:
parent
980addf20b
commit
96be8c9d08
35
erlang/Makefile
Normal file
35
erlang/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
REBAR3=$(shell type -p rebar3 || echo ./rebar3)
|
||||
REBAR3_GIT=https://github.com/erlang/rebar3.git
|
||||
REBAR3_VSN=3.7.5
|
||||
|
||||
PROGRAMS=8to9
|
||||
|
||||
default: compile link
|
||||
|
||||
compile: $(REBAR3)
|
||||
$(REBAR3) compile
|
||||
|
||||
link: $(REBAR3)
|
||||
for PROG in $(PROGRAMS); do \
|
||||
rm -f _build/$$PROG; \
|
||||
ln -s default _build/$$PROG; \
|
||||
$(REBAR3) as $$PROG escriptize; \
|
||||
done
|
||||
|
||||
distclean realclean: clean
|
||||
rm -f ./rebar3
|
||||
|
||||
clean: $(REBAR3)
|
||||
$(REBAR3) clean
|
||||
rm -rf _build
|
||||
|
||||
./rebar3:
|
||||
mkdir -p _build; \
|
||||
cd _build; \
|
||||
git clone --quiet $(REBAR3_GIT); \
|
||||
cd rebar3; \
|
||||
git checkout --quiet $(REBAR3_VSN); \
|
||||
./bootstrap; \
|
||||
mv rebar3 ../../; \
|
||||
cd ../..; \
|
||||
rm -rf _build/rebar3
|
||||
19
erlang/rebar.config
Normal file
19
erlang/rebar.config
Normal file
@ -0,0 +1,19 @@
|
||||
%% -*- erlang -*-
|
||||
{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "."}]}}]}.
|
||||
|
||||
{erl_opts, [ debug_info
|
||||
, warn_unused_vars
|
||||
, warn_shadow_vars
|
||||
, warn_unused_import
|
||||
, warn_obsolete_guard
|
||||
, warnings_as_errors
|
||||
]}.
|
||||
|
||||
{deps, []}.
|
||||
|
||||
{escript_emu_args, "%%! +sbtu +A1 +Bd -noshell -smp auto\n"}.
|
||||
|
||||
{profiles,
|
||||
[
|
||||
{'8to9', [{escript_main_app, '8to9'}]}
|
||||
]}.
|
||||
Loading…
x
Reference in New Issue
Block a user