All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolaus Schulz <nikolaus.schulz-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Nikolaus Schulz
	<nikolaus.schulz-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
Subject: [PATCH] post.mk: Create dependency makefile by makefile rule
Date: Fri, 31 Mar 2017 16:49:54 +0200	[thread overview]
Message-ID: <20170331144954.14269-1-nikolaus.schulz@avionic-design.de> (raw)

Creating the emmc image requires creating the bct file and the
bootloader image first.  These dependencies are written to a makefile
snippet that is created by the gen-image-deps.sh script.  But that
script is only invoked when the rule that creates the emmc image is run,
which is too late for creating the dependencies makefile.

Add a rule to post.mk that tells make how to create the dependencies
makefile; with that in place, make automatically makes the dependency
makefile before executing any other rules.

Signed-off-by: Nikolaus Schulz <nikolaus.schulz-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
 build/post.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/build/post.mk b/build/post.mk
index 0e1c766..37550bd 100644
--- a/build/post.mk
+++ b/build/post.mk
@@ -21,13 +21,14 @@ bcts: $(bcts)
 images: $(images)
 
 image_deps := $(addprefix .,$(addsuffix .d,$(images)))
+$(image_deps): .%.d : %.cfg
+	../../../build/gen-image-deps.sh $< $(@:.%.d=%) $@
 -include $(image_deps)
 
 %.bct: %.bct.cfg
 	cbootimage -gbct -$(soc) $< $@
 
 %.img: %.img.cfg
-	../../../build/gen-image-deps.sh $< $@ .$@.d
 	cbootimage -$(soc) $< $@
 
 %.simg: %.img $(skb)
-- 
2.1.4

                 reply	other threads:[~2017-03-31 14:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20170331144954.14269-1-nikolaus.schulz@avionic-design.de \
    --to=nikolaus.schulz-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.