<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Final//EN"> <HTML> <HEAD> <TITLE>Rootless Jam example</TITLE> </HEAD> <BODY> <p> The <a href="../simple">simple</a> and <a href="../abstract">abstract</a> examples assume a single, one-part or hierarchical project layout. This example illustrates one way to use Jam to build a project which consists of several "parallel" projects with no particular "root" directory or project. <p> Incidentally, we use c++ on this project instead of c. <p> For this example, we hypothesize a project consisting of several separate sub projects, each of which may be targeted to a particular operating system. We have the following directories: <ul> <li>shared: Code common to all platforms. <li>mac: Source code for the Macintosh client <li>pcwin: Source code for the Windows client <li>xwindows: Source code for the Unix/XWindows client <li>server: Server source code <li>all-bin: Target directory for builds. This contains no source code, but does contain a Jamfile. </ul> <p> The server runs on Windows NT and on various Unix platforms<sup><a href="#fn1">*</a></sup>. The mac, pcwin and xwindows directories contain code for the various clients. All the various servers and clients rely on code in the "shared" directory. Finally, the all-bin directory contains a Jamfile which determines which set of sub projects to build for a given platform. As usual, Jam can be run in any of the sub directories; only the sub project in that directory will be compiled. <p> The point of this arrangement is it allows the separate sub projects to be very independant. For example, if you are working on the Mac client, you need only the "mac" and "shared" directories. Alternately, let's say you want to build all the sub projects which are appropriate to the platform on (and for) which you are compiling (for example, when building a release). In this case, you would get all the sub projects from <a href="//www.perforce.com">your version control system</a> and run Jam in the all-bin directory. The Jamfile there controls which sub projects go into the package for a release on a given operating system. <p>Things to try: <ul> <li> Run Jam from the server directory. The server and related "db" library will be built and placed in a subdirectory of ../all-bin/, and a "test bed" for the server will be created in the test_dir directory. <b><i>more here</i></b> </ul> <hr> <a name="fn1">*</a>Actually, each "client" or "server" application just prints a version string and exits, and should probably run on just about anything, but let's pretend. </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 4438 | Chris Comparini |
Sample jam projects. "rootless" documentation still needs work. |