Don't print module header if nothing is defined

Modules may decide not to output any build definitions in some cases.
Clean up the ninja file by not adding headers for empty sections.

One particular usecase is my upcoming multi-stage bootstrapping -
bootstrap_go_* will not output any rules in the first stage unless it's
required to build the primary builder.

Change-Id: I6a6b54da7e1702c63bfa736bcf8daf16956f9449
1 file changed
tree: 1c626dc747029820179e2f73debb4d8cf7ae2283
  1. bootstrap/
  2. bpfmt/
  3. bpmodify/
  4. deptools/
  5. gotestmain/
  6. parser/
  7. pathtools/
  8. proptools/
  9. .travis.yml
  10. Blueprints
  11. bootstrap.bash
  12. build.ninja.in
  13. context.go
  14. context_test.go
  15. CONTRIBUTING.md
  16. doc.go
  17. LICENSE
  18. live_tracker.go
  19. mangle.go
  20. module_ctx.go
  21. ninja_defs.go
  22. ninja_strings.go
  23. ninja_strings_test.go
  24. ninja_writer.go
  25. ninja_writer_test.go
  26. package_ctx.go
  27. README.md
  28. scope.go
  29. singleton_ctx.go
  30. splice_modules_test.go
  31. unpack.go
  32. unpack_test.go
README.md

Blueprint Build System

Build Status

Blueprint is a meta-build system that reads in Blueprints files that describe modules that need to be built, and produces a Ninja manifest describing the commands that need to be run and their dependencies. Where most build systems use built-in rules or a domain-specific language to describe the logic for converting module descriptions to build rules, Blueprint delegates this to per-project build logic written in Go. For large, heterogenous projects this allows the inherent complexity of the build logic to be maintained in a high-level language, while still allowing simple changes to individual modules by modifying easy to understand Blueprints files.