1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE> [99s-extend] Trying to grok erlang.mk
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Trying%20to%20grok%20erlang.mk&In-Reply-To=%3C5319BD87.2020109%40llaisdy.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<style type="text/css">
pre {
white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */
}
</style>
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000346.html">
<LINK REL="Next" HREF="000348.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[99s-extend] Trying to grok erlang.mk</H1>
<B>Ivan Uemlianin</B>
<A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Trying%20to%20grok%20erlang.mk&In-Reply-To=%3C5319BD87.2020109%40llaisdy.com%3E"
TITLE="[99s-extend] Trying to grok erlang.mk">ivan at llaisdy.com
</A><BR>
<I>Fri Mar 7 13:37:27 CET 2014</I>
<P><UL>
<LI>Previous message: <A HREF="000346.html">[99s-extend] Trying to grok erlang.mk
</A></li>
<LI>Next message: <A HREF="000348.html">[99s-extend] Trying to grok erlang.mk
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#347">[ date ]</a>
<a href="thread.html#347">[ thread ]</a>
<a href="subject.html#347">[ subject ]</a>
<a href="author.html#347">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Dear Lloyd
I've just tried this with file layout and contents copied from your
email, and make works fine here I'm afraid.
One odd thing I noticed in your make output ...
> /min$ make
> ERLC min.erl
> APP min .app.src
> cat: src/min: No such file or directory
> cat: .app.src: No such file or directory
> sed: can't read .app: No such file or directory
> make: *** [app] Error 2
... is that in the APP line, the filename min.app.src has a space in it,
and it looks (in the cat lines) like it's broken down into src/min and
.app.src (ie ./.app.src). I can't imagine why that's happening, but
that's what's causing the problem I should think.
> 2) How can I structure directories and make files for a project
> that involves several applications?
I don't know if it's the "correct" way with erlang.mk but, as a refugee
from rebar, I have apps set out rebar-style and use old-school recursive
make. e.g.:
max/
erlang.mk
Makefile
apps/
app1/
Makefile
src/
app2/
Makefile
src/
Top level Makefile doesn't need to include erlang.mk, and has lines like:
all:
$(MAKE) -C apps/app1
$(MAKE) -C apps/app2
Lower level Makefiles include erlang.mk.
Best wishes
Ivan
On 06/03/2014 20:29, <A HREF="https://lists.ninenines.eu/listinfo/extend">lloyd at writersglen.com</A> wrote:
><i> Hello,
</I>><i>
</I>><i> To secure my understanding of erlang.mk, I've been trying to create the simplest possible example I can imagine. Which gives me this:
</I>><i>
</I>><i> min
</I>><i> erlang.mk
</I>><i> Makefile
</I>><i> src
</I>><i> min.app.src
</I>><i> min.erl
</I>><i>
</I>><i> *** Where Makefile is:
</I>><i>
</I>><i> PROJECT = min
</I>><i>
</I>><i> include erlang.mk
</I>><i>
</I>><i> *** min.app.src is:
</I>><i>
</I>><i> {application, min,
</I>><i> [{description,[]},
</I>><i> {vsn,"0.1.0"},
</I>><i> {registered,[]},
</I>><i> {applications,[kernel,stdlib]},
</I>><i> {env,[]},
</I>><i> {modules,[]}]}.
</I>><i>
</I>><i> *** and min.erl is:
</I>><i>
</I>><i> -module(min).
</I>><i>
</I>><i> -export([hello/0]).
</I>><i>
</I>><i> hello() ->
</I>><i> io:format("Hello min!~n~n").
</I>><i>
</I>><i> *** But when I call make, I get this:
</I>><i>
</I>><i> /min$ make
</I>><i> ERLC min.erl
</I>><i> APP min .app.src
</I>><i> cat: src/min: No such file or directory
</I>><i> cat: .app.src: No such file or directory
</I>><i> sed: can't read .app: No such file or directory
</I>><i> make: *** [app] Error 2
</I>><i>
</I>><i> *** Observations
</I>><i>
</I>><i> min.erl compiles just fine
</I>><i> min.app.src breaks the compile
</I>><i>
</I>><i> *** Questions:
</I>><i>
</I>><i> 1) How can I correct this?
</I>><i> 2) How can I structure directories and make files for a project that involves several applications?
</I>><i>
</I>><i> Many thanks,
</I>><i>
</I>><i> LRP
</I>><i>
</I>><i>
</I>><i> *********************************************
</I>><i> My books:
</I>><i>
</I>><i> THE GOSPEL OF ASHES
</I>><i> <A HREF="http://thegospelofashes.com">http://thegospelofashes.com</A>
</I>><i>
</I>><i> Strength is not enough. Do they have the courage
</I>><i> and the cunning? Can they survive long enough to
</I>><i> save the lives of millions?
</I>><i>
</I>><i> FREEIN' PANCHO
</I>><i> <A HREF="http://freeinpancho.com">http://freeinpancho.com</A>
</I>><i>
</I>><i> A community of misfits help a troubled boy find his way
</I>><i>
</I>><i> AYA TAKEO
</I>><i> <A HREF="http://ayatakeo.com">http://ayatakeo.com</A>
</I>><i>
</I>><i> Star-crossed love, war and power in an alternative
</I>><i> universe
</I>><i>
</I>><i> Available through Amazon or by request from your
</I>><i> favorite bookstore
</I>><i>
</I>><i>
</I>><i> **********************************************
</I>><i>
</I>><i> _______________________________________________
</I>><i> Extend mailing list
</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
</I>><i>
</I>
--
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development
<A HREF="https://lists.ninenines.eu/listinfo/extend">ivan at llaisdy.com</A>
www.llaisdy.com
llaisdy.wordpress.com
github.com/llaisdy
www.linkedin.com/in/ivanuemlianin
festina lente
============================================================
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000346.html">[99s-extend] Trying to grok erlang.mk
</A></li>
<LI>Next message: <A HREF="000348.html">[99s-extend] Trying to grok erlang.mk
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#347">[ date ]</a>
<a href="thread.html#347">[ thread ]</a>
<a href="subject.html#347">[ subject ]</a>
<a href="author.html#347">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>
|