chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Small improvement in Make's handling of va


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Small improvement in Make's handling of variables, and a question about other common variables
Date: Fri, 13 Jun 2014 19:57:58 +0200
User-agent: Mutt/1.4.2.3i

On Thu, Jun 12, 2014 at 09:56:50PM +0200, Peter Bex wrote:
> But, like I said, it will probably break a shitload of scripts and
> programs.  To remedy that we can let C_COMPILER / C_COMPILER_OPTIONS
> inherit from CC / CFLAGS by using "?=" judiciously:
> 
> ######################################################################################################
> # Optionally start with this:
> ifneq ($(origin C_COMPILER)$(origin C_COMPILER_OPTIONS),undefinedundefined)
> $(warning $$(C_COMPILER) and $$(C_COMPILER_OPTIONS) are obsolete; use $$(CC) 
> and $$(CFLAGS) instead)
> endif
> 
> C_COMPILER?=$(CC)
> C_COMPILER_OPTIONS?=$(CFLAGS)
> 
> # and keep, unchanged:
> TARGET_C_COMPILER ?= $(C_COMPILER)
> ######################################################################################################
> 
> This will allow us to gradually phase out C_COMPILER; we obsolete it
> first, then after 4.10.0, maybe change $(warning) to $(error) and
> finally remove it in 4.11.0.  This means it won't immediately break
> existing scripts or configs which override C_COMPILER.

I realised we can obsolete INCDIR and TOPMANDIR (and, to a lesser extent,
MANDIR) like this as well.

Attached is a modified version of my earlier patch with a deprecation
warning added.  If both TOPMANDIR and MANDIR are defined, I decided to
cause a hard error because of the ambiguity.  If only MANDIR is defined,
we strictly can't tell whether that's a "new style" MANDIR or an old one,
unfortunately.

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-Make-the-handling-of-variables-for-directory-prefixe.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]