-
Notifications
You must be signed in to change notification settings - Fork 1
Home
YABS is an open source build system with an emphasis on easily configurable builds of multiple projects.
YABS is designed from the shortcomings of other build systems. In the development of Slick OS, a tool was needed that could handle multiple architectures, multiple projects with submodules, and multiple configurations.
Originally, GNU Make was used, and it worked reasonably well until submodules had to be added. By the time the Makefile had support for submodules, it was well over 1000 lines and entirely unmaintainable. It was then that we decided we needed a different build system.
While going through the configurations of several build systems, we found that although what we wanted was possible using other tools, we wanted something easier to maintain and extend. YABS was thus built.
An incredibly simple build file looks like this:
Projects:
- Name: hello
Targets:
- Name: Build
Commands:
- Shell: gcc -Wall -Wextra -o hello hello.c
- Name: Clean
Commands:
- Shell: rm helloThe build file for YABS itself is as follows:
Projects:
- Name: YABS
Variables:
- SourceDir: Source/
- ObjectDir: Build/Objects/
- Binary: Build/yabs
Configurations:
- Name: Debug
Variables:
- C++Flags: -g -DDEBUG
Targets:
- Name: Build
Commands:
- Tool: C++ Compile($Flags, +Find($SourceDir, *.cpp), $ObjectDir)
- Tool: C++ Link($LinkFlags, +Find($ObjectDir, *.o), $Libraries, $Binary)
- Name: Clean
Commands:
- Shell: rm -rf $ObjectDir $Binary
- Name: Rebuild
Dependencies:
- Clean
- BuildAlthough the YABS build file doesn't use all of the features described before (such as multiple architectures and submodules), it does demonstrate its readability.
See Getting Started to get YABS set up and to make your first build script. For more information on the syntax used on top of YAML, see Syntax.