Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Image

Book Review: Software Build Systems 29

MassDosage writes "Software Build Systems by Peter Smith is a well written, albeit rather lengthy book that covers the intricacies of systems used to build software. It tries to do this in a technology-neutral manner where possible but covers existing tools like Ant, Make and Scons as a means of illustrating the various concepts covered instead of just focusing on theory. The real world examples illustrate building Java, C/C++, C# and Python software and cover scaling up from small builds with tens of source files up to massive builds with tens of thousands. All of the technologies used are introduced in some depth which newcomers should find useful but experienced build developers may want to skim over." Read below for the rest of MassDosage's review.
Software Build Systems: Principles and Experience
author Peter Smith
pages 583
publisher Addison Wesley
rating 7/10
reviewer MassDosage
ISBN 978-0-321-71728-3
summary Principles and Experience
Software Build Systems weighs in at a hefty 580 odd pages and covers a lot of ground. It is targeted at developers, managers and build engineers and while there is definitely something for all of these groups, each of them will most likely find themselves skipping sections which are either not of interest to them or are too basic. It is also important to note that this book is not a hands-on tutorial of how to set up a build system from scratch but instead uses a variety of detailed examples to illustrate its concepts with pointers to external documentation for those wanting to actually implement a complete build system of their own.

The book is clearly divided into parts which move from "The Basics" to "The Build Tools" and then on to "Advanced Topics" and finally "Scaling Up". "The Basics" really is basic and most build engineers and developers worth their salt can probably skim read most of this. The fundamentals of C/C++, Java and C# are also covered illustrating a major theme in this book in that it tries to be programming language neutral and just use the different languages as examples to explain various concepts. While this is an inclusive, worthwhile aim it does mean that someone only interested in say, building Java software, will find large parts of the book irrelevant. This applies particularly to the chapters on the various build tools where Make, Ant, SCons, CMake and Eclipse are all covered in painstaking detail. The pros and cons of each of these tools are discussed in a non-biased manner using real world examples where possible. Anyone who has actually written a build system using one of these tools probably won't find much they don't already know but for a manager or someone new to any of these technologies the author provides a a good introduction with mentions of similar tools and pointers for finding out more about each of them.

"Advanced Topics" is where things start to get interesting as concepts like dependency graphs, change detection and version management that the build tools rely on to function are discussed in depth. A lot of the advice in these chapters feels like it comes from practical experience and the best parts are where tool-neutral tips are provided. There is a bit too much detail here as well as the odd digression which feels unnecessary in a book of this length. Do we really need to know the details of lex and yacc in order to create a build system? The author clearly has an understanding of open source development and competently discusses the wild world of building software that may run on a plethora of machines and platforms that the developers have little or no control over as well as software that is built in a more clinical manner for a limited set of environments.

Build systems for massive software projects are covered in "Scaling Up" and the author acknowledges that this probably isn't relevant for everyone. I however think that the first chapter in this section ("Reducing complexity for end users") is the best in the whole book and applies to all build systems, regardless of size or technology. A better title for this chapter would have been "Best practices for build systems" as it doles out plenty of good tips such as how to automatically detect dependencies, what not to keep in a source control system, when to abort a build (early), why to ensure there is always a way to clean up all build-generated artifacts and so on. The gist here is to try to reduce complexity wherever possible and the advice is all very well reasoned and practical. The book wraps up by covering methods for reducing the size of a build and ways to speed up and optimize builds.

Overall this is a very well written, edited and structured book but it does suffer from attempting to cover too much and going into detail on topics which aren't going to be of interest to everyone. A prime example of this is the section on packaging technologies where I doubt that someone concerned with creating Debian packages will find the information on the Nullsoft Scriptable Install System very useful, or vice versa. The same applies to the varying levels of technical detail in the book — a manager may find the introductions to concepts like compiled versus scripted languages enlightening but to most developers this will be old hat. Conversely the intricacies of how Make calculates its dependency graph is probably interesting to a build engineer but most managers will be out of their depth.

This isn't the kind of book most people will read from cover to cover. Instead I recommend skimming through the sections that aren't immediately applicable and just focusing on the parts that discuss the particular build technologies the reader is interested in as well as the more technology neutral parts towards the end. It is obvious that years (if not decades) of real world experience have been distilled in Software Build Systems. It is just a shame that this process wasn't a bit more focused as this could have been a great book, instead of just a good book with some great sections and some sections that most readers will find themselves skimming over.

I was given a copy of this book free of charge by the publisher for review purposes. They placed no restrictions on what I could say and left me to be as critical as I wanted so the above review is my own honest opinion.

You can purchase Software Build Systems: Principles and Experience from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

*

