移植的自定义构建规则未考虑依赖关系 [英] Ported custom build rule doesn't take into account dependencies

查看:62
本文介绍了移植的自定义构建规则未考虑依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将项目从VC 2005移植到VC 2010后,我们在转换后的自定义构建规则中遇到了依赖问题.有摘录:

After porting project from VC 2005 to VC 2010 we faced with dependency problem in converted custom build rule. There is an excerpt:

< CustomBuildRule
             Name ="OmgIdl"
             DisplayName ="OMG IDL编译器(tao_idl和IDLtoCLS)"
             CommandLine ="tao_idl -I $(ACE_ROOT)/TAO -I $(ACE_ROOT)/TAO/orbsvcs/orbsvcs -I $(CIS_HOME)/InfraServer_IDL -I $(PRIM_HOME)[IncludeTaoIdl] [GenerateAMI] [GenerateAMH] [SuppressThruPoaCollocatedStubs] [ExportMacro] [ExportInclude] [StubExportMacro] [StubExportInclude] [SkelExportMacro] [SkelExportInclude] -o $(InputDir)$(InputPath)&#x0D;&#x0A; $(IIOPNET_HOME)\ IDLToCLSCompiler \ IDLCompiler \ bin \ IDLToCLSCompiler -idir $ {ACE_ROOT)\ TAO \ orbsvcs \ orbsvcs -idir $(ACE_ROOT)\ TAO [IncludeIdlToCls] [ReferenceIdlToCls] -o $(OutBinDir)$(InputName)_cs $(InputPath)&#x0D;&#x0A; $(IIOPNET_HOME)\ IDLToCLSCompiler \ IDLCompiler \ bin \ IDLToCLSCompiler -d IIOP_NET_IDL -idir $ {ACE_ROOT)\ TAO \ orbsvcs \ orbsvcs -idir $ {ACE_ROOT)\ TAO [IncludeIdlToCls] [ReferenceIdlToCls] -mapAnyToCont -o $(OutBinDir)$(InputName)_ac_cs $(InputPath)"
             Outputs ="$(InputDir)/$(InputName)Ch; $(InputDir)/$(InputName)C.cpp; $(InputDir)/$(InputName)C.inl; $(InputDir)/$( InputName)Sh; $(InputDir)/$(InputName)S.cpp; $(InputDir)/$(InputName)S.inl; $(OutBinDir)/$(InputName)_cs.dll; $(OutBinDir)/$( InputName)_ac_cs.dll"
             FileExtensions ="*.idl"
             ExecutionDescription =正在处理IDL文件$(InputName)..."
             ShowOnlyRuleProperties ="false"
            >

<CustomBuildRule
            Name="OmgIdl"
            DisplayName="OMG IDL compilers (tao_idl and IDLtoCLS)"
            CommandLine="tao_idl -I$(ACE_ROOT)/TAO -I$(ACE_ROOT)/TAO/orbsvcs/orbsvcs -I$(CIS_HOME)/InfraServer_IDL -I$(PRIM_HOME) [IncludeTaoIdl] [GenerateAMI] [GenerateAMH] [SuppressThruPoaCollocatedStubs] [ExportMacro] [ExportInclude] [StubExportMacro] [StubExportInclude] [SkelExportMacro] [SkelExportInclude] -o $(InputDir) $(InputPath)&#x0D;&#x0A;$(IIOPNET_HOME)\IDLToCLSCompiler\IDLCompiler\bin\IDLToCLSCompiler -d IIOP_NET_IDL -idir $(ACE_ROOT)\TAO\orbsvcs\orbsvcs -idir $(ACE_ROOT)\TAO [IncludeIdlToCls] [ReferenceIdlToCls] -o $(OutBinDir) $(InputName)_cs $(InputPath)&#x0D;&#x0A;$(IIOPNET_HOME)\IDLToCLSCompiler\IDLCompiler\bin\IDLToCLSCompiler -d IIOP_NET_IDL -idir $(ACE_ROOT)\TAO\orbsvcs\orbsvcs -idir $(ACE_ROOT)\TAO [IncludeIdlToCls] [ReferenceIdlToCls] -mapAnyToCont -o $(OutBinDir) $(InputName)_ac_cs $(InputPath)"
            Outputs="$(InputDir)/$(InputName)C.h;$(InputDir)/$(InputName)C.cpp;$(InputDir)/$(InputName)C.inl;$(InputDir)/$(InputName)S.h;$(InputDir)/$(InputName)S.cpp;$(InputDir)/$(InputName)S.inl;$(OutBinDir)/$(InputName)_cs.dll;$(OutBinDir)/$(InputName)_ac_cs.dll"
            FileExtensions="*.idl"
            ExecutionDescription="Processing IDL file $(InputName)..."
            ShowOnlyRuleProperties="false"
            >

