From 68c0dddcfbd1c4c030c31978eac7952eb4d9ac2c Mon Sep 17 00:00:00 2001 From: Fabian Ruffy <5960321+fruffy@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:50:53 +0200 Subject: [PATCH] Fix up the Bazel sed command. (#4720) --- BUILD.bazel | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index b56adc9e8f5..f991520687b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -28,12 +28,11 @@ genrule( outs = ["config.h"], # TODO: We should actually check these properly instead of just #undefing them. # Maybe select() can help here? - cmd = " | ".join([ - "sed 's|cmakedefine|define|g' < $(SRCS)", - "sed 's|define HAVE_LIBGC 1|undef HAVE_LIBGC|g'", - "sed 's|define HAVE_LIBBACKTRACE 1|undef HAVE_LIBBACKTRACE|g' > $(OUTS)", - "sed 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' > $(OUTS)", - ]), + cmd = "sed -e 's|cmakedefine|define|g' \ + -e 's|define HAVE_LIBGC 1|undef HAVE_LIBGC|g' \ + -e 's|define HAVE_LIBBACKTRACE 1|undef HAVE_LIBBACKTRACE|g' \ + -e 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' \ + < $(SRCS) > $(OUTS)", visibility = ["//visibility:private"], )