[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How are system parameters entered into s-taprop.adb?



Niklas Holsti writes:
> the compiler knows about the dependencies between .ads and .adb files
> (and also between different .ads files).
>
> Changing an .ads file (in a significant way) should certainly trigger
> recompilation of those .adb files that depend on the changed .ads
> file. However, the Gnat compiler has some (optional) intelligence that
> can avoid recompilation when a file is changed in an inessential way,
> for example just in the comments.

That is correct in the normal case where you are compiling an Ada
program or library using gnatmake; the intelligence about the
dependencies and recompilation is in gnatmake.

However the OP is building the compiler itself and was talking about the
stages of compilation before building gnatmake.  For these stages, there
is no intelligence about inter-unit or inter-file dependencies.
Instead, the list of units to be compiled for each library (libgnat,
libgnarl) or tool (gnat1) is hardcoded in src/gcc/ada/Makefile.in, and
make decides which files need to be recompiled based solely on the
timestamps of the source and object files.  The list in the Makefile
contains one source file per unit; this is either the .ads (for bodiless
units) or the .adb (for units with bodies), not both.

BTW, thanks to all who responded, I appreciate the help.

-- 
Ludovic Brenta.


Reply to: