<!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>