mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/5] MAKEALL: don't build all configs wen defconfigs given
Date: Thu, 22 Aug 2024 13:57:28 +0200	[thread overview]
Message-ID: <20240822115730.1184500-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240822115730.1184500-1-a.fatoum@pengutronix.de>

We currently build all defconfigs when no architecture was specified,
which leads to surprising behavior, e.g.

  ./MAKEALL some_defconfig

will start building for all architectures and ignore the argument
completely. Improve upon this by calling do_build_all only if
there are no positional arguments.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 MAKEALL | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index df318c6d123c..68ebe6ef98a3 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -281,20 +281,20 @@ then
 	REGEX="*"
 fi
 
-if [ ! "${ARCH}" ] || [ ! -d arch/${ARCH} ]
-then
-	do_build_all
-	if [ $? -eq 0 ]
-	then
-		echo "You need to specify the ARCH or CROSS_COMPILE_<arch> or CROSS_COMPILE_<target> in your config file"
-		usage
-		exit 1
-	fi
-	exit 0
-fi
-
 if [ $# -eq 0 ]
 then
+	if [ ! "${ARCH}" ] || [ ! -d arch/${ARCH} ]
+	then
+		do_build_all
+		if [ $? -eq 0 ]
+		then
+			echo "You need to specify the ARCH or CROSS_COMPILE_<arch> or CROSS_COMPILE_<target> in your config file"
+			usage
+			exit 1
+		fi
+		exit 0
+	fi
+
 	do_build ${ARCH} "${REGEX}"
 else
 	for i in $*; do
-- 
2.39.2




  parent reply	other threads:[~2024-08-22 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 11:57 [PATCH 1/5] test: conftest.py: move top-level Ahmad Fatoum
2024-08-22 11:57 ` [PATCH 2/5] MAKEALL: return error code from do_build_target Ahmad Fatoum
2024-08-22 11:57 ` Ahmad Fatoum [this message]
2024-08-22 11:57 ` [PATCH 4/5] MAKEALL: add support for running pytest after build Ahmad Fatoum
2024-08-22 11:57 ` [PATCH 5/5] Documentation: board: emulated: rewrite to use MAKEALL/pytest directly Ahmad Fatoum
2024-08-23  8:04 ` [PATCH 1/5] test: conftest.py: move top-level Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240822115730.1184500-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox