Skip to content

Commit

Permalink
Very first successful build ;-)
Browse files Browse the repository at this point in the history
Instructions on macOS:
$ export GPR_PROJECT_PATH=/Users/moi/Documents/Programmation/SVNGIT/GTKAda/build/lib/gnat:/Users/moi/Documents/Programmation/SVNGIT/libadalang/build/lib/gnat:/Users/moi/Documents/Programmation/SVNGIT/libadalang-tools/src:/Users/moi/Documents/Programmation/SVNGIT/gnatcoll-core/build/share/gpr
$ PATH=/usr/local/xnadalib-2017/bin:$PATH
$ ./configure --with-clang=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
$ make LIBRARY_TYPE=static
$ ln -s share share/gps
$ install_name_tool -add_rpath /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib gps/obj/gps
$ XDG_DATA_DIRS=/usr/local/xnadalib-2017/share GPS_ROOT=$PWD GPS_PYTHONHOME=/usr/local/gnat-2017 GPS_HOME=gps/obj gps/obj/gps
Some non blocking errors remains.
  • Loading branch information
Blady-Com committed Jan 10, 2018
1 parent 618d7b8 commit 04ec995
Show file tree
Hide file tree
Showing 20 changed files with 119 additions and 105 deletions.
10 changes: 5 additions & 5 deletions cli/cli.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ project CLI is

for Ignored_Subprojects use (
"gnatcoll",
"gnatcoll_shared",
"gnatcoll_iconv",
"gnatcoll_python",
"gnatcoll_sqlite",
"gnatcoll_xref",
"gnatcoll-shared",
"gnatcoll-iconv",
"gnatcoll-python",
"gnatcoll-sqlite",
"gnatcoll-xref",
"templates_parser",
"xmlada",
"xmlada_sax",
Expand Down
4 changes: 2 additions & 2 deletions common/common_no_xmlada.gpr.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with "gnatcoll_sqlite.gpr";
with "gnatcoll_xref.gpr";
with "gnatcoll-sqlite.gpr";
with "gnatcoll-xref.gpr";
with "../shared";

project Common is
Expand Down
4 changes: 2 additions & 2 deletions common/common_with_xmlada.gpr.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with "gnatcoll_sqlite.gpr";
with "gnatcoll_xref.gpr";
with "gnatcoll-sqlite.gpr";
with "gnatcoll-xref.gpr";
with "../shared";
with "xmlada_sax";

Expand Down
2 changes: 1 addition & 1 deletion gnatcoll_extras/gnatcoll_extras.gpr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
with "gtkada";
with "gnatcoll";
with "gnatcoll_python";
with "gnatcoll-python";
with "../shared";

project GNATCOLL_Extras is
Expand Down
4 changes: 2 additions & 2 deletions gps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ PYTHON=python
Build?=Debug

ifeq ($(Build),Production)
GPRBUILD_BUILD_TYPE_FLAGS=-XBuild=Production -XGnatcoll_Build=Production -XOS=${OS} -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
GPRBUILD_BUILD_TYPE_FLAGS=-XBuild=Production -XGnatcoll_Build=Production -XOS=${OS}
else
GPRBUILD_BUILD_TYPE_FLAGS=-XBuild=Debug -XGnatcoll_Build=Debug -XOS=${OS} -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
GPRBUILD_BUILD_TYPE_FLAGS=-XBuild=Debug -XGnatcoll_Build=Debug -XOS=${OS}
endif

.PHONY: default resources do_links all clean
Expand Down
4 changes: 3 additions & 1 deletion gps/gps.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ project GPS is
case Shared.OS is
when "Windows_NT" =>
for Switches ("Ada") use ("obj/gps.res", "-mwindows");
when "unix" | "osx" =>
when "unix" =>
null;
when "osx" =>
for Switches ("Ada") use ("-Wl,-no_pie");
end case;
for Switches ("Ada") use Linker'Switches ("Ada")
& Shared.Linker'Switches ("Ada");
Expand Down
24 changes: 12 additions & 12 deletions gps/src/gps-main.adb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ with KeyManager_Module;
with KeyManager_Module.Macros;
with Toolchains_Module;
with Ada_Semantic_Tree_Module;
with LAL.Module;
-- with LAL.Module;
with Language_Handlers.Assistants;
with Learn.Views;
with Memory_Usage_Views.Module;
Expand All @@ -189,7 +189,7 @@ with VFS_Module;
with Vdiff2_Module;
with Vsearch;
with Language.Libclang;
with Ada_Semantic_Tree.Lang;
-- with Ada_Semantic_Tree.Lang;

procedure GPS.Main is
package ICS renames Interfaces.C.Strings;
Expand Down Expand Up @@ -2237,16 +2237,16 @@ procedure GPS.Main is

Ada_Module.Register_Module (GPS_Main.Kernel);

LAL.Module.Register_Module
(GPS_Main.Kernel,
(LAL.Use_LAL_In_Editor => Use_LAL_In_Editor.Get_Pref,
LAL.Use_LAL_In_Outline => Use_LAL_In_Outline.Get_Pref,
LAL.Use_LAL_In_Shell => Use_LAL_In_Shell.Get_Pref,
LAL.Use_LAL_In_Info => Use_LAL_In_Info.Get_Pref,
LAL.Use_LAL_In_GNATHUB => Use_LAL_In_GNATHUB.Get_Pref,
LAL.Use_LAL_In_COV => Use_LAL_In_COV.Get_Pref,
LAL.Use_LAL_In_Indent => Use_LAL_In_Indent.Get_Pref),
Legacy => Ada_Semantic_Tree.Lang.Ada_Tree_Lang);
-- LAL.Module.Register_Module
-- (GPS_Main.Kernel,
-- (LAL.Use_LAL_In_Editor => Use_LAL_In_Editor.Get_Pref,
-- LAL.Use_LAL_In_Outline => Use_LAL_In_Outline.Get_Pref,
-- LAL.Use_LAL_In_Shell => Use_LAL_In_Shell.Get_Pref,
-- LAL.Use_LAL_In_Info => Use_LAL_In_Info.Get_Pref,
-- LAL.Use_LAL_In_GNATHUB => Use_LAL_In_GNATHUB.Get_Pref,
-- LAL.Use_LAL_In_COV => Use_LAL_In_COV.Get_Pref,
-- LAL.Use_LAL_In_Indent => Use_LAL_In_Indent.Get_Pref),
-- Legacy => Ada_Semantic_Tree.Lang.Ada_Tree_Lang);

if Active (CPP_Trace) then
Cpp_Module.Register_Module (GPS_Main.Kernel);
Expand Down
4 changes: 2 additions & 2 deletions kernel/kernel_core.gpr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
with "../common/common";
with "../shared";
with "gnatcoll";
with "gnatcoll_sqlite";
with "gnatcoll_xref";
with "gnatcoll-sqlite";
with "gnatcoll-xref";
with "../language/language";
with "../toolchains_editor/core/toolchains_core";

Expand Down
4 changes: 2 additions & 2 deletions lal/lal.gpr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
with "../kernel/kernel_core";
with "../shared";
with "../laltools/src/lal_tools";
with "lal_tools";

with "libadalang";
with "gnatcoll_python";
with "gnatcoll-python";
project LAL is

for Source_Dirs use ("src");
Expand Down
2 changes: 1 addition & 1 deletion lal/src/lal-ada_languages.adb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ package body LAL.Ada_Languages is

Root := Libadalang.Analysis.Root (Unit);

if Root = null then
if Root = Libadalang.Analysis.No_Ada_Node then
Lang.Kernel.Messages_Window.Insert_UTF8
("Error during parsing:",
Mode => GPS.Messages_Windows.Error);
Expand Down
10 changes: 5 additions & 5 deletions lal/src/lal-module.adb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ with System.Storage_Elements;
with Interfaces.C;
with LAL.Switching_Tree_Providers; use LAL.Switching_Tree_Providers;
with Language.Ada;
with Libadalang.Analysis.C;
with Libadalang.Analysis.Implementation.C;
with GNATCOLL.Python;
with GNATCOLL.Scripts.Python; use GNATCOLL.Scripts.Python;
with GNATCOLL.Scripts; use GNATCOLL.Scripts;
Expand Down Expand Up @@ -61,7 +61,7 @@ package body LAL.Module is
Kernel.Get_Buffer_Factory.Buffer_From_Instance (Instance);

Unit : Libadalang.Analysis.Analysis_Unit;
Unit_C : Libadalang.Analysis.C.ada_analysis_unit;
Unit_C : Libadalang.Analysis.Implementation.C.ada_analysis_unit;
Int : System.Storage_Elements.Integer_Address;
Value : GNATCOLL.Python.PyObject;
Args : Callback_Data'Class := Python.Create (1);
Expand All @@ -71,7 +71,7 @@ package body LAL.Module is
Filename => Buffer.File.Display_Full_Name,
Buffer => Buffer.Get_Chars);

Unit_C := Libadalang.Analysis.C.Wrap (Unit);
Unit_C := Libadalang.Analysis.Implementation.C.Wrap (Unit);
Int := System.Storage_Elements.To_Integer (System.Address (Unit_C));
Value := GNATCOLL.Python.PyInt_FromSize_t (Interfaces.C.size_t (Int));
Python_Callback_Data'Class (Args).Set_Nth_Arg (1, Value);
Expand All @@ -94,8 +94,8 @@ package body LAL.Module is
begin
Module := new LAL_Module_Id_Record;
Module.Kernel := GPS.Core_Kernels.Core_Kernel (Kernel);
Module.Context := Libadalang.Analysis.Create
(Unit_Provider => Module.Unit_Provider'Access);
-- Module.Context := Libadalang.Analysis.Create
-- (Unit_Provider => Module.Unit_Provider'Access);

Module.Unit_Provider.Initialize (GPS.Core_Kernels.Core_Kernel (Kernel));

Expand Down
Loading

0 comments on commit 04ec995

Please sign in to comment.