From f471b41b2ebb4902dea0c69a7462a3aa23f31b73 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 15 Nov 2011 10:38:08 -0500 Subject: [PATCH] Reverse sense of new_inets test, for better interaction with rebar --- Makefile | 4 ++-- src/rfc4627_jsonrpc_inets.erl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8c5c0e1..d8af2bd 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,9 @@ PACKAGE_NAME=rfc4627_jsonrpc ## change, and supply a compile-time macro definition to allow ## rfc4627_jsonrpc_inets.erl to adapt to the new path. ifeq ($(shell test R14A \> $$(erl -noshell -eval 'io:format(erlang:system_info(otp_release)), halt().') && echo yes),yes) -INETS_DEF= +INETS_DEF=-Dold_inets else -INETS_DEF=-Dnew_inets +INETS_DEF= endif all: $(TARGETS) diff --git a/src/rfc4627_jsonrpc_inets.erl b/src/rfc4627_jsonrpc_inets.erl index 1c585b4..7890315 100644 --- a/src/rfc4627_jsonrpc_inets.erl +++ b/src/rfc4627_jsonrpc_inets.erl @@ -91,10 +91,10 @@ %% The path to httpd.hrl has changed in OTP R14A and newer. Our %% Makefile detects the change for us, and supplies a compile-time %% macro definition to allow us to adapt to the new path. --ifdef(new_inets). --include_lib("inets/src/http_server/httpd.hrl"). --else. +-ifdef(old_inets). -include_lib("inets/src/httpd.hrl"). +-else. +-include_lib("inets/src/http_server/httpd.hrl"). -endif. -export([do/1, load/2]).