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 581869 - anjuta fails to build outside source tree
anjuta fails to build outside source tree
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: unknown
git master
Other Linux
: Normal minor
: ---
Assigned To: Anjuta maintainers
Anjuta maintainers
Depends on:
Blocks: 569778
 
 
Reported: 2009-05-08 14:05 UTC by Theppitak Karoonboonyanan
Modified: 2009-05-08 15:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adjust make rules and CFLAGS (5.40 KB, patch)
2009-05-08 14:11 UTC, Theppitak Karoonboonyanan
accepted-commit_now Details | Review

Description Theppitak Karoonboonyanan 2009-05-08 14:05:15 UTC
Compiling Anjuta from outside source tree (builddir != srcdir) fails in several places:

* plugins/message-view:

---8<---
/home/thep/vcs/gnome_git/anjuta/scripts/builder2schema.pl /home/thep/vcs/gnome_git/anjuta/plugins/message-view//home/thep/vcs/gnome_git/anjuta/plugins/message-view/anjuta-message-manager-plugin.ui > anjuta-message-manager-plugin.schemas
Couldn't open /home/thep/vcs/gnome_git/anjuta/plugins/message-view//home/thep/vcs/gnome_git/anjuta/plugins/message-view/anjuta-message-manager-plugin.ui:
No such file or directory at /home/thep/vcs/gnome_git/anjuta/scripts/builder2schema.pl line 29
make[3]: *** [anjuta-message-manager-plugin.schemas] Error 2
make[3]: Leaving directory `/home/thep/build/gnome_git/anjuta/plugins/message-view'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/thep/build/gnome_git/anjuta/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thep/build/gnome_git/anjuta'
make: *** [all] Error 2
---8<---

This is caused by $(top_srcdir)/scripts/build-schemas.mk included from Makefile.am:

%.schemas: %.ui
       $(top_srcdir)/scripts/builder2schema.pl $(srcdir)/$(?) > $(@)

"$?" already represents changed dependencies, with full/relative path as necessary. Prefixing it with $(srcdir) appears to be redundant. And, from builder2schema.pl source, it takes only one argument. So, using "$<" to apply only the first dependency seems sensible.

* plugins/debug-manager:

---8<---
Making all in debug-manager
make[3]: Entering directory `/home/thep/build/gnome_git/anjuta/plugins/debug-manager'
echo "#include \"anjuta-marshal.h\"" > anjuta-marshal.c && \
        glib-genmarshal anjuta-marshal.list --body --prefix=anjuta_marshal >> anjuta-marshal.c

(process:10028): GLib-Genmarshal-WARNING **: failed to open "anjuta-marshal.list": No such file or directory
make[3]: *** [anjuta-marshal.c] Error 1
make[3]: Leaving directory `/home/thep/build/gnome_git/anjuta/plugins/debug-manager'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/thep/build/gnome_git/anjuta/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thep/build/gnome_git/anjuta'
make: *** [all] Error 2
---8<---

This is caused by a rule in Makefile.am itself:

anjuta-marshal.c: anjuta-marshal.list
        echo "#include \"anjuta-marshal.h\"" > $@ && \
        glib-genmarshal anjuta-marshal.list --body --prefix=anjuta_marshal >> $@

Referring to source file "anjuta-marshal.list" directly doesn't work when builddir != srcdir, as the file is not available in builddir. Rather, "$<" should work here.

* plugins/file-manager:
* plugins/glade:
* plugins/sourceview:

Similarly.

* plugins/git:

---8<---
In file included from /home/thep/vcs/gnome_git/anjuta/plugins/git/git-status.h:2
9,
                 from /home/thep/vcs/gnome_git/anjuta/plugins/git/git-status-com
mand.h:30,
                 from /home/thep/vcs/gnome_git/anjuta/plugins/git/git-vcs-interf
ace.h:33,
                 from /home/thep/vcs/gnome_git/anjuta/plugins/git/plugin.c:23:
/home/thep/vcs/gnome_git/anjuta/libanjuta/anjuta-vcs-status-tree-view.h:30:31: e
rror: anjuta-enum-types.h: No such file or directory
make: *** [plugin.lo] Error 1
---8<---

anjuta-enum-types.h is generated file. So, it's located under builddir, and LIBANJUTA_CFLAGS should include -I$(top_builddir)/libanjuta to reach it.
Comment 1 Theppitak Karoonboonyanan 2009-05-08 14:11:12 UTC
Created attachment 134255 [details] [review]
Adjust make rules and CFLAGS
Comment 2 Johannes Schmid 2009-05-08 14:54:05 UTC
Thanks, please push this!