aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <[email protected]>2025-07-07 19:15:18 +0200
committerJean-Sébastien Pédron <[email protected]>2025-07-22 17:24:42 +0200
commit2352ec359ecb10d2de93ebf14abc394bdab788df (patch)
tree22d54d8372f27c373a5edb38536760376b7b0dd7
parentac4f2f28c37b9d6213fa2ce0647a1e1c2495f7ab (diff)
downloaderlang.mk-2352ec359ecb10d2de93ebf14abc394bdab788df.tar.gz
erlang.mk-2352ec359ecb10d2de93ebf14abc394bdab788df.tar.bz2
erlang.mk-2352ec359ecb10d2de93ebf14abc394bdab788df.zip
test/core_elixir.mk: Patch `reloader` Makefile to be compatible with BSD sed
Its Makefile called sed(1) in a way that was only compatible with GNU sed. As a consequence, the build failed with BSD sed. Now, the test case fetches dependencies and patches `reloader`'s Makefile to use a sed(1) script compatible with both implementations of sed(1).
-rw-r--r--test/core_elixir.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/core_elixir.mk b/test/core_elixir.mk
index c2cec70..920b5cb 100644
--- a/test/core_elixir.mk
+++ b/test/core_elixir.mk
@@ -146,6 +146,16 @@ core-elixir-disable-autopatch-make: init
$i "Disable Elixir in the Makefile"
$t perl -ni.bak -e 'print;if ($$.==1) {print "ELIXIR = disable\n"}' $(APP)/Makefile
+ $i "Fetch dependencies to patch 'reloader'"
+ $t $(MAKE) -C $(APP) fetch-deps $v
+
+# Patch `reloader` Makefile to be compatible with BSD sed. Its Makefile called
+# sed(1) in a way that was only compatible with GNU sed. As a consequence, the
+# build failed with BSD sed.
+ $i "Patch sed(1) use in Makefile"
+ $t test -f $(APP)/deps/reloader/Makefile
+ $t perl -pi.bak -e 's/\@sed/\@sed -E/;' -e 'if (/sed/) { s/{/\\{/g; s/}/\\}/g; s/\\s\*//; }' $(APP)/deps/reloader/Makefile
+
$i "Building the application should work as Reloader contains a proper Makefile"
$t $(MAKE) -C $(APP) $v