From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992630AbXCBROn (ORCPT ); Fri, 2 Mar 2007 12:14:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S2992638AbXCBROm (ORCPT ); Fri, 2 Mar 2007 12:14:42 -0500 Received: from out5.smtp.messagingengine.com ([66.111.4.29]:59423 "EHLO out5.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992630AbXCBROX convert rfc822-to-8bit (ORCPT ); Fri, 2 Mar 2007 12:14:23 -0500 Message-Id: <1172855662.23830.1177403935@webmail.messagingengine.com> X-Sasl-Enc: E+PX6mfYvR1Y59vAgUrunQ4Ji2SSQ/X+W2zkyVwbc/tV 1172855662 From: "FN" To: linux-kernel@vger.kernel.org Content-Disposition: inline Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-Mailer: MessagingEngine.com Webmail Interface Subject: module builds need improvement / top Makefile not good enough Date: Fri, 02 Mar 2007 09:14:22 -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hello list, I am unhappy with the direction the 2.6 kernel builds have taken. Very much like Micro$loth DDKs we (linux users) are being forced to build modules by plugging into a framework that doesn't respect the fine aspects of dependency generation and analysis. Two problems I've identified 1. module builds are forcing me to use a particular make program (gnu make) Well, what if someone uses a different tool to express the DAG (dep. graph)? 2. gnu make is a somewhat dated program and can't do profound dependency generation and analysis like some newer tools. All it can do is produce .d from .c with the -MM option using an idiom like this -include f1.d f2.d %.d: %.c $(CC) -MM But that's not good enough for 2 reasons. a) version rollback that causes timestamp rollback in time does NOT trigger regeneration of dependencies (e.g. clearcase based builds). b) dependencies on order of things can't be expressed in gnu make, for example -Iinc1 -Iinc2 causes different results from -Iinc2 -Iinc1 if you have 2 different header files that have the same name in both directories. Same goes for "ld -r -o mod.o f1.o f2.o" vs "ld -r -o mod.o f2.o f1.o" if order mattered (which it doesn't in this case). Bottom line - there exist free tools that are vastly superior to gnu make, one such example is omake, and I don't want you to force me to switch to inferior dependency analysis with gnu make. My suggestion how to solve this problem is the following. Instead of gnumake -C /lib/modules/`uname -r`/build M=`pwd` modules it's better to be able to do gnumake -C /lib/modules/`uname -r`/build M=`pwd` MYMAKE=mymake modules and then inside your gnu Makefile you'd call mymake like so chdir $(M) mymake MODFLAGS="whatever modflags" INCFLAGS="whatever incflags" modules and pass on whatever flags are necessary. You can set MYMAKE to gmake if unspecified thus "MYMAKE ?= make" That would make the callback into the user's build environment clean and unbind it from gnu make. Any replies, critique -- cc me, as I am not on this list. -- FN zzzz444@ml1.net -- http://www.fastmail.fm - And now for something completely different…