From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] tools top level makefile cleanup Date: Wed, 23 Mar 2005 14:48:12 -0600 Message-ID: <4241D60C.5090205@us.ibm.com> References: <1111525821.3796.4.camel@thinkpad> <1111527994.3796.16.camel@thinkpad> <200503231415.41327.hollisb@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <200503231415.41327.hollisb@us.ibm.com> Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Hollis Blanchard Cc: xen-devel@lists.sourceforge.net, Adam Heath , Jerone Young List-Id: xen-devel@lists.xenproject.org Hollis Blanchard wrote: >Well, I guess it's not very dissimilar after all. > >But I really don't like that for every command to recurse with (e.g. clean), >you must add more hackery to the Makefile. Your snippet has the same problem >(let's add "clean"...), and it seems all the Makefiles have all the issues >discussed in different places. > >Is there really no better way to solve this problem? > > The following works for me. You need a default rule or else make gets really confused but the wildcard rule will catch everything else. SUBDIRS=sub sub1 all: @for i in $(SUBDIRS); do \ $(MAKE) -C $$i $@; \ done %: @for i in $(SUBDIRS); do \ $(MAKE) -C $$i $@; \ done ------------------------------------------------------- This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click