Open Source Telephony
 help / color / mirror / Atom feed
From: Yang Gu <yang.gu@intel.com>
To: ofono@ofono.org
Subject: [PATCH] Make VPATH build work
Date: Thu, 18 Mar 2010 18:40:11 +0800	[thread overview]
Message-ID: <1268908811-15532-1-git-send-email-yang.gu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

Sometimes, you may need to distinguish the source tree and the build tree, when
you want to keep the source tree uncluttered, or you need to build the source
with several different configurations, or even your source tree is read only.
This feature is called VPATH build and the patch is to make this work.
A typical example is as below (Note that the "build" directory can be any name
and in any place):
> cd ofono && mkdir build && cd build
> ../configure XXX
> make
Then everything you got from the make will reside in "build" directory.
---
 Makefile.am |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index eca8eee..bd74fb7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -374,11 +374,11 @@ $(src_ofonod_OBJECTS) $(unit_objects): $(local_headers)
 
 include/ofono/version.h: include/version.h
 	$(AM_V_at)$(MKDIR_P) include/ofono
-	$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
+	$(AM_V_GEN)$(LN_S) $(abs_builddir)/$< $@
 
 include/ofono/%.h: include/%.h
 	$(AM_V_at)$(MKDIR_P) include/ofono
-	$(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
+	$(AM_V_GEN)$(LN_S) $(abs_builddir)/$< $@
 
 clean-local: include/ofono
 	@$(RM) -r $<
-- 
1.6.3.3


                 reply	other threads:[~2010-03-18 10:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1268908811-15532-1-git-send-email-yang.gu@intel.com \
    --to=yang.gu@intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox