From: mockturtle <framefritti@gmail.com>
Subject: Re: gpr and Makefiles
Date: Mon, 27 Jan 2020 12:28:57 -0800 (PST)
Date: 2020-01-27T12:28:57-08:00 [thread overview]
Message-ID: <19573556-c9bc-4703-aac3-9d655537627e@googlegroups.com> (raw)
In-Reply-To: <3500a9de-3d02-4e8b-b75a-09ea5dc28570@googlegroups.com>
On Monday, January 27, 2020 at 6:49:38 PM UTC+1, Shark8 wrote:
> On Monday, January 27, 2020 at 9:22:41 AM UTC-7, mockturtle wrote:
> >
> > foo.ads: bar.txt
> > convert --from=bar.txt --to=foo.ads
> >
> > What I would like is having gprbuild checking if bar.txt is newer than foo.ads; if it is, run convert and after that proceed with the actual building.
> >
> > Is this possible?
> >
> > I also checked Gem #152 (https://www.adacore.com/gems/gem-152-defining-a-new-language-in-a-project-file) about defining a new language inside a gpr file, but I am not sure it can be a solution.
> Why not?
> Wouldn't you just use
>
> Package Compiler is
> for Driver ("Converter") use "convert";
> for Object_Generated ("Converter") use "False";
> --...
> End Compiler;
It worked, thank you.
Actually, it was less trivial than I expected. The main problem was that gprbuild expects a command line like
<compiler name> <pre-options> <source> <post-options>
while my command line was
convert <output filename> <input filename>
However, since convert is actually a Ruby script I changed it to handle the case <output>=-c as an "automagical" case where the output filename is obtained from the input.
next prev parent reply other threads:[~2020-01-27 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 16:22 gpr and Makefiles mockturtle
2020-01-27 17:49 ` Shark8
2020-01-27 19:32 ` mockturtle
2020-01-27 19:46 ` Simon Wright
2020-01-27 20:30 ` mockturtle
2020-01-27 20:28 ` mockturtle [this message]
2020-01-28 11:57 ` briot.emmanuel
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox