GNU bug report logs -
#12540
Usage of srcdir when valac is generating a header file
Previous Next
Reported by: Vivien Malerba <vmalerba <at> gmail.com>
Date: Sat, 29 Sep 2012 17:59:01 UTC
Severity: normal
Tags: wontfix
Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi!
I'm working on the Libgda project, which includes Vala source code. I use
the Autotools to generate the Makefiles and I've noticed that during the
conversion of vala code to C an H code a .stamp file is generated (from
what I understand, that timestamped file is then a dependency for all the
Vala files' conversion). The Automake's code to make that happen is:
foreach my $vala_file (@vala_sources)
{
my $c_file = $vala_file;
if ($c_file =~ s/(.*)\.vala$/$1.c/)
{
$c_file = "\$(srcdir)/$c_file";
$output_rules .= "$c_file: \$(srcdir)/${derived}_vala.stamp\n"
. "\t\@if test -f \$@; then :; else rm -f
\$(srcdir)/${derived}_vala.stamp; fi\n"
. "\t\@if test -f \$@; then :; else \\\n"
. "\t \$(MAKE) \$(AM_MAKEFLAGS)
\$(srcdir)/${derived}_vala.stamp; \\\n"
. "\tfi\n";
$clean_files{$c_file} = MAINTAINER_CLEAN;
}
}
You can see that the .stamp file is generated in the $(srcdir) directory
instead of $(builddir), which breaks the rule when building out of sources.
My suggestion is to replace $(srcdir) with $(builddir) (this timestamp file
is also a build dependency for each vala file, so there is more code
impacted than the snippet above).
Best regards,
Vivien
[Message part 2 (text/html, inline)]
This bug report was last modified 12 years and 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.