]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
vala: avoid wrong regeneration of C files.
authorReuben Thomas <rrt@sc3d.org>
Sat, 28 Nov 2020 02:02:08 +0000 (18:02 -0800)
committerKarl Berry <karl@freefriends.org>
Sat, 28 Nov 2020 02:02:08 +0000 (18:02 -0800)
This change might fix https://bugs.gnu.org/44772.

* bin/automake.in (lang_val_finish_target): reverse -newer test
to handle files being created at the same time causing
spurious rebuilds.

bin/automake.in

index 31c72382af140627ae083a2fe0b945de71fecf5c..ce06437dbb08feef020246b0b2292a80bdd0dbdb 100644 (file)
@@ -5734,7 +5734,7 @@ sub lang_vala_finish_target
           my $built_dir = dirname $built_c_file;
           my $base_c_file = basename $c_file;
           $output_rules .= "$built_c_file: \$(builddir)/${derived}_vala.stamp\n"
-            . "\t\@if test ! -f \$@ && test \$(srcdir) != \$(builddir) && test -n \"\$\$(find -L \$(srcdir)/$c_file -prune -newer \$(srcdir)/$vala_file)\"; then cp -p \$(srcdir)/$c_file $built_c_file; fi\n"
+            . "\t\@if test ! -f \$@ && test \$(srcdir) != \$(builddir) && test -n \"\$\$(find -L \$(srcdir)/$vala_file -prune \! -newer \$(srcdir)/$c_file)\"; then cp -p \$(srcdir)/$c_file $built_c_file; fi\n"
             . "\t\@if test -f \$@; then :; else rm -f \$(builddir)/${derived}_vala.stamp; fi\n"
             . "\t\@if test -f \$@; then :; else \\\n"
             . "\t  \$(MAKE) \$(AM_MAKEFLAGS) \$(builddir)/${derived}_vala.stamp; \\\n"