foreach my $vala_file (@vala_sources)
{
my $c_file = $vala_file;
- $output_rules .= "\$(srcdir)/$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"
- if $c_file =~ s/(.*)\.vala$/$1.c/;
+ 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;
+ }
}
# Add rebuild rules for generated header and vapi files
if (grep (/$lastflag/, ('-H', '-h', '--header', '--internal-header',
'--vapi', '--internal-vapi', '--gir')))
{
- my $headerfile = $flag;
- $output_rules .= "\$(srcdir)/$headerfile: \$(srcdir)/${derived}_vala.stamp\n"
+ my $headerfile = "\$(srcdir)/$flag";
+ $output_rules .= "$headerfile: \$(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"
my $verbose = verbose_flag ('VALAC');
my $silent = silent_flag ();
+ my $stampfile = "\$(srcdir)/${derived}_vala.stamp";
$output_rules .=
"\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
"\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
"\t${silent}mv -f \$\@-t \$\@\n";
- push_dist_common ("${derived}_vala.stamp");
+ push_dist_common ($stampfile);
- $clean_files{"${derived}_vala.stamp"} = MAINTAINER_CLEAN;
+ $clean_files{$stampfile} = MAINTAINER_CLEAN;
}
# Add output rules to invoke valac and create stamp file as a witness
AM_VALAFLAGS = --profile=posix
foo_SOURCES = hello.vala
bar_VALAFLAGS = $(AM_VALAFLAGS) -H zardoz.h
-bar_SOURCES = $(foo_SOURCES)
+bar_SOURCES = goodbye.vala
END
cat > hello.vala <<'END'
stdout.printf ("foofoofoo\n");
}
END
+cp hello.vala goodbye.vala
$ACLOCAL
$AUTOCONF
$MAKE clean
test -f ../foo_vala.stamp
test -f ../bar_vala.stamp
-grep barbarbar ../hello.c
+test -f ../zardoz.h
+test -f ../hello.c
$MAKE maintainer-clean
-# FIXME: Generated C files and stamp files doesn't get correctly
-# FIXME: cleaned in a VPATH build.
-#test ! -f ../hello.c
-#test ! -f ../foo_vala.stamp
-#test ! -f ../bar_vala.stamp
+test ! -f ../zardoz.h
+test ! -f ../hello.c
+test ! -f ../foo_vala.stamp
+test ! -f ../bar_vala.stamp
: