Child pages
  • Build System Structure
Skip to end of metadata
Go to start of metadata

Makefile

  • Located in ramcloud/GNUmakefile
  • This makefile system follows the structuring conventions recommended by Peter Miller in his excellent paper: Recursive Make Considered Harmful
  • Essentially one Makefile, with includes at various places in the project directory
    • GNUmakefile is the root Makefile
    • Included bits are called Makefrag.
  • No special magic here - this is simply direct expansion of the file contents.
    • Means all Makefrag contents are still relative to the working directory of the make invocation (which there is only one of in this style of build system).
    • One can refer to the working directory of make via $(TOP) which is declared in the top level Makefile
  • Keep in mind
    • There is no scoping here, if you declare something in a Makefrag that conflicts with something in another Makefrag or something in the GNUmakefile collisions are resolved just as they would be in a single Makefile (i.e. one definition will override the other depending on the order in which they are included.

Interesting Targets

  • make - build the RAMCloud server and client software
    • Output obj.master/client/client, obj.master/server/server
    • Replace 'master' with the git local branch name you are on if it is not 'master'
  • make unit-test - build and run RAMCloud unit tests (requires CppUnit)
  • make test - a simple smoke test that runs unit-test and builds a simple application to ensure the install information is sufficient
  • make check - currently runs Google style checker against files in the src directory; subject to check as style evolves

Unit Testing

  • Run via make unit-test
  • Builds and runs the tests in a single shot

Simple Style/Static Checking

  • Run via make check
  • Uses cpplint.py to check that the style is the agreed-upon style.
  • No labels