From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13581 invoked by alias); 12 Jul 2011 21:09:40 -0000 Received: (qmail 13571 invoked by uid 22791); 12 Jul 2011 21:09:39 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 21:09:04 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6CL8vql000640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Jul 2011 17:08:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6CL8uaQ031982; Tue, 12 Jul 2011 17:08:57 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p6CL8t7s012846; Tue, 12 Jul 2011 17:08:55 -0400 From: Tom Tromey To: Mike Frysinger Cc: gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Subject: Re: [PATCH] sim: generate build dependencies on the fly References: <1310436152-8693-1-git-send-email-vapier__46811.2245122485$1310436164$gmane$org@gentoo.org> Date: Tue, 12 Jul 2011 21:15:00 -0000 In-Reply-To: (Mike Frysinger's message of "Tue, 12 Jul 2011 16:41:57 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00326.txt.bz2 >>>>> "Mike" =3D=3D Mike Frysinger writes: Tom> Why is that? Mike> it didnt seem to work :). if the dependency generation step is done Mike> inline with the compile step, how can we figure out the dependency Mike> info of a header file that is generated ? does gdb handle this and i Mike> just missed it in its Makefile ? Ok, I see. I misunderstood what you meant. GDB arranges for generated files to be built early, via order-only dependencies. Order-only dependencies ensure that merely touching one of the generated files doesn't cause a global recompile. The relevant code is down near the end of gdb/Makefile.in: # Ensure that generated files are created early. Use order-only # dependencies if available. They require GNU make 3.80 or newer, # and the .VARIABLES variable was introduced at the same time. @GMAKE_TRUE@ifdef .VARIABLES @GMAKE_TRUE@$(all_object_files): | $(generated_files) @GMAKE_TRUE@else $(all_object_files) : $(generated_files) @GMAKE_TRUE@endif Tom> Finally I thought there was some problem with multiple entries in VPAT= H, Tom> but I cannot find that in the docs. =C2=A0Perhaps it is one of those a= ncient Tom> incorrect memories. =C2=A0It would bear testing with a non-GNU make. Mike> sounds like all good reasons to use automake :). otherwise all the Mike> files in common/ need manual deps (like gdb does with files in Mike> subdirs), and that semi-defeats the purpose of this in the first Mike> place. Yeah. I am not actually sure how well Automake would currently handle sources in "../common/". Neither here nor there I guess. Fedora includes the BSD make (yum install bmake); I assume other distros do too. So you could try a build with that. Mike> yeah ... i didnt notice as my stuff all went through gcc for dep info. Mike> probably better to use $(srcroot)/depcomp. You can edit the Makefile.in or generated Makefile slightly to test the non-gcc3 path. Tom