Rombobjörn

summaryrefslogtreecommitdiff
path: root/testsuite/sources/library_2
diff options
context:
space:
mode:
authorBjörn Persson <bjorn@rombobjörn.se>2016-01-18 11:59:31 +0100
committerBjörn Persson <bjorn@rombobjörn.se>2016-01-18 11:59:31 +0100
commitdae4f47f2b80c7ea7b1df0f713efe79a8a50c69f (patch)
tree9e92367d9bbca2a61b4b9f2f0240fab0fe2cbd70 /testsuite/sources/library_2
parentc108be85bf27d40d9b1c45d4de14185dc902b763 (diff)
Added Library_Type to help with building libraries as shared or static.
Diffstat (limited to 'testsuite/sources/library_2')
-rw-r--r--testsuite/sources/library_2/Makefile4
-rw-r--r--testsuite/sources/library_2/build_testcase.gpr6
-rw-r--r--testsuite/sources/library_2/generated_files4
-rw-r--r--testsuite/sources/library_2/intermediate.gpr.gp3
-rw-r--r--testsuite/sources/library_2/testcase.gpr.gp4
5 files changed, 11 insertions, 10 deletions
diff --git a/testsuite/sources/library_2/Makefile b/testsuite/sources/library_2/Makefile
index 63d47ef..9341253 100644
--- a/testsuite/sources/library_2/Makefile
+++ b/testsuite/sources/library_2/Makefile
@@ -1,5 +1,5 @@
# part of Comfignat's testsuite
-# Copyright 2014 B. Persson, Bjorn@Rombobeorn.se
+# Copyright 2014 - 2016 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.
@@ -16,5 +16,5 @@ include comfignat.mk
build_GPRs = build_testcase.gpr
usage_GPRs = testcase.gpr other.gpr
-Gnatprep_arguments = -Dkind='"dynamic"'
+Gnatprep_arguments = -Dkind=Comfignat.Library_Type -Dslash='"/"'
builder_arguments = -Xname=testcase
diff --git a/testsuite/sources/library_2/build_testcase.gpr b/testsuite/sources/library_2/build_testcase.gpr
index 29c62b9..c157484 100644
--- a/testsuite/sources/library_2/build_testcase.gpr
+++ b/testsuite/sources/library_2/build_testcase.gpr
@@ -1,5 +1,5 @@
-- part of Comfignat's testsuite
--- Copyright 2014 B. Persson, Bjorn@Rombobeorn.se
+-- Copyright 2014 - 2016 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.
@@ -19,7 +19,7 @@ library project Build_Testcase is
for Library_Version use Intermediate.Soname;
for Library_Interface use (Intermediate.Package_Name);
for Object_Dir use Intermediate.Objdir;
- for Library_Src_Dir use Intermediate.Includedir & "/" & Intermediate.Name;
+ for Library_Src_Dir use Intermediate.Includedir & Intermediate.Slash_Name;
for Library_Dir use Intermediate.Libdir;
- for Library_ALI_Dir use Intermediate.Alidir & "/" & Intermediate.Name;
+ for Library_ALI_Dir use Intermediate.Alidir & Intermediate.Slash_Name;
end Build_Testcase;
diff --git a/testsuite/sources/library_2/generated_files b/testsuite/sources/library_2/generated_files
index 015651b..595ef75 100644
--- a/testsuite/sources/library_2/generated_files
+++ b/testsuite/sources/library_2/generated_files
@@ -1,8 +1,8 @@
intermediate.gpr
comfignat.gpr
${stage_includedir}/testcase/testcase.ads
-${stage_libdir}/libtestcase.so.1
-${stage_libdir}/libtestcase.so
+${stage_libdir}/libtestcase.`if [ -n "${static}" ]; then echo a; else echo so.1; fi`
+`if [ -z "${static}" ]; then echo ${stage_libdir}/libtestcase.so; fi`
${stage_alidir}/testcase/testcase.ali
${stage_gprdir}/testcase.gpr
${stage_gprdir}/other.gpr
diff --git a/testsuite/sources/library_2/intermediate.gpr.gp b/testsuite/sources/library_2/intermediate.gpr.gp
index 6d6b8f2..9af9a4e 100644
--- a/testsuite/sources/library_2/intermediate.gpr.gp
+++ b/testsuite/sources/library_2/intermediate.gpr.gp
@@ -1,5 +1,5 @@
-- part of Comfignat's testsuite
--- Copyright 2014 B. Persson, Bjorn@Rombobeorn.se
+-- Copyright 2014 - 2016 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.
@@ -16,6 +16,7 @@ with "comfignat.gpr";
abstract project Intermediate is
Name := Names.Name;
+ Slash_Name := $Slash & Name;
Kind := $Kind;
Soname := Names.Soname;
Package_Name := Names.Package_Name;
diff --git a/testsuite/sources/library_2/testcase.gpr.gp b/testsuite/sources/library_2/testcase.gpr.gp
index de4645c..7c4d945 100644
--- a/testsuite/sources/library_2/testcase.gpr.gp
+++ b/testsuite/sources/library_2/testcase.gpr.gp
@@ -1,5 +1,5 @@
-- part of Comfignat's testsuite
--- Copyright 2014 B. Persson, Bjorn@Rombobeorn.se
+-- Copyright 2014 - 2016 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.
@@ -18,7 +18,7 @@ with $Directories_GPR;
library project Testcase is
for Library_Name use "testcase";
- for Library_Kind use "dynamic";
+ for Library_Kind use $Library_Type;
for Source_Dirs use ($Includedir & "/testcase");
for Library_Dir use $Libdir;
for Library_ALI_Dir use $Alidir & "/testcase";