From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtfTG-00053t-Rh for qemu-devel@nongnu.org; Mon, 01 Jul 2013 10:52:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtfTF-00021e-Ex for qemu-devel@nongnu.org; Mon, 01 Jul 2013 10:52:50 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:41125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtfTF-00021T-8H for qemu-devel@nongnu.org; Mon, 01 Jul 2013 10:52:49 -0400 Message-ID: <51D197BF.8000309@msgid.tls.msk.ru> Date: Mon, 01 Jul 2013 18:52:47 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1371576844-28743-1-git-send-email-mjt@msgid.tls.msk.ru> <51D04EA6.6020806@suse.de> <51D05090.40304@msgid.tls.msk.ru> <51D18681.6050805@redhat.com> <51D1959B.50803@msgid.tls.msk.ru> <51D1964F.6040904@suse.de> In-Reply-To: <51D1964F.6040904@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 0/4] per-object libraries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Paolo Bonzini , qemu-devel@nongnu.org 01.07.2013 18:46, Andreas F=E4rber wrote: [] >> What's wrong with a single makefile for everything, except >> of the need to use full pathnames from the top-level source >> dir? >=20 > In short the problem we ran into was missing *.d inclusions. > This got fixed by automatically expanding net/ to -include > net/Makefile.objs and -include net/*.d or so. -include $(pathsubst %.o=3D%.d,$(all-objs)) ? With a requiriment that all actually compiled objects be listed in $(all-objs) somehow, either by adding them to one of the common $(obj-y) or $(common-obj-m), or explicitly adding them to $(all-objs) if it is used in some custom way. Also, it can be done even funnier, something like this: subdirs =3D custom_subdir1 custom_subdir2 subdirs :=3D $(sort $(subdirs) $(dirname $(objs))) -include *.d $(pathsubst %=3D%/*.d,$(dirs)) or just list all subdirs explicitly in $(subdirs). There's nothing fancy in there really. Thanks, /mjt