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 715043 - srcdir != builddir failure in Continuous
srcdir != builddir failure in Continuous
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-11-22 22:17 UTC by Colin Walters
Modified: 2014-01-18 10:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Fix $(srcdir) != $(builddir) (2.20 KB, patch)
2014-01-17 10:41 UTC, Debarshi Ray
committed Details | Review

Description Colin Walters 2013-11-22 22:17:44 UTC
Hi, I was looking at adding Photos to Continuous, but I ran into this failure:

make[2]: *** No rule to make target `../../AUTHORS', needed by `photos-about-data.c'.  Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/ostbuild/source/gnome-photos/_build/src'


This occurs because AUTHORS is actually in $(top_builddir) in Continuous, which does srcdir != buildir from *git* (not from tarballs which has AUTHORS pregenerated).

A fix for this would probably be passing both $(top_srcdir) and $(top_builddir) to the script, and looking for the file in both places.
Comment 1 Debarshi Ray 2014-01-17 10:41:51 UTC
Created attachment 266540 [details] [review]
build: Fix $(srcdir) != $(builddir)

This worked for me locally when I tried a srcdir != builddir build. Can you please check if it works in Continuous?

Other than that, if you are adding gnome-photos to Continuous, it would also make sense to add grilo-plugins.
Comment 2 Colin Walters 2014-01-17 15:25:04 UTC
It works, but won't it break the build when doing srcdir == builddir?  Don't you need to look in both places?
Comment 3 Debarshi Ray 2014-01-17 16:05:47 UTC
(In reply to comment #2)
> It works, but won't it break the build when doing srcdir == builddir?  Don't
> you need to look in both places?

Umm... why should it? If srcdir == builddir, then both variables are the same, aren't they?

Anyway, I tested both srcdir == builddir and srcdir != builddir after 'git clean -fdx'ing gnome-photos and the libgd submodule and it works -- builds work, make distcheck works. Am I missing something?
Comment 4 Colin Walters 2014-01-18 02:48:28 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > It works, but won't it break the build when doing srcdir == builddir?  Don't
> > you need to look in both places?
> 
> Umm... why should it? If srcdir == builddir, then both variables are the same,
> aren't they?

Ah...right =)  Then we could just as easily unconditionally look in builddir, right?

> Anyway, I tested both srcdir == builddir and srcdir != builddir after 'git
> clean -fdx'ing gnome-photos and the libgd submodule and it works -- builds
> work, make distcheck works. Am I missing something?

Sounds good to me.  I accidentally pushed the patch to Continuous to add gnome-photos here:
https://git.gnome.org/browse/gnome-continuous/commit/?id=016f726e91478a7f6b54fa8bf937d8cf4c2347ff

(Accidentally since I meant to just push the evolution-ews fix)

But since I pushed that, let's push this too.  We can clean it up to only check builddir later if we want.
Comment 5 Debarshi Ray 2014-01-18 10:14:40 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > It works, but won't it break the build when doing srcdir == builddir?  Don't
> > > you need to look in both places?
> > 
> > Umm... why should it? If srcdir == builddir, then both variables are the same,
> > aren't they?
> 
> Ah...right =)  Then we could just as easily unconditionally look in builddir,
> right?

Yes.

> But since I pushed that, let's push this too.

Thanks for pushing it, Colin. We now need to sort out the dependencies for grilo-plugins.

> We can clean it up to only check
> builddir later if we want.

Well, we have to check buildir for AUTHORS because it is generated from Git, but we still have to check srcdir for ARTISTS because unlike AUTHORS it is manually maintained as source.

So, I think, everything is fine. :)