Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
0702af52
Commit
0702af52
authored
Mar 30, 2017
by
yoogx
Browse files
* Copy runtime in generated tree
For issue #84
parent
c7da6525
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/backends/ocarina-backends-build_utils.adb
View file @
0702af52
...
...
@@ -1442,6 +1442,19 @@ package body Ocarina.Backends.Build_Utils is
Close
(
Fd
);
Set_Standard_Output
;
-- Copy the runtime directory
if
Get_Current_Backend_Kind
=
PolyORB_HI_C
then
Copy_Directory
(
Get_Runtime_Path
(
"polyorb-hi-c"
),
"polyorb-hi-c"
);
else
if
Get_Current_Backend_Kind
=
PolyORB_HI_Ada
then
Copy_Directory
(
Get_Runtime_Path
(
"polyorb-hi-ada"
),
"polyorb-hi-ada"
);
end
if
;
end
if
;
Leave_Directory
;
end
if
;
...
...
src/backends/ocarina-backends-utils.adb
View file @
0702af52
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-201
7
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- --
...
...
@@ -219,6 +219,41 @@ package body Ocarina.Backends.Utils is
return
Name_Find
;
end
Remove_Directory_Separator
;
--------------------
-- Copy_Directory --
--------------------
procedure
Copy_Directory
(
From
:
String
;
Dest
:
String
)
is
procedure
Process_Entry
(
Directory_Entry
:
Directory_Entry_Type
)
is
begin
case
Kind
(
Full_Name
(
Directory_Entry
))
is
when
Ordinary_File
=>
Copy_File
(
Full_Name
(
Directory_Entry
),
Dest
&
"/"
&
Simple_Name
(
Simple_Name
(
Directory_Entry
)));
when
Directory
=>
if
Simple_Name
(
Simple_Name
(
Directory_Entry
))
/=
""
then
Copy_Directory
(
Full_Name
(
Directory_Entry
),
Compose
(
Dest
,
Simple_Name
(
Directory_Entry
)));
end
if
;
when
others
=>
null
;
end
case
;
end
Process_Entry
;
begin
if
Kind
(
From
)
=
Directory
then
Create_Path
(
Dest
);
else
raise
Program_Error
with
"Invalid kind for "
&
From
;
end
if
;
Search
(
From
,
""
,
Process
=>
Process_Entry
'
Access
);
end
Copy_Directory
;
----------------------------------
-- May_Be_Append_Handling_Entry --
----------------------------------
...
...
src/backends/ocarina-backends-utils.ads
View file @
0702af52
...
...
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- Copyright (C) 2005-2009 Telecom ParisTech, 2010-201
7
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- --
...
...
@@ -68,6 +68,9 @@ package Ocarina.Backends.Utils is
-- If there is a directory separator at the end of the path, then
-- remove it and return the result. Else, return the same string.
procedure
Copy_Directory
(
From
:
String
;
Dest
:
String
);
-- Copy directory pointed by 'from' to 'dest'
----------
-- Misc --
----------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment