[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$< won't work
From: |
Dave |
Subject: |
$< won't work |
Date: |
Tue, 23 Jul 2002 05:13:31 -0700 (PDT) |
# "touch foo.c bar.c baz.c" before testing
OBJ = foo.o bar.o baz.o
all: $(OBJ)
$(OBJ):
@echo $@ $<
Under NetBSD's make(1), the above Makefile prints the following:
foo.o foo.c
bar.o bar.c
baz.o baz.c
But with GNU make(1), I get this:
foo.o
bar.o
baz.o
Xmame (http://x.mame.net) requires GNU make(1) to compile and uses $< in
various places. $< works just fine there. What am I doing wrong?
Sidenote: How about implementing local variables like .ALLSRC, .TARGET,
and so on? (see *BSD make(1) manpage). Someone posted a while ago about
pursuading the FreeBSD people to implement $> (a form which is implemented
in NetBSD's make(1) but not recommended).
--
David Griffith
address@hidden