* [Buildroot] rfc: autotools xyz-clean target doesn't remove stamp files
@ 2008-09-03 5:21 Hamish Moffatt
2008-09-03 19:30 ` Thiago A. Corrêa
0 siblings, 1 reply; 3+ messages in thread
From: Hamish Moffatt @ 2008-09-03 5:21 UTC (permalink / raw)
To: buildroot
I noticed that the xyz-clean and xyz-uninstall targets generated by
Makefile.autotools.in don't remove the relevant stamp files. The result
is that if you make xyz-clean, making xyz again doesn't do anything.
I think this is simply a bug and propose the following patch. However
this is the first time I've used Makefile.autotools.in so I ask for
feedback here..
While we're at it, xyz-clean should probably just call xyz-uninstall
first rather than duplicating those lines. And some sort of
post-uninstall (or pre-uninstall) hook is probably relevant in some
scenarios, since we have a post-install hook.
thanks,
Hamish
Index: package/Makefile.autotools.in
===================================================================
--- package/Makefile.autotools.in (revision 6304)
+++ package/Makefile.autotools.in (working copy)
@@ -250,13 +250,18 @@
$(BUILD_DIR)/%/.stamp_cleaned:
$(call MESSAGE,"Cleaning up")
-$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_STAGING_OPT) -C $(@D)/$($(PKG)_SUBDIR)
+ rm -f $(@D)/.stamp_staging_installed
-$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_TARGET_OPT) -C $(@D)/$($(PKG)_SUBDIR)
+ rm -f $(@D)/.stamp_target_installed
-$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_CLEAN_OPT) -C $(@D)/$($(PKG)_SUBDIR)
+ rm -f $(@D)/.stamp_built
$(BUILD_DIR)/%/.stamp_uninstalled:
$(call MESSAGE,"Uninstalling")
$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_STAGING_OPT) -C $(@D)/$($(PKG)_SUBDIR)
+ rm -f $(@D)/.stamp_staging_installed
$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_TARGET_OPT) -C $(@D)/$($(PKG)_SUBDIR)
+ rm -f $(@D)/.stamp_target_installed
$(BUILD_DIR)/%/.stamp_dircleaned:
rm -Rf $(@D)
--
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] rfc: autotools xyz-clean target doesn't remove stamp files
2008-09-03 5:21 [Buildroot] rfc: autotools xyz-clean target doesn't remove stamp files Hamish Moffatt
@ 2008-09-03 19:30 ` Thiago A. Corrêa
2008-09-04 1:05 ` Hamish Moffatt
0 siblings, 1 reply; 3+ messages in thread
From: Thiago A. Corrêa @ 2008-09-03 19:30 UTC (permalink / raw)
To: buildroot
Hi,
I don't really know much about the Makefile.autotools.in but your
patch seams ok to me.
I would only suggest to prepend with - to ignore failed rm's that
would occur if we do make clean to an incomplete build.
Kind Regards,
Thiago A. Correa
On Wed, Sep 3, 2008 at 2:21 AM, Hamish Moffatt <hamish@cloud.net.au> wrote:
> I noticed that the xyz-clean and xyz-uninstall targets generated by
> Makefile.autotools.in don't remove the relevant stamp files. The result
> is that if you make xyz-clean, making xyz again doesn't do anything.
>
> I think this is simply a bug and propose the following patch. However
> this is the first time I've used Makefile.autotools.in so I ask for
> feedback here..
>
> While we're at it, xyz-clean should probably just call xyz-uninstall
> first rather than duplicating those lines. And some sort of
> post-uninstall (or pre-uninstall) hook is probably relevant in some
> scenarios, since we have a post-install hook.
>
> thanks,
> Hamish
>
>
> Index: package/Makefile.autotools.in
> ===================================================================
> --- package/Makefile.autotools.in (revision 6304)
> +++ package/Makefile.autotools.in (working copy)
> @@ -250,13 +250,18 @@
> $(BUILD_DIR)/%/.stamp_cleaned:
> $(call MESSAGE,"Cleaning up")
> -$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_STAGING_OPT) -C $(@D)/$($(PKG)_SUBDIR)
> + rm -f $(@D)/.stamp_staging_installed
> -$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_TARGET_OPT) -C $(@D)/$($(PKG)_SUBDIR)
> + rm -f $(@D)/.stamp_target_installed
> -$($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_CLEAN_OPT) -C $(@D)/$($(PKG)_SUBDIR)
> + rm -f $(@D)/.stamp_built
>
> $(BUILD_DIR)/%/.stamp_uninstalled:
> $(call MESSAGE,"Uninstalling")
> $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_STAGING_OPT) -C $(@D)/$($(PKG)_SUBDIR)
> + rm -f $(@D)/.stamp_staging_installed
> $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_UNINSTALL_TARGET_OPT) -C $(@D)/$($(PKG)_SUBDIR)
> + rm -f $(@D)/.stamp_target_installed
>
> $(BUILD_DIR)/%/.stamp_dircleaned:
> rm -Rf $(@D)
> --
> Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] rfc: autotools xyz-clean target doesn't remove stamp files
2008-09-03 19:30 ` Thiago A. Corrêa
@ 2008-09-04 1:05 ` Hamish Moffatt
0 siblings, 0 replies; 3+ messages in thread
From: Hamish Moffatt @ 2008-09-04 1:05 UTC (permalink / raw)
To: buildroot
On Wed, Sep 03, 2008 at 04:30:58PM -0300, Thiago A. Corr?a wrote:
> Hi,
>
> I don't really know much about the Makefile.autotools.in but your
> patch seams ok to me.
> I would only suggest to prepend with - to ignore failed rm's that
> would occur if we do make clean to an incomplete build.
That's what the "rm -f" is for.
Thanks for your comments. I've committed this as r23312.
Hamish
--
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-04 1:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 5:21 [Buildroot] rfc: autotools xyz-clean target doesn't remove stamp files Hamish Moffatt
2008-09-03 19:30 ` Thiago A. Corrêa
2008-09-04 1:05 ` Hamish Moffatt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox