mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-06 18:35:19 +00:00
THRIFT-646. erlang: Misc build cleanups
- Use AC_ERLANG_PATH_ERLC to find erlc, instead of the generic AC_PATH_PROG. - Also check for erl, just in case it is used internally by checks. - Use AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR instead of manual hackery to find the location where Erlang libraries should be installed. (This doesn't use the discovered version of Erlang, though. See http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00003.html .) - Minor style changes in Makefile.am - Remove some hacks we were using in the old makefile that were necessary because we were not using automake. - Remove ebin in a "maintainer-clean-local" rule to avoid shadowing the default "maintainer-clean" rule which handles MAINTAINERCLEANFILES. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@945744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b6657f142e
commit
9e2fd7987d
@ -98,9 +98,11 @@ AM_CONDITIONAL([WITH_JAVA],
|
|||||||
|
|
||||||
AX_THRIFT_LIB(erlang, [Erlang], yes)
|
AX_THRIFT_LIB(erlang, [Erlang], yes)
|
||||||
if test "$with_erlang" = "yes"; then
|
if test "$with_erlang" = "yes"; then
|
||||||
AC_PATH_PROG([ERLC], [erlc])
|
AC_ERLANG_PATH_ERL
|
||||||
|
AC_ERLANG_PATH_ERLC
|
||||||
|
AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_ERLANG, [test -n "$ERLC"])
|
AM_CONDITIONAL(WITH_ERLANG, [test -n "$ERL" -a -n "$ERLC"])
|
||||||
|
|
||||||
AX_THRIFT_LIB(py, [Python], yes)
|
AX_THRIFT_LIB(py, [Python], yes)
|
||||||
if test "$with_py" = "yes"; then
|
if test "$with_py" = "yes"; then
|
||||||
|
@ -17,9 +17,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
# directory where erlang library code should live
|
|
||||||
ERL_LIB_ROOT_DIR=$(shell erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell)
|
|
||||||
|
|
||||||
MODULES = \
|
MODULES = \
|
||||||
src
|
src
|
||||||
|
|
||||||
@ -28,30 +25,20 @@ all clean docs:
|
|||||||
(cd $$dir; ${MAKE} $@); \
|
(cd $$dir; ${MAKE} $@); \
|
||||||
done
|
done
|
||||||
|
|
||||||
ERLLIBDIR=$(DESTDIR)$(ERL_LIB_ROOT_DIR)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
|
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
mkdir -p $(ERLLIBDIR) ; \
|
mkdir -p $(ERLANG_INSTALL_LIB_DIR_thrift) ; \
|
||||||
mkdir -p $(ERLLIBDIR)/ebin ; \
|
mkdir -p $(ERLANG_INSTALL_LIB_DIR_thrift)/ebin ; \
|
||||||
mkdir -p $(ERLLIBDIR)/include ; \
|
mkdir -p $(ERLANG_INSTALL_LIB_DIR_thrift)/include ; \
|
||||||
mkdir -p $(ERLLIBDIR)/src ; \
|
mkdir -p $(ERLANG_INSTALL_LIB_DIR_thrift)/src ; \
|
||||||
for i in ebin/*.app* ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done ; \
|
for i in ebin/*.app* ebin/*.beam include/*.hrl src/*.erl ; \
|
||||||
for i in ebin/*.beam ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done ; \
|
do $(INSTALL) $$p $(ERLANG_INSTALL_LIB_DIR_thrift)/$$p ; \
|
||||||
for i in include/*.hrl ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done ; \
|
done
|
||||||
for i in src/*.erl ; do $(INSTALL) $$i $(ERLLIBDIR)/$$i ; done
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -rf $(ERLLIBDIR)
|
rm -rf $(ERLANG_INSTALL_LIB_DIR_thrift)
|
||||||
|
|
||||||
check: all
|
|
||||||
|
|
||||||
distclean: clean
|
maintainer-clean-local:
|
||||||
|
rm -rf ebin
|
||||||
# Hack to make "make dist" work.
|
|
||||||
# This should not work, but it appears to.
|
|
||||||
distdir:
|
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
maintainer-clean:
|
|
||||||
test ! -d ebin || rm -rf ebin
|
|
||||||
|
Loading…
Reference in New Issue
Block a user