Re: [PATCH] include/buildrules: substitute ".o" for ".lo" only at the very end

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

 



On 2/12/21 2:48 PM, Markus Mayer wrote:
> To prevent issues when the ".o" extension appears in a directory path,
> ensure that the ".o" -> ".lo" substitution is only performed for the
> final file extension.
> 
> Signed-off-by: Markus Mayer <mmayer@xxxxxxxxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
> 
> I ran into a build issue with our setup due to the original regex below.
> It was mangling the path to header files by substituting ".o" with ".lo"
> one too many times.
> 
> This patch resolves the issue. Also, it seems like the right thing to do
> to limit substitutions to the final file extension in a path.
> 
>  include/buildrules | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/buildrules b/include/buildrules
> index 7a139ff07de8..357e0a18504f 100644
> --- a/include/buildrules
> +++ b/include/buildrules
> @@ -133,7 +133,7 @@ rmltdep:
>  	$(Q)rm -f .ltdep
>  
>  .ltdep: $(CFILES) $(HFILES)
> -	$(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,' > .ltdep
> +	$(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o$$,\1.lo,' > .ltdep
>  
>  depend: rmdep .dep
>  
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux