mkerl 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/mkerl.rb +0 -1
- data/mkerl.gemspec +67 -0
- data/templates/Emakefile +3 -1
- data/templates/Makefile +19 -47
- data/templates/start.sh +5 -2
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/mkerl.rb
CHANGED
data/mkerl.gemspec
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{mkerl}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Ari Lerner"]
|
12
|
+
s.date = %q{2010-04-29}
|
13
|
+
s.default_executable = %q{mkerl}
|
14
|
+
s.description = %q{This includes tests, reloader, an application, supervisor and a boot file. It's pretty slick}
|
15
|
+
s.email = %q{arilerner@mac.com}
|
16
|
+
s.executables = ["mkerl"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/mkerl",
|
29
|
+
"lib/mkerl.rb",
|
30
|
+
"mkerl.gemspec",
|
31
|
+
"templates/Emakefile",
|
32
|
+
"templates/Makefile",
|
33
|
+
"templates/README.markdown",
|
34
|
+
"templates/app",
|
35
|
+
"templates/basic_file.erl",
|
36
|
+
"templates/basic_test.erl",
|
37
|
+
"templates/gitignore",
|
38
|
+
"templates/make_boot.erl",
|
39
|
+
"templates/reloader.erl",
|
40
|
+
"templates/start.sh",
|
41
|
+
"templates/supervisor.erl",
|
42
|
+
"templates/test_suite.erl",
|
43
|
+
"templates/the_app.erl",
|
44
|
+
"test/helper.rb",
|
45
|
+
"test/test_mkerl.rb"
|
46
|
+
]
|
47
|
+
s.homepage = %q{http://github.com/auser/mkerl}
|
48
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
49
|
+
s.require_paths = ["lib"]
|
50
|
+
s.rubygems_version = %q{1.3.5}
|
51
|
+
s.summary = %q{A template to start erlang projects.}
|
52
|
+
s.test_files = [
|
53
|
+
"test/helper.rb",
|
54
|
+
"test/test_mkerl.rb"
|
55
|
+
]
|
56
|
+
|
57
|
+
if s.respond_to? :specification_version then
|
58
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
59
|
+
s.specification_version = 3
|
60
|
+
|
61
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
62
|
+
else
|
63
|
+
end
|
64
|
+
else
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
data/templates/Emakefile
CHANGED
data/templates/Makefile
CHANGED
@@ -1,76 +1,48 @@
|
|
1
1
|
PACKAGE_NAME = <%= name %>
|
2
|
-
PACKAGE_VERSION =
|
2
|
+
PACKAGE_VERSION = <%= version %>
|
3
3
|
VSN = $(PACKAGE_VERSION)
|
4
|
-
ERLC_FLAGS := -W
|
5
4
|
EBIN_DIR := ./ebin
|
6
|
-
EMULATOR := beam
|
7
5
|
ERL = `which erl`
|
8
6
|
ERLC = `which erlc`
|
9
|
-
DOC_DIR =
|
7
|
+
DOC_DIR = ./doc
|
8
|
+
ERLDIR = $(erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell)
|
10
9
|
SILENCE = @
|
11
10
|
|
12
|
-
ERL_SOURCE_DIRS = \
|
13
|
-
./src
|
14
|
-
|
15
|
-
TEST_DIRS = \
|
16
|
-
./test/src
|
17
|
-
|
18
11
|
#######
|
19
12
|
## DON'T EDIT BELOW HERE, UNLESS YOU REALLY KNOW WHAT YOU ARE DOING
|
20
13
|
#######
|
21
14
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
#Helper Functions
|
27
|
-
get_src_from_dir = $(wildcard $1/*.erl)
|
28
|
-
get_src_from_dir_list = $(foreach dir, $1, $(call get_src_from_dir,$(dir)))
|
29
|
-
src_to_beam = $(subst ./src, ./ebin, $(subst .erl,.beam,$1))
|
30
|
-
# src_to_beam = $(subst .erl,.beam,$1)
|
31
|
-
|
32
|
-
SRC = $(call get_src_from_dir_list, $(ERL_SOURCE_DIRS))
|
33
|
-
OBJ = $(call src_to_beam,$(SRC))
|
34
|
-
STUFF_TO_CLEAN += $(OBJ)
|
35
|
-
|
36
|
-
TEST_SRC = $(call get_src_from_dir_list, $(TEST_DIRS))
|
37
|
-
TEST_OBJ = $(call src_to_beam,$(TEST_SRC))
|
38
|
-
STUFF_TO_CLEAN += $(TEST_OBJ)
|
15
|
+
DEPS_DIRLIST=$(shell find ./deps -maxdepth 1 -mindepth 1 -type d | tr '\n' ' ')
|
16
|
+
DEPS_PA_LIST=$(shell for dir in $(DEPS_DIRLIST); do echo "-pa $$dir"; done)
|
17
|
+
ERLC_FLAGS := -W -pa ./ebin $(PA_EBIN_DIRS)
|
39
18
|
|
40
19
|
DOC_FILES = $(DOC_DIR)/*.html $(DOC_DIR)/*.png $(DOC_DIR)/*.css $(DOC_DIR)/edoc-info
|
41
|
-
|
42
|
-
ALL_OBJ = $(OBJ) $(TEST_OBJ)
|
43
|
-
ALL_SRC = $(SRC) $(TEST_SRC)
|
20
|
+
STUFF_TO_CLEAN += $(DOC_FILES)
|
44
21
|
|
45
|
-
all:
|
46
|
-
|
22
|
+
all: compile
|
23
|
+
|
47
24
|
docs:
|
48
25
|
$(SILENCE) $(ERL) -noshell -run edoc_run application "'$(PACKAGE_NAME)'" '"."' '[{def,{vsn,"$(VSN)"}}, {dir, "$(DOC_DIR)"}]'
|
49
26
|
|
50
|
-
|
51
|
-
$(SILENCE)
|
52
|
-
|
53
|
-
|
54
|
-
$(TEST_OBJ): $(TEST_SRC)
|
55
|
-
$(SILENCE)echo compiling $(notdir $@)
|
56
|
-
$(SILENCE)$(ERLC) $(ERLC_FLAGS) -I./include -o $(EBIN_DIR) $^
|
57
|
-
|
27
|
+
compile:
|
28
|
+
$(SILENCE)erl -pa ./ebin $(DEPS_PA_LIST) -make
|
29
|
+
|
58
30
|
debug:
|
59
31
|
$(MAKE) DEBUG=-DDEBUG
|
60
32
|
|
61
33
|
test: all $(TEST_OBJ)
|
62
|
-
$(SILENCE) $(ERL)
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
34
|
+
$(SILENCE) $(ERL) $(ERLC_FLAGS) \
|
35
|
+
-pa ./test/ebin/ \
|
36
|
+
-noshell \
|
37
|
+
-sname local_test \
|
38
|
+
-s test_suite test \
|
39
|
+
-s init stop
|
67
40
|
|
68
41
|
boot: all
|
69
|
-
$(SILENCE) $(ERL)
|
42
|
+
$(SILENCE) $(ERL) $(ERLC_FLAGS) -noshell -run make_boot write_scripts $(PACKAGE_NAME) $(VSN)
|
70
43
|
$(SILENCE) mv $(PACKAGE_NAME)-$(VSN).boot $(EBIN_DIR)
|
71
44
|
$(SILENCE) mv $(PACKAGE_NAME)-$(VSN).rel $(EBIN_DIR)
|
72
45
|
$(SILENCE) mv $(PACKAGE_NAME)-$(VSN).script $(EBIN_DIR)
|
73
46
|
|
74
47
|
clean:
|
75
48
|
@(rm -rf $(EBIN_DIR)/*.beam erl_crash.dump $(DOC_FILES))
|
76
|
-
|
data/templates/start.sh
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
|
3
|
-
VERSION
|
3
|
+
VERSION=<%= version %>
|
4
4
|
PWD=$(dirname $0)
|
5
|
+
DEPS_DIRS=$(find $PWD/deps -maxdepth 1 -mindepth 1 -type d | tr '\n' ' ')
|
6
|
+
PA_DIRS=$(for dir in $DEPS_DIRS; do echo "-pa $dir"; done)
|
5
7
|
CONFIG=$1
|
6
8
|
|
7
9
|
erl -pa $PWD/ebin \
|
10
|
+
$PA_DIRS \
|
8
11
|
-s reloader \
|
9
12
|
-<%= name %> \
|
10
|
-
-boot <%=name
|
13
|
+
-boot <%=name %>-$VERSION
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mkerl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Lerner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-04-
|
12
|
+
date: 2010-04-29 00:00:00 -07:00
|
13
13
|
default_executable: mkerl
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -31,6 +31,7 @@ files:
|
|
31
31
|
- VERSION
|
32
32
|
- bin/mkerl
|
33
33
|
- lib/mkerl.rb
|
34
|
+
- mkerl.gemspec
|
34
35
|
- templates/Emakefile
|
35
36
|
- templates/Makefile
|
36
37
|
- templates/README.markdown
|