comp.lang.ada
 help / color / mirror / Atom feed
* New tool "gprexec", basically "make with project file"
@ 2019-01-11 22:00 VM Celier
  2019-01-14 21:06 ` Shark8
  0 siblings, 1 reply; 5+ messages in thread
From: VM Celier @ 2019-01-11 22:00 UTC (permalink / raw)


I am starting a new project that I have been thinking for several years: gprexec.

gprexec is a "Make build automation tool using GPR project files to describe goals, dependencies, and processes".

It uses a new package: Execution.

Here is an example of a project that can be used by gprexec:

project Toto is

   for Main use ("toto.adb");

   package Execution is
      for Process ("display_main") use ("cat", "toto.adb");
      for Dependency ("display") use ("display_main");
      for Process ("display") use ("cat", "toto.gpr");
      for Process ("date") use ("date");
      for Process ("toto") use ("gprbuild", "-f", "-q", "toto.gpr");
      for Dependency ("default") use ("display", "toto", "date");
      for Process ("default") use ("toto");
   end Execution;
end Toto;

Package Execution has these attributes:

- Dependency, to indicate the goals that need to be processed before
  the indexed goal.


- Process, to indicate the process to be invoked, with its arguments,
  for the indexed goal.

gprexec needs to be invoked with a single project file and an optional goal. When no goal is specified on the command line, the goal "default" is implied.

For example with the project file toto.gpr above, invoking

   gprexec toto.gpr

the goal default will be used, and according to the dependencies processes will be invoked in the following order:

(goal "display_main): cat toto.adb
(goal "display"):     cat toto.gpr
(goal "toto"):        gprbuild -f -q toto.gpr
(goal "date"):        date
(goal "default"):     toto

After displaying the main toto.adb and the project file toto.gpr, toto.adb is compiled, bound and linked, the date is displayed and the executable "toto" is invoked.

gprexec uses the project file "gpr.gpr", part of the gprbuild repository.

I just created a public repository for gprexec on Github:

   https://github.com/vmcelier/gprexec

Anybody interested?

--  Vincent Celier
(no longer associated with AdaCore)


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

end of thread, other threads:[~2019-01-15 17:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 22:00 New tool "gprexec", basically "make with project file" VM Celier
2019-01-14 21:06 ` Shark8
2019-01-15  0:49   ` VM Celier
2019-01-15 16:41     ` Shark8
2019-01-15 17:22       ` Shark8

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