Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Christo
On Thu, 2018-07-05 at 00:20 +0200, Tomas Hajny wrote:
> If you look into fpmake.pp in the same directory, you'll find out that the
> proper command line for calling data2inc should be:
> 
> data2inc -b -s fpcmake.ini fpcmake.inc fpcmakeini
> 
> (add paths as necessary, e.g. the path to data2inc if not on PATH)

Thank you Tomas, I didn't specify the correct options to data2inc.
I managed to regenerate a makefile which reflected the changes in fpcmake.ini!
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Tomas Hajny
On Thu, July 5, 2018 00:20, Tomas Hajny wrote:
> On Wed, July 4, 2018 22:42, Christo wrote:
>> On Wed, 2018-07-04 at 11:57 +0200, Tomas Hajny wrote:

Oops, sorry, sent the previous e-mail too early by mistake. :-(

 .
 .
> Invoking of data2inc from fpmake may not be as mature though (as suggested
> by your experience with running make in the fpcm directory). I don't have
> time for debugging

...the fpmake issue at the moment, but it's a FPC program and it should be
possible to debug it the usual way to find out why it doesn't generate the
.inc file as expected.

Hope this helps

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Tomas Hajny
On Wed, July 4, 2018 22:42, Christo wrote:
> On Wed, 2018-07-04 at 11:57 +0200, Tomas Hajny wrote:
>> The .ini file should be translated to .inc using the data2inc utility
>> (included with FPC as well) and then incorporated into the binary. This
>> should happen automatically, but let's make sure it was the case for you
>> as well.
>
> The .inc file is not regenerated when running make in the fpcm directory.
> At first the data2inc utility couldn't be found, fixed that by specifying
> DATA2INC=path/to/data2inc. This still didn't regenerate the .inc file.

Did you try removing the fpcmake.inc before running make?


>  Tried 
> to generate only the .inc file by calling data2inc manually passing
> unmodified
> fpcmake.ini as input - this resulted in a parsing error:
>
> ~/fpc/3.1.1/utils/fpcm $ ../bin/x86_64-linux/data2inc fpcmake.ini
> fpcmake.inc
> processing file : fpcmake.ini
> Some error with a \xxx constant or a stale (unescaped) backslash
> Error in line : 35 Somewhere near :'OVERR'

If you look into fpmake.pp in the same directory, you'll find out that the
proper command line for calling data2inc should be:

data2inc -b -s fpcmake.ini fpcmake.inc fpcmakeini

(add paths as necessary, e.g. the path to data2inc if not on PATH)


> Data2inc also gives an error when reading data2inc.exm, which seems
> strange.

I guess that this is again due to wrong parameters, but that's really just
a guess. Anyway, running 'data2inc data2inc.exm demo.inc' as suggested
within data2inc.exm works for me (using data2inc from the 3.0.4
installation, but that shouldn't make a difference).


> Same error when testing data2inc of 3.0.4 (compiled from source). I've
> already 
> deleted, restored and rebuild the utils directory of trunk but get the
> same error.
>
> This is really strange because data2inc seems like a very mature tool.

Indeed - I'm pretty sure that it should work when using the right parameters.

Invoking of data2inc from fpmake may not be as mature though (as suggested
by your experience with running make in the fpcm directory). I don't have
time for debugging

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Christo
On Wed, 2018-07-04 at 11:57 +0200, Tomas Hajny wrote:
> The .ini file should be translated to .inc using the data2inc utility
> (included with FPC as well) and then incorporated into the binary. This
> should happen automatically, but let's make sure it was the case for you
> as well.

The .inc file is not regenerated when running make in the fpcm directory.
At first the data2inc utility couldn't be found, fixed that by specifying
DATA2INC=path/to/data2inc. This still didn't regenerate the .inc file.  Tried 
to generate only the .inc file by calling data2inc manually passing unmodified
fpcmake.ini as input - this resulted in a parsing error:

~/fpc/3.1.1/utils/fpcm $ ../bin/x86_64-linux/data2inc fpcmake.ini fpcmake.inc
processing file : fpcmake.ini
Some error with a \xxx constant or a stale (unescaped) backslash
Error in line : 35 Somewhere near :'OVERR'

Data2inc also gives an error when reading data2inc.exm, which seems strange.
Same error when testing data2inc of 3.0.4 (compiled from source). I've already 
deleted, restored and rebuild the utils directory of trunk but get the same 
error.

This is really strange because data2inc seems like a very mature tool.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Tomas Hajny
On Wed, July 4, 2018 10:50, Christo Crause wrote:
> On Wed, Jul 4, 2018 at 9:21 AM, Tomas Hajny  wrote:
>> On Wed, July 4, 2018 07:53, Christo wrote:
>> > Any hints on how to compile and use fpcmake so that changes in the ini
>> > file ends up in the generated MakeFile?
>>
>> I assume that you updated fpcmake.ini in /fpcsrc/utils/fpcm/ (or without
>> /fpcsrc if using a checkout of the fpc repository rather than fpcbuild)
>> and rebuilt either all utils, or just fpcmake, right? Could you please
>> check whether fpcmake.inc (in the same directory) got updated during the
>> rebuild (this should reflect your changes to fpcmake.ini)? If I
>> understand
>> it correctly, you copied the resulting updated fpcmake binary into the
>> respective RTL directory and tried to regenerate the Makefile there,
>> correct?
>
> My update procedure is basically what you describe: I manually added the
> changes from r30766 fpcmake.ini to trunk, then call make inside the fpcm
> directory, then execute the newly compiled fpcmake with the Makefile.fpc
> file in the fpcm directory as test.
>
> Tonight I will check if fpcmake.inc got updated.  Thanks for this hint, I
> don't yet know how the different fpcmake pieces fit together.

The .ini file should be translated to .inc using the data2inc utility
(included with FPC as well) and then incorporated into the binary. This
should happen automatically, but let's make sure it was the case for you
as well.

Apart from that, I would make sure that the right (newly compiled) fpcmake
binary was really called rather than some previously existing one - I
believe that building puts the new one in a subdirectory called 'bin'
rather than the main fpcm directory, that's why I asked whether you copied
it there if called using the ./fpcmake path.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Christo Crause
On Wed, Jul 4, 2018 at 9:21 AM, Tomas Hajny  wrote:

> On Wed, July 4, 2018 07:53, Christo wrote:
> > Any hints on how to compile and use fpcmake so that changes in the ini
> > file ends up in the generated MakeFile?
>
> I assume that you updated fpcmake.ini in /fpcsrc/utils/fpcm/ (or without
> /fpcsrc if using a checkout of the fpc repository rather than fpcbuild)
> and rebuilt either all utils, or just fpcmake, right? Could you please
> check whether fpcmake.inc (in the same directory) got updated during the
> rebuild (this should reflect your changes to fpcmake.ini)? If I understand
> it correctly, you copied the resulting updated fpcmake binary into the
> respective RTL directory and tried to regenerate the Makefile there,
> correct?


My update procedure is basically what you describe: I manually added the
changes from r30766 fpcmake.ini to trunk, then call make inside the fpcm
directory, then execute the newly compiled fpcmake with the Makefile.fpc
file in the fpcm directory as test.

Tonight I will check if fpcmake.inc got updated.  Thanks for this hint, I
don't
yet know how the different fpcmake pieces fit together.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is this the correct way to configure fpc for multiple arm-embedded subarchs?

2018-07-04 Thread Tomas Hajny
On Wed, July 4, 2018 07:53, Christo wrote:
 .
 .
> I'm trying to move Florian's changes in the target-subdir branch to trunk.
> I've updated fpcmake.ini, but when I compile fpcmake and execute
> ./fpcmake -Tall -w Makefile.fpc the regenerated MakeFile doesn't have
any of
> the modifications in fpcmake.ini.
>
> Any hints on how to compile and use fpcmake so that changes in the ini
> file ends up in the generated MakeFile? 

I assume that you updated fpcmake.ini in /fpcsrc/utils/fpcm/ (or without
/fpcsrc if using a checkout of the fpc repository rather than fpcbuild)
and rebuilt either all utils, or just fpcmake, right? Could you please
check whether fpcmake.inc (in the same directory) got updated during the
rebuild (this should reflect your changes to fpcmake.ini)? If I understand
it correctly, you copied the resulting updated fpcmake binary into the
respective RTL directory and tried to regenerate the Makefile there,
correct?

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal