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: a07f3367d7,6458d1ee91b224ec X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.106.73 with SMTP id gs9mr1060349wib.2.1360378279532; Fri, 08 Feb 2013 18:51:19 -0800 (PST) Path: bp2ni25819wib.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: chopping Ada source that have preprocessor symbols in them References: <5111a9d5$0$6567$9b4e6d93@newsspool3.arcor-online.net> <85txpnm1vp.fsf@stephe-leake.org> <5114fb61$0$6561$9b4e6d93@newsspool4.arcor-online.net> Date: Fri, 08 Feb 2013 21:51:16 -0500 Message-ID: <85ehgqkxnf.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt) Cancel-Lock: sha1:0iShICJfCnFVPrxTGzYkGqYIt+o= MIME-Version: 1.0 X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 508985115b9a7c55ab71408633 X-Received-Bytes: 2008 Content-Type: text/plain Date: 2013-02-08T21:51:16-05:00 List-Id: Georg Bauhaus writes: > On 08.02.13 13:22, Stephen Leake wrote: >> Georg Bauhaus writes: >> >>> - I call gnatprep with the original program as input and use >>> the output as input to gnatchop. I loose the preprocessor >>> symbols in all resulting compilation units, >> >> What's wrong with this option? > > When I want to use GNAT's file based approach, *and* also want to > continue preprocessing with GNATprep or gcc in order to handle > different configurations/language support/..., then I need the > symbols to stay in the chopped source. Why? I must be missing something. You have a file in CM: a_file.ada.gp It needs to be processed by gnatprep, then by gnatchop, and finally by gprbuild. So you have rules in your makefile that do that: gnatprep a_file.ada.gp => a_file.ada gnatchop a_file.ada => a_file_1.ads, a_file_2.adb ... gprbuild a_file_3.adb only a_file.ada.gp is in CM: all the other files are temporaries. If you need to start over and specify different options for gnatprep, you just do that, and repeat all the steps. What is the problem? -- -- Stephe