comp.lang.ada
 help / color / mirror / Atom feed
* Q: GNAT GPL 2014, configuration pragma, unneeded recompilation
@ 2014-08-14  8:33 gautier_niouzes
  2014-08-15 11:22 ` gautier_niouzes
  0 siblings, 1 reply; 3+ messages in thread
From: gautier_niouzes @ 2014-08-14  8:33 UTC (permalink / raw)


Hello,
Since v. GPL 2014, gnatmake/gprbuild (on Windows at least) recompiles every time all units of a project when the build option -gnatec[file_name] is used.
For instance: -gnatecdebug.pra, where the file debug.pra contains: "pragma Initialize_Scalars;".
This happens also when file debug.pra is unchanged between two builds.
The unneeded recompilation is very annoying.
Does someone have a solution (before I send a bug report...) ?
_________________________
Gautier's Ada programming
http://gautiersblog.blogspot.com/search/label/Ada
NB: follow the above link for a valid e-mail address 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Q: GNAT GPL 2014, configuration pragma, unneeded recompilation
  2014-08-14  8:33 Q: GNAT GPL 2014, configuration pragma, unneeded recompilation gautier_niouzes
@ 2014-08-15 11:22 ` gautier_niouzes
  2014-09-23  9:30   ` gautier_niouzes
  0 siblings, 1 reply; 3+ messages in thread
From: gautier_niouzes @ 2014-08-15 11:22 UTC (permalink / raw)


Could make a reproducer:

new file: p.adb: procedure P is begin null; end;
new file: d.pra: pragma Initialize_Scalars;
new directory: ./obj
cd obj
gnatmake -gnatec../d.pra ../p.adb
gnatmake -gnatec../d.pra ../p.adb

Variant with a project file p.gpr:
project P is
   for Main use ("p.adb");
   for Object_Dir use "obj";
   package Compiler is
      for Default_Switches ("ada") use ("-gnatec../d.pra");
   end Compiler;
end P;

gnatmake -P p
gnatmake -P p

From the .ali file it appears that configuration pragma files are now being tracked for changes (a good thing) but obviously not properly...

G.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Q: GNAT GPL 2014, configuration pragma, unneeded recompilation
  2014-08-15 11:22 ` gautier_niouzes
@ 2014-09-23  9:30   ` gautier_niouzes
  0 siblings, 0 replies; 3+ messages in thread
From: gautier_niouzes @ 2014-09-23  9:30 UTC (permalink / raw)


The solution (thanks AdaCore!): use gprbuild instead of gnatmake.
Now, in GPS, on Ada-only projects, the default is gnatmake.
To change that:
  Click on Edit -> Preferences
  In tab General, for Default builder, select gprbuild
Et voilà!...
_________________________ 
Gautier's Ada programming 
http://sf.net/users/gdemont/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-23  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14  8:33 Q: GNAT GPL 2014, configuration pragma, unneeded recompilation gautier_niouzes
2014-08-15 11:22 ` gautier_niouzes
2014-09-23  9:30   ` gautier_niouzes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox