Permalink
Browse files

Remove build-time dependency on awk, using erlang instead

  • Loading branch information...
1 parent f7c5809 commit 1614d95831567ae8b060ce484f7b291048edec2d @tonyg committed Sep 29, 2014
Showing with 2 additions and 3 deletions.
  1. +2 −3 Makefile
View
@@ -18,9 +18,8 @@ PACKAGE_NAME=rfc4627_jsonrpc
## to use Dialyzer-compatible specs or not.
## (As of R17, the otp_release seems to lack a leading R!)
ERLANG_OTP_RELEASE:=$(shell \
- erl -noshell \
- -eval 'io:format(erlang:system_info(otp_release)), halt().' \
- | awk '/^[^R]/{print "R"$$0}; /^R/{print $$0};')
+ erl -noshell -eval \
+ 'io:format(case erlang:system_info(otp_release) of [$$R|X]->[$$R|X]; X->[$$R|X] end), halt().')
$(info Building for OTP release $(ERLANG_OTP_RELEASE).)
ifeq ($(shell test R14A \> $(ERLANG_OTP_RELEASE) && echo yes),yes)

0 comments on commit 1614d95

Please sign in to comment.