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
@@ -1,12 +1,16 @@
ERL ?= erl ERL ?= erl
APP := eplot APP := eplot
LINK := ln -s -f


.PHONY: deps .PHONY: deps test


all: deps all: build
@./rebar escriptize

build: deps
@./rebar compile @./rebar compile


deps: deps: Makefile
@./rebar get-deps @./rebar get-deps


clean: clean:
Expand All @@ -18,24 +22,9 @@ distclean: clean
docs: docs:
@erl -noshell -run edoc_run application '$(APP)' '"."' '[]' @erl -noshell -run edoc_run application '$(APP)' '"."' '[]'


#ERLC = erlc test:
#ESRC = src @bin/eplot_test rendertest
#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
#
#INSTALL = /usr/bin/install -c #INSTALL = /usr/bin/install -c
#INSTALL_DIR = /usr/bin/install -c -d #INSTALL_DIR = /usr/bin/install -c -d
#INSTALL_DATA = /usr/bin/install -m 644 #INSTALL_DATA = /usr/bin/install -m 644
Expand All @@ -47,22 +36,12 @@ docs:
# RELEASE_DIR = $(DESTDIR)/$(prefix) # RELEASE_DIR = $(DESTDIR)/$(prefix)
#endif #endif
# #
#all: build
#
#vsn.mk:
# @/bin/sh ./VERSION-GEN
#-include vsn.mk
# #
#RELEASE_LIB_DIR = $(RELEASE_DIR)/lib/erlang/lib/eplot-$(VSN) #RELEASE_LIB_DIR = $(RELEASE_DIR)/lib/erlang/lib/eplot-$(VSN)
# #
#TARGETS = $(MODULES:%=$(EBIN)/%.beam) vsn.mk #TARGETS = $(MODULES:%=$(EBIN)/%.beam) vsn.mk
# #
# #
#build: Makefile $(TARGETS)
#
#$(EBIN)/%.beam : $(ESRC)/%.erl
# $(ERLC) $(EFLAGS) -o $(EBIN) $<
#
#install : build $(EXAMPLE) #install : build $(EXAMPLE)
# $(INSTALL_DIR) $(RELEASE_LIB_DIR)/ebin # $(INSTALL_DIR) $(RELEASE_LIB_DIR)/ebin
# $(INSTALL) $(TARGETS) $(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) bin/eplot $(RELEASE_LIB_DIR)/bin
# $(INSTALL_DIR) $(RELEASE_DIR)/bin # $(INSTALL_DIR) $(RELEASE_DIR)/bin
# $(LINK) $(RELEASE_LIB_DIR)/bin/eplot $(RELEASE_DIR)/bin/eplot # $(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
@@ -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
@@ -1,6 +1,15 @@
#!/usr/bin/env escript %%
%%! -smp enable %% Copyright (C) 2012 Hapida AB
%% vim: filetype=erlang %%
%% File: eplot.erl
%% Author: Björn-Egil Dahlberg
%% Created: 2012-11-22
%%

-module(eplot).

-export([main/1]).
-mode(compile).


usage() -> usage() ->
Text = Text =
Expand Down

0 comments on commit 78e3744

Please sign in to comment.