fpmake dependencies

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

fpmake dependencies

Mattias Gaertner

I saw that the fpmake programs of the fpc sources contain the unit/include file
dependencies.
Why?
(fpc finds the unit/include file dependencies automatically.)

Is there a tool to create them automatically?
Can I use file masks?

Mattias


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Michael Van Canneyt


On Tue, 14 Apr 2009, Mattias Gärtner wrote:

>
> I saw that the fpmake programs of the fpc sources contain the unit/include file
> dependencies.
> Why?
> (fpc finds the unit/include file dependencies automatically.)

For the zip archive creation. All files are needed.
 
> Is there a tool to create them automatically?

Not yet. This is planned.

> Can I use file masks?

I think yes ?

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Mattias Gaertner
Zitat von Michael Van Canneyt <[hidden email]>:

>
>
> On Tue, 14 Apr 2009, Mattias Gärtner wrote:
>
> >
> > I saw that the fpmake programs of the fpc sources contain the unit/include
> file
> > dependencies.
> > Why?
> > (fpc finds the unit/include file dependencies automatically.)
>
> For the zip archive creation. All files are needed.

Apparently for the 'clean' too.

Why does it warn, when the files to be cleaned are already cleaned?

Warning: File "units/i386-darwin/allcodetoolunits.o" does not exist
Warning: File "units/i386-darwin/allcodetoolunits.ppu" does not exist


> > Is there a tool to create them automatically?
>
> Not yet. This is planned.

Come on. You didn't add the 14 thousand filenames manually, did you?


> > Can I use file masks?
>
> I think yes ?

I only found a mask for Sources. Somewhere else where I can look?


Mattias


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Michael Van Canneyt


On Tue, 14 Apr 2009, Mattias Gärtner wrote:

> Zitat von Michael Van Canneyt <[hidden email]>:
>
> >
> >
> > On Tue, 14 Apr 2009, Mattias Gärtner wrote:
> >
> > >
> > > I saw that the fpmake programs of the fpc sources contain the unit/include
> > file
> > > dependencies.
> > > Why?
> > > (fpc finds the unit/include file dependencies automatically.)
> >
> > For the zip archive creation. All files are needed.
>
> Apparently for the 'clean' too.
>
> Why does it warn, when the files to be cleaned are already cleaned?
>
> Warning: File "units/i386-darwin/allcodetoolunits.o" does not exist
> Warning: File "units/i386-darwin/allcodetoolunits.ppu" does not exist
Under normal operation, this should not happen ?

> > > Is there a tool to create them automatically?
> >
> > Not yet. This is planned.
>
> Come on. You didn't add the 14 thousand filenames manually, did you?

The unit source names were added from the Makefile.fpc (there is a conversion mode)
but the rest was added manually.

I realize that for the LCL, this will be a rather largish job :-)

>
>
> > > Can I use file masks?
> >
> > I think yes ?
>
> I only found a mask for Sources. Somewhere else where I can look?

packages/fpmkunit/src/fpmkunit.pp :-)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Mattias Gaertner
Zitat von Michael Van Canneyt <[hidden email]>:

>[...]
>
> On Tue, 14 Apr 2009, Mattias Gärtner wrote:
>
> > Zitat von Michael Van Canneyt <[hidden email]>:
> > >
> > > On Tue, 14 Apr 2009, Mattias Gärtner wrote:
> > > >
> > > > I saw that the fpmake programs of the fpc sources contain the
> unit/include
> > > file
> > > > dependencies.
> > > > Why?
> > > > (fpc finds the unit/include file dependencies automatically.)
> > >
> > > For the zip archive creation. All files are needed.
> >
> > Apparently for the 'clean' too.
> >
> > Why does it warn, when the files to be cleaned are already cleaned?
> >
> > Warning: File "units/i386-darwin/allcodetoolunits.o" does not exist
> > Warning: File "units/i386-darwin/allcodetoolunits.ppu" does not exist
>
> Under normal operation, this should not happen ?

IMO this is a normal operation:
svn up && fppkg clean build

Questions:
Why a warning instead of a hint?
Why not explain why it was searched?

Newbies will get confused by such warnings.

If you think that the message is needed, then maybe use this:

Hint: File "units/i386-darwin/allcodetoolunits.o" was already deleted


> > > > Is there a tool to create them automatically?
> > >
> > > Not yet. This is planned.
> >
> > Come on. You didn't add the 14 thousand filenames manually, did you?
>
> The unit source names were added from the Makefile.fpc (there is a conversion
> mode) but the rest was added manually.

You call yourself a programmer? Shame on you. ;)


> I realize that for the LCL, this will be a rather largish job :-)

I will rather write a tool than add them manually.


> > > > Can I use file masks?
> > >
> > > I think yes ?
> >
> > I only found a mask for Sources. Somewhere else where I can look?
>
> packages/fpmkunit/src/fpmkunit.pp :-)

That's where I looked. Should I copy the SearchFile procedure?


Mattias


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Michael Van Canneyt


On Tue, 14 Apr 2009, Mattias Gärtner wrote:

> Zitat von Michael Van Canneyt <[hidden email]>:
>
> >[...]
> >
> > On Tue, 14 Apr 2009, Mattias Gärtner wrote:
> >
> > > Zitat von Michael Van Canneyt <[hidden email]>:
> > > >
> > > > On Tue, 14 Apr 2009, Mattias Gärtner wrote:
> > > > >
> > > > > I saw that the fpmake programs of the fpc sources contain the
> > unit/include
> > > > file
> > > > > dependencies.
> > > > > Why?
> > > > > (fpc finds the unit/include file dependencies automatically.)
> > > >
> > > > For the zip archive creation. All files are needed.
> > >
> > > Apparently for the 'clean' too.
> > >
> > > Why does it warn, when the files to be cleaned are already cleaned?
> > >
> > > Warning: File "units/i386-darwin/allcodetoolunits.o" does not exist
> > > Warning: File "units/i386-darwin/allcodetoolunits.ppu" does not exist
> >
> > Under normal operation, this should not happen ?
>
> IMO this is a normal operation:
> svn up && fppkg clean build
>
> Questions:
> Why a warning instead of a hint?
> Why not explain why it was searched?
>
> Newbies will get confused by such warnings.
>
> If you think that the message is needed, then maybe use this:
>
> Hint: File "units/i386-darwin/allcodetoolunits.o" was already deleted
It should maybe be reduced to a debug message, just to see what the
clean command is actually trying to do.

> > > > > Is there a tool to create them automatically?
> > > >
> > > > Not yet. This is planned.
> > >
> > > Come on. You didn't add the 14 thousand filenames manually, did you?
> >
> > The unit source names were added from the Makefile.fpc (there is a conversion
> > mode) but the rest was added manually.
>
> You call yourself a programmer? Shame on you. ;)
Ah, but for the RTL, adding them manually was less job than
writing a tool. Basically, I'm lazy :)

> > I realize that for the LCL, this will be a rather largish job :-)
>
> I will rather write a tool than add them manually.

I was hoping someone would volunteer :-)

For the LCL, writing the tool is probably less work (given the codetools)
than adding them manually, so basically, you're just lazy too. This way
I don't need to feel too ashamed about myself :)


> > > > > Can I use file masks?
> > > >
> > > > I think yes ?
> > >
> > > I only found a mask for Sources. Somewhere else where I can look?
> >
> > packages/fpmkunit/src/fpmkunit.pp :-)
>
> That's where I looked. Should I copy the SearchFile procedure?

Can't you use it instead of copy it ?


Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Mattias Gaertner
Zitat von Michael Van Canneyt <[hidden email]>:

>[...]
> > Hint: File "units/i386-darwin/allcodetoolunits.o" was already deleted
>
> It should maybe be reduced to a debug message, just to see what the
> clean command is actually trying to do.

