Permalink
Browse files

Use rebar escriptize to make eplot script

  • Loading branch information...
1 parent 69508ca commit 78e3744e0f8e74f2f658964b6a1adf49758ce714 @psyeugenic committed Nov 22, 2012
Showing with 28 additions and 49 deletions.
  1. +12 −46 Makefile
  2. +4 −0 rebar.config
  3. +12 −3 bin/eplot → src/eplot.erl
View
@@ -1,12 +1,16 @@
-ERL ?= erl
-APP := eplot
+ERL ?= erl
+APP := eplot
+LINK := ln -s -f
-.PHONY: deps
+.PHONY: deps test
-all: deps
+all: build
+ @./rebar escriptize
+
+build: deps
@./rebar compile
-deps:
+deps: Makefile
@./rebar get-deps
clean:
@@ -18,24 +22,9 @@ distclean: clean
docs:
@erl -noshell -run edoc_run application '$(APP)' '"."' '[]'
-#ERLC = erlc
-#ESRC = src
-#EBIN = ebin
-#BIN = bin
-#LINK = ln -s -f
-#EFLAGS = +debug_info
-#
-#MODULES = \
-# egd_colorscheme \
-# egd_chart \
-# eplot_main \
-# eview
-#
-#DATAFILES = \
-# example/data1.dat \
-# example/data2.dat \
-# example/test1.png
-#
+test:
+ @bin/eplot_test rendertest
+
#INSTALL = /usr/bin/install -c
#INSTALL_DIR = /usr/bin/install -c -d
#INSTALL_DATA = /usr/bin/install -m 644
@@ -47,22 +36,12 @@ docs:
# RELEASE_DIR = $(DESTDIR)/$(prefix)
#endif
#
-#all: build
-#
-#vsn.mk:
-# @/bin/sh ./VERSION-GEN
-#-include vsn.mk
#
#RELEASE_LIB_DIR = $(RELEASE_DIR)/lib/erlang/lib/eplot-$(VSN)
#
#TARGETS = $(MODULES:%=$(EBIN)/%.beam) vsn.mk
#
#
-#build: Makefile $(TARGETS)
-#
-#$(EBIN)/%.beam : $(ESRC)/%.erl
-# $(ERLC) $(EFLAGS) -o $(EBIN) $<
-#
#install : build $(EXAMPLE)
# $(INSTALL_DIR) $(RELEASE_LIB_DIR)/ebin
# $(INSTALL) $(TARGETS) $(RELEASE_LIB_DIR)/ebin
@@ -72,16 +51,3 @@ docs:
# $(INSTALL) bin/eplot $(RELEASE_LIB_DIR)/bin
# $(INSTALL_DIR) $(RELEASE_DIR)/bin
# $(LINK) $(RELEASE_LIB_DIR)/bin/eplot $(RELEASE_DIR)/bin/eplot
-#
-#test: build
-# bin/eplot_test rendertest
-#
-#examples: build
-# bin/eplot_test examples
-#
-#info:
-# @echo "$(TARGETS)"
-#clean:
-# rm -f $(TARGETS)
-#
-#
View
@@ -0,0 +1,4 @@
+%% vim: syntax=erlang
+
+{escript_name, "bin/eplot"}.
+{erl_opts, [debug_info, fail_on_warning]}.
View
15 bin/eplot → src/eplot.erl 100755 → 100644
@@ -1,6 +1,15 @@
-#!/usr/bin/env escript
-%%! -smp enable
-%% vim: filetype=erlang
+%%
+%% Copyright (C) 2012 Hapida AB
+%%
+%% File: eplot.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2012-11-22
+%%
+
+-module(eplot).
+
+-export([main/1]).
+-mode(compile).
usage() ->
Text =

0 comments on commit 78e3744

Please sign in to comment.