From: Christopher Piro Date: Tue, 4 Mar 2008 07:09:12 +0000 (+0000) Subject: [thrift] Erlang build tweaks X-Git-Tag: 0.2.0~923 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=b6f18c20ee5db403047b803f4ce64d6a17abf978;p=common%2Fthrift.git [thrift] Erlang build tweaks Summary: fix the Makefile to use BSD-friendly find(1) and enable conditional building of the Erlang binding. Contributed by Dan Sully (daniel@electricrain.com). Reviewed By: eletuchy Test Plan: builds git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665549 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/configure.ac b/configure.ac index 704719d2..16e053c2 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,13 @@ fi AM_CONDITIONAL([ENABLE_JAVA], [test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"]) +AX_THRIFT_LIB(erlang, [Erlang], yes) +if test "$with_erlang" = "yes"; then + AC_PATH_PROG([ERLC], [erlc]) +fi + +AM_CONDITIONAL(ENABLE_ERLANG, [test -n "$ERLC"]) + AC_C_CONST AC_C_INLINE AC_C_VOLATILE diff --git a/lib/Makefile.am b/lib/Makefile.am index 36191f67..5d2e1fa0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -10,6 +10,10 @@ if ENABLE_JAVA SUBDIRS += java endif +if ENABLE_ERLANG +SUBDIRS += erl +endif + EXTRA_DIST = \ cocoa \ erl \ diff --git a/lib/erl/src/Makefile b/lib/erl/src/Makefile index 32b73957..32db9c40 100644 --- a/lib/erl/src/Makefile +++ b/lib/erl/src/Makefile @@ -25,8 +25,8 @@ INSTALL_DST = $(ERLANG_OTP)/lib/$(APP_NAME)-$(VSN) # ---------------------------------------------------- -MODULES = $(shell find -name \*.erl | sed s:^\\./:: | sed s/\\.erl//) -MODULES_STRING_LIST = $(shell find -name \*.erl | sed s:^\\./:\": | sed s/\\.erl/\",/) +MODULES = $(shell find . -name \*.erl | sed s:^\\./:: | sed s/\\.erl//) +MODULES_STRING_LIST = $(shell find . -name \*.erl | sed s:^\\./:\": | sed s/\\.erl/\",/) HRL_FILES= INTERNAL_HRL_FILES= $(APP_NAME).hrl