Permalink
Browse files

Test

  • Loading branch information...
1 parent cef0063 commit cfd391c35c00ea58f6b56fcc45201aea33dab8dd @saleyn saleyn committed May 26, 2010
View
@@ -1,13 +1,10 @@
TARBALL=zmq.tgz
TARBALL_EXCLUDE=/tmp/exclude.xxx
-all clean:
- @for d in c_src src; do \
- ${MAKE} --directory=$$d $@; \
- done
+SUBDIRS = src
-docs:
- @${MAKE} --directory=src $@
+#docs:
+# @${MAKE} --directory=src $@
gitdocs: docs
./bin/update_docs
View
@@ -0,0 +1,19 @@
+# AC_ERLANG_SUBST_ERTS_VER
+# -------------------------------------------------------------------
+AC_DEFUN([AC_ERLANG_SUBST_ERTS_VER],
+ [AC_REQUIRE([AC_ERLANG_NEED_ERLC])[]dnl
+ AC_REQUIRE([AC_ERLANG_NEED_ERL])[]dnl
+ AC_CACHE_CHECK([for Erlang/OTP ERTS version],
+ [erlang_cv_erts_ver],
+ [AC_LANG_PUSH(Erlang)[]dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([], [dnl
+ Version = erlang:system_info(version),
+ file:write_file("conftest.out", Version),
+ halt(0)])],
+ [erlang_cv_erts_ver=`cat conftest.out`],
+ [AC_MSG_FAILURE([test Erlang program execution failed])])
+ AC_LANG_POP(Erlang)[]dnl
+ ])
+ AC_SUBST([ERLANG_ERTS_VER], [$erlang_cv_erts_ver])
+ ])# AC_ERLANG_SUBST_ERTS_VER
View
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+aclocal
+libtoolize --automake
+automake -a
+autoconf
+
File renamed without changes.
View
@@ -0,0 +1,30 @@
+ZMQ_DIR=/opt/zeromq-2.0.6
+
+ERL ?= erl
+ERL_INTERFACE_DIR=$(shell \
+ $(ERL) -eval 'io:format("~s\n", [code:lib_dir(erl_interface)]).' \
+ -noshell -s erlang halt)
+ERL_INSTALL_DIR := $(patsubst %/,%,$(dir $(ERL_INTERFACE_DIR)))
+ERL_INSTALL_DIR := $(patsubst %/,%,$(dir $(ERL_INSTALL_DIR)))
+
+ifeq (,$(ERL_INSTALL_DIR))
+$(error Erlang installation directory not found)
+endif
+
+LDFLAGS=-shared -fPIC ${ERL_INTERFACE_DIR}/lib/libei.a -L${ZMQ_DIR}/lib -lzmq -lpthread -luuid
+CFLAGS=-Wall -ggdb -O0 -I${ZMQ_DIR}/include \
+ -I$(ERL_INTERFACE_DIR)/include \
+ -I$(ERL_INSTALL_DIR)/usr/include
+CC=g++
+
+ifdef debug
+CFLAGS += -DZMQDRV_DEBUG
+endif
+
+all: ../priv/zmq_drv.so
+
+../priv/zmq_drv.so: zmq_drv.cpp
+ $(CC) -o $@ $< ${LDFLAGS} ${CFLAGS}
+
+clean:
+ rm -rf zmq_drv.o ../priv/zmq_drv.so
View
@@ -0,0 +1,14 @@
+dnl Process this file with autoconf to produce a configure script
+AC_PREREQ(2.56)
+AC_INIT(zmq)
+AM_INIT_AUTOMAKE(appexp, 0.1.00)
+AC_PROG_CC
+AC_PROG_RANLIB
+
+AC_ERLANG_CHECK_LIB([kernel])
+AC_ERLANG_CHECK_LIB([stdlib])
+
+AC_ERLANG_SUBST_ERTS_VER
+
+AC_OUTPUT(c_src/Makefile src/Makefile Makefile)
+
@@ -1,8 +1,8 @@
% This is an -*- erlang -*- file.
-{application, zmq,
+{application, @PACKAGE@,
[{description, "ZeroMQ"},
- {vsn, "%VSN%"},
+ {vsn, "@VERSION@"},
{modules, [zmq]},
{registered,[]},
{applications, [kernel,stdlib]},
View
@@ -0,0 +1,6 @@
+% This release file is not used but we are providing it anyway for completeness
+
+{release, {"@PACKAGE@", "@VERSION@"}, {erts, "@ERLANG_ERTS_VER@"},
+ [{kernel, "@ERLANG_LIB_VER_kernel@"},
+ {stdlib, "@ERLANG_LIB_VER_stdlib@"},
+ {@PACKAGE@, "@VERSION@"}]}.

0 comments on commit cfd391c

Please sign in to comment.