aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <[email protected]>2015-09-07 15:44:08 +0200
committerJean-Sébastien Pédron <[email protected]>2015-09-07 16:20:32 +0200
commitbbd059ff5af82cea816c17ef58a7cf360e085efc (patch)
tree979b5cf4e37ac5ee44b69820aa3a17fed0f8c147 /test/Makefile
parentb5c61eebdce09f27985db4a44aa13683b75e9c37 (diff)
downloaderlang.mk-bbd059ff5af82cea816c17ef58a7cf360e085efc.tar.gz
erlang.mk-bbd059ff5af82cea816c17ef58a7cf360e085efc.tar.bz2
erlang.mk-bbd059ff5af82cea816c17ef58a7cf360e085efc.zip
test/Makefile: Support non-GNU sed
This required two changes: 1. Modifying a file inplace using -i is not portable. GNU sed does not require an argument; the absence of it meaning it should change the file inplace. sed found on FreeBSD and probably other BSDs' require an argument, so inplace modification should be specified as: sed -i ''. Obviously, both -i are incompatible... The "solution" is to specify a backup suffix and ignore this backup file. 2. The [1addr]i command takes its argument on the next line according to the standard (though, it's not explicitely stated, the syntax example suggests that). GNU sed accepts to have its argument on the same line as the command, but not FreeBSD's sed.
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index 82837fa..d7af832 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -770,7 +770,9 @@ 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 '2iNO_MAKEDEP ?= 1' $(APP)/Makefile
+ $t sed -i.bak '2i\
+NO_MAKEDEP ?= 1\
+' $(APP)/Makefile
$i "Generate .hrl files"
$t mkdir $(APP)/include/