Subject: Re: make seems to find the wrong source file
To: David Laight <david@l8s.co.uk>
From: Simon J. Gerraty <sjg@crufty.net>
List: tech-toolchain
Date: 01/11/2004 17:19:30
The behavior you cite is not restricted to .OPTIONAL
>With the following makefile:
>.SUFFIXES:
>.SUFFIXES: .a .b
>all: .PHONY x.b
>.a.b:
> echo $<
>x.b: dir/x.a
If you add an explicit script for x.b as in
x.b:
@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 ;-)
--sjg