Date: Sun, 13 Jun 2010 02:32:23 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: des@des.no Cc: arch@FreeBSD.org Subject: Re: Change to config(8) for OFED Message-ID: <20100613.023223.972525811890973035.imp@bsdimp.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <86zkz05bra.fsf@ds4.des.no> Dag-Erling Sm=F8rgrav <des@des.no> writes: : "M. Warner Losh" <imp@bsdimp.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100613.023223.972525811890973035.imp>