> > This didn't work for my .F/.f stuff, because the first rtule will be
> > ignored by make if CXXEXT != .cc and if there is a built-in rule
> > .cc.o. Your first suggestion seems threfore more robust to me,
> > because it rewrites the .cc.o rule.
>
> You probably have to declare .SUFFIXES somewhere in the makefile.
That is what I thought, too, before I found I was wrong.
(Btw automake sets .SUFFIXES automatically)
[ From the info pages of GNU make: ]
Suffix rules cannot have any prerequisites of their own. If they
have any, they are treated as normal files with funny names, not as
suffix rules. Thus, the rule:
.c.o: foo.h
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
tells how to make the file `.c.o' from the prerequisite file `foo.h'
and is not at all like the pattern rule:
%.o: %.c foo.h
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
which tells how to make `.o' files from `.c' files, and makes all `.o'
files using this pattern rule also depend on `foo.h'.
Suffix rules with no commands are also meaningless. They do not
remove previous rules as do pattern rules with no commands.
[ End GNU make info ]
GNU make at least provides the command-line option "-r" to
to cancel builtin rules, but I have no idea if this is portable.
--
Martin Wilck <[EMAIL PROTECTED]>
Institute for Tropospheric Research, Permoserstr. 15, D-04318 Leipzig, Germany
Tel. +49-341-2352151 / Fax +49-341-2352361