Dear Paul D. Smith, you wrote on Yesterday:

> I don't see how this quote pertains to Alexandre's point?

The point is that if a compiler doesn't accept a suffix (.cc, say),
but only another one (.cplusplus, say)
you need to cancel the .cc.o rule. and replace it by 

.SUFFIXES:
.SUFFIXES: .cc .cplusplus .o

.cc.cplusplus: 
        cp $< $@
.cplusplus.o:   
        $(CXX) ... -c  -o $@ $<

However, this doesn't work if there's a .cc.o builtin rule.
with the above Makefile, make would still try to compile .cc.o with
its builtin rule for .cc.o and fail, since the compiler doesn't support
.cc. The two rules in the Makefile would be ignored.

The propblem is that your source
files still have the .cc suffix, thus you need to reintroduce
.cc in the second .SUFFIXES target. When .cc is seen, make 
"remembers" the builtin suffix rule. 

The make docs I included in my message simply say that it is impossible
to cancel builtin suffix rules without resorting to pattern rules
or explicit rules.

-- 
Martin Wilck <[EMAIL PROTECTED]>
Institute for Tropospheric Research, Permoserstr. 15, D-04318 Leipzig, Germany
Tel. +49-341-2352151 / Fax +49-341-2352361

Reply via email to