Add aninja to envsetup.sh
Add an aninja function to envsetup.sh that can run ninja with the
appropriate ninja file for an Android build. Simplifies running
queries with ninja. For example:
aninja -t query droid
Test: aninja -t query droid
Change-Id: I7064984d55054cd4350800cfd75bf6aaa1740e9d
diff --git a/envsetup.sh b/envsetup.sh
index af6695f..e448bd3 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -2059,6 +2059,11 @@
(\cd "${T}" && build/make/tools/overrideflags.sh "$@")
}
+function aninja() {
+ local T="$(gettop)"
+ (\cd "${T}" && prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja "$@")
+}
+
validate_current_shell
set_global_paths
source_vendorsetup