You have to set up your source code in a coherent "depot". This
just means that everything for your project must be contained
within a single directory root. You must also include your
header files using paths which are relative to the depot root,
Create a file called .depot.root in a directory, and it's a depot root. Just use "touch". Then create a directory called "src" under that and you're ready to start writing code.
Here's an example of a simple depot.
Okay, here you go: download test_depot.tar.gz
Open that up with 'tar zxf test_depot.tar.gz', cd into test_depot, then try building some of the targets in there. Commands to try are:
Nope. I recommend you make a shell alias or short script to call it for you, like this:
alias bb='dep_cli -c default'
Or, if you like a tiny script:
#!/bin/sh dep_cli -c default || exit 1
Then you can just run
bb util/tool. Easy! If 'bb'
doesn't suit your fingers, use anything else you like.
Running "git init" in your "src" directory will get things started.
System libraries use the angle bracket syntax, like this:
#include <libmicrohttpd.h>. Libraries which
need special compile-time or link-time flags can be configured
using .build.conf hints.
More directories will automatically be created under your depot root
as you run build commands. The default output directory is "bin",
and it mirrors the "src" tree. Your bin directory might look like
this given the above example tree after you run
lib1/lib1.o was built automatically
since top_level_target.cc references it with an #include.
There are other types of builds which are supported but are not yet documented in the interest of simplicity. This feature is used for adding extra debug symbols, enabling coverage runs, profiling, and optimized (stripped) builds.
This project exists to scratch an itch I had, and that itch was making my C++ code base compile without using Make. For a first release, I think this is sufficient. If there is demand for other things, then I will consider adding it.
In other words, download it, play with it, then send me a message and tell me that you're using it.