Makefile: properly create $(HOST_DIR)/usr compatibility symlink
authorArnout Vandecappelle <arnout@mind.be>
Sun, 9 Jul 2017 23:21:17 +0000 (01:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 10 Jul 2017 15:45:57 +0000 (17:45 +0200)
commitce58db7232900a063a543abd2699b6120d9fbbf3
tree97a244637aa8a69374829838eb276fc7d6105ada
parent00d73749e2a2c4abb4eff44bfa10dc6cd109a67d
Makefile: properly create $(HOST_DIR)/usr compatibility symlink

Up to now we created the $(HOST_DIR)/usr compatibility symlink as part
of the creation of $(HOST_DIR) itself. However, when the user specifies
a custom BR2_HOST_DIR, it is possible that the directory already exists
so this rule will never trigger.

Therefore, add an explicit rule for creating $(HOST_DIR)/usr and add
this rule to the dependencies of the dirs target. HOST_DIR itself goes
back to the standard rule for directories. The order-only dependency of
STAGING_DIR isn't needed any more either: HOST_DIR is implicitly
created if needed by mkdir -p, and we don't need to trigger the
HOST_DIR rule any more if the directory already exists.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile