[fpc-pascal] How do fpmake dependencies work??
Darius Blaszyk
dhkblaszyk at zeelandnet.nl
Sun Apr 6 14:26:07 CEST 2014
I've implemented the basic workings of package dependency in fpmkunit.
Please find attached a patch against tagged FPC2.6.2.
Could someone (like Michael f.i.) please review the patch and let me
know (either on the list or by pm) what you think? The patch does not
include code that recusively searches the packages, although I'm not
sure this is what you would like as circular dependencies will get more
difficult to find. Either way the patch will be expanded to include this
kind of a check once the basic working version is approved. You can test
with the test app that I attached earlier.
BTW: Lots of OSS nowadays use online review tools in combination with
their bugtrackers. Would such a tool help the core developers in their
work to review and resolve patches? One interesting tool is
http://phabricator.org/ [2]
Regards, Darius
Darius Blaszyk schreef op 6 apr '14:
> Hi all,
> I'm trying to use fpmake for my own project which is built up of a couple of packages. The final application has a dependency on these packages.
>
> Which I have done like this:
>
> P := AddPackage('my_app');
>
> P.Directory := 'app';
>
> T := P.Targets.AddProgram('hello.pp');
>
> T.Dependencies.Add('my_pkg');
>
> However, adding the dendencies does not add the units output dir to the target. I think it would be a good idea to do this by default. Do you agree?
>
> Please find the output of my test case (which is also attached) below.
>
> Regards, Darius
>
> C:developrepositorytest>fpmake -v
>
> Start compiling package my_pkg for target x86_64-win64.
>
> Creating output dir "pkgunitsx86_64-win64"
>
> Compiling target testunit
>
> Executing command "fpc -Twin64 -Px86_64 -FUpkgunitsx86_64-win64 -FuC:lazarusfpc2.6.2unitsx86_64-win64rtl pkgtestunit.pas"
>
> Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64
>
> Copyright (c) 1993-2012 by Florian Klaempfl and others
>
> Target OS: Win64 for x64
>
> Compiling pkgtestunit.pas
>
> 14 lines compiled, 0.0 sec
>
> Generating "pkgunitsx86_64-win64fpunits.cfg"
>
> [ 67%] Compiled package my_pkg
>
> Warning: Circular dependency detected when compiling package my_app with package my_app
>
> Start compiling package my_app for target x86_64-win64.
>
> Creating output dir "appunitsx86_64-win64"
>
> Creating output dir "appbinx86_64-win64"
>
> Warning: Target hello of package my_app depends on another package (my_pkg). These kind of dependencies are not processed
>
> Compiling target hello
>
> Executing command "fpc -Twin64 -Px86_64 -FEappbinx86_64-win64 -FUappunitsx86_64-win64 -FuC:lazarusfpc2.6.2unitsx86_64-win64rtl -Fuapp apphello.pp"
>
> Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64
>
> Copyright (c) 1993-2012 by Florian Klaempfl and others
>
> Target OS: Win64 for x64
>
> Compiling apphello.pp
>
> hello.pp(6,3) Fatal: Can't find unit testunit used by hello
>
> Fatal: Compilation aborted
>
> Error: C:lazarusfpc2.6.2binx86_64-win64ppcx64.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
>
> The installer encountered the following error:
>
> External command "fpc -Twin64 -Px86_64 -FEappbinx86_64-win64 -FUappunitsx86_64-win64 -FuC:lazarusfpc2.6.2unitsx86_64-win64rtl -Fuapp apphello.pp" failed with exit code 1. Console output:
>
> Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64
>
> Copyright (c) 1993-2012 by Florian Klaempfl and others
>
> Target OS: Win64 for x64
>
> Compiling apphello.pp
>
> hello.pp(6,3) Fatal: Can't find unit testunit used by hello
>
> Fatal: Compilation aborted
>
> Error: C:lazarusfpc2.6.2binx86_64-win64ppcx64.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal [1]
Links:
------
[1] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[2] http://phabricator.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140406/9f32ad8b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpmkunit.diff
Type: text/x-diff
Size: 3914 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140406/9f32ad8b/attachment.diff>
More information about the fpc-pascal
mailing list