On 2007-02-24 01:00-0800 Alan W. Irwin wrote:

> Thanks, Jerry, for this donation of an Ada interface to PLplot and the
> examples.  I need some help from you to get this integrated into PLplot.

Well, it appears a very common model for Ada is to have one giant executable
with gnatmake sorting out the dependencies between the various bits of
source code so that it decides when any bit needs to be recompiled. IOW,
libraries are sort of an afterthought for Ada which has made it difficult to
integrate Jerry's contribution into PLplot where a clear separation between
libraries and executable examples has always been the norm.

In the GNAT user's guide (accessible with info gnat_ug-3.3 on Debian stable)
there are several half-baked discussions of libraries scattered around, and
eventually I just followed the model used in "Using gnatmake in a Makefile"
when deciding what to do for CMake.

I have just committed Jerry's code contribution and a rudimentary CMake
build system update to support his contribution (with default ENABLE_ada
OFF).

Here are the current CMake Ada limitations:

(1) GNATMAKE_EXECUTABLE and GNAT_DIR are hard-coded rather than configured
in cmake/modules/ada.cmake.  In fact, the latter is hard-coded for Debian
stable so you will have to change it if you want to play with this for any
other platform.

(2) The Ada interface library, libplplotada(d) is built with special
Linux-only custom commands and only for shared libraries instead of using
the much simpler ADD_LIBRARY command that is possible if CMake fully supports
the Ada language.

(3) Similarly, the example is built with a custom command rather than
ADD_EXECUTABLE command that is possible if CMake fully supports the Ada
language.

(4) ctest is not implemented.

(5) When building the example, even though it is clear (from ldd) that it
uses the library rather than the *.o files, if the *.o files are not present
gnatmake recreates them.  I think this is the result of the strict
dependency checking that is used by gnatmake, but eventually we have to
figure out how to turn that off to avoid this redundant and unused
recompilation.

(6) Nothing Ada related is installed (there is no point until issue 5 is
resolved).

It should only be a matter of time (I am aiming for next weekend) for me to
resolve the first 4 issues. For example, I have been given an excellent
overview on the CMake list of how to make Ada a fully supported language
under CMake. That change should solve issues 2 and 3 so that is my next
priority.

I believe the solution to issue 5 will probably involve treating the Ada
code which is used to generate libplplotada(d) as a completely separate 
external Ada project from the examples.  However, I don't have the Ada
expertise to implement that separation into separate but related projects so
unless Jerry knows the answer of making that happen if may be quite some
time before issues 5 and 6 can be resolved.

To summarize the current status, the current result is a good proof of
concept on Debian stable. The resulting executable in examples/ada in the
build tree passed the ldd -r test. Also, I did the equivalent of the ctest
setup in tests/CMakeLists.txt on the command line, and under those
circumstances the build-tree version of the ada_plplot example worked fine.
It is going to require some work (issues 1-4) to make the build-tree part of
this a lot more convenient and available on more platforms than just Debian
stable.

Jerry, I hope to make enough progress by next weekend so you will be able to
use (build-tree only) our CMake build system with Ada on your Mac OS X
platform.  Meanwhile, I hope you will be willing to programme more of the
standard examples in Ada for the important reasons we discussed before.

Thanks, once again, for your Ada contribution.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to