[Buildroot] [PATCH] core: do not remove dl/ directory on distclean

Peter Korsgaard peter at korsgaard.com
Mon Jul 11 20:03:42 UTC 2016


>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:

 > Baruch, All,
 > On 2016-07-11 06:26 +0300, Baruch Siach spake thusly:
 >> On Sun, Jul 10, 2016 at 11:55:49PM +0200, Yann E. MORIN wrote:
 >> > Currently, if the dl/ directory is the default location, it is removed
 >> > on distclean.
 >> > 
 >> > However, the dl/ directory is a precious location: it contains all the
 >> > tarballs downloaded so far, and some can be relatively huge, taking some
 >> > previous time to re-download, especially on slowish links.
 >> > 
 >> > Don't remove it on distclean. If the user really needs to regain some
 >> > space, leave it to him to clean this directory up manually.
 >> 
 >> Current Makefile help text for 'distclean' says:
 >> 
 >> delete all non-source files (including .config)
 >> 
 >> Not deleting the dl/ directory is not consistent with this description, IMO.

 > Well, I do understand it the other way: non-source files are deleted,
 > but source files are not deleted.

 > And I would argue that the content of dl/ *are* source files. If
 > anything, they are the archetype of source files.

 > Ergo, distclean should not remove them.

Sorry, I agree with Baruch. Distclean should leave the directory
structure like it was when the buildroot tarball was extracted (or git
cloned)

E.G. the GNU standard make targets state:

https://www.gnu.org/prep/standards/standards.html#Standard-Targets

‘distclean’

Delete all files in the current directory (or created by this makefile)
that are created by configuring or building the program. If you have
unpacked the source and built the program without creating any other
files, ‘make distclean’ should leave only the files that were in the
distribution. However, there is no need to delete parent directories
that were created with ‘mkdir -p’, since they could have existed anyway.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list