comp.lang.ada
 help / color / mirror / Atom feed
* Re: Project structure with Gnat
  1999-08-04  0:00 Project structure with Gnat Jean-Philippe Iafrate
@ 1999-08-04  0:00 ` David C. Hoos, Sr.
  1999-08-04  0:00   ` Gautier
  0 siblings, 1 reply; 9+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-04  0:00 UTC (permalink / raw)



Jean-Philippe Iafrate <jean.philippe.iafrate@wanadoo.fr> wrote in message
news:37A81DAB.53D76730@wanadoo.fr...
> I want to have the following project structure to be used with
> gnatmake :
> at the same directory level, many directories with sources, at
> the same level only one directory with objects and .ali files.
> What is the bes way to do this ?
> I have read the Gnat users guide and the Gnat reference guide but
> I'm not sure of what I have to do.

An easy way to do it is to cd to the directory in which the .o and .ali
files are to reside, and execute gnatmake from there.

Then.. all one has to do is

gnatmake <main-unit-name> -I../<source-dir-1> -I../<source-dir-2> .. etc.

The .o files and the .ali files will be written to the current directory.
The executable will also be written to the current directory, unless
you redirect/rename with the -o gnatmake switch.

David C. Hoos, Sr.








^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-04  0:00 ` David C. Hoos, Sr.
@ 1999-08-04  0:00   ` Gautier
  1999-08-04  0:00     ` Robert Dewar
  0 siblings, 1 reply; 9+ messages in thread
From: Gautier @ 1999-08-04  0:00 UTC (permalink / raw)


> An easy way to do it is to cd to the directory in which the .o and .ali
> files are to reside, and execute gnatmake from there.

> Then.. all one has to do is

> gnatmake <main-unit-name> -I../<source-dir-1> -I../<source-dir-2> .. etc.

> The .o files and the .ali files will be written to the current directory.
> The executable will also be written to the current directory, unless
> you redirect/rename with the -o gnatmake switch.

There is a little problem with that "cd" solution: compile sources
that are precisely in the current directory...

I vote for a gnatmake switch to deflect all new .ali and .o into ONE
directory, without doing "cd" ("cd" complicates the command from
an IDE). Turbo / Borland Pascal and surely Delphi does it and it is
VERY comfortable! The "gnatmake -i" us already a plus (avoids
different versions of .o/.ali laying everywhere) but it "pollutes"
the source directories...

-- 
Gautier

--------
http://members.xoom.com/gdemont/




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-04  0:00   ` Gautier
@ 1999-08-04  0:00     ` Robert Dewar
  1999-08-05  0:00       ` Gautier
  1999-08-05  0:00       ` Vladimir Olensky
  0 siblings, 2 replies; 9+ messages in thread
From: Robert Dewar @ 1999-08-04  0:00 UTC (permalink / raw)


In article <37A84689.6F88BA3F@maths.unine.ch>,
  Gautier <gautier.demontmollin@maths.unine.ch> wrote:
> The "gnatmake -i" us already a plus (avoids
> different versions of .o/.ali laying everywhere) but it
> "pollutes" the source directories...


gnatmake -i preserves the current locations of object and ali
files, so if you don't like what it does, it means you did not
set things up properly in the first place!

And if you want ali's and objects in one directory, that is
indeed trivial to achieve as per the previous notes on the
subject.



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-05  0:00       ` Vladimir Olensky
@ 1999-08-04  0:00         ` David C. Hoos, Sr.
  1999-08-05  0:00           ` Vladimir Olensky
  1999-08-05  0:00         ` Robert Dewar
  1 sibling, 1 reply; 9+ messages in thread
From: David C. Hoos, Sr. @ 1999-08-04  0:00 UTC (permalink / raw)



Vladimir Olensky <vladimir_olensky@yahoo.com> wrote in message
news:rqh95tufse15@corp.supernews.com...
>
<snip>
> All that of course trivial but it is rather annoying as it is intended to
be
> done from command line or by using batch file.
> So it is not convenient to do that from AdaGide. As AdaGide comes with
GNAT
> it would be much better to use GNAT/GCC  switches to redirect output where
> needed.
> Unfortunately in this area combination of GNAT with GCC do  things upside
> down.
>
I do not understand the above comment. The AdaGIDE
Tools => "GNAT Options in Current Directory" menu selection has a
Target Directory option which does just that.  It seems completely simple to
me.  Remember, also, that while AdaGIDE is distributed with GNAT for _NT
only_,
it is not made nor maintained by Ada Core Technologies -- it is a work of
the
U. S. Air Force Academy.


> Tucker Tuft once said something like that :  "it is better to use language
> than to struggle with it".
> It is not good when  system does not help to use itself but rather provoke
> for struggle (using some workarounds).
> Here again we see the difference between highly successful commercial
> systems (e.g. Delphi, MSVS) and some others in their approach to user
needs.
> Anything that makes life of user more easy helps to succeed.
> Anything that annoys user does not help to succeed.
> People in general are very sensitive to small annoying inconveniences.
> Of course it is easy to blame people for that but it leads nowhere in
> general.
>
Perhaps if people paid the same price for GNAT/AdaGIDE as for Delphi, MSVS,
it would be justified to complain.

> Regarding this particular issue it is so trivial thing for compiler system
> developers to provide output  files redirection according to their types
and
> this is such common need that I do not understand why it is not done so
far
> by GNAT/GCC. It is very convenient alternative to more heavy project
> management systems.
> With several proper switches all such things could be done on the fly.
>
>
> Regards.
>
> P.S. Regarding Ada promoting:
> There exists site www.developer.com  with thousands of different things
but
> I did not find any Ada reference there. That is not very good.
>
>
>
>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Project structure with Gnat
@ 1999-08-04  0:00 Jean-Philippe Iafrate
  1999-08-04  0:00 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 9+ messages in thread
From: Jean-Philippe Iafrate @ 1999-08-04  0:00 UTC (permalink / raw)


I want to have the following project structure to be used with
gnatmake :
at the same directory level, many directories with sources, at
the same level only one directory with objects and .ali files.
What is the bes way to do this ?
I have read the Gnat users guide and the Gnat reference guide but
I'm not sure of what I have to do.

--
Jean-Philippe Iafrate		jean.philippe.iafrate@wanadoo.fr




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-05  0:00       ` Vladimir Olensky
  1999-08-04  0:00         ` David C. Hoos, Sr.
@ 1999-08-05  0:00         ` Robert Dewar
  1 sibling, 0 replies; 9+ messages in thread
From: Robert Dewar @ 1999-08-05  0:00 UTC (permalink / raw)


In article <rqh95tufse15@corp.supernews.com>,
  "Vladimir Olensky" <vladimir_olensky@yahoo.com> wrote:
> Just create manually all needed dummy .ALI files and that's OK
> Supposed to be very convenient for user I understand.

Well as noted, the way you do this is simply to do the
compilations from that directory. Note that the object/ali
directory is the mapping of a compilation environment as
defined in the RM, so generally the notion is to have the
current directory positioned to the current compilation
environment.

> So it is not convenient to do that from AdaGide. As AdaGide
> comes with GNAT it would be much better to use GNAT/GCC
> switches to redirect output where needed.

AdaGide really is not designed to deal with complex
organizations. Remember it was intended for simple student
use, and that is the reason we include it with the NT version
of GNAT. Some people are using it for serious development
purposes, and over time, it is being adapted to be better
capable of handling this kind of development, but probably
the best thing is to address specific suggestions to the
author of AdaGide.

> Unfortunately in this area combination of GNAT with GCC do
> things upside down.

Well these sort of features are designed to be convenient
for the way our customers use GNAT, and so far this has not
particularly been an issue, of course, as above, our customers
are not generally using AdaGide.

> It is not good when  system does not help to use itself but
> rather provoke for struggle (using some workarounds).

Well we certainly don't like to see people struggling, and when
our customers find they are struggling over something, we
certainly look at it carefully, but as you very well know
you certainly cannot satisfy all the miscellaneous wishes
on CLA, since many of them are contradictory :-)

The -i switch to gnatmake was incidentally directly from the
design wishes of several major customers, and does EXACTLY
what they want.

> Here again we see the difference between highly successful
> commercial systems (e.g. Delphi, MSVS)

If Delphi is commercially successful, that sure is news to
Borland (of course that is not their name any more, and that's
part of the story).

In any case, I think highly successful commercial systems get
that way from listening to the needs of commercial customers,
and we certainly follow that approach!

> Anything that makes life of user more easy helps to succeed.

Within limits, extra options always make the user's life harder,
because they make the system more complex. You have to make sure
that the gain is worth the additional complexity.

> Anything that annoys user does not help to succeed.
> People in general are very sensitive to small annoying
> inconveniences.

Yes, but people have very different ideas about what is a small
annoying inconvenience. The above statement is absolutely true.
BUT it does not mean that because YOU find something to be a
small annoying inconvenience that it is a weakness in the system
generally. What you may consider an annoying inconvenience may
be seen as unimportant or even desirable by others.

In this particular case, you would like an enhancement so that
-o can be used to redirect the object and ali files (it is a bit
odd to redirect two files in this way, but presumably you can
figure out something). The issue is simple, this just is not a
feature that anyone has asked for. If a customer really needs
this and there is no better way of doing things it would
probably get done!

> Regarding this particular issue it is so trivial thing for
> compiler system developers to provide output  files
> redirection according to their types and
> this is such common need that I do not understand why it is
> not done so far
> by GNAT/GCC.

OK, so you don't see why this is trickier than you think ...
I guess you need to think some more about it :-)


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-04  0:00     ` Robert Dewar
  1999-08-05  0:00       ` Gautier
@ 1999-08-05  0:00       ` Vladimir Olensky
  1999-08-04  0:00         ` David C. Hoos, Sr.
  1999-08-05  0:00         ` Robert Dewar
  1 sibling, 2 replies; 9+ messages in thread
From: Vladimir Olensky @ 1999-08-05  0:00 UTC (permalink / raw)



Robert Dewar wrote in message <7o9vik$opg$1@nnrp1.deja.com>...
>In article <37A84689.6F88BA3F@maths.unine.ch>,
>  Gautier <gautier.demontmollin@maths.unine.ch> wrote:
>> The "gnatmake -i" us already a plus (avoids
>> different versions of .o/.ali laying everywhere) but it
>> "pollutes" the source directories...
>
>
>gnatmake -i preserves the current locations of object and ali
>files, so if you don't like what it does, it means you did not
>set things up properly in the first place!


Just create manually all needed dummy .ALI files and that's OK !
Supposed to be very convenient for user I understand.

>
>And if you want ali's and objects in one directory, that is
>indeed trivial to achieve as per the previous notes on the
>subject.



All that of course trivial but it is rather annoying as it is intended to be
done from command line or by using batch file.
So it is not convenient to do that from AdaGide. As AdaGide comes with GNAT
it would be much better to use GNAT/GCC  switches to redirect output where
needed.
Unfortunately in this area combination of GNAT with GCC do  things upside
down.

Tucker Tuft once said something like that :  "it is better to use language
than to struggle with it".
It is not good when  system does not help to use itself but rather provoke
for struggle (using some workarounds).
Here again we see the difference between highly successful commercial
systems (e.g. Delphi, MSVS) and some others in their approach to user needs.
Anything that makes life of user more easy helps to succeed.
Anything that annoys user does not help to succeed.
People in general are very sensitive to small annoying inconveniences.
Of course it is easy to blame people for that but it leads nowhere in
general.

Regarding this particular issue it is so trivial thing for compiler system
developers to provide output  files redirection according to their types and
this is such common need that I do not understand why it is not done so far
by GNAT/GCC. It is very convenient alternative to more heavy project
management systems.
With several proper switches all such things could be done on the fly.


Regards.

P.S. Regarding Ada promoting:
There exists site www.developer.com  with thousands of different things but
I did not find any Ada reference there. That is not very good.








^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-04  0:00     ` Robert Dewar
@ 1999-08-05  0:00       ` Gautier
  1999-08-05  0:00       ` Vladimir Olensky
  1 sibling, 0 replies; 9+ messages in thread
