Skip to content

nkh-lab/aosp-devicemk-parser

Repository files navigation

Intro

Python-based tool project for parsing AOSP device mk file dependencies for lunch target and presenting output in PlantUML format.

CI Status

CI

How to use

Script should be run from AOSP tree for sourced lunch target. For example:

$ . ./build/envsetup.sh
$ lunch ncar_x86-userdebug
$ cd vendor/nkh-lab/tools/devicemk-parser/

And run the script:

$ python parse_devicemk.py
Parsing make files dependencies...
device/nkh-lab/ncar/ncar_x86.mk
device/nkh-lab/ncar/ncar_x86/BoardConfig.mk
device/generic/car/emulator/aosp_car_emulator.mk
build/make/target/product/aosp_x86.mk
device/nkh-lab/ncar/ncar_x86/device-ncar_x86.mk
device/generic/car/generic_car_x86/BoardConfig.mk
device/generic/car/common/car.mk
...
build/make/target/product/base_vendor.mk
build/make/target/product/runtime_libart.mk
build/make/target/product/default_art_config.mk
============================================
Parsed files: 72, Warnings: 0, Time spent: 0m 13s
Generated output:
PUML: /home/mykola/Projects/my/ncar/vendor/nkh-lab/tools/devicemk-parser/ncar_x86.puml

For more options, see the script help:

$ python parse_devicemk.py -h

Output examples

Following output examples were obtained from parsing NCAR - Android Automotive Emulator AOSP project for ncar_x86-userdebug target:

The following is an example of graphical PlantUML presentation, where PlantUML output file was converted into SVG image by using PlantUML Extension for Visual Studio Code (also output file can be converted using PlantUML online interpreter):

Link to full size image

Useful links

About

Python-based tool project for parsing AOSP device mk file dependencies for lunch target and present output in PlantUML format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published