[fpc-pascal] How do fpmake dependencies work??
dhkblaszyk at zeelandnet.nl
Sun Apr 6 21:12:03 CEST 2014
Yes I did. And just to be sure I din't miss anything I read it again
just now. I solved the path to FPC by letting fppg regenerate the config
file. BTW this is at least not very userfriendly. At least fppkg should
give a proper warning and not just crash. So now the package manager
works, there is nothing mentioned on how to create a package in the
wiki. So I tried a few things.
First I tried adding a "local" mirror. However my_repo does not show up
when I do a fppkg list (also update does not help here). Would be nice
to understand how this works.
Then I did a fppkg build. This simply only does a fpc fpmake and fpmake
consecutively as I can see. So also here nothing that helps me further,
as fpmake does not handle package dependencies this is where it ends.
Next I did a fppkg archive. This did not work as I don't have fpmake.pp
(hardcoded filename) files in the packages directories but fpmake.inc
files. So I renamed them just to realize that the zip packages are
useless as the fpmake files are not valid program files. This implies
that for a project all fpmake.pp files should contain the same IFDEF
setup as in the FPC source tree. It works obviously (FPC proves it) but
the sources are far from readable. One just has to make a stinky mess
with defines to get something that is usable for the package manager.
Then I thought I would just test an existing package. So I did a "fppkg
install zlib". Fppkg returned a message "Package "zlib" not found.".
Perhaps it would be better that it would return a message the package is
already installed? The current message is just confusing and not
reflecting what is going on according to fppkg list. Next I installed
the webdesign package. Everything worked fine as one might expect.
However the packages are all installed in the central local repository.
Is there a way for a project to allways install in the source folder
itself? How will fppkg work if I then want to build a tagged or branched
version for my project for testing? Will it overwrite the installed
packages, will I have to force rebuild of the packages? I can imagine
all sorts of mayhem with different versions of packages with this kind
of central repository approach. What if another project has the same
package name as my project has? What is the policy of fppkg on this?
Fppkg seems to be fine for small stand alone packages as with FPC but I
doubt that it is the solution for projects where you have lot's of
interproject dependencies. The reason behind being forced to install the
project packages into a central repository are not clear and there are
reasons not to do it as described above. For standalone projects it
should however be enough to setup a buildfile that groups units into
packages and and define the package and application dependencies. It's
how cmake works except that the pascal build process is much cleaner in
Michael Van Canneyt schreef op 6 apr '14:
> On Sun, 6 Apr 2014, Darius Blaszyk wrote:
>> The path for the FPC executable seems to be wrong. I'm on a 64bit machine. I will have a look to see where fppkg is getting the path from.
> Did you read:
> http://wiki.freepascal.org/fppkg 
> ? It is a good introduction.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal 
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal