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:
- A lot of other bulid tools have better functionality (and years of development). This is not intended to replace them outright.
- Similar build systems to Repobuild
- See rules
- gcc or clang (recent version, requires c++11)
- some rule types require python, go, java, cmake, etc.
Building the tool
# Build it: $ git clone https://github.com/chrisvana/repobuild.git $ cd repobuild $ make -j8 repobuild # Install (default is /usr/local/bin) $ sudo make install
# Basic help: $ repobuild --helpshort repobuild: To generate makefile: repobuild "path/to/dir:target" [--makefile=Makefile] To build: make [-j8] [target] To run: ./.gen-obj/path/to/target or ./target Flags from repobuild/repobuild.cc: -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
# 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?
- Try a tutorial
- Look at some other examples
- Start playing with your own project.
- Add open source projects to "third_party".
- Write a plugin, and optionally add to //third_party/plugins
- Forum (questions, bugs, hate mail, etc): https://groups.google.com/forum/#!forum/repobuild
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 being able to build the tool using the tool appealed to the geek in me.