From owner-freebsd-arch@FreeBSD.ORG Sun Jun 13 08:37:33 2010 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40738106566B for ; Sun, 13 Jun 2010 08:37:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 024058FC08 for ; Sun, 13 Jun 2010 08:37:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o5D8WKGu016628; Sun, 13 Jun 2010 02:32:20 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 13 Jun 2010 02:32:23 -0600 (MDT) Message-Id: <20100613.023223.972525811890973035.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86zkz05bra.fsf@ds4.des.no> References: <20100612.101458.10150326125744273.imp@bsdimp.com> <20100612.111805.94843338670897167.imp@bsdimp.com> <86zkz05bra.fsf@ds4.des.no> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@FreeBSD.org Subject: Re: Change to config(8) for OFED X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2010 08:37:33 -0000 In message: <86zkz05bra.fsf@ds4.des.no> Dag-Erling Sm=F8rgrav writes: : "M. Warner Losh" writes: : > but NORMAL_C is : > : > NORMAL_C=3D ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} : > : > and .IMPSRC is null. That seems like a bug to me, but I'm not sure= if : > the bug is that .IMPSRC is computed wrong, or if it really should b= e : > ${.ALLSRC} : = : .IMPSRC is the *implicit* source and is only valid in *implicit* rule= s. : Consider the following: : = : .SUFFIXES: .foo .bar : .foo.bar: foo2bar.sh : /bin/sh foo2bar.sh ${.IMPSRC} ${.TARGET} : = : When building hello.bar from hello.foo, .IMPSRC is "hello.foo" but .A= LLSRC : is "hello.foo foo2bar.sh". Yes, it appears to be set only when the target matches the object, so the .c.o rule matches, even if the more specific one is used (where there is not a match). : GNU make has a way of defining more complex implicit rules (pattern : rules). If we had something similar, we could do: : = : foo_%.o: %.c : ${NORMAL_C} Yes. I'm starting to think that this would be necessary to implement this properly. Or, as Jeff suggested, have config generate a complete compile line with -o foo_bar.o -c bar.c in the line... Warner