Rombobjörn

summaryrefslogtreecommitdiff
path: root/testsuite/sources/library_2
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/sources/library_2')
-rw-r--r--testsuite/sources/library_2/Makefile20
-rw-r--r--testsuite/sources/library_2/build_testcase.gpr25
-rw-r--r--testsuite/sources/library_2/generated_files8
-rw-r--r--testsuite/sources/library_2/intermediate.gpr.gp26
-rw-r--r--testsuite/sources/library_2/names.gpr18
-rw-r--r--testsuite/sources/library_2/other.gpr15
-rw-r--r--testsuite/sources/library_2/testcase.adb24
-rw-r--r--testsuite/sources/library_2/testcase.ads18
-rw-r--r--testsuite/sources/library_2/testcase.gpr.gp27
9 files changed, 181 insertions, 0 deletions
diff --git a/testsuite/sources/library_2/Makefile b/testsuite/sources/library_2/Makefile
new file mode 100644
index 0000000..63d47ef
--- /dev/null
+++ b/testsuite/sources/library_2/Makefile
@@ -0,0 +1,20 @@
+# part of Comfignat's testsuite
+# Copyright 2014 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 testsuite
+# 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.
+
+
+include comfignat.mk
+
+build_GPRs = build_testcase.gpr
+usage_GPRs = testcase.gpr other.gpr
+
+Gnatprep_arguments = -Dkind='"dynamic"'
+builder_arguments = -Xname=testcase
diff --git a/testsuite/sources/library_2/build_testcase.gpr b/testsuite/sources/library_2/build_testcase.gpr
new file mode 100644
index 0000000..29c62b9
--- /dev/null
+++ b/testsuite/sources/library_2/build_testcase.gpr
@@ -0,0 +1,25 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+with "intermediate.gpr";
+
+library project Build_Testcase is
+ for Library_Name use Intermediate.Name;
+ for Library_Kind use Intermediate.Kind;
+ 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_Dir use Intermediate.Libdir;
+ for Library_ALI_Dir use Intermediate.Alidir & "/" & Intermediate.Name;
+end Build_Testcase;
diff --git a/testsuite/sources/library_2/generated_files b/testsuite/sources/library_2/generated_files
new file mode 100644
index 0000000..015651b
--- /dev/null
+++ b/testsuite/sources/library_2/generated_files
@@ -0,0 +1,8 @@
+intermediate.gpr
+comfignat.gpr
+${stage_includedir}/testcase/testcase.ads
+${stage_libdir}/libtestcase.so.1
+${stage_libdir}/libtestcase.so
+${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
new file mode 100644
index 0000000..6d6b8f2
--- /dev/null
+++ b/testsuite/sources/library_2/intermediate.gpr.gp
@@ -0,0 +1,26 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+with "names.gpr";
+with "comfignat.gpr";
+
+abstract project Intermediate is
+ Name := Names.Name;
+ Kind := $Kind;
+ Soname := Names.Soname;
+ Package_Name := Names.Package_Name;
+ Objdir := Comfignat.Objdir;
+ Includedir := Comfignat.Stage_Includedir;
+ Libdir := Comfignat.Stage_Libdir;
+ Alidir := Comfignat.Stage_Alidir;
+end Intermediate;
diff --git a/testsuite/sources/library_2/names.gpr b/testsuite/sources/library_2/names.gpr
new file mode 100644
index 0000000..2627d95
--- /dev/null
+++ b/testsuite/sources/library_2/names.gpr
@@ -0,0 +1,18 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+abstract project Names is
+ Name := external("name");
+ Soname := "lib" & Name & ".so.1";
+ Package_Name := Name;
+end Names;
diff --git a/testsuite/sources/library_2/other.gpr b/testsuite/sources/library_2/other.gpr
new file mode 100644
index 0000000..1404ded
--- /dev/null
+++ b/testsuite/sources/library_2/other.gpr
@@ -0,0 +1,15 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+abstract project Other is
+end Other;
diff --git a/testsuite/sources/library_2/testcase.adb b/testsuite/sources/library_2/testcase.adb
new file mode 100644
index 0000000..df96cc3
--- /dev/null
+++ b/testsuite/sources/library_2/testcase.adb
@@ -0,0 +1,24 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+with Ada.Calendar; use Ada.Calendar;
+with Ada.Text_IO; use Ada.Text_IO;
+
+package body Testcase is
+
+ function Year return String is
+ begin
+ return Year(Clock)'Img;
+ end Year;
+
+end Testcase;
diff --git a/testsuite/sources/library_2/testcase.ads b/testsuite/sources/library_2/testcase.ads
new file mode 100644
index 0000000..d2646b8
--- /dev/null
+++ b/testsuite/sources/library_2/testcase.ads
@@ -0,0 +1,18 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+package Testcase is
+
+ function Year return String;
+
+end Testcase;
diff --git a/testsuite/sources/library_2/testcase.gpr.gp b/testsuite/sources/library_2/testcase.gpr.gp
new file mode 100644
index 0000000..de4645c
--- /dev/null
+++ b/testsuite/sources/library_2/testcase.gpr.gp
@@ -0,0 +1,27 @@
+-- part of Comfignat's testsuite
+-- Copyright 2014 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 testsuite
+-- 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.
+
+
+#if Directories_GPR'Defined then
+with $Directories_GPR;
+#end if;
+
+library project Testcase is
+
+ for Library_Name use "testcase";
+ for Library_Kind use "dynamic";
+ for Source_Dirs use ($Includedir & "/testcase");
+ for Library_Dir use $Libdir;
+ for Library_ALI_Dir use $Alidir & "/testcase";
+ for Externally_Built use "true";
+
+end Testcase;