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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,df13d4f4aa9842dc X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Green Hills Ada library question Date: 1998/09/30 Message-ID: <6utg0l$gmk$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 396333305 References: <6tjgph$661$1@nnrp1.dejanews.com> <6tlrfh$udi$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x6.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Sep 30 14:42:29 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-09-30T00:00:00+00:00 List-Id: In article , victor.giddings@ois.com (Victor Giddings) wrote: > We have found it relatively easy to build the "build file" from a shell > script (actually within a make file). Then it is a matter of using the > "build" command or the GUI to make everything. The only trick is to delete > the appropriate build file when its membership should change, or to > maintain it through the GUI. Admittedly this is suboptimal, however it is > relatively obvious when a new file has not been made part of the build, > but is withed by a file that is part of the project. Yes, you certainly can use make files for Ada programs (we actually build GNAT that way, since we don't want to rely on GNATMAKE for building GNAT itself). The reason this approach works much less well for Ada than for C is because computing the dependencies is difficult in Ada, and because of the use of pragma Inline, the dependencies tend to change more rapidly. Computing the dependencies really requires a compiler, to determine inlining dependencies. There are two problems with conventional Ada 83 library systems with respect to inlining: 1. You have to compile inlined bodies before the client. This means that what inlining you get depends on the order of compilation, and it may be impossible to do mutual inlining between two package bodies. The trouble here is that the effect of getting the ordering wrong (e.g. by not having all the dependencies accurate in the make file) is not a binder inconsistency, but rather just inefficient non-inlined code. 2. Since the order of compilation is strict, you need to know the order of compilation before you can compile, and you need to compile before you can figure out the exact order of compilation. Make tools that work with conventional Ada 83 libraries often have to approximate the dependenceies, and again, if they get the approximation wrong, the penalty may not be a detected inconsistency, but rather inefficiency due to inline failures. The nice thing about the source library structure, used by both GNAT and by Intermetrics (and consequently by Greenhills) is that since there is no required order of compilation, you are not stuck on either point. The GNATMAKE utility works by first compiling the main program to determine its dependencies, and then works its way *down* the dependency tree (i.e. in exactly the opposite order of compilation required by a traditional library system). This means that GNATMAKE can accurately compute the compilation dependencies, including all inlining requirements, as it goes along with no inefficiencies. The same approach should definitely be applicable to systems using the IM front end, since it uses basically the same source based approach as GNAT. We have certainly found gnatmake to be an invaluable tool for GNAT, and indeed in normal usage, it is the ONLY tool used for compilation. Robert Dewar Ada Core Technologies -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum