diff options
author | Loïc Hoguin <[email protected]> | 2015-09-27 17:10:25 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-09-27 17:10:25 +0200 |
commit | fad3d20752edd48e1cb48c667e7f3e2e74a11517 (patch) | |
tree | 7e65c526d1823716fd4e153fbadf22b9d986f9fe /test/core_plugins.mk | |
parent | 0f78319fd528236a0fd7d152870e77248cfc5891 (diff) | |
download | erlang.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_plugins.mk')
-rw-r--r-- | test/core_plugins.mk | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/core_plugins.mk b/test/core_plugins.mk index 5bbee3f..dfece5e 100644 --- a/test/core_plugins.mk +++ b/test/core_plugins.mk @@ -37,11 +37,7 @@ core-plugins-all: build clean-core-plugins-all git commit -q -m "Tests" $i "Add dependency and plugins to the Makefile" - $t sed -i.bak '2i\ -DEPS = plugin_dep\ -dep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\ -DEP_PLUGINS = plugin_dep\ -' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = plugin_dep\ndep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\nDEP_PLUGINS = plugin_dep\n"}' $(APP)/Makefile $i "Run 'make plugin1' and check that it prints plugin1" $t test -n "`$(MAKE) -C $(APP) plugin1 | grep plugin1`" @@ -73,11 +69,7 @@ core-plugins-one: build clean-core-plugins-one git commit -q -m "Tests" $i "Add dependency and plugins to the Makefile" - $t sed -i.bak '2i\ -DEPS = plugin_dep\ -dep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\ -DEP_PLUGINS = plugin_dep/mk/plugin1.mk\ -' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = plugin_dep\ndep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\nDEP_PLUGINS = plugin_dep/mk/plugin1.mk\n"}' $(APP)/Makefile $i "Run 'make plugin1' and check that it prints plugin1" $t test -n "`$(MAKE) -C $(APP) plugin1 | grep plugin1`" |