Commit 41e439ae authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Merge remote-tracking branch 'ocarina-ESA/master'

parents 0b92ed34 045d4c00
......@@ -148,9 +148,11 @@ AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
define(SHARED_LIBRARY_OPTIONS, [dnl
GNAT_LIB_FLAGS="-XLIBRARY_TYPE=relocatable"
PRJ_LIBRARY_KIND="shared"
shared=true])
define(NO_SHARED_LIBRARY_OPTIONS, [dnl
GNAT_LIB_FLAGS="-XLIBRARY_TYPE=static"
PRJ_LIBRARY_KIND="static"
shared=false])
AC_ARG_ENABLE(shared,
......@@ -424,6 +426,7 @@ AC_OUTPUT([
resources/runtime/lnt/Makefile
resources/runtime/python/Makefile
projects/ocarina.gpr
projects-distrib/ocarina/ocarina_core.gpr
src/main/Makefile
src/config/ocarina-configuration.adb
src/frontends/Makefile
......
INTERNAL_PROJECTS = \
$(srcdir)/ocarina/ocarina_core.gpr \
$(srcdir)/ocarina/ocarina_core.gpr.in \
$(srcdir)/ocarina/ocarina_frontends.gpr \
$(srcdir)/ocarina/ocarina_backends.gpr \
$(srcdir)/ocarina/ocarina_transfo.gpr \
......
......@@ -45,5 +45,5 @@ project Ocarina is
for Source_Dirs use ("../../include/ocarina");
for Object_Dir use "../../lib/ocarina";
for Externally_Built use "true";
end Ocarina;
......@@ -36,7 +36,7 @@ project Ocarina_Backends is
for Source_files use ();
for Library_Name use "ocarina-backends";
for Library_Dir use "../..";
for Library_Kind use "static";
for Library_Kind use Ocarina_Core'Library_Kind;
for Externally_Built use "true";
end Ocarina_Backends;
......@@ -39,7 +39,7 @@ project Ocarina_Config is
for Source_files use ();
for Library_Name use "ocarina-config";
for Library_Dir use "../..";
for Library_Kind use "static";
for Library_Kind use Ocarina_Core'Library_Kind;
for Externally_Built use "true";
end Ocarina_Config;
......@@ -34,7 +34,7 @@ project Ocarina_Core is
for Source_files use ();
for Library_Name use "ocarina";
for Library_Dir use "../..";
for Library_Kind use "static";
for Library_Kind use "@PRJ_LIBRARY_KIND@";
for Externally_Built use "true";
end Ocarina_Core;
------------------------------------------------------------------------------
-- --
-- OCARINA COMPONENTS --
-- --
-- O C A R I N A _ C O R E --
-- --
-- P r o j e c t --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. Ocarina is distributed in the hope that it will be useful, but --
-- WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- Ocarina is maintained by the TASTE project --
-- (taste-users@lists.tuxfamily.org) --
-- --
------------------------------------------------------------------------------
project Ocarina_Core is
for Source_files use ();
for Library_Name use "ocarina";
for Library_Dir use "../..";
for Library_Kind use "@PRJ_LIBRARY_KIND@";
for Externally_Built use "true";
end Ocarina_Core;
......@@ -36,7 +36,7 @@ project Ocarina_Frontends is
for Source_files use ();
for Library_Name use "ocarina-frontends";
for Library_Dir use "../..";
for Library_Kind use "static";
for Library_Kind use Ocarina_Core'Library_Kind;
for Externally_Built use "true";
end Ocarina_Frontends;
......@@ -37,7 +37,7 @@ project Ocarina_Transfo is
for Source_files use ();
for Library_Name use "ocarina-transfo";
for Library_Dir use "../..";
for Library_Kind use "static";
for Library_Kind use Ocarina_Core'Library_Kind;
for Externally_Built use "true";
end Ocarina_Transfo;
......@@ -50,12 +50,14 @@ install-data-local:
$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/ocarina/AADLv1 || exit 1; \
$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/ocarina/AADLv2 || exit 1; \
done
for file in $(AADL_V2_PROPERTIES); do \
for file in $(AADL_V2_PROPERTIES) $(AADL_V2_COMPONENTS); do \
$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/ocarina/AADLv2 || exit 1; \
done
for file in $(AADL_V1_PROPERTIES); do \
$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/ocarina/AADLv1 || exit 1; \
done
build_ocarina_components:
rm -f $(DESTDIR)$(datadir)/ocarina/AADLv2/ocarina_components.aadl
for file in $(srcdir)/AADLv2/components/*.aadl; do \
cat $$file >> $(DESTDIR)$(datadir)/ocarina/AADLv2/ocarina_components.aadl || exit 1; \
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2006-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -73,6 +73,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RU_PolyORB_HI_Messages,
RU_PolyORB_HI_Output_Low_Level,
RU_PolyORB_HI_Output,
RU_PolyORB_HI_Port_Types,
RU_PolyORB_HI_Protocols,
RU_PolyORB_HI_Streams,
RU_PolyORB_HI_Suspenders,
......@@ -164,7 +165,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Naming_Entry, -- PolyORB_HI.Transport.Naming_Entry
RE_To_HI_String, -- PolyORB_HI.Utils.To_HI_String
RE_Naming_Table_Type, -- PolyORB_HI.Utils.Naming_Table_Type
RE_Corresponding_Port, -- PolyORB_HI.Utils.Corresponding_Port
RE_Corresponding_Port, -- Po..HI.Port_Types.Corresponding_Port
RE_Non_Blocking_Receive, -- Po..HI.Protocols.Non_Blocking_Receive
RE_Send_1, -- Po..HI.Protocols.Send
RE_Initialize, -- Po..HI.Transport_Low_Level.Initialize
......@@ -260,7 +261,7 @@ package Ocarina.Backends.PO_HI_Ada.Runtime is
RE_Naming_Entry => RU_PolyORB_HI_Utils,
RE_To_HI_String => RU_PolyORB_HI_Utils,
RE_Naming_Table_Type => RU_PolyORB_HI_Utils,
RE_Corresponding_Port => RU_PolyORB_HI_Utils,
RE_Corresponding_Port => RU_PolyORB_HI_Port_Types,
RE_Non_Blocking_Receive => RU_PolyORB_HI_Protocols,
RE_Send_1 => RU_PolyORB_HI_Protocols,
RE_Stream_Element_Array => RU_PolyORB_HI_Streams,
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -29,11 +29,11 @@
-- --
------------------------------------------------------------------------------
with Ada.Directories; use Ada.Directories;
with GNAT.OS_Lib;
with Errors;
with Ocarina.Namet;
with Ocarina.Options; use Ocarina.Options;
package body Ocarina.Files is
......@@ -206,15 +206,25 @@ package body Ocarina.Files is
-- Check in the library paths
for Path in Library_Paths.First .. Library_Paths.Last loop
Get_Name_String (Library_Paths.Table (Path));
Add_Char_To_Name_Buffer (Directory_Separator);
Get_Name_String_And_Append (File_Name);
if Is_Regular_File (Name_Buffer (1 .. Name_Len)) then
return Name_Find;
end if;
end loop;
declare
-- Build simple name from File_Name, in case we have an
-- invalid full path. This is a last resort case
Base_File_Name_S : constant String
:= Simple_Name (Get_Name_String (File_Name));
Base_File_Name_N : constant Name_Id
:= Get_String_Name (Base_File_Name_S);
begin
for Path in Library_Paths.First .. Library_Paths.Last loop
Get_Name_String (Library_Paths.Table (Path));
Add_Char_To_Name_Buffer (Directory_Separator);
Get_Name_String_And_Append (Base_File_Name_N);
if Is_Regular_File (Name_Buffer (1 .. Name_Len)) then
return Name_Find;
end if;
end loop;
end;
return No_Name;
end Search_File;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment