On Sat, Mar 4, 2017 at 11:03 PM, Juan Manuel Guerrero <juan.guerr...@gmx.de> wrote: > I do not known if this has already been reported, but the prepending of > $(srcdir)/src to the PATH in cfg.mk makes it impossible to build grep on > all OS where the path separator is different from colon. I would suggest > to use PATH_SEPARATOR instead of hard coding the UNIX path separator making > the implicit assumption that this will DTRT for all other OS too. The > current implementation ruins the syntax of the PATH because of mixed path > separator characters and inhibits make to find any program at all. > Please see patch below.
Thank you. I've applied the attached in your name. I also fixed a minor problem s/srcdir/builddir/ and a nit in that same line in a second patch, also attached.
From 70032889a81f2dd391e5053dadb9b697e94107b6 Mon Sep 17 00:00:00 2001 From: Juan Manuel Guerrero <juan.guerr...@gmx.de> Date: Sun, 5 Mar 2017 08:58:36 -0800 Subject: [PATCH 1/2] build: use $(PATH_SEPARATOR), not ":" to augment PATH * cfg.mk (PATH): Use $(PATH_SEPARATOR), for those systems that use something other than ":". * THANKS.in: Remove name, to avoid syntax-check failure due to the duplicate, now that there is this commit. --- THANKS.in | 1 - cfg.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/THANKS.in b/THANKS.in index abd64fd..9872bfa 100644 --- a/THANKS.in +++ b/THANKS.in @@ -49,7 +49,6 @@ Jochen Hein jochen.h...@delphi.central.de Joel N. Weber II devn...@gnu.org John Hughes j...@nitelite.calvacom.fr Jorge Stolfi sto...@dcc.unicamp.br -Juan Manuel Guerrero st001...@hrz1.hrz.tu-darmstadt.de Karl Heuer k...@gnu.org Kaveh R. Ghazi gh...@caip.rutgers.edu Kazuro Furukawa furuk...@apricot.kek.jp diff --git a/cfg.mk b/cfg.mk index 6cebb4e..52ed500 100644 --- a/cfg.mk +++ b/cfg.mk @@ -17,7 +17,7 @@ # Cause the tool(s) built by this package to be used also when running # commands via e.g., "make syntax-check". Doing this a little sooner # would have avoided a grep infloop bug. -export PATH := $(srcdir)/src:${PATH} +export PATH := $(srcdir)/src$(PATH_SEPARATOR)${PATH} # Used in maint.mk's web-manual rule manual_title = GNU Grep: Print lines matching a pattern -- 2.8.0-rc2 From dff64f9ededbea38f573e06967e85f15a1c46e4a Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@fb.com> Date: Sun, 5 Mar 2017 09:02:28 -0800 Subject: [PATCH 2/2] build: use $(builddir), not $(srcdir) * cfg.mk (PATH): Use $(builddir), so this also takes effect in a non-srcdir build. Also, switch ${PATH} syntax to $(PATH). --- cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 52ed500..c39e75b 100644 --- a/cfg.mk +++ b/cfg.mk @@ -17,7 +17,7 @@ # Cause the tool(s) built by this package to be used also when running # commands via e.g., "make syntax-check". Doing this a little sooner # would have avoided a grep infloop bug. -export PATH := $(srcdir)/src$(PATH_SEPARATOR)${PATH} +export PATH := $(builddir)/src$(PATH_SEPARATOR)$(PATH) # Used in maint.mk's web-manual rule manual_title = GNU Grep: Print lines matching a pattern -- 2.8.0-rc2