From: Gautier @ 1999-08-05  0:00 UTC (permalink / raw)


Robert Dewar wrote:
> 
> In article <37A84689.6F88BA3F@maths.unine.ch>,
>   Gautier <gautier.demontmollin@maths.unine.ch> wrote:
> > The "gnatmake -i" us already a plus (avoids
> > different versions of .o/.ali laying everywhere) but it
> > "pollutes" the source directories...
> 
> gnatmake -i preserves the current locations of object and ali
> files, so if you don't like what it does, it means you did not
> set things up properly in the first place!

Very useful when the .ali not yet exist!

> And if you want ali's and objects in one directory, that is
> indeed trivial to achieve as per the previous notes on the
> subject.

Manually, it's trivial. One can even compile everything with
gcc command manually...

The interest would be to include this automatism into the
automatic tool named gnatmake, so this functionnality is
easy to use directly _and_ when called from an IDE !

-- 
Gautier

--------
http://members.xoom.com/gdemont/




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Project structure with Gnat
  1999-08-04  0:00         ` David C. Hoos, Sr.
@ 1999-08-05  0:00           ` Vladimir Olensky
  0 siblings, 0 replies; 9+ messages in thread
From: Vladimir Olensky @ 1999-08-05  0:00 UTC (permalink / raw)



David C. Hoos, Sr. wrote in message ...
>
>Vladimir Olensky <vladimir_olensky@yahoo.com> wrote in message
>news:rqh95tufse15@corp.supernews.com...
>>
><snip>


>I do not understand the above comment. The AdaGIDE
>Tools => "GNAT Options in Current Directory" menu selection has a
>Target Directory option which does just that.  It seems completely simple
to
>me.

Sorry, here I just  missed that new versions of AdaGide can specify target
directory.
This feature of AdaGide is very handy indeed.
It somewhat compensates lack of useful switches in GNAT.
And again it is done by redirecting all GNAT output to the specified
directory which you should create manually.
As a result you can not specify different directories for different output
file types.

On the other hand  if you use some other nice tools (e.g GRASP)  that
completely rely on compiler&linker switches you can not do this on the fly.


>
>> Tucker Tuft once said something like that :  "it is better to use
language
>> than to struggle with it".
>> It is not good when  system does not help to use itself but rather
provoke
>> for struggle (using some workarounds).
>> Here again we see the difference between highly successful commercial
>> systems (e.g. Delphi, MSVS) and some others in their approach to user
>needs.
>> Anything that makes life of user more easy helps to succeed.
>> Anything that annoys user does not help to succeed.
>> People in general are very sensitive to small annoying inconveniences.
>> Of course it is easy to blame people for that but it leads nowhere in
>> general.


>Perhaps if people paid the same price for GNAT/AdaGIDE as for Delphi, MSVS,
>it would be justified to complain.


I think here we come back to the eternal question: what was the first - hen
or egg.
As usual some people think that first was hen and only than was egg , others
think just contrary.
In this particular area first was products that make life easier and then
people began to pay money for what they find convenient and useful but not
vise versa. Sometimes people pay for expectations.

So there was no complains.  Gautier suggested that it would be nice  to have
switches  to redirect output instead of using some workarounds and he got
response that he would better set up things properly.
If Delphi and MSVS product mangers reacted in the same way to user needs I
doubt these products would succeed.

Imagine that you checked in  a room in a hotel and found that there is no
soap in the bathroom. You ask hotel manager why there is no soap in the
bathroom and get the answer that this is very trivial for you to buy it in
the shop next door to the hotel. Would you be happy ?



Regards.








^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1999-08-05  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-04  0:00 Project structure with Gnat Jean-Philippe Iafrate
1999-08-04  0:00 ` David C. Hoos, Sr.
1999-08-04  0:00   ` Gautier
1999-08-04  0:00     ` Robert Dewar
1999-08-05  0:00       ` Gautier
1999-08-05  0:00       ` Vladimir Olensky
1999-08-04  0:00         ` David C. Hoos, Sr.
1999-08-05  0:00           ` Vladimir Olensky
1999-08-05  0:00         ` Robert Dewar

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