I have limited experience when it comes to build and version control systems. I feel like I've run into a common problem but I'm having trouble uncovering how it is typically handled.

Say you have four source code projects:

  • fooLib - Shared library
  • fizzLib - Shared library
  • buzzApp - Application that depends on fooLib
  • barApp - Application that depends on fizzLib and fooLib

Now, say you have two products:

  • ProductA - only needs buzzApp
  • ProductB - only needs barApp

If my task were to make bug fixes to ProductB, how would I go about checking out the projects? Am I supposed to figure out the dependencies (or look them up) or is there some automated way of doing this? Also, how could this be automated for nightly builds for each product?

  • 2
    Which source code management tool are you using?
    – Jeremy
    Jul 6, 2011 at 20:30

1 Answer 1


This depends upon two things:

  • which version control system are you using?
  • which build system are you using?

For a project like this I can not over-recommend Jenkins. It will monitor your version control system, pull the changes as they are made, build the libraries, then the final products as needed.

The way I've done (and seen this done) is to create four separate projects in your version control system.

The build system for the libraries creates the final library (.so or .lib depending upon need). The final build result is published to a shared drive or shared server for everyone to access.

On the build server for the application, the libraries would be installed from the final packaging for the build process.

I've seen attempts to build master build scripts to do all four steps in one go. But the hand-built script tend to be very fragile. Use Jenkins. It'll save your sanity.

  • +1 for suggesting build automation and separate projects in version control. Jul 7, 2011 at 3:16
  • Wouldn't any continuous integration server do that for you (as opposed to Jenkins specifically)?
    – Roman
    Jul 7, 2011 at 3:55
  • @Thomas To answer your questions we are using CVS (but we're considering mercurial) and a home-made build system. I like the idea of separate projects (currently we put all libraries and applications into a single project and build with a makefile) but I still don't quite get the workflow for this approach. How does the developer set up their environment from scratch? With our current set up all you do is check out the project and run make. Can multiple projects be just as simple (I'm afraid my co-workers will resist anything that seems more complex than what we have)?
    – josec
    Jul 7, 2011 at 14:06
  • Usually when you divide the work into one or more libraries and one or more applications its because you've divided the developers into teams, one for each library and application. The workflow is the library team builds their library and packages it, the application team installs the library packages and builds their application. You can write a single master build script to either install the libraries and build the application or build each of the libraries (and install them) then build the application. Jul 7, 2011 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.