Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2cd6e71 authored by Chirayu Desai's avatar Chirayu Desai Committed by Steve Kondik
Browse files

envsetup: new function cmka

- The build system adds a clean-<module> target
  for each module / package.
- This utilizes that and cleans and builds using mka.
- If no argument is supplied, it runs "mka clean".
- If argument is (bacon|otapackage|systemimage), it
  runs installclean.

Change-Id: I582ac2f92df3278c41c254c73e9c02ad7f406851
(cherry picked from commit eb74c2f2)
(Also sneak in another minor change, a help entry for mkap)
parent f91e377a
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- aospremote: Add git remote for matching AOSP repository
- cafremote: Add git remote for matching CodeAurora repository.
- mka:      Builds using SCHED_BATCH on all processors
- mkap:     Builds the module(s) using mka and pushes them to the device.
- cmka:     Cleans and builds using mka.
- reposync: Parallel repo sync using ionice and SCHED_BATCH
- repopick: Utility to fetch changes from Gerrit.
- installboot: Installs a boot.img to the connected device.
@@ -2233,6 +2235,26 @@ function mka() {
    esac
}

function cmka() {
    if [ ! -z "$1" ]; then
        for i in "$@"; do
            case $i in
                bacon|otapackage|systemimage)
                    mka installclean
                    mka $i
                    ;;
                *)
                    mka clean-$i
                    mka $i
                    ;;
            esac
        done
    else
        mka clean
        mka
    fi
}

function reposync() {
    case `uname -s` in
        Darwin)