**NOTE**: this project has been deprecated. [Bazel](https://bazel.build/) is an open source build system that shares roots with the design of anvil, and is a superset of the functionality available here.
Anvil is a build system designed to ease the construction of content pipelines, taking many concepts and the rule file syntax that powers Google's internal build system and making them accessible in a small, open-source Python library. It features a rich and extensible build file format and many built-in rules to get started.
Modern web apps and games have shifted to be more content than code and older build systems (make/scons/etc) are ill-suited for this shift. Most developers now roll their own shell scripts and hack together tools, but as projects scale in both size and complexity they fall apart. Limiting the engineering robustness of many large games is now this lack of solid content pipeline, not language or browser features. Anvil is designed to help fill this gap and let developers build polished, efficient, and cross-browser applications.
Features
--------
* Parallelizable build process
* Eventually distributed
* Rich build files (Python-like)
* Tiny environment, very few assumptions or dependencies
* Build files are generally WYSIWYG, with no hidden state or behavior
* Continuous build server and hosting mode
* Easy to build live-refresh pages and content
* Dependency management for rule types
* Make it simple to checkout and build projects that depend on custom tools or packages
* Extensible rule definitions
* Simple Python to add custom data formats or actions
# 'anvil' is the main app, use it to build, test, or serve your content
anvil build project:some_output
Anvil is available via PyPI as '[anvil-build](http://pypi.python.org/pypi/anvil-build)' and can be installed via easy_install or pip, however it's recommeneded that it's used as a submodule instead.
# Install the master git dev branch
pip install anvil-build
Note that bash completion should be enable, but if not use `sudo anvil completion --install --bash` to install it. You can complete on options, module files, and if you add a `:` on rules.
Build Files
-----------
TODO: detailed overview
The base unit in the build system is a rule. Rules describe some action that is performed on input files and produce output files, and they may reference other rules as inputs. Modules are files that contain many rules, and a project may be made up of many modules. When using the 'anvil' command line tool one specifies a rule or list of rules to build as targets and the build system takes care of building all of the required rules.
The naming syntax for rules is `/some/path:rule_name`, with the colon splitting module file paths from the rule names contained within. The module files should always be called `BUILD`, which is a special name that the build system treats as the module for the parent directory. This enables one to omit `BUILD` when referencing rules, auto-expanding `/some/path:rule_name` to `/some/path/BUILD:rule_name`. A shorthand is allowed as `:rule_name` (omitting the path), enabling easy access to rules defined in the same file or, when dealing with rules from the command line, in the BUILD file in the current working directory.
For example, here's two simple files:
# in /some/path/BUILD:
# All txt files under the current path, plus the outputs of foo:rule2