Hi,

I have a package that uses multiple makefiles: one toplevel makefile and some makefiles in subdirectories.
The build in several of these subdirectories requires the use of a single include file (lets call it foo.h) that is created from foo.h.in by configure. Now I recently discovered that automake places the rules to rebuild foo.h from foo.h.in (with the use of a stamp-h* file) in the Makefile of the directory where foo.h will appear if that directory has a Makefile and otherwise put it in the toplevel Makefile. But it won't put these rules in any of the other Makefiles.
Of course this leaves me with a problem if I change foo.h.in and perform a make, since for targets in my subdirectories that depend on foo.h make won't try to rebuild foo.h and thus these targets won't be rebuild either.

I would like to know whether anybody knows a way to have the foo.h.in -> foo.h (with appropriate stamp-h* usage) dependencies included in all my makefiles that contain targets with dependencies on foo.h.

I'm currently considering to let configure create a separate foo.h in each of the directories that need foo.h (through a AC_CONFIG_HEADERS([dir1/foo.h:inc/foo.h.in dir2/foo.h:inc/foo.h.in]), but I would rather generate only one version of foo.h in the directory where foo.h.in resides.

And I already know that using only one Makefile for my project would also solve the problem, but I would rather like to know whether my problem would also be solvable within a multiple Makefile project.

Regards,
Sander



Reply via email to