Change to config(8) for OFED

M. Warner Losh imp at bsdimp.com
Sun Jun 13 08:37:33 UTC 2010


In message: <86zkz05bra.fsf at ds4.des.no>
            Dag-Erling Smørgrav <des at des.no> writes:
: "M. Warner Losh" <imp at bsdimp.com> writes:
: > but NORMAL_C is
: >
: > NORMAL_C= ${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 be
: > ${.ALLSRC}
: 
: .IMPSRC is the *implicit* source and is only valid in *implicit* rules.
: 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 .ALLSRC
: 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


More information about the freebsd-arch mailing list