🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #474

genclass and makefiles

#474
From: Scott Meyers
Date: Mon, 18 Feb 1991 22:58
24 lines
1363 bytes
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."
Technical Details
Message-ID: <65384@brunix.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!uunet!brunix!sdm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!uunet!brunix!sdm
From: sdm@cs.brown.edu (Scott Meyers)
Newsgroups: gnu.g++.help,comp.lang.c++
Subject: genclass and makefiles
Message-ID: <65384@brunix.UUCP>
Date: 18 Feb 91 22:58:04 GMT
Sender: news@brunix.UUCP
Reply-To: sdm@cs.brown.edu (Scott Meyers)
Organization: Brown University Department of Computer Science
Lines: 24