Subject: Re: make seems to find the wrong source file
To: David Laight <>
From: Simon J. Gerraty <>
List: tech-toolchain
Date: 01/11/2004 17:19:30
The behavior you cite is not restricted to .OPTIONAL

>With the following makefile:

>.SUFFIXES: .a .b

>all: .PHONY x.b

>        echo $<

>x.b: dir/x.a

If you add an explicit script for x.b as in

	@echo "Make $@ from $?"

then make will use that (as will gmake fwiw).
gmake won't use the .a.b rule if the explict script is missing

>If I fix it, is anything else likely to break?

You can almost guarantee that you'll break something ;-)