On Sun, 2014-10-26 at 17:40 +0100, Sébastien Wilmet wrote: > Hello, > > 'make distcheck' fails for a module I maintain (LaTeXila): > > make[5]: Entering directory > '/home/seb/gnome/latexila/latexila-3.14.1/_build/src' > rm -f ../../src/latexila_vala.stamp && echo stamp > > ../../src/latexila_vala.stamp-t > rm: cannot remove ‘../../src/latexila_vala.stamp’: Permission denied > Makefile:1475: recipe for target '../../src/latexila_vala.stamp' failed > make[5]: *** [../../src/latexila_vala.stamp] Error 1 > > It's because the latexila-3.14.1/src/ directory doesn't have write > permissions, it's all read-only (make distcheck is testing builddir != > srcdir after extracting the tarball). > > Normally only the C code should be compiled, but it seems that valac > tries to run. It was not the case before. What has changed recently in > LaTeXila is that an internal library in C has been written, with GObject > Introspection support and vapigen to generate a .vapi that the Vala code > uses. > > I know Vala has some problems with builddir != srcdir: > https://bugzilla.gnome.org/show_bug.cgi?id=694153 > > But I don't know why valac is run during 'make distcheck'. And I prefer to > run 'make distcheck' instead of 'make dist' for rolling tarballs. It's > maybe an interference with GOBJECT_INTROSPECTION_CHECK or VAPIGEN_CHECK > in configure.ac. > > Any help would be greatly appreciated. LaTeXila is available there: > https://git.gnome.org/browse/latexila/ > > 'make distcheck' fails for the master branch, but it succeeds for the > gnome-3-14 branch.
make distcheck is running because you have liblatexila/latexila.vapi in latexila_SOURCES. That means that make will rebuild latexila whenever the timestamp on liblatexila/latexila.vapi is newer than the stamp file. liblatexila/latexila.vapi isn't included in the dist tarball, so it will always be generated and therefor newer than the version in the stamp file. Even if it *were* included in the dist tarball, it is automatically rebuilt whenever the GIR changes. You should probably add the VAPI to EXTRA_DIST if you want to avoid a hard dependency on vapigen. Additionally, instead of listing it in latexila_SOURCES, change latexila_VALAFLAGS to include --vapidir liblatexila --pkg latexila. Patch attached. -Evan
diff --git a/src/Makefile.am b/src/Makefile.am index 1946bd3..bdd5b42 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,7 +8,9 @@ VALAFLAGS = \ --pkg gtkspell3-3.0 \ --pkg gee-0.8 \ --pkg posix \ - --target-glib=2.40 + --target-glib=2.40 \ + --vapidir liblatexila \ + --pkg latexila # The valac command is always executed in the sources directory, not the build # directory. If $(top_srcdir) is used, it will be relative to the build directory. @@ -61,8 +63,7 @@ latexila_SOURCES = \ $(vala_files) \ $(vapidir)/config.vapi \ $(vapidir)/gedit.vapi \ - $(vapidir)/menu_tool_action.vapi \ - liblatexila/latexila.vapi + $(vapidir)/menu_tool_action.vapi latexila_CPPFLAGS = \ -I$(top_srcdir) \ diff --git a/src/liblatexila/Makefile.am b/src/liblatexila/Makefile.am index d438b57..430b3ca 100644 --- a/src/liblatexila/Makefile.am +++ b/src/liblatexila/Makefile.am @@ -102,6 +102,8 @@ latexila_vapi_FILES = Latexila.gir noinst_DATA += latexila.vapi CLEANFILES += latexila.vapi +EXTRA_DIST = latexila.vapi + endif # ENABLE_VAPIGEN -include $(top_srcdir)/git.mk
signature.asc
Description: This is a digitally signed message part
_______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list