Package: adabrowse
Version: 4.0.2-2
Severity: wishlist

The project manager feature in AdaBrowse is dandy and all, but it
doesnt' work in the general case.  Let me explain.  If you have a
project file and want to use it with AdaBrowse, and say:

$ adabrowse -Pmy_project.gpr

AdaBrowse creates a new project file like so:

project AB_20050929_22581619
  extends "my_project.gpr"
is

   for Object_Dir use "/home/lbrenta/src/my_project/";

   for Source_Files use (
"/home/lbrenta/src/my_project/pack1.ads"
, "/home/lbrenta/src/my_project/pack1.adb"
...
   ); -- End of sources

   package Compiler renames Adabrowse.Compiler;

end AB_20050929_22581619;

Now, suppose that my_project.gpr looks like this:

with "/usr/share/ada/adainclude/some_library.gpr";
project My_Project is
   for Source_Dirs use ("src");
   for Object_Dir use "obj";
   package Linker renames Some_Library.Linker;
end My_Project;

And the library supplies the following project file:

project Some_Library is
   for Source_Dirs use ("/usr/share/ada/adainclude/some_library");
   for Object_Dir use "/usr/lib/ada/adalib/some_library";
   package Linker is
      for Default_Switches ("Ada") use ("-lsome_library");
   end Linker;
end Some_Library;

(actually, the linker switches are in a variable, so that the user can
link several libraries at once in their project).

AdaBrowse cannot work with the user's project, because everything
under /usr is read-only: "gnatmake -Pad_x.gpr -gnatc -gnatt" will barf
out because it cannot write the tree files for the library in
/usr/lib/ada/adalib/some_library.

The solution, it seems, would be to generate
a top-level, all-encompassing project that does not import or extend
anything, e.g.

project AD_.... is
   for Source_Dirs use ("/usr/share/ada/adainclude/some_library", "src");
   for Object_Dir use ".adabrowse";
   package Compiler is
      for Default_Switches ("Ada") use ("-gnatc", "-gnatt");
   end Compiler;
end AD_.....;

Of course, it might be a lot of work to achieve this, but don't you
think it might be worth it?

Perhaps another possible solution would be to require all libraries to
also supply tree files in /usr/lib/ada/adalib/some_library?  I could
do that, because I write the Debian Policy for Ada and I do the
packages for all libraries.

Any thoughts?

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-2-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages adabrowse depends on:
ii  libasis-3.15p-1               3.15p-7    Ada Semantic Interface Specificati
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  libgnat-3.15p-1               3.15p-14   The GNU Ada 95 compiler runtime li
ii  libgnatprj-3.15p              3.15p-14   GNU Ada Project file support libra

adabrowse recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to