<http://thread.gmane.org/gmane.comp.sysutils.automake.patches/3721>
Hello Bahjat, * Bahjat Salem wrote on Sun, Oct 25, 2009 at 03:17:43PM CET: > Added support for VPATH builds when compiling Vala sources. > * automake.in (lang_vala_finish_target): Rewrote the .stamp file > target commands, and simplified .c and .h target commands. > > Please ignore my previous (failed) patch : > http://www.mail-archive.com/bug-autom...@gnu.org/msg01597.html Thanks for your patch. In order to be able to judge its impact, I would like to see an example that is broken without the patch and works with the patch, and I'd like to add a test to this extent to the Automake test suite, to ensure it isn't broken again later. Please also note that nontrivial patches need copyright assignment (details off-list). The patch you posted so far is small enough not to need it, but with a testcase it won't be. So if you do not assign or disclaim then please don't post a patch for a test case but only describe it in words, so we can write an unencumbered one. Thanks, Ralf > From 668c22b2f132893daa125a586faed3cb958ef1c9 Mon Sep 17 00:00:00 2001 > From: Bahjat SALEM <bahjat.sa...@telecom-bretagne.eu> > Date: Sun, 25 Oct 2009 14:34:19 +0100 > Subject: [PATCH] VPATH builds with Vala > > Problem solved: > Build failure on a VPATH build. > > How the problem was solved: > Made automake put the .stamp file and the .c sources in the source tree. > > Typical usage scenarii tested: > 1. C sources have not yet been generated by $(VALAC). VPATH build. > mkdir build && cd build && autoreconf -vfi .. && ../configure && make > 2. C sources have not yet been generated by $(VALAC). Normal build. > autoreconf -vfi && ./configure && make > 3. C sources have already been generated by the package maintainer's > $(VALAC). The sources are included in the package and do not need to > be generated again. > ./configure && make > 4. Same as 3. > mkdir build && cd build && ../configure && make > > Please ignore my previous (failed) patch. > http://www.mail-archive.com/bug-autom...@gnu.org/msg01597.html > --- a/automake.in > +++ b/automake.in > @@ -5979,11 +5979,7 @@ sub lang_vala_finish_target ($$) > { > foreach my $file ($var->value_as_list_recursive) > { > - $output_rules .= "\$(srcdir)/$file: > \$(srcdir)/${derived}_vala.stamp\n". > - "\...@if test -f \$@; then :; else \\\n". > - "\t rm -f \$(srcdir)/${derived}_vala.stamp; \\\n". > - "\t \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) > ${derived}_vala.stamp; \\\n". > - "\tfi\n" > + $output_rules .= "\$(srcdir)/$file: > \$(srcdir)/${derived}_vala.stamp\n" > if $file =~ s/(.*)\.vala$/$1.c/; > } > } > @@ -5999,11 +5995,7 @@ sub lang_vala_finish_target ($$) > '--vapi', '--internal-vapi', '--gir'))) > { > my $headerfile = $flag; > - $output_rules .= "\$(srcdir)/$headerfile: > \$(srcdir)/${derived}_vala.stamp\n". > - "\...@if test -f \$@; then :; else \\\n". > - "\t rm -f \$(srcdir)/${derived}_vala.stamp; \\\n". > - "\t \$(am__cd) \$(srcdir) && \$(MAKE) \$(AM_MAKEFLAGS) > ${derived}_vala.stamp; \\\n". > - "\tfi\n"; > + $output_rules .= "\$(srcdir)/$headerfile: > \$(srcdir)/${derived}_vala.stamp\n"; > > # valac is not used when building from dist tarballs > # distribute the generated files > @@ -6035,9 +6027,8 @@ sub lang_vala_finish_target ($$) > my $silent = silent_flag (); > > $output_rules .= > - "${derived}_vala.stamp: \$(${derived}_SOURCES)\n". > - "\t${verbose}${compile} \$(${derived}_SOURCES)\n". > - "\t${silent}touch \...@\n"; > + "\$(srcdir)/${derived}_vala.stamp: \$(${derived}_SOURCES)\n". > + "\t${verbose}\$(am__cd) \$(srcdir) && ${compile} \$(${derived}_SOURCES) > && touch \$(abs_srcdir)/${derived}_vala.stamp\n"; > > push_dist_common ("${derived}_vala.stamp"); >