>From e166ce58047ce741cd3eb4507a813da97091aa3c Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Sun, 12 Aug 2018 17:11:39 -0600 Subject: [PATCH] build: use system's native sed during build Use the locally built sed binary only during 'check*' targets, but no during build/installation targets - it might be buggy, or contain temporary debugging/ASAN features that can break the build. Do use it See: https://lists.gnu.org/r/sed-devel/2018-08/msg00013.html . * cfg.mk (PATH): Add the 'sed' directory to the PATH only if this is a 'check' target. --- cfg.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cfg.mk b/cfg.mk index 227a7d0..ab0c95b 100644 --- a/cfg.mk +++ b/cfg.mk @@ -14,10 +14,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# 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)/sed:${PATH} +# When running a 'check' target, adjust the $PATH to use the newly built +# sed binary - expanding coverage testing, and enabling sophisticated +# rules in syntax-check. +_is-check-target ?= $(filter-out install%, \ + $(filter %check check%,$(MAKECMDGOALS))) +ifneq (,$(_is-check-target)) + export PATH := $(srcdir)/sed:${PATH} +endif # Used in maint.mk's web-manual rule manual_title = GNU Sed: a stream editor -- 2.11.0