From owner-freebsd-current Mon Apr 1 02:45:43 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA16107 for current-outgoing; Mon, 1 Apr 1996 02:45:43 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id CAA16102 for ; Mon, 1 Apr 1996 02:45:39 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id UAA14428; Mon, 1 Apr 1996 20:44:34 +1000 Date: Mon, 1 Apr 1996 20:44:34 +1000 From: Bruce Evans Message-Id: <199604011044.UAA14428@godzilla.zeta.org.au> To: current@freebsd.org, fenner@parc.xerox.com Subject: Re: Another "does LINT compile?" question Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >The "make" released with 2.1 doesn't appear to ever do much with the >"$<" makefile variable when the target doesn't have a suffix; if I do >foo: foo.c > echo $< >I get >% make >echo >% >The only difference in "make" from 2.1 to -current is >revision 1.5 >... The difference is actually in sys.mk. The 2.1 make works if the null suffix `.c:' rule in sys.mk is uncommented. There used to be bugs in make that stopped this rule from working. However, these bugs were fixed long before 2.1R. The rule is still commented out in -stable. Sigh. >/sys/compile/LINT/Makefile ends up using $< when building linux_genassym: >linux_genassym: $S/i386/linux/linux_genassym.c $S/i386/linux/linux.h > ${CC} ${CFLAGS} -o $@ $< This is a bug in the Makefile. In the original version of make, `$<' was only valid for targets generated by a suffix rule. Some versions of make, e.g., gnu make, generate a useful `$<' for explicit rules. Our make doesn't. E.g., the makefile bar: foo.c echo $< works "right" for gnu make but not for BSD make. The linux_genassym rule works right in -current because the null suffix rule is matched and is bogusly not completely overridden by the explict rule. The genassym rule works right even in 2.1 because it uses genassym.o and not $<. See the cvs log for revision 1.48 for why the intermediate file genassym.o is built. `$<' is also bogus for hundreds of other explicit rules in the kernel Makefile. E.g., in ${NORMAL_C} it works because the implicit .c.o rule is matched and is bogusly not completely overridden by the explicit rule. >I have a shell script that tries to build LINT nightly and sends me email >if it fails. Perhaps this output should go to the mailing list? Only once a week until all the warnings are fixed. Bruce