You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2010/08/31 00:06:01 UTC
svn commit: r991002 - /incubator/thrift/trunk/lib/erl/src/Makefile
Author: dreiss
Date: Mon Aug 30 22:06:01 2010
New Revision: 991002
URL: http://svn.apache.org/viewvc?rev=991002&view=rev
Log:
erlang: Eliminate "behaviour undefined" warnings
Build behaviour modules first and include the ebin directory in
the Erlang code path during the rest of the build.
Modified:
incubator/thrift/trunk/lib/erl/src/Makefile
Modified: incubator/thrift/trunk/lib/erl/src/Makefile
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/Makefile?rev=991002&r1=991001&r2=991002&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/Makefile (original)
+++ incubator/thrift/trunk/lib/erl/src/Makefile Mon Aug 30 22:06:01 2010
@@ -27,6 +27,7 @@ INSTALL_DST = $(ERLANG_OTP)/lib/$(APP_NA
MODULES = $(shell find . -name \*.erl | sed 's:^\./::' | sed 's/\.erl//')
MODULES_STRING_LIST = $(shell find . -name \*.erl | sed 's:^\./:":' | sed 's/\.erl/",/')
+BEHAV_MODULES = $(shell find . -name \*.erl | xargs grep -l behaviour_info | sed 's:^\./::' | sed 's/\.erl//')
HRL_FILES=
INTERNAL_HRL_FILES= $(APP_NAME).hrl
@@ -43,7 +44,8 @@ APP_TARGET= $(EBIN)/$(APP_FILE)
APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
BEAMS= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
-TARGET_FILES= $(BEAMS) $(APP_TARGET) $(APPUP_TARGET)
+BEHAV_BEAMS= $(BEHAV_MODULES:%=$(EBIN)/%.$(EMULATOR))
+TARGET_FILES= $(BEHAV_BEAMS) $(BEAMS) $(APP_TARGET) $(APPUP_TARGET)
WEB_TARGET=/var/yaws/www/$(APP_NAME)
@@ -53,7 +55,8 @@ WEB_TARGET=/var/yaws/www/$(APP_NAME)
ERL_FLAGS +=
ERL_INCLUDE = -I../include -I../../fslib/include -I../../system_status/include
-ERL_COMPILE_FLAGS += $(ERL_INCLUDE)
+ERL_BEHAV_PATH = -pz ../ebin
+ERL_COMPILE_FLAGS += $(ERL_INCLUDE) $(ERL_BEHAV_PATH)
# ----------------------------------------------------
# Targets