Added edoc comments.
This commit is contained in:
parent
7fcdbbe777
commit
468002ff8e
16
Makefile
16
Makefile
@ -3,25 +3,31 @@ ERL=erl
|
||||
ERLC=erlc -I include -v -o ebin
|
||||
SOURCES=src/*.erl
|
||||
EPATH=-pa ebin
|
||||
DOC_OPTS={dir, \"doc\"}, {source_path, [\"include\", \"src\"]}
|
||||
DOC_OPTS={dir, \"doc\"}, {includes, [\"include\"]}, {source_path, [\"include\", \"src\"]}
|
||||
|
||||
all:
|
||||
@mkdir -p ebin
|
||||
$(ERL) $(EPATH) -make
|
||||
|
||||
run:
|
||||
run: all
|
||||
$(ERL) -sname "$(PROJECT)" $(EPATH)
|
||||
|
||||
test: all
|
||||
$(ERL) -noshell $(EPATH) -s $(PROJECT)_test test -s init stop
|
||||
|
||||
edoc: all
|
||||
doc: all
|
||||
$(ERL) -noshell $(EPATH) \
|
||||
-eval "edoc:files([string:tokens(\"src/getopt.erl\", \" \")], [$(DOC_OPTS)])" \
|
||||
-eval "edoc:files(filelib:wildcard(\"$(SOURCES)\"), [$(DOC_OPTS)])" \
|
||||
-s init stop
|
||||
|
||||
|
||||
clean:
|
||||
rm -fv ebin/*.beam
|
||||
rm -fv erl_crash.dump ebin/erl_crash.dump
|
||||
|
||||
distclean:
|
||||
rm -fv ebin/*.beam
|
||||
rm -fv doc/*
|
||||
rm -fv erl_crash.dump ebin/erl_crash.dump
|
||||
|
||||
docclean:
|
||||
rm -fv doc/*
|
||||
|
@ -1,16 +1,14 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
%%% @author Juan Jose Comellas <jcomellas@novamens.com>
|
||||
%%% @copyright (C) 2009, Novamens SA (http://www.novamens.com)
|
||||
%%% @doc Records used by the getopt module.
|
||||
%%%-------------------------------------------------------------------
|
||||
|
||||
%% @doc Atom indicating the data type that an argument can be converted to.
|
||||
%% @type getopt_arg_type() = 'atom' | 'binary' | 'bool' | 'float' | 'integer' | 'string'.
|
||||
%% Atom indicating the data type that an argument can be converted to.
|
||||
-type getopt_arg_type() :: 'atom' | 'binary' | 'boolean' | 'float' | 'integer' | 'string'.
|
||||
%% @doc Data type that an argument can be converted to.
|
||||
%% @type getopt_arg() = atom() | binary() | bool() | float() | integer() | string().
|
||||
%% Data type that an argument can be converted to.
|
||||
-type getopt_arg() :: atom() | binary() | boolean() | float() | integer() | string().
|
||||
%% @@doc Argument specification.
|
||||
%% @type getopt_arg_spec() = getopt_arg_type() | {getopt_arg_type(), getopt_arg()} | help | undefined.
|
||||
%% Argument specification.
|
||||
-type getopt_arg_spec() :: getopt_arg_type() | {getopt_arg_type(), getopt_arg()} | help | undefined.
|
||||
|
||||
%% @doc Record that defines the option specifications.
|
||||
-record(option, {
|
||||
%% @doc Name of the option
|
||||
name :: atom(),
|
||||
|
@ -6,8 +6,8 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
-module(getopt).
|
||||
|
||||
%% @headerfile getopt.hrl
|
||||
-include("getopt.hrl").
|
||||
%% @headerfile "getopt.hrl"
|
||||
|
||||
-define(TAB_LENGTH, 8).
|
||||
-define(HELP_INDENTATION, 4 * ?TAB_LENGTH).
|
||||
|
Loading…
x
Reference in New Issue
Block a user