Build tool for my projects
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
common @ 7b9d1b4
third_party @ 19fcaad



Repobuild is a declarative style build system.

  • Similar to Google's BUILD file system of old (gconfig + make)
  • Generates a Makefile for portability
  • Fetches missing files from git automatically
  • Functional for Mac and Linux.
  • In beta, some rules may change.
  • A small side project, so turnaround might be slow.
  • Motivation behind Repobuild
  • Initially a learning project to make open source easier to integrate.
  • Neat features:
    • Sub-module dependency initialization automatically pulls code from git if needed: see here.
    • Intended to wrap existing build tools: No project rewrites required.
    • Generates a Makefile: Clients of your code can just run "make" without repobuild installed.
    • Plugins: Allows custom scripts to rewrite BUILD files during execution (simple example)
  • A lot of other build tools have better functionality (and years of development). This is not intended to replace them outright.
  • Similar build systems to Repobuild
Current Languages:
  • C++
  • Python
  • Java
  • Go
  • TODO: Ruby, Javascript (compiler/minimizer), Scala, etc.
Current rules:


  • git
  • gcc or clang (recent version, requires c++11)
  • make
  • some rule types require python, go, java, cmake, etc.
Building the tool
# Build it:
$ git clone
$ cd repobuild
$ make -j8 repobuild

# Install (default is /usr/local/bin)
$ sudo make install


# Basic help:
$ repobuild --helpshort

  To generate makefile:
     repobuild "path/to/dir:target" [--makefile=Makefile]

  To build:
     make [-j8] [target]

  To run:

  Flags from repobuild/
    -makefile (Name of makefile output.) type: string default: "Makefile"

# To set up makefile:
$ repobuild "//path/to/my/dir:target_name" "//path/to/other/dir:target_2"
Generating Makefile

# Make options:
# 1) Builds all binaries, libraries, etc:
$ make

# 2) Build specific library
$ make path/to/my/dir/target_name

# 3) Builds/runs tests:
$ make tests

# 4) Installs binaries and shared libraries
$ make install

# 5) Figure out which licenses you depend on
$ make licenses

Concrete example

# Try it out on the testdata (builds in protocol buffers and other fun stuff):
$ repobuild "testdata:java_main"
$ make -j8
$ ./java_main
What should you do now?
Why is this built using C++?

Actually this started in Go, and there is no good reason for C++. The first open source code I needed to use it on was in C++, and having the tool build itself appealed to the geek in me.