From: Leandro Lucarella Date: Mon, 21 Sep 2009 22:08:21 +0000 (-0300) Subject: Don't add extra spaces in abbr function X-Git-Url: https://git.llucax.com/software/makeit.git/commitdiff_plain/ff1b972e1c2a4ca61cb1fa2fc8e7d9205316c698 Don't add extra spaces in abbr function In some situations an extra leading space is added when using the abbr function. This patch fixes that. --- diff --git a/Lib.mak b/Lib.mak index bddc5e1..58b804f 100644 --- a/Lib.mak +++ b/Lib.mak @@ -110,8 +110,8 @@ find_files = $(patsubst $(if $3,$3,$C)/%$1,$(if $2,$2,$(if $3,$3,$C))/%$1, \ # directory, so it can be displayed as if it were a relative directory. Take # just one argument, the file name. abbr_helper = $(subst $T,.,$(patsubst $T/%,%,$1)) -abbr = $(if $(call eq,$(call abbr_helper,$1),$1),$1, \ - $(addprefix $(shell echo $R | sed 's|/\?\([^/]\+\)/\?|../|g'),\ +abbr = $(if $(call eq,$(call abbr_helper,$1),$1),$1,$(addprefix \ + $(shell echo $R | sed 's|/\?\([^/]\+\)/\?|../|g'),\ $(call abbr_helper,$1))) # Execute a command printing a nice message if $V is @.