--------------------------------------------------------------------- ----------- -- -- -- OCARINA COMPONENTS -- -- -- -- O C A R I N A . C O N F I G U R A T I O N -- -- -- -- Copyright (C) 2006-2007, GET-Telecom Paris. -- -- -- -- Ocarina is free software; you can redistribute it and/or modify -- -- it under terms of the GNU General Public License as published by the -- -- Free Software Foundation; either version 2, or (at your option) any -- -- later version. 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. See the GNU General -- -- Public License for more details. You should have received a copy of the -- -- GNU General Public License distributed with Ocarina; see file COPYING. -- -- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth -- -- Floor, Boston, MA 02111-1301, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- Ocarina is maintained by the Ocarina team -- -- (ocarina-users@listes.enst.fr) -- -- -- ------------------------------------------------------------------------------ -- Allow bad-cased identifiers in this section pragma Style_Checks (Off); with Ocarina.AADL; with Ocarina.Dumper; with Ocarina.Generators; with Ocarina.PN; with Ocarina.Dia; with Gaia.Configuration; pragma Style_Checks (On); with Ocarina.Parser; with Ocarina.Printer; with GNAT.OS_Lib; use GNAT.OS_Lib; package body Ocarina.Configuration is -- As some of the values of the constants below may make the lines -- too long for GNAT styles, we put the litterals in a ne line. Version : constant String := "1.1"; -- This is the official version of Ocarina Stored in configure.ac pragma Style_Checks (Off); SVN_Revision : constant String := "r4019"; pragma Style_Checks (On); -- We keep the repository version as "(Working Copy) from ..." to -- distinguish modified versions. When packaging Ocarina, we -- delete the "Working Copy from" substring. The variable -- declaration must be done in one single line in order for the -- substitution pattern to work. We disable style checks because -- this line may be too long. Last_Config_Date : constant String := "Tuesday 02 October 2007, 17:34:26"; -- The date of the latest execution of the configure script Last_Config_Year : constant String := "2007"; -- The year of the latest execution of the configure script GNU_Make_Str : constant String := "make"; -- The GNU make command -------------------- -- Data_Directory -- -------------------- function Data_Directory return String is Suffix : constant String := "share" & Directory_Separator & "ocarina"; begin return Get_Installation_Directory (Suffix); end Data_Directory; ------------------ -- Init_Modules -- ------------------ procedure Init_Modules is begin pragma Style_Checks (Off); Ocarina.AADL.Init; Ocarina.Dumper.Init; Ocarina.Generators.Init; Ocarina.PN.Init; Ocarina.Dia.Init; Gaia.Configuration.Init; pragma Style_Checks (On); Ocarina.Parser.Add_Search_Path (Data_Directory); -- Set the platform dependant GNU make executable name GNU_Make_Ptr := GNU_Make_Cmd'Access; end Init_Modules; ------------------- -- Reset_Modules -- ------------------- procedure Reset_Modules is begin pragma Style_Checks (Off); Ocarina.AADL.Reset; Ocarina.Dumper.Reset; Ocarina.Generators.Reset; Ocarina.PN.Reset; Ocarina.Dia.Reset; Gaia.Configuration.Reset; pragma Style_Checks (On); Ocarina.Parser.Reset_Parsers; Ocarina.Printer.Reset_Printers; end Reset_Modules; --------------------- -- Ocarina_Version -- --------------------- function Ocarina_Version return String is begin return Version; end Ocarina_Version; -------------------------- -- Ocarina_SVN_Revision -- -------------------------- function Ocarina_SVN_Revision return String is begin return SVN_Revision; end Ocarina_SVN_Revision; --------------------------------- -- Ocarina_Last_Configure_Date -- --------------------------------- function Ocarina_Last_Configure_Date return String is begin return Last_Config_Date; end Ocarina_Last_Configure_Date; --------------------------------- -- Ocarina_Last_Configure_Year -- --------------------------------- function Ocarina_Last_Configure_Year return String is begin return Last_Config_Year; end Ocarina_Last_Configure_Year; ------------------ -- GNU_Make_Cmd -- ------------------ function GNU_Make_Cmd return String is begin return GNU_Make_Str; end GNU_Make_Cmd; end Ocarina.Configuration;