Merge "Remove global variables from Blueprint."
This commit is contained in:
@@ -68,6 +68,14 @@ func (c Config) BuildDir() string {
|
|||||||
return c.buildDir
|
return c.buildDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c Config) NinjaBuildDir() string {
|
||||||
|
return c.buildDir
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c Config) SrcDir() string {
|
||||||
|
return c.srcDir
|
||||||
|
}
|
||||||
|
|
||||||
// A DeviceConfig object represents the configuration for a particular device
|
// A DeviceConfig object represents the configuration for a particular device
|
||||||
// being built. For now there will only be one of these, but in the future there
|
// being built. For now there will only be one of these, but in the future there
|
||||||
// may be multiple devices being built.
|
// may be multiple devices being built.
|
||||||
|
@@ -158,7 +158,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if docFile != "" {
|
if docFile != "" {
|
||||||
if err := writeDocs(ctx, docFile); err != nil {
|
if err := writeDocs(ctx, configuration, docFile); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "%s", err)
|
fmt.Fprintf(os.Stderr, "%s", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
@@ -95,13 +95,13 @@ func moduleTypeDocsToTemplates(moduleTypeList []*bpdoc.ModuleType) []moduleTypeT
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPackages(ctx *android.Context) ([]*bpdoc.Package, error) {
|
func getPackages(ctx *android.Context, config interface{}) ([]*bpdoc.Package, error) {
|
||||||
moduleTypeFactories := android.ModuleTypeFactoriesForDocs()
|
moduleTypeFactories := android.ModuleTypeFactoriesForDocs()
|
||||||
return bootstrap.ModuleTypeDocs(ctx.Context, moduleTypeFactories)
|
return bootstrap.ModuleTypeDocs(ctx.Context, config, moduleTypeFactories)
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeDocs(ctx *android.Context, filename string) error {
|
func writeDocs(ctx *android.Context, config interface{}, filename string) error {
|
||||||
packages, err := getPackages(ctx)
|
packages, err := getPackages(ctx, config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user