[Buildroot] make clean behavior

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Tue Aug 27 08:19:02 UTC 2013


Hi,

Is it intentional that 'make clean' is different depending on having a
.config file?

With .config there is a full clean:

rm -rf buildroot/output/host/usr/powerpc-buildroot-linux-gnu/sysroot
buildroot/output/target buildroot/output/images buildroot/output/host
buildroot/output/stamps buildroot/output/build
buildroot/output/toolchain buildroot/output/staging
buildroot/output/legal-info


but if you remove .config (and thus symbol BR2_HAVE_DOT_CONFIG) you
only have a partial clean:

rm -rf /repo/tdescham/reborn/buildroot-ppc/output/build
/repo/tdescham/reborn/buildroot-ppc/output/staging


Suppose you accidentally removed your .config, then you cannot easily
get a clean buildroot env anymore. The behavior is caused due to the
definition of variables like TARGET_DIR being inside a 'ifeq
($(BR2_HAVE_DOT_CONFIG),y)' statement.

I would propose to make sure that 'clean' works in all cases, by
moving the relevant variable definitions outside this if statement.

Best regards,
Thomas


More information about the buildroot mailing list