From: Junio C Hamano Date: Fri, 18 Nov 2011 06:12:54 GMT Subject: Re: [PATCH] Makefile: add option to disable automatic dependency generation Message-ID: <7vty62klg9.fsf@alter.siamese.dyndns.org> In-Reply-To: <20111118045742.GA25145@elie.hsd1.il.comcast.net> Jonathan Nieder writes: > Duy noticed that now that the COMPUTE_HEADER_DEPENDENCIES feature is > turned on automatically for compilers that support it (see > v1.7.8-rc0~142^2~1, 2011-08-18), there is no easy way to force it off. > For example, setting COMPUTE_HEADER_DEPENDENCIES to the empty string > in config.mak just tells the makefile to treat it as undefined and > run a test command to see if the -MMD option is supported. > > Introduce a new NO_COMPUTE_HEADER_DEPENDENCIES variable that forces > the feature off. Eek. At least at the end user UI level, couldn't we do this as a tristate? E.g. "YesPlease" (or anything that begins with Y if you are ambitious) to explicitly enable, empty (or "auto") to autodetect, and anything else to decline? Even better, couldn't we either (1) rearrange .dep/ files somehow, so that compiler difference does not matter, or (2) have dep_check to perform a trial run to detect versions of compilers that produce the output that we cannot use?