aboutsummaryrefslogtreecommitdiffstats
path: root/singleton_ctx.go
diff options
context:
space:
mode:
Diffstat (limited to 'singleton_ctx.go')
-rw-r--r--singleton_ctx.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/singleton_ctx.go b/singleton_ctx.go
index bbfce00..333811d 100644
--- a/singleton_ctx.go
+++ b/singleton_ctx.go
@@ -47,6 +47,10 @@ type SingletonContext interface {
// set at most one time for a single build, later calls are ignored.
SetNinjaBuildDir(pctx PackageContext, value string)
+ // AddSubninja adds a ninja file to include with subninja. This should likely
+ // only ever be used inside bootstrap to handle glob rules.
+ AddSubninja(file string)
+
// Eval takes a string with embedded ninja variables, and returns a string
// with all of the variables recursively expanded. Any variables references
// are expanded in the scope of the PackageContext.
@@ -203,6 +207,10 @@ func (s *singletonContext) SetNinjaBuildDir(pctx PackageContext, value string) {
s.context.setNinjaBuildDir(ninjaValue)
}
+func (s *singletonContext) AddSubninja(file string) {
+ s.context.subninjas = append(s.context.subninjas, file)
+}
+
func (s *singletonContext) VisitAllModules(visit func(Module)) {
s.context.VisitAllModules(visit)
}