comp.lang.ada
 help / color / mirror / Atom feed
* gprbuilds and bullds using the gpr within gps
@ 2015-05-26 10:14 tonyg
  2015-05-26 10:22 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 8+ messages in thread
From: tonyg @ 2015-05-26 10:14 UTC (permalink / raw)



I was under the impression that if a gpr file say called thefile.gpr was able to be built within GPS then if you used gnatmake -Pthefile.gpr , then it would build from the command line.

I'm getting this instead of "no errors at all" which is a little strange to me

tony@wb:~$ gprbuild -PDropbox/source/awsinterface/usnapi.gpr
usnapi.gpr:8:04: no value defined for "library_type"
usnapi.gpr:8:39: warning: undefined external reference
usnapi.gpr:11:04: no value defined for "aws_build"
usnapi.gpr:11:30: warning: undefined external reference
usnapi.gpr:14:04: no value defined for "development"
usnapi.gpr:14:38: warning: undefined external reference
usnapi.gpr:17:04: no value defined for "legacy"
usnapi.gpr:17:28: warning: undefined external reference
usnapi.gpr:20:04: no value defined for "atomic_access"
usnapi.gpr:20:42: warning: undefined external reference
usnapi.gpr:23:04: no value defined for "tasking"
usnapi.gpr:23:30: warning: undefined external reference
usnapi.gpr:26:04: no value defined for "traced_objects"
usnapi.gpr:26:44: warning: undefined external reference
usnapi.gpr:29:04: no value defined for "prj_target"
usnapi.gpr:29:32: warning: undefined external reference
usnapi.gpr:32:04: no value defined for "prj_build"
usnapi.gpr:32:30: warning: undefined external reference
gprbuild: "Dropbox/source/awsinterface/usnapi.gpr" processing failed


Does anyone know of reasons why this is the case?


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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-26 10:14 gprbuilds and bullds using the gpr within gps tonyg
@ 2015-05-26 10:22 ` Dmitry A. Kazakov
  2015-05-29 16:34   ` tonyg
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry A. Kazakov @ 2015-05-26 10:22 UTC (permalink / raw)


On Tue, 26 May 2015 03:14:04 -0700 (PDT), tonyg wrote:

> I was under the impression that if a gpr file say called thefile.gpr was
> able to be built within GPS then if you used gnatmake -Pthefile.gpr , then
> it would build from the command line.
> 
> I'm getting this instead of "no errors at all" which is a little strange to me
> 
> tony@wb:~$ gprbuild -PDropbox/source/awsinterface/usnapi.gpr
> usnapi.gpr:8:04: no value defined for "library_type"
> usnapi.gpr:8:39: warning: undefined external reference
> usnapi.gpr:11:04: no value defined for "aws_build"
> usnapi.gpr:11:30: warning: undefined external reference
> usnapi.gpr:14:04: no value defined for "development"
> usnapi.gpr:14:38: warning: undefined external reference
> usnapi.gpr:17:04: no value defined for "legacy"
> usnapi.gpr:17:28: warning: undefined external reference
> usnapi.gpr:20:04: no value defined for "atomic_access"
> usnapi.gpr:20:42: warning: undefined external reference
> usnapi.gpr:23:04: no value defined for "tasking"
> usnapi.gpr:23:30: warning: undefined external reference
> usnapi.gpr:26:04: no value defined for "traced_objects"
> usnapi.gpr:26:44: warning: undefined external reference
> usnapi.gpr:29:04: no value defined for "prj_target"
> usnapi.gpr:29:32: warning: undefined external reference
> usnapi.gpr:32:04: no value defined for "prj_build"
> usnapi.gpr:32:30: warning: undefined external reference
> gprbuild: "Dropbox/source/awsinterface/usnapi.gpr" processing failed
> 
> Does anyone know of reasons why this is the case?

As it says, you have no scenario variables set (and no default value 
given). Use -X<name>=<value> switch to define the variables. E.g.

gprbuild -PDropbox/source/awsinterface/usnapi.gpr -Xlibrary_type="static"

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-26 10:22 ` Dmitry A. Kazakov
@ 2015-05-29 16:34   ` tonyg
  2015-05-29 16:56     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 8+ messages in thread
From: tonyg @ 2015-05-29 16:34 UTC (permalink / raw)


I cleared out the gpr file, and deleted the dot gps directory and this seemed to work. GPR files seems to grow and grow!

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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-29 16:34   ` tonyg
@ 2015-05-29 16:56     ` Dmitry A. Kazakov
  2015-05-29 17:00       ` Dmitry A. Kazakov
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry A. Kazakov @ 2015-05-29 16:56 UTC (permalink / raw)


On Fri, 29 May 2015 09:34:19 -0700 (PDT), tonyg wrote:

> I cleared out the gpr file, and deleted the dot gps directory and this
> seemed to work. GPR files seems to grow and grow!

Then, likely, you do something wrong. GPR files need not to be long. E.g. I
have ones for 4 platforms and dozens of targets (with alternated sources
and libraries), they are not longer than 100 lines, most of them are 20
lines or less.

GPR nicely inherits almost everything you needed from with-ed projects. The
rest can be obtained from with-ed projects though attributes. No need to
repeat anything in a dependent GPR file.

The only thing that is missing is conditional "with" (I am aware of
"workarounds," they don't work).

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-29 16:56     ` Dmitry A. Kazakov
@ 2015-05-29 17:00       ` Dmitry A. Kazakov
  2015-05-29 18:31         ` Simon Wright
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry A. Kazakov @ 2015-05-29 17:00 UTC (permalink / raw)


On Fri, 29 May 2015 18:56:35 +0200, Dmitry A. Kazakov wrote:

> The only thing that is missing is conditional "with" (I am aware of
> "workarounds," they don't work).

Another missing thing is "build"/"use" views of a library project. It is
tedious to have two, almost same, GPR files, one to build another to use
the library. It should be one file.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-29 17:00       ` Dmitry A. Kazakov
@ 2015-05-29 18:31         ` Simon Wright
  2015-05-29 20:05           ` Dmitry A. Kazakov
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Wright @ 2015-05-29 18:31 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> On Fri, 29 May 2015 18:56:35 +0200, Dmitry A. Kazakov wrote:
>
>> The only thing that is missing is conditional "with" (I am aware of
>> "workarounds," they don't work).
>
> Another missing thing is "build"/"use" views of a library project. It
> is tedious to have two, almost same, GPR files, one to build another
> to use the library. It should be one file.

gprinstall knows how to do this.

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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-29 18:31         ` Simon Wright
@ 2015-05-29 20:05           ` Dmitry A. Kazakov
  2015-06-01 19:00             ` Pascal Obry
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry A. Kazakov @ 2015-05-29 20:05 UTC (permalink / raw)


On Fri, 29 May 2015 19:31:27 +0100, Simon Wright wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> On Fri, 29 May 2015 18:56:35 +0200, Dmitry A. Kazakov wrote:
>>
>>> The only thing that is missing is conditional "with" (I am aware of
>>> "workarounds," they don't work).
>>
>> Another missing thing is "build"/"use" views of a library project. It
>> is tedious to have two, almost same, GPR files, one to build another
>> to use the library. It should be one file.
> 
> gprinstall knows how to do this.

With projects with-ing other projects? Does it know if it should continue
to "install" recursively or stop? Does GPS know if it should apply grpbuild
or gprinstall to the given project in the chain? It looks like a hack to
me.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: gprbuilds and bullds using the gpr within gps
  2015-05-29 20:05           ` Dmitry A. Kazakov
@ 2015-06-01 19:00             ` Pascal Obry
  0 siblings, 0 replies; 8+ messages in thread
From: Pascal Obry @ 2015-06-01 19:00 UTC (permalink / raw)


Le vendredi 29 mai 2015 à 22:05 +0200, Dmitry A. Kazakov a écrit : 
> With projects with-ing other projects? Does it know if it should continue
> to "install" recursively or stop? 

Yes, it won't install a project already installed for example. You can
also disable the recursive behavior. If you don't want to install a
project the Active project's attribute can be used. Also it will install
only the bodies if required (i.e. the spec has a generic or inline
unit).

The tool gprinstall is very nice (I certainly won't call it a hack) and
it make it possible to do large clean-up in Makefile! I can assure you
having moved many projects to use gprinstall. Also at the end gprinstall
--uninstall will remove *every* installed files.

It also makes it easier to install on Windows where it is a pain to have
a decent working shell (or at least one compatible with all Unixes).

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B


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

end of thread, other threads:[~2015-06-01 19:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 10:14 gprbuilds and bullds using the gpr within gps tonyg
2015-05-26 10:22 ` Dmitry A. Kazakov
2015-05-29 16:34   ` tonyg
2015-05-29 16:56     ` Dmitry A. Kazakov
2015-05-29 17:00       ` Dmitry A. Kazakov
2015-05-29 18:31         ` Simon Wright
2015-05-29 20:05           ` Dmitry A. Kazakov
2015-06-01 19:00             ` Pascal Obry

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