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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d358a6b145a79134 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Compilation without implementation source Date: Sun, 27 Jan 2008 17:25:50 +0000 Organization: Pushface Message-ID: References: <43c33a30-8f1e-43a1-b84a-a22c4a37248a@v29g2000hsf.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1201454751 18180 62.49.19.209 (27 Jan 2008 17:25:51 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 27 Jan 2008 17:25:51 +0000 (UTC) Cancel-Lock: sha1:bsa49ZoOzvgZT5km/xUF5NixsU0= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) Xref: g2news1.google.com comp.lang.ada:19614 Date: 2008-01-27T17:25:50+00:00 List-Id: "Jeffrey R. Carter" writes: > Gene wrote: >> For an educational exercise using GNAT and gnatmake, I need to hide >> implementations of some modules from students in the simplest possible >> way. >> >> Is there a way to give them .ali, .ads, and .o files while withholding >> the corresponding .adb, somehow telling gnatmake (and gnatbind) to >> ignore the absence? > > IIRC, if the .ali files are read-only, GNAT will not require the > source of the bodies. This may not work for generics or other cases > where the compilation has a dependency on the body, such as cross-unit > inlining. This is pretty close to what gnatmake will do if you give it a 'library' gpr. I haven't been able to get it to elaborate a static library with unnecessary sources hidden - and I haven't tried dynamic libraries yet. Others will know more.