Build System Structure
Makefile
Located in
ramcloud/GNUmakefileThis 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
GNUmakefileis the root MakefileIncluded bits are called
Makefrag.
No special magic here - this is simply direct expansion of the file contents.
Means all
Makefragcontents 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
Makefragthat conflicts with something in anotherMakefragor something in theGNUmakefilecollisions 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 softwareOutput
obj.master/client/client, obj.master/server/serverReplace '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 runsunit-testand builds a simple application to ensure the install information is sufficientmake check- currently runs Google style checker against files in the src directory; subject to check as style evolves
Unit Testing
Run via
make unit-testBuilds and runs the tests in a single shot
Simple Style/Static Checking
Run via
make checkUses cpplint.py to check that the style is the agreed-upon style.