Skip to content

Commit

Permalink
Use rebar escriptize to make eplot script
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn-Egil Dahlberg committed Nov 22, 2012
1 parent 69508ca commit 78e3744
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 49 deletions.
58 changes: 12 additions & 46 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
#
#
4 changes: 4 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
%% vim: syntax=erlang

{escript_name, "bin/eplot"}.
{erl_opts, [debug_info, fail_on_warning]}.
15 changes: 12 additions & 3 deletions bin/eplot → src/eplot.erl
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down

0 comments on commit 78e3744

Please sign in to comment.