You've already forked templates-parser
mirror of
https://github.com/AdaCore/templates-parser.git
synced 2026-02-12 12:29:55 -08:00
Allow the caller to override all cflags via environment variables.
Some redundant settings may probably be replaced with renamings from TP_Shared so that they are updated in a single place in TP_Shared. docs: -gnat05 regtests: -gnat05 -m Subversion
This commit is contained in:
committed by
Pascal Obry
parent
5fcb57c77c
commit
00a35f8a90
@@ -1,7 +1,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- Templates Parser --
|
||||
-- --
|
||||
-- Copyright (C) 2005-2013, AdaCore --
|
||||
-- Copyright (C) 2005-2016, AdaCore --
|
||||
-- --
|
||||
-- This is free software; you can redistribute it and/or modify it --
|
||||
-- under terms of the GNU General Public License as published by the --
|
||||
@@ -28,7 +28,15 @@ project Docs is
|
||||
for Exec_Dir use "build/bin";
|
||||
|
||||
package Compiler is
|
||||
for Default_Switches ("Ada") use ("-gnat05");
|
||||
for Default_Switches ("Ada") use ("-gnat05") & TP_Shared.Adaflags;
|
||||
end Compiler;
|
||||
|
||||
package Binder renames TP_Shared.Binder;
|
||||
|
||||
package Builder renames TP_Shared.Builder;
|
||||
|
||||
package Linker renames TP_Shared.Linker;
|
||||
|
||||
package Ide renames TP_Shared.Ide;
|
||||
|
||||
end Docs;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- Templates Parser --
|
||||
-- --
|
||||
-- Copyright (C) 2005-2013, AdaCore --
|
||||
-- Copyright (C) 2005-2016, AdaCore --
|
||||
-- --
|
||||
-- This is free software; you can redistribute it and/or modify it --
|
||||
-- under terms of the GNU General Public License as published by the --
|
||||
@@ -33,9 +33,15 @@ project Regtests is
|
||||
--------------
|
||||
|
||||
package Compiler is
|
||||
for Default_Switches ("Ada") use ("-gnat05", "-g");
|
||||
for Default_Switches ("Ada") use ("-gnat05", "-g") & TP_Shared.Adaflags;
|
||||
end Compiler;
|
||||
|
||||
------------
|
||||
-- Binder --
|
||||
------------
|
||||
|
||||
package Binder renames TP_Shared.Binder;
|
||||
|
||||
-------------
|
||||
-- Builder --
|
||||
-------------
|
||||
@@ -44,6 +50,12 @@ project Regtests is
|
||||
for Default_Switches ("Ada") use ("-m");
|
||||
end Builder;
|
||||
|
||||
------------
|
||||
-- Linker --
|
||||
------------
|
||||
|
||||
package Linker renames TP_Shared.Linker;
|
||||
|
||||
---------
|
||||
-- Ide --
|
||||
---------
|
||||
|
||||
@@ -29,6 +29,7 @@ library project Templates_Parser is
|
||||
for Library_Name use "templates_parser";
|
||||
for Library_Kind use TP_Shared.Library_Type;
|
||||
for Library_Version use "libtemplates_parser-" & external("VERSION") & ".so";
|
||||
for Library_Options use TP_Shared.Ldflags;
|
||||
|
||||
case TP_Shared.XMLAda is
|
||||
when "Installed" =>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- Templates Parser --
|
||||
-- --
|
||||
-- Copyright (C) 2008-2013, AdaCore --
|
||||
-- Copyright (C) 2008-2016, AdaCore --
|
||||
-- --
|
||||
-- This is free software; you can redistribute it and/or modify it --
|
||||
-- under terms of the GNU General Public License as published by the --
|
||||
@@ -34,6 +34,8 @@ project Tools is
|
||||
|
||||
package Binder renames TP_Shared.Binder;
|
||||
|
||||
package Linker renames TP_Shared.Linker;
|
||||
|
||||
package Ide renames TP_Shared.Ide;
|
||||
|
||||
end Tools;
|
||||
|
||||
@@ -36,6 +36,9 @@ abstract project TP_Shared is
|
||||
|
||||
Build_Dir := ".build";
|
||||
|
||||
Adaflags := External_As_List ("ADAFLAGS", " ");
|
||||
Ldflags := External_As_List ("LDFLAGS", " ");
|
||||
|
||||
--------------
|
||||
-- Compiler --
|
||||
--------------
|
||||
@@ -57,6 +60,10 @@ abstract project TP_Shared is
|
||||
when "Debug" =>
|
||||
for Default_Switches ("Ada") use Common_Options & Debug_Options;
|
||||
end case;
|
||||
|
||||
for Default_Switches ("Ada")
|
||||
use Compiler'Default_Switches ("Ada") & Adaflags;
|
||||
-- Put user flags at they end so that they take precedence.
|
||||
end Compiler;
|
||||
|
||||
------------
|
||||
@@ -75,6 +82,14 @@ abstract project TP_Shared is
|
||||
for Default_Switches ("Ada") use ("-m", "-j" & Processors);
|
||||
end Builder;
|
||||
|
||||
------------
|
||||
-- Linker --
|
||||
------------
|
||||
|
||||
package Linker is
|
||||
for Default_Switches ("Ada") use Ldflags;
|
||||
end Linker;
|
||||
|
||||
---------
|
||||
-- Ide --
|
||||
---------
|
||||
|
||||
Reference in New Issue
Block a user