Here's a transcript illustrating the bug. Don't worry about mpif77 it's
just an alternative to the non-existent f77
[EMAIL PROTECTED] maketests]$ cat makefile
OBJECTS=subroutine.o
HEADERS=header.f
G77=mpif77
% : %.f makefile $(OBJECTS) $(HEADERS)
$(G77) -o $*.f $(OBJECTS)
%.o : %.f makefile $(HEADERS)
$(G77) -c $*.f
[EMAIL PROTECTED] maketests]$ ls
header.f makefile subroutine.f testprog.f
[EMAIL PROTECTED] maketests]$ make testprog
f77 testprog.f -o testprog
make: f77: Command not found
make: *** [testprog] Error 127
[EMAIL PROTECTED] maketests]$
[EMAIL PROTECTED] maketests]$ make subroutine.o
mpif77 -c subroutine.f
[EMAIL PROTECTED] maketests]$ make testprog
mpif77 -o testprog.f subroutine.o
[EMAIL PROTECTED] maketests]$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-redhat-linux-gnu
[EMAIL PROTECTED] maketests]$
When subroutine.o exists, the match-anything pattern % : %.f is obeyed.
When it does not exist, the match-anything pattern is ignored and a
built-in rule invoked to call (non-existent command) f77.
This make behaviour is what is described in the info as "terminal".
However, the rule is not marked as terminal by having ::
This appears to me to be a bug in make or in its documentation.
Ian Hutchinson
http://www.psfc.mit.edu/people/hutch/
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make