summaryrefslogtreecommitdiff
path: root/android/writedocs.go
diff options
context:
space:
mode:
author Jaewoong Jung <jungjw@google.com> 2019-02-20 07:12:30 -0800
committer Jaewoong Jung <jungjw@google.com> 2019-02-20 15:43:06 -0800
commit6c29688691b402ba6d3d0ac9d24a8bab483d1d18 (patch)
tree1532b331ad16aa4f2dc0bf8677b95d438607f1d0 /android/writedocs.go
parent48db2b15fbb301f988f75a96448a655fcc5d4470 (diff)
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
Diffstat (limited to 'android/writedocs.go')
-rw-r--r--android/writedocs.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/android/writedocs.go b/android/writedocs.go
index 9737030e0..7262ad810 100644
--- a/android/writedocs.go
+++ b/android/writedocs.go
@@ -53,15 +53,19 @@ func (c *docsSingleton) GenerateBuildActions(ctx SingletonContext) {
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