From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7414 invoked by alias); 18 May 2006 18:31:38 -0000 Received: (qmail 7407 invoked by uid 22791); 18 May 2006 18:31:38 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (217.40.213.68) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 May 2006 18:31:35 +0000 Received: from mail.artimi.com ([192.168.1.3]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 18 May 2006 19:31:32 +0100 Received: from rainbow ([192.168.1.165]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 18 May 2006 19:31:32 +0100 From: "Dave Korn" To: "'Advanced Software Engineering 101'" Subject: RE: how come #include "*.cpp" works? Date: Thu, 18 May 2006 18:31:00 -0000 Message-ID: <010101c67aa9$49187880$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact cygwin-talk-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: cygwin-talk-owner@cygwin.com Reply-To: The Cygwin-Talk Maiming List X-SW-Source: 2006-q2/txt/msg00267.txt.bz2 On 18 May 2006 19:28, mwoehlke wrote: >> Something like this? > (moved below) > > Hey, that's pretty slick... thanks! :) It's a fairly standard technique. The particularly good thing about it is that there's no danger of anything getting out-of-sync because it all comes from one source and hence has to remain consistent. Gcc and other big highly-configurable projects do this all the time, and even more advanced stuff. > Upon further thought, I may actually do something with my Makefile and > auto-generation of some file, but I think I'm still going to use part of > this. (Having an entire class declaration inside of a macro kind-of rubs > me wrong ;-). Also, I want to keep each class in its own header.) Yep, it's certainly a little ugly, but it serves to illustrate the technique; feel free to adapt and mutate to best serve your own purposes! cheers, DaveK -- Can't think of a witty .sigline today....