comp.lang.ada
 help / color / mirror / Atom feed
* Problems with the GNAT gnatchop utility
@ 1999-04-22  0:00 Max Spicer
  1999-04-22  0:00 ` David C. Hoos, Sr.
  0 siblings, 1 reply; 2+ messages in thread
From: Max Spicer @ 1999-04-22  0:00 UTC (permalink / raw)


I have recently started to use the GNAT Ada compiler (v. 3.11p) in order to
carry on the development of a system, written in Ada.  The original
development suite for the system used different filenaming conventions to
GNAT and so I am trying to use gnatchop to convert all the Ada files to the
default GNAT file naming standard.  When I did an initial test, using a
single file, I had no problems.  However, when I tried to use gnatchop with
more than one file at a time, I ran into problems.  To illustrate the
problem, say that I have two files as follows.

test1.ada contains:
--------------------------
package Test1 is

   procedure Hello;

end Test1;

package body Test1 is

   procedure Hello is
   begin
      null;
   end Hello;

end Test1;
--------------------------


test2.ada contains:
--------------------------
package Test2 is

   procedure Goodbye;

end Test2;

package body Test2 is

   procedure Goodbye is
   begin
      null;
   end Goodbye;

end Test2;
--------------------------

If, from a directory containing _just_ these two files, I type
  gnatchop test1.ada test2.ada
I get the following output:
  splitting test1.ada into:
     test1.ads
     test1.adb
  test1.adb already exists, use -w to overwrite
  test1.ads already exists, use -w to overwrite
  no files have been written

However, if I run gnatchop on the two files individually, everything works as
expected (test1.ads, test1.adb, test2.ads, test2.adb are created).  It seems
that gnatchop is treating the second (or final) argument as a directory to
which it should send its output.  In the documentation, the directory
argument appears to be optional (as are multiple files), and I can't see how
gnatchop should be able to distinguish between its last argument being a file
to work on, or a directory.  I know that I could get around this problem by
using the -w switch, however I am afraid that this could result in a "real"
error being ignored (I am working on a large amount of code).

Is this a bug in gnatchop, have I missed something, or am I doing
something wrong?

Thanks,

Max Spicer

--
Max Spicer - mjs116@my-dejanews.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-22  0:00 Problems with the GNAT gnatchop utility Max Spicer
1999-04-22  0:00 ` David C. Hoos, Sr.

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