Makefile: move definition of TARGET_DIR inside .config condition
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 28 Dec 2018 10:43:29 +0000 (11:43 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 17 Jan 2019 21:38:52 +0000 (22:38 +0100)
commita86b626b5b0e3416f2b84c666adf9cb2d00e6596
tree1a2bd73fe4cb7cbc99c2418b02d1547f78a38e44
parentb1e294cc15e42929b87c2ac184d368df66a701d1
Makefile: move definition of TARGET_DIR inside .config condition

In a follow-up commit introducing per-package directory support, we
will need to define TARGET_DIR in a different way depending on the
value of a Config.in option. To make this possible, the definition of
TARGET_DIR should be moved inside the BR2_HAVE_DOT_CONFIG condition.

We have verified that $(TARGET_DIR) is only used within the
BR2_HAVE_DOT_CONFIG condition. Outside of this condition, such as in
the "clean" target, $(BASE_TARGET_DIR) is used.

Suggested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile