comp.lang.ada
 help / color / mirror / Atom feed
* Reading directories?
@ 2005-02-21 10:29 Chris Dutton
  2005-02-21 11:02 ` Martin Dowie
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Chris Dutton @ 2005-02-21 10:29 UTC (permalink / raw)


So far I've found a lot of information on Ada.Directories, which looks 
good, but as far as I can see is not available for Gnat on Linux.

Is there any standard package which enables dealing with directories in 
Ada, even if not necessarily conveniently?



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

* Re: Reading directories?
  2005-02-21 10:29 Reading directories? Chris Dutton
@ 2005-02-21 11:02 ` Martin Dowie
  2005-02-21 11:42 ` Martin Krischik
  2005-02-28 14:39 ` John Stoneham
  2 siblings, 0 replies; 14+ messages in thread
From: Martin Dowie @ 2005-02-21 11:02 UTC (permalink / raw)


Chris Dutton wrote:
> So far I've found a lot of information on Ada.Directories, which looks
> good, but as far as I can see is not available for Gnat on Linux.
>
> Is there any standard package which enables dealing with directories
> in Ada, even if not necessarily conveniently?

If you are using the latest GNAT snapshot for Linux then I'm sure it is
available. It's also available in Win32 in the GAP release. It wasn't
available for GNAT 3.15p, when I wrote a version.

Cheers

-- Martin






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

* Re: Reading directories?
  2005-02-21 10:29 Reading directories? Chris Dutton
  2005-02-21 11:02 ` Martin Dowie
@ 2005-02-21 11:42 ` Martin Krischik
  2005-02-21 15:23   ` Martin Dowie
  2005-02-22  3:05   ` Chris Dutton
  2005-02-28 14:39 ` John Stoneham
  2 siblings, 2 replies; 14+ messages in thread
From: Martin Krischik @ 2005-02-21 11:42 UTC (permalink / raw)


Chris Dutton wrote:

> So far I've found a lot of information on Ada.Directories, which looks
> good, but as far as I can see is not available for Gnat on Linux.

Sure it is available. The files are a-direct.ads and a-direct.adb. According
to the ChangeLog they are available since 2004-04-05.

But in order to use Ada 2005 features (those which are actualy there
allready) you need to use a HEAD (4.0.0) release of gcc (currently at stage
3 - beta testing) and use the -gnat05 commandline option.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




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

* Re: Reading directories?
  2005-02-21 11:42 ` Martin Krischik
@ 2005-02-21 15:23   ` Martin Dowie
  2005-02-21 19:01     ` Martin Krischik
  2005-02-22  3:05   ` Chris Dutton
  1 sibling, 1 reply; 14+ messages in thread
From: Martin Dowie @ 2005-02-21 15:23 UTC (permalink / raw)


Martin Krischik wrote:
> Chris Dutton wrote:
>
>> So far I've found a lot of information on Ada.Directories, which
>> looks good, but as far as I can see is not available for Gnat on
>> Linux.
>
> Sure it is available. The files are a-direct.ads and a-direct.adb.
> According to the ChangeLog they are available since 2004-04-05.
>
> But in order to use Ada 2005 features (those which are actualy there
> allready) you need to use a HEAD (4.0.0) release of gcc (currently at
> stage 3 - beta testing) and use the -gnat05 commandline option.

According to the comments in a-direct.ads you don't actually need this
option (or an Ada2005 compiler).

Cheers

-- Martin






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

* Re: Reading directories?
  2005-02-21 15:23   ` Martin Dowie
@ 2005-02-21 19:01     ` Martin Krischik
  2005-02-21 20:32       ` Martin Dowie
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Krischik @ 2005-02-21 19:01 UTC (permalink / raw)


Martin Dowie wrote:

> Martin Krischik wrote:
>> Chris Dutton wrote:
>>
>>> So far I've found a lot of information on Ada.Directories, which
>>> looks good, but as far as I can see is not available for Gnat on
>>> Linux.
>>
>> Sure it is available. The files are a-direct.ads and a-direct.adb.
>> According to the ChangeLog they are available since 2004-04-05.
>>
>> But in order to use Ada 2005 features (those which are actualy there
>> allready) you need to use a HEAD (4.0.0) release of gcc (currently at
>> stage 3 - beta testing) and use the -gnat05 commandline option.
> 
> According to the comments in a-direct.ads you don't actually need this
> option (or an Ada2005 compiler).

If it wasn't for the fact that GNAT will not compile any Ada packages -
unless GNAT compiles itself. Yes, I have tried -gnatx and other relevant
options. But in the end it failes on somehow.

But I guess you could patch it up using "AdaX" instead of "Ada" as package
name.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




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

* Re: Reading directories?
  2005-02-21 19:01     ` Martin Krischik
@ 2005-02-21 20:32       ` Martin Dowie
  0 siblings, 0 replies; 14+ messages in thread
From: Martin Dowie @ 2005-02-21 20:32 UTC (permalink / raw)


