From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14872 invoked by alias); 8 Mar 2004 16:24:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 14853 invoked from network); 8 Mar 2004 16:24:21 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 8 Mar 2004 16:24:21 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DF4EA2B98; Mon, 8 Mar 2004 11:24:20 -0500 (EST) Message-ID: <404C9E34.4010809@gnu.org> Date: Mon, 08 Mar 2004 16:24:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Generate makefile dependencies References: <404BBFD6.1060702@gnu.org> <6137-Mon08Mar2004080725+0200-eliz@elta.co.il> In-Reply-To: <6137-Mon08Mar2004080725+0200-eliz@elta.co.il> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00156.txt Message-ID: <20040308162400.KckapSgPg5SiUrC8r49A-x52sw9bnLasB4lh2KgDS3A@z> >>Date: Sun, 07 Mar 2004 19:35:34 -0500 >>> From: Andrew Cagney >>> >>> The attached, er, hack, modifies configure.in so that all the Makefile >>> dependencies are generated during configure time: >>> >>> defs_h = ... >>> foo.o: foo.c $(defs_h) >>> >>> It exploits the fact that GDB's code base is very consistent in its use >>> of "foo.h" vs -- the former is assumed to be local, the latter >>> in a system library. > > > Won't it be better to use "gcc -MM" when we compile with GCC? It would, except we can't assume GCC :-(. Better to always use the sed script as that way we'll know it always (hopefully :-) works. It needs comments (and a doco update). Andrew