I agree with you Mr van Os: gp works "as documented".
My point is about why, when calling gpc directly, I can have gpi and object files in different directories but not when using gp.
Previously I was using make and gpc with a directory structure where gpi files were in a "gpi" directory and all objects from Pascal, C ,C++, and other languages where in a "obj" directory. If it is not possible to keep this directory structure, I will change it. That is no big deal.
However, I find a bit strange that gp can generate objects in two different directories depending on the source type and then not being able to retrieve them later without adding a command-line option (--object-path). Or maybe this was designed for a different purpose than mine.
Anyway after some tries, I don't see an easy way to change the actual behaviour, even for test purpose.
Regards,
Pascal Viandier pascal@accovia.com
-----Message d'origine----- De : gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] De la part de Adriaan van Os Envoyé : November 30, 2005 15:47 À : gpc@gnu.de Objet : Re: RE : gp vs --automake
Pascal Viandier wrote:
<snip> > > I am working on that to give you a clear example of what happens. I > made a > simple test program using a module that contains the {$L } directive > and > gp > worked perfectly, even recompiling the c source when necessary. But > with > the > real life application it fails repeatedly. I am trying to find the > pattern > and will let you know. >
I found what is going on: I specify --object-destination-path=obj/dbg to gp. This option - as mentioned in a previous post - is not passed to gpc but I found that it is passed gcc so the gpc objects are in the gpi directory and the ones from gcc in obj/dbg. So the C objects are correctly compiled but not retrieved by gpc unless I put --object-path=obj/dbg option to gp.
I think this is a consequence of the fact that gp ignores the --object-destination-path option when it calls gpc. I will try to solve this one, if you agree.
But the gpc manual says:
--unit-destination-path Path where to create object and GPI files of Pascal units. --no-unit-destination-path Create object and GPI files of Pascal units in the current directory (default). --object-destination-path Path where to create additional object files (e.g. of C files, not Pascal units). --no-object-destination-path Create additional object files (e.g. of C files, not Pascal units) in the current directory (default).
Regards,
Adriaan van Os