mirror of
https://github.com/valitydev/abnfc.git
synced 2024-11-06 10:45:22 +00:00
Update rebar (2.1.0-pre-4-gbf35ec9)
This commit is contained in:
parent
f97c29dbe1
commit
8c9636a0d7
6
.travis.yml
Normal file
6
.travis.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
language: erlang
|
||||||
|
otp_release:
|
||||||
|
- R15B02
|
||||||
|
- R14B04
|
||||||
|
- R13B04
|
||||||
|
script: "./rebar compile && ./rebar xref && ./rebar skip_deps=true eunit"
|
58
include.mk
58
include.mk
@ -1,58 +0,0 @@
|
|||||||
## -*- makefile -*-
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
## Erlang
|
|
||||||
|
|
||||||
ERL := /usr/local/bin/erl
|
|
||||||
ERLC := /usr/local/bin/erlc
|
|
||||||
ABNFC := ../../bin/abnfc
|
|
||||||
|
|
||||||
ERLDIR := /usr/local/lib/erlang
|
|
||||||
ERL_C_INCLUDE_DIR := $(ERLDIR)/usr/include
|
|
||||||
|
|
||||||
ERLC_FLAGS := -W -I ../include
|
|
||||||
|
|
||||||
ifndef no_debug_info
|
|
||||||
ERLC_FLAGS += +debug_info
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef debug
|
|
||||||
ERLC_FLAGS += -Ddebug
|
|
||||||
endif
|
|
||||||
|
|
||||||
EBIN_DIR := ../ebin
|
|
||||||
DOC_DIR := ../doc
|
|
||||||
EMULATOR := beam
|
|
||||||
|
|
||||||
ERL_SOURCES := $(wildcard *.erl)
|
|
||||||
ERL_HEADERS := $(wildcard *.hrl) $(wildcard ../include/*.hrl)
|
|
||||||
ERL_OBJECTS := $(ERL_SOURCES:%.erl=$(EBIN_DIR)/%.$(EMULATOR))
|
|
||||||
ERL_DOCUMENTS := $(ERL_SOURCES:%.erl=$(DOC_DIR)/%.html)
|
|
||||||
MODULES = $(ERL_SOURCES:%.erl=%)
|
|
||||||
|
|
||||||
# Hmm, don't know if you are supposed to like this better... ;-)
|
|
||||||
APPSCRIPT = '$$vsn=shift; $$mods=""; while(@ARGV){ $$_=shift; s/^([A-Z].*)$$/\'\''$$1\'\''/; $$mods.=", " if $$mods; $$mods .= $$_; } while(<>) { s/%VSN%/$$vsn/; s/%MODULES%/$$mods/; print; }'
|
|
||||||
|
|
||||||
|
|
||||||
../ebin/%.app: %.app.src ../vsn.mk Makefile
|
|
||||||
perl -e $(APPSCRIPT) "$(VSN)" $(MODULES) < $< > $@
|
|
||||||
|
|
||||||
../ebin/%.appup: %.appup
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
|
|
||||||
$(EBIN_DIR)/%.$(EMULATOR): %.erl
|
|
||||||
$(ERLC) $(ERLC_FLAGS) -o $(EBIN_DIR) $<
|
|
||||||
|
|
||||||
$(EBIN_DIR)/%.$(EMULATOR): %.abnf
|
|
||||||
$(ABNFC) -o $(EBIN_DIR) $<
|
|
||||||
|
|
||||||
|
|
||||||
# generate documentation with edoc:
|
|
||||||
# this is still not the proper way to do it, but it works
|
|
||||||
# (see the wumpus application for an example)
|
|
||||||
|
|
||||||
$(DOC_DIR)/%.html: %.erl
|
|
||||||
${ERL} -noshell \
|
|
||||||
-run edoc file $< -run init stop
|
|
||||||
mv *.html $(DOC_DIR)
|
|
21
rebar.config
21
rebar.config
@ -1,22 +1,7 @@
|
|||||||
%%% -*- mode: erlang -*-
|
%%% -*- mode: erlang -*-
|
||||||
|
|
||||||
%% Erlang compiler options
|
{require_otp_vsn, "R13B04|R14|R15"}.
|
||||||
{erl_opts, [warnings_as_errors
|
|
||||||
]}.
|
|
||||||
|
|
||||||
%% Erlang edoc options for asciiedown_doclet
|
{erl_opts, [warnings_as_errors]}.
|
||||||
{edoc_opts, [{doclet, asciiedown_doclet}
|
|
||||||
, {app_default, "http://www.erlang.org/doc/man"}
|
|
||||||
, {new, true}
|
|
||||||
, {packages, false}
|
|
||||||
, {stylesheet, ""} % don't copy stylesheet.css
|
|
||||||
, {image, ""} % don't copy erlang.png
|
|
||||||
, {top_level_readme, {"./README.md", "https://github.com/ubf/abnfc"}}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
%% Erlang edoc options for asciiedoc_doclet
|
{xref_checks, [undefined_function_calls, deprecated_function_calls]}.
|
||||||
%% {edoc_opts, [{doclet, asciiedoc_doclet}
|
|
||||||
%% , {app_default, "http://www.erlang.org/doc/man"}
|
|
||||||
%% , {new, true}
|
|
||||||
%% , {packages, false}
|
|
||||||
%% ]}.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user