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