[Buildroot] [PATCH] Makefile: improve $(TARGET_DIR) (re)creation
Bjørn Forsman
bjorn.forsman at gmail.com
Thu Feb 17 23:04:19 UTC 2011
On 17 February 2011 08:40, Daniel Nyström
<daniel.nystrom at timeterminal.se> wrote:
> 2011/2/16 Bjørn Forsman <bjorn.forsman at gmail.com>:
>>
>> rm output/build/*/.stamp*
>>
>> (works for packages using the auto/generic/cmake infrastructure)
>>
>> or `make package-uninstall package` to rebuild a single package.
>
> Doing so, you can do "make clean" as well, since every package will be
> reextracted and patched and rebuilt. Or am I missing something?
I think "make clean" does more than you'd like in that situation. Here
is what it does:
clean:
rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
$(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR) $(BASE_DIR)/staging \
$(TOOLCHAIN_EXTERNAL_DIR)
It takes *everything* except the config and download dir.
> I guess rm build/*/.stamp_{built,{staging,target}_installed} would be
> what I'm after, but giving your first patch a second look, I notice
> you already got rm .stamp_target_installed which should be enough for
> recreating the target dir (which was your original intention).
>
> I also looks like any package version bumps would be handled correctly
> on target recreation, which will probably solve most scenarios.
>
> My vote is to apply your patch (when you consider it complete) and if
> there will still be any case not covered by it, we just deal with that
> later on.
>
> Thanks alot for looking into this by the way!
I'm just scratching my own itch :-) Glad you like it.
Patch v2 coming soon.
Best regards,
Bjørn Forsman
More information about the buildroot
mailing list