Rombobjörn

summaryrefslogtreecommitdiff
path: root/comfignat.gpr.in
blob: 82123363801926a2a30a306de30122d3ea036041 (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
-- Comfignat configuration variables for GNAT project files
-- 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 project file
-- for any purpose, provided the above notices are retained on all copies.
-- Permission to modify the code and to distribute modified code is granted,
-- provided the above notices are retained, and a notice that the code was
-- modified is included with the above copyright notice.


-- This project file defines directory variables for use in build-controlling
-- project files. It is not to be installed on the target system.
--
-- Normally the preprocessing of this file will be controlled by comfignat.mk,
-- which will make it import the directory project if one is provided. It can
-- also be preprocessed manually if Make cannot be used for some reason. There
-- are defaults that will be used if no preprocessor symbols are defined.


#if Directory_GPR'Defined then
   with $Directory_GPR;
#end if;

abstract project Comfignat is

   #if Objdir'Defined then
      Objdir := $Objdir;
   #else
      Objdir := "build";
   #end if;
   -- Intermediate files produced during the build shall be kept in Objdir.

   #if Directory_Project'Defined then
      -- Put intermediate files for different architectures in subdirectories
      -- where they won't conflict with each other. (This is useful especially
      -- with binder files when they are packaged in debug information packages
      -- for multiarch systems.)
      Objdir := Objdir & "/" & $Directory_Project.Hardware_Platform;
   #end if;

   #if Stagedir'Defined then
      Stagedir := $Stagedir;
   #else
      Stagedir := external("DESTDIR", "");
   #end if;
   -- Files to be installed shall be placed under Stagedir instead of the root
   -- directory.

   #if Prefix'Defined then
      Prefix := $Prefix;
   #else
      Prefix := "/usr/local";
   #end if;

   #if Exec_Prefix'Defined then
      Exec_Prefix := $Exec_Prefix;
   #else
      Exec_Prefix := Prefix;
   #end if;

   #if Bindir'Defined then
      Bindir := $Bindir;
   #else
      Bindir := Exec_Prefix & "/bin";
   #end if;
   Stage_Bindir := Stagedir & Bindir;
   -- Programs intended to be run by users shall be installed in Stage_Bindir.

   #if Libexecdir'Defined then
      Libexecdir := $Libexecdir;
   #else
      Libexecdir := Exec_Prefix & "/libexec";
   #end if;
   Stage_Libexecdir := Stagedir & Libexecdir;
   -- Programs intended to be run by other programs rather than by users shall
   -- be installed under Stage_Libexecdir.

   #if Includedir'Defined then
      Includedir := $Includedir;
   #else
      Includedir := Prefix & "/include";
   #end if;
   Stage_Includedir := Stagedir & Includedir;
   -- Source files needed for compiling against a library shall be installed
   -- under Stage_Includedir.

   #if Libdir'Defined then
      Libdir := $Libdir;
   #else
      Libdir := Prefix & "/lib";
   #end if;
   Stage_Libdir := Stagedir & Libdir;
   -- Binary libraries shall be installed in Stage_Libdir.

end Comfignat;