Fubsy is a tool for building software. In concrete terms, it lets you conditionally (re)build targets from sources, based on which sources have changed. Typically, targets and sources are all files in a directory tree. In theory, they can be any resource on a computer.
Currently, Fubsy is in the very early stages of development. It doesn't support nearly as many features as the user guide promises. Here's a taste of what it looks like today (version 0.0.2):
main { CC = "/usr/bin/gcc" source = <src/*.c> headers = <src/*.h> "myapp": headers + source { "$CC -o $TARGET $source" } }
Some highlights of this build script:
- it's organized into phases: main is required, and there's a build phase hidden behind the scenes (in the future, Fubsy will support more phases: options, configure, clean, ...)
- convenient "filefinder" syntax for wildcards, essentially a lazy list of filenames (also supports recursive wildcards, e.g. <myapp/src/main/**/*.java>)
- variables have multiple data types; here we see strings and filefinders (Fubsy has lists too)
- a build rule, which states that myapp depends on src/*.c and src/*.h; if any of those source files change, Fubsy will rebuild myapp by executing the specified action(s)
- automatic variables like TARGET, the first target of the current build rule, which only work in a build rule (other automatic variables are TARGETS, SOURCES, and SOURCE)
You can read more about this simple example in the Fubsy user guide.