Rombobjörn

summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 7efb59bc12a945cc0dc001abf15bf48db3a42ae7 (plain)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Building and Installing System_Log
==================================

Requirements
------------

These instructions assume a Unix-like system with the GNAT tools and GNU Make.
The makefiles may not work with other Make clones than GNU Make. If you can't
use Make you will need to manually preprocess some GNAT project files with
Gnatprep. If you have another Ada compiler than GNAT, then the included build
system will probably not work and you should do whatever that compiler requires
you to do to compile the code.

GPRbuild is used by default but Gnatmake can be used instead.


Basic Installation
------------------

The simplest way to build and install System_Log is:

 1: Go to the directory that contains this file and the makefiles, and run
    "make" to build the library.

 2: Run "make install" to copy the files to the default locations. You will
    probably need root privileges if you install to the default locations.
    

Testing
-------

"make test" will build a very simple demo program that can be used to check
that the library is usable.


Installation Directories
------------------------

By default the files are installed in directories under /usr/local. You can
specify other locations by setting variables on the Make command line, or on
the Gnatprep command line if you can't use Make. The following Make variables
are relevant during the build:

 dirgpr
    The filename of the directory project, if your system has one and you want
    to install to the directories it specifies. A directory project is a GNAT
    project file that defines directory variables for use by other project
    files. Multilib support requires a directory project that can refer to
    different directories depending on the target architecture. A directory
    project overrides some but not all of the directory variables listed below.

 prefix
    A prefix used in the default values of the directory variables listed
    below. Default: /usr/local

 exec_prefix
    A prefix used in the default locations for architecture-specific files.
    Default: <prefix>

 datarootdir
    The root of the directory tree for read-only architecture-independent data
    files. Default: <prefix>/share

 includedir
    The directory for source files that are needed for compilation of code that
    uses the library, used only if no directory project is provided.
    Default: <prefix>/include

 libdir
    The directory for binary libraries and other architecture-specific files,
    used only if no directory project is provided. Default: <exec_prefix>/lib

 gprdir
    The directory for GNAT project files. Default: <datarootdir>/gpr

If you want to install to a staging directory from which the files will later
be copied to their final locations, then set DESTDIR to the staging directory.
All the other directory variables shall be the final locations. Unlike the
variables listed above, DESTDIR is effective in the installation step.

The following preprocessor symbols are defined by the makefiles, and may be
defined manually if Make can't be used:

 Directory_GPR
    The filename of the directory project, if any; corresponding to dirgpr.

 Directory_Project
    The name of the directory project, if any. This is supposed to be the
    filename without a path or a suffix.

 Prefix
 Exec_Prefix
 Includedir
 Libdir
    These correspond to the like-named Make variables.

    
Build Tools and Options
-----------------------

The following variables, which may be set in the environment or on the Make
command line, control which programs are invoked to do the build and which
options are passed to them:

 GNATPREP
    The command for invoking Gnatprep, in case you want to use a nondefault
    version of Gnatprep or a wrapper for example. Default: gnatprep

 GNAT_BUILDER
    The command for invoking the builder, that is GPRbuild or Gnatmake.
    Default: gprbuild

 GNATFLAGS
    A space-separated list with all of the optional parameters to be passed to
    the builder, including any options to be forwarded to the compiler, binder
    and linker. If GNATFLAGS is defined it overrides the options variables
    listed below.

 GNAT_BUILDER_FLAGS
    A space-separated list of options for the builder, used only if GNATFLAGS
    is undefined. This may include not only options for the builder itself but
    also command line separators (also called mode switches) followed by
    options to be forwarded to the compiler, binder or linker.

 ADAFLAGS
    A space-separated list of options to be passed to the compiler when
    compiling Ada code, used only if GNATFLAGS is undefined.

 LDFLAGS
    A space-separated list of options to be passed to the linker, used only if
    GNATFLAGS is undefined. (Unfortunately neither GPRbuild nor Gnatmake can
    forward command line options to the linker when linking a shared library,
    so LDFLAGS affects only the demo program.)


Copyright of This File
----------------------

Copyright 2013 B. Persson, Bjorn@Rombobeorn.se

This material is provided as is, with absolutely no warranty expressed
or implied. Any use is at your own risk.

Permission is hereby granted to use or copy this documentation file
for any purpose, provided the above notices are retained on all copies.
Permission to modify the text and to distribute modified text is granted,
provided the above notices are retained, and a notice that the text was
modified is included with the above copyright notice.