Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!pacific.mps.ohio-state.edu!verber From: verber@pacific.mps.ohio-state.edu (Mark A. Verber) Newsgroups: comp.unix.wizards Subject: Need help using /usr/lib/cpp for generic text Message-ID: <838@pacific.mps.ohio-state.edu> Date: 21 Sep 89 12:45:39 GMT Reply-To: verber@pacific.mps.ohio-state.edu (Mark A. Verber) Organization: Ohio State University, Physics Department Lines: 43 I need some help using /usr/lib/cpp. I am using cpp for the conditionals and for it's macros. I have a rather large document (a Introductory Facilities Guide for Unix, Tops-20, Macintosh, and shortly IBM-PC, and Vax/VMS). Originally this guide was for a single site, but I have been working hard to make it very generic. The intention is that any site could easily use this guide for their local operation with minimal fuss: They would need to change some macros (like name of the orginzation), set some flags as to what machines they have, and edit a few files that are broken out of the rest of the documents since we know each site will be different. The alpha version of the document used TeX \defs and a simple ifdef macro that I wrote. It has become clear that this isn't enough so I decided to move to using make and cpp. I have run into two problems with cpp that I hope someone could help me with. (1) Bloody "# line-number file-name" lines I had thought that the -P switch suppressed such output, but that doesn't seem to be the case (SunOS 4.x /usr/lib/cpp). I don't want these lines. (2) Leaving in the text When I run text like: I get the output like: I would like: #define foo before before before test #ifdef foo test after test #endif after after Any suggestions on getting cpp to eat the at the end of the control lines? Is there a PD cpp or other macro processor that will do the job for me... or should I pull out ye old perl manual. -- Mark A. Verber System Programmer, Physics Department, Ohio State University verber@pacific.mps.ohio-state.edu (614) 292-8002