make clean: improve when no .config present
authorThomas De Schampheleire <patrickdepinguin@gmail.com>
Wed, 2 Oct 2013 20:06:40 +0000 (22:06 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 2 Oct 2013 20:31:24 +0000 (22:31 +0200)
commitbb33517511f5c6e173bfdb0d84bcb6e21240b387
tree2541639ca40d0486ccb1c6f50db78de8481aa2c5
parent1535cb520525bb4d2c4d188d4e99809fef17df64
make clean: improve when no .config present

The 'make clean' recipe is using variables that are not defined without
.config file, causing only a partial cleanup when the .config file is
accidentally deleted.

This patch moves those variables that do not depend on values from .config
outside the BR2_HAVE_DOT_CONFIG check, so that 'make clean' is much more
similar with and without .config.

Since HOST_DIR is determined from BR2_HOST_DIR in .config, the host
directory cannot be cleaned correctly without making assumptions, if no
.config is present.  However, to cover most people's use cases, we assume
the default value of $(BASE_DIR)/host in this specific case.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile