ARM: i.MX: rebuild .imximg if DCD table in .imxcfg changes
So far changing the DCD table didn't trigger a rerun of the i.MX
image utility. To fix this, we need to have the DCD table as prerequisite
to the .imximg rule. The file name is contained in $(CFG_$(@F)), but
can't be used directly because $@ (and by extension @F) has no value
when first expanded in the read-in phase. If we expand a second time
during the target-update phase however, we would get the correct value.

GNU make provides .SECONDEXPANSION to expand all following prerequisites
a second time. Use it to have changes to the DCD table rebuild the
image.

Because we are now using imx_image_rule to generate the target, we must
escape each $ one more time to arrive at $$$$(CFG_$$$$(@F)).

In the final step, we replace $$$$(@F) with %.imximg, so we support the
rules not ending in .imximg as well.

Dependency file generation is still broken however and changed to headers
included in DCD tables won't be caught, but this functionality can be
fixed in a separate patch.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent beec045 commit 09ac94a036e8caea648771798890c25f67d8df3c
@Ahmad Fatoum Ahmad Fatoum authored on 9 Dec 2019
Sascha Hauer committed on 11 Dec 2019
Showing 1 changed file
View
images/Makefile.imx