[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Make File Tutorials, Books, etc.?
- From: Francesco Abbate <francesco.bbt@...>
- Date: Thu, 10 Nov 2011 22:28:38 +0100
2011/11/10 Kevin T. Ryan <kevin.t.ryan@gmail.com>:
> Hi there -
>
> I know this isn't really related to Lua per se, but I've seen people
> comment on good v. bad makefiles (I thought it was somewhere in this
> thread - http://lua-users.org/lists/lua-l/2011-10/msg01068.html, but I
> can't find it now). At some point, I thought someone had mentioned
> that LuaJIT presented an excellent example of a good makefile, but I'm
> not sure why (or, better said, how one would make that observation).
> Thus, I'm wondering if there are any tutorials / books / etc. anyone
> would recommend that would help me in that regard? Most of the
> tutorials I've come across only cover the basics and I don't feel like
> they go into too much detail of what represents "good practices" vs
> "bad" ...
I was mentioning LuaJIT2 as being an excellent Makefile to study.
Please note also that the Lua original makefile is not bad, it is just
not using the real possibilities offered by GNU make and it does
slightly misuse the concept of target.
Probably the link to the Oreally book on GNU make is a good one but I
recommend to study the info documentation provided with GNU Make. It
is very clear and covers many important things that you need to know.
Anyway I've to say that I'm not a Makefile guru, I'm always learning
and I'm just able to write a decent Makefile system for a medium size
project :-) I've learnt a lot from errors and copied many ideas here
and there over many years. Probably is better to really learn the
*right* way of using make at the beginning. The problem is that you
can have many different Makefile styles and some of them are quite bad
and it is difficult to find a good reference. This is why I was
pointing to Mike's Makefile as a good example.
Francesco