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,6458d1ee91b224ec X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.90.105 with SMTP id bv9mr1058914pab.18.1360924854456; Fri, 15 Feb 2013 02:40:54 -0800 (PST) Path: ov8ni1882pbb.1!nntp.google.com!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> <85ehgqkxnf.fsf@stephe-leake.org> <51168e7e$0$6566$9b4e6d93@newsspool3.arcor-online.net> Date: Fri, 15 Feb 2013 05:40:52 -0500 Message-ID: <85r4khdfm3.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt) Cancel-Lock: sha1:y194TLTIX2kGZFzr6hKNvAu8fEU= MIME-Version: 1.0 X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 41ebb511e10b6c55ab71427085 X-Received-Bytes: 2134 Content-Type: text/plain Date: 2013-02-15T05:40:52-05:00 List-Id: Georg Bauhaus writes: > On 09.02.13 03:51, Stephen Leake wrote: >> You have a file in CM: >> >> a_file.ada.gp >> >> It needs to be processed by gnatprep, then by gnatchop, and finally by >> gprbuild. > > The problem is that running the chain of tools again and again is > prohibitively inefficient. It boils down to recompiling the world > after each edit. > > The full picture is this: I am given, and will give back, a file, > > a_file.ada.gp > > It has about two dozen compilation units in it, some of them have many > generic instantiations that will keep the compiler busy. I need to > edit just some unit and then compile the program again. > > There are two "configurations", C1, and C2. Starting in C1, > suppose I first run gnatprep on a_file.ada.gp, then gnatchop the > preprocessed output. The two steps will produce about two dozen files. > I can then call gnatmake as usual. This is _precisely_ why the GNAT policy is one compilation unit per file. The root cause of your problem is putting more than one compilation unit in one file. Change that. Or get a faster computer; I hardly notice the time to compile a dozen files. -- -- Stephe