John smith
John smith

Reputation: 170

How to specify buildroot build process variable to be called on make <package>-dirclean

Is there anyway I can just call into a define such as LIBFOO_DIRCLEAN, and just do what was implemented in the define?

Inside HOST_LIBFOO_INSTALL_CMDS, I copy files to the target directory, and would like the 'make package-dirclean' to delete what was copied into the target directory. 'make clean', would obviously do this(any many more), but that is much more than I want to do.

I see the following buildroot variables. LIBFOO_EXTRACT_CMDS, LIBFOO_CONFIGURE_CMDS, LIBFOO_BUILD_CMDS, HOST_LIBFOO_INSTALL_CMDS, LIBFOO_INSTALL_TARGET_CMDS, etc.

Upvotes: 0

Views: 398

Answers (1)

Luca Ceresoli
Luca Ceresoli

Reputation: 1661

make foo-dirclean is a simple tool that just deletes the package build directory. In most cases, when the list of files installed by a package does not change over time (only files content changes) you can simply rebuild the package and the target directory will be rebuilt correctly.

If you want you can implement your own foo-myclean step that implements your own logic. However you must understand deleting files in the target directory is not supported by Buildroot and thus you are on your own.

Upvotes: 2

Related Questions