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

Commit eb74c2f2 authored by Chirayu Desai's avatar Chirayu Desai
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
parent 6d8b06f2
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- aospremote: Add git remote for matching AOSP 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.

Look at the source to view more functions. The complete list is:
@@ -1620,6 +1621,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)
@@ -1692,6 +1713,7 @@ function dopush()
alias mmp='dopush mm'
alias mmmp='dopush mmm'
alias mkap='dopush mka'
alias cmkap='dopush cmka'


# Force JAVA_HOME to point to java 1.6 if it isn't already set