When I do vpath build in automake_test/tmp/build, what I get is that beam file is placed into tmp/build/src/ folder, not into tmp/build/ebin/.<br><br>What I like to see is to have ebin folder in vpath build directory and have the automake_test.beam file in ebin, like so tmp/build/ebin/automake_test.beam.<br>
<br>When I also do build(src build) in main root directory "automake_test", what I get is that beam file placed into the automake_test/src/automake_test.beam rather than into automake_test/ebin/automake_test.beam.<br>
<br>With the <a href="http://configure.ac" target="_blank">configure.ac</a>, <a href="http://Makefile.am" target="_blank">Makefile.am</a>, src/Makefile.am, I was able to install of erlang app into /usr/local/erlang/otp_r12b-0/lib/erlang/lib, check for prerequisite erlang libraries (mnesia, etc) and have automake_test.beam file installed into /usr/local/erlang/otp_r12b-0/lib/erlang/lib/automake_test/ebin folder.<br>
<br>I would like have ebin folder populated with compiled beam files when performaing regular build on the same source directory or when on separate build directory (VPATH builds). Anyone knows how to do this?<br><br>My simple app folder structure:<br>
<br>automake_test<br>->ebin/<br>->src/<br> ->automake_test.erl<br> -><a href="http://Makefile.am" target="_blank">Makefile.am</a><br>->tmp/<br> ->build/<br>-><a href="http://Makefile.am" target="_blank">Makefile.am</a><br>
-><a href="http://configure.ac" target="_blank">configure.ac</a><br>
<br>================<br>automake_test/configure.ac:<br><br>AC_INIT(Some test application, 0.1, address@hidden, someapp)<br>dnl Require autoconf version >=2.59c.<br>AC_PREREQ(2.59c)<br>AC_COPYRIGHT(Copyright (C) 2006 tester)<br>
AC_REVISION($Id$)<br><br>dnl Require automake version >=1.9.5.<br>AM_INIT_AUTOMAKE(1.9.5)<br><br>AC_ERLANG_NEED_ERLC<br><br>AC_ERLANG_SUBST_ROOT_DIR<br>AC_ERLANG_SUBST_LIB_DIR<br><br>dnl Check for standard Erlang/OTP libraries.<br>
AC_ERLANG_CHECK_LIB([edoc])<br>AC_ERLANG_CHECK_LIB([os_mon])<br>AC_ERLANG_CHECK_LIB([mnesia])<br><br>dnl Determine directories for installation.<br>AC_ERLANG_SUBST_INSTALL_LIB_DIR<br>AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(automake_test, 0.1)<br>
<br>dnl Specify the files to instantiate.<br>AC_CONFIG_FILES([ \<br> Makefile \<br> src/Makefile \<br> ])<br><br>AC_OUTPUT<br><br>==================<br>automake_test/Makefile.am:<br><br>SUBDIRS = src<br><br>==================<br>
automake_test/src/Makefile.am:<br><br>erlsrcdir = $(ERLANG_INSTALL_LIB_DIR_automake_test)/src<br>erlsrc_DATA = automake_test.erl <br>EXTRA_DIST = $(erlsrc_DATA)<br><br>erlbeamdir = $(ERLANG_INSTALL_LIB_DIR_automake_test)/ebin<br>
erlbeam_DATA = automake_test.beam<br>CLEANFILES = $(erlbeam_DATA)<br><br>SUFFIXES = .erl .beam<br>.erl.beam:<br> $(ERLC) $(ERLCFLAGS) -b beam $<<br><br>=================<br><br>-- <br>rk