Martin Krischik wrote:
> Martin Dowie wrote:
>>According to the comments in a-direct.ads you don't actually need this
>>option (or an Ada2005 compiler).
> 
> 
> If it wasn't for the fact that GNAT will not compile any Ada packages -
> unless GNAT compiles itself. Yes, I have tried -gnatx and other relevant
> options. But in the end it failes on somehow.
> 
> But I guess you could patch it up using "AdaX" instead of "Ada" as package
> name.

"gnatmake -a" works with GNAT 3.15p...

Cheers

-- Martin



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

* Re: Reading directories?
  2005-02-21 11:42 ` Martin Krischik
  2005-02-21 15:23   ` Martin Dowie
@ 2005-02-22  3:05   ` Chris Dutton
  2005-02-22  7:55     ` Martin Krischik
  1 sibling, 1 reply; 14+ messages in thread
From: Chris Dutton @ 2005-02-22  3:05 UTC (permalink / raw)


Martin Krischik wrote:
> Chris Dutton wrote:
> 
> 
>>So far I've found a lot of information on Ada.Directories, which looks
>>good, but as far as I can see is not available for Gnat on Linux.
> 
> 
> Sure it is available. The files are a-direct.ads and a-direct.adb. According
> to the ChangeLog they are available since 2004-04-05.
> 
> But in order to use Ada 2005 features (those which are actualy there
> allready) you need to use a HEAD (4.0.0) release of gcc (currently at stage
> 3 - beta testing) and use the -gnat05 commandline option.

Are there any extraordinary measures necessary to get GCC 4 to compile? 
  I've run into a fair number of problems with a mundane configure; 
make; make install routine.



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

* Re: Reading directories?
  2005-02-22  3:05   ` Chris Dutton
@ 2005-02-22  7:55     ` Martin Krischik
  2005-02-22 10:30       ` Georg Bauhaus
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Krischik @ 2005-02-22  7:55 UTC (permalink / raw)


Chris Dutton wrote:

> Martin Krischik wrote:
>> Chris Dutton wrote:
>> 
>> 
>>>So far I've found a lot of information on Ada.Directories, which looks
>>>good, but as far as I can see is not available for Gnat on Linux.
>> 
>> 
>> Sure it is available. The files are a-direct.ads and a-direct.adb.
>> According to the ChangeLog they are available since 2004-04-05.
>> 
>> But in order to use Ada 2005 features (those which are actualy there
>> allready) you need to use a HEAD (4.0.0) release of gcc (currently at
>> stage 3 - beta testing) and use the -gnat05 commandline option.
> 
> Are there any extraordinary measures necessary to get GCC 4 to compile?
>   I've run into a fair number of problems with a mundane configure;
> make; make install routine.

Almost the same as compiling 3.4:

http://ada.krischik.com/gnat-3_4.html

Well Fortran is called f95 now. The main problem is that the HEAD release
may work today and won't compile tomorrow. Your chances are better if you
won't compile java - those guys can't understant the meaning of "stage 3:
bug fixes only" and regulary replace a hundred odd files with the result
that libjava won't compile any more - they certainly fit there steriotype.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




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

* Re: Reading directories?
  2005-02-22  7:55     ` Martin Krischik
@ 2005-02-22 10:30       ` Georg Bauhaus
  2005-02-22 13:01         ` Martin Krischik
  0 siblings, 1 reply; 14+ messages in thread
From: Georg Bauhaus @ 2005-02-22 10:30 UTC (permalink / raw)


Martin Krischik wrote:

>>Are there any extraordinary measures necessary to get GCC 4 to compile?
>>  I've run into a fair number of problems with a mundane configure;
>>make; make install routine.
> 
> 
> Almost the same as compiling 3.4:
> 
> http://ada.krischik.com/gnat-3_4.html

Compiling and using a bare C and Ada GCC 4 GNAT toolset,
on an average GNU/Linux PC, is almost always possible using

$ cd some_fresh_build_directory
$ path_to_GCC_src/configure --prefix=/some/where --enable-languages=c,ada
$ make bootstrap (and have lunch)
$ make check (to see whether it is in good shape)
$ make install

Then to use the new compiler and tools,

$ PATH=/some/where/bin:${PATH}
$ export PATH

Note that to build GNAT you need a compiler that understands
Ada (GNAT's). If your system's default CC doesn't understand
Ada, set the CC environment variable to the Ada compiler.

-- Georg



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

* Re: Reading directories?
  2005-02-22 10:30       ` Georg Bauhaus
@ 2005-02-22 13:01         ` Martin Krischik
  2005-02-22 15:47           ` Georg Bauhaus
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Krischik @ 2005-02-22 13:01 UTC (permalink / raw)


Georg Bauhaus wrote:

> Martin Krischik wrote:
> 
>>>Are there any extraordinary measures necessary to get GCC 4 to compile?
>>>  I've run into a fair number of problems with a mundane configure;
>>>make; make install routine.
>> 
>> 
>> Almost the same as compiling 3.4:
>> 
>> http://ada.krischik.com/gnat-3_4.html
> 
> Compiling and using a bare C and Ada GCC 4 GNAT toolset,
> on an average GNU/Linux PC, is almost always possible using
> 
> $ cd some_fresh_build_directory
> $ path_to_GCC_src/configure --prefix=/some/where --enable-languages=c,ada
> $ make bootstrap (and have lunch)
> $ make check (to see whether it is in good shape)

Well, I found that "make check" won't allways work - it needs some strange
tools. If so try:

make -C gcc check-ada

and have dinner - it takes almost as long as the compiler.

> $ make install
> 
> Then to use the new compiler and tools,
> 
> $ PATH=/some/where/bin:${PATH}
> $ export PATH
> 
> Note that to build GNAT you need a compiler that understands
> Ada (GNAT's). If your system's default CC doesn't understand
> Ada, set the CC environment variable to the Ada compiler.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com




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

* Re: Reading directories?
  2005-02-22 13:01         ` Martin Krischik
@ 2005-02-22 15:47           ` Georg Bauhaus
  0 siblings, 0 replies; 14+ messages in thread
From: Georg Bauhaus @ 2005-02-22 15:47 UTC (permalink / raw)


Martin Krischik wrote:
> Georg Bauhaus wrote:

>>$ path_to_GCC_src/configure --prefix=/some/where --enable-languages=c,ada
>>$ make bootstrap (and have lunch)
>>$ make check (to see whether it is in good shape)
> 
> 
> Well, I found that "make check" won't allways work - it needs some strange
> tools.

$ apt-get install dejagnu

should suffice in many cases, assuming the necessary auto****
suite is installed.

-- Georg



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

* Re: Reading directories?
  2005-02-21 10:29 Reading directories? Chris Dutton
  2005-02-21 11:02 ` Martin Dowie
  2005-02-21 11:42 ` Martin Krischik
@ 2005-02-28 14:39 ` John Stoneham
  2005-02-28 14:58   ` Peter Hermann
  2 siblings, 1 reply; 14+ messages in thread
From: John Stoneham @ 2005-02-28 14:39 UTC (permalink / raw)


Chris Dutton wrote:

> So far I've found a lot of information on Ada.Directories, which looks
> good, but as far as I can see is not available for Gnat on Linux.
> 
> Is there any standard package which enables dealing with directories in
> Ada, even if not necessarily conveniently?
 
If you're using gnat, try GNAT.Directory_Operations. Obviously, it's only
"standard" with gnat. The spec file is g-dirope.ads. I'm using it in my
projects now.

--
captnjameskirk@moc.oohay
reverse domain to email



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

* Re: Reading directories?
  2005-02-28 14:39 ` John Stoneham
@ 2005-02-28 14:58   ` Peter Hermann
  2005-03-01 15:53     ` John Stoneham
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Hermann @ 2005-02-28 14:58 UTC (permalink / raw)


John Stoneham <captnjameskirk@moc.oohay> wrote:
> If you're using gnat, try GNAT.Directory_Operations. Obviously, it's only
> "standard" with gnat. The spec file is g-dirope.ads. I'm using it in my
> projects now.

For the sake of being portable you have to go back to the reduced 
functionality of gnat3.12p or even gnat3.11p.

just my 2cents

-- 
--Peter Hermann(49)0711-685-3611 fax3758 ica2ph@csv.ica.uni-stuttgart.de
--Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
--http://www.csv.ica.uni-stuttgart.de/homes/ph/
--Team Ada: "C'mon people let the world begin" (Paul McCartney)



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

* Re: Reading directories?
  2005-02-28 14:58   ` Peter Hermann
@ 2005-03-01 15:53     ` John Stoneham
  0 siblings, 0 replies; 14+ messages in thread
From: John Stoneham @ 2005-03-01 15:53 UTC (permalink / raw)


Peter Hermann wrote:

> John Stoneham <captnjameskirk@moc.oohay> wrote:
>> If you're using gnat, try GNAT.Directory_Operations. Obviously, it's only
>> "standard" with gnat. The spec file is g-dirope.ads. I'm using it in my
>> projects now.
> 
> For the sake of being portable you have to go back to the reduced
> functionality of gnat3.12p or even gnat3.11p.
> 
> just my 2cents
> 

If by portable you mean between Windows and Linux, I haven't had any trouble
with 3.15p, in fact that's why I'm using GNAT.Directory_Operations in the
first place. It's not a large package, but it has all the operations I
need, and Format_Pathname keeps "/" and "\" from being a problem.

--
captnjameskirk@moc.oohay
reverse domain to email



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

end of thread, other threads:[~2005-03-01 15:53 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-21 10:29 Reading directories? Chris Dutton
2005-02-21 11:02 ` Martin Dowie
2005-02-21 11:42 ` Martin Krischik
2005-02-21 15:23   ` Martin Dowie
2005-02-21 19:01     ` Martin Krischik
2005-02-21 20:32       ` Martin Dowie
2005-02-22  3:05   ` Chris Dutton
2005-02-22  7:55     ` Martin Krischik
2005-02-22 10:30       ` Georg Bauhaus
2005-02-22 13:01         ` Martin Krischik
2005-02-22 15:47           ` Georg Bauhaus
2005-02-28 14:39 ` John Stoneham
2005-02-28 14:58   ` Peter Hermann
2005-03-01 15:53     ` John Stoneham

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