Path: utzoo!attcan!uunet!mcsun!cernvax!chx400!mecazh!paul From: paul@mecazh.uu.ch (Paul Breslaw) Newsgroups: comp.sys.hp Subject: Re^2: GNU Make 3.58 on HP-UX 7.0 ? Message-ID: <434@node17.mecazh.uu.ch> Date: 1 Oct 90 19:50:10 GMT References: <1990Sep17.201337.15659@bpdsun1.uucp> <7370218@hpfcso.HP.COM> Organization: Mecasoft SA, Zurich, Switzerland Lines: 41 Instead of all this political GNU/HP bashing, would anyone mind if I went back to the original subject of this discussion, namely GNUmake, and could someone help me with the following observation. Here is a Makefile OBJ = foo.o all: $(OBJ) @echo $(OBJ) up to date foo.o: foo.h foo.c cc -o foo.o $< Now $ gnumake -n cc -o foo.o foo.h <== observe echo foo.o up to date $ /bin/make -n cc -o foo.o foo.c <== observe echo foo.o up to date The GNUmake documentation defines $< as the name of the *first* dependency. The HPmake documentation says it is evaluated only for inference rules (or the .DEFAULT) rule. (Hence the meaningless symbolic target 'all'. Without it $< doesn't get evaluated at all, and I get cc -o foo.o as output) Can someone explain why so simple a Makefile is treated so differently by the two make's. And, if the question is not meaningless, which is correct? Paul Breslaw -- Paul Breslaw, Mecasoft SA, | telephone : 41 1 362 2040 Guggachstrasse 10, CH-8057 Zurich, | e-mail : paul@mecazh.uu.ch Switzerland. | mcsun!chx400!mecazh!paul