diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-20 09:45:32 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-27 09:20:20 +0100 |
commit | 0293f7489686b9838185a38f2eb0125a9a95f5e0 (patch) | |
tree | aaaccd2c67b64beb4d6abd4fa8f47f774b459286 /scripts | |
parent | 9d9b87ef9c4bfbd56a49f1f0e7be212718d6d289 (diff) | |
download | barebox-0293f7489686b9838185a38f2eb0125a9a95f5e0.tar.gz barebox-0293f7489686b9838185a38f2eb0125a9a95f5e0.tar.xz |
defaultenv: Fix dependencies
The defaultenv should be rebuilt once a file in it has changed.
the genenv script always generates the environment file to a temporary
file. Only if it has changed to the last target file the temporary file
is moved over the target file. This means we always have to call genenv,
thus replace "if_changed" with "cmd".
With this dependencies are correctly tracked. New or changed files
result in new image builds whereas unchanged environments do not
unnecessarily result in new images.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.lib | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7b8643bf57..f5dcec4dcb 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -324,8 +324,10 @@ $(obj)/%.bbenv$(DEFAULT_COMPRESSION_SUFFIX).S: $(src)/%.bbenv$(DEFAULT_COMPRESSI quiet_cmd_env = ENV $@ cmd_env=$(srctree)/scripts/genenv $(srctree) $(objtree) $@ $< +# genenv is always called, but only generates output when the file actually +# changes, so that the dependent targets are not unnecessarily rebuilt %.bbenv$(DEFAULT_COMPRESSION_SUFFIX): % FORCE - $(call if_changed,env) + $(call cmd,env) # Bzip2 # --------------------------------------------------------------------------- |