Re: how to manage make(1) dependencies on gnulib-generated header files

Bruno Haible via Gnulib discussion list <[email protected]> Wed, 29 Jul 2026 00:07:12 +0200
Newsgroups gmane.comp.lib.gnulib.bugs,gmane.comp.printing.groff.general
Message-ID <11141360.VV5PYv0bhD@cagnes>
Paul Eggert wrote:
> The basic problem here, by the way, is that Automake automatically makes =
overall targets like 'all' depend on $(BUILT_SOURCES), but does not do the =
same for subsidiary targets like doc/groff-man-pages.pdf. If you don't want=
 to mess with dependencies (quite understandable), your best answer might b=
e "Don't do that." I.e., don't try to build individual targets until after =
you've done a plain "make".

Yes, exactly. Quoting the Automake documentation [1]:
  "To emphasize, BUILT_SOURCES is honored only by =E2=80=98make all=E2=80=
=99, =E2=80=98make check=E2=80=99,
   =E2=80=98make install=E2=80=99, and make install-exec (and =E2=80=98make=
 dist=E2=80=99). This means you
   cannot build an arbitrary target (e.g., =E2=80=98make foo=E2=80=99) in a=
 clean tree if
   it depends on a built source. However it will succeed if you have run
   =E2=80=98make all=E2=80=99 earlier, because accurate dependencies are al=
ready available."

[1] https://www.gnu.org/software/automake/manual/html_node/Sources.html