diff options
author | 2019-11-22 14:52:29 +0000 | |
---|---|---|
committer | 2019-11-22 14:52:29 +0000 | |
commit | 504b46160fc30a617f0b3136281730b42f4b6839 (patch) | |
tree | a9b8000adfd02fe0e3580de11666cb850e459989 /sdk/sdk.go | |
parent | 126c57b52d93fc8c86ae438a9fb39ad704b38479 (diff) |
Simplify building an SDK snapshot from the command line
Adds a phony target for each sdk module that builds the snapshot zip.
Test: built an sdk module from command line and checked the zip was created.
Bug: 143678475
Change-Id: I4599332443b8da9adea0a16f00f569ffbd421602
Diffstat (limited to 'sdk/sdk.go')
-rw-r--r-- | sdk/sdk.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sdk/sdk.go b/sdk/sdk.go index 4eb3665fb..09cf2b45e 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -16,6 +16,7 @@ package sdk import ( "fmt" + "io" "strconv" "github.com/google/blueprint" @@ -121,6 +122,13 @@ func (s *sdk) AndroidMkEntries() android.AndroidMkEntries { OutputFile: s.snapshotFile, DistFile: s.snapshotFile, Include: "$(BUILD_PHONY_PACKAGE)", + ExtraFooters: []android.AndroidMkExtraFootersFunc{ + func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) { + // Allow the sdk to be built by simply passing its name on the command line. + fmt.Fprintln(w, ".PHONY:", s.Name()) + fmt.Fprintln(w, s.Name()+":", s.snapshotFile.String()) + }, + }, } } |