Skip to content

Commit

Permalink
Fix up the Bazel sed command. (p4lang#4720)
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy authored Jun 12, 2024
1 parent d94c4b2 commit 68c0ddd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

Expand Down

0 comments on commit 68c0ddd

Please sign in to comment.