Bob is a builder for your software projects
Go to file
2025-04-11 18:04:57 +10:00
src Add README, LICENSE. Update code 2025-04-11 18:04:57 +10:00
bob Add README, LICENSE. Update code 2025-04-11 18:04:57 +10:00
Bobfile Initial commit 2025-04-11 16:46:03 +10:00
LICENSE Add README, LICENSE. Update code 2025-04-11 18:04:57 +10:00
readme.md Add README, LICENSE. Update code 2025-04-11 18:04:57 +10:00

bob

The software builder

Bob is a builder for your software, designed with C and C++ in mind. Right now, Bob is quite simple and cannot handle linking (yet).

The case for bob

Bob is very simple. Bob is a frontend for whichever compiler you want, similar to Make. However, unlike Make, Bob is very simple. It is designed for smaller software projects.

Here's a simple Makefile for a single-file project:

example: src/main.cpp
     g++ -o example src/main.cpp

What does all that even mean????

Here's Cmake:

cmake_minimum_required(VERSION 3.10)
project(Tutorial)
add_executable(Tutorial tutorial.cxx)

A bit simpler, but that just compiles to a Makefile and everything gets messy quite fast.

Meanwhile, here's an equivalent Bobfile:

compiler "g++";
binary "example";
source "src/main.cpp";
compile;

Even a 3 year old would understand all that!

(Maybe not, but that's beside the point.)

My point is that Bob is simple, and will always remain simple. Bob will always be a good choice for small projects.

Compiling Bob

If you've already got Bob installed, just run bob in the repository directory. It's that simple!

If you're not yet living on the bright side of coding, you can compile Bob like any other C++ program, like this:

g++ src/main.cpp -o bob

Bob is designed with UNIX-like OS'es in mind.

Using Bob

Let's say you want to start a new project. Make a new directory, and run bob --init. Bob will ask you a few questions, then automatically create you a template code file and a Bobfile.

Already got a project? Write a Bobfile. Make a file named "Bobfile" in the root of your project (or wherever you'll be running it). You'll need the following things:

  • Your compiler's name
  • Your source code location
  • A name for the outputted binary

Put those into your Bobfile like this:

compiler "(compiler)";
binary "(outputted binary name)";
source "(source code location)";
compile;

The compile line just tells Bob that it's time to compile your code. It will run the compiler with all the options. This is helpful as you don't have to type out your long command to compile everything any time you make a change.