[gnu.g++.help] genclass and makefiles

sdm@cs.brown.edu (Scott Meyers) (02/19/91)

I know I can use the genclass facility that comes with g++ to generate .h
and .cc files from .hP and .ccP files, respectively, but I'd like to know
how to write rules for Gnu make so that .h and .cc files are dependent on
their respective .hP and .ccP files.

A prototype file List.hP will generate int.List.h and double.List.h after
the commands

    genclass int ref List
    genclass double ref List

so I need some way to say that both int.List.h and double.List.h are
dependent on List.hP, and the way to make a .h file from the corresponding
.hP file is to run genclass.  I'd like to say something like

    %1.%2.h:  %2.hP
              genclass %1 ref %2

but that's not legal syntax.  Can anybody help?

Scott

-------------------------------------------------------------------------------
What do you say to a convicted felon in Providence?  "Hello, Mr. Mayor."