build: fix that defaultenv is always rebuilt
From fcffd01 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>
1 parent 8968940 commit 105201e0013d4bdaed17778f6b114eea77648b59
@Sam Ravnborg Sam Ravnborg authored on 26 Dec 2017
Sascha Hauer committed on 5 Jan 2018
Showing 1 changed file
View
defaultenv/Makefile