setup: Remove the mm command
Our build system isn't really setup for using Makefile modules anymore, so the
mm command is pretty much worthless now.
Change-Id: Ic08cc6f6e490886791a366e0d0f08392350aa9c1
diff --git a/setup.sh b/setup.sh
index 5099c9a..47723fb 100755
--- a/setup.sh
+++ b/setup.sh
@@ -78,72 +78,6 @@
popd >/dev/null
}
-function mm
-{
- local module="$1"; shift
- local target="build"
-
- if [[ -z "${module}" ]]; then
- echo "Usage: mm <modulename> [<target>]"
- echo "Where"
- echo " modulename is one of the makefiles in \$ROOTDIR/build"
- echo " target is an optional target to make"
- return 1
- fi
-
- if [[ ! -f "${ROOTDIR}/build/${module}.mk" ]]; then
- echo "mm: ${module} is not a valid module."
- return 1
- fi
-
- if [[ -f /.dockerenv ]]; then
- target="sub-build"
- fi
-
- pushd "${ROOTDIR}" >/dev/null
- log.sh $target started mm "$@"
- make -f "${ROOTDIR}/build/${module}.mk" "$@"
- if [[ "$?" != 0 ]]; then
- log.sh $target failed
- else
- log.sh $target finished
- fi
- popd >/dev/null
-}
-
-if builtin complete >/dev/null 2>/dev/null; then
- function _mm_modules
- {
- echo "${ROOTDIR}"/build/*.mk \
- | xargs -n1 basename \
- | sed 's/.mk$//' \
- | grep -v 'template' \
- | grep -v 'preamble'
- }
-
- function _mm_module_targets
- {
- local module="$1"; shift
-
- mm "${module}" targets \
- | sed 's/ .*$//'
- }
-
- function _mm
- {
- local cur=${COMP_WORDS[COMP_CWORD]}
- COMPREPLY=()
- if [[ $COMP_CWORD -eq 1 ]]; then
- COMPREPLY=( $(compgen -W "$(_mm_modules)" $cur) )
- fi
- if [[ $COMP_CWORD -eq 2 ]]; then
- COMPREPLY=( $(compgen -W "$(_mm_module_targets ${COMP_WORDS[1]})" $cur) )
- fi
- }
-
- complete -F _mm mm
-fi
-
if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
unset JUMP_TARGETS
declare -Ax JUMP_TARGETS