aboutsummaryrefslogtreecommitdiffstats
path: root/test/core_app.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-09-27 17:10:25 +0200
committerLoïc Hoguin <[email protected]>2015-09-27 17:10:25 +0200
commitfad3d20752edd48e1cb48c667e7f3e2e74a11517 (patch)
tree7e65c526d1823716fd4e153fbadf22b9d986f9fe /test/core_app.mk
parent0f78319fd528236a0fd7d152870e77248cfc5891 (diff)
downloaderlang.mk-fad3d20752edd48e1cb48c667e7f3e2e74a11517.tar.gz
erlang.mk-fad3d20752edd48e1cb48c667e7f3e2e74a11517.tar.bz2
erlang.mk-fad3d20752edd48e1cb48c667e7f3e2e74a11517.zip
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.
Diffstat (limited to 'test/core_app.mk')
-rw-r--r--test/core_app.mk8
1 files changed, 2 insertions, 6 deletions
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