GNOME Bugzilla – Bug 581869
anjuta fails to build outside source tree
Last modified: 2009-05-08 15:13:32 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.
Created attachment 134255 [details] [review] Adjust make rules and CFLAGS
Thanks, please push this!
Done: http://git.gnome.org/cgit/anjuta/commit/?id=6136a041cf3eeab9b1e915407f4d71169c6c97aa