Starting BLFS

Simon Geard delgarde at ihug.co.nz
Fri Feb 5 02:04:14 PST 2010


On Fri, 2010-02-05 at 00:27 -0600, Mike McCarty wrote:
> Bruce Dubbs wrote:
> > 
> > That's about 45 *feet* wide.  I'll leave it out there in case anyone 
> > wants to try to do something useful with it, but it's not likely.
> 
> I'd think that it's not very useful for processing by _humans_,
> but after all, we are all programmers of a sort here. I wonder if
> one couldn't put that into a form which a program could process.
> One could then ask what it would take to build a given object,
> and then a tool could spit out a linearized build list, and another
> list of circular dependencies.

Oddly enough, I used to have a script to do just that - written in bash
shell of all things, though practically anything else would be better
suited.

But in practice, writing your own tool to do it is entirely unnecessary,
since that's exactly what 'make' does. Just write a Makefile expressing
dependencies, and let it do the job for you. For example:

#-----------------------
% :
	@echo $@

dbus-glib: dbus glib
dbus: expat
expat:
glib: pcre
pcre:
#-----------------------

Running "make dbus-glib" prints out:
expat
dbus
pcre
glib
dbus-glib


This is in fact a massively simplified version of my automated build :)

Simon.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20100205/0bbb5643/attachment.sig>


More information about the blfs-support mailing list