Skip to content

Commit

Permalink
Fix Makefile and add Emakefile and lfe.app.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvirding committed May 26, 2010
1 parent c7e05da commit dc3cc4e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Emakefile
@@ -0,0 +1,3 @@
%% -*- erlang -*-

{'src/lfe_*',[{outdir,ebin}]}.
52 changes: 38 additions & 14 deletions Makefile
@@ -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
20 changes: 20 additions & 0 deletions ebin/lfe.app
@@ -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 modified ebin/lfe_io.beam
Binary file not shown.
Binary file modified ebin/lfe_parse.beam
Binary file not shown.

0 comments on commit dc3cc4e

Please sign in to comment.