Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Makefile and add Emakefile and lfe.app.
- Loading branch information
Showing
5 changed files
with
61 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
%% -*- erlang -*- | ||
|
||
{'src/lfe_*',[{outdir,ebin}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,48 @@ | ||
EBIN_DIR=ebin | ||
SOURCE_DIR=src | ||
INCLUDE_DIR=include | ||
DOC_DIR=doc | ||
# Makefile for LFE | ||
# This simple Makefile uses rebar to compile/install/clean if it | ||
# exists, else does it explicitly. | ||
|
||
ERLC_FLAGS=-W0 -Ddebug +debug_info | ||
ERLC=erlc -I $(INCLUDE_DIR) -o $(EBIN_DIR) $(ERLC_FLAGS) $(SOURCE_DIR) | ||
ERL=erl -I -pa ebin -noshell -eval | ||
EBINDIR = ebin | ||
SRCDIR = src | ||
INCDIR = include | ||
DOCDIR = doc | ||
EMACSDIR = emacs | ||
|
||
VPATH = $(SRCDIR) | ||
|
||
ERLCFLAGS = -W0 +debug_info | ||
ERLC = erlc -I $(INCDIR) -o $(EBINDIR) $(ERLCFLAGS) | ||
|
||
## The .erl and .beam files | ||
SRCS = $(notdir $(wildcard $(SRCDIR)/*.erl)) | ||
EBINS = $(SRCS:.erl=.beam) | ||
|
||
## Where we install LFE, in the ERL_LIBS directory. | ||
INSTALLDIR = "$$ERL_LIBS"/lfe | ||
|
||
all: compile docs | ||
|
||
compile: | ||
mkdir -p $(EBIN_DIR) | ||
$(ERLC)/*.erl | ||
if which -s rebar; \ | ||
then rebar compile; \ | ||
else echo $(ERLC) $(addprefix $(SRCDIR)/, $(SRCS)); \ | ||
fi | ||
|
||
install: | ||
if which -s rebar; \ | ||
then rebar install; \ | ||
elif [ "$$ERL_LIBS" != "" ]; \ | ||
then mkdir -p $(INSTALLDIR)/$(EBINDIR) ; \ | ||
cp -a $(EBINDIR) $(INSTALLDIR); \ | ||
cp -a $(EMACSDIR) $(INSTALLDIR); \ | ||
else exit 1; \ | ||
fi | ||
|
||
docs: | ||
#$(ERL) -noshell -run edoc file $(SOURCE_DIR)/leex.erl -run init stop | ||
#$(ERL) -noshell -run edoc_run application "'Leex'" '"."' '[no_packages]' | ||
#mv $(SOURCE_DIR)/*.html $(DOC_DIR)/ | ||
|
||
clean: | ||
if which -s rebar; \ | ||
then rebar clean; \ | ||
else rm -rf $(EBINDIR)/*.beam; \ | ||
fi | ||
rm -rf erl_crash.dump | ||
rm -rf $(EBIN_DIR)/*.beam | ||
rm -rf $(DOC_DIR)/*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%% -*- erlang -*- | ||
|
||
{application, lfe, | ||
[{description, "Lisp Flavored Erlang"}, | ||
{vsn, "0.6"}, | ||
{modules, [lfe_boot, | ||
lfe_codegen, | ||
lfe_comp, | ||
lfe_eval, | ||
lfe_gen, | ||
lfe_io, | ||
lfe_io_format, | ||
lfe_io_pretty, | ||
lfe_lib, | ||
lfe_lint, | ||
lfe_macro, | ||
lfe_parse, | ||
lfe_pmod, | ||
lfe_scan, | ||
lfe_shell]}]}. |
Binary file not shown.
Binary file not shown.