All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] post.mk: Create dependency makefile by makefile rule
@ 2017-03-31 14:49 Nikolaus Schulz
  0 siblings, 0 replies; only message in thread
From: Nikolaus Schulz @ 2017-03-31 14:49 UTC (permalink / raw)
  To: linux-tegra-u79uwXL29TY76Z2rM5mHXA; +Cc: Nikolaus Schulz

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-31 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 14:49 [PATCH] post.mk: Create dependency makefile by makefile rule Nikolaus Schulz

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.