我有一个成功构建的GPR库项目(静态或动态类型在这里不相关)。
我知道。
gprinstall
提供管理图书馆交付的方法,即:
-
准备一个gpr文件以使用库
-
根据原始gpr(定义的目录)中给定的条件提供库文件(.a或.dll)
-
根据类似情况提供库接口文件
这背后的想法是,用户只有“与”新的gpr,以便看到接口文件(
.ads
例如在ADA)。
但是,我不能让gprinstall工作。以下命令
E:\DEV\Projets\Ada\LibA>gprinstall --dry-run -p -m -f -P LibA.gpr
仅给出:
Install project LibA
这个
-v
冗长的选项提供了一点线索。
(该项目显然是成功构建的,代码文件与理解并不真正相关)
这是我的GPR文件:
with "../Production_Options/Production_Options.gpr";
with "../InterfaceA/InterfaceA.gpr";
library project LibA is
for Source_Dirs use ("src") & InterfaceA.Interface_Files;
for Object_Dir use "obj";
for Library_Name use project'Name;
for Library_Dir use "Library";
for Library_Ali_Dir use "Library_Ali";
for Library_Src_Dir use "Public_Interfaces";
for Library_Interface use (InterfaceA.Interface_Name);
for Library_Kind use "static";
package Install extends Production_Options.Install is
for Prefix use Production_Options.Install'Prefix & Production_Options.Install.Install_Libs & project'Name;
for Mode use "dev";
for Side_Debug use "true";
end Install;
-- various renames of Productions_Options
end LibA;
project InterfaceA is
Interface_Files := (project'Project_Dir & "src");
Interface_Name := "InterfaceA";
for Source_Dirs use ();
end InterfaceA;
我的选项gpr:
project Production_Options is
for Source_Dirs use ();
-- various switches for compiler, builder, clean, binder, ide, linker, namling, pretty printer ...
package Install is
Install_Root := "../INSTALL_BUILDS/";
Install_Exe := "EXECUTABLES/";
Install_Libs := "LIBS/";
Install_Root_Exe := Install_Root & Install_Exe;
Install_Root_Libs := Install_Root & Install_Libs;
for Prefix use Install_Root;
for Lib_Subdir use "BIN";
for Ali_Subdir use "ALI";
for Sources_Subdir use "SRC";
for Project_Subdir use "GPR";
end Install;
end Production_Options;