Alan D. Salewski on 25 Aug 2008 06:40:09 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Make files


On Sat, Aug 23, 2008 at 03:20:56PM +0100, Stephen Gran spake thus:
> On Sat, Aug 23, 2008 at 09:34:02AM -0400, Mag Gam said:
> > Can anyone recommend a good resource or book for Makefiles? I want to
> > learn how they are built and used.
> 
> http://www.gnu.org/software/make/manual/html_node/index.html
> 
> Of course, there are other implementations of make than GNU Make, but
> it's the most common in linux-based projects.  IIRC the manual is pretty
> good at letting you know which parts are GNU extensions.

I agree that the GNU make manual is quite good, as is the O'Reilly book.
I would add to the above that not only is GNU make very widely used, but
is also a hightly portable implementation; anywhere that another make
implementation runs, it probably quite easy to compile and install GNU
make, as well.

IMHO, if maintaining Makefiles for any non-trivial project by hand, it
is easier to simply require GNU make as a build tool than to try to keep
the Makefiles themselves portable.

OTOH, for any non-trivial project, I tend to use the GNU autotools[0] to
generate the Makefiles. The autotools do a good job of generating
Makefiles that are portable between different make implementations.

-Al

[0] http://www.gnu.org/software/automake/
    http://www.gnu.org/software/autoconf/
    http://www.gnu.org/software/libtool/

-- 
a l a n   d.   s a l e w s k i             salewski@worldnet.att.net
--------------------------------------------------------------------
                         delicious cuisine
                  cornbread surrounds juicy meat
                        hot dog on a stick
--------------------------------------------------------------------
Generated from Haiku-O-Matic:           www.smalltime.com/haiku.html
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug