Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-04

fpmake dependencies

13 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gärtner

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

Reply by email

Michael Van Canneyt
to Mattias Gärtner
Mattias Gärtner wrote 5 lines
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.

Reply by email

Mattias Gärtner
to Michael Van Canneyt

Zitat von Michael Van Canneyt :

Show quoted text 12 lines
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

Reply by email

Mattias Gärtner
to Michael Van Canneyt: Under normal operation, this should not happen ? The unit source names were added from…

Zitat von Michael Van Canneyt :

Show quoted text 25 lines
[...] On Tue, 14 Apr 2009, Mattias Gärtner wrote: > Zitat von 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. > > 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

Show quoted text 8 lines
> > > 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.

Show quoted text 7 lines
> > > 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

Reply by email

Michael Van Canneyt
to Mattias Gärtner: Zitat von Michael Van Canneyt : Apparently for the 'clean' too. Why does it warn, when…
Mattias Gärtner wrote 21 lines
Zitat von 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. 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 ?

Show quoted text 5 lines
> > 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 :-)

Show quoted text 7 lines
> > 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.

Reply by email

Mattias Gärtner
to Michael Van Canneyt: It should maybe be reduced to a debug message, just to see what the clean command is…

Zitat von Michael Van Canneyt :

Show quoted text 5 lines
[...] > 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.

Show quoted text 14 lines
> > > > > 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. :)

Show quoted text 9 lines
> > 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

Reply by email

Michael Van Canneyt
to Mattias Gärtner: Zitat von Michael Van Canneyt : IMO this is a normal operation: svn up && fppkg clean…
Mattias Gärtner wrote 40 lines
Zitat von Michael Van Canneyt : >[...] > > On Tue, 14 Apr 2009, Mattias Gärtner wrote: > > > Zitat von 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. > > > > 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.

Show quoted text 10 lines
> > > > 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 :)

Show quoted text 9 lines
> > > > 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.

Reply by email

Michael Van Canneyt
to Mattias Gärtner: Zitat von Michael Van Canneyt : I created a bug report. It's hard to believe that this…
Mattias Gärtner wrote 9 lines
Zitat von Michael Van Canneyt : >[...] > > 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 :-)

Show quoted text 33 lines
> > > > > > 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.

Show quoted text 8 lines
>[...] > > 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.

Reply by email

Mattias Gärtner
to Michael Van Canneyt

Zitat von Michael Van Canneyt :

Show quoted text 8 lines
[...] > 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.

Show quoted text 8 lines
> >[...] > > > 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.

Show quoted text 8 lines
> 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

Reply by email

Peter Vreman
Show quoted text 10 lines
> > > 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

Reply by email

Michael Van Canneyt
to Mattias Gärtner: Zitat von Michael Van Canneyt : for Sounds good. SearchFile in fpmkunit is only defined…
Mattias Gärtner wrote 27 lines
Zitat von Michael Van Canneyt : >[...] > > 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.

Show quoted text 8 lines
> > 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.

Reply by email

Michael Van Canneyt
to Peter Vreman: Most packages ppudump output with a sed script was used to create the initial list. The…
Peter Vreman wrote 13 lines
>> > > 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.

Reply by email

Marco van de Voort
to Peter Vreman: Most packages ppudump output with a sed script was used to create the initial list. The…

In our previous episode, Peter Vreman said:

Show quoted text 8 lines
> > 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 )

Reply by email