From 9d419e77a0621ddf8398edecb40ddedc3388dc42 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 5 Oct 2023 22:49:19 +0100 Subject: handle/make/*: unified main() function Signed-off-by: Leah Rowe --- script/handle/make/config | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'script/handle/make/config') diff --git a/script/handle/make/config b/script/handle/make/config index 9d028a85..694119c4 100755 --- a/script/handle/make/config +++ b/script/handle/make/config @@ -9,6 +9,7 @@ set -u -e . "include/err.sh" . "include/option.sh" +. "include/make.sh" read projectname < projectname read our_version < version @@ -20,26 +21,7 @@ eval "$(setvars "" arch cfgsdir codedir config config_name crossgcc_ada mode \ tmpclean="$(mktemp -d -t makeclean.XXXXXXXXXX)" -main() -{ - while getopts b:m:u:c:x: option - do - case "${1}" in - -b) mode="all" ;; - -u) mode="oldconfig" ;; - -m) mode="menuconfig" ;; - -c) mode="distclean" ;; - -x) mode="crossgcc-clean" ;; - *) fail "Invalid option" ;; - esac - shift; project="${OPTARG}"; shift - done - [ -z "${mode}" ] && fail "mode not given (-m, -u, -b, -c or -x)" - [ -z "${project}" ] && fail "project name not specified" - - handle_dependencies $@ - handle_targets -} +# main() is in include/make.sh handle_dependencies() { -- cgit v1.2.1