From fad3d20752edd48e1cb48c667e7f3e2e74a11517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 27 Sep 2015 17:10:25 +0200 Subject: Replace sed -i with perl -ni in tests This fixes an issue on OSX where the OSX make 3.81 has a bug with multilines single quoted arguments to commands: it strips the backslash and newlines entirely. This makes it impossible to use sed -i properly. Since this is the test suite, we can instead use perl -ni, which can do the same and is available and work fine on all tested platforms. --- test/core_app.mk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/core_app.mk') diff --git a/test/core_app.mk b/test/core_app.mk index ffa14a4..4e0d1eb 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -865,9 +865,7 @@ core-app-no-makedep: build clean-core-app-no-makedep $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v $i "Set NO_MAKEDEP ?= 1 in the Makefile" - $t sed -i.bak '2i\ -NO_MAKEDEP ?= 1\ -' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "NO_MAKEDEP ?= 1\n"}' $(APP)/Makefile $i "Generate .hrl files" $t mkdir $(APP)/include/ @@ -1026,9 +1024,7 @@ core-app-pt-erlc-opts: build clean-core-app-pt-erlc-opts " Forms." > $(APP)/deps/my_pt_dep/src/my_pt.erl $i "Add my_pt_dep to the list of dependencies" - $t sed -i.bak '2i\ -BUILD_DEPS = my_pt_dep\ -' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "BUILD_DEPS = my_pt_dep\n"}' $(APP)/Makefile $i "Generate .erl files" $t echo "-module(boy)." > $(APP)/src/boy.erl -- cgit v1.2.3