Subject: BUILT_SOURCES not honoured in parallel build?

From: Reuben Thomas <[email-masked]>
Date: Wed, 12 Apr 2023 16:17:07 +0100

I am bootstrapping GNU a2ps git master[1] with automake 1.16.5. When I do a
parallel build (in my case, MAKEFLAGS=-j4), I get build failures sometimes:

$ make all
make  all-am
make[1]: Entering directory '/home/rrt/.local/var/repo/a2ps/src'
  YACC     parsessh.c
  CC       libparse_a-lexssh.o
/home/rrt/repo/a2ps/src/ylwrap1077905
lexssh.c:38:11: fatal error: parsessh.h: No such file or directory
   38 |  #include "parsessh.h"
      |           ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:1710: libparse_a-lexssh.o] Error 1
make[1]: *** Waiting for unfinished jobs....
parsessh.output is unchanged
updating parsessh.h
make[1]: Leaving directory '/home/rrt/.local/var/repo/a2ps/src'
make: *** [Makefile:1514: all] Error 2

But parsessh.h is listed in BUILT_SOURCES, so it should be built before any
other target.

[1] git clone https://git.savannah.gnu.org/git/a2ps.git

-- 
https://rrt.sc3d.org