This discussion has been archived. No new comments can be posted.

Book Review: Software Build Systems

Comments Filter:
  • I wonder how much of the complexity of these things is due to people wanting to be able to do an incremental build of just part of the whole thing.
  • Especially if you're into trying a little of everything.
  • by JonySuede ( 1908576 ) on Wednesday June 29, 2011 @01:49PM (#36614114) Journal

    good review but what about continuous integration? Is this books already outdated or was this important part of software build omitted from the book.

    • CI was going to be my question as well, since I spend my time at work managing a multi-site Jenkins CI system for ~100 jobs.
  • by LikwidCirkel ( 1542097 ) on Wednesday June 29, 2011 @01:57PM (#36614174)
    I think this is quite useful. This topic is super-important and highly neglected in most Universities and colleges. Newbies where I work as an embedded developer learn very fast that compiling things is actually a lot harder than just writing code.
    • Re: (Score:3, Informative)

      by loom_weaver ( 527816 )

      It's highly neglected in most companies as well.

      I bet more time is lost due to complex build systems than people want to admit. Gotta love the 72 hour builds on some systems I get to observe.

      The complexity of the build system is sometimes on par with the complexity of the application itself but the tool support and resources just is not there.

  • by apetrelli ( 1308945 ) on Wednesday June 29, 2011 @02:08PM (#36614250)

    Why not covering Maven? It's got a totally different way of building applications, together with some concepts like artifacts, dependency, artifact repository, that are not present in other build systems.
    I think that it is worth at least a mention.

  • by EmperorOfCanada ( 1332175 ) on Wednesday June 29, 2011 @02:11PM (#36614280)
    I have seen build environments that made life so much better. But in most cases I have seen complex build environments that could be described as nothing more than make work projects. When you have a dual processored 8-12 core desktops incremental build times are generally pretty damn short unless you are compiling something massive. So no savings there. Where build environments can help is when you are working with a cluster of monkeys who would simply screw the build up every time they added their so called contributions. After discovering Git I really came to realize that many tools are designed to prevent stupidity at the cost of efficiency. Git would be a great example of a tool that promotes efficiency but won't keep the morons at bay. For many smaller projects build environments are generally moron prevention tools.
    But at a certain level of complexity they do really act as a traffic cop of sorts.
    • by Amigan ( 25469 )
      As long as your target is current hw/sw, then being able to use 8-12 core machines as build engines is nice. Unfortunately, commercial customers don't upgrade as often as one would like, so supporting older versions of the OS is generally required. Depending on the OS, it may/may not run on recent hardware, which limits what kind of build machines you can actively support. Most hw/sw vendors provide backwards compatibility (something compiled on Solaris 8 runs on 9, 10, 11), but you should never count on
  • by dwheeler ( 321049 ) on Wednesday June 29, 2011 @02:15PM (#36614324) Homepage Journal
    The summary doesn't mention cmake or maven. That's bizarre. I hope the actual book covers those; those are really common and useful.
    • Re: (Score:3, Interesting)

      by DeKO ( 671377 )

      CMake is there in the summary. Maven is not that popular probably due to its design to do "everything".

      What seems to be really missing is autotools. Even if you don't want to admit it is better than most alternatives, it's the only one that really solves a ton of problems that no other tool is able to handle. Simply reading through the autoconf, automake and libtool manuals will teach you a lot about the many issues most other tools just ignore, or solve poorly.

    • I've recently started using Tundra, a very light-weight and scalable (CPU core wise) build system, with very fast and reliable dependency analysis written in C, using pthreads/winthreads and taking advantage of SIMD instruction sets. It supports multiple build configurations and variants side-by-side, multiple disjoint build targets/deliverables, and has very DRY LUA-based DSL for project configuration. It doesn't hide CFLAG details, it gets out of the way and lets you precisely control what you're passing

  • I doubt that someone concerned with creating Debian packages will find the information on the Nullsoft Scriptable Install System very useful, or vice versa.

    While I love living in the world of web apps, where I can simply point people at the latest Chrome or Firefox for their chosen platform, I would certainly find both of these things helpful if I ever need to develop a non-trivial cross-platform native application. In fact, if you're going to cover Debian packages at all, any developer interested in those is probably also (unfortunately) interested in some sort of installer for Windows.

    But this is, of course, why I prefer web apps. Otherwise I'd also have to

  • Every product I've ever worked on is built with a shell script

    There is really no other way to make everything happen

    Small products might get away with make or ant or whatever but real products are made from a variety of projects and shell scripts are the only good way to glue them all together.

  • We're moving back to make. Full disclosure: it was my idea to move to scons in the first place. Dammit.

Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke

Working...