diff --git a/lisp/_prepare.lisp b/lisp/_prepare.lisp index c70b6ad..25878fa 100644 --- a/lisp/_prepare.lisp +++ b/lisp/_prepare.lisp @@ -490,12 +490,6 @@ to actually set up the systems." (let ((path (car (cdr (qob-primary-system-entry))))) (qob-file-name-directory path))) -(defun qob-only-system () - "Return the default system if only one system is loaded in the workspace." - (qob-init-asds) - (when (= (length qob-loaded-asds) 1) - (qob-primary-system-entry))) - (defun qob-find-asd-file (name) "Return the ASD file by system's NAME." (let ((result)) diff --git a/lisp/core/build.lisp b/lisp/core/build.lisp index f1c2a17..776dfe9 100644 --- a/lisp/core/build.lisp +++ b/lisp/core/build.lisp @@ -49,21 +49,21 @@ (qob-start (let* ((systems (qob-args)) (systems-len (length systems)) - (default-name (qob-only-system))) + (primary-system (qob-primary-system-entry))) (cond - ;; If only specified one system. - (default-name - (qob-build--print-header 1) - (qob-build--system-by-name (car default-name)) - (qob-build--print-footer)) - ;; If no system(s) specified. - ((zerop systems-len) - (qob-help "core/build")) - ;; Build system for all specify systems. - (t + ;; If specified system(s). + (systems (qob-build--print-header systems-len) (dolist (name systems) (qob-build--system-by-name name)) - (qob-build--print-footer))))) + (qob-build--print-footer)) + ;; Print primary system. + (primary-system + (qob-build--print-header 1) + (qob-build--system-by-name (car primary-system)) + (qob-build--print-footer)) + ;; Print help. + (t + (qob-help "core/build"))))) ;;; End of lisp/core/build.lisp diff --git a/lisp/core/info.lisp b/lisp/core/info.lisp index ced2d09..444257a 100644 --- a/lisp/core/info.lisp +++ b/lisp/core/info.lisp @@ -54,17 +54,17 @@ (qob-start (let ((names (qob-args)) - (default-system (qob-only-system))) + (primary-system (qob-primary-system-entry))) (cond - ;; If only specified one system. - (default-system - (qob-info--print-system (car default-system))) - ;; If no system(s) specified. - ((zerop (length names)) - (qob-help "core/info")) - ;; Print all systems information. - (t + ;; If specified system(s). + (names (dolist (name names) - (qob-info--print-system name)))))) + (qob-info--print-system name))) + ;; Print primary system. + (primary-system + (qob-info--print-system (car primary-system))) + ;; Print help. + (t + (qob-help "core/info"))))) ;;; End of lisp/core/info.lisp diff --git a/lisp/core/install-deps.lisp b/lisp/core/install-deps.lisp index 3d7c6ac..514b913 100644 --- a/lisp/core/install-deps.lisp +++ b/lisp/core/install-deps.lisp @@ -57,17 +57,17 @@ (qob-start (let ((systems (qob-args)) - (default-name (qob-only-system))) + (primary-system (qob-primary-system-entry))) (cond - ;; If only specified one system. - (default-name - (qob-install-deps--by-system-name (car default-name))) - ;; If no system(s) specified. - ((zerop (length systems)) - (qob-help "core/install-deps")) - ;; Install depedencies for all specify systems. - (t + ;; If specified system(s). + (systems (dolist (system-name systems) - (qob-install-deps--by-system-name system-name)))))) + (qob-install-deps--by-system-name system-name))) + ;; Print primary system. + (primary-system + (qob-install-deps--by-system-name (car primary-system))) + ;; Print help. + (t + (qob-help "core/install-deps"))))) ;;; End of lisp/core/install-deps.lisp