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 1/3] images: i.MX: rearrange image rules in preparation for boilerplate removal
Date: Wed,  4 Dec 2019 17:01:58 +0100	[thread overview]
Message-ID: <20191204160200.4920-1-a.fatoum@pengutronix.de> (raw)

The following commit will introduce a variable define to remove the
duplication in the different [supe]*imximg rules.

Prepare for this by rearranging the command line flags to line up with
the letters in the extension (i.e. -e -s for esimximg instead of -s -e)
and by splitting off a multi-target rule into two.

The former improves readability when the define is introduced, as it is
then easy to see the correspondence between extension and arguments.

The latter is needed because we will call the variable for each target.

No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 images/Makefile.imx | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/images/Makefile.imx b/images/Makefile.imx
index 6572474e19c8..53d4ac8202c5 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -31,17 +31,20 @@ $(obj)/%.pimximg: $(obj)/% FORCE
 	-p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<)))
 
 $(obj)/%.psimximg: $(obj)/% FORCE
-	$(call if_changed,imx_image,$(CFG_$(patsubst %.psimximg,%.imximg,$(@F))),-s \
-	-p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<)))
+	$(call if_changed,imx_image,$(CFG_$(patsubst %.psimximg,%.imximg,$(@F))),\
+	-p $($(patsubst $(obj)/%.pblb,PBL_MEMORY_SIZE_%,$<)) -s)
 
 $(obj)/%.simximg: $(obj)/% FORCE
 	$(call if_changed,imx_image,$(CFG_$(patsubst %.simximg,%.imximg,$(@F))),-s)
 
 $(obj)/%.usimximg: $(obj)/% FORCE
-	$(call if_changed,imx_image,$(CFG_$(patsubst %.usimximg,%.imximg,$(@F))),-s -u)
+	$(call if_changed,imx_image,$(CFG_$(patsubst %.usimximg,%.imximg,$(@F))),-u -s)
+
+$(obj)/%.esimximg: $(obj)/% FORCE
+	$(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-e -s)
 
-$(obj)/%.esimximg $(obj)/%.esimximg.dek: $(obj)/% FORCE
-	$(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-s -e)
+$(obj)/%.esimximg.dek: $(obj)/% FORCE
+	$(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-e -s)
 
 .SECONDEXPANSION:
 $(obj)/%.img.dek: $(obj)/$$(FILE_$$(@F))
-- 
2.24.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-12-04 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 16:01 Ahmad Fatoum [this message]
2019-12-04 16:01 ` [PATCH 2/3] ARM: i.MX: introduce imx_image_rule variable for code deduplication Ahmad Fatoum
2019-12-09 13:31   ` Sascha Hauer
2019-12-09 13:32     ` Ahmad Fatoum
2019-12-04 16:02 ` [PATCH 3/3] ARM: i.MX: rebuild .imximg if DCD table in .imxcfg changes Ahmad Fatoum
2019-12-09  9:24 ` [PATCH 1/3] images: i.MX: rearrange image rules in preparation for boilerplate removal 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=20191204160200.4920-1-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