Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix Makefile and add Emakefile and lfe.app.

  • Loading branch information...
commit dc3cc4e073669a9e6a6b83e3be3f92892cd25885 1 parent c7e05da
@rvirding authored
View
3  Emakefile
@@ -0,0 +1,3 @@
+%% -*- erlang -*-
+
+{'src/lfe_*',[{outdir,ebin}]}.
View
52 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
View
20 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]}]}.
View
BIN  ebin/lfe_io.beam
Binary file not shown
View
BIN  ebin/lfe_parse.beam
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.