....

您会注意到,命令行包含一些步骤.

As you can notice, command line contains a few steps.

1)第一步生成捆绑包* .h和.* cpp文件.它确实命令:tao_idl -I $(ACE_ROOT)/TAO -I $(ACE_ROOT)/TAO/orbsvcs/orbsvcs -I $(CIS_HOME)/InfraServer_IDL -I $(PRIM_HOME)[IncludeTaoIdl] [GenerateAMI] [GenerateAMH] [SuppressStubPoaCol ] [ExportMacro] [ExportInclude] [StubExportMacro] [StubExportInclude] [SkelExportMacro] [SkelExportInclude] -o $(InputDir)$(InputPath)

1) First step generates bundle *.h and .*cpp files. It does command: tao_idl -I$(ACE_ROOT)/TAO -I$(ACE_ROOT)/TAO/orbsvcs/orbsvcs -I$(CIS_HOME)/InfraServer_IDL -I$(PRIM_HOME) [IncludeTaoIdl] [GenerateAMI] [GenerateAMH] [SuppressThruPoaCollocatedStubs] [ExportMacro] [ExportInclude] [StubExportMacro] [StubExportInclude] [SkelExportMacro] [SkelExportInclude] -o $(InputDir) $(InputPath)

2)第二步(从第一步的输出文件生成)* _ cs.dll,其命令为:

2) Second step generates (from output files from first step) *_cs.dll with command:

$(IIOPNET_HOME)\ IDLToCLSCompiler \ IDLCompiler \ bin \ IDLToCLSCompiler -d IIOP_NET_IDL -idir $(ACE_ROOT)\ TAO \ orbsvcs \ orbsvcs -idir $(ACE_ROOT)\ TAO [IncludeIdlToCls] Cl $(InputName)_cs $(InputPath)

$(IIOPNET_HOME)\IDLToCLSCompiler\IDLCompiler\bin\IDLToCLSCompiler -d IIOP_NET_IDL -idir $(ACE_ROOT)\TAO\orbsvcs\orbsvcs -idir $(ACE_ROOT)\TAO [IncludeIdlToCls] [ReferenceIdlToCls] -o $(OutBinDir) $(InputName)_cs $(InputPath)

3)第三步(从第一步的输出文件生成)* _ac_cs.dll,其命令为:

3) Third step generates (from output files from first step) *_ac_cs.dll with command:

$(IIOPNET_HOME)\ IDLToCLSCompiler \ IDLCompiler \ bin \ IDLToCLSCompiler -d IIOP_NET_IDL -idir $(ACE_ROOT)\ TAO \ orbsvcs \ orbsvcs -idir $(ACE_ROOT)\ TAO [IncludeIdlToCls] OutBinDir)$ {InputName)_ac_cs $ {InputPath)

$(IIOPNET_HOME)\IDLToCLSCompiler\IDLCompiler\bin\IDLToCLSCompiler -d IIOP_NET_IDL -idir $(ACE_ROOT)\TAO\orbsvcs\orbsvcs -idir $(ACE_ROOT)\TAO [IncludeIdlToCls] [ReferenceIdlToCls] -mapAnyToCont -o $(OutBinDir) $(InputName)_ac_cs $(InputPath)

请注意选项[ReferenceIdlToCls].该选项可以链接到第二步生成的* _cs.dll.下面是问题描述:

Please pay attention to option [ReferenceIdlToCls]. It option can link to *_cs.dll generated on second step. Below is problem description:

有A.idl和B.idl.第二步A.idl处理在[ReferenceIdlToCls]中具有B_cs.dll.但是处理是按字母顺序进行的,并且在A处理上无法建立,因此B_cs.dll在那一刻不存在.

There is A.idl and B.idl. Second step A.idl processing have B_cs.dll in [ReferenceIdlToCls]. But processing does in alphabetic order and build failed on A processing, so B_cs.dll doesn't exist in that moment. Is there any solution for this dependency problem?

推荐答案

我认为您可以参考:

I think you can refer to:

http://victorsergienko.com/project-dependencies-of-visual-studio-2008-broken-in-msbuild/

http://victorsergienko.com/project-dependencies-of-visual-studio-2008-broken-in-msbuild/


这篇关于移植的自定义构建规则未考虑依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