diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-17 17:47:38 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-18 10:42:07 +0100 |
commit | 658af1caf30d8bf88508a03dad2c411fb039b661 (patch) | |
tree | 937d55aaeb935325d60d611025a8931dc3c17a01 /common/Makefile | |
parent | 72230bad19b2ec14e9b8e46d7abf9da04208a41f (diff) | |
download | barebox-658af1caf30d8bf88508a03dad2c411fb039b661.tar.gz barebox-658af1caf30d8bf88508a03dad2c411fb039b661.tar.xz |
defaultenv: simplify env dependencies
Finding out whether to rebuild the environment is a difficult task
since we have to track all files in a directory. Instead of trying
this, just rebuild the environment during every build and only if
it differs to the last one overwrite the target. This way make
only sees a change when the environment is changed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/Makefile')
-rw-r--r-- | common/Makefile | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/common/Makefile b/common/Makefile index ce34d9884a..0429336bfe 100644 --- a/common/Makefile +++ b/common/Makefile @@ -65,23 +65,16 @@ ifneq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"") DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH) endif -ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f ; done) - endif # ifdef CONFIG_DEFAULT_ENVIRONMENT # # Generate a barebox envfs image. # -# echo $(ENV_FILES) > /dev/null is just for letting if_changed -# recognize that something has changed when the environment has -# other files, -# -quiet_cmd_env = ENV $@ -cmd_env = ($(srctree)/scripts/genenv $(srctree) $(objtree) $@ $(DEFAULT_ENVIRONMENT_PATH)) || \ - (echo $(ENV_FILES) > /dev/null; rm -f $@ ; false) +quiet_cmd_envs = ENV $@ +cmd_envs = ($(srctree)/scripts/genenv $(srctree) $(objtree) $@ $(DEFAULT_ENVIRONMENT_PATH)) -$(obj)/barebox_default_env: $(ENV_FILES) FORCE - $(call if_changed,env) +$(obj)/barebox_default_env: FORCE + $(call cmd,envs) barebox_default_env_comp = ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_COMPRESSED_GZIP),y) |