summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2017-12-26 19:35:30 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-05 15:55:47 +0100
commit105201e0013d4bdaed17778f6b114eea77648b59 (patch)
tree40259fe9a3387d3c321570ce6c71d19849754459 /defaultenv
parent896894088e7de081caddb5fc8dc653bc0f5ac7bb (diff)
downloadbarebox-105201e0013d4bdaed17778f6b114eea77648b59.tar.gz
build: fix that defaultenv is always rebuilt
From fcffd0176b3394cc664d9bf5b31b053253323bfb Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Tue, 26 Dec 2017 16:47:16 +0100 Subject: [PATCH 1/4] build: fix that defaultenv is always rebuilt Using following pattern: target: prerequisite FORCE $(call cmd,foo) is almost always wrong. Due to FORCE target will be rebuilt using cmd_foo no mater the timestamps. The following pattern: target: prerequisite FORCE $(call if_changed,foo) Will call cmd_foo only if: - target is not updated - or command to built target has changed But to make this work target must be added to the list af targets built. This can be done by assigning target to extra-y or targets. Use the latter pattern for defaultenv to avoid rebuilding the environmentt for each build. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/defaultenv/Makefile b/defaultenv/Makefile
index 33e0ece..f313b04 100644
--- a/defaultenv/Makefile
+++ b/defaultenv/Makefile
@@ -14,7 +14,7 @@ quiet_cmd_env_default = ENV $@
cmd_env_default = ($(srctree)/scripts/genenv $(srctree) $(objtree) $@ $(CONFIG_DEFAULT_ENVIRONMENT_PATH))
$(obj)/barebox_default_env: FORCE
- $(call cmd,env_default)
+ $(call if_changed,env_default)
quiet_cmd_env_h = ENVH $@
cmd_env_h = cat $< | (cd $(obj) && $(objtree)/scripts/bin2c "__aligned(4) default_environment") > $@; \
@@ -27,4 +27,4 @@ quiet_cmd_env_zero = ENVZ $@
cmd_env_zero = ($(objtree)/scripts/bareboxenv -z $(CONFIG_DEFAULT_ENVIRONMENT_PATH) $@)
$(obj)/barebox_zero_env: FORCE
- $(call cmd,env_zero)
+ $(call if_changed,env_zero)