Split up Soong build doc.
Previously the build doc was a gigantic list of modules and properties,
which can be overwhelming to new users. This change breaks it up by
packages, so that it is easier to look up and feels more coherent.
Bug: 123521276
Test: m soong_docs
Change-Id: I1a1a331f4b4deb8782d698e9076098c5a27b9566
diff --git a/android/writedocs.go b/android/writedocs.go
index 9737030..7262ad8 100644
--- a/android/writedocs.go
+++ b/android/writedocs.go
@@ -53,15 +53,19 @@
primaryBuilder := primaryBuilderPath(ctx)
soongDocs := ctx.Rule(pctx, "soongDocs",
blueprint.RuleParams{
- Command: fmt.Sprintf("%s --soong_docs %s %s",
+ Command: fmt.Sprintf("rm -f ${outDir}/* && %s --soong_docs %s %s",
primaryBuilder.String(), docsFile.String(), strings.Join(os.Args[1:], " ")),
CommandDeps: []string{primaryBuilder.String()},
Description: fmt.Sprintf("%s docs $out", primaryBuilder.Base()),
- })
+ },
+ "outDir")
ctx.Build(pctx, BuildParams{
Rule: soongDocs,
Output: docsFile,
+ Args: map[string]string{
+ "outDir": PathForOutput(ctx, "docs").String(),
+ },
})
// Add a phony target for building the documentation