aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bld.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/bld.adb')
-rw-r--r--gcc/ada/bld.adb31
1 files changed, 25 insertions, 6 deletions
diff --git a/gcc/ada/bld.adb b/gcc/ada/bld.adb
index 07add38e2e0..492f205ec61 100644
--- a/gcc/ada/bld.adb
+++ b/gcc/ada/bld.adb
@@ -1559,9 +1559,9 @@ package body Bld is
Put ("src.list_file:=" &
"$(strip $(shell gprcmd to_absolute $(");
Put (Project_Name);
- Put (".base_dir) $(");
+ Put (".base_dir) '$(");
Put_Attribute (Project, Pkg, Item_Name, No_Name);
- Put_Line (")))");
+ Put_Line (")'))");
if In_Case then
if Source_List_File_Declaration = False then
@@ -1595,9 +1595,9 @@ package body Bld is
Put (".obj_dir:=" &
"$(strip $(shell gprcmd to_absolute $(");
Put (Project_Name);
- Put (".base_dir) $(");
+ Put (".base_dir) '$(");
Put_Attribute (Project, Pkg, Item_Name, No_Name);
- Put_Line (")))");
+ Put_Line (")'))");
elsif Item_Name = Snames.Name_Exec_Dir then
@@ -1611,9 +1611,9 @@ package body Bld is
Put ("EXEC_DIR:=" &
"$(strip $(shell gprcmd to_absolute $(");
Put (Project_Name);
- Put (".base_dir) $(");
+ Put (".base_dir) '$(");
Put_Attribute (Project, Pkg, Item_Name, No_Name);
- Put_Line (")))");
+ Put_Line (")'))");
elsif Item_Name = Snames.Name_Main then
@@ -2595,6 +2595,25 @@ package body Bld is
-- Include some utility functions and saved all reserved
-- env. vars. by including Makefile.prolog.
+ New_Line;
+
+ -- First, if MAKE_ROOT is not defined, try to get GNAT prefix
+
+ Put (" ifeq ($(");
+ Put (MAKE_ROOT);
+ Put ("),)");
+ New_Line;
+
+ Put (" MAKE_ROOT=$(shell gprcmd prefix)");
+ New_Line;
+
+ Put (" endif");
+ New_Line;
+
+ New_Line;
+
+ -- If MAKE_ROOT is still not defined, then fail
+
Put (" ifeq ($(");
Put (MAKE_ROOT);
Put ("),)");