I created a bug report.


> > > > > > Is there a tool to create them automatically?
> > > > >
> > > > > Not yet. This is planned.
> > > >
> > > > Come on. You didn't add the 14 thousand filenames manually, did you?
> > >
> > > The unit source names were added from the Makefile.fpc (there is a
> > > conversion
> > > mode) but the rest was added manually.
> >
> > You call yourself a programmer? Shame on you. ;)
>
> Ah, but for the RTL, adding them manually was less job than
> writing a tool. Basically, I'm lazy :)

It's hard to believe that this was easier, but I try. :)


> > > I realize that for the LCL, this will be a rather largish job :-)
> >
> > I will rather write a tool than add them manually.
>
> I was hoping someone would volunteer :-)
>
> For the LCL, writing the tool is probably less work (given the codetools)
> than adding them manually, so basically, you're just lazy too. This way
> I don't need to feel too ashamed about myself :)

Before I can write such a tool I have to understand fpmake, its features, its
goals and its bugs.

The single parameter Options is a show stopper for the LCL, because I use often
flags like -gh plus a few -d flags for the experimental features.


>[...]
> > That's where I looked. Should I copy the SearchFile procedure?
>
> Can't you use it instead of copy it ?

It has no interface.

And btw, I don't understand why it uses:
    if FindFirst(SearchDir+'*',faAnyFile and faDirectory,Info)=0 then

faAnyFile and faDirectory = faDirectory.

This works under Unix, because FindFirst ignores the attribute. But I wonder,
why it works under windows.


Mattias


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Michael Van Canneyt


On Tue, 14 Apr 2009, Mattias Gärtner wrote:

> Zitat von Michael Van Canneyt <[hidden email]>:
>
> >[...]
> > > Hint: File "units/i386-darwin/allcodetoolunits.o" was already deleted
> >
> > It should maybe be reduced to a debug message, just to see what the
> > clean command is actually trying to do.
>
> I created a bug report.

I saw it :-)

> > > > > > > Is there a tool to create them automatically?
> > > > > >
> > > > > > Not yet. This is planned.
> > > > >
> > > > > Come on. You didn't add the 14 thousand filenames manually, did you?
> > > >
> > > > The unit source names were added from the Makefile.fpc (there is a
> > > > conversion
> > > > mode) but the rest was added manually.
> > >
> > > You call yourself a programmer? Shame on you. ;)
> >
> > Ah, but for the RTL, adding them manually was less job than
> > writing a tool. Basically, I'm lazy :)
>
> It's hard to believe that this was easier, but I try. :)
>
>
> > > > I realize that for the LCL, this will be a rather largish job :-)
> > >
> > > I will rather write a tool than add them manually.
> >
> > I was hoping someone would volunteer :-)
> >
> > For the LCL, writing the tool is probably less work (given the codetools)
> > than adding them manually, so basically, you're just lazy too. This way
> > I don't need to feel too ashamed about myself :)
>
> Before I can write such a tool I have to understand fpmake, its features, its
> goals and its bugs.
>
> The single parameter Options is a show stopper for the LCL, because I use often
> flags like -gh plus a few -d flags for the experimental features.
I understand.
Maybe we should change it to tstrings, and say that there should be one option
per line ? That avoids the hassle of having to parse the Options string for quoted
params.

>
>
> >[...]
> > > That's where I looked. Should I copy the SearchFile procedure?
> >
> > Can't you use it instead of copy it ?
>
> It has no interface.

No comprendo ?
 
> And btw, I don't understand why it uses:
>     if FindFirst(SearchDir+'*',faAnyFile and faDirectory,Info)=0 then
>
> faAnyFile and faDirectory = faDirectory.

Indeed,
1) it should be or instead of and
2) anyfilemask should be used instead of '*' :-)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Mattias Gaertner
Zitat von Michael Van Canneyt <[hidden email]>:

>[...]
> > The single parameter Options is a show stopper for the LCL, because I use
> often
> > flags like -gh plus a few -d flags for the experimental features.
>
> I understand.
> Maybe we should change it to tstrings, and say that there should be one
> option per line ? That avoids the hassle of having to parse the Options string
for
> quoted params.

Sounds good.


> > >[...]
> > > > That's where I looked. Should I copy the SearchFile procedure?
> > >
> > > Can't you use it instead of copy it ?
> >
> > It has no interface.
>
> No comprendo ?

SearchFile in fpmkunit is only defined in the implementation.
I can of course use it via linker tricks, but I don't like that.


> > And btw, I don't understand why it uses:
> >     if FindFirst(SearchDir+'*',faAnyFile and faDirectory,Info)=0 then
> >
> > faAnyFile and faDirectory = faDirectory.
>
> Indeed,
> 1) it should be or instead of and
> 2) anyfilemask should be used instead of '*' :-)

Don't know.

Mattias


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Michael Van Canneyt


On Tue, 14 Apr 2009, Mattias Gärtner wrote:

> Zitat von Michael Van Canneyt <[hidden email]>:
>
> >[...]
> > > The single parameter Options is a show stopper for the LCL, because I use
> > often
> > > flags like -gh plus a few -d flags for the experimental features.
> >
> > I understand.
> > Maybe we should change it to tstrings, and say that there should be one
> > option per line ? That avoids the hassle of having to parse the Options string
> for
> > quoted params.
>
> Sounds good.
>
>
> > > >[...]
> > > > > That's where I looked. Should I copy the SearchFile procedure?
> > > >
> > > > Can't you use it instead of copy it ?
> > >
> > > It has no interface.
> >
> > No comprendo ?
>
> SearchFile in fpmkunit is only defined in the implementation.
> I can of course use it via linker tricks, but I don't like that.
Ah. We can add it to the interface if you think this is useful.

> > > And btw, I don't understand why it uses:
> > >     if FindFirst(SearchDir+'*',faAnyFile and faDirectory,Info)=0 then
> > >
> > > faAnyFile and faDirectory = faDirectory.
> >
> > Indeed,
> > 1) it should be or instead of and
> > 2) anyfilemask should be used instead of '*' :-)

I'll have a look as soon as I find the time :-)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Peter Vreman
In reply to this post by Mattias Gaertner
>> > > Is there a tool to create them automatically?
>> >
>> > Not yet. This is planned.
>>
>> Come on. You didn't add the 14 thousand filenames manually, did you?
>
> The unit source names were added from the Makefile.fpc (there is a conversion mode)
> but the rest was added manually.
>
> I realize that for the LCL, this will be a rather largish job :-)

Most packages ppudump output with a sed script was used to create the initial list. The cleanup
and adjustments for multiple platforms was done manually.

Peter



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Michael Van Canneyt


On Tue, 14 Apr 2009, Peter Vreman wrote:

> >> > > Is there a tool to create them automatically?
> >> >
> >> > Not yet. This is planned.
> >>
> >> Come on. You didn't add the 14 thousand filenames manually, did you?
> >
> > The unit source names were added from the Makefile.fpc (there is a conversion mode)
> > but the rest was added manually.
> >
> > I realize that for the LCL, this will be a rather largish job :-)
>
> Most packages ppudump output with a sed script was used to create the initial list. The cleanup
> and adjustments for multiple platforms was done manually.

Indeed, I forgot about this:
That was round 2, proving that Peter did a more thorough job than I did in round 1 :-)

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: fpmake dependencies

Marco van de Voort
In reply to this post by Peter Vreman
In our previous episode, Peter Vreman said:
> >
> > The unit source names were added from the Makefile.fpc (there is a conversion mode)
> > but the rest was added manually.
> >
> > I realize that for the LCL, this will be a rather largish job :-)
>
> Most packages ppudump output with a sed script was used to create the initial list. The cleanup
> and adjustments for multiple platforms was done manually.

( fpmkunit/examples/ppu2fpmake.sh )
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal