comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Meet the new GPS...same as the old GPS...
Date: Tue, 27 Jun 2006 23:31:20 +0100
Date: 2006-06-27T23:31:20+01:00	[thread overview]
Message-ID: <m2d5cu1b9j.fsf@grendel.local> (raw)
In-Reply-To: 1151410861.923912.302040@c74g2000cwc.googlegroups.com

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]



      parent reply	other threads:[~2006-06-27 22:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1151320748.360707.79490@u72g2000cwu.googlegroups.com>
2006-06-26 15:49 ` Meet the new GPS...same as the old GPS Martin Krischik
     [not found]   ` <1151342956.402547.244450@p79g2000cwp.googlegroups.com>
2006-06-26 17:42     ` M E Leypold
     [not found]       ` <1151437378.281759.5280@75g2000cwc.googlegroups.com>
2006-06-27 23:06         ` M E Leypold
2006-06-28  9:23           ` Ludovic Brenta
2006-06-28 12:48             ` M E Leypold
2006-06-29 21:01               ` Ludovic Brenta
     [not found]                 ` <1151663198.061674.171420@b68g2000cwa.googlegroups.com>
2006-06-30 10:54                   ` M E Leypold
2006-06-30 15:43                 ` Stephen Leake
2006-06-30 21:57                   ` Ludovic Brenta
2006-07-01  8:46                   ` Simon Wright
     [not found]             ` <1151496846.934920.174760@x69g2000cwx.googlegroups.com>
2006-06-28 12:53               ` M E Leypold
2006-06-29 22:02                 ` Simon Wright
2006-06-28 20:01               ` Ludovic Brenta
     [not found]                 ` <1151597425.667829.326810@x69g2000cwx.googlegroups.com>
2006-06-29 17:10                   ` M E Leypold
2006-06-30 15:46                     ` Stephen Leake
2006-06-29 21:02                   ` Ludovic Brenta
2006-06-28 20:42             ` Simon Wright
2006-06-28 21:07               ` Ludovic Brenta
     [not found]           ` <1151496427.622323.141370@x69g2000cwx.googlegroups.com>
2006-06-28 12:54             ` M E Leypold
2006-06-26 16:26 ` Alex R. Mosteo
     [not found]   ` <1151343516.598780.72970@m73g2000cwd.googlegroups.com>
2006-06-26 18:09     ` M E Leypold
     [not found]       ` <1151438643.540118.175130@b68g2000cwa.googlegroups.com>
2006-06-27 22:12         ` Ludovic Brenta
2006-06-27 23:09           ` M E Leypold
2006-06-27 23:30             ` Jeffrey Creem
     [not found]       ` <1151438075.641788.269960@m73g2000cwd.googlegroups.com>
2006-06-27 23:23         ` M E Leypold
2006-06-27  6:54     ` ME
2006-06-27 13:31     ` Alex R. Mosteo
     [not found]       ` <1151417657.725848.229020@75g2000cwc.googlegroups.com>
2006-06-27 14:38         ` Alex R. Mosteo
     [not found]           ` <1151419844.957473.214400@m73g2000cwd.googlegroups.com>
2006-06-27 15:13             ` Alex R. Mosteo
2006-06-27 15:35               ` randomm
2006-06-27 11:39 ` Jeffrey Creem
2006-06-27 13:34   ` Dmitry A. Kazakov
2006-06-27 19:57     ` Björn Persson
2006-06-27 15:11   ` Pascal Obry
     [not found]   ` <1151410861.923912.302040@c74g2000cwc.googlegroups.com>
2006-06-27 22:31     ` Simon Wright [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox