xfs
[Top] [All Lists]

Re: [PATCH 01/32] xfsprogs: fix automatic dependency generation

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 01/32] xfsprogs: fix automatic dependency generation
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 08 Oct 2013 18:00:54 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1380510944-8571-2-git-send-email-david@xxxxxxxxxxxxx>
References: <1380510944-8571-1-git-send-email-david@xxxxxxxxxxxxx> <1380510944-8571-2-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
On 9/29/13 10:15 PM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Adding are removing a header file does not result in dependency

s/are/or/

> regeneration like it should. make clean will rebuild the
> dependencies, but a normal make won't. Fix it.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  include/buildrules | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/include/buildrules b/include/buildrules
> index 49cb2a4..edb1beb 100644
> --- a/include/buildrules
> +++ b/include/buildrules
> @@ -79,18 +79,30 @@ endif # _BUILDRULES_INCLUDED_
>  $(_FORCE):
>  
>  # dependency build is automatic, relies on gcc -MM to generate.
> +#
> +# This is a bit messy. It regenerates the depenencies on each build so

dependencies


I'm no make guru but seems relatively harmless. ;)

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> +# that we catch files being added and removed. There are other ways of doing
> +# this (e.g. per-file dependency files) but that requires more in-depth 
> changes
> +# to the build system. Compile time is not an issue for us, so the
> +# rebuild on every make invocation isn't a problem we need to care about. 
> Just
> +# do it silently so it doesn't make the build unnecessarily noisy.
> +
>  .PHONY : depend ltdepend install-qa
>  
>  MAKEDEP := $(MAKEDEPEND) $(CFLAGS)
>  
> -ltdepend: .ltdep
> +ltdepend: rmltdep .ltdep
> +
> +rmltdep:
> +     @rm -f .ltdep
>  
>  .ltdep: $(CFILES) $(HFILES)
> -     @echo "    [LTDEP]"
>       $(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .ltdep
>  
> -depend: .dep
> +depend: rmdep .dep
> +
> +rmdep:
> +     @rm -f .dep
>  
>  .dep: $(CFILES) $(HFILES)
> -     @echo "    [DEP]"
>       $(Q)$(MAKEDEP) $(CFILES) > .dep
> 

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 01/32] xfsprogs: fix automatic dependency generation, Eric Sandeen <=