[fpc-pascal] How do fpmake dependencies work??

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Sun Apr 6 11:51:13 CEST 2014


 

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) 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140406/1820600a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpmake_test.zip
Type: application/zip
Size: 1447 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140406/1820600a/attachment.zip>


More information about the fpc-pascal mailing list