When a file included through External_Initialization has been modified,
the unit including it must be recompiled. This patch adds the
generation of dependency lines to the handling of the
External_Initialization aspect, to signal that fact to gnatmake and
other tools that invoke GNAT.
gcc/ada/ChangeLog:
* lib-writ.ads (Add_Preprocessing_Dependency): Update
documentation comment.
* sem_ch3.adb (Apply_External_Initialization): Add call to
Add_Preprocessing_Dependency.
procedure Add_Preprocessing_Dependency (S : Source_File_Index);
-- Indicate that there is a dependency to be added on a preprocessing data
- -- file or on a preprocessing definition file.
+ -- file, on a preprocessing definition file or on a file included through
+ -- External_Initialization.
end Lib.Writ;
with Itypes; use Itypes;
with Layout; use Layout;
with Lib; use Lib;
+with Lib.Writ;
with Lib.Xref; use Lib.Xref;
with Mutably_Tagged; use Mutably_Tagged;
with Namet; use Namet;
return;
end if;
+ Lib.Writ.Add_Preprocessing_Dependency (Source_File_I);
+
Expr :=
Make_External_Initializer
(Sloc (Specification), Source_File_I);