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,c15063243269efcd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c02.usenetserver.com!news.usenetserver.com!atl-c06.usenetserver.com!news.usenetserver.com!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: Meet the new GPS...same as the old GPS... Date: Tue, 27 Jun 2006 23:31:20 +0100 Organization: Pushface Message-ID: References: <1151320748.360707.79490@u72g2000cwu.googlegroups.com> <1151410861.923912.302040@c74g2000cwc.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 1151447475 26010 62.49.19.209 (27 Jun 2006 22:31:15 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Tue, 27 Jun 2006 22:31:15 +0000 (UTC) Cancel-Lock: sha1:r6i6o6cbkaAGVY4iirXhzupM5Kg= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:5142 Date: 2006-06-27T23:31:20+01:00 List-Id: randomm@mindless.com writes: > Emacs Ada mode (as supplied with Emacs 21.x- I still haven't figured > out how to set up the Ada-mode from Libre) is quite nice in some > regards but is giving me fits in other areas. For example, once you > build a compilation unit, even though you kill its buffer and start > working on another compilation unit, all subsequent builds in the > lifetime of that Emacs point to the original compilation unit (the > wrong source gets built). I don't see a way to compile another > source module short of killing Emacs entirely and starting a new > session. This is surely a show-stopper for any serious development. The Emacs ada-mode is likely to be a lot more up-to-date than the one from Libre (the Emacs has if nothing else a copyright notice dating from this year, the libre one is several years old). Your problem is that your first Ada compilation uses a newly-created default "project" which builds that program; you need a different project for different programs. NB all: this is *not* the same as the GNAT Project, .gpr, defined by current GNAT. The suffix convention is (was) .adp. I'll have a go at describing creating a minimal one; it's been a while (the supported Ada-mode, which is part of a customised Emacs called GLIDE, will read GPR files, so we don't use ADPs any more). Load your main program, select Ada > Project > New, choose a filename (my_program.adp, say). You should get an Emacs attempt at a tabbed dialog box. In the General tab, set the executable file name and the file name of the main unit, normally the same. The Paths tab is where you define the location of your source (the default will work for a single-directory project). That's all you need for starters; save and build (C-c C-c). To build another program, give it its own project; swap projects via the Ada > Project menu. This is a sample General page (monospaced font, please!) from a more complex project: Project and Editor configuration. ___________ ____________ ____________ ____________ ____________ / [General] \ / [Paths] \ / [Switches] \ / [Ada Menu] \ / [Debugger] \ / \/______________\/______________\/______________\/______________\ Project file name: /Users/simon/sf/coldframe/coldframe/Event_Test.test/Event_Test.adp Executable file name: [Help] (main) /Users/simon/sf/coldframe/coldframe/event_test-harness File name of the main unit: [Help] (main_unit) event_test-harness Build directory: [Help] (build_dir) /Users/simon/sf/coldframe/coldframe/.build/ Name of the remote machine (if any): [Help] (remote_machine) Prefix used in for the cross tool chain: [Help] (cross_prefix) ______________________________________________________________________ [Reset to Default Values] [Cancel] [Save] and this is the Paths page: Project and Editor configuration. ___________ ____________ ____________ ____________ ____________ / [General] \ / [Paths] \ / [Switches] \ / [Ada Menu] \ / [Debugger] \ /_____________\/ \/______________\/______________\/______________\ Source directories: [Help] (src_dir) [Load From File] [Load Recursive Directory] ${build_dir} [INS][DEL] /Users/simon/sf/coldframe/coldframe/Event_Test.gen/ [INS][DEL] /Users/simon/sf/coldframe/coldframe/Event_Test.impl/ [INS][DEL] /Users/simon/sf/coldframe/coldframe/ [INS][DEL] /Users/simon/bc/ [INS][DEL] /Users/simon/sf/coldframe/coldframe/Event_Test.test/ [INS][DEL] /Users/simon/AUnit-1.03p/aunit/ [INS][DEL] /Users/simon/AUnit-1.03p/aunit/framework/ [INS][DEL] /Users/simon/AUnit-1.03p/aunit/text_reporter/ [INS] . /opt/gnat-gpl-2005/lib/gcc/powerpc-apple-darwin7.4.1/3.4.5/adainclude/ Object directories: [Help] (obj_dir) [Load From File] [Load Recursive Directory] ${build_dir} [INS][DEL] ~/ [INS][DEL] ./ [INS][DEL] /Users/simon/sf/coldframe/coldframe/Event_Test.test/ [INS] . /opt/gnat-gpl-2005/lib/gcc/powerpc-apple-darwin7.4.1/3.4.5/adalib/ ______________________________________________________________________ [Reset to Default Values] [Cancel] [Save]