[Buildroot] [PATCH] Avoid make distclean to remove packages fromrootfs

Hamish Moffatt hamish at cloud.net.au
Tue Oct 28 01:04:42 UTC 2008


On Mon, Oct 27, 2008 at 10:11:12PM +0100, Roberto A. Foglietta wrote:
> clean remove a lot of things not only the stamps
> 
> clean: $(TARGETS_CLEAN)
> 	rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE)
> $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps
> 
> a) you want reinstall things in root because they have been corrupted
> without loosing your customization on scripts/configurations:

You shouldn't edit anything in $(TARGET_DIR) yourself - edit the
source, then rebuild.

However, there does need to be a way to copy the target_skeleton over
the root directory again in case you've edited files (startup scripts,
passwd file, fstab etc). And you might not want to copy this over an
existing $(TARGET_DIR), because then you might lose changes made
by packages.

I didn't understand your softclean and rootclean targets though. Here's
what I have added to my own tree:

root-clean:
	rm -rf $(PROJECT_BUILD_DIR)/.root $(PROJECT_BUILD_DIR)/autotools-stamps $(TARGET_DIR)


Hamish
-- 
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>



More information about the buildroot mailing list