Bug 12276 - make clean/distclean does not remove BR2_DL_DIR and BR2_HOST_DIR
Summary: make clean/distclean does not remove BR2_DL_DIR and BR2_HOST_DIR
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2019.08.1
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-23 16:50 UTC by Max
Modified: 2019-10-23 20:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max 2019-10-23 16:50:48 UTC
If the buildroot configuration has a custom BR2_DL_DIR and/or BR2_HOST_DIR (in my case it points to a path outside of the buildroot tree), then the 'make clean' and 'make distclean' commands do not remove the content of these directories.

Is it a bug or normal behaviour that custom download and host directories are excluded from the cleanup?
Comment 1 Thomas Petazzoni 2019-10-23 20:47:24 UTC
For BR2_DL_DIR, this is clearly an intended behavior.

However, for BR2_HOST_DIR, it does remove it properly. See:

$ grep ^BR2_HOST_DIR .config
BR2_HOST_DIR="/tmp/foobar-host"

$ ls /tmp/foobar-host/
arm-buildroot-linux-uclibcgnueabi  bin  etc  include  lib  lib64  opt  share  usr

$ make clean
rm -rf /home/thomas/projets/buildroot/output/target /home/thomas/projets/buildroot/output/images /tmp/foobar-host /home/thomas/projets/buildroot/output/host \
	/home/thomas/projets/buildroot/output/build /home/thomas/projets/buildroot/output/staging \
	/home/thomas/projets/buildroot/output/legal-info /home/thomas/projets/buildroot/output/graphs

$ ls /tmp/foobar-host/
ls: cannot access '/tmp/foobar-host/': No such file or directory

I used "make clean", but "make distclean" implies "make clean".

So I think it all works as intended.