zsh 環境で Android OS をビルドする際に envsetup.sh を使う

Android OS をビルドする際にとても便利な機能を提供してくれる envsetup.sh なのですが、zsh 環境では以下のようなエラーになってしまいます。

% source build/envsetup.sh
build/envsetup.sh:1: no matches found: vendor/*/vendorsetup.sh

これを回避するには次のように "unsetopt NOMATCH" を設定します。

% unsetopt NOMATCH

これで mm や croot などの便利コマンドが使えるようになります。

% source build/envsetup.sh
including device/htc/passion/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
% help
Invoke ". build/envsetup.sh" from your shell to add the following functions to 
your environment:
- croot:   Changes directory to the top of the tree.
- m:       Makes from the top of the tree.
- mm:      Builds all of the modules in the current directory.
- mmm:     Builds all of the modules in the supplied directories.
- cgrep:   Greps on all local C/C++ files.
- jgrep:   Greps on all local Java files.
- resgrep: Greps on all local res/*.xml files.
- godir:   Go to the directory containing a file.

Look at the source to view more functions. The complete list is:
 add_lunch_combo cgrep check_product check_variant choosecombo chooseproduct
 choosetype choosevariant cproj croot findmakefile gdbclient get_abs_build_var
 get_build_var getbugreports getprebuilt gettop godir help isviewserverstarted
 jgrep lunch m mm mmm pid print_lunch_menu printconfig resgrep runhat runtest
 set_java_home set_sequence_number set_stuff_for_environment setpaths settitle
 smoketest startviewserver stopviewserver systemstack tapas tracedmdump

このエントリーのはてなブックマーク (-)