help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Emacs with Autotools projects : separate source and binaries d


From: Ralf Wildenhues
Subject: Re: Using Emacs with Autotools projects : separate source and binaries directories
Date: Sun, 2 Nov 2008 22:23:43 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello,

* fuhz.fr@gmail.com wrote on Fri, Oct 31, 2008 at 09:44:19PM CET:
> 
> Since I have two different binary trees, I want to separate the source
> and the output directories.

Learn about separating the one source tree and the (arbitrarily many)
build trees:
<http://www.gnu.org/software/automake/manual/html_node/VPATH-Builds.html>

> Now, I have experience some problems:
> 
> - Emacs compilation output can not find the sources files
> I must specify it for each compilation (very boring).
> Or, I can customize compilation-search-directories with absolute paths
> (so dirty).

I'm sure Emacs can be taught to read per-directory config files that
teach it where the respective source files are.  I can't help you with
this, though.

> - Some part of the project do not compile anymore.
> Makefile.am rules are based on the fact that binaries and source code
> are in the same directory.

Not if the Makefile.am author took care.  Generally, automake supports
separated source and build trees quite naturally.

> bin_PROGRAMS = settings-manager-test
> settings_manager_test_SOURCES = settings-manager-test.cpp
> settings_manager_test_LDADD =  @top_srcdir@/src/common/libcore.la

Libraries are generated and system-dependent files, so they should never
be in the source tree, and always in the build tree.  You should use
something like this here:
  settings_manager_test_LDADD =  $(top_builddir)/src/common/libcore.la
or
  settings_manager_test_LDADD =  ../../src/common/libcore.la

> Is there any solutions to make cross-platform development more easy
> with Emacs and Autotools ?

I'm sure Emacs users will be able to provide more help here.
It might help to ask on the automake list, help-gnu-utils seems
to be read less these days.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]