RFR: JDK-8077814: Add .DELETE_ON_ERROR to makefiles
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Wed Apr 15 11:33:59 UTC 2015
On 2015-04-15 11:41, Erik Joelsson wrote:
> Please review this small change which will improve incremental build
> reliability. By defining the pseudo target .DELETE_ON_ERROR, make will
> automatically remove the target of a rule if the recipe fails or is
> interrupted (typically ctrl-c). By doing this, the target is
> automatically rebuilt on the next make invocation instead of left in a
> possibly broken state.
>
> I was under the impression that this functionality was already active
> in make, but it appears we have to actively enable it. I chose to put
> it at the top of make/common/MakeBase.gmk as we tend to include that
> file everywhere. The alternative would be spec.gmk.in, but I think we
> should try to keep that file for communication from configure to make.
Looks good to me.
/Magnus
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8077814
> Patch:
> diff -r d0321d15e0a0 make/common/MakeBase.gmk
> --- a/make/common/MakeBase.gmk
> +++ b/make/common/MakeBase.gmk
> @@ -36,6 +36,10 @@
> $(error MakeBase.gmk needs SPEC set to a proper spec.gmk)
> endif
>
> +# By defining this pseudo target, make will automatically remove targets
> +# if their recipe fails so that a rebuild is automatically triggered
> on the
> +# next make invocation.
> +.DELETE_ON_ERROR:
>
> ##############################
> # Functions
>
> /Erik
More information about the build-dev
mailing list