make bug

Claus Tondering ct at dde.uucp
Sat Dec 31 00:01:55 AEST 1988


Consider the following makefile:

ALPHA = foo
BETA  = $(ALPHA) bar

all:
	echo $(BETA)

Running make with this makefile will result in the execution of the
command "echo foo bar", which is OK.

Now, consider the following makefile:

ALPHA = foo
BETA  = $(ALPHA) bar

all:
	echo $(BETA:bar=hello)

Running make with this makefile will result in the execution of the
command "echo $(ALPHA) hello", which is certainly not what I would
expect.

Why is ALPHA not substituted in the last example? Bug or feature?

-- 
Claus Tondering
Dansk Data Elektronik A/S, Herlev, Denmark
E-mail: ct at dde.dk    or    ...!uunet!mcvax!dkuug!dde!ct



More information about the Comp.unix.wizards mailing list