[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple makefiles and rules for CONFIG_HEADER and CONFIG_FILE entries

From: Sander Niemeijer
Subject: Multiple makefiles and rules for CONFIG_HEADER and CONFIG_FILE entries
Date: Thu, 13 Feb 2003 13:31:13 +0100


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 by configure. Now I recently discovered that automake places the rules to rebuild foo.h from (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 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 (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/ dir2/foo.h:inc/]), but I would rather generate only one version of foo.h in the directory where 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]