From: VM Celier <vmcelier@gmail.com>
Subject: New tool "gprexec", basically "make with project file"
Date: Fri, 11 Jan 2019 14:00:10 -0800 (PST)
Date: 2019-01-11T14:00:10-08:00 [thread overview]
Message-ID: <3fd9efd3-2ac5-4711-a1bc-fb75c57d7ffa@googlegroups.com> (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)
next reply other threads:[~2019-01-11 22:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-11 22:00 VM Celier [this message]
2019-01-14 21:06 ` New tool "gprexec", basically "make with project file" Shark8
2019-01-15 0:49 ` VM Celier
2019-01-15 16:41 ` Shark8
2019-01-15 17:22 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox