Re: [PATCH v3 2/4] Makefile: add ability to append to CFLAGS and LDFLAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> Another way to do this is just:
>
> diff --git a/Makefile b/Makefile
> index 2f5f16847a..9cd3b252ff 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1446,8 +1446,8 @@ ALL_COMMANDS_TO_INSTALL += git-upload-archive$(X)
>  ALL_COMMANDS_TO_INSTALL += git-upload-pack$(X)
>  endif
>  
> -ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS)
> -ALL_LDFLAGS = $(LDFLAGS)
> +ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_APPEND)
> +ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)

Much nicer.

> I can't think offhand of any way that your override would not do the
> right thing, but:
>
>  - this is roughly the same problem faced by DEVELOPER_CFLAGS, etc, so
>    handling it in the same way makes sense to me
>
>  - I always get nervous around make features like "override", as there
>    are sometimes corner cases lurking
>
> -Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux