File: README

package info (click to toggle)
gprbuild 2011-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 10,396 kB
  • sloc: ada: 94,726; sh: 2,818; xml: 2,225; makefile: 471; ansic: 240; cpp: 89; fortran: 62; asm: 27
file content (94 lines) | stat: -rw-r--r-- 3,448 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Preliminary note for Windows users
==================================

The build instructions for gprbuild may have a slight UNIX flavor but they
can be used on Windows platforms with a full CYGWIN installation. The latter
makes it simpler to build gprbuild but is not required to use it.

Using alternate GNAT Sources
============================

Gprbuild uses some sources of the GNAT package. They are expected by default
to be located in the gnat/ subdirectory of Gprbuild. Only some of the GNAT 
sources are required, but note that having all of the GNAT sources present 
in the gnat/ subdirectory will result in build failure.

In order to use GNAT sources from another location, create a link named 
gnat_src and call the Makefile target copy_gnat_src:

   ln -s <path_to_gnat_sources> gnat_src
   make copy_gnat_src -f Makefile.in
   
That will place links into the gnat/ subdirectory for each of the required 
GNAT source files.
   
On Windows with Cygwin, the files must be copied because symbolic 
links do not work.  You can modify the definition of GNAT_SOURCE_DIR in the 
makefile so that it specifies the path to the GNAT sources you intend to
use, and then call the Makefile target copy_gnat_src:

   make copy_gnat_src -f Makefile.in
   
The makefile will recognize the use of Windows and will therefore place a 
copy of the required files into the gnat/ subdirectory.  

Alternatively you can specify GNAT_SOURCE_DIR on the command line when invoking
the makefile target:

   make copy_gnat_src -f Makefile.in GNAT_SOURCE_DIR=<path/to/gnat/sources>

Finally, another alternative would be to check out the GNAT sources into a dedicated
copy for the sake of building Gprbuild. To do so, create a directory named gnat_src/
under the Gprbuild root directory and check out the GNAT sources into that directory.
Then invoke the Makefile target as before:

   make copy_gnat_src -f Makefile.in

Note that copy_gnat_src can be invoked automatically by other targets.

Configuring
===========

You must install XML/Ada before compiling gprconfig.

Configuring is usually done simply as:
  ./configure

Two parameters may be worth specifying: --prefix for specifying the
installation root and --build for specifying the build host. In particular,
on Windows, when using cygwin to build, it is necessary to configure with
--build=pentium-mingw32msv if one wants to use mingw based compilers
such as GNAT Pro or GNAT GPL. Here is an example of such a command:
  ./configure --build=pentium-mingw32msv --prefix=$HOME/local

Building and Installing
=======================

Building the main executables is done simply with
   make all

When compiling, you can choose whether you want to link statically with
XML/Ada (the default), or dynamically. To compile dynamically, you should
run
   make LIBRARY_TYPE=relocatable all
instead of the above.

Installation is done with
  make install

You can bootstrap grpbuild (compile it with itself) with the following command:
   make bootstrap

Doc & Examples
==============

The documention is provided in various formats in the doc subdirectory.
It refers to concrete examples that are to be found in the
examples subdirectory. Each example can be built easily using the
simple attached Makefile:
   make all    # build the example
   make run    # run the executable(s)
   make clean  # cleanup

All the examples can be built/run/cleaned using the same targets and
the toplevel examples Makefile.