Lines Matching +full:- +full:p
7 // http://www.apache.org/licenses/LICENSE-2.0
26 // `prebuilt_etc` exist only as prebuilts and cannot have a same-named source module counterpart.
150 func (p *PrebuiltEtc) inRamdisk() bool {
151 return p.ModuleBase.InRamdisk() || p.ModuleBase.InstallInRamdisk()
154 func (p *PrebuiltEtc) onlyInRamdisk() bool {
155 return p.ModuleBase.InstallInRamdisk()
158 func (p *PrebuiltEtc) InstallInRamdisk() bool {
159 return p.inRamdisk()
162 func (p *PrebuiltEtc) inVendorRamdisk() bool {
163 return p.ModuleBase.InVendorRamdisk() || p.ModuleBase.InstallInVendorRamdisk()
166 func (p *PrebuiltEtc) onlyInVendorRamdisk() bool {
167 return p.ModuleBase.InstallInVendorRamdisk()
170 func (p *PrebuiltEtc) InstallInVendorRamdisk() bool {
171 return p.inVendorRamdisk()
174 func (p *PrebuiltEtc) inDebugRamdisk() bool {
175 return p.ModuleBase.InDebugRamdisk() || p.ModuleBase.InstallInDebugRamdisk()
178 func (p *PrebuiltEtc) onlyInDebugRamdisk() bool {
179 return p.ModuleBase.InstallInDebugRamdisk()
182 func (p *PrebuiltEtc) InstallInDebugRamdisk() bool {
183 return p.inDebugRamdisk()
186 func (p *PrebuiltEtc) inRecovery() bool {
187 return p.ModuleBase.InRecovery() || p.ModuleBase.InstallInRecovery()
190 func (p *PrebuiltEtc) onlyInRecovery() bool {
191 return p.ModuleBase.InstallInRecovery()
194 func (p *PrebuiltEtc) InstallInRecovery() bool {
195 return p.inRecovery()
200 func (p *PrebuiltEtc) ImageMutatorBegin(ctx android.BaseModuleContext) {}
202 func (p *PrebuiltEtc) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
203 return !p.ModuleBase.InstallInRecovery() && !p.ModuleBase.InstallInRamdisk() &&
204 !p.ModuleBase.InstallInVendorRamdisk() && !p.ModuleBase.InstallInDebugRamdisk()
207 func (p *PrebuiltEtc) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
208 return proptools.Bool(p.properties.Ramdisk_available) || p.ModuleBase.InstallInRamdisk()
211 func (p *PrebuiltEtc) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
212 …return proptools.Bool(p.properties.Vendor_ramdisk_available) || p.ModuleBase.InstallInVendorRamdis…
215 func (p *PrebuiltEtc) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
216 return proptools.Bool(p.properties.Debug_ramdisk_available) || p.ModuleBase.InstallInDebugRamdisk()
219 func (p *PrebuiltEtc) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
220 return proptools.Bool(p.properties.Recovery_available) || p.ModuleBase.InstallInRecovery()
223 func (p *PrebuiltEtc) ExtraImageVariations(ctx android.BaseModuleContext) []string {
227 func (p *PrebuiltEtc) SetImageVariation(ctx android.BaseModuleContext, variation string, module and…
230 func (p *PrebuiltEtc) SourceFilePath(ctx android.ModuleContext) android.Path {
231 return android.PathForModuleSrc(ctx, proptools.String(p.properties.Src))
234 func (p *PrebuiltEtc) InstallDirPath() android.InstallPath {
235 return p.installDirPath
240 func (p *PrebuiltEtc) SetAdditionalDependencies(paths android.Paths) {
241 p.additionalDependencies = &paths
244 func (p *PrebuiltEtc) OutputFile() android.OutputPath {
245 return p.outputFilePath
250 func (p *PrebuiltEtc) OutputFiles(tag string) (android.Paths, error) {
253 return android.Paths{p.outputFilePath}, nil
259 func (p *PrebuiltEtc) SubDir() string {
260 if subDir := proptools.String(p.subdirProperties.Sub_dir); subDir != "" {
263 return proptools.String(p.subdirProperties.Relative_install_path)
266 func (p *PrebuiltEtc) BaseDir() string {
267 return p.installDirBase
270 func (p *PrebuiltEtc) Installable() bool {
271 return p.properties.Installable == nil || proptools.Bool(p.properties.Installable)
274 func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
275 if p.properties.Src == nil {
279 p.sourceFilePath = android.PathForModuleSrc(ctx, proptools.String(p.properties.Src))
285 filename := proptools.String(p.properties.Filename)
286 filenameFromSrc := proptools.Bool(p.properties.Filename_from_src)
293 filename = p.sourceFilePath.Base()
297 p.outputFilePath = android.PathForModuleOut(ctx, filename).OutputPath
305 if p.subdirProperties.Sub_dir != nil && p.subdirProperties.Relative_install_path != nil {
311 installBaseDir := p.installDirBase
312 if p.SocSpecific() && p.socInstallDirBase != "" {
313 installBaseDir = p.socInstallDirBase
315 p.installDirPath = android.PathForModuleInstall(ctx, installBaseDir, p.SubDir())
321 Output: p.outputFilePath,
322 Input: p.sourceFilePath,
325 if !p.Installable() {
326 p.SkipInstall()
330 installPath := ctx.InstallFile(p.installDirPath, p.outputFilePath.Base(), p.outputFilePath)
331 for _, sl := range p.properties.Symlinks {
332 ctx.InstallSymlink(p.installDirPath, sl, installPath)
336 func (p *PrebuiltEtc) AndroidMkEntries() []android.AndroidMkEntries {
338 if p.inRamdisk() && !p.onlyInRamdisk() {
341 if p.inVendorRamdisk() && !p.onlyInVendorRamdisk() {
344 if p.inDebugRamdisk() && !p.onlyInDebugRamdisk() {
347 if p.inRecovery() && !p.onlyInRecovery() {
353 OutputFile: android.OptionalPathForPath(p.outputFilePath),
357 entries.SetString("LOCAL_MODULE_PATH", p.installDirPath.ToMakePath().String())
358 entries.SetString("LOCAL_INSTALLED_MODULE_STEM", p.outputFilePath.Base())
359 if len(p.properties.Symlinks) > 0 {
360 entries.AddStrings("LOCAL_MODULE_SYMLINKS", p.properties.Symlinks...)
362 entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.Installable())
363 if p.additionalDependencies != nil {
364 entries.AddStrings("LOCAL_ADDITIONAL_DEPENDENCIES", p.additionalDependencies.Strings()...)
371 func InitPrebuiltEtcModule(p *PrebuiltEtc, dirBase string) {
372 p.installDirBase = dirBase
373 p.AddProperties(&p.properties)
374 p.AddProperties(&p.subdirProperties)
377 func InitPrebuiltRootModule(p *PrebuiltEtc) {
378 p.installDirBase = "."
379 p.AddProperties(&p.properties)
387 // This module is device-only
416 // This module is host-only
426 // This module is device-only
436 // This module is device-only
446 // This module is host-only
455 // This module is device-only
468 // This module is device-only
480 // This module is device-only
493 // This module is device-only