File: link_tools_with_shared_asis.diff

package info (click to toggle)
asis 2014-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 14,064 kB
  • ctags: 37
  • sloc: ada: 146,541; makefile: 364; sh: 50; xml: 48; csh: 10
file content (31 lines) | stat: -rw-r--r-- 1,145 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
Description: allow to link executables with ASIS shared library
 Passing -XLIBRARY_KIND=dynamic lets the project build ASIS as a
 shared library and link the tools with it.
 .
 The resulting project is not very readable because I attempt to avoid
 intrusive changes and ensure that the default behaviour does not change.
Author: Nicolas Boulenguez <nicolas@debian.org>
Forwarded: no

--- a/asis.gpr
+++ b/asis.gpr
@@ -37,6 +37,19 @@
    for Library_Dir use "lib";
    for Library_Kind use "static";
 
+   type A_Library_Kind is ("dynamic", "relocatable", "static");
+   Library_Kind : A_Library_Kind := External ("LIBRARY_KIND", "static");
+   case Library_Kind is
+      when "static" =>
+         null;
+      when "dynamic" | "relocatable" =>
+         for Object_Dir use Project'Object_Dir & "-dynamic";
+         for Library_Dir use Project'Library_Dir & "-dynamic";
+         for Library_Kind use "dynamic";
+         for Library_Version use "libasis.so." & External ("soversion", "unset");
+         for Library_Options use Common.Ldflags;
+   end case;
+
    package Builder renames Common.Builder;
    package Ide renames Common.Ide;