Commit 88f1f3e7 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Improve templates for AIR

parent 86c97e7c
......@@ -5,7 +5,8 @@
with Ada.Directories,
Ada.IO_Exceptions,
Ada.Exceptions,
Ada.Characters.Latin_1;
Ada.Characters.Latin_1,
Ada.Strings.Fixed;
use Ada.Directories;
......@@ -237,6 +238,8 @@ package body TASTE.Concurrency_View is
(if Part_Check then Strip_String (Parse (File_Id, Part_Tag))
else "");
Part_Content : Unbounded_String;
-- Part_File_Name may contain a subfolder
Subfolder : Unbounded_String;
begin
for Each of Partition.In_Ports loop
Input_Port_Names := Input_Port_Names & Each.Port_Name;
......@@ -413,7 +416,22 @@ package body TASTE.Concurrency_View is
-- Save the content of the partition in a file
-- (if required at template folder level)
if Part_File_Name /= "" then
Create_Path (CV_Out_Dir & Node_Name);
declare
Last_Slash : constant Natural :=
Ada.Strings.Fixed.Index
(Source => Part_File_Name,
From => Part_File_Name'Last,
Pattern => "/",
Going => Ada.Strings.Backward);
begin
Subfolder := US (Part_File_Name (1 .. Last_Slash));
exception
when Ada.Strings.Index_Error =>
Subfolder := US ("");
end;
Create_Path (CV_Out_Dir & Node_Name
& "/" & To_String (Subfolder));
Create (File => Output_File,
Mode => Out_File,
Name =>
......
......@@ -72,9 +72,10 @@ project @_CAPITALIZE:Name_@_AIR is
-- following to be updated with all relevant source dirs
for Source_Dirs use
(".",
("@_LOWER:Name_@",
"/home/taste/air/air/pmk/core/include",
"/home/taste/air/air/pmk/arch/sparc/include",
"/home/taste/air/air/libs/imaspex/include",
"../deploymentview_final/polyorb-hi-c/src",
"../deploymentview_final/polyorb-hi-c/include",
"../../dataview/C",
......@@ -99,6 +100,7 @@ project @_CAPITALIZE:Name_@_AIR is
"cheddar_schedule.hh",
"cheddar_types.hh",
"config.c",
"config_leon3_drvmgr.c",
"config_leon4_n2x.c",
"grspw_api.c",
"grspw_pkt_lib.c",
......
......@@ -42,7 +42,7 @@ project @_CAPITALIZE:Name_@ is
@@END_TABLE@@
-- following to be updated with all relevant source dirs
for Source_Dirs use
(".",
("@_LOWER:Name_@",
"../deploymentview_final/polyorb-hi-c/src",
"../deploymentview_final/polyorb-hi-c/include",
"../../dataview/C",
......
......@@ -70,7 +70,7 @@ project @_CAPITALIZE:Name_@_RTEMS_Ada is
-- following to be updated with all relevant source dirs
for Source_Dirs use
(".",
("@_LOWER:Name_@",
"../deploymentview_final/polyorb-hi-c/src",
"../deploymentview_final/polyorb-hi-c/include",
"../../dataview/C",
......
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Partition_Name_@_polyorb_interface.c
@_LOWER:Partition_Name_@/@_LOWER:Partition_Name_@_polyorb_interface.c
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Partition_Name_@_polyorb_interface.h
@_LOWER:Partition_Name_@/@_LOWER:Partition_Name_@_polyorb_interface.h
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