Bake is an eductaional clone of GNU Make written in C. The aim of the project is to learn more about C, build systems, tokenization, parsing, graph theory, parallel computation, and more!
- Execute all targets in a Bakefile
- Specify a single target to execute
- Detect and report cycles in the dependency graph
- Raise an error when target is not defined
- Avoid re-executing targets that are up to date
- Concurrent target execution (using
pthread
)
- Test concurrent modifications to the file system (somehow xD)
- Implement a thread pool
- Add support for variables
- Dockerize bake
Bake is only supported on Linux. It has been tested on Ubuntu 20.04 LTS.
To compile Bake, you will need the following:
- GNU Make (unironically)
- GCC (GNU Compiler Collection)
- pcre (package for Perl Compatible Regular Expressions)
- To install:
sudo apt update && sudo apt install libpcre3 libpcre3-dev
- To install:
- To compile Bake, run
make
in the root directory of the project. The following binaries will be created in thebuild
directory:bake
executable.- some test binaries named
build/test_<testname>
- To generate debug symbols when compiling bake, run
make DEBUG=1
. - Run
make clean
in the root directory of the project to remove all build artifacts.
- Run
make run-tests
in the root directory of the project to run the test suite. - To run a particular test, run
make run-test-<testname>
(without the.c
extension).
- To run Bake, run
./build/bake
. Note that this will executeBakefile
in the root of the project.