Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. C and C++ > Reference Builds, Libraries, and Installers

8.6. Reference Builds, Libraries, and Installers

At this point we've pretty much covered everything needed to implement reference builds. Customizing the single top-level makefile to support the feature is straightforward. Simply replace the simple assignments to SOURCE_DIR and BINARY_DIR with ?= assignments. The scripts you run from cron can use this basic approach:

  1. Redirect output and set the names of log files

  2. Clean up old builds and clean the reference source tree

  3. Check out fresh source

  4. Set the source and binary directory variables

  5. Invoke make

  6. Scan the logs for errors

  7. Compute tags files, and possibly update the locate database[2]

    [2] The locate database is a compilation of all the filenames present on a filesystem. It is a fast way of performing a find by name. I have found this database invaluable for managing large source trees and like to have it updated nightly after the build has completed.

  8. Post information on the success or failure of the build


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial