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 569806 - Support non-source-dir build
Support non-source-dir build
Status: RESOLVED OBSOLETE
Product: libsigc++
Classification: Bindings
Component: build
2.2.x
Other Linux
: Normal minor
: ---
Assigned To: Martin Schulze
Martin Schulze
Depends on:
Blocks: 569778
 
 
Reported: 2009-01-30 11:31 UTC by Theppitak Karoonboonyanan
Modified: 2009-08-13 05:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
A fix (4.50 KB, patch)
2009-01-30 11:38 UTC, Theppitak Karoonboonyanan
none Details | Review

Description Theppitak Karoonboonyanan 2009-01-30 11:31:07 UTC
When building libsigc++ outside source tree, following errors are found:

- In sigc++/ it fails to create functors/functor_trait.h because $(builddir)/functors/ was not created yet:

---8<---
Making all in sigc++
make[2]: Entering directory `/home/thep/build/gnome_svn/libsigc++2/sigc++'
m4   -I /home/thep/vcs/gnome_svn/libsigc++2/sigc++/macros -I macros /home/thep/vcs/gnome_svn/libsigc++2/sigc++/functors/macros/functor_trait.h.m4  > functors/functor_trait.h
make[2]: Leaving directory `/home/thep/build/gnome_svn/libsigc++2/sigc++'
make[1]: Leaving directory `/home/thep/build/gnome_svn/libsigc++2'
/bin/sh: functors/functor_trait.h: No such file or directory
make[2]: *** [functors/functor_trait.h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
---8<---

- In docs/manual/ the 'all-local' target fails because there is no rule to build $(srcdir)/html/index.html. (Sorry, the log was lost after I patched it.)

- In docs/reference/ the 'install-reference' target fails because it depends on $(srcdir)/html/index.html, rather than the generated $(builddir)/html/index.html:

---8<---
make[3]: *** No rule to make target `/home/thep/vcs/gnome_svn/libsigc++2/docs/reference/html/index.html', needed by `install-reference'.  Stop.
make[3]: Leaving directory `/home/thep/build/gnome_svn/libsigc++2/docs/reference'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/thep/build/gnome_svn/libsigc++2/docs/reference'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/thep/build/gnome_svn/libsigc++2/docs'
make: *** [install-recursive] Error 1
---8<---
Comment 1 Murray Cumming 2009-01-30 11:34:48 UTC
That's surprising. A patch would be welcome.
Comment 2 Theppitak Karoonboonyanan 2009-01-30 11:38:59 UTC
Created attachment 127528 [details] [review]
A fix

For sigc++/Makefile.am, I find the uncalled 'build-subdirs-stamp' rule. My quick hack is to put it as a dependency of the abstract rule for building *.{h,cc} from *.m4. This may not be optimal, but it works. Feel free to suggest a better way.

For docs/{manual,reference}/Makefile.am, I think the $(srcdir)/ prefixes are totally unnecessary. Just remove them and simply the build dir is meant instead.
Comment 3 Murray Cumming 2009-02-05 16:03:41 UTC
(In reply to comment #2)
> Created an attachment (id=127528) [edit]
> A fix
> 
> For sigc++/Makefile.am, I find the uncalled 'build-subdirs-stamp' rule.

I don't understand what the problem is there, so I hesitate to commit this patch.
Comment 4 Theppitak Karoonboonyanan 2009-02-05 16:50:12 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Created an attachment (id=127528) [edit]
> > A fix
> > 
> > For sigc++/Makefile.am, I find the uncalled 'build-subdirs-stamp' rule.
> 
> I don't understand what the problem is there, so I hesitate to commit this
> patch.

As said in the initial report, it fails to generate functors/functor_trait.h because $(builddir)/functors/ was not created.

Under sigc++/, functors/functor_trait.h is to be generated from functors/macros/functor_trait.h.m4. However, as functors/ subdir is not handled by autotools (e.g. not listed as SUBDIRS in Makefile.am), the make rules must take care to prepare it under $(builddir).

This appears to have already been prepared with the build-subdirs-stamp target, with the author's comment saying s/he's not sure where to invoke it. So, I just added it as a prerequisite to the generic rules, for one-time creation.
Comment 5 Theppitak Karoonboonyanan 2009-08-13 05:02:19 UTC
Resolved the bug as obsolete.

After recent document building system revamp in the git tree, all relevant changes proposed here become obsolete, and it now builds fine outside source tree. Thanks for the work!