aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/xoscons.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-10-29 12:56:46 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-10-29 12:56:46 +0100
commit5f41168186604d1c47d14a601a2c0f0f8f025082 (patch)
treea1ed26ceee9fdd4551695269467b9f8197730aac /gcc/ada/xoscons.adb
parent29dd4e883e5229e550bd24e6f74ce82d63a1335b (diff)
downloadgcc-5f41168186604d1c47d14a601a2c0f0f8f025082.zip
gcc-5f41168186604d1c47d14a601a2c0f0f8f025082.tar.gz
gcc-5f41168186604d1c47d14a601a2c0f0f8f025082.tar.bz2
[multiple changes]
2012-10-29 Pascal Obry <obry@adacore.com> * xoscons.adb, Make-generated.in; The template used by xoscons is now given as parameter. * gcc-interface/Make-lang.in: Update dependencies. 2012-10-29 Yannick Moy <moy@adacore.com> * exp_dbug.adb (Qualify_Entity_Name): Only do renaming in formal verification mode when there is a homonym. From-SVN: r192942
Diffstat (limited to 'gcc/ada/xoscons.adb')
-rw-r--r--gcc/ada/xoscons.adb15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/xoscons.adb b/gcc/ada/xoscons.adb
index fc78205..ec452c3 100644
--- a/gcc/ada/xoscons.adb
+++ b/gcc/ada/xoscons.adb
@@ -23,16 +23,18 @@
-- --
------------------------------------------------------------------------------
--- This program generates the spec of System.OS_Constants (s-oscons.ads)
+-- The base name of the template file is given by Argument (1). This program
+-- generates the spec for this specified unit (let's call it UNIT_NAME).
-- It works in conjunction with a C template file which must be pre-processed
-- and compiled using the cross compiler. Two input files are used:
--- - the preprocessed C file: s-oscons-tmplt.i
--- - the generated assembly file: s-oscons-tmplt.s
+-- - the preprocessed C file: UNIT_NAME-tmplt.i
+-- - the generated assembly file: UNIT_NAME-tmplt.s
--- The contents of s-oscons.ads is written on standard output
+-- The generated files are UNIT_NAME.ads and UNIT_NAME.h
with Ada.Characters.Handling; use Ada.Characters.Handling;
+with Ada.Command_Line; use Ada.Command_Line;
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Text_IO; use Ada.Text_IO;
@@ -52,7 +54,7 @@ procedure XOSCons is
use ASCII;
use Ada.Strings;
- Unit_Name : constant String := "s-oscons";
+ Unit_Name : constant String := Argument (1);
Tmpl_Name : constant String := Unit_Name & "-tmplt";
-------------------------------------------------
@@ -559,4 +561,7 @@ begin
Close (Tmpl_File);
+exception
+ when others =>
+ Put_Line ("xoscons <base_name>");
end XOSCons;