From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,634259facc42df7a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: Conditional compilation of debug traces without cpp References: <44aaae35$0$5389$626a54ce@news.free.fr> <44ac1562$0$10269$636a55ce@news.free.fr> <1152165198.400494.175100@p79g2000cwp.googlegroups.com> From: M E Leypold Date: 07 Jul 2006 16:08:01 +0200 Message-ID: <9zzmfl1pa6.fsf@hod.lan.m-e-leypold.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Some cool user agent (SCUG) NNTP-Posting-Host: 88.72.226.169 X-Trace: news.arcor-ip.de 1152280873 88.72.226.169 (7 Jul 2006 16:01:13 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!news.jgaa.com!newsfeed0.kamp.net!newsfeed.kamp.net!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:5553 Date: 2006-07-07T16:08:01+02:00 List-Id: Stephen Leake writes: > In GNAT, the use of preprocessed files is not so transparent, because > gnatmake does not know how to run the preprocessor. This has already annoyed me a number of times. I'd have liked to use gnatmake exclusively, but because of this I've been forced to wrap a Unix Makefile around gnatmake which will first do all preprocessing before invoking gnatmake. Ugly. > In addition, you need different naming conventions for the original > and preprocessed files. If the preprocessed files follow the GNAT > convention (the simplest choice), then the editing environment (Emacs > or GPS or AdaGIDE) will still not understand the naming convention for > the original files. A way around this is, to store the not preprocessed files in a subdirectory and let them have the same suffices as the Ada sources. For instance, the perprocessor input for foo.adb would live in template/foo.adb. When using Unix make, a rule like template/%.adb: %.adb ... preprocess ... can take care of the preprocessing. > With a proper makefile, you can run the GNAT preprocessor on _all_ > files. If you use the GNAT default naming convention for the > original files (so the editor works nicely), and tell GNAT to use an > alternate naming convention for the preprocessed files (via project > files), using the GNAT preprocessor will be as transparent as using > the Gnu C preprocessor. This is another interesting approach. Probably better than mine. Thanks. Regards -- Markus