After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 271308 - evolution-2.1.3.2 does not build outside of srcdir
evolution-2.1.3.2 does not build outside of srcdir
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.4.x (obsolete)
Other All
: High normal
: ---
Assigned To: Harish Krishnaswamy
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2005-01-15 02:11 UTC by Mike Castle
Modified: 2013-09-13 00:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
enable build outside of srcdir (1.06 KB, patch)
2005-01-15 02:12 UTC, Mike Castle
none Details | Review
Enable building outside of srcdir (1.03 KB, patch)
2005-06-10 08:22 UTC, Mike Castle
none Details | Review
Enable building outside of srcdir (4.96 KB, patch)
2005-07-28 21:18 UTC, Mike Castle
none Details | Review
patch against HEAD (520 bytes, patch)
2005-09-22 13:41 UTC, Harish Krishnaswamy
committed Details | Review

Description Mike Castle 2005-01-15 02:11:38 UTC
Currently evolution does not build if srcdir != builddir.

I'll attach a patch to address the issue.

However, it needs a bit of explanation this time.

Normally such changes are usually just updates to various Makefile.am's for
one of three reasons:

1) The path to the generated config.h is added to the include paths, and
that  magically works most of the time
2) -I../.. does not work for shipped .h files
3) Another generated file gets placed under top_builddir rather than
top_srcdir.

Now, one of the bugs in this patch is a variation of point 3.

In some of evolution's source code, you do something like:

#include "foo/bar.h"

And foo/bar.h would have #include "baz.h", where baz.h would also live in foo.

And you don't have to add -Ifoo to the command line.

However, applications built in foo would only include "bar.h".

So, now baz.h is a generated file, so it's actually not under foo, but
rather $top_builddir/foo/baz.h.

It was a tough decision to either add -I$top_builddir/foo to Makefile.am or
to change bar.h to #include "foo/baz.h".  I went with the latter.  But this
does make it a bit inconsistent, because bar.h actually includes other .h
files from foo, so it looks like:

#include "one.h"
#include "two.h"
#include "foo/baz.h"

I think it would be better to be consistent throughout the source code and
do something like:

#include "foo/one.h"
#include "foo/two.h"
#include "foo/baz.h"

Actually, I want to say I saw a GNU recommendation to do this, but I can't
find it with a real quick search.

Oh well, long winded explanation for a one line patch.  :->
Comment 1 Mike Castle 2005-01-15 02:12:20 UTC
Created attachment 44566 [details] [review]
enable build outside of srcdir
Comment 2 Gerardo Marin 2005-01-30 08:59:45 UTC
Mike, please send your patch to evolution-patches mailing list, see
http://lists.ximian.com.
Comment 3 André Klapper 2005-03-05 14:42:35 UTC
adding patch keyword
Comment 4 André Klapper 2005-06-09 13:44:18 UTC
hmm...any news on this, can this be closed with evo-2.2.x?
Comment 5 Mike Castle 2005-06-10 08:22:32 UTC
Created attachment 47522 [details] [review]
Enable building outside of srcdir

Attached updated patch for 2.3.1.
Comment 6 André Klapper 2005-06-12 18:02:29 UTC
reassigning this to harish, please put this in. ;-)
Comment 7 André Klapper 2005-07-13 16:41:08 UTC
going to target this to 2.3.
Comment 8 Mike Castle 2005-07-28 21:18:31 UTC
Created attachment 49902 [details] [review]
Enable building outside of srcdir

Update for evolution-2.3.5.1
Comment 9 Harish Krishnaswamy 2005-09-16 05:10:44 UTC
Thanks Mike for your patience and Andre for drawing my attention to
this...looking into this right away..
Comment 10 Harish Krishnaswamy 2005-09-21 17:43:13 UTC
Updating the target milestone. Posting a fresh patch
Comment 11 Harish Krishnaswamy 2005-09-22 13:41:05 UTC
Created attachment 52504 [details] [review]
patch against HEAD

diff -u -p -r1.2 marshal.mk
- ( $(GLIB_GENMARSHAL) --prefix=$(subst -,_,$*) $(srcdir)/$< --header > $@.tmp
\
+ ( $(GLIB_GENMARSHAL) --prefix=$(subst -,_,$*) $< --header > $@.tmp \

Just this one-line patch on HEAD solves the problem. 
Appears that the make dist-check fixes post 2.3.5 take care of the rest of the
problems addressed by Mike's patch

Mike - how did you build e-util w/o the above fix ? Or am i missing something ?
Comment 12 Mike Castle 2005-09-23 04:41:52 UTC
I'm not sure how I built it.

I don't bother versioning my build description files for my home grown system (I
know I know; I'm lazy).

I'm in the process of finally switching from my home grown system to a real
maintained distribution (after 10 years!), so I've not built evolution since
2.3.5.1 some large number of days ago.
Comment 13 Chenthill P 2005-10-01 09:45:29 UTC
The patch looks good and can be committed to both branches.
Comment 14 Harish Krishnaswamy 2005-10-03 06:00:19 UTC
Committed.