From 0844997e66b0c8ab04acef01975db900b922b42a Mon Sep 17 00:00:00 2001 From: elliott_c Date: Mon, 17 Jun 2002 19:40:32 +0000 Subject: Committing initial mpc related changes --- TAO/TAO_IDL/tao_idl.mpc | 178 +++ .../Concurrency_Service/Concurrency_Service.mpc | 5 + TAO/orbsvcs/CosEvent_Service/CosEvent_Service.mpc | 5 + TAO/orbsvcs/Event_Service/Event_Service.mpc | 5 + TAO/orbsvcs/IFR_Service/IFR_Service.mpc | 48 + TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.mpc | 30 + .../LifeCycle_Service/LifeCycle_Service.mpc | 5 + TAO/orbsvcs/LoadBalancer/LoadBalancer.mpc | 5 + TAO/orbsvcs/Logging_Service/Logging_Service.mpc | 5 + TAO/orbsvcs/Naming_Service/Naming_Service.mpc | 23 + TAO/orbsvcs/Notify_Service/Notify_Service.mpc | 11 + .../Scheduling_Service/Scheduling_Service.mpc | 5 + TAO/orbsvcs/TAO_Service/TAO_Service.mpc | 3 + TAO/orbsvcs/Time_Service/Time_Service.mpc | 22 + TAO/orbsvcs/Trading_Service/Trading_Service.mpc | 6 + TAO/orbsvcs/orbsvcs/AV.mpc | 23 + TAO/orbsvcs/orbsvcs/CosConcurrency.mpc | 17 + TAO/orbsvcs/orbsvcs/CosEvent.mpc | 20 + TAO/orbsvcs/orbsvcs/CosLifeCycle.mpc | 19 + TAO/orbsvcs/orbsvcs/CosNaming.mpc | 17 + TAO/orbsvcs/orbsvcs/CosNotification.mpc | 32 + TAO/orbsvcs/orbsvcs/CosProperty.mpc | 17 + TAO/orbsvcs/orbsvcs/CosTime.mpc | 17 + TAO/orbsvcs/orbsvcs/CosTrading.mpc | 23 + TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc | 17 + TAO/orbsvcs/orbsvcs/ETCL.mpc | 12 + TAO/orbsvcs/orbsvcs/FTORB.mpc | 17 + TAO/orbsvcs/orbsvcs/FaultTolerance.mpc | 16 + TAO/orbsvcs/orbsvcs/IFRService.mpc | 13 + TAO/orbsvcs/orbsvcs/Loadbalancing.mpc | 17 + TAO/orbsvcs/orbsvcs/PortableGroup.mpc | 20 + TAO/orbsvcs/orbsvcs/RTCORBAEvent.mpc | 15 + TAO/orbsvcs/orbsvcs/RTEvent.mpc | 70 ++ TAO/orbsvcs/orbsvcs/RTOLDEvent.mpc | 22 + TAO/orbsvcs/orbsvcs/RTSched.mpc | 20 + TAO/orbsvcs/orbsvcs/RTSchedEvent.mpc | 18 + TAO/orbsvcs/orbsvcs/SSLIOP.mpc | 17 + TAO/orbsvcs/orbsvcs/Security.mpc | 26 + TAO/orbsvcs/orbsvcs/Security/MechanismPolicy.h | 2 +- TAO/orbsvcs/orbsvcs/Svc_Utils.mpc | 21 + TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.mpc | 10 + TAO/tao/BiDir_GIOP/BiDir_GIOP.mpc | 6 + TAO/tao/Domain/Domain.mpc | 7 + TAO/tao/DynamicAny/DynamicAny.mpc | 6 + TAO/tao/DynamicInterface/DynamicInterface.mpc | 6 + TAO/tao/IFR_Client/IFR_Client.mpc | 6 + TAO/tao/IORManipulation/IORManipulation.mpc | 6 + TAO/tao/IORTable/IORTable.mpc | 6 + TAO/tao/Messaging/Messaging.mpc | 7 + TAO/tao/PortableServer/Key_Adapters.h | 2 +- TAO/tao/PortableServer/PortableServer.mpc | 6 + TAO/tao/RTCORBA/RTCORBA.mpc | 6 + TAO/tao/RTPortableServer/RTPortableServer.mpc | 7 + TAO/tao/SmartProxies/SmartProxies.mpc | 6 + TAO/tao/Strategies/Strategies.mpc | 6 + TAO/tao/TypeCodeFactory/TypeCodeFactory.mpc | 7 + TAO/tao/tao.mpc | 225 ++++ TAO/tests/AMI/AMI.mpc | 33 + TAO/tests/MT_Client/MT_Client.mpc | 14 + ace/QoS/qos.mpc | 6 + ace/RMCast/rmcast.mpc | 6 + ace/SSL/ssl.mpc | 6 + ace/ace.mpc | 366 ++++++ ace/gethrtime.cpp | 2 + apps/gperf/src/gperf.mpc | 17 + bin/MakeProjectCreator/README | 113 ++ bin/MakeProjectCreator/config/aceexe.mpb | 6 + bin/MakeProjectCreator/config/acelib.mpb | 6 + bin/MakeProjectCreator/config/client.mpb | 3 + bin/MakeProjectCreator/config/global.mpb | 5 + bin/MakeProjectCreator/config/orbsvcsexe.mpb | 4 + bin/MakeProjectCreator/config/orbsvcslib.mpb | 5 + bin/MakeProjectCreator/config/server.mpb | 5 + bin/MakeProjectCreator/config/taoexe.mpb | 9 + bin/MakeProjectCreator/config/taolib.mpb | 7 + bin/MakeProjectCreator/config/taolib_with_idl.mpb | 4 + .../modules/BorlandProjectCreator.pm | 63 + bin/MakeProjectCreator/modules/Creator.pm | 306 +++++ bin/MakeProjectCreator/modules/Driver.pm | 218 ++++ .../modules/GHSProjectCreator.pm | 48 + .../modules/GNUProjectCreator.pm | 154 +++ .../modules/GNUWorkspaceCreator.pm | 77 ++ bin/MakeProjectCreator/modules/GUID.pm | 52 + .../modules/NMakeProjectCreator.pm | 92 ++ .../modules/NMakeWorkspaceCreator.pm | 85 ++ bin/MakeProjectCreator/modules/Parser.pm | 152 +++ bin/MakeProjectCreator/modules/ProjectCreator.pm | 1256 ++++++++++++++++++++ .../modules/TemplateInputReader.pm | 109 ++ bin/MakeProjectCreator/modules/TemplateParser.pm | 756 ++++++++++++ .../modules/VC6ProjectCreator.pm | 167 +++ .../modules/VC6WorkspaceCreator.pm | 111 ++ .../modules/VC7ProjectCreator.pm | 117 ++ .../modules/VC7WorkspaceCreator.pm | 132 ++ bin/MakeProjectCreator/modules/WorkspaceCreator.pm | 383 ++++++ bin/MakeProjectCreator/templates/bor.mpd | 63 + bin/MakeProjectCreator/templates/bordll.mpt | 3 + bin/MakeProjectCreator/templates/borexe.mpt | 2 + bin/MakeProjectCreator/templates/ghs.mpd | 16 + bin/MakeProjectCreator/templates/gnu.mpd | 118 ++ bin/MakeProjectCreator/templates/nmake.mpd | 202 ++++ bin/MakeProjectCreator/templates/nmakedll.mpt | 60 + bin/MakeProjectCreator/templates/nmakeexe.mpt | 52 + bin/MakeProjectCreator/templates/vc6dsp.mpd | 218 ++++ bin/MakeProjectCreator/templates/vc6dspdll.mpt | 26 + bin/MakeProjectCreator/templates/vc6dspexe.mpt | 49 + bin/MakeProjectCreator/templates/vc6dsplib.mpt | 31 + bin/MakeProjectCreator/templates/vc7.mpd | 195 +++ bin/MakeProjectCreator/templates/vc7dll.mpt | 45 + bin/MakeProjectCreator/templates/vc7exe.mpt | 44 + bin/mpc.pl | 95 ++ bin/mwc.pl | 93 ++ 111 files changed, 7394 insertions(+), 2 deletions(-) create mode 100644 TAO/TAO_IDL/tao_idl.mpc create mode 100644 TAO/orbsvcs/Concurrency_Service/Concurrency_Service.mpc create mode 100644 TAO/orbsvcs/CosEvent_Service/CosEvent_Service.mpc create mode 100644 TAO/orbsvcs/Event_Service/Event_Service.mpc create mode 100644 TAO/orbsvcs/IFR_Service/IFR_Service.mpc create mode 100644 TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.mpc create mode 100644 TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.mpc create mode 100644 TAO/orbsvcs/LoadBalancer/LoadBalancer.mpc create mode 100644 TAO/orbsvcs/Logging_Service/Logging_Service.mpc create mode 100644 TAO/orbsvcs/Naming_Service/Naming_Service.mpc create mode 100644 TAO/orbsvcs/Notify_Service/Notify_Service.mpc create mode 100644 TAO/orbsvcs/Scheduling_Service/Scheduling_Service.mpc create mode 100644 TAO/orbsvcs/TAO_Service/TAO_Service.mpc create mode 100644 TAO/orbsvcs/Time_Service/Time_Service.mpc create mode 100644 TAO/orbsvcs/Trading_Service/Trading_Service.mpc create mode 100644 TAO/orbsvcs/orbsvcs/AV.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosConcurrency.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosEvent.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosLifeCycle.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosNaming.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosNotification.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosProperty.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosTime.mpc create mode 100644 TAO/orbsvcs/orbsvcs/CosTrading.mpc create mode 100644 TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc create mode 100644 TAO/orbsvcs/orbsvcs/ETCL.mpc create mode 100644 TAO/orbsvcs/orbsvcs/FTORB.mpc create mode 100644 TAO/orbsvcs/orbsvcs/FaultTolerance.mpc create mode 100644 TAO/orbsvcs/orbsvcs/IFRService.mpc create mode 100644 TAO/orbsvcs/orbsvcs/Loadbalancing.mpc create mode 100644 TAO/orbsvcs/orbsvcs/PortableGroup.mpc create mode 100644 TAO/orbsvcs/orbsvcs/RTCORBAEvent.mpc create mode 100644 TAO/orbsvcs/orbsvcs/RTEvent.mpc create mode 100644 TAO/orbsvcs/orbsvcs/RTOLDEvent.mpc create mode 100644 TAO/orbsvcs/orbsvcs/RTSched.mpc create mode 100644 TAO/orbsvcs/orbsvcs/RTSchedEvent.mpc create mode 100644 TAO/orbsvcs/orbsvcs/SSLIOP.mpc create mode 100644 TAO/orbsvcs/orbsvcs/Security.mpc create mode 100644 TAO/orbsvcs/orbsvcs/Svc_Utils.mpc create mode 100644 TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.mpc create mode 100644 TAO/tao/BiDir_GIOP/BiDir_GIOP.mpc create mode 100644 TAO/tao/Domain/Domain.mpc create mode 100644 TAO/tao/DynamicAny/DynamicAny.mpc create mode 100644 TAO/tao/DynamicInterface/DynamicInterface.mpc create mode 100644 TAO/tao/IFR_Client/IFR_Client.mpc create mode 100644 TAO/tao/IORManipulation/IORManipulation.mpc create mode 100644 TAO/tao/IORTable/IORTable.mpc create mode 100644 TAO/tao/Messaging/Messaging.mpc create mode 100644 TAO/tao/PortableServer/PortableServer.mpc create mode 100644 TAO/tao/RTCORBA/RTCORBA.mpc create mode 100644 TAO/tao/RTPortableServer/RTPortableServer.mpc create mode 100644 TAO/tao/SmartProxies/SmartProxies.mpc create mode 100644 TAO/tao/Strategies/Strategies.mpc create mode 100644 TAO/tao/TypeCodeFactory/TypeCodeFactory.mpc create mode 100644 TAO/tao/tao.mpc create mode 100644 TAO/tests/AMI/AMI.mpc create mode 100644 TAO/tests/MT_Client/MT_Client.mpc create mode 100644 ace/QoS/qos.mpc create mode 100644 ace/RMCast/rmcast.mpc create mode 100644 ace/SSL/ssl.mpc create mode 100644 ace/ace.mpc create mode 100644 apps/gperf/src/gperf.mpc create mode 100644 bin/MakeProjectCreator/README create mode 100644 bin/MakeProjectCreator/config/aceexe.mpb create mode 100644 bin/MakeProjectCreator/config/acelib.mpb create mode 100644 bin/MakeProjectCreator/config/client.mpb create mode 100644 bin/MakeProjectCreator/config/global.mpb create mode 100644 bin/MakeProjectCreator/config/orbsvcsexe.mpb create mode 100644 bin/MakeProjectCreator/config/orbsvcslib.mpb create mode 100644 bin/MakeProjectCreator/config/server.mpb create mode 100644 bin/MakeProjectCreator/config/taoexe.mpb create mode 100644 bin/MakeProjectCreator/config/taolib.mpb create mode 100644 bin/MakeProjectCreator/config/taolib_with_idl.mpb create mode 100644 bin/MakeProjectCreator/modules/BorlandProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/Creator.pm create mode 100644 bin/MakeProjectCreator/modules/Driver.pm create mode 100644 bin/MakeProjectCreator/modules/GHSProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/GNUProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm create mode 100644 bin/MakeProjectCreator/modules/GUID.pm create mode 100644 bin/MakeProjectCreator/modules/NMakeProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm create mode 100644 bin/MakeProjectCreator/modules/Parser.pm create mode 100644 bin/MakeProjectCreator/modules/ProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/TemplateInputReader.pm create mode 100644 bin/MakeProjectCreator/modules/TemplateParser.pm create mode 100644 bin/MakeProjectCreator/modules/VC6ProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm create mode 100644 bin/MakeProjectCreator/modules/VC7ProjectCreator.pm create mode 100644 bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm create mode 100644 bin/MakeProjectCreator/modules/WorkspaceCreator.pm create mode 100644 bin/MakeProjectCreator/templates/bor.mpd create mode 100644 bin/MakeProjectCreator/templates/bordll.mpt create mode 100644 bin/MakeProjectCreator/templates/borexe.mpt create mode 100644 bin/MakeProjectCreator/templates/ghs.mpd create mode 100644 bin/MakeProjectCreator/templates/gnu.mpd create mode 100644 bin/MakeProjectCreator/templates/nmake.mpd create mode 100644 bin/MakeProjectCreator/templates/nmakedll.mpt create mode 100644 bin/MakeProjectCreator/templates/nmakeexe.mpt create mode 100644 bin/MakeProjectCreator/templates/vc6dsp.mpd create mode 100644 bin/MakeProjectCreator/templates/vc6dspdll.mpt create mode 100644 bin/MakeProjectCreator/templates/vc6dspexe.mpt create mode 100644 bin/MakeProjectCreator/templates/vc6dsplib.mpt create mode 100644 bin/MakeProjectCreator/templates/vc7.mpd create mode 100644 bin/MakeProjectCreator/templates/vc7dll.mpt create mode 100644 bin/MakeProjectCreator/templates/vc7exe.mpt create mode 100755 bin/mpc.pl create mode 100755 bin/mwc.pl diff --git a/TAO/TAO_IDL/tao_idl.mpc b/TAO/TAO_IDL/tao_idl.mpc new file mode 100644 index 00000000000..3139c9cac7d --- /dev/null +++ b/TAO/TAO_IDL/tao_idl.mpc @@ -0,0 +1,178 @@ +project(TAO_IDL_EXE) : aceexe { + exename = tao_idl + libs = TAO_IDL_BE TAO_IDL_FE + includes += include be_include fe + install = ../../bin + libflags += TAO_AS_STATIC_LIBS + depends = TAO_IDL_BE TAO_IDL_FE + idlpreprocessor = 1 + + Source_Files { + tao_idl.cpp + driver/drv_init.cpp + driver/drv_private.cpp + driver/drv_args.cpp + driver/drv_preproc.cpp + } + + Header_Files { + include/drv_extern.h + include/drv_private.h + } +} + + +project(TAO_IDL_BE) : acelib { + sharedname = TAO_IDL_BE + libs = TAO_IDL_FE + includes += include be_include fe + dllflags = TAO_IDL_BE_BUILD_DLL + libflags += TAO_AS_STATIC_LIBS + depends = TAO_IDL_FE + + Source_Files { + be/be_array.cpp + be/be_argument.cpp + be/be_attribute.cpp + be/be_constant.cpp + be/be_enum.cpp + be/be_enum_val.cpp + be/be_exception.cpp + be/be_expression.cpp + be/be_factory.cpp + be/be_field.cpp + be/be_global.cpp + be/be_interface.cpp + be/be_interface_strategy.cpp + be/be_interface_fwd.cpp + be/be_valuetype.cpp + be/be_valuetype_fwd.cpp + be/be_module.cpp + be/be_native.cpp + be/be_operation.cpp + be/be_operation_strategy.cpp + be/be_predefined_type.cpp + be/be_root.cpp + be/be_sequence.cpp + be/be_string.cpp + be/be_structure.cpp + be/be_type.cpp + be/be_typedef.cpp + be/be_union.cpp + be/be_union_branch.cpp + be/be_union_label.cpp + be/be_generator.cpp + be/be_produce.cpp + be/be_helper.cpp + be/be_codegen.cpp + be/be_sunsoft.cpp + be/be_decl.cpp + be/be_scope.cpp + be/be_stream_factory.cpp + be/be_visitor_factory.cpp + be/be_visitor.cpp + be/be_visitor_ami_pre_proc.cpp + be/be_visitor_amh_pre_proc.cpp + be/be_visitor_argument.cpp + be/be_visitor_array.cpp + be/be_visitor_attribute.cpp + be/be_visitor_constant.cpp + be/be_visitor_context.cpp + be/be_visitor_decl.cpp + be/be_visitor_enum.cpp + be/be_visitor_exception.cpp + be/be_visitor_field.cpp + be/be_visitor_interface.cpp + be/be_visitor_interface_fwd.cpp + be/be_visitor_valuetype.cpp + be/be_visitor_valuetype_fwd.cpp + be/be_visitor_module.cpp + be/be_visitor_operation.cpp + be/be_visitor_root.cpp + be/be_visitor_scope.cpp + be/be_visitor_sequence.cpp + be/be_visitor_structure.cpp + be/be_visitor_typecode.cpp + be/be_visitor_typedef.cpp + be/be_visitor_union.cpp + be/be_visitor_union_branch.cpp + be/be_tmplinst.cpp + } + + Header_Files { + be_include + } +} + + +project(TAO_IDL_FE) : acelib { + sharedname = TAO_IDL_FE + includes += include fe + dllflags = TAO_IDL_FE_BUILD_DLL + libflags += TAO_AS_STATIC_LIBS + + Source_Files { + fe/fe_declarator.cpp + fe/fe_lookup.cpp + fe/fe_private.cpp + fe/fe_init.cpp + fe/fe_extern.cpp + fe/fe_global.cpp + fe/fe_interface_header.cpp + fe/fe_tmplinst.cpp + fe/y.tab.cpp + fe/lex.yy.cpp + ast/ast_array.cpp + ast/ast_argument.cpp + ast/ast_attribute.cpp + ast/ast_check.cpp + ast/ast_concrete_type.cpp + ast/ast_constant.cpp + ast/ast_decl.cpp + ast/ast_enum.cpp + ast/ast_enum_val.cpp + ast/ast_exception.cpp + ast/ast_expression.cpp + ast/ast_factory.cpp + ast/ast_field.cpp + ast/ast_interface.cpp + ast/ast_interface_fwd.cpp + ast/ast_module.cpp + ast/ast_native.cpp + ast/ast_operation.cpp + ast/ast_predefined_type.cpp + ast/ast_root.cpp + ast/ast_sequence.cpp + ast/ast_string.cpp + ast/ast_structure.cpp + ast/ast_type.cpp + ast/ast_typedef.cpp + ast/ast_union.cpp + ast/ast_union_branch.cpp + ast/ast_union_label.cpp + ast/ast_generator.cpp + ast/ast_redef.cpp + ast/ast_recursive.cpp + ast/ast_visitor.cpp + util/utl_scope.cpp + util/utl_stack.cpp + util/utl_string.cpp + util/utl_decllist.cpp + util/utl_labellist.cpp + util/utl_namelist.cpp + util/utl_exceptlist.cpp + util/utl_strlist.cpp + util/utl_list.cpp + util/utl_exprlist.cpp + util/utl_err.cpp + util/utl_indenter.cpp + util/utl_identifier.cpp + util/utl_idlist.cpp + util/utl_global.cpp + narrow/narrow.cpp + } + + Header_Files { + include + } +} diff --git a/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.mpc b/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.mpc new file mode 100644 index 00000000000..577ddad01a5 --- /dev/null +++ b/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += CosConcurrency CosNaming Svc_Utils IORTable PortableServer + exename = Concurrency_Service + libs = TAO_CosConcurrency TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.mpc b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.mpc new file mode 100644 index 00000000000..dd0cc10f66c --- /dev/null +++ b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += CosEvent CosNaming Svc_Utils IORTable Messaging PortableServer + exename = CosEvent_Service + libs = TAO_CosEvent TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_Messaging TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/Event_Service/Event_Service.mpc b/TAO/orbsvcs/Event_Service/Event_Service.mpc new file mode 100644 index 00000000000..48018d839ac --- /dev/null +++ b/TAO/orbsvcs/Event_Service/Event_Service.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += RTOLDEvent RTEvent RTSched CosNaming Svc_Utils IORTable Messaging PortableServer + exename = Event_Service + libs = TAO_RTOLDEvent TAO_RTEvent TAO_RTSched TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_Messaging TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/IFR_Service/IFR_Service.mpc b/TAO/orbsvcs/IFR_Service/IFR_Service.mpc new file mode 100644 index 00000000000..161a7f4c178 --- /dev/null +++ b/TAO/orbsvcs/IFR_Service/IFR_Service.mpc @@ -0,0 +1,48 @@ +project(IFR_Service) : orbsvcsexe { + depends += IFRService TypeCodeFactory Svc_Utils IFR_Client IORTable PortableServer + exename = IFR_Service + libs = TAO_IFRService TAO_TypeCodeFactory TAO_Svc_Utils TAO_IFR_Client TAO_IORTable TAO_PortableServer TAO + + Source_Files { + IFR_Server.cpp + IFR_Service.cpp + } +} + + +project(TAO_IFR_BE) : taolib { + depends += TAO_IDL_FE TAO_IFR_Client + sharedname = TAO_IFR_BE + libs = TAO_IDL_FE TAO_IFR_Client TAO + includes += $(TAO_ROOT)/TAO_IDL/include $(TAO_ROOT)/TAO_IDL/fe + + Source_Files { + be_global.cpp + be_produce.cpp + ifr_adding_visitor.cpp + ifr_adding_visitor_exception.cpp + ifr_adding_visitor_operation.cpp + ifr_adding_visitor_structure.cpp + ifr_adding_visitor_union.cpp + ifr_removing_visitor.cpp + ifr_visitor.cpp + } +} + + +project(TAO_IFR_EXE) : taoexe { + depends += TAO_IFR_BE IFR_Client TAO_IDL_FE + exename = tao_ifr + idlpreprocessor = 1 + libs = TAO_IFR_BE TAO_IFR_Client TAO TAO_IDL_FE + includes += $(TAO_ROOT)/TAO_IDL/include $(TAO_ROOT)/TAO_IDL/fe + + Source_Files { + tao_ifr.cpp + drv_init_ifr.cpp + drv_private_ifr.cpp + drv_args_ifr.cpp + drv_preproc_ifr.cpp + } +} + diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.mpc b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.mpc new file mode 100644 index 00000000000..29d9e0c6aba --- /dev/null +++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_Service.mpc @@ -0,0 +1,30 @@ +project : orbsvcsexe { + depends += Svc_Utils IORTable PortableServer + exename = ImplRepo_Service + libs = TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + Adapter_Activator.cpp + Forwarder.cpp + ImplRepo.cpp + ImplRepo_i.cpp + Iterator.cpp + Locator.cpp + Options.cpp + Repository.cpp + } +} + + +project(tao_imr) : orbsvcsexe { + depends += Svc_Utils IORTable PortableServer + exename = tao_imr + libs = TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + tao_imr.cpp + tao_imr_i.cpp + } +} + + diff --git a/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.mpc b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.mpc new file mode 100644 index 00000000000..bfac2851b09 --- /dev/null +++ b/TAO/orbsvcs/LifeCycle_Service/LifeCycle_Service.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += CosLifeCycle CosTrading CosNaming Svc_Utils IORTable DynamicAny PortableServer + exename = LifeCycle_Service + libs = TAO_CosLifeCycle TAO_CosTrading TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_DynamicAny TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/LoadBalancer/LoadBalancer.mpc b/TAO/orbsvcs/LoadBalancer/LoadBalancer.mpc new file mode 100644 index 00000000000..252a13e04ac --- /dev/null +++ b/TAO/orbsvcs/LoadBalancer/LoadBalancer.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += LoadBalancing PortableServer + exename = LoadBalancer_Service + libs = TAO_LoadBalancing TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/Logging_Service/Logging_Service.mpc b/TAO/orbsvcs/Logging_Service/Logging_Service.mpc new file mode 100644 index 00000000000..678b8abd9b1 --- /dev/null +++ b/TAO/orbsvcs/Logging_Service/Logging_Service.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += DsLogAdmin CosTrading CosNaming Svc_Utils IORTable DynamicAny PortableServer + exename = Logging_Service + libs = TAO_DsLogAdmin TAO_CosTrading TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_DynamicAny TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.mpc b/TAO/orbsvcs/Naming_Service/Naming_Service.mpc new file mode 100644 index 00000000000..5ae5ad39ac9 --- /dev/null +++ b/TAO/orbsvcs/Naming_Service/Naming_Service.mpc @@ -0,0 +1,23 @@ +project : orbsvcsexe { + depends += CosNaming Svc_Utils IORTable PortableServer + exename = Naming_Service + libs = TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + Naming_Server.cpp + Naming_Service.cpp + } +} + +project(NT_Naming_Service) : orbsvcsexe { + depends += CosNaming Svc_Utils IORTable PortableServer + exename = NT_Naming_Service + libs = TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + Naming_Service.cpp + NT_Naming_Server.cpp + NT_Naming_Service.cpp + } +} + diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.mpc b/TAO/orbsvcs/Notify_Service/Notify_Service.mpc new file mode 100644 index 00000000000..668cd6db8cc --- /dev/null +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.mpc @@ -0,0 +1,11 @@ +project : orbsvcsexe { + depends += CosNotification ETCL CosNaming Svc_Utils DynamicAny IORTable PortableServer + exename = Notify_Service + libs = TAO_CosNotification TAO_ETCL TAO_CosNaming TAO_Svc_Utils TAO_DynamicAny TAO_IORTable TAO_PortableServer TAO + + Source_Files { + Notify_Server.cpp + Notify_Service.cpp + } +} + diff --git a/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.mpc b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.mpc new file mode 100644 index 00000000000..a2d89ea8e46 --- /dev/null +++ b/TAO/orbsvcs/Scheduling_Service/Scheduling_Service.mpc @@ -0,0 +1,5 @@ +project : orbsvcsexe { + depends += RTSched CosNaming Svc_Utils IORTable PortableServer + exename = Scheduling_Service + libs = TAO_RTSched TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO +} diff --git a/TAO/orbsvcs/TAO_Service/TAO_Service.mpc b/TAO/orbsvcs/TAO_Service/TAO_Service.mpc new file mode 100644 index 00000000000..23313a526da --- /dev/null +++ b/TAO/orbsvcs/TAO_Service/TAO_Service.mpc @@ -0,0 +1,3 @@ +project : taoexe { + exename = TAO_Service +} \ No newline at end of file diff --git a/TAO/orbsvcs/Time_Service/Time_Service.mpc b/TAO/orbsvcs/Time_Service/Time_Service.mpc new file mode 100644 index 00000000000..d20c92b983e --- /dev/null +++ b/TAO/orbsvcs/Time_Service/Time_Service.mpc @@ -0,0 +1,22 @@ +project(Time_Service_Server) : orbsvcsexe { + depends += CosTime CosNaming Svc_Utils IORTable PortableServer + exename = Time_Service_Server + libs = TAO_CosTime TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + Server_i.cpp + Time_Service_Server.cpp + } +} + +project(Time_Service_Clerk) : orbsvcsexe { + depends += CosTime CosNaming Svc_Utils IORTable PortableServer + exename = Time_Service_Clerk + libs = TAO_CosTime TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + Clerk_i.cpp + Time_Service_Clerk.cpp + } +} + diff --git a/TAO/orbsvcs/Trading_Service/Trading_Service.mpc b/TAO/orbsvcs/Trading_Service/Trading_Service.mpc new file mode 100644 index 00000000000..3062c5c2e3e --- /dev/null +++ b/TAO/orbsvcs/Trading_Service/Trading_Service.mpc @@ -0,0 +1,6 @@ +project : orbsvcsexe { + depends += CosTrading CosNaming Svc_Utils IORTable DynamicAny PortableServer + exename = Trading_Service + libs = TAO_CosTrading TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_DynamicAny TAO_PortableServer TAO +} + diff --git a/TAO/orbsvcs/orbsvcs/AV.mpc b/TAO/orbsvcs/orbsvcs/AV.mpc new file mode 100644 index 00000000000..ee30b64a0c9 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/AV.mpc @@ -0,0 +1,23 @@ +project(AV) : orbsvcslib { + depends += CosProperty CosNaming Svc_Utils PortableServer + sharedname = TAO_AV + libs = TAO_CosProperty TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_AV_Export -Wb,export_include=AV/AV_export.h + dllflags = TAO_AV_BUILD_DLL + + IDL_Files { + AVStreams.idl + Null_MediaCtrl.idl + sfp.idl + } + + Source_Files { + AVStreamsC.cpp + AVStreamsS.cpp + Null_MediaCtrlC.cpp + Null_MediaCtrlS.cpp + sfpC.cpp + sfpS.cpp + AV + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosConcurrency.mpc b/TAO/orbsvcs/orbsvcs/CosConcurrency.mpc new file mode 100644 index 00000000000..f1fc757dd72 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosConcurrency.mpc @@ -0,0 +1,17 @@ +project(CosConcurrency) : orbsvcslib { + depends += PortableServer + sharedname = TAO_CosConcurrency + libs = TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Concurrency_Export -Wb,export_include=Concurrency/concurrency_export.h + dllflags = TAO_CONCURRENCY_BUILD_DLL + + IDL_Files { + CosConcurrencyControl.idl + } + + Source_Files { + CosConcurrencyControlC.cpp + CosConcurrencyControlS.cpp + Concurrency + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosEvent.mpc b/TAO/orbsvcs/orbsvcs/CosEvent.mpc new file mode 100644 index 00000000000..12e170e9a4c --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosEvent.mpc @@ -0,0 +1,20 @@ +project(CosEvent) : orbsvcslib { + depends += CosNaming Svc_Utils PortableServer + sharedname = TAO_CosEvent + libs = TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Event_Export -Wb,export_include=CosEvent/event_export.h + dllflags = TAO_EVENT_BUILD_DLL + + IDL_Files { + CosEventComm.idl + CosEventChannelAdmin.idl + } + + Source_Files { + CosEventCommC.cpp + CosEventCommS.cpp + CosEventChannelAdminC.cpp + CosEventChannelAdminS.cpp + CosEvent + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosLifeCycle.mpc b/TAO/orbsvcs/orbsvcs/CosLifeCycle.mpc new file mode 100644 index 00000000000..1e1bcd1365e --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosLifeCycle.mpc @@ -0,0 +1,19 @@ +project(CosLifeCycle) : orbsvcslib { + depends += CosNaming Svc_Utils PortableServer + sharedname = TAO_CosLifeCycle + libs = TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_LifeCycle_Export -Wb,export_include=LifeCycle/lifecycle_export.h + dllflags = TAO_LIFECYCLE_BUILD_DLL + + IDL_Files { + CosLifeCycle.idl + LifeCycleService.idl + } + + Source_Files { + CosLifeCycleC.cpp + CosLifeCycleS.cpp + LifeCycleServiceC.cpp + LifeCycleServiceS.cpp + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosNaming.mpc b/TAO/orbsvcs/orbsvcs/CosNaming.mpc new file mode 100644 index 00000000000..e770a771e49 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosNaming.mpc @@ -0,0 +1,17 @@ +project(CosNaming) : orbsvcslib { + depends += Svc_Utils IORTable PortableServer + sharedname = TAO_CosNaming + libs = TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Naming_Export -Wb,export_include=Naming/naming_export.h + dllflags = TAO_NAMING_BUILD_DLL + + IDL_Files { + CosNaming.idl + } + + Source_Files { + CosNamingC.cpp + CosNamingS.cpp + Naming + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosNotification.mpc b/TAO/orbsvcs/orbsvcs/CosNotification.mpc new file mode 100644 index 00000000000..8e584fb4085 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosNotification.mpc @@ -0,0 +1,32 @@ +project(CosNotification) : orbsvcslib { + depends += Svc_Utils ETCL DynamicAny PortableServer + sharedname = TAO_CosNotification + libs = TAO_Svc_Utils TAO_ETCL TAO_DynamicAny TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Notify_Export -Wb,export_include=Notify/notify_export.h + dllflags = TAO_NOTIFY_BUILD_DLL + + IDL_Files { + CosEventComm.idl + CosEventChannelAdmin.idl + CosNotification.idl + CosNotifyComm.idl + CosNotifyFilter.idl + CosNotifyChannelAdmin.idl + } + + Source_Files { + CosEventCommC.cpp + CosEventCommS.cpp + CosEventChannelAdminC.cpp + CosEventChannelAdminS.cpp + CosNotificationC.cpp + CosNotificationS.cpp + CosNotifyCommC.cpp + CosNotifyCommS.cpp + CosNotifyFilterC.cpp + CosNotifyFilterS.cpp + CosNotifyChannelAdminC.cpp + CosNotifyChannelAdminS.cpp + Notify + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosProperty.mpc b/TAO/orbsvcs/orbsvcs/CosProperty.mpc new file mode 100644 index 00000000000..29f32fe53a2 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosProperty.mpc @@ -0,0 +1,17 @@ +project(CosProperty) : orbsvcslib { + depends += PortableServer + sharedname = TAO_CosProperty + libs = TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Property_Export -Wb,export_include=Property/property_export.h + dllflags = TAO_PROPERTY_BUILD_DLL + + IDL_Files { + CosPropertyService.idl + } + + Source_Files { + CosPropertyServiceC.cpp + CosPropertyServiceS.cpp + Property + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosTime.mpc b/TAO/orbsvcs/orbsvcs/CosTime.mpc new file mode 100644 index 00000000000..028e7746b8b --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosTime.mpc @@ -0,0 +1,17 @@ +project(CosTime) : orbsvcslib { + depends += PortableServer + sharedname = TAO_CosTime + libs = TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Time_Export -Wb,export_include=Time/time_export.h + dllflags = TAO_TIME_BUILD_DLL + + IDL_Files { + TimeService.idl + } + + Source_Files { + TimeServiceC.cpp + TimeServiceS.cpp + Time + } +} diff --git a/TAO/orbsvcs/orbsvcs/CosTrading.mpc b/TAO/orbsvcs/orbsvcs/CosTrading.mpc new file mode 100644 index 00000000000..13e8bad83a2 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/CosTrading.mpc @@ -0,0 +1,23 @@ +project(CosTrading) : orbsvcslib { + depends += CosNaming Svc_Utils DynamicAny PortableServer + sharedname = TAO_CosTrading + libs = TAO_CosNaming TAO_Svc_Utils TAO_DynamicAny TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Trading_Export -Wb,export_include=Trader/trading_export.h + dllflags = TAO_TRADING_BUILD_DLL + + IDL_Files { + CosTrading.idl + CosTradingRepos.idl + CosTradingDynamic.idl + } + + Source_Files { + CosTradingC.cpp + CosTradingS.cpp + CosTradingReposC.cpp + CosTradingReposS.cpp + CosTradingDynamicC.cpp + CosTradingDynamicS.cpp + Trader + } +} diff --git a/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc b/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc new file mode 100644 index 00000000000..196c301d996 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/DsLogAdmin.mpc @@ -0,0 +1,17 @@ +project(DsLogAdmin) : orbsvcslib { + depends += CosTrading Svc_Utils PortableServer + sharedname = TAO_DsLogAdmin + libs = TAO_CosTrading TAO_Svc_Utils TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Log_Export -Wb,export_include=Log/log_export.h + dllflags = TAO_LOG_BUILD_DLL + + IDL_Files { + DsLogAdmin.idl + } + + Source_Files { + DsLogAdminC.cpp + DsLogAdminS.cpp + Log + } +} diff --git a/TAO/orbsvcs/orbsvcs/ETCL.mpc b/TAO/orbsvcs/orbsvcs/ETCL.mpc new file mode 100644 index 00000000000..5904eb601be --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/ETCL.mpc @@ -0,0 +1,12 @@ +project(ETCL) : orbsvcslib { + sharedname = TAO_ETCL + libs = TAO + dllflags = TAO_ETCL_BUILD_DLL + + IDL_Files { + } + + Source_Files { + ETCL + } +} diff --git a/TAO/orbsvcs/orbsvcs/FTORB.mpc b/TAO/orbsvcs/orbsvcs/FTORB.mpc new file mode 100644 index 00000000000..f4ab29fd196 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/FTORB.mpc @@ -0,0 +1,17 @@ +project(FTORB) : orbsvcslib { + depends += IORManipulation PortableServer + sharedname = TAO_FTORB + libs = TAO_IORManip TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_FT_Export -Wb,export_include=FaultTolerance/fault_tol_export.h -Wb,skel_export_include=tao/PortableServer/PolicyS.h + dllflags = TAO_FT_BUILD_DLL + + IDL_Files { + FT_CORBA_ORB.idl + } + + Source_Files { + FT_CORBA_ORBC.cpp + FT_CORBA_ORBS.cpp + FaultTolerance + } +} diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance.mpc b/TAO/orbsvcs/orbsvcs/FaultTolerance.mpc new file mode 100644 index 00000000000..9e5b43d2780 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance.mpc @@ -0,0 +1,16 @@ +project(FaultTolerance) : orbsvcslib { + depends += FTORB CosNaming CosNotification Svc_Utils IORManipulation PortableServer + sharedname = TAO_FaultTolerance + libs = TAO_FTORB TAO_CosNaming TAO_CosNotification TAO_Svc_Utils TAO_IORManip TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_FT_Export -Wb,export_include=FaultTolerance/fault_tol_export.h -Wb,skel_export_include=tao/PortableServer/PolicyS.h + dllflags = TAO_FT_BUILD_DLL + + IDL_Files { + FT_CORBA.idl + } + + Source_Files { + FT_CORBAC.cpp + FT_CORBAS.cpp + } +} diff --git a/TAO/orbsvcs/orbsvcs/IFRService.mpc b/TAO/orbsvcs/orbsvcs/IFRService.mpc new file mode 100644 index 00000000000..37e58454e6c --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/IFRService.mpc @@ -0,0 +1,13 @@ +project(IFRService) : orbsvcslib { + depends += TypeCodeFactory Svc_Utils IFR_Client IORTable PortableServer + sharedname = TAO_IFRService + libs = TAO_TypeCodeFactory TAO_Svc_Utils TAO_IFR_Client TAO_IORTable TAO_PortableServer TAO + dllflags = TAO_IFRSERVICE_BUILD_DLL + + IDL_Files { + } + + Source_Files { + IFRService + } +} diff --git a/TAO/orbsvcs/orbsvcs/Loadbalancing.mpc b/TAO/orbsvcs/orbsvcs/Loadbalancing.mpc new file mode 100644 index 00000000000..447acd63fe8 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Loadbalancing.mpc @@ -0,0 +1,17 @@ +project(LoadBalancing) : orbsvcslib { + depends += PortableServer + sharedname = TAO_LoadBalancing + libs = TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_LoadBalancing_Export -Wb,export_include=LoadBalancing/LoadBalancing_export.h + dllflags = TAO_LOADBALANCING_BUILD_DLL + + IDL_Files { + LoadBalancing.idl + } + + Source_Files { + LoadBalancingC.cpp + LoadBalancingS.cpp + LoadBalancing + } +} diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup.mpc b/TAO/orbsvcs/orbsvcs/PortableGroup.mpc new file mode 100644 index 00000000000..677827cdaec --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/PortableGroup.mpc @@ -0,0 +1,20 @@ +project(PortableGroup) : orbsvcslib { + depends += CosNaming Svc_Utils PortableServer + sharedname = TAO_PortableGroup + libs = TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_PortableGroup_Export -Wb,export_include=PortableGroup/portablegroup_export.h + dllflags = TAO_PORTABLEGROUP_BUILD_DLL + + IDL_Files { + miop.idl + PortableGroup.idl + } + + Source_Files { + miopC.cpp + miopS.cpp + PortableGroupC.cpp + PortableGroupS.cpp + PortableGroup + } +} diff --git a/TAO/orbsvcs/orbsvcs/RTCORBAEvent.mpc b/TAO/orbsvcs/orbsvcs/RTCORBAEvent.mpc new file mode 100644 index 00000000000..25e0b1cd0a2 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/RTCORBAEvent.mpc @@ -0,0 +1,15 @@ +project(RTCORBAEvent) : orbsvcslib { + depends += RTEvent CosNaming Svc_Utils IORTable RTPortableServer PortableServer RTCORBA + sharedname = TAO_RTCORBAEvent + libs = TAO_RTEvent TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_RTPortableServer TAO_PortableServer TAO_RTCORBA TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Naming_Export -Wb,export_include=naming_export.h + dllflags = TAO_RTCORBAEVENT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event/EC_RTCORBA_Dispatching.cpp + Event/EC_RTCORBA_Factory.cpp + } +} diff --git a/TAO/orbsvcs/orbsvcs/RTEvent.mpc b/TAO/orbsvcs/orbsvcs/RTEvent.mpc new file mode 100644 index 00000000000..6aba990a3ac --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/RTEvent.mpc @@ -0,0 +1,70 @@ +project(RTEvent) : orbsvcslib { + depends += Svc_Utils Messaging PortableServer + sharedname = TAO_RTEvent + libs = TAO_Svc_Utils TAO_Messaging TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_RTEvent_Export -Wb,export_include=Event/event_export.h + dllflags = TAO_RTEVENT_BUILD_DLL + + IDL_Files { + RtecDefaultEventData.idl + RtecEventComm.idl + RtecEventChannelAdmin.idl + RtecUDPAdmin.idl + } + + Source_Files { + RtecDefaultEventDataC.cpp + RtecDefaultEventDataS.cpp + RtecEventCommC.cpp + RtecEventCommS.cpp + RtecEventChannelAdminC.cpp + RtecEventChannelAdminS.cpp + RtecUDPAdminC.cpp + RtecUDPAdminS.cpp + Event/EC_Event_Channel.cpp + Event/EC_ConsumerAdmin.cpp + Event/EC_SupplierAdmin.cpp + Event/EC_ProxyConsumer.cpp + Event/EC_ProxySupplier.cpp + Event/EC_Supplier_Filter.cpp + Event/EC_Supplier_Filter_Builder.cpp + Event/EC_Trivial_Supplier_Filter.cpp + Event/EC_Filter.cpp + Event/EC_Filter_Builder.cpp + Event/EC_Dispatching.cpp + Event/EC_Factory.cpp + Event/EC_QOS_Info.cpp + Event/EC_Null_Factory.cpp + Event/EC_Disjunction_Filter.cpp + Event/EC_Conjunction_Filter.cpp + Event/EC_Negation_Filter.cpp + Event/EC_Type_Filter.cpp + Event/EC_Basic_Filter_Builder.cpp + Event/EC_Basic_Factory.cpp + Event/EC_Default_Factory.cpp + Event/EC_ObserverStrategy.cpp + Event/EC_Per_Supplier_Filter.cpp + Event/EC_Timeout_Filter.cpp + Event/EC_Timeout_Generator.cpp + Event/EC_Reactive_Timeout_Generator.cpp + Event/EC_MT_Dispatching.cpp + Event/EC_Dispatching_Task.cpp + Event/EC_Scheduling_Strategy.cpp + Event/EC_Null_Scheduling.cpp + Event/EC_Group_Scheduling.cpp + Event/EC_ConsumerControl.cpp + Event/EC_SupplierControl.cpp + Event/EC_Reactive_ConsumerControl.cpp + Event/EC_Reactive_SupplierControl.cpp + Event/EC_Bitmask_Filter.cpp + Event/EC_Masked_Type_Filter.cpp + Event/EC_Prefix_Filter_Builder.cpp + Event/EC_And_Filter.cpp + Event_Utilities.cpp + Event/EC_Gateway.cpp + Event/EC_Gateway_UDP.cpp + Event/ECG_Mcast_EH.cpp + Event/ECG_UDP_Sender.cpp + Event/EC_UDP_Admin.cpp + } +} diff --git a/TAO/orbsvcs/orbsvcs/RTOLDEvent.mpc b/TAO/orbsvcs/orbsvcs/RTOLDEvent.mpc new file mode 100644 index 00000000000..22b8a5abfa2 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/RTOLDEvent.mpc @@ -0,0 +1,22 @@ +project(RTOLDEvent) : orbsvcslib { + depends += RTEvent RTSched CosNaming Svc_Utils PortableServer + sharedname = TAO_RTOLDEvent + libs = TAO_RTEvent TAO_RTSched TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + dllflags = TAO_RTOLDEVENT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event/BCU.cpp + Event/Dispatching_Modules.cpp + Event/Event_Channel.cpp + Event/Event_Manip.cpp + Event/Local_ESTypes.cpp + Event/Memory_Pools.cpp + Event/RT_Task.cpp + Event/ReactorTask.cpp + Event/Timer_Module.cpp + Event/Module_Factory.cpp + } +} diff --git a/TAO/orbsvcs/orbsvcs/RTSched.mpc b/TAO/orbsvcs/orbsvcs/RTSched.mpc new file mode 100644 index 00000000000..7fd442dfb77 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/RTSched.mpc @@ -0,0 +1,20 @@ +project(RTSched) : orbsvcslib { + depends += CosNaming TAO_Svc_Utils PortableServer + sharedname = TAO_RTSched + libs = TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_RTSched_Export -Wb,export_include=Sched/sched_export.h + dllflags = TAO_RTSCHED_BUILD_DLL + + IDL_Files { + RtecScheduler.idl + } + + Source_Files { + RtecSchedulerC.cpp + RtecSchedulerS.cpp + Scheduler_Factory.cpp + Runtime_Scheduler.cpp + Scheduler_Utilities.cpp + Sched + } +} diff --git a/TAO/orbsvcs/orbsvcs/RTSchedEvent.mpc b/TAO/orbsvcs/orbsvcs/RTSchedEvent.mpc new file mode 100644 index 00000000000..5fefc20ae86 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/RTSchedEvent.mpc @@ -0,0 +1,18 @@ +project(RTSchedEvent) : orbsvcslib { + depends += RTEvent RTSched CosNaming Svc_Utils PortableServer + sharedname = TAO_RTSchedEvent + libs = TAO_RTEvent TAO_RTSched TAO_CosNaming TAO_Svc_Utils TAO_PortableServer TAO + dllflags = TAO_RTSCHEDEVENT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Event/EC_Sched_Filter.cpp + Event/EC_Sched_Filter_Builder.cpp + Event/EC_Priority_Scheduling.cpp + Event/EC_Priority_Dispatching.cpp + Event/EC_Sched_Factory.cpp + Event/EC_Gateway_Sched.cpp + } +} diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP.mpc b/TAO/orbsvcs/orbsvcs/SSLIOP.mpc new file mode 100644 index 00000000000..bd57c72b210 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/SSLIOP.mpc @@ -0,0 +1,17 @@ +project(SSLIOP) : orbsvcslib { + depends += Security PortableServer ssl + sharedname = TAO_SSLIOP + libs = TAO_Security TAO_PortableServer TAO ACE_SSL + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_SSLIOP_Export -Wb,export_include=SSLIOP/SSLIOP_Export.h + dllflags = TAO_SSLIOP_BUILD_DLL + + IDL_Files { + SSLIOP.idl + } + + Source_Files { + SSLIOPC.cpp + SSLIOPS.cpp + SSLIOP + } +} diff --git a/TAO/orbsvcs/orbsvcs/Security.mpc b/TAO/orbsvcs/orbsvcs/Security.mpc new file mode 100644 index 00000000000..108ef4f854e --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Security.mpc @@ -0,0 +1,26 @@ +project(Security) : orbsvcslib { + depends += PortableServer + sharedname = TAO_Security + libs = TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Security_Export -Wb,export_include=Security/security_export.h + dllflags = TAO_SECURITY_BUILD_DLL + + IDL_Files { + Security.idl + SecurityLevel1.idl + SecurityLevel2.idl + SecurityReplaceable.idl + } + + Source_Files { + SecurityC.cpp + SecurityS.cpp + SecurityLevel1C.cpp + SecurityLevel1S.cpp + SecurityLevel2C.cpp + SecurityLevel2S.cpp + SecurityReplaceableC.cpp + SecurityReplaceableS.cpp + Security + } +} diff --git a/TAO/orbsvcs/orbsvcs/Security/MechanismPolicy.h b/TAO/orbsvcs/orbsvcs/Security/MechanismPolicy.h index 0e2785c53f9..5dacd18d603 100644 --- a/TAO/orbsvcs/orbsvcs/Security/MechanismPolicy.h +++ b/TAO/orbsvcs/orbsvcs/Security/MechanismPolicy.h @@ -63,7 +63,7 @@ public: //@} /// Return the list of mechanism types associated with this policy. - virtual Security::MechanismTypeList mechanisms ( + virtual Security::MechanismTypeList* mechanisms ( ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC ((CORBA::SystemException)); diff --git a/TAO/orbsvcs/orbsvcs/Svc_Utils.mpc b/TAO/orbsvcs/orbsvcs/Svc_Utils.mpc new file mode 100644 index 00000000000..0266a0f67b3 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Svc_Utils.mpc @@ -0,0 +1,21 @@ +project(Svc_Utils) : orbsvcslib { + depends += PortableServer + sharedname = TAO_Svc_Utils + libs = TAO_PortableServer TAO + idlflags += -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -Wb,export_macro=TAO_Svc_Utils_Export -Wb,export_include=svc_utils_export.h + dllflags = TAO_SVC_UTILS_BUILD_DLL + + IDL_Files { + TimeBase.idl + RtecBase.idl + } + + Source_Files { + TimeBaseC.cpp + TimeBaseS.cpp + RtecBaseC.cpp + RtecBaseS.cpp + Time_Utilities.cpp + IOR_Multicast.cpp + } +} diff --git a/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.mpc b/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.mpc new file mode 100644 index 00000000000..540c8ffae78 --- /dev/null +++ b/TAO/orbsvcs/tests/Simple_Naming/Simple_Naming.mpc @@ -0,0 +1,10 @@ +project(Simple Naming Client) : orbsvcsexe { + depends += CosNaming Svc_Utils IORTable PortableServer + exename = client + libs = TAO_CosNaming TAO_Svc_Utils TAO_IORTable TAO_PortableServer TAO + + Source_Files { + client.cpp + } +} + diff --git a/TAO/tao/BiDir_GIOP/BiDir_GIOP.mpc b/TAO/tao/BiDir_GIOP/BiDir_GIOP.mpc new file mode 100644 index 00000000000..de7d09fb781 --- /dev/null +++ b/TAO/tao/BiDir_GIOP/BiDir_GIOP.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_BiDirGIOP + libs = TAO + dllflags = TAO_BIDIRGIOP_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/Domain/Domain.mpc b/TAO/tao/Domain/Domain.mpc new file mode 100644 index 00000000000..2d372044cc2 --- /dev/null +++ b/TAO/tao/Domain/Domain.mpc @@ -0,0 +1,7 @@ +project : taolib { + depends += IFR_Client PortableServer + sharedname = TAO_Domain + libs = TAO_IFR_Client TAO_PortableServer TAO + dllflags = TAO_DOMAIN_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/DynamicAny/DynamicAny.mpc b/TAO/tao/DynamicAny/DynamicAny.mpc new file mode 100644 index 00000000000..61575796fb4 --- /dev/null +++ b/TAO/tao/DynamicAny/DynamicAny.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_DynamicAny + libs = TAO + dllflags = TAO_DYNAMICANY_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/DynamicInterface/DynamicInterface.mpc b/TAO/tao/DynamicInterface/DynamicInterface.mpc new file mode 100644 index 00000000000..77e74f0bc80 --- /dev/null +++ b/TAO/tao/DynamicInterface/DynamicInterface.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_DynamicInterface + libs = TAO + dllflags = TAO_DYNAMICINTERFACE_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/IFR_Client/IFR_Client.mpc b/TAO/tao/IFR_Client/IFR_Client.mpc new file mode 100644 index 00000000000..49c65fd3880 --- /dev/null +++ b/TAO/tao/IFR_Client/IFR_Client.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_IFR_Client + libs = TAO + dllflags = TAO_IFR_CLIENT_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/IORManipulation/IORManipulation.mpc b/TAO/tao/IORManipulation/IORManipulation.mpc new file mode 100644 index 00000000000..5e58a043000 --- /dev/null +++ b/TAO/tao/IORManipulation/IORManipulation.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_IORManip + libs = TAO + dllflags = TAO_IORMANIP_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/IORTable/IORTable.mpc b/TAO/tao/IORTable/IORTable.mpc new file mode 100644 index 00000000000..dfba6ef187b --- /dev/null +++ b/TAO/tao/IORTable/IORTable.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_IORTable + libs = TAO + dllflags = TAO_IORTABLE_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/Messaging/Messaging.mpc b/TAO/tao/Messaging/Messaging.mpc new file mode 100644 index 00000000000..999f106194c --- /dev/null +++ b/TAO/tao/Messaging/Messaging.mpc @@ -0,0 +1,7 @@ +project : taolib { + depends += PortableServer + sharedname = TAO_Messaging + libs = TAO_PortableServer TAO + dllflags = TAO_MESSAGING_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/PortableServer/Key_Adapters.h b/TAO/tao/PortableServer/Key_Adapters.h index 5dec4d11b47..5df2467636d 100644 --- a/TAO/tao/PortableServer/Key_Adapters.h +++ b/TAO/tao/PortableServer/Key_Adapters.h @@ -17,7 +17,7 @@ #include "PortableServerC.h" #include "tao/corbafwd.h" -#include "ace/Map.h" +#include "ace/Map_T.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once diff --git a/TAO/tao/PortableServer/PortableServer.mpc b/TAO/tao/PortableServer/PortableServer.mpc new file mode 100644 index 00000000000..5c0794df981 --- /dev/null +++ b/TAO/tao/PortableServer/PortableServer.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_PortableServer + libs = TAO + dllflags = TAO_PORTABLESERVER_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/RTCORBA/RTCORBA.mpc b/TAO/tao/RTCORBA/RTCORBA.mpc new file mode 100644 index 00000000000..d3fc38ed073 --- /dev/null +++ b/TAO/tao/RTCORBA/RTCORBA.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_RTCORBA + libs = TAO + dllflags = TAO_RTCORBA_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/RTPortableServer/RTPortableServer.mpc b/TAO/tao/RTPortableServer/RTPortableServer.mpc new file mode 100644 index 00000000000..0a5f018e4db --- /dev/null +++ b/TAO/tao/RTPortableServer/RTPortableServer.mpc @@ -0,0 +1,7 @@ +project : taolib { + depends += RTCORBA PortableServer + sharedname = TAO_RTPortableServer + libs = TAO_RTCORBA TAO_PortableServer TAO + dllflags = TAO_RTPORTABLESERVER_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/SmartProxies/SmartProxies.mpc b/TAO/tao/SmartProxies/SmartProxies.mpc new file mode 100644 index 00000000000..5ad6d06623a --- /dev/null +++ b/TAO/tao/SmartProxies/SmartProxies.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_SmartProxies + libs = TAO + dllflags = TAO_SMARTPROXIES_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/Strategies/Strategies.mpc b/TAO/tao/Strategies/Strategies.mpc new file mode 100644 index 00000000000..373992108d8 --- /dev/null +++ b/TAO/tao/Strategies/Strategies.mpc @@ -0,0 +1,6 @@ +project : taolib { + sharedname = TAO_Strategies + libs = TAO + dllflags = TAO_STRATEGIES_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory.mpc b/TAO/tao/TypeCodeFactory/TypeCodeFactory.mpc new file mode 100644 index 00000000000..56ec696cc03 --- /dev/null +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory.mpc @@ -0,0 +1,7 @@ +project : taolib { + depends += IFR_Client + sharedname = TAO_TypeCodeFactory + libs = TAO_IFR_Client TAO + dllflags = TAO_TYPECODEFACTORY_BUILD_DLL + libout = .. +} diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc new file mode 100644 index 00000000000..5035983fb7f --- /dev/null +++ b/TAO/tao/tao.mpc @@ -0,0 +1,225 @@ +project : acelib { + tao = 1 + includes += $(TAO_ROOT) $(TAO_ROOT)/tao + sharedname = TAO + libflags += TAO_AS_STATIC_LIBS + dllflags = TAO_BUILD_DLL + + // Override the defaults due to the + // existence of orb.idl + IDL_Files { + } + + Source_Files(TAO_COMPONENTS) { + Pluggable_Protocols { + Transport_Acceptor.cpp + Transport_Connector.cpp + Transport.cpp + Incoming_Message_Queue.cpp + Resume_Handle.cpp + Profile.cpp + Endpoint.cpp + Connector_Registry.cpp + Connection_Handler.cpp + Acceptor_Registry.cpp + Protocol_Factory.cpp + Acceptor_Filter.cpp + iiop_endpoints.cpp + IIOP_Factory.cpp + IIOP_Lite_Factory.cpp + IIOP_Profile.cpp + IIOP_Transport.cpp + IIOP_Connector.cpp + IIOP_Acceptor.cpp + IIOP_Connection_Handler.cpp + IIOP_Endpoint.cpp + IIOPC.cpp + } + + Pluggable_Messaging { + Pluggable_Messaging.cpp + Pluggable_Messaging_Utils.cpp + GIOP_Message_Base.cpp + GIOP_Message_Lite.cpp + GIOP_Message_Generator_Parser.cpp + GIOP_Message_Generator_Parser_10.cpp + GIOP_Message_Generator_Parser_11.cpp + GIOP_Message_Generator_Parser_12.cpp + GIOP_Message_Generator_Parser_Impl.cpp + GIOP_Utils.cpp + GIOP_Message_Locate_Header.cpp + target_specification.cpp + GIOP_Message_State.cpp + GIOP_Message_Version.cpp + Tagged_Profile.cpp + } + Default_Resources { + default_client.cpp + default_server.cpp + default_resource.cpp + xt_resource.cpp + qt_resource.cpp + } + Interpretive_Marshaling { + append.cpp + Marshal.cpp + skip.cpp + } + IDL_Compiler { + Managed_Types.cpp + } + ORB_Core { + Any.cpp + CORBA_String.cpp + CurrentC.cpp + Exception.cpp + WrongTransactionC.cpp + Environment.cpp + Object.cpp + LocalObject.cpp + ObjectIDList.cpp + ORB.cpp + corbafwd.cpp + Policy_ForwardC.cpp + PolicyC.cpp + Policy_Validator.cpp + Encodable.cpp + Abstract_Servant_Base.cpp + Object_Proxy_Broker.cpp + Remote_Object_Proxy_Broker.cpp + Object_Proxy_Impl.cpp + Remote_Object_Proxy_Impl.cpp + DomainC.cpp + TimeBaseC.cpp + Principal.cpp + Sequence.cpp + MProfile.cpp + Stub.cpp + Typecode.cpp + ValueBase.cpp + ValueFactory.cpp + ValueFactory_Map.cpp + CDR.cpp + Client_Strategy_Factory.cpp + debug.cpp + Object_KeyC.cpp + Protocols_Hooks.cpp + Default_Protocols_Hooks.cpp + Messaging_SyncScopeC.cpp + Invocation.cpp + Invocation_Endpoint_Selectors.cpp + Asynch_Invocation.cpp + operation_details.cpp + ClientRequestInfo.cpp + ClientRequestInfo_i.cpp + RequestInfo_Util.cpp + ClientInterceptorAdapter.cpp + ObjectReferenceTemplateC.cpp + PortableInterceptorC.cpp + PICurrent.cpp + PICurrent_ORBInitializer.cpp + DynamicC.cpp + OctetSeqC.cpp + StringSeqC.cpp + ORB_Core.cpp + Collocation_Resolver.cpp + Default_Collocation_Resolver.cpp + Stub_Factory.cpp + ORB_Table.cpp + LF_Follower.cpp + LF_Follower_Auto_Ptr.cpp + LF_Follower_Auto_Adder.cpp + Leader_Follower.cpp + Leader_Follower_Flushing_Strategy.cpp + LF_Event.cpp + LF_Event_Binder.cpp + LF_Event_Loop_Thread_Helper.cpp + LF_Strategy.cpp + LF_Strategy_Complete.cpp + params.cpp + Resource_Factory.cpp + Server_Strategy_Factory.cpp + Sync_Strategies.cpp + TAO_Internal.cpp + TAO_Server_Request.cpp + Typecode_Constants.cpp + TypeCodeFactory_Adapter.cpp + Wait_Strategy.cpp + Wait_On_Read.cpp + Wait_On_Reactor.cpp + Wait_On_Leader_Follower.cpp + Transport_Mux_Strategy.cpp + Exclusive_TMS.cpp + Muxed_TMS.cpp + Reply_Dispatcher.cpp + Synch_Reply_Dispatcher.cpp + Asynch_Reply_Dispatcher_Base.cpp + IOPC.cpp + PollableC.cpp + CONV_FRAMEC.cpp + Tagged_Components.cpp + Service_Context.cpp + GIOPC.cpp + BoundsC.cpp + TAOC.cpp + Object_Loader.cpp + TAO_Singleton_Manager.cpp + DLL_ORB.cpp + Adapter.cpp + Services_Activate.cpp + Service_Callbacks.cpp + Parser_Registry.cpp + IOR_Parser.cpp + DLL_Parser.cpp + FILE_Parser.cpp + CORBALOC_Parser.cpp + CORBANAME_Parser.cpp + MCAST_Parser.cpp + Bind_Dispatcher_Guard.cpp + Fault_Tolerance_Service.cpp + Interceptor_List.cpp + IFR_Client_Adapter.cpp + ORBInitInfo.cpp + ORBInitializer_Registry.cpp + PolicyFactory_Registry.cpp + Cache_Entries.cpp + Base_Transport_Property.cpp + Transport_Cache_Manager.cpp + Cleanup_Func_Registry.cpp + Transport_Descriptor_Interface.cpp + Object_Ref_Table.cpp + BiDir_Adapter.cpp + CodecFactory.cpp + CodecFactory_ORBInitializer.cpp + CDR_Encaps_Codec.cpp + Endpoint_Selector_Factory.cpp + Flushing_Strategy.cpp + Block_Flushing_Strategy.cpp + Reactive_Flushing_Strategy.cpp + Connect_Strategy.cpp + Blocked_Connect_Strategy.cpp + Reactive_Connect_Strategy.cpp + LF_Connect_Strategy.cpp + Queued_Message.cpp + Synch_Queued_Message.cpp + Asynch_Queued_Message.cpp + Transport_Timer.cpp + Connection_Purging_Strategy.cpp + LRU_Connection_Purging_Strategy.cpp + Policy_Set.cpp + Default_Endpoint_Selector_Factory.cpp + Thread_Lane_Resources.cpp + Thread_Lane_Resources_Manager.cpp + Default_Thread_Lane_Resources_Manager.cpp + Default_Stub_Factory.cpp + Request_Dispatcher.cpp + Policy_Manager.cpp + Buffering_Constraint_Policy.cpp + Messaging_PolicyValueC.cpp + Services.cpp + NVList.cpp + IFR_TypeCodes.cpp + Dynamic_Adapter.cpp + } + } +} diff --git a/TAO/tests/AMI/AMI.mpc b/TAO/tests/AMI/AMI.mpc new file mode 100644 index 00000000000..6204e7f8813 --- /dev/null +++ b/TAO/tests/AMI/AMI.mpc @@ -0,0 +1,33 @@ +project: server { + depends += Messaging + idlflags -= -Sc + idlflags += -GC + libs += TAO_Messaging + + Source_Files { + ami_test_i.cpp + server.cpp + } +} + +project(client): server { + depends += Messaging + idlflags -= -Sc + idlflags += -GC + libs += TAO_Messaging + + Source_Files { + client.cpp + } +} + +project(simple_client): server { + depends += Messaging + idlflags -= -Sc + idlflags += -GC + libs += TAO_Messaging + + Source_Files { + simple_client.cpp + } +} diff --git a/TAO/tests/MT_Client/MT_Client.mpc b/TAO/tests/MT_Client/MT_Client.mpc new file mode 100644 index 00000000000..6d5997d4de4 --- /dev/null +++ b/TAO/tests/MT_Client/MT_Client.mpc @@ -0,0 +1,14 @@ +project: server { + Source_Files { + test_i.cpp + server.cpp + } +} + +project: client { + Source_Files { + testC.cpp + client.cpp + } +} + diff --git a/ace/QoS/qos.mpc b/ace/QoS/qos.mpc new file mode 100644 index 00000000000..75807cd351d --- /dev/null +++ b/ace/QoS/qos.mpc @@ -0,0 +1,6 @@ +project : acelib { + depends = ace + sharedname = ACE_QoS + dllflags = ACE_QoS_BUILD_DLL + libout = .. +} diff --git a/ace/RMCast/rmcast.mpc b/ace/RMCast/rmcast.mpc new file mode 100644 index 00000000000..36e9333517d --- /dev/null +++ b/ace/RMCast/rmcast.mpc @@ -0,0 +1,6 @@ +project : acelib { + depends = ace + sharedname = ACE_RMCast + dllflags = ACE_RMCAST_BUILD_DLL + libout = .. +} diff --git a/ace/SSL/ssl.mpc b/ace/SSL/ssl.mpc new file mode 100644 index 00000000000..c8450a4d760 --- /dev/null +++ b/ace/SSL/ssl.mpc @@ -0,0 +1,6 @@ +project : acelib { + depends = ace + sharedname = ACE_SSL + dllflags = ACE_SSL_BUILD + libout = .. +} diff --git a/ace/ace.mpc b/ace/ace.mpc new file mode 100644 index 00000000000..39383b324d1 --- /dev/null +++ b/ace/ace.mpc @@ -0,0 +1,366 @@ +project : acelib { + sharedname = ACE + install = + defaultlibs = + dllflags = ACE_BUILD_DLL ACE_OS_BUILD_DLL + + Source_Files(ACE_COMPONENTS) { + OS { + Basic_Types.cpp + Time_Value.cpp + OS.cpp + OS_Dirent.cpp + OS_Memory.cpp + OS_QoS.cpp + OS_String.cpp + OS_TLI.cpp + OS_Errno.cpp + Base_Thread_Adapter.cpp + OS_Thread_Adapter.cpp + OS_Log_Msg_Attributes.cpp + Thread_Hook.cpp + Sched_Params.cpp + Handle_Set.cpp + Copy_Disabled.cpp + Date_Time.cpp + gethrtime.cpp + } + + Utils { + ACE.cpp + Active_Map_Manager.cpp + Arg_Shifter.cpp + ARGV.cpp + Argv_Type_Converter.cpp + Capabilities.cpp + Containers.cpp + Configuration.cpp + Configuration_Import_Export.cpp + Dirent.cpp + Dirent_Selector.cpp + Dynamic.cpp + Flag_Manip.cpp + Framework_Component.cpp + Functor.cpp + Get_Opt.cpp + Hash_Map_Manager.cpp + Connection_Recycling_Strategy.cpp + Hashable.cpp + Notification_Strategy.cpp + Recyclable.cpp + Refcountable.cpp + Handle_Ops.cpp + Init_ACE.cpp + Lib_Find.cpp + Message_Block.cpp + Method_Request.cpp + Object_Manager.cpp + Registry.cpp + String_Base_Const.cpp + SString.cpp + Stats.cpp + Sample_History.cpp + } + + Filecache { + Filecache.cpp + } + + Logging { + Dump.cpp + Log_Msg.cpp + Log_Msg_Callback.cpp + Log_Msg_Backend.cpp + Log_Msg_IPC.cpp + Log_Msg_NT_Event_Log.cpp + Log_Msg_UNIX_Syslog.cpp + Log_Record.cpp + Logging_Strategy.cpp + Trace.cpp + } + + Threads { + Activation_Queue.cpp + Process.cpp + Process_Manager.cpp + Synch.cpp + Synch_Options.cpp + Process_Semaphore.cpp + Process_Mutex.cpp + RW_Process_Mutex.cpp + File_Lock.cpp + Thread.cpp + Thread_Manager.cpp + Thread_Adapter.cpp + Thread_Exit.cpp + Thread_Control.cpp + Token.cpp + } + + Demux { + Dev_Poll_Reactor.cpp + Event_Handler.cpp + FlReactor.cpp + Msg_WFMO_Reactor.cpp + POSIX_Proactor.cpp + WIN32_Proactor.cpp + Priority_Reactor.cpp + Proactor.cpp + Reactor.cpp + Select_Reactor.cpp + Select_Reactor_Base.cpp + SUN_Proactor.cpp + TP_Reactor.cpp + TkReactor.cpp + WFMO_Reactor.cpp + XtReactor.cpp + QtReactor.cpp + } + + Connection { + Asynch_IO.cpp + Asynch_IO_Impl.cpp + Asynch_Pseudo_Task.cpp + POSIX_Asynch_IO.cpp + WIN32_Asynch_IO.cpp + } + + Sockets { + Addr.cpp + INET_Addr.cpp + IPC_SAP.cpp + LSOCK.cpp + LSOCK_Acceptor.cpp + LSOCK_CODgram.cpp + LSOCK_Connector.cpp + LSOCK_Dgram.cpp + LSOCK_Stream.cpp + SOCK.cpp + SOCK_Acceptor.cpp + SOCK_CODgram.cpp + Sock_Connect.cpp + SOCK_Connector.cpp + SOCK_Dgram.cpp + SOCK_Dgram_Bcast.cpp + SOCK_Dgram_Mcast.cpp + SOCK_IO.cpp + SOCK_Stream.cpp + } + + IPC { + ATM_Addr.cpp + ATM_Acceptor.cpp + ATM_Connector.cpp + ATM_Params.cpp + ATM_QoS.cpp + ATM_Stream.cpp + XTI_ATM_Mcast.cpp + DEV.cpp + DEV_Addr.cpp + DEV_Connector.cpp + DEV_IO.cpp + FIFO.cpp + FIFO_Recv.cpp + FIFO_Recv_Msg.cpp + FIFO_Send.cpp + FIFO_Send_Msg.cpp + FILE_Addr.cpp + FILE.cpp + FILE_Connector.cpp + FILE_IO.cpp + IO_SAP.cpp + IOStream.cpp + Pipe.cpp + Signal.cpp + SPIPE_Addr.cpp + SPIPE.cpp + SPIPE_Acceptor.cpp + SPIPE_Connector.cpp + SPIPE_Stream.cpp + SV_Message.cpp + SV_Message_Queue.cpp + SV_Semaphore_Complex.cpp + SV_Semaphore_Simple.cpp + SV_Shared_Memory.cpp + TLI.cpp + TLI_Acceptor.cpp + TLI_Connector.cpp + TLI_Stream.cpp + TTY_IO.cpp + UNIX_Addr.cpp + UPIPE_Acceptor.cpp + UPIPE_Connector.cpp + UPIPE_Stream.cpp + MEM_Acceptor.cpp + MEM_Addr.cpp + MEM_Connector.cpp + MEM_IO.cpp + MEM_SAP.cpp + MEM_Stream.cpp + } + + Svcconf { + DLL.cpp + DLL_Manager.cpp + Dynamic_Service_Base.cpp + Parse_Node.cpp + Service_Config.cpp + Service_Manager.cpp + Service_Object.cpp + Service_Repository.cpp + Service_Types.cpp + Service_Templates.cpp + Shared_Object.cpp + Svc_Conf_l.cpp + Svc_Conf_y.cpp + Svc_Conf_Lexer_Guard.cpp + } + + Streams { + CDR_Base.cpp + CDR_Stream.cpp + Codeset_IBM1047.cpp + Message_Queue.cpp + Reactor_Notification_Strategy.cpp + Task.cpp + } + + Memory { + Based_Pointer_Repository.cpp + Malloc.cpp + PI_Malloc.cpp + Malloc_Allocator.cpp + Malloc_Instantiations.cpp + Mem_Map.cpp + Memory_Pool.cpp + Obchunk.cpp + Obstack.cpp + Read_Buffer.cpp + Shared_Memory.cpp + Shared_Memory_MM.cpp + Shared_Memory_SV.cpp + } + + Timer { + Basic_Stats.cpp + High_Res_Timer.cpp + Profile_Timer.cpp + System_Time.cpp + Time_Request_Reply.cpp + Timeprobe.cpp + Timer_Hash.cpp + Timer_Heap.cpp + Timer_List.cpp + Timer_Queue.cpp + Timer_Wheel.cpp + } + + Token { + Local_Tokens.cpp + Remote_Tokens.cpp + Token_Collection.cpp + Token_Invariants.cpp + Token_Manager.cpp + Token_Request_Reply.cpp + } + + Codecs { + Codecs.cpp + } + + Other { + Local_Name_Space.cpp + Name_Proxy.cpp + Name_Request_Reply.cpp + Name_Space.cpp + Naming_Context.cpp + Registry_Name_Space.cpp + Remote_Name_Space.cpp + NT_Service.cpp + } + } + + Template_Files { + default { + Acceptor.cpp + Active_Map_Manager_T.cpp + Array_Base.cpp + Node.cpp + Unbounded_Set.cpp + Unbounded_Queue.cpp + Asynch_Acceptor.cpp + Auto_IncDec_T.cpp + Auto_Ptr.cpp + Based_Pointer_T.cpp + Connector.cpp + Containers_T.cpp + Cache_Map_Manager_T.cpp + Cached_Connect_Strategy_T.cpp + Caching_Strategies_T.cpp + Caching_Utility_T.cpp + Cleanup_Strategies_T.cpp + Dump_T.cpp + Dynamic_Service.cpp + Env_Value_T.cpp + Event_Handler_T.cpp + Framework_Component_T.cpp + Free_List.cpp + Functor_T.cpp + Future.cpp + Future_Set.cpp + Hash_Map_Manager_T.cpp + Hash_Map_With_Allocator_T.cpp + Hash_Cache_Map_Manager_T.cpp + IOStream_T.cpp + Intrusive_List.cpp + Intrusive_List_Node.cpp + LOCK_SOCK_Acceptor.cpp + Local_Name_Space_T.cpp + Malloc_T.cpp + Managed_Object.cpp + Map_Manager.cpp + Map_T.cpp + Message_Block_T.cpp + Message_Queue_T.cpp + Module.cpp + Obstack_T.cpp + Pair_T.cpp + Refcounted_Auto_Ptr.cpp + RB_Tree.cpp + Select_Reactor_T.cpp + Singleton.cpp + Strategies_T.cpp + Stream.cpp + Stream_Modules.cpp + String_Base.cpp + Svc_Handler.cpp + Synch_T.cpp + Task_T.cpp + Template_Instantiations.cpp + Test_and_Set.cpp + Timeprobe_T.cpp + Timer_Hash_T.cpp + Timer_Heap_T.cpp + Timer_List_T.cpp + Timer_Queue_Adapters.cpp + Timer_Queue_T.cpp + Timer_Wheel_T.cpp + Typed_SV_Message.cpp + Typed_SV_Message_Queue.cpp + Vector_T.cpp + } + } + + Header_Files { + config-all.h + config-win32-common.h + config-win32-msvc.h + config-win32.h + config.h + } + + Documentation_Files { + README + ../VERSION + } +} diff --git a/ace/gethrtime.cpp b/ace/gethrtime.cpp index 518d5172992..08de489f7f6 100644 --- a/ace/gethrtime.cpp +++ b/ace/gethrtime.cpp @@ -9,6 +9,7 @@ ACE_RCSID(ace, gethrtime, "$Id$") +#if defined (ghs) && (defined (i386) || defined(__i386__)) extern "C" ACE_hrtime_t ACE_gethrtime (void) @@ -56,3 +57,4 @@ ACE_gethrtime (void) # error This file can _only_ be compiled with ACE_HAS_PENTIUM. #endif /* ! ACE_HAS_PENTIUM */ } +#endif /* ghs */ diff --git a/apps/gperf/src/gperf.mpc b/apps/gperf/src/gperf.mpc new file mode 100644 index 00000000000..0e6fa6de35b --- /dev/null +++ b/apps/gperf/src/gperf.mpc @@ -0,0 +1,17 @@ +project(gperf) : aceexe { + exename = gperf + install = ../../../bin + + Source_Files { + gperf.cpp + Options.cpp + Iterator.cpp + Gen_Perf.cpp + Key_List.cpp + List_Node.cpp + Hash_Table.cpp + Bool_Array.cpp + Vectors.cpp + Version.cpp + } +} diff --git a/bin/MakeProjectCreator/README b/bin/MakeProjectCreator/README new file mode 100644 index 00000000000..b80261161cf --- /dev/null +++ b/bin/MakeProjectCreator/README @@ -0,0 +1,113 @@ +Project Delcarations +-------------------- + +project(project_name) : baseproject, anotherbaseproject { + exename = foo + includes += "." + libpaths = directory + idlflags -= -Sc + + Source_Files { + file1.cpp + file2.cpp + . + . + fileN.cpp + } + + Header_Files { + file1.h + file2.h + . + . + fileN.h + } +} + + +The (project_name) part of the project declaration is optional. If it is +left off, the project name will default to the directory name. Inheritance +is optional. + + +Project Keywords +---------------- +exename Specifies the name of the executable that will be created +sharedname Specifies the name of the shared library that will be created +staticname Specifies the name of the static library that will be created +dllout (Windows Only) Specifies where the dll will be placed +libout (Windows Only) Specifies where the lib will be placed +install Specifies where the executable (or library non-Windows) will go +idlflags Specifies the idl flags to be used when processing idl files +idlpreprocessor Simple assignment used in the gnu template only +pch_header Specifies the precompiled header file name +pch_source Specifies the precompiled source file name +tao Specifies that the project will use TAO + +libpaths Specifies 1 or more locations to find libraries +includes Specifies 1 or more locations to find include files +libs Specifies 1 or more libraries to link into the exe or library +defaultlibs Specifies 1 or more default libraries to link in +depends Specifies 1 or more projects upon which this project depends +dllflags (Windows Only) Specifies preprocessor flags needed for dll's +libflags (Windows Only) Specifies preprocessor flags needed for lib's + + +Special Keywords Available to Templates +--------------------------------------- +project_name This contains the name of the project. +project_file This contains the name of the output file. +guid This is used by the VC7 project and workspace creator. +configurations When used within a foreach context, this info (each + configuration) is gathered for use with the VC7 workspace + creator. + + +Defaulting Behavior +------------------- +1) If a project name is not specified + + it will be defaulted to the name of the current directory + +2) If a particular list is not specified (Source_Files, Header_Files, etc.) + + all of the files in the directory will be added to the corresponding list + by extension + +3) If idl files exist in the directory and + the IDL_Files components are left defaulted (i.e. not listed) and + none of the idl generated files are listed in the corresponding lists + + the project is assumed to be a TAO project, the idl files are added to + the IDL_Files list and all of the (would be) generated files will be + added to the front of the corresponding lists (source, inline and + header lists) + +4) If files are listed in the Source_Files list and + a corresponding header or inline file exists + + the corresponding file will be added to the corresponding list (if it + isn't already there) + +5) If a sharedname is specified and staticname is not + + staticname is assigned the sharedname value (the same applies if + staticname is specified and sharedname is not) + +6) If a target name is not listed (exename, sharedname or staticname) + + it is assumed that the target is a library and the name chosen matches + the name of the current directory + +7) If pch_header is not specified and a header file matches *_pch.h + + it is assumed to be the precompiled header file (the same applies to + pch_source) + + +Processing Order +---------------- +1) Project file is read +2) Template input file is read +3) Template file is read +4) Output project is written diff --git a/bin/MakeProjectCreator/config/aceexe.mpb b/bin/MakeProjectCreator/config/aceexe.mpb new file mode 100644 index 00000000000..cc2f370d29d --- /dev/null +++ b/bin/MakeProjectCreator/config/aceexe.mpb @@ -0,0 +1,6 @@ +project { + depends = ace + includes = $(ACE_ROOT) + libpaths = $(ACE_ROOT)/ace + libflags = ACE_AS_STATIC_LIBS +} diff --git a/bin/MakeProjectCreator/config/acelib.mpb b/bin/MakeProjectCreator/config/acelib.mpb new file mode 100644 index 00000000000..cc2f370d29d --- /dev/null +++ b/bin/MakeProjectCreator/config/acelib.mpb @@ -0,0 +1,6 @@ +project { + depends = ace + includes = $(ACE_ROOT) + libpaths = $(ACE_ROOT)/ace + libflags = ACE_AS_STATIC_LIBS +} diff --git a/bin/MakeProjectCreator/config/client.mpb b/bin/MakeProjectCreator/config/client.mpb new file mode 100644 index 00000000000..6b398fc9da9 --- /dev/null +++ b/bin/MakeProjectCreator/config/client.mpb @@ -0,0 +1,3 @@ +project(client) : taoexe { + exename = client +} \ No newline at end of file diff --git a/bin/MakeProjectCreator/config/global.mpb b/bin/MakeProjectCreator/config/global.mpb new file mode 100644 index 00000000000..cf432adf891 --- /dev/null +++ b/bin/MakeProjectCreator/config/global.mpb @@ -0,0 +1,5 @@ +project { + defaultlibs = ACE + dllout = $(ACE_ROOT)/bin + libout = . +} diff --git a/bin/MakeProjectCreator/config/orbsvcsexe.mpb b/bin/MakeProjectCreator/config/orbsvcsexe.mpb new file mode 100644 index 00000000000..a5ff183c87e --- /dev/null +++ b/bin/MakeProjectCreator/config/orbsvcsexe.mpb @@ -0,0 +1,4 @@ +project : taoexe { + includes += $(TAO_ROOT)/orbsvcs + libpaths += $(TAO_ROOT)/orbsvcs +} diff --git a/bin/MakeProjectCreator/config/orbsvcslib.mpb b/bin/MakeProjectCreator/config/orbsvcslib.mpb new file mode 100644 index 00000000000..2db60b09c75 --- /dev/null +++ b/bin/MakeProjectCreator/config/orbsvcslib.mpb @@ -0,0 +1,5 @@ +project : taolib_with_idl { + includes += $(TAO_ROOT)/orbsvcs + libpaths += $(TAO_ROOT)/orbsvcs/orbsvcs + idlflags += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +} diff --git a/bin/MakeProjectCreator/config/server.mpb b/bin/MakeProjectCreator/config/server.mpb new file mode 100644 index 00000000000..1502c4b8c4e --- /dev/null +++ b/bin/MakeProjectCreator/config/server.mpb @@ -0,0 +1,5 @@ +project(server) : taoexe { + depends += PortableServer + exename = server + libs += TAO_PortableServer +} diff --git a/bin/MakeProjectCreator/config/taoexe.mpb b/bin/MakeProjectCreator/config/taoexe.mpb new file mode 100644 index 00000000000..479758baba9 --- /dev/null +++ b/bin/MakeProjectCreator/config/taoexe.mpb @@ -0,0 +1,9 @@ +project : aceexe { + depends += tao TAO_IDL_EXE + tao = 1 + includes += $(TAO_ROOT) $(TAO_ROOT)/tao + libpaths += $(TAO_ROOT)/tao + idlflags = -Ge 1 -Sc + libflags += TAO_AS_STATIC_LIBS + libs += TAO +} diff --git a/bin/MakeProjectCreator/config/taolib.mpb b/bin/MakeProjectCreator/config/taolib.mpb new file mode 100644 index 00000000000..0b1dc108cc6 --- /dev/null +++ b/bin/MakeProjectCreator/config/taolib.mpb @@ -0,0 +1,7 @@ +project : acelib { + depends += tao + tao = 1 + includes += $(TAO_ROOT) $(TAO_ROOT)/tao + libpaths += $(TAO_ROOT)/tao + libflags += TAO_AS_STATIC_LIBS +} diff --git a/bin/MakeProjectCreator/config/taolib_with_idl.mpb b/bin/MakeProjectCreator/config/taolib_with_idl.mpb new file mode 100644 index 00000000000..92b88da392a --- /dev/null +++ b/bin/MakeProjectCreator/config/taolib_with_idl.mpb @@ -0,0 +1,4 @@ +project : taolib { + depends += TAO_IDL_EXE + idlflags = -Ge 1 -Gs +} diff --git a/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm new file mode 100644 index 00000000000..5f6e4c55121 --- /dev/null +++ b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm @@ -0,0 +1,63 @@ +package BorlandProjectCreator; + +# ************************************************************ +# Description : Not a complete implementation for Borland +# Author : Chad Elliott +# Create Date : 3/14/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(ProjectCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub sort_files { + my($self) = shift; + return 1; +} + + +sub file_sorter { + my($self) = shift; + my($left) = shift; + my($right) = shift; + return lc($left) cmp lc($right); +} + + +sub project_file_name { + my($self) = shift; + return $self->transform_file_name( + "Makefile" . ($self->project_name() ne "" ? "." : "") . + $self->project_name() . ".bor"); +} + + +sub get_exe_template_input_file { + my($self) = shift; + return "borexe"; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return "bordll"; +} + + +sub get_template { + my($self) = shift; + return "bor"; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm new file mode 100644 index 00000000000..9de9c7b38fb --- /dev/null +++ b/bin/MakeProjectCreator/modules/Creator.pm @@ -0,0 +1,306 @@ +package Creator; + +# ************************************************************ +# Description : Base class for workspace and project creators +# Author : Chad Elliott +# Create Date : 5/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use Cwd; +use FileHandle; +use File::Basename; + +use Parser; + +use vars qw(@ISA); +@ISA = qw(Parser); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($global) = shift; + my($inc) = shift; + my($template) = shift; + my($ti) = shift; + my($type) = shift; + my($self) = Parser::new($class); + + $self->{'template'} = $template; + $self->{'ti'} = $ti; + $self->{'global_cfg'} = $global; + $self->{'grammar_type'} = $type; + $self->{'type_check'} = $type . '_defined'; + $self->{'global_read'} = 0; + $self->{'include_path'} = $inc; + + return $self; +} + + +sub generate_default_input { + my($self) = shift; + $self->parse_line(undef, "$self->{'grammar_type'} {"); + $self->parse_line(undef, "}"); + return 1; +} + + +sub parse_file { + my($self) = shift; + my($input) = shift; + my($typecheck) = $self->{'type_check'}; + my($oline) = $self->line_number(); + + ## Read the input file and get the last line number + my($status, $errorString) = $self->read_file($input); + my($linenumber) = $self->line_number(); + + if (!$status) { + print STDERR "$input: line $linenumber: $errorString\n"; + } + elsif ($status && $self->{$typecheck}) { + ## If we are at the end of the file and the type we are looking at + ## is still defined, then we have an error + print STDERR "$input: line $linenumber: ERROR: Did not " . + "find the end of the $self->{'grammar_type'}\n"; + $status = 0; + } + $self->line_number($oline); + + return $status; +} + + +sub generate { + my($self) = shift; + my($input) = shift; + my($status) = 1; + + ## Allow subclasses to reset values before + ## each call to generate(). + $self->reset_values(); + + ## Read the global configuration file + if (!$self->{'global_read'}) { + $status = $self->read_global_configuration(); + $self->{'global_read'} = 1; + } + + if ($status) { + ## An empty input file name says that we + ## should generate a default input file and use that + if ($input eq "") { + $status = $self->generate_default_input(); + } + else { + $status = $self->parse_file($input); + } + } + + return $status; +} + + +sub parse_known { + my($self) = shift; + my($line) = shift; + my($status) = 1; + my($errorString) = ""; + my($type) = $self->{'grammar_type'}; + my(@values) = (); + my($typecheck) = $self->{'type_check'}; + + ## + ## Each regexp that looks for the '{' looks for it at the + ## end of the line. It is purposely this way to decrease + ## the amount of extra lines in each file. This + ## allows for the most compact file as human readably + ## possible. + ## + if ($line eq "") { + } + elsif ($line =~ /^$type\s*(\([^\)]+\))?\s*(:.*)?\s*{$/) { + my($name) = $1; + my($parents) = $2; + if ($self->{$typecheck}) { + $errorString = "ERROR: Did not find the end of the $type"; + $status = 0; + } + else { + if (defined $parents) { + my(@parents) = (); + foreach my $parent (split(/[:,]/, $parents)) { + $parent =~ s/^\s+//; + $parent =~ s/\s+$//; + if ($parent ne "") { + push(@parents, $parent); + } + } + $parents = \@parents; + } + push(@values, $type, $name, $parents); + } + } + elsif ($line =~ /^}$/) { + if ($self->{$typecheck}) { + push(@values, $type, $line); + } + else { + $errorString = "ERROR: Did not find the beginning of the $type"; + $status = 0; + } + } + elsif (!$self->{$typecheck}) { + $errorString = "ERROR: No $type was defined"; + $status = 0; + } + elsif ($line =~ /^(\w+)\s*=\s*(.*)?/) { + my($name) = lc($1); + my($value) = $2; + push(@values, "assignment", $name, $value); + } + elsif ($line =~ /^(\w+)\s*\+=\s*(.*)?/) { + my($name) = lc($1); + my($value) = $2; + push(@values, "assign_add", $name, $value); + } + elsif ($line =~ /^(\w+)\s*\-=\s*(.*)?/) { + my($name) = lc($1); + my($value) = $2; + push(@values, "assign_sub", $name, $value); + } + elsif ($line =~ /^(\w+)\s*(\([^\)]+\))?\s*{$/) { + my($comp) = lc($1); + my($name) = $2; + + if (defined $name) { + $name =~ s/^\(\s*//; + $name =~ s/\s*\)$//; + } + else { + $name = "default"; + } + push(@values, "component", $comp, $name); + } + else { + $errorString = "ERROR: Unrecognized line: $line"; + $status = -1; + } + + return $status, $errorString, @values; +} + + +sub base_directory { + my($self) = shift; + return basename(getcwd()); +} + + +sub generate_default_file_list { + my($self) = shift; + my($dir) = shift; + my($dh) = new FileHandle(); + my(@files) = (); + + if (!defined $dir) { + $dir = "."; + } + + if (opendir($dh, $dir)) { + @files = grep(!/^\.\.?$/, readdir($dh)); + if ($self->sort_files()) { + @files = sort { $self->file_sorter($a, $b) } @files; + } + + ## Prefix each file name with the directory + ## only if it's not . + if ($dir ne ".") { + for(my $i = 0; $i <= $#files; $i++) { + $files[$i] = "$dir/$files[$i]"; + } + } + + closedir($dh); + } + return @files; +} + + +sub get_global_cfg { + my($self) = shift; + return $self->{'global_cfg'}; +} + + +sub get_include_path { + my($self) = shift; + return $self->{'include_path'}; +} + + +sub search_include_path { + my($self) = shift; + my($file) = shift; + my($found) = undef; + my($includes) = $self->get_include_path(); + foreach my $include (@$includes) { + if (-r "$include/$file") { + $found = "$include/$file"; + last; + } + } + return $found; +} + + +sub get_template_override { + my($self) = shift; + return $self->{'template'}; +} + + +sub get_ti_override { + my($self) = shift; + return $self->{'ti'}; +} + +# ************************************************************ +# Virtual Methods To Be Overridden +# ************************************************************ + +sub reset_values { + my($self) = shift; +} + + +sub sort_files { + my($self) = shift; + return 0; +} + + +sub file_sorter { + my($self) = shift; + my($left) = shift; + my($right) = shift; + return $left cmp $right; +} + + +sub read_global_configuration { + my($self) = shift; + my($input) = shift; + return 1; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/Driver.pm b/bin/MakeProjectCreator/modules/Driver.pm new file mode 100644 index 00000000000..b3bb3d86623 --- /dev/null +++ b/bin/MakeProjectCreator/modules/Driver.pm @@ -0,0 +1,218 @@ +package Driver; + +# ************************************************************ +# Description : Functionality to call a workspace or project creator +# Author : Chad Elliott +# Create Date : 5/28/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($path) = shift; + my($name) = shift; + my(@creators) = @_; + my($self) = bless {'path' => $path, + 'name' => $name, + 'version' => 0.6, + 'types' => {}, + 'creators' => \@creators, + }, $class; + return $self; +} + + +sub usageAndExit { + my($self) = shift; + my($line) = shift; + my($base) = $self->{'name'}; + + if (defined $line) { + print STDERR "$line\n"; + } + print STDERR "$base v$self->{'version'}\n" . + "Usage: $base [-global ] [-include ]\n" . + (" " x (length($base) + 8)) . "[-template ] " . + "[-ti :]\n" . + (" " x (length($base) + 8)) . "[-type <"; + my($t) = $self->{'types'}; + my(@keys) = sort keys %$t; + for(my $i = 0; $i <= $#keys; $i++) { + print STDERR "$keys[$i]"; + if ($i != $#keys) { + print STDERR " | "; + } + } + print STDERR ">] [files]\n\n"; + + print STDERR +" -global Specifies the global input file. Values stored\n" . +" within this file are applied to all projects.\n" . +" -include Specifies a directory to search when looking for base\n" . +" projects, template input files and templates. This\n" . +" option can be used multiple times to add directories.\n" . +" -ti Specifies the template input file (with no extension)\n" . +" for the specific type as shown above\n" . +" (ex. -ti exe:vc8exe)\n" . +" -type Specifies the type of project file to generate. This\n" . +" option can be used multiple times to generate multiple\n" . +" types.\n"; + + exit(0); +} + + +sub completion_command { + my($self) = shift; + my($str) = "complete $self->{'name'} " . + "'c/-/(global include type template ti)/' " . + "'c/dll:/f/' 'c/exe:/f/' 'c/lib:/f/' " . + "'n/-ti/(dll exe lib)/:' 'n/-type/("; + my($t) = $self->{'types'}; + my(@keys) = sort keys %$t; + for(my $i = 0; $i <= $#keys; $i++) { + $str .= $keys[$i]; + if ($i != $#keys) { + $str .= " "; + } + } + $str .= ")/'"; + return $str; +} + + +sub run { + my($self) = shift; + my(@args) = @_; + my($global) = undef; + my(@include) = (); + my(@input) = (); + my(@generators) = (); + my($status) = 0; + my($default) = undef; + my($template) = undef; + my(%ti) = (); + my($signif) = 3; + + ## Dynamically load in each perl module and set up + ## the type tags and project creators + my($creators) = $self->{'creators'}; + foreach my $creator (@$creators) { + my($tag) = lc(substr($creator, 0, $signif)); + $self->{'types'}->{$tag} = $creator; + if (!defined $default) { + $default = $creator; + } + require "$creator.pm"; + } + + for(my $i = 0; $i <= $#args; $i++) { + my($arg) = $args[$i]; + if ($arg eq '-complete') { + print $self->completion_command() . "\n"; + return $status; + } + elsif ($arg eq '-type') { + $i++; + if (!defined $args[$i]) { + $self->usageAndExit("-type requires an argument"); + } + + my($type) = lc(substr($args[$i], 0, $signif)); + if (defined $self->{'types'}->{$type}) { + my($call) = $self->{'types'}->{$type}; + push(@generators, $call); + } + else { + $self->usageAndExit("Invalid type: $type"); + } + } + elsif ($arg eq '-global') { + $i++; + $global = $args[$i]; + if (!defined $global) { + $self->usageAndExit("-global requires a file name argument"); + } + } + elsif ($arg eq '-include') { + $i++; + my($include) = $args[$i]; + if (!defined $include) { + $self->usageAndExit("-include requires a directory argument"); + } + push(@include, $include); + } + elsif ($arg eq '-template') { + $i++; + $template = $args[$i]; + if (!defined $template) { + $self->usageAndExit("-template requires a file name argument"); + } + } + elsif ($arg eq '-ti') { + $i++; + my($tmpi) = $args[$i]; + if (!defined $tmpi) { + $self->usageAndExit("-ti requires a template input argument"); + } + else { + if ($tmpi =~ /(dll|exe|lib):(.*)/) { + my($key) = $1; + my($name) = $2; + $ti{$key} = $name; + } + else { + $self->usageAndExit("Invalid -ti argument: $tmpi"); + } + } + } + elsif ($arg =~ /^-/) { + $self->usageAndExit(); + } + else { + push(@input, $arg); + } + } + + ## Set up default values + if (!defined $input[0]) { + push(@input, ""); + } + if (!defined $generators[0]) { + push(@generators, $default); + } + if (!defined $global) { + $global = $self->{'path'} . "/config/global.mpb"; + } + if (!defined $include[0]) { + push(@include, $self->{'path'} . "/config"); + push(@include, $self->{'path'} . "/templates"); + } + + ## Generate the files + foreach my $file (@input) { + foreach my $name (@generators) { + my($generator) = $name->new($global, \@include, $template, \%ti); + print "Generating output using " . + ($file eq "" ? "default input" : $file) . "\n"; + if (!$generator->generate($file)) { + print STDERR "Unable to process: $file\n"; + $status++; + } + } + } + + return $status; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/GHSProjectCreator.pm b/bin/MakeProjectCreator/modules/GHSProjectCreator.pm new file mode 100644 index 00000000000..cfe795e56c5 --- /dev/null +++ b/bin/MakeProjectCreator/modules/GHSProjectCreator.pm @@ -0,0 +1,48 @@ +package GHSProjectCreator; + +# ************************************************************ +# Description : Not a complete implementation for GHS +# Author : Chad Elliott +# Create Date : 4/19/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(ProjectCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub project_file_name { + my($self) = shift; + return $self->transform_file_name("ghs/" . + $self->project_name() . ".bld"); +} + + +sub get_exe_template_input_file { + my($self) = shift; + return "ghsexe"; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return "ghsdll"; +} + + +sub get_template { + my($self) = shift; + return "ghs"; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/GNUProjectCreator.pm b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm new file mode 100644 index 00000000000..c0a4ca2bdd0 --- /dev/null +++ b/bin/MakeProjectCreator/modules/GNUProjectCreator.pm @@ -0,0 +1,154 @@ +package GNUProjectCreator; + +# ************************************************************ +# Description : A GNU Project Creator +# Author : Chad Elliott +# Create Date : 3/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use File::Basename; + +use ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(ProjectCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub translate_value { + my($self) = shift; + my($key) = shift; + my($val) = shift; + + if ($key eq 'depends' && $val ne "") { + my($arr) = $self->create_array($val); + my($app) = ""; + $val = ""; + foreach my $entry (@$arr) { + $val .= "\"" . $self->project_file_name($entry) . "\" "; + } + $val =~ s/\s+$//; + } + return $val; +} + + +sub convert_slashes { + my($self) = shift; + return 0; +} + + +sub fill_value { + my($self) = shift; + my($name) = shift; + my($value) = undef; + my($crlf) = $self->crlf(); + + if ($name eq "gnu_source_files") { + my(%vpath) = (); + my($tag) = 'source_files'; + my($names) = $self->{$tag}; + + $value = ""; + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + + foreach my $key (sort keys %$comps) { + my($a) = $$comps{$key}; + my(@arr) = @$a; + my($cpy) = $key; + + $cpy =~ s/^\d+_//; + $value .= "$crlf$crlf$cpy = \\"; + for(my $i = 0; $i <= $#arr; $i++) { + my($item) = $arr[$i]; + my($dname) = dirname($item); + + $item =~ s/\.[^\.]+$//; + if ($dname ne ".") { + $vpath{$dname} = 1; + } + $value .= "$crlf $item" . ($i != $#arr ? " \\" : ""); + } + } + } + foreach my $name (keys %$names) { + my($fname) = ""; + my($comps) = $$names{$name}; + foreach my $key (sort keys %$comps) { + $fname = $key; + $fname =~ s/^\d+_//; + last; + } + + if ($name ne "default") { + $fname = "FILES"; + $value .= "$crlf$crlf" . "ifndef $name$crlf" . + " $name = \\$crlf"; + my(@keys) = sort keys %$comps; + for(my $i = 0; $i <= $#keys; $i++) { + $keys[$i] =~ s/^\d+_//; + my($key) = $keys[$i]; + $value .= " $key" . ($i != $#keys ? " \\" : "") . $crlf; + } + $value .= "endif # $name"; + + foreach my $key (@keys) { + $value .= "$crlf$crlf" . "ifneq (,\$(findstring $key, \$($name)))$crlf" . + " $fname += \$($key)$crlf" . + "endif # $key"; + } + } + } + my(@vkeys) = sort keys %vpath; + if ($#vkeys >= 0) { + $value .= "$crlf$crlf" . "VPATH = ."; + foreach my $key (@vkeys) { + $value .= ":$key"; + } + } + } + + return $value; +} + + +sub project_file_name { + my($self) = shift; + my($name) = shift; + + if (!defined $name) { + $name = $self->project_name(); + } + + return $self->transform_file_name( + "Makefile" . ($name ne "" ? "." : "") . $name); +} + + +sub get_exe_template_input_file { + my($self) = shift; + return "gnuexe"; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return "gnudll"; +} + + +sub get_template { + my($self) = shift; + return "gnu"; +} + +1; diff --git a/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm new file mode 100644 index 00000000000..e1f8fa4e398 --- /dev/null +++ b/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm @@ -0,0 +1,77 @@ +package GNUWorkspaceCreator; + +# ************************************************************ +# Description : A GNU Workspace (Makefile) creator +# Author : Chad Elliott +# Create Date : 5/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use File::Basename; + +use GNUProjectCreator; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub workspace_file_name { + my($self) = shift; + return "Makefile"; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; + + print $fh "#----------------------------------------------------------------------------\n" . + "# GNU Workspace\n" . + "#----------------------------------------------------------------------------\n" . + "\n"; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($projects) = $self->get_projects(); + my($pjs) = $self->get_project_info(); + my(@list) = $self->sort_dependencies($projects, $pjs); + + ## Print out the projet Makefile + print $fh "include \$(ACE_ROOT)/include/makeinclude/macros.GNU\n" . + "TARGETS_NESTED := \$(TARGETS_NESTED:.nested=)\n" . + "\n" . + "\$(TARGETS_NESTED):\n" . + "ifeq (Windows,\$(findstring Windows,\$(OS)))\n"; + foreach my $project (@list) { + print $fh "\t\@cmd /c \"\$(MAKE) -f " . basename($project) . " -C " . dirname($project) . " \$(\@)\"\n"; + } + print $fh "else\n"; + foreach my $project (@list) { + print $fh "\t\@\$(MAKE) -f " . basename($project) . " -C " . dirname($project) . " \$(\@);\n"; + } + print $fh "endif\n"; +} + + + +sub project_creator { + my($self) = shift; + return new GNUProjectCreator($self->get_global_cfg(), + $self->get_include_path(), + $self->get_template_override(), + $self->get_ti_override()); +} + + +1; diff --git a/bin/MakeProjectCreator/modules/GUID.pm b/bin/MakeProjectCreator/modules/GUID.pm new file mode 100644 index 00000000000..e53f6ea1b08 --- /dev/null +++ b/bin/MakeProjectCreator/modules/GUID.pm @@ -0,0 +1,52 @@ +package GUID; + +# ************************************************************ +# Description : Generate GUID's for VC7 projects and workspaces +# Author : Chad Elliott +# Create Date : 5/14/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($self) = bless { + }, $class; + return $self; +} + + +sub generate { + my($self) = shift; + my($str) = shift; + my($time) = time(); ## 32 bits + my($hash) = 0; ## 32 bits + my($rand1) = int(rand(0xffff)); ## 16 bits + my($rand2) = int(rand(0xffff)); ## 16 bits + my($rand3) = int(rand(0xffff)); ## 16 bits + my($rand4) = $$ + int(rand(0xff)); ## 16 bits + + + ## Hash the input string + my($length) = length($str); + for(my $i = 0; $i < $length; $i++) { + my($high) = $hash & 0xf8000000; + $hash <<= 5; + $hash ^= ($high >> 27); + $hash ^= ord(substr($str, $i, 1)); + } + + return sprintf("%08X-%04X-%04X-%04X-%04X%08X", + $hash, $rand1, $rand2, $rand3, $rand4, $time); +} + + +1; diff --git a/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm b/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm new file mode 100644 index 00000000000..b51fedc9bc8 --- /dev/null +++ b/bin/MakeProjectCreator/modules/NMakeProjectCreator.pm @@ -0,0 +1,92 @@ +package NMakeProjectCreator; + +# ************************************************************ +# Description : An NMake Project Creator +# Author : Chad Elliott +# Create Date : 5/31/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(ProjectCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub translate_value { + my($self) = shift; + my($key) = shift; + my($val) = shift; + + if ($key eq 'depends' && $val ne "") { + my($arr) = $self->create_array($val); + my($app) = ""; + $val = ""; + foreach my $entry (@$arr) { + $val .= "\"" . $self->project_file_name($entry) . "\" "; + } + $val =~ s/\s+$//; + } + return $val; +} + + +sub sort_files { + my($self) = shift; + return 1; +} + + +sub file_sorter { + my($self) = shift; + my($left) = shift; + my($right) = shift; + return lc($left) cmp lc($right); +} + + +sub crlf { + my($self) = shift; + return "\r\n"; +} + + +sub project_file_name { + my($self) = shift; + my($name) = shift; + + if (!defined $name) { + $name = $self->project_name(); + } + + return $self->transform_file_name("$name.mak"); +} + + +sub get_exe_template_input_file { + my($self) = shift; + return "nmakeexe"; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return "nmakedll"; +} + + +sub get_template { + my($self) = shift; + return "nmake"; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm new file mode 100644 index 00000000000..b9b13dffbc5 --- /dev/null +++ b/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm @@ -0,0 +1,85 @@ +package NMakeWorkspaceCreator; + +# ************************************************************ +# Description : A NMake Workspace (Makefile) creator +# Author : Chad Elliott +# Create Date : 6/10/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use File::Basename; + +use NMakeProjectCreator; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + + +sub workspace_file_name { + my($self) = shift; + return "Makefile"; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; + + print $fh "# Microsoft Developer Studio Generated NMAKE File\r\n\r\n"; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($projects) = $self->get_projects(); + my($pjs) = $self->get_project_info(); + my(@list) = $self->sort_dependencies($projects, $pjs); + + print $fh "ALL:\r\n"; + foreach my $project (@list) { + my($dir) = dirname($project); + my($chdir) = 0; + my($back) = 1; + + ## If the directory isn't "." then we need + ## to figure out how to get back to our starting point + if ($dir ne ".") { + $chdir = 1; + my($length) = length($dir); + for(my $i = 0; $i < $length; $i++) { + if (substr($dir, $i, 1) eq "/") { + $back++; + } + } + } + + ## These commands will work. In practicality, only the + ## default configuration can be built at the top level. + print $fh ($chdir ? "\tcd $dir\r\n" : "") . + "\t\$(MAKE) /f " . basename($project) . " CFG=\"\$(CFG)\"\r\n" . + ($chdir ? "\tcd " . ("../" x $back) : ""); + } +} + + + +sub project_creator { + my($self) = shift; + return new NMakeProjectCreator($self->get_global_cfg(), + $self->get_include_path(), + $self->get_template_override(), + $self->get_ti_override()); +} + + +1; diff --git a/bin/MakeProjectCreator/modules/Parser.pm b/bin/MakeProjectCreator/modules/Parser.pm new file mode 100644 index 00000000000..674f2276afd --- /dev/null +++ b/bin/MakeProjectCreator/modules/Parser.pm @@ -0,0 +1,152 @@ +package Parser; + +# ************************************************************ +# Description : A basic parser that requires a parse_line override +# Author : Chad Elliott +# Create Date : 5/16/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use FileHandle; + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($self) = bless {'line_number' => 0, + }, $class; + return $self; +} + + +sub strip_line { + my($self) = shift; + my($line) = shift; + + $self->{'line_number'}++; + $line =~ s/\/\/.*//; + $line =~ s/^\s+//; + $line =~ s/\s+$//; + + return $line; +} + + +sub process_special { + my($self) = shift; + my($line) = shift; + my($length) = length($line); + + for(my $i = 0; $i < $length; $i++) { + my($ch) = substr($line, $i, 1); + if ($ch eq "\\" && $i + 1 < $length) { + substr($line, $i, 1) = ""; + $length--; + } + elsif ($ch eq '"') { + substr($line, $i, 1) = ""; + $length--; + $i--; + } + } + return $line; +} + + +sub read_file { + my($self) = shift; + my($input) = shift; + my($ih) = new FileHandle(); + my($status) = 1; + my($errorString) = ""; + + $self->{'line_number'} = 0; + if (open($ih, $input)) { + while(<$ih>) { + my($line) = $self->strip_line($_); + + ($status, $errorString) = $self->parse_line($ih, $line); + + if (!$status) { + last; + } + } + close($ih); + } + else { + $errorString = "ERROR: Unable to open for reading"; + $status = 0; + } + + return $status, $errorString; +} + + +sub line_number { + my($self) = shift; + my($number) = shift; + + if (defined $number) { + $self->{'line_number'} = $number; + } + + return $self->{'line_number'}; +} + + +sub create_array { + my($self) = shift; + my($line) = shift; + my(@array) = (); + my($length) = length($line); + my($prev) = 0; + my($double) = 0; + + for(my $i = 0; $i <= $length; $i++) { + my($ch) = substr($line, $i, 1); + if (!$double && ($ch eq "" || $ch =~ /\s/)) { + my($val) = substr($line, $prev, $i - $prev); + $val =~ s/^\s+//; + $val =~ s/\s+$//; + if ($val =~ /^\"(.*)\"$/) { + $val = $1; + } + push(@array, $val); + for(; $i < $length; $i++) { + if (substr($line, $i, 1) !~ /\s/) { + $i--; + last; + } + } + $prev = $i + 1; + } + elsif ($double && $ch eq "\\" && $i + 1 < $length) { + substr($line, $i, 1) = ""; + $length--; + } + elsif ($ch eq '"') { + $double ^= 1; + } + } + return \@array; +} + + +# ************************************************************ +# Virtual Methods To Be Overridden +# ************************************************************ + +sub parse_line { + my($self) = shift; + my($ih) = shift; + my($line) = shift; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm new file mode 100644 index 00000000000..f5ff5f42a7e --- /dev/null +++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm @@ -0,0 +1,1256 @@ +package ProjectCreator; + +# ************************************************************ +# Description : Base class for all project creators +# Author : Chad Elliott +# Create Date : 3/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use FileHandle; +use File::Path; +use File::Basename; + +use Creator; +use TemplateInputReader; +use TemplateParser; + +use vars qw(@ISA); +@ISA = qw(Creator); + +# ************************************************************ +# Data Section +# ************************************************************ + +my($BaseClassExtension) = "mpb"; +my($ProjectCreatorExtension) = "mpc"; +my($TemplateExtension) = "mpd"; +my($TemplateInputExtension) = "mpt"; + +## Valid names for assignments within a project +my(%validNames) = ('exename' => 1, + 'sharedname' => 1, + 'staticname' => 1, + 'libpaths' => 1, + 'install' => 1, + 'includes' => 1, + 'idlflags' => 1, + 'idlpreprocessor' => 1, + 'defaultlibs' => 1, + 'depends' => 1, + 'libs' => 1, + 'pch_header' => 1, + 'pch_source' => 1, + 'tao' => 1, + 'dllout' => 1, + 'libout' => 1, + 'dllflags' => 1, + 'libflags' => 1, + ); + +## Deal with these components in a special way +my(@specialComponents) = ('header_files', 'inline_files'); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($global) = shift; + my($inc) = shift; + my($template) = shift; + my($ti) = shift; + my($self) = Creator::new($class, $global, $inc, + $template, $ti, 'project'); + my($typecheck) = $self->{'type_check'}; + + $self->{$typecheck} = 0; + $self->{'global_assign'} = {}; + $self->{'files_written'} = []; + $self->{'project_info'} = []; + $self->{'reading_global'} = 0; + $self->{'reading_parent'} = []; + $self->{'exe_template_input'} = undef; + $self->{'lib_template_input'} = undef; + $self->{'dll_template_input'} = undef; + $self->{'idl_defaulted'} = 0; + $self->{'writing_type'} = 0; + + ## Valid component names within a project along with the valid file extensions + my(%vc) = ('source_files' => [ "\\.cpp", "\\.cxx", "\\.cc", "\\.c", "\\.C", ], + 'template_files' => [ "_T\\.cpp", "_T\\.cxx", "_T\\.cc", "_T\\.c", "_T\\.C", ], + 'header_files' => [ "\\.h", "\\.hxx", "\\.hh", ], + 'inline_files' => [ "\\.i", "\\.inl", ], + 'idl_files' => [ "\\.idl", ], + 'documentation_files' => [ "\\.doc", "\\.txt", ], + 'resource_files' => [ "\\.rc", ], + ); + + ## Exclude these extensions when auto generating the component values + my(%ec) = ('source_files' => [ "_T\\.cpp", "_T\\.cxx", "_T\\.cc", "_T\\.C", ], + ); + + $self->{'valid_components'} = \%vc; + $self->{'exclude_components'} = \%ec; + $self->{'skeleton_endings'} = [ "C", "S" ]; + + ## Allow subclasses to override the default extensions + $self->set_component_extensions(); + + return $self; +} + + +sub read_global_configuration { + my($self) = shift; + my($input) = $self->get_global_cfg(); + my($status) = 0; + my($errorString) = ""; + + $self->{'reading_global'} = 1; + if (defined $input) { + $status = $self->parse_file($input); + } + $self->{'reading_global'} = 0; + + return $status; +} + + +sub parse_line { + my($self) = shift; + my($ih) = shift; + my($line) = shift; + my($type) = $self->{'grammar_type'}; + my($status, + $errorString, + @values) = $self->parse_known($line); + + ## parse_known() passes back an array of values + ## that make up the contents of the line parsed. + ## The array can have 0 to 3 items. The first, + ## if defined, is always an identifier of some + ## sort. + + if ($status && defined $values[0]) { + if ($values[0] eq $type) { + my($name) = $values[1]; + my($typecheck) = $self->{'type_check'}; + if (defined $name && $name eq "}") { + ## Project Ending + my($rp) = $self->{'reading_parent'}; + if (!defined $$rp[0] && !$self->{'reading_global'}) { + ## Fill in all the default values + $self->generate_defaults(); + + ## End of project; Write out the file. + $self->write_project(); + + foreach my $key (keys %{$self->{'valid_components'}}) { + delete $self->{$key}; + } + $self->{'assign'} = {}; + } + $self->{$typecheck} = 0; + $self->{'idl_defaulted'} = 0; + } + else { + ## Project Beginning + ## Deal with the inheritance hiearchy first + my($parents) = $values[2]; + if (defined $parents) { + foreach my $parent (@$parents) { + ## Read in the parent onto ourself + my($file) = $self->search_include_path( + "$parent.$BaseClassExtension"); + if (!defined $file) { + $file = $self->search_include_path( + "$parent.$ProjectCreatorExtension"); + } + + if (defined $file) { + my($rp) = $self->{'reading_parent'}; + push(@$rp, 1); + $status = $self->parse_file($file); + pop(@$rp); + + if (!$status) { + $errorString = "ERROR: Invalid parent: $parent"; + } + } + else { + $status = 0; + $errorString = "ERROR: Unable to locate parent: $parent"; + } + } + } + + ## Set up some initial values + if (defined $name) { + $name =~ s/^\(\s*//; + $name =~ s/\s*\)$//; + $self->process_assignment('project_name', $name); + } + $self->{$typecheck} = 1; + + ## Copy each value from global_assign into assign + if (!$self->{'reading_global'}) { + foreach my $key (keys %{$self->{'global_assign'}}) { + $self->{'assign'}->{$key} = $self->{'global_assign'}->{$key}; + } + } + } + } + elsif ($values[0] eq "assignment") { + my($name) = $values[1]; + my($value) = $values[2]; + if (defined $validNames{$name}) { + $self->process_assignment($name, $value); + } + else { + $errorString = "ERROR: Invalid assignment name: $name"; + $status = 0; + } + } + elsif ($values[0] eq "assign_add") { + my($name) = $values[1]; + my($value) = $values[2]; + if (defined $validNames{$name}) { + $self->process_assignment_add($name, $value); + } + else { + $errorString = "ERROR: Invalid addition name: $name"; + $status = 0; + } + } + elsif ($values[0] eq "assign_sub") { + my($name) = $values[1]; + my($value) = $values[2]; + if (defined $validNames{$name}) { + $self->process_assignment_sub($name, $value); + } + else { + $errorString = "ERROR: Invalid subtraction name: $name"; + $status = 0; + } + } + elsif ($values[0] eq "component") { + my($comp) = $values[1]; + my($name) = $values[2]; + if (defined $name) { + $name =~ s/^\(\s*//; + $name =~ s/\s*\)$//; + } + else { + $name = 'default'; + } + + my($vc) = $self->{'valid_components'}; + if (defined $$vc{$comp}) { + if ($self->parse_components($ih, $comp, $name)) { + } + else { + $errorString = "ERROR: Unable to process $comp"; + $status = 0; + } + } + else { + $errorString = "ERROR: Invalid component name: $comp"; + $status = 0; + } + } + else { + $errorString = "ERROR: Unrecognized line: $line"; + $status = 0; + } + } + elsif ($status == -1) { + $status = 0; + } + + return $status, $errorString; +} + + +sub parse_components { + my($self) = shift; + my($fh) = shift; + my($tag) = shift; + my($name) = shift; + my($current) = '000_FILES'; + my($status) = 1; + my($names) = {}; + my($comps) = {}; + my($order) = 0; + my($set) = 0; + + if (defined $self->{$tag}) { + $names = $self->{$tag}; + } + else { + $self->{$tag} = $names; + } + if (defined $$names{$name}) { + $comps = $$names{$name}; + } + else { + $$names{$name} = $comps; + } + if (!defined $$comps{$current}) { + $$comps{$current} = []; + } + + while(<$fh>) { + my($line) = $self->strip_line($_); + + if ($line eq "") { + } + elsif ($line =~ /^(\w+)\s*{$/) { + if (!defined $current || !$set) { + if (defined $current && !defined $$comps{$current}->[0]) { + ## The default components name was never used + ## so we remove it from the components + delete $$comps{$current}; + } + $current = sprintf("%03d_$1", $order); + $set = 1; + $order++; + if (!defined $$comps{$current}) { + $$comps{$current} = []; + } + } + else { + $status = 0; + last; + } + } + elsif ($line =~ /^}/) { + if (defined $current && $set) { + $current = undef; + } + else { + ## This is not an error, + ## this is the end of the components + last; + } + } + elsif (defined $current) { + my($array) = $$comps{$current}; + push(@$array, $line); + } + else { + $status = 0; + last; + } + } + + return $status; +} + + +sub process_assignment { + my($self) = shift; + my($name) = shift; + my($value) = shift; + my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign'); + my($assign) = $self->{$tag}; + + if (!defined $assign) { + $assign = {}; + $self->{$tag} = $assign; + } + + if (defined $value) { + $value =~ s/^\s+//; + $value =~ s/\s+$//; + + if ($self->convert_slashes()) { + $value =~ s/\//\\/g; + } + } + + $$assign{$name} = $value; +} + + +sub process_assignment_add { + my($self) = shift; + my($name) = shift; + my($value) = shift; + my($nval) = $self->get_assignment($name); + if (defined $nval) { + $nval = "$value $nval"; + } + else { + $nval = $value; + } + $self->process_assignment($name, $nval); +} + + +sub process_assignment_sub { + my($self) = shift; + my($name) = shift; + my($value) = shift; + my($nval) = $self->get_assignment($name); + + if (defined $nval) { + my($parts) = $self->create_array($nval); + $nval = ""; + foreach my $part (@$parts) { + if ($part ne $value && $part ne "") { + $nval .= "$part "; + } + } + $self->process_assignment($name, $nval); + } +} + + +sub read_template_input { + my($self) = shift; + my($status) = 1; + my($errorString) = ""; + my($file) = undef; + my($tag) = undef; + my($ti) = $self->get_ti_override(); + my($override) = 0; + + if ($self->exe_target()) { + $tag = 'exe_template_input'; + if (!defined $self->{$tag}) { + if (defined $$ti{'exe'}) { + $file = $$ti{'exe'}; + $override = 1; + } + else { + $file = $self->get_exe_template_input_file(); + } + } + } + else { + if ($self->{'writing_type'}) { + $tag = 'lib_template_input'; + if (!defined $self->{$tag}) { + if (defined $$ti{'lib'}) { + $file = $$ti{'lib'}; + $override = 1; + } + else { + $file = $self->get_lib_template_input_file(); + } + } + } + else { + $tag = 'dll_template_input'; + if (!defined $self->{$tag}) { + if (defined $$ti{'dll'}) { + $file = $$ti{'dll'}; + $override = 1; + } + else { + $file = $self->get_dll_template_input_file(); + } + } + } + } + + if (defined $file) { + my($file) = $self->search_include_path("$file.$TemplateInputExtension"); + if (defined $file) { + $self->{$tag} = new TemplateInputReader(); + ($status, $errorString) = $self->{$tag}->read_file($file); + } + else { + if ($override) { + $status = 0; + $errorString = "Unable to locate template input file."; + } + } + } + + return $status, $errorString; +} + + +sub add_idl_generated { + my($self) = shift; + my($tag) = shift; + my($idl) = shift; + my($names) = $self->{$tag}; + my($vc) = $self->{'valid_components'}; + my($wanted) = $$vc{$tag}->[0]; + my(@added) = (); + + $wanted =~ s/\\//; + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $key (keys %$comps) { + my($array) = $$comps{$key}; + foreach my $i (@$idl) { + my($file) = $i; + $file =~ s/\.idl$//; + foreach my $ending (@{$self->{'skeleton_endings'}}) { + push(@added, "$file$ending$wanted"); + } + } + ## Put the generated files at the front + if (defined $added[0]) { + unshift(@$array, @added); + } + } + } +} + + +sub generate_default_target_names { + my($self) = shift; + my($base) = shift; + + if (!$self->exe_target()) { + my($sharedname) = $self->get_assignment('sharedname'); + if (defined $sharedname && + !defined $self->get_assignment('staticname')) { + $self->process_assignment('staticname', $sharedname); + } + my($staticname) = $self->get_assignment('staticname'); + if (defined $staticname && + !defined $self->get_assignment('sharedname')) { + $self->process_assignment('sharedname', $staticname); + $sharedname = $staticname; + } + if (!defined $sharedname) { + $self->process_assignment('sharedname', $base); + } + if (!defined $staticname) { + $self->process_assignment('staticname', $base); + } + } +} + + +sub generate_default_pch_filenames { + my($self) = shift; + my($base) = shift; + my($files) = shift; + my($vc) = $self->{'valid_components'}; + my($gc) = $$vc{'header_files'}; + my($found) = 0; + + if (!defined $self->get_assignment('pch_header')) { + foreach my $file (@$files) { + foreach my $ext (@$gc) { + if ($file =~ /(.*_pch$ext)/) { + $self->process_assignment('pch_header', $1); + $found = 1; + last; + } + } + if ($found) { + last; + } + } + } + + if (!defined $self->get_assignment('pch_source')) { + $gc = $$vc{'source_files'}; + $found = 0; + foreach my $file (@$files) { + foreach my $ext (@$gc) { + if ($file =~ /(.*_pch$ext)/) { + $self->process_assignment('pch_source', $1); + $found = 1; + last; + } + } + if ($found) { + last; + } + } + } +} + + +sub is_special_tag { + my($self) = shift; + my($tag) = shift; + + foreach my $t (@specialComponents) { + if ($tag eq $t) { + return 1; + } + } + + return 0; +} + + +sub sift_files { + my($self) = shift; + my($files) = shift; + my($exts) = shift; + my($pchh) = shift; + my($pchc) = shift; + my($tag) = shift; + my($array) = shift; + my(@saved) = (); + my($ec) = $self->{'exclude_components'}; + + foreach my $file (@$files) { + foreach my $ext (@$exts) { + if ($file =~ /$ext$/ && (!defined $pchh || $file ne $pchh) && + (!defined $pchc || $file ne $pchc)) { + my($exclude) = 0; + if (defined $$ec{$tag}) { + my($excludes) = $$ec{$tag}; + foreach my $exc (@$excludes) { + if ($file =~ /$exc$/) { + $exclude = 1; + last; + } + } + } + elsif ($tag eq 'resource_files') { + ## Save these files for later + $exclude = 1; + push(@saved, $file); + } + + if (!$exclude) { + push(@$array, $file); + } + last; + } + } + } + + ## Now deal with the saved files + if (defined $saved[0]) { + my($pjname) = $self->get_assignment('project_name'); + foreach my $file (@saved) { + if ($pjname =~ /$file/ || $file =~ /$pjname/) { + push(@$array, $file); + } + } + } +} + + +sub generate_default_components { + my($self) = shift; + my($files) = shift; + my($passed) = shift; + my($vc) = $self->{'valid_components'}; + my(@tags) = (defined $passed ? $passed : keys %$vc); + my($pchh) = $self->get_assignment('pch_header'); + my($pchc) = $self->get_assignment('pch_source'); + + foreach my $tag (@tags) { + my($exts) = $$vc{$tag}; + if (defined $$exts[0]) { + if (defined $self->{$tag}) { + ## If the tag is defined, then process directories + my($names) = $self->{$tag}; + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $comp (keys %$comps) { + my($array) = $$comps{$comp}; + if (defined $passed) { + $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array); + } + else { + my(@built) = (); + foreach my $file (@$array) { + if (-d $file) { + my(@gen) = $self->generate_default_file_list($file); + $self->sift_files(\@gen, $exts, $pchh, $pchc, $tag, \@built); + } + else { + push(@built, $file); + } + } + $$comps{$comp} = \@built; + } + } + } + } + else { + ## Generate default values for undefined tags + my($names) = {}; + $self->{$tag} = $names; + my($comps) = {}; + $$names{'default'} = $comps; + $$comps{'000_FILES'} = []; + my($array) = $$comps{'000_FILES'}; + + if (!$self->is_special_tag($tag)) { + $self->sift_files($files, $exts, $pchh, $pchc, $tag, $array); + if ($tag eq 'idl_files' && defined $$array[0]) { + $self->{'idl_defaulted'} = 1; + $self->process_assignment('tao', 1); + } + } + } + } + } +} + + +sub generated_source_extensions { + my($self) = shift; + my($tag) = shift; + my($vc) = $self->{'valid_components'}; + my($gc) = $$vc{$tag}; + my(@gen) = (); + + foreach my $e (@$gc) { + foreach my $ending (@{$self->{'skeleton_endings'}}) { + push(@gen, "$ending$e"); + } + } + return @gen; +} + + +sub generated_source_listed { + my($self) = shift; + my($tag) = shift; + my($idl) = shift; + my($names) = $self->{$tag}; + my(@gen) = $self->generated_source_extensions($tag); + my(@found) = (); + + ## Find out which generated source files are listed + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $key (keys %$comps) { + my($array) = $$comps{$key}; + foreach my $val (@$array) { + foreach my $ext (@gen) { + foreach my $i (@$idl) { + if ($val =~ /$i$ext$/) { + push(@found, $val); + } + } + } + } + } + } + return (defined $found[0]); +} + + +sub generate_default_idl_generated { + my($self) = shift; + my($tags) = shift; + + if ($self->{'idl_defaulted'}) { + ## After all source and headers have been defaulted, see if we + ## need to add the idl generated .h, .inl and .cpp files + if (defined $self->{'idl_files'}) { + ## Build up the list of idl files + my(@idl) = (); + my($names) = $self->{'idl_files'}; + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $key (keys %$comps) { + my($array) = $$comps{$key}; + foreach my $val (@$array) { + my($f) = $val; + $f =~ s/\.idl$//; + push(@idl, $f); + } + } + } + + foreach my $type (@$tags) { + if (!$self->generated_source_listed($type, \@idl)) { + $self->add_idl_generated($type, \@idl); + } + } + } + } +} + + +sub add_source_corresponding_component_files { + my($self) = shift; + my($tag) = shift; + my($names) = $self->{'source_files'}; + my(@all) = (); + my($vc) = $self->{'valid_components'}; + + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $comp (keys %$comps) { + push(@all, @{$$comps{$comp}}); + } + } + + ## for each cpp file, we add a corresponding header or inline file + ## if it exists and is not already in the list of headers + $names = $self->{$tag}; + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $comp (keys %$comps) { + my($array) = $$comps{$comp}; + foreach my $cpp (@all) { + my($found) = 0; + my($c) = $cpp; + $c =~ s/\.[^\.]+$//; + foreach my $file (@$array) { + my($w) = $file; + my($added) = $c; + if ($w =~ /(\.[^\.]+)$/) { + $added .= $1; + } + + if ($added eq $w) { + $found = 1; + last; + } + } + + if (!$found) { + my($added) = 0; + foreach my $e (@{$$vc{$tag}}) { + my($ext) = $e; + $ext =~ s/\\//g; + + ## If the file is readable or + if (-r "$c$ext") { + push(@$array, "$c$ext"); + $added = 1; + last; + } + } + if (!$added) { + ## If we did not add the file in the above loop, + ## we must check to see if the file *would be* generated + ## from idl. If so, we will add the file with the default + ## (i.e. first) file extension. + foreach my $ending (@{$self->{'skeleton_endings'}}) { + if ($c =~ /$ending$/) { + my($ext) = $$vc{$tag}->[0]; + $ext =~ s/\\//g; + push(@$array, "$c$ext"); + last; + } + } + } + } + } + } + } +} + + +sub generate_defaults { + my($self) = shift; + my($base) = $self->base_directory(); + + ## Generate default project name + if (!defined $self->get_assignment('project_name')) { + $self->process_assignment('project_name', $base); + } + + $self->generate_default_target_names($base); + + my(@files) = $self->generate_default_file_list(); + $self->generate_default_pch_filenames($base, \@files); + + ## Generate default components, but @specialComponents + ## are skipped in the initial default components generation + $self->generate_default_components(\@files); + + ## Generate the default idl generated list of source files + ## only if we defaulted the idl file list + $self->generate_default_idl_generated(['source_files']); + + ## Add @specialComponents files based on the + ## source_components (i.e. .h and .i or .inl based on .cpp) + foreach my $tag (@specialComponents) { + $self->add_source_corresponding_component_files($tag); + } + + ## Now, if the @specialComponents are still empty + ## then take any file that matches the components extension + foreach my $tag (@specialComponents) { + my($names) = $self->{$tag}; + if (defined $names) { + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $comp (keys %$comps) { + my($array) = $$comps{$comp}; + if (!defined $$array[0]) { + $self->generate_default_components(\@files, $tag); + } + } + } + } + } +} + + +sub project_name { + my($self) = shift; + return $self->get_assignment('project_name'); +} + + +sub lib_target { + my($self) = shift; + return (defined $self->get_assignment('sharedname') || + defined $self->get_assignment('staticname')); +} + + +sub exe_target { + my($self) = shift; + return (defined $self->get_assignment('exename')); +} + + +sub get_assignment { + my($self) = shift; + my($name) = shift; + my($tag) = ($self->{'reading_global'} ? 'global_assign' : 'assign'); + return $self->{$tag}->{$name}; +} + + +sub get_component_list { + my($self) = shift; + my($tag) = shift; + my($names) = $self->{$tag}; + my(@list) = (); + + foreach my $name (keys %$names) { + my($comps) = $$names{$name}; + foreach my $key (sort keys %$comps) { + my($array) = $$comps{$key}; + push(@list, @$array); + } + } + + if ($self->convert_slashes()) { + for(my $i = 0; $i <= $#list; $i++) { + $list[$i] =~ s/\//\\/g; + } + } + + if ($self->sort_files()) { + @list = sort { $self->file_sorter($a, $b) } @list; + } + + return @list; +} + + +sub write_output_file { + my($self) = shift; + my($name) = shift; + my($status) = 0; + my($error) = ""; + my($dir) = dirname($name); + my($fh) = new FileHandle(); + my($tover) = $self->get_template_override(); + my($template) = (defined $tover ? $tover : $self->get_template()) . + ".$TemplateExtension"; + my($tfile) = $self->search_include_path($template); + + if (defined $tfile) { + if ($dir ne ".") { + mkpath($dir, 0, 0777); + } + + ## Read in the template values for the + ## specific target and project type + ($status, $error) = $self->read_template_input(); + + if ($status) { + my($tp) = new TemplateParser($self); + + ## Set the project_file assignment for the template parser + $self->process_assignment('project_file', $name); + + ($status, $error) = $tp->parse_file($tfile); + + if ($status) { + if (open($fh, ">$name")) { + my($lines) = $tp->get_lines(); + foreach my $line (@$lines) { + print $fh "$line"; + } + close($fh); + my($fw) = $self->{'files_written'}; + push(@$fw, $name); + } + else { + $error = "ERROR: Unable to open $name for output."; + $status = 0; + } + } + } + } + else { + $error = "ERROR: Unable to locate the template file: $template."; + $status = 0; + } + + return $status, $error; +} + + +sub write_project { + my($self) = shift; + my($status) = 1; + my($error) = ""; + my($name) = $self->project_file_name(); + my($prjname) = $self->get_assignment('project_name'); + + ## Writing the non-static file so set it to 0 + $self->{'writing_type'} = 0; + $self->process_assignment('project_name', + $prjname . $self->get_type_append()); + ($status, $error) = $self->write_output_file($name); + + if ($status && + $self->separate_static_project() && $self->lib_target()) { + $name = $self->static_project_file_name(); + + ## Writing the static file so set it to 1 + $self->{'writing_type'} = 1; + $self->process_assignment('project_name', + $prjname . $self->get_type_append()); + ($status, $error) = $self->write_output_file($name); + } + + if (!$status) { + print STDERR "$error\n"; + } + + return $status; +} + + +sub get_files_written { + my($self) = shift; + return $self->{'files_written'}; +} + + +sub get_project_info { + my($self) = shift; + return $self->{'project_info'}; +} + + +sub get_writing_type { + my($self) = shift; + return $self->{'writing_type'}; +} + + +sub set_component_extensions { + my($self) = shift; + my($vc) = $self->{'valid_components'}; + my($ec) = $self->{'exclude_components'}; + + foreach my $key (keys %$vc) { + my($ov) = $self->override_valid_component_extensions($key); + if (defined $ov) { + $$vc{$key} = $ov; + } + } + + foreach my $key (keys %$ec) { + my($ov) = $self->override_exclude_component_extensions($key); + if (defined $ov) { + $$ec{$key} = $ov; + } + } +} + + +sub reset_values { + my($self) = shift; + $self->{'files_written'} = []; + $self->{'project_info'} = []; +} + + +sub get_template_input { + my($self) = shift; + + if ($self->lib_target()) { + if ($self->{'writing_type'}) { + return $self->{'lib_template_input'}; + } + else { + return $self->{'dll_template_input'}; + } + } + + return $self->{'exe_template_input'}; +} + + +sub transform_file_name { + my($self) = shift; + my($name) = shift; + + $name =~ s/\s/_/g; + return $name; +} + + +sub update_project_info { + my($self) = shift; + my($tparser) = shift; + my($append) = shift; + my($names) = shift; + my($sep) = shift; + my($pi) = $self->get_project_info(); + my($value) = ""; + my($arr) = ($append && defined $$pi[0] ? pop(@$pi) : []); + + ## Set up the hash table when we are starting a new project_info + if ($append == 0) { + $self->{'project_info_hash_table'} = {}; + } + + ## Append the values of all names into one string + my(@narr) = @$names; + for(my $i = 0; $i <= $#narr; $i++) { + my($key) = $narr[$i]; + $value .= $self->translate_value($key, + $tparser->get_value_with_default($key)) . + (defined $sep && $i != $#narr ? $sep : ""); + } + + ## If we haven't seen this value yet, put it on the array + if (!defined $self->{'project_info_hash_table'}->{$value}) { + $self->{'project_info_hash_table'}->{$value} = 1; + $self->save_project_value("@narr", $value); + push(@$arr, $value); + } + + ## Always push the array back onto the project_info + push(@$pi, $arr); +} + + +# ************************************************************ +# Virtual Methods To Be Overridden +# ************************************************************ + +sub specific_lookup { + my($self) = shift; + my($key) = shift; + return undef; +} + + +sub save_project_value { + my($self) = shift; + my($name) = shift; + my($value) = shift; +} + + +sub get_type_append { + my($self) = shift; + return ""; +} + + +sub translate_value { + my($self) = shift; + my($key) = shift; + my($val) = shift; + return $val; +} + + +sub convert_slashes { + my($self) = shift; + return 1; +} + + +sub crlf { + my($self) = shift; + return "\n"; +} + + +sub fill_value { + my($self) = shift; + my($name) = shift; + return undef; +} + + +sub separate_static_project { + my($self) = shift; + return 0; +} + + +sub project_file_name { + my($self) = shift; + return undef; +} + + +sub static_project_file_name { + my($self) = shift; + return undef; +} + + +sub override_valid_component_extensions { + my($self) = shift; + my($comp) = shift; + return undef; +} + + +sub override_exclude_component_extensions { + my($self) = shift; + my($comp) = shift; + return undef; +} + + +sub get_exe_template_input_file { + my($self) = shift; + return undef; +} + + +sub get_lib_template_input_file { + my($self) = shift; + return undef; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return undef; +} + + +sub get_template { + my($self) = shift; + return undef; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/TemplateInputReader.pm b/bin/MakeProjectCreator/modules/TemplateInputReader.pm new file mode 100644 index 00000000000..1382cf36aee --- /dev/null +++ b/bin/MakeProjectCreator/modules/TemplateInputReader.pm @@ -0,0 +1,109 @@ +package TemplateInputReader; + +# ************************************************************ +# Description : Reads the template input and stores the values +# Author : Chad Elliott +# Create Date : 5/16/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use Parser; + +use vars qw(@ISA); +@ISA = qw(Parser); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($self) = Parser::new($class); + + $self->{'values'} = {}; + $self->{'cindex'} = 0; + my(@current) = ($self->{'values'}); + $self->{'current'} = \@current; + + + return $self; +} + + +sub parse_line { + my($self) = shift; + my($ih) = shift; + my($line) = shift; + my($status) = 1; + my($errorString) = ""; + my($current) = $self->{'current'}; + + if ($line eq "") { + } + elsif ($line =~ /^([\w\s]+)\s*{$/) { + ## Entering a new scope + my($name) = $1; + $name =~ s/\s+$//; + if (!defined $$current[$self->{'cindex'}]->{$name}) { + $$current[$self->{'cindex'}]->{$name} = {}; + } + push(@$current, $$current[$self->{'cindex'}]->{$name}); + $self->{'cindex'}++; + } + elsif ($line =~ /^}$/) { + if ($self->{'cindex'} > 0) { + pop(@$current); + $self->{'cindex'}--; + } + else { + $status = 0; + $errorString = "ERROR: Unmatched curly brace"; + } + } + elsif ($line =~ /^(\w+)\s*=\s*(.*)?/) { + my($name) = $1; + my($value) = $2; + + if (defined $value) { + $value = $self->create_array($value); + } + else { + $value = ""; + } + + if (!defined $$current[$self->{'cindex'}]->{$name}) { + $$current[$self->{'cindex'}]->{$name} = $value; + } + else { + $status = 0; + $errorString = "ERROR: Redifinition of '$name'"; + } + } + else { + $status = 0; + $errorString = "ERROR: Unrecognized line: $line"; + } + + return $status, $errorString; +} + + +sub get_names { + my($self) = shift; + return keys %{$self->{'values'}}; +} + + +sub get_value { + my($self) = shift; + my($tag) = shift; + return $self->{'values'}->{$tag}; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/TemplateParser.pm b/bin/MakeProjectCreator/modules/TemplateParser.pm new file mode 100644 index 00000000000..b898fad0df9 --- /dev/null +++ b/bin/MakeProjectCreator/modules/TemplateParser.pm @@ -0,0 +1,756 @@ +package TemplateParser; + +# ************************************************************ +# Description : Parses the template and fills in missing values +# Author : Chad Elliott +# Create Date : 5/17/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use Parser; + +use vars qw(@ISA); +@ISA = qw(Parser); + +# ************************************************************ +# Data Section +# ************************************************************ + +my(@keywords) = ('if', 'else', 'endif', + 'noextension', 'dirname', 'basename', 'basenoextension', + 'foreach', 'forfirst', 'fornotfirst', + 'fornotlast', 'forlast', 'endfor', + 'comment' + ); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($prjc) = shift; + my($self) = Parser::new($class); + + $self->{'prjc'} = $prjc; + $self->{'values'} = {}; + $self->{'defaults'} = {}; + $self->{'lines'} = []; + $self->{'built'} = ""; + $self->{'sstack'} = []; + $self->{'lstack'} = []; + $self->{'if_skip'} = 0; + + $self->{'foreach'} = {}; + $self->{'foreach'}->{'count'} = -1; + $self->{'foreach'}->{'nested'} = 0; + $self->{'foreach'}->{'names'} = []; + $self->{'foreach'}->{'text'} = []; + $self->{'foreach'}->{'scope'} = []; + $self->{'foreach'}->{'temp_scope'} = []; + $self->{'foreach'}->{'processing'} = 0; + + return $self; +} + + +sub basename { + my($self) = shift; + my($file) = shift; + for(my $i = length($file) - 1; $i >= 0; $i--) { + my($ch) = substr($file, $i, 1); + if ($ch eq '/' || $ch eq '\\') { + $self->{'values'}->{'basename_found'} = 1; + return substr($file, $i + 1); + } + } + delete $self->{'values'}->{'basename_found'}; + return $file; +} + + +sub dirname { + my($self) = shift; + my($file) = shift; + for(my $i = length($file) - 1; $i != 0; $i--) { + my($ch) = substr($file, $i, 1); + if ($ch eq '/' || $ch eq '\\') { + $self->{'values'}->{'dirname_found'} = 1; + return substr($file, 0, $i); + } + } + delete $self->{'values'}->{'dirname_found'}; + return "."; +} + + +sub strip_line { + my($self) = shift; + my($line) = shift; + + ## Override strip_line() from Parser. + ## We need to preserve leading space and + ## there is no comment string in templates. + $self->{'line_number'}++; + $line =~ s/\s+$//; + + return $line; +} + + +sub is_keyword { + my($self) = shift; + my($name) = shift; + + foreach my $key (@keywords) { + if ($name eq $key) { + return 1; + } + } + return 0; +} + + +sub append_current { + my($self) = shift; + my($value) = shift; + my($index) = $self->{'foreach'}->{'count'}; + + if ($index >= 0) { + $self->{'foreach'}->{'text'}->[$index] .= $value; + } + else { + $self->{'built'} .= $value; + } +} + + +sub set_current_values { + my($self) = shift; + my($name) = shift; + + ## If any value within a foreach matches the name + ## of a hash table within the template input we will + ## set the values of that hash tablein the current scope + my($ti) = $self->{'prjc'}->get_template_input(); + if (defined $ti) { + my($counter) = $self->{'foreach'}->{'count'}; + my($value) = $ti->get_value($name); + if (defined $value && $counter >= 0 && + UNIVERSAL::isa($value, 'HASH')) { + $self->{'foreach'}->{'temp_scope'}->[$counter] = $value; + } + } +} + + +sub get_value { + my($self) = shift; + my($name) = shift; + my($value) = undef; + my($counter) = $self->{'foreach'}->{'count'}; + + ## First, check the temporary scope (set inside a foreach) + if ($counter >= 0) { + while(!defined $value && $counter >= 0) { + my($scope) = $self->{'foreach'}->{'temp_scope'}->[$counter]; + $value = $$scope{$name}; + $counter--; + } + $counter = $self->{'foreach'}->{'count'}; + } + + if (!defined $value) { + ## Next, check for a template value + my($ti) = $self->{'prjc'}->get_template_input(); + if (defined $ti) { + $value = $ti->get_value($name); + } + + if (!defined $value) { + ## Next, check the inner to outer foreach + ## scopes for overriding values + while(!defined $value && $counter >= 0) { + my($scope) = $self->{'foreach'}->{'scope'}->[$counter]; + $value = $$scope{$name}; + $counter--; + } + + ## Then get the value from the project creator + if (!defined $value) { + $value = $self->{'prjc'}->get_assignment($name); + + ## Then get it from our known values + if (!defined $value) { + $value = $self->{'values'}->{$name}; + } + } + } + } + + return $value; +} + + +sub get_value_with_default { + my($self) = shift; + my($name) = shift; + my($value) = $self->get_value($name); + + if (defined $value) { + if (UNIVERSAL::isa($value, 'ARRAY')) { + $value = "@$value"; + } + } + else { + $value = $self->{'defaults'}->{$name}; + if (!defined $value) { + ## Call back onto the project creator to allow + ## it to fill in the value before defaulting to an empty string. + $value = $self->{'prjc'}->fill_value($name); + if (!defined $value) { +# print "DEBUG: WARNING: $name defaulting to empty string\n"; + $value = ""; + } + } + else { +# print "DEBUG: WARNING: $name using default value of $value\n"; + } + } + + return $value; +} + + +sub process_foreach { + my($self) = shift; + my($index) = $self->{'foreach'}->{'count'}; + my($name) = $self->{'foreach'}->{'names'}->[$index]; + my($text) = $self->{'foreach'}->{'text'}->[$index]; + my($status) = 1; + my($errorString) = ""; + my(@values) = (); + my($names) = $self->create_array($name); + + $name = undef; + foreach my $n (@$names) { + my($vals) = $self->get_value($n); + if (defined $vals && $vals ne "") { + if (!UNIVERSAL::isa($vals, 'ARRAY')) { + $vals = $self->create_array($vals); + } + push(@values, @$vals); + } + if (!defined $name) { + $name = $n; + } + } + + ## Reset the text (it will be regenerated by calling parse_line + $self->{'foreach'}->{'text'}->[$index] = ""; + + if (defined $values[0]) { + my($inner) = $name; + my($scope) = $self->{'foreach'}->{'scope'}->[$index]; + + $inner =~ s/s$//; + $$scope{'forlast'} = 0; + $$scope{'fornotlast'} = 1; + $$scope{'forfirst'} = 1; + $$scope{'fornotfirst'} = 0; + + for(my $i = 0; $i <= $#values; $i++) { + my($value) = $values[$i]; + + ## Set the corresponding values in the temporary scope + $self->set_current_values($value); + + ## Set the special values that only exist + ## within a foreach + if ($i != 0) { + $$scope{'forfirst'} = 0; + $$scope{'fornotfirst'} = 1; + } + if ($i == $#values) { + $$scope{'forlast'} = 1; + $$scope{'fornotlast'} = 0; + } + $$scope{$inner} = $value; + + ## A tiny hack for VC7 + if ($inner eq 'configuration') { + $self->{'prjc'}->update_project_info($self, 1, + ['configuration', 'platform'], + '|'); + } + + ## Now parse the line of text, each time + ## with different values + $self->{'foreach'}->{'processing'}++; + ($status, $errorString) = $self->parse_line(undef, $text); + $self->{'foreach'}->{'processing'}--; + if (!$status) { + last; + } + } + } + + return $status, $errorString; +} + + +sub handle_end { + my($self) = shift; + my($name) = shift; + my($status) = 1; + my($errorString) = ""; + my($sstack) = $self->{'sstack'}; + my($lstack) = $self->{'lstack'}; + my($end) = pop(@$sstack); + pop(@$lstack); + + if (!defined $end) { + $status = 0; + $errorString = "ERROR: Unmatched $name\n"; + } + elsif ($end eq 'endif') { + $self->{'if_skip'} = 0; + } + elsif ($end eq 'endfor') { + my($index) = $self->{'foreach'}->{'count'}; + ($status, $errorString) = $self->process_foreach(); + if ($status) { + $self->{'foreach'}->{'count'}--; + $self->append_current($self->{'foreach'}->{'text'}->[$index]); + } + } + + return $status, $errorString; +} + + +sub handle_if { + my($self) = shift; + my($val) = shift; + my($sstack) = $self->{'sstack'}; + my($lstack) = $self->{'lstack'}; + my($name) = 'endif'; + + push(@$lstack, $self->line_number() . " $val"); + if (!$self->{'if_skip'}) { + my($true) = 1; + push(@$sstack, $name); + if ($val =~ /^!(.*)/) { + $val = $1; + $val =~ s/^\s+//; + $true = 0; + } + if (!defined $self->get_value($val)) { + $self->{'if_skip'} = $true; + } + else { + $self->{'if_skip'} = !$true; + } + } + else { + push(@$sstack, "*$name"); + } +} + + +sub handle_else { + my($self) = shift; + my($val) = shift; + my($sstack) = $self->{'sstack'}; + my(@scopy) = @$sstack; + my($name) = "endif"; + + ## This method does not take into account that + ## multiple else clauses could be supplied to a single if. + ## Someday, this may be fixed. + if (defined $scopy[$#scopy] && $scopy[$#scopy] eq $name) { + $self->{'if_skip'} ^= 1; + } +} + + +sub handle_foreach { + my($self) = shift; + my($val) = shift; + my($sstack) = $self->{'sstack'}; + my($lstack) = $self->{'lstack'}; + my($name) = 'endfor'; + + push(@$lstack, $self->line_number()); + if (!$self->{'if_skip'}) { + push(@$sstack, $name); + $self->{'foreach'}->{'count'}++; + + my($index) = $self->{'foreach'}->{'count'}; + $self->{'foreach'}->{'names'}->[$index] = $val; + $self->{'foreach'}->{'text'}->[$index] = ""; + $self->{'foreach'}->{'scope'}->[$index] = {}; + } + else { + push(@$sstack, "*$name"); + } +} + + +sub handle_special { + my($self) = shift; + my($name) = shift; + my($val) = shift; + + if ($self->get_value($name)) { + $self->append_current($val); + } +} + + +sub handle_noextension { + my($self) = shift; + my($name) = shift; + + if (!$self->{'if_skip'}) { + my($val) = $self->get_value_with_default($name); + $val =~ s/\.[^\.]+$//; + $self->append_current($val); + } +} + + +sub handle_dirname { + my($self) = shift; + my($name) = shift; + + if (!$self->{'if_skip'}) { + my($val) = $self->dirname($self->get_value_with_default($name)); + $self->append_current($val); + } +} + + +sub handle_basename { + my($self) = shift; + my($name) = shift; + + if (!$self->{'if_skip'}) { + my($val) = $self->basename($self->get_value_with_default($name)); + $self->append_current($val); + } +} + + +sub handle_basenoextension { + my($self) = shift; + my($name) = shift; + + if (!$self->{'if_skip'}) { + my($val) = $self->basename($self->get_value_with_default($name)); + $val =~ s/\.[^\.]+$//; + $self->append_current($val); + } +} + + +sub split_name_value { + my($self) = shift; + my($line) = shift; + my($length) = length($line); + my($name) = undef; + my($val) = undef; + + for(my $i = 0; $i < $length; $i++) { + my($ch) = substr($line, $i, 1); + if (!defined $name && $ch eq '(') { + $name = substr($line, 0, $i); + $val = ""; + } + elsif (!defined $name && $ch eq '%') { + if (substr($line, $i + 1, 1) eq ">") { + $name = substr($line, 0, $i); + last; + } + } + elsif (defined $val && $ch ne ')') { + $val .= $ch; + } + elsif (defined $val && $ch eq ')') { + if (substr($line, $i + 1, 2) eq "%>") { + last; + } + else { + $val .= $ch; + } + } + } + return $name, $val; +} + + +sub process_name { + my($self) = shift; + my($line) = shift; + my($length) = 0; + my($status) = 1; + my($errorString) = ""; + + if ($line eq "") { + } + elsif ($line =~ /^(\w+)(\(([^\)]+|\".*\")\))?%>/) { + my($name, $val) = $self->split_name_value($line); + + $length += length($name); + if (defined $val) { + $length += length($val) + 2; + } + + if ($self->is_keyword($name)) { + if ($name eq 'endif' || $name eq 'endfor') { + ($status, $errorString) = $self->handle_end($name); + } + elsif ($name eq 'if') { + $self->handle_if($val); + } + elsif ($name eq 'else') { + $self->handle_else(); + } + elsif ($name eq 'foreach') { + $self->handle_foreach($val); + } + elsif ($name eq 'fornotlast' || $name eq 'forlast' || + $name eq 'fornotfirst' || $name eq 'forfirst') { + $self->handle_special($name, $self->process_special($val)); + } + elsif ($name eq 'comment') { + ## Ignore the contents of the comment + } + elsif ($name eq 'noextension') { + $self->handle_noextension($val); + } + elsif ($name eq 'dirname') { + $self->handle_dirname($val); + } + elsif ($name eq 'basename') { + $self->handle_basename($val); + } + elsif ($name eq 'basenoextension') { + $self->handle_basenoextension($val); + } + } + else { + if (!$self->{'if_skip'}) { + if (defined $val && !defined $self->{'defaults'}->{$name}) { + $self->{'defaults'}->{$name} = $self->process_special($val); + } + + $val = $self->get_value_with_default($name); + $self->append_current($val); + } + } + } + else { + my($error) = $line; + my($length) = length($line); + for(my $i = 0; $i < $length; $i++) { + my($part) = substr($line, $i, 2); + if ($part eq "%>") { + $error = substr($line, 0, $i + 2); + last; + } + } + $status = 0; + $errorString = "ERROR: Unable to parse line starting at $error"; + } + + return $status, $errorString, $length; +} + + +sub collect_data { + my($self) = shift; + my($prjc) = $self->{'prjc'}; + + ## Collect the components into {'values'} somehow + foreach my $key (keys %{$prjc->{'valid_components'}}) { + my(@list) = $prjc->get_component_list($key); + if (defined $list[0]) { + $self->{'values'}->{$key} = "@list"; + } + } + + ## A tiny hack (mainly for VC6 projects) + ## for the workspace generator. It needs to know the + ## target names to match up with the project name. + $prjc->update_project_info($self, 0, ['project_name']); + + ## This is for all projects + $prjc->update_project_info($self, 1, ['depends']); + + ## VC7 Projects need to know the GUID. + $prjc->update_project_info($self, 1, ['guid']); +} + + +sub is_only_keyword { + my($self) = shift; + my($line) = shift; + my($status) = 0; + + if ($line =~ /^<%(.*)%>$/) { + my($part) = $1; + if ($part !~ /%>/) { + foreach my $keyword (@keywords) { + if ($part =~ /^$keyword/) { + $status = 1; + last; + } + } + } + } + return $status; +} + + +sub parse_line { + my($self) = shift; + my($ih) = shift; + my($line) = shift; + my($status) = 1; + my($errorString) = ""; + my($length) = length($line); + my($name) = 0; + my($skipempty) = $self->{'if_skip'}; + my($crlf) = $self->{'prjc'}->crlf(); + my($clen) = length($crlf); + my($startempty) = ($line eq "" ? 1 : 0); + my($append_name) = 0; + + ## If processing a foreach or the line only + ## contains a keyword, then we do + ## not need to add a newline to the end. + if ($self->{'foreach'}->{'processing'} == 0 && + !$self->is_only_keyword($line)) { + $line .= $crlf; + $length += $clen; + } + + if ($self->{'foreach'}->{'count'} < 0) { + $self->{'built'} = ""; + } + + for(my $i = 0; $i < $length; $i++) { + my($part) = substr($line, $i, 2); + if ($part eq "<%") { + $i++; + $name = 1; + } + elsif ($part eq "%>") { + $i++; + $name = 0; + if ($append_name) { + $append_name = 0; + if (!$self->{'if_skip'}) { + $self->append_current($part); + } + } + } + elsif ($name) { + my($substr) = substr($line, $i); + my($efcheck) = ($substr =~ /^endfor\%\>/); + my($focheck) = ($substr =~ /^foreach\(/); + + if ($focheck && $self->{'foreach'}->{'count'} >= 0) { + $self->{'foreach'}->{'nested'}++; + } + + if ($self->{'foreach'}->{'count'} < 0 || + $self->{'foreach'}->{'processing'} > $self->{'foreach'}->{'nested'} || + (($efcheck || $focheck) && + $self->{'foreach'}->{'nested'} == $self->{'foreach'}->{'processing'})) { + my($nlen) = 0; + ($status, + $errorString, + $nlen) = $self->process_name($substr); + + if ($status && $nlen == 0) { + $errorString = "ERROR: Could not parse this line at column $i"; + $status = 0; + } + if (!$status) { + last; + } + + $i += ($nlen - 1); + } + else { + $name = 0; + if (!$self->{'if_skip'}) { + $self->append_current("<%" . substr($line, $i, 1)); + $append_name = 1; + } + } + + if ($efcheck && $self->{'foreach'}->{'nested'} > 0) { + $self->{'foreach'}->{'nested'}--; + } + } + else { + if (!$self->{'if_skip'}) { + $self->append_current(substr($line, $i, 1)); + } + } + } + + if ($self->{'foreach'}->{'count'} < 0) { + ## If the line started out empty and we're not + ## skipping from the start or the built up line is not empty + if ($startempty || + ($self->{'built'} ne $crlf && $self->{'built'} ne "")) { + my($lines) = $self->{'lines'}; + push(@$lines, $self->{'built'}); + } + } + + return $status, $errorString; +} + + +sub parse_file { + my($self) = shift; + my($input) = shift; + + $self->collect_data(); + my($status, $errorString) = $self->read_file($input); + + if ($status) { + my($sstack) = $self->{'sstack'}; + if (defined $$sstack[0]) { + my($lstack) = $self->{'lstack'}; + $status = 0; + $errorString = "ERROR: missing an $$sstack[0] starting at $$lstack[0]"; + } + } + + if (!$status) { + my($linenumber) = $self->line_number(); + $errorString = "$input: line $linenumber: $errorString\n"; + } + + return $status, $errorString; +} + + +sub get_lines { + my($self) = shift; + return $self->{'lines'}; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm new file mode 100644 index 00000000000..5b2264dfc7f --- /dev/null +++ b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm @@ -0,0 +1,167 @@ +package VC6ProjectCreator; + +# ************************************************************ +# Description : A VC6 Project Creator +# Author : Chad Elliott +# Create Date : 3/14/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(ProjectCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub get_type_append { + my($self) = shift; + my($type) = ""; + if ($self->lib_target()) { + ## Set the type_append preserving whitespace + if ($self->get_writing_type()) { + $type = " LIB"; + } + else { + $type = " DLL"; + } + } + return $type; +} + + +sub translate_value { + my($self) = shift; + my($key) = shift; + my($val) = shift; + + if ($key eq 'depends' && $val ne "") { + my($arr) = $self->create_array($val); + my($app) = ""; + $val = ""; + if ($self->get_writing_type()) { + $app = "LIB"; + } + else { + $app = "DLL"; + } + foreach my $entry (@$arr) { + $val .= "\"$entry $app\" "; + } + $val =~ s/\s+$//; + } + return $val; +} + + +sub sort_files { + my($self) = shift; + return 1; +} + + +sub file_sorter { + my($self) = shift; + my($left) = shift; + my($right) = shift; + return lc($left) cmp lc($right); +} + + +sub crlf { + my($self) = shift; + return "\r\n"; +} + + +sub fill_value { + my($self) = shift; + my($name) = shift; + my($value) = undef; + + if ($name eq "make_file_name") { + $value = $self->transform_file_name($self->project_name() . ".mak"); + } + + return $value; +} + + +sub separate_static_project { + my($self) = shift; + return 1; +} + + +sub project_file_name { + my($self) = shift; + return $self->transform_file_name($self->project_name() . ".dsp"); +} + + +sub static_project_file_name { + my($self) = shift; + return $self->transform_file_name($self->project_name() . "_Static.dsp"); +} + + +sub override_valid_component_extensions { + my($self) = shift; + my($comp) = shift; + my($array) = undef; + + if ($comp eq 'source_files') { + my(@exts) = ("\\.cpp", "\\.cxx", "\\.c"); + $array = \@exts; + } + + return $array; +} + + +sub override_exclude_component_extensions { + my($self) = shift; + my($comp) = shift; + my($array) = undef; + + if ($comp eq 'source_files') { + my(@exts) = ("_T\\.cpp", "_T\\.cxx"); + $array = \@exts; + } + + return $array; +} + + +sub get_exe_template_input_file { + my($self) = shift; + return "vc6dspexe"; +} + + +sub get_lib_template_input_file { + my($self) = shift; + return "vc6dsplib"; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return "vc6dspdll"; +} + + +sub get_template { + my($self) = shift; + return "vc6dsp"; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm new file mode 100644 index 00000000000..86d87530357 --- /dev/null +++ b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm @@ -0,0 +1,111 @@ +package VC6WorkspaceCreator; + +# ************************************************************ +# Description : A VC6 Workspace Creator +# Author : Chad Elliott +# Create Date : 5/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use VC6ProjectCreator; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + + +sub workspace_file_name { + my($self) = shift; + return $self->get_workspace_name() . ".dsw"; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; + + print $fh "Microsoft Developer Studio Workspace File, Format Version 6.00\r\n" . + "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r\n" . + "\r\n"; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($projects) = $self->get_projects(); + my($pjs) = $self->get_project_info(); + + foreach my $project (@$projects) { + my($pi) = $$pjs{$project}; + my($name, $deps) = @$pi; + + ## Convert all /'s to \ + $project =~ s/\//\\/g; + + print $fh "###############################################################################\r\n" . + "\r\n" . + "Project: \"$name\"=$project - Package Owner=<4>\r\n" . + "\r\n" . + "Package=<5>\r\n" . + "{{{\r\n" . + "}}}\r\n" . + "\r\n" . + "Package=<4>\r\n" . + "{{{\r\n"; + + if (defined $deps && $deps ne "") { + my($darr) = $self->create_array($deps); + foreach my $dep (@$darr) { + print $fh " Begin Project Dependency\r\n" . + " Project_Dep_Name $dep\r\n" . + " End Project Dependency\r\n"; + } + } + + print $fh "}}}\r\n" . + "\r\n"; + } +} + + +sub post_workspace { + my($self) = shift; + my($fh) = shift; + + print $fh "###############################################################################\r\n" . + "\r\n" . + "Global:\r\n" . + "\r\n" . + "Package=<5>\r\n" . + "{{{\r\n" . + "}}}\r\n" . + "\r\n" . + "Package=<3>\r\n" . + "{{{\r\n" . + "}}}\r\n" . + "\r\n" . + "###############################################################################\r\n" . + "\r\n"; +} + + +sub project_creator { + my($self) = shift; + return new VC6ProjectCreator($self->get_global_cfg(), + $self->get_include_path(), + $self->get_template_override(), + $self->get_ti_override()); +} + + +1; diff --git a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm new file mode 100644 index 00000000000..939ce810bb0 --- /dev/null +++ b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm @@ -0,0 +1,117 @@ +package VC7ProjectCreator; + +# ************************************************************ +# Description : A VC7 Project Creator +# Author : Chad Elliott +# Create Date : 4/23/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use GUID; +use ProjectCreator; + +use vars qw(@ISA); +@ISA = qw(ProjectCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub specific_lookup { + my($self) = shift; + my($key) = shift; + my($val) = undef; + my($tag) = $self->project_file_name($key); + + if (defined $self->{'guid_names'} && + defined $self->{'guid_names'}->{$tag}) { + $val = $self->{'guid_names'}->{$tag}; + } + + return $val; +} + + +sub save_project_value { + my($self) = shift; + my($name) = shift; + my($value) = shift; + + if ($name eq 'guid') { + if (!defined $self->{'guid_names'}) { + $self->{'guid_names'} = {}; + } + $self->{'guid_names'}->{$self->project_file_name()} = $value; + } +} + + +sub sort_files { + my($self) = shift; + return 1; +} + + +sub file_sorter { + my($self) = shift; + my($left) = shift; + my($right) = shift; + return lc($left) cmp lc($right); +} + + +sub crlf { + my($self) = shift; + return "\r\n"; +} + + +sub fill_value { + my($self) = shift; + my($name) = shift; + my($value) = undef; + + if ($name eq "guid") { + my($guid) = new GUID(); + $value = $guid->generate($self->project_file_name()); + } + return $value; +} + + +sub project_file_name { + my($self) = shift; + my($name) = shift; + + if (!defined $name) { + $name = $self->project_name(); + } + + return $self->transform_file_name("$name.vcproj"); +} + + +sub get_exe_template_input_file { + my($self) = shift; + return "vc7exe"; +} + + +sub get_dll_template_input_file { + my($self) = shift; + return "vc7dll"; +} + + +sub get_template { + my($self) = shift; + return "vc7"; +} + + +1; diff --git a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm new file mode 100644 index 00000000000..f6faf60d5ec --- /dev/null +++ b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm @@ -0,0 +1,132 @@ +package VC7WorkspaceCreator; + +# ************************************************************ +# Description : A VC7 Workspace Creator +# Author : Chad Elliott +# Create Date : 5/14/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use GUID; +use VC7ProjectCreator; +use WorkspaceCreator; + +use vars qw(@ISA); +@ISA = qw(WorkspaceCreator); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + + +sub workspace_file_name { + my($self) = shift; + return $self->get_workspace_name() . ".sln"; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; + + print $fh "Microsoft Visual Studio Solution File, Format Version 7.00\r\n"; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($gen) = shift; + my($projects) = $self->get_projects(); + my($ggen) = new GUID(); + my($guid) = $ggen->generate($self->workspace_file_name()); + my($pjs) = $self->get_project_info(); + + ## Project Information + foreach my $project (@$projects) { + my($pi) = $$pjs{$project}; + my($name, $deps, $pguid) = @$pi; + + ## Convert all /'s to \ + my($cpy) = $project; + $cpy =~ s/\//\\/g; + print $fh "Project(\"{$guid}\") = \"$name\", \"$cpy\", \"{$pguid}\"\r\n" . + "EndProject\r\n"; + } + + ## Project Configurations + print $fh "Global\r\n" . + " GlobalSection(SolutionConfiguration) = preSolution\r\n"; + + my(%configs) = (); + foreach my $project (@$projects) { + my($pi) = $$pjs{$project}; + my($name, $deps, $pguid, @cfgs) = @$pi; + foreach my $cfg (@cfgs) { + $cfg =~ s/\|.*//; + $configs{$cfg} = 1; + } + } + my($count) = 0; + foreach my $key (sort keys %configs) { + print $fh " ConfigName.$count = $key\r\n"; + $count++; + } + + ## Project Dependencies + print $fh " EndGlobalSection\r\n" . + " GlobalSection(ProjectDependencies) = postSolution\r\n"; + foreach my $project (@$projects) { + my($pi) = $$pjs{$project}; + my($name, $deps, $pguid) = @$pi; + if (defined $deps && $deps ne "") { + my($darr) = $self->create_array($deps); + my($i) = 0; + foreach my $dep (@$darr) { + my($val) = $gen->specific_lookup($dep); + if (!defined $val) { + $val = $dep; + } + print $fh " {$pguid}.$i = {$val}\r\n"; + $i++; + } + } + } + print $fh " EndGlobalSection\r\n" . + " GlobalSection(ProjectConfiguration) = postSolution\r\n"; + + ## Project Configuration Names + foreach my $project (@$projects) { + my($pi) = $$pjs{$project}; + my($name, $deps, $pguid, @cfgs) = @$pi; + foreach my $cfg (@cfgs) { + my($c) = $cfg; + $c =~ s/\|.*//; + print $fh " {$pguid}.$c.ActiveCfg = $cfg\r\n" . + " {$pguid}.$c.Build.0 = $cfg\r\n"; + } + } + print $fh " EndGlobalSection\r\n" . + " GlobalSection(ExtensibilityGlobals) = postSolution\r\n" . + " EndGlobalSection\r\n" . + " GlobalSection(ExtensibilityAddIns) = postSolution\r\n" . + " EndGlobalSection\r\n" . + "EndGlobal\r\n"; +} + + +sub project_creator { + my($self) = shift; + return new VC7ProjectCreator($self->get_global_cfg(), + $self->get_include_path(), + $self->get_template_override(), + $self->get_ti_override()); +} + + +1; diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm new file mode 100644 index 00000000000..e9f946546d4 --- /dev/null +++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm @@ -0,0 +1,383 @@ +package WorkspaceCreator; + +# ************************************************************ +# Description : Base class for all workspace creators +# Author : Chad Elliott +# Create Date : 5/13/2002 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; +use Cwd; +use FileHandle; +use File::Path; +use File::Basename; + +use Creator; + +use vars qw(@ISA); +@ISA = qw(Creator); + +# ************************************************************ +# Data Section +# ************************************************************ + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub new { + my($class) = shift; + my($global) = shift; + my($inc) = shift; + my($template) = shift; + my($ti) = shift; + my($self) = Creator::new($class, $global, $inc, + $template, $ti, 'workspace'); + my($typecheck) = $self->{'type_check'}; + + $self->{'workspace_name'} = undef; + $self->{$typecheck} = 0; + $self->{'projects'} = []; + $self->{'project_info'} = {}; + $self->{'reading_parent'} = []; + $self->{'project_files'} = []; + + return $self; +} + + +sub parse_line { + my($self) = shift; + my($ih) = shift; + my($line) = shift; + my($status, + $errorString, + @values) = $self->parse_known($line); + + ## Was the line recognized? + if ($status && defined $values[0]) { + if ($values[0] eq $self->{'grammar_type'}) { + my($name) = $values[1]; + my($typecheck) = $self->{'type_check'}; + if (defined $name && $name eq "}") { + my($rp) = $self->{'reading_parent'}; + if (!defined $$rp[0]) { + ## Fill in all the default values + $self->generate_defaults(); + + ## End of project; Have subclass write out the file + $self->write_workspace(); + + $self->{'workspace_name'} = undef; + $self->{'projects'} = []; + $self->{'project_info'} = {}; + $self->{'project_files'} = []; + } + $self->{$typecheck} = 0; + } + else { + ## Project Beginning + ## Deal with the inheritance hiearchy first + my($parents) = $values[2]; + if (defined $parents) { + foreach my $parent (@$parents) { + ## Read in the parent onto ourself + my($file) = $self->search_include_path("$parent.mwc"); + + if (defined $file) { + my($rp) = $self->{'reading_parent'}; + push(@$rp, 1); + $self->parse_file("$parent.mwc"); + pop(@$rp); + if (!$status) { + $errorString = "ERROR: Invalid parent: $parent"; + } + } + else { + $status = 0; + $errorString = "ERROR: Unable to locate parent: $parent"; + } + } + } + + ## Set up some initial values + if (defined $name) { + $name =~ s/^\(\s*//; + $name =~ s/\s*\)$//; + $self->{'workspace_name'} = $name; + } + $self->{$typecheck} = 1; + } + } + else { + $errorString = "ERROR: Unrecognized line: $line"; + $status = 0; + } + } + elsif ($status == -1) { + my($project_files) = $self->{'project_files'}; + push(@$project_files, $line); + $status = 1; + } + + return $status, $errorString; +} + + +sub search_for_files { + my($self) = shift; + my($files) = shift; + my($exts) = shift; + my($array) = shift; + + foreach my $file (@$files) { + if (-d $file) { + my(@f) = $self->generate_default_file_list($file); + $self->search_for_files(\@f, $exts, $array); + } + else { + foreach my $ext (@$exts) { + if ($file =~ /$ext$/) { + unshift(@$array, $file); + last; + } + } + } + } +} + + +sub generate_default_components { + my($self) = shift; + my($files) = shift; + my($pjf) = $self->{'project_files'}; + my(@exts) = ("\\.mpc"); + if (defined $$pjf[0]) { + ## If we have files, then process directories + my(@built) = (); + foreach my $file (@$pjf) { + if (-d $file) { + my(@found) = (); + my(@gen) = $self->generate_default_file_list($file); + $self->search_for_files(\@gen, \@exts, \@found); + push(@built, @found); + } + else { + push(@built, $file); + } + } + $self->{'project_files'} = \@built; + } + else { + ## Add all of the mpc files in this directory + ## and in the subdirectories. + $self->search_for_files($files, \@exts, $pjf); + + ## If no files were found, then we push the empty + ## string, so the Project Creator will generate + ## the default project file. + if (!defined $$pjf[0]) { + push(@$pjf, ""); + } + } +} + + +sub generate_defaults { + my($self) = shift; + my($base) = $self->base_directory(); + + ## Generate default workspace name + if (!defined $self->{'workspace_name'}) { + $self->{'workspace_name'} = $base; + } + + my(@files) = $self->generate_default_file_list(); + + ## Generate default components + $self->generate_default_components(\@files); +} + + +sub get_workspace_name { + my($self) = shift; + return $self->{'workspace_name'}; +} + + +sub write_workspace { + my($self) = shift; + + ## Generate the project files + my($status, $generator) = $self->generate_project_files(); + if ($status) { + my($fh) = new FileHandle(); + my($name) = $self->workspace_file_name(); + my($dir) = dirname($name); + + if ($dir ne ".") { + mkpath($dir, 0, 0777); + } + if (open($fh, ">$name")) { + $self->pre_workspace($fh); + $self->write_comps($fh, $generator); + $self->post_workspace($fh); + close($fh); + } + else { + print STDERR "ERROR: Unable to open $name for output\n"; + $status = 0; + } + } + else { + print STDERR "ERROR: Unable to generate all of the project files\n"; + $status = 0; + } + + return $status; +} + + +sub generate_project_files { + my($self) = shift; + my($status) = 0; + my(@projects) = (); + my(%pi) = (); + my($generator) = $self->project_creator(); + my($cwd) = getcwd(); + + foreach my $file (@{$self->{'project_files'}}) { + my($dir) = dirname($file); + my($gen) = []; + my($sgen) = []; + + ## We must change to the subdirectory for + ## which this project file is intended + if (chdir($dir)) { + $status = $generator->generate(basename($file)); + + ## If any one project file fails, then stop + ## processing altogether. + if (!$status) { + return $status; + } + + ## Get the individual project information and + ## generated file name(s) + $gen = $generator->get_files_written(); + chdir($cwd); + } + my($gpi) = $generator->get_project_info(); + my($c) = 0; + foreach my $pj (@$gen) { + my($full) = ($dir ne "." ? "$dir/" : "") . $pj; + push(@projects, $full); + $pi{$full} = $$gpi[$c]; + $c++; + } + } + + $self->{'projects'} = \@projects; + $self->{'project_info'} = \%pi; + + return $status, $generator; +} + + +sub get_projects { + my($self) = shift; + return $self->{'projects'}; +} + + +sub get_project_info { + my($self) = shift; + return $self->{'project_info'}; +} + + +sub sort_dependencies { + my($self) = shift; + my($projects) = shift; + my($pjs) = shift; + my(@list) = @$projects; + my(%prepend) = (); + + foreach my $project (@list) { + $prepend{basename($project)} = dirname($project); + } + + ## Put the projects in the order specified + ## by the project dpendencies. + for(my $i = 0; $i <= $#list; $i++) { + my($project) = $list[$i]; + my($pi) = $$pjs{$project}; + my($name, $deps) = @$pi; + + if ($deps ne "") { + my($darr) = $self->create_array($deps); + my($moved) = 0; + foreach my $dep (@$darr) { + my($full) = (defined $prepend{$dep} ? "$prepend{$dep}/" : "") . $dep; + if ($project ne $full) { + ## See if the dependency is listed after this project + for(my $j = $i; $j <= $#list; $j++) { + if ($list[$j] eq $full) { + ## If so, move it in front of the current project + splice(@list, $i, 0, $full); + splice(@list, $j + 1, 1); + $moved = 1; + $j--; + } + } + } + } + if ($moved) { + $i--; + } + } + } + return @list; +} + + +# ************************************************************ +# Virtual Methods To Be Overridden +# ************************************************************ + +sub workspace_file_name { + my($self) = shift; + return ""; +} + + +sub pre_workspace { + my($self) = shift; + my($fh) = shift; +} + + +sub write_comps { + my($self) = shift; + my($fh) = shift; + my($gens) = shift; +} + + +sub post_workspace { + my($self) = shift; + my($fh) = shift; +} + + +sub project_creator { + my($self) = shift; + return undef; +} + + +1; diff --git a/bin/MakeProjectCreator/templates/bor.mpd b/bin/MakeProjectCreator/templates/bor.mpd new file mode 100644 index 00000000000..8e4194761fb --- /dev/null +++ b/bin/MakeProjectCreator/templates/bor.mpd @@ -0,0 +1,63 @@ +# Makefile for building the <%if(exename)%><%exename%> exe<%endif%><%if(sharedname)%><%sharedname%> library<%endif%> with Borland C++ Builder + +NAME = <%if(exename)%><%exename%><%endif%><%if(sharedname)%><%sharedname%><%endif%> + +<%if(idl_files)%> +TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe<%if(idlflags)%> <%idlflags%><%endif%> +<%endif%> + +<%if(source_files)%> +OBJFILES = \ +<%foreach(source_files)%> + $(OBJDIR)\<%noextension(source_file)%>.obj<%fornotlast(" \\")%> +<%endfor%> +<%endif%> + +<%if(libs)%> +LIBFILES = \ +<%foreach(libs)%> + $(CORE_BINDIR)\<%lib%>.lib<%fornotlast(" \\")%> +<%endfor%> +<%endif%> + +<%if(idl_files)%> +IDLFILES = \ +<%foreach(idl_files)%> + $(IDLDIR)\<%noextension(idl_file)%>.idl<%fornotlast(" \\")%> +<%endfor%> +<%endif%> + +<%if(resource_files)%> +RESOURCE =<%foreach(resource_files)%> $(OBJDIR)\<%noextension(resource_file)%>.res<%endfor%> +<%endif%> + +CFLAGS =<%foreach(includes)%> -I<%include%><%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%> -D<%dllflag%>=1<%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%> -D<%libflag%>=1<%endfor%><%endif%> +CPPDIR = . +INCDIR_NAME = . +IDLDIR = . + +<%if(header_files)%> +INCLUDES = \ +<%foreach(header_files template_files)%> + <%header_file%><%fornotlast(" \\")%> +<%endfor%> + +<%endif%> +<%if(exename)%> +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> +<%endif%> +<%if(sharedname)%> +!include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor> +<%endif%> + +<%if(libs)%> +# +# IDL Build rules +# + +<%foreach(idl_files)%> +$(IDLDIR)\<%noextension(idl_file)%>S.cpp $(IDLDIR)\<%noextension(idl_file)%>C.cpp: $(IDLDIR)\<%noextension(idl_file)%>.idl + $(TAO_IDL) $** + +<%endfor%> +<%endif%> diff --git a/bin/MakeProjectCreator/templates/bordll.mpt b/bin/MakeProjectCreator/templates/bordll.mpt new file mode 100644 index 00000000000..2003fd023fa --- /dev/null +++ b/bin/MakeProjectCreator/templates/bordll.mpt @@ -0,0 +1,3 @@ +type_is_binary = 1 +type_is_dynamic = 1 +common_defines = WIN32 diff --git a/bin/MakeProjectCreator/templates/borexe.mpt b/bin/MakeProjectCreator/templates/borexe.mpt new file mode 100644 index 00000000000..bdeff91fc31 --- /dev/null +++ b/bin/MakeProjectCreator/templates/borexe.mpt @@ -0,0 +1,2 @@ +type_is_binary = 1 +common_defines = WIN32 diff --git a/bin/MakeProjectCreator/templates/ghs.mpd b/bin/MakeProjectCreator/templates/ghs.mpd new file mode 100644 index 00000000000..fbfb6a0a870 --- /dev/null +++ b/bin/MakeProjectCreator/templates/ghs.mpd @@ -0,0 +1,16 @@ +#!build +default: +<%if(exename)%> + program +<%endif%> +<%if(sharedname)%> + library + :cx_pch_option=automatic + :outputname=<%libout%>\<%sharedname%>.lib + :object_dir=obj + :cx_pch_dir=pch +<%endif%> +<%foreach(source_files)%> +..\<%source_file%> + C++ +<%endfor%> diff --git a/bin/MakeProjectCreator/templates/gnu.mpd b/bin/MakeProjectCreator/templates/gnu.mpd new file mode 100644 index 00000000000..c4bd12b530d --- /dev/null +++ b/bin/MakeProjectCreator/templates/gnu.mpd @@ -0,0 +1,118 @@ +#---------------------------------------------------------------------------- +# GNU Makefile +#---------------------------------------------------------------------------- + +MAKEFILE = <%project_file%> +DEPENDENCY_FILE = .depend.<%project_file%> +<%if(exename)%> +BIN = <%exename%> +<%endif%> +<%if(staticname)%> +LIB = lib<%staticname%>.a +<%endif%> +<%if(sharedname)%> +SHLIB = lib<%sharedname%>.$(SOEXT) +<%endif%> +<%if(tao)%> + +ifndef TAO_ROOT + TAO_ROOT = $(ACE_ROOT)/TAO +endif +<%endif%> +<%if(idl_files)%> + +IDL_FILES =<%foreach(idl_files)%> <%noextension(idl_file)%><%endfor%> +IDL_SRC = $(foreach ext, C.cpp S.cpp, $(foreach file, $(IDL_FILES), $(file)$(ext))) +<%endif%> + +<%gnu_source_files%> + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +<%if(tao)%> +include $(TAO_ROOT)/rules.tao.GNU +<%endif%> + +<%if(exename)%> +OBJS = $(addsuffix .o, $(notdir $(FILES))) +SRC = $(addsuffix .cpp,$(FILES)) +<%endif%> +<%if(sharedname)%> +LSRC = $(addsuffix .cpp,$(FILES)) +<%endif%> +ACELIB =<%foreach(defaultlibs)%> -l<%defaultlib%><%endfor%> + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +<%if(install)%> + +INSTALL_CHECK = <%install%> +ifeq ($(INSTALL_CHECK),) + INSTALL = $(INSTALL_CHECK) +else +<%if(exename)%> + INSBIN = $(INSTALL_CHECK) + INSTALL = $(VBIN:%=$(INSBIN)/%$(EXEEXT)) +<%endif%> +<%if(sharedname)%> + INSLIB = $(INSTALL_CHECK) +<%endif%> +endif +<%endif%> +<%if(sharedname)%> +include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU +<%endif%> +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +<%if(tao)%> +include $(TAO_ROOT)/taoconfig.mk +<%endif%> + +<%if(includes)%> +CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%> +<%endif%> +<%if(idlpreprocessor)%> +ifeq ($(TAO_IDL_PREPROCESSOR),) + CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(strip $(CXX))\" +else + CPPFLAGS += -DTAO_IDL_PREPROCESSOR=\"$(subst \,\,$(TAO_IDL_PREPROCESSOR))\" +endif +<%endif%> +<%if(libpaths)%> +LDFLAGS +=<%foreach(libpaths)%> -L<%libpath%><%endfor%> +<%endif%> +<%if(idlflags)%> +TAO_IDLFLAGS += <%idlflags%> +<%endif%> +<%if(libs)%> + +<%if(exename)%>LDLIBS<%endif%><%if(sharedname)%>ACE_SHLIBS<%endif%> =<%foreach(libs)%> -l<%lib%><%endfor%> +<%endif%> + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +<%if(idl_files)%> + +.PRECIOUS: $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) +<%endif%> +<%if(exename)%> + +$(BIN): $(addprefix $(VDIR), $(OBJS)) + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +<%endif%> +<%if(idl_files)%> + +realclean: clean + -$(RM) $(foreach ext, $(IDL_EXT), $(foreach file, $(IDL_FILES), $(file)$(ext))) +<%endif%> + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/bin/MakeProjectCreator/templates/nmake.mpd b/bin/MakeProjectCreator/templates/nmake.mpd new file mode 100644 index 00000000000..953055dfad9 --- /dev/null +++ b/bin/MakeProjectCreator/templates/nmake.mpd @@ -0,0 +1,202 @@ +# Microsoft Developer Studio Generated NMAKE File +!IF "$(CFG)" == "" +CFG=<%default_platform("Win32")%> <%default_configuration("Debug")%> +!MESSAGE No configuration specified. Defaulting to <%platform("Win32")%> <%default_configuration%>. +!ENDIF + +!IF <%foreach(configurations)%>"$(CFG)" != "<%platform%> <%configuration%>"<%fornotlast(" && ")%><%endfor%> +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "<%project_file%>" CFG="<%platform%> <%default_configuration%>" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +<%foreach(configurations)%> +!MESSAGE "<%platform%> <%configuration%>" (based on "<%platform_long("Win32 (x86)")%> <%type_description("Dynamic-Lynk Library")%>") +<%endfor%> +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +<%foreach(configurations)%> +!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>" + +<%if(exename)%> +OUTDIR=<%output_dir(".")%> +<%if(install)%> +INSTALLDIR=<%install%> +<%else%> +INSTALLDIR=$(OUTDIR) +<%endif%> +<%endif%> +<%if(type_is_static)%> +OUTDIR=<%output_dir(".")%> +<%endif%> +<%if(type_is_dynamic)%> +OUTDIR=<%libout%> +<%endif%> +INTDIR=<%intermediate_dir(".")%> + +ALL : "<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>" + + +CLEAN : + -@erase "$(INTDIR)\*.obj" + -@erase "$(INTDIR)\*.res" + -@erase "$(INTDIR)\*.pch" + -@erase "$(INTDIR)\*.idb" + -@erase "$(OUTDIR)\*.exp" + -@erase "$(OUTDIR)\*.lib" + -@erase "$(OUTDIR)\*.ilk" +<%if(pdb)%> +<%if(exename)%> + -@erase "$(INSTALLDIR)\<%exename%>.pdb" +<%endif%> +<%if(type_is_dynamic)%> + -@erase "$(OUTDIR)\<%sharedname%><%lib_modifier%>.pdb" +<%endif%> +<%if(type_is_static)%> + -@erase "$(OUTDIR)\<%staticname%><%lib_modifier%>.pdb" +<%endif%> +<%endif%> + -@erase "<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>" + +<%if(type_is_dynamic)%> +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +<%endif%> +"$(INTDIR)" : + if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo <%compile_flags("/MD /W3 /GX /O2 /Ob2")%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%>=1 <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" <%endif%>/Fo"<%fo_flag("$(INTDIR)\\\\")%>" /Fd"<%fd_flag("$(INTDIR)\\\\")%>" /FD /c + +.c{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(INTDIR)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +<%foreach(resource_files)%> +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\<%basenoextension(resource_file)%>.res"<%foreach(defines)%> /d <%define%>=1<%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> +<%endfor%> +BSC32=bscmake.exe +<%if(sharedname)%> +BSC32_FLAGS=/nologo <%if(type_is_dynamic)%>/o"$(OUTDIR)\<%sharedname%>.bsc"<%endif%> +<%endif%> +BSC32_SBRS= \ + +<%if(type_is_binary)%> +LINK32=link.exe +LINK32_FLAGS=<%systemlibs("advapi32.lib user32.lib")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> <%if(pdb)%>/pdb:"<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.pdb<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.pdb<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.pdb<%endif%>" <%endif%>/machine:<%machine("I386")%> /out:"<%if(sharedname)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>"<%if(sharedname)%> /implib:"$(OUTDIR)\<%sharedname%><%lib_modifier%>.lib"<%endif%> +<%endif%> +<%if(type_is_static)%> +LINK32=link.exe -lib +LINK32_FLAGS=/nologo /machine:<%machine("I386")%> /out:"<%libout%>\<%staticname%><%lib_modifier%>.lib" +<%endif%> +LINK32_OBJS= \ +<%foreach(resource_files)%> + "$(INTDIR)\<%basenoextension(resource_file)%>.res" \ +<%endfor%> +<%if(pch_source)%> + "$(INTDIR)\<%basenoextension(pch_source)%>.obj" \ +<%endif%> +<%foreach(source_files)%> + "$(INTDIR)\<%basenoextension(source_file)%>.obj"<%fornotlast(" \\")%> +<%endfor%> + +"<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(type_is_static)%>$(OUTDIR)\<%staticname%><%lib_modifier%>.lib<%endif%><%if(exename)%>$(INSTALLDIR)\<%exename%>.exe<%endif%>" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +<%endfor%> +!ENDIF + + +!IF "$(NO_EXTERNAL_DEPS)" != "1" +!IF EXISTS("<%dependency_file("project.dep")%>") +!INCLUDE "<%dependency_file%>" +!ELSE +!MESSAGE Warning: cannot find "<%dependency_file%>" +!ENDIF +!ENDIF + + +!IF <%foreach(configurations)%>"$(CFG)" == "<%platform%> <%configuration%>" <%fornotlast("|| ")%><%endfor%> +<%if(pch_source)%> +<%if(pch_header)%> +SOURCE=.\<%pch_source%> + +<%foreach(configurations)%> +!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%platform%> <%configuration%>" + +CPP_SWITCHES=/nologo <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%>=1 <%endfor%>/Fp"$(INTDIR)\<%noextension(pch_header)%>.pch" /Yc"<%pch_header%>" <%endif%>/Fo"<%fo_flag%>" /Fd"<%fd_flag%>" /FD /c + +"$(INTDIR)\<%basenoextension(pch_source)%>.obj" "$(INTDIR)\<%noextension(pch_header)%>.pch" : $(SOURCE) "$(INTDIR)" + $(CPP) @<< + $(CPP_SWITCHES) $(SOURCE) +<< + +<%endfor%> +!ENDIF + +<%endif%> +<%endif%> +<%foreach(source_files)%> +SOURCE=.\<%source_file%> + +"$(INTDIR)\<%basenoextension(source_file)%>.obj" : $(SOURCE) "$(INTDIR)"<%if(pch_header)%> "$(INTDIR)\<%noextension(pch_header)%>.pch"<%endif%> +<%if(basename_found)%> + $(CPP) $(CPP_PROJ) $(SOURCE) +<%endif%> + +<%endfor%> +<%foreach(template_files)%> +SOURCE=.\<%template_file%> +<%endfor%> +<%foreach(resource_files)%> +SOURCE=.\<%resource_file%> + +"$(INTDIR)\<%basenoextension(resource_file)%>.res" : $(SOURCE) "$(INTDIR)" + $(RSC) $(RSC_PROJ) $(SOURCE) + + +<%endfor%> + +!ENDIF + diff --git a/bin/MakeProjectCreator/templates/nmakedll.mpt b/bin/MakeProjectCreator/templates/nmakedll.mpt new file mode 100644 index 00000000000..3b99b378a92 --- /dev/null +++ b/bin/MakeProjectCreator/templates/nmakedll.mpt @@ -0,0 +1,60 @@ +configurations = Release Debug "Static Release" "Static Debug" +common_defines = WIN32 _WINDOWS +pch_defines = ACE_USING_PCH + +Release { + type_code = 0x0102 + use_debug_libraries = 0 + compile_flags = /W3 /GX /O2 /MD /Zi /Ob2 + defines = NDEBUG + compile_flags_removed = /YX + output_dir = Release + intermediate_dir = Release + debug_switch = + type_is_dynamic = 1 + type_is_binary = 1 +} + +Debug { + type_code = 0x0102 + use_debug_libraries = 1 + compile_flags = /W3 /Gm /GX /Zi /Od /MDd /Gy + defines = _DEBUG + compile_flags_removed = /Fr /YX + intermediate_dir = Debug + lib_modifier = d + type_is_dynamic = 1 + type_is_binary = 1 + pdb = 1 +} + +Static Release { + type_description = "Static Library" + type_code = 0x0104 + use_debug_libraries = 0 + compile_flags = /G5 /W3 /GX /O2 /MD /Zi + defines = NDEBUG + compile_flags_removed = /YX + output_dir = Static_Release + intermediate_dir = Static_Release + lib_modifier = s + debug_switch = + type_is_static = 1 + need_libflags = 1 +} + +Static Debug { + type_description = "Static Library" + type_code = 0x0104 + use_debug_libraries = 1 + compile_flags = /G5 /W3 /Gm /GX /Zi /Od /Gy /MDd + defines = _DEBUG + compile_flags_removed = /Fr /YX + output_dir = Static_Debug + intermediate_dir = Static_Debug + lib_modifier = sd + type_is_static = 1 + need_libflags = 1 + pdb = 1 +} + diff --git a/bin/MakeProjectCreator/templates/nmakeexe.mpt b/bin/MakeProjectCreator/templates/nmakeexe.mpt new file mode 100644 index 00000000000..70bda1c8e62 --- /dev/null +++ b/bin/MakeProjectCreator/templates/nmakeexe.mpt @@ -0,0 +1,52 @@ +type_description = "Console Application" +type_code = 0x0103 +configurations = Release Debug "Static Release" "Static Debug" +type_is_binary = 1 +common_defines = WIN32 _CONSOLE +subsystem = console +pch_defines = ACE_USING_PCH + +Release { + use_debug_libraries = 0 + compile_flags = /W3 /GX /O2 /MD + defines = NDEBUG + compile_flags_removed = /YX + output_dir = Release + intermediate_dir = Release + debug_switch = +} + +Debug { + use_debug_libraries = 1 + compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy + defines = _DEBUG + compile_flags_removed = /YX + intermediate_dir = Debug + lib_modifier = d + pdb = 1 + +} + +Static Release { + use_debug_libraries = 0 + compile_flags = /W3 /GX /O2 /MD + defines = NDEBUG + compile_flags_removed = /YX + lib_modifier = s + need_libflags = 1 + output_dir = Static_Release + intermediate_dir = Static_Release + debug_switch = +} + +Static Debug { + use_debug_libraries = 1 + compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy + defines = _DEBUG + compile_flags_removed = /YX + lib_modifier = sd + need_libflags = 1 + output_dir = Static_Debug + intermediate_dir = Static_Debug + pdb = 1 +} diff --git a/bin/MakeProjectCreator/templates/vc6dsp.mpd b/bin/MakeProjectCreator/templates/vc6dsp.mpd new file mode 100644 index 00000000000..e3ce43270d1 --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc6dsp.mpd @@ -0,0 +1,218 @@ +# Microsoft Developer Studio Project File - Name="<%project_name%>" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "<%platform_long("Win32 (x86)")%> <%type_description("Dynamic-Link Library")%>" <%type_code("0x0102")%> + +CFG=<%project_name%> - <%platform("Win32")%> <%default_configuration("Debug")%> +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE run the tool that generated this project file and specify the +!MESSAGE nmake output type. You can then use the following command: +!MESSAGE +!MESSAGE NMAKE /f "<%make_file_name%>". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "<%make_file_name%>" CFG="<%project_name%> - <%platform%> <%default_configuration%>" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +<%foreach(configurations)%> +!MESSAGE "<%project_name%> - <%platform%> <%configuration%>" (based on "<%platform_long%> <%type_description%>") +<%endfor%> +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +<%foreach(configurations)%> +!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>" + +# PROP Use_MFC <%use_mfc("0")%> +# PROP Use_Debug_Libraries <%use_debug_libraries("1")%> +<%if(exename)%> +# PROP Output_Dir "<%output_dir%>" +<%endif%> +<%if(type_is_static)%> +# PROP Output_Dir "<%output_dir%>" +<%endif%> +<%if(type_is_dynamic)%> +# PROP Output_Dir "<%libout%>" +<%endif%> +# PROP Intermediate_Dir "<%intermediate_dir%>" +<%if(type_is_dynamic)%> +# PROP Ignore_Export_Lib 0 +<%endif%> +# PROP Target_Dir "" +<%if(type_is_static)%> +LINK32=link.exe -lib +<%endif%> +# ADD CPP /nologo <%compile_flags%> <%foreach(includes)%>/I "<%include%>" <%endfor%><%foreach(defines common_defines)%>/D <%define%>=1 <%endfor%><%if(type_is_dynamic)%><%foreach(dllflags)%>/D <%dllflag%>=1 <%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%>/D <%libflag%>=1 <%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%>/D <%pch_define%> <%endfor%><%if(pch_source)%>/Yu<%else%>/YX<%endif%>"<%pch_header%>" /Fp"<%intermediate_dir%>\<%noextension(pch_header)%>.pch" <%endif%>/FD /c +<%if(compile_flags_removed)%> +# SUBTRACT CPP <%compile_flags_removed%> +<%endif%> +# ADD RSC /l 0x409<%foreach(defines)%> /d <%define%>=1<%endfor%><%foreach(includes)%> /i "<%include%>"<%endfor%> +BSC32=bscmake.exe +# ADD BSC32 /nologo <%if(sharedname)%>/o"<%libout%>\<%sharedname%>.bsc"<%endif%> +<%if(type_is_binary)%> +LINK32=link.exe +# ADD LINK32 <%systemlibs("advapi32.lib user32.lib")%> /INCREMENTAL:<%incremental("NO")%> <%foreach(libs defaultlibs)%><%lib%><%lib_modifier%>.lib <%endfor%><%foreach(libpaths)%>/libpath:"<%libpath%>" <%endfor%>/nologo /version:<%version("1.0")%> /subsystem:<%subsystem("windows")%><%if(type_is_dynamic)%> /dll<%endif%> <%debug_switch("/debug")%> <%if(pdb)%><%if(sharedname)%>/pdb:<%sharedname%><%lib_modifier%>.pdb <%endif%><%endif%>/machine:<%machine("I386")%> /out:"<%if(sharedname)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%>\<%endif%><%exename%>.exe<%endif%>" +<%if(link_flags_removed)%> +# SUBTRACT LINK32 <%link_flags_removed%> +<%endif%> +<%endif%> +<%if(type_is_static)%> +LIB32=link.exe -lib +# ADD LIB32 /nologo /out:"<%libout%>\<%staticname%><%lib_modifier%>.lib" +<%endif%> + +<%endfor%> +!ENDIF + +# Begin Target + +<%foreach(configurations)%> +# Name "<%project_name%> - <%platform%> <%configuration%>" +<%endfor%> +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;cxx;c" +<%if(pch_source)%> +<%if(pch_header)%> +# Begin Source File + +SOURCE=.\<%pch_source%> +# ADD CPP /Yc"<%pch_header%>" +# End Source File +<%endif%> +<%endif%> +<%foreach(source_files)%> +# Begin Source File + +SOURCE=.\<%source_file%> +# End Source File +<%endfor%> +# End Group +<%if(header_files)%> +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hh" +<%foreach(header_files)%> +# Begin Source File + +SOURCE=.\<%header_file%> +# End Source File +<%endfor%> +# End Group +<%endif%> +<%if(inline_files)%> +# Begin Group "Inline Files" + +# PROP Default_Filter "i;inl" +<%foreach(inline_files)%> +# Begin Source File + +SOURCE=.\<%inline_file%> +# End Source File +<%endfor%> +# End Group +<%endif%> +<%if(template_files)%> +# Begin Group "Template Files" + +# PROP Default_Filter "" +<%foreach(template_files)%> +# Begin Source File + +SOURCE=.\<%template_file%> +# PROP Exclude_From_Build 1 +# End Source File +<%endfor%> +# End Group +<%endif%> +<%if(documentation_files)%> +# Begin Group "Documentation" + +# PROP Default_Filter "" +<%foreach(documentation_files)%> +# Begin Source File + +SOURCE=.\<%documentation_file%> +# End Source File +<%endfor%> +# End Group +<%endif%> +<%if(resource_files)%> +# Begin Group "Resource Files" + +# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" +<%foreach(resource_files)%> +# Begin Source File + +SOURCE=.\<%resource_file%> +# End Source File +<%endfor%> +# End Group +<%endif%> +<%if(idl_files)%> +# Begin Group "IDL Files" + +# PROP Default_Filter "idl" +<%foreach(idl_files)%> +# Begin Source File + +SOURCE=.\<%idl_file%> + +<%foreach(configurations)%> +!<%fornotfirst("ELSE")%>IF "$(CFG)" == "<%project_name%> - <%platform%> <%configuration%>" + +# PROP Ignore_Default_Tool 1 +# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath) +InputPath=.\<%idl_file%> +InputName=<%noextension(idl_file)%> + +BuildCmds= \ + <%tao_idl_exe("$(ACE_ROOT)\\bin\\tao_idl")%> <%idlflags("-Sc")%> $(InputPath) + +"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +<%endfor%> +!ENDIF + +# End Source File +<%endfor%> +# End Group +<%endif%> +# End Target +# End Project diff --git a/bin/MakeProjectCreator/templates/vc6dspdll.mpt b/bin/MakeProjectCreator/templates/vc6dspdll.mpt new file mode 100644 index 00000000000..3c7cb28e835 --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc6dspdll.mpt @@ -0,0 +1,26 @@ +configurations = Release Debug +type_is_binary = 1 +type_is_dynamic = 1 +common_defines = WIN32 _WINDOWS +pch_defines = ACE_USING_PCH + +Release { + use_debug_libraries = 0 + compile_flags = /W3 /GX /O2 /MD /Zi /Ob2 + defines = NDEBUG + compile_flags_removed = /YX + output_dir = Release + intermediate_dir = Release + debug_switch = +} + +Debug { + use_debug_libraries = 1 + compile_flags = /W3 /Gm /GX /Zi /Od /MDd /Gy + defines = _DEBUG + compile_flags_removed = /Fr /YX + intermediate_dir = Debug + lib_modifier = d + pdb = 1 +} + diff --git a/bin/MakeProjectCreator/templates/vc6dspexe.mpt b/bin/MakeProjectCreator/templates/vc6dspexe.mpt new file mode 100644 index 00000000000..d1da403c1ba --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc6dspexe.mpt @@ -0,0 +1,49 @@ +type_description = "Console Application" +type_code = 0x0103 +configurations = Release Debug "Static Release" "Static Debug" +type_is_binary = 1 +common_defines = WIN32 _CONSOLE +subsystem = console +pch_defines = ACE_USING_PCH + +Release { + use_debug_libraries = 0 + compile_flags = /W3 /GX /O2 /MD + defines = NDEBUG + compile_flags_removed = /YX + output_dir = Release + intermediate_dir = Release + debug_switch = +} + +Debug { + use_debug_libraries = 1 + compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy + defines = _DEBUG + compile_flags_removed = /YX + intermediate_dir = Debug + lib_modifier = d +} + +Static Release { + use_debug_libraries = 0 + compile_flags = /W3 /GX /O2 /MD + defines = NDEBUG + compile_flags_removed = /YX + lib_modifier = s + need_libflags = 1 + output_dir = Static_Release + intermediate_dir = Static_Release + debug_switch = +} + +Static Debug { + use_debug_libraries = 1 + compile_flags = /W3 /Gm /GX /Zi /Od /MDd /GR /Gy + defines = _DEBUG + compile_flags_removed = /YX + lib_modifier = sd + need_libflags = 1 + output_dir = Static_Debug + intermediate_dir = Static_Debug +} diff --git a/bin/MakeProjectCreator/templates/vc6dsplib.mpt b/bin/MakeProjectCreator/templates/vc6dsplib.mpt new file mode 100644 index 00000000000..dd525bbe2a0 --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc6dsplib.mpt @@ -0,0 +1,31 @@ +type_description = "Static Library" +type_code = 0x0104 +configurations = "Static Release" "Static Debug" +default_configuration = "Static Debug" +common_defines = WIN32 _WINDOWS +type_is_static = 1 +need_libflags = 1 +pch_defines = ACE_USING_PCH + +Static Release { + use_debug_libraries = 0 + compile_flags = /G5 /W3 /GX /O2 /MD /Zi + defines = NDEBUG + compile_flags_removed = /YX + output_dir = Static_Release + intermediate_dir = Static_Release + lib_modifier = s + debug_switch = +} + +Static Debug { + use_debug_libraries = 1 + compile_flags = /G5 /W3 /Gm /GX /Zi /Od /Gy /MDd + defines = _DEBUG + compile_flags_removed = /Fr /YX + output_dir = Static_Debug + intermediate_dir = Static_Debug + lib_modifier = sd + pdb = 1 +} + diff --git a/bin/MakeProjectCreator/templates/vc7.mpd b/bin/MakeProjectCreator/templates/vc7.mpd new file mode 100644 index 00000000000..1ac1a3ac961 --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc7.mpd @@ -0,0 +1,195 @@ +" encoding = "<%encoding("Windows-1252")%>"?> + + + "/> + + +<%foreach(configurations)%> + " + UseOfMFC="<%use_mfc("0")%>" + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + + Optimization="<%optimization%>" +<%endif%> + InlineFunctionExpansion="<%inline("1")%>" + AdditionalIncludeDirectories="<%foreach(includes)%><%include%><%fornotlast(",")%><%endfor%>" + PreprocessorDefinitions="<%if(type_is_dynamic)%><%foreach(dllflags)%><%dllflag%>;<%endfor%><%endif%><%if(need_libflags)%><%foreach(libflags)%><%libflag%>;<%endfor%><%endif%><%if(pch_header)%><%foreach(pch_defines)%><%pch_define%>;<%endfor%><%endif%><%foreach(defines common_defines)%><%define%><%fornotlast(";")%><%endfor%>" + StringPooling="<%string_pooling("TRUE")%>" + RuntimeLibrary="<%runtime_library%>" + EnableFunctionLevelLinking="TRUE" + RuntimeTypeInfo="<%rtti("TRUE")%>" +<%if(pch_header)%> + UsePrecompiledHeader="3" + PrecompiledHeaderThrough="<%pch_header%>" + PrecompiledHeaderFile="<%intermediate_dir%>\<%noextension(pch_header)%>.pch" +<%endif%> + AssemblerListingLocation="<%intermediate_dir%>" + ObjectFile="<%intermediate_dir%>" +<%if(pdb)%> + ProgramDatabaseFile="<%if(type_is_dynamic)%><%dllout%>\<%sharedname%><%lib_modifier%>.pdb<%endif%><%if(exename)%><%if(install)%><%install%><%else%><%output_dir%><%endif%>\<%exename%>.pdb<%endif%><%if(type_is_static)%><%output_dir%>\<%sharedname%><%lib_modifier%>.lib<%endif%>" +<%endif%> + WarningLevel="<%warning_level("3")%>" + SuppressStartupBanner="TRUE" + DebugInformationFormat="<%debug_format("3")%>" + CompileAs="0"/> + " + OutputFile="<%if(sharedname)%><%dllout%>\<%sharedname%><%lib_modifier%>.dll<%endif%><%if(exename)%><%if(install)%><%install%>\<%endif%><%exename%>.exe<%endif%><%if(type_is_static)%><%libout%>\<%staticname%><%lib_modifier%>.lib<%endif%>" + Version="<%version("1.0")%>" + LinkIncremental="<%incremental("0")%>" + SuppressStartupBanner="TRUE" + AdditionalLibraryDirectories="<%foreach(libpaths)%><%libpath%><%fornotlast(";")%><%endfor%>" +<%if(debug)%> + GenerateDebugInformation="TRUE" +<%endif%> + SubSystem="<%subsystem("2")%>" +<%if(type_is_dynamic)%> + ImportLibrary="<%sharedname%><%lib_modifier%>.lib" +<%endif%> + /> + + + + <%endfor%>" + Culture="<%culture("1033")%>"/> + +<%endfor%> + + +<%if(source_files)%> + +<%if(pch_source)%> + +<%foreach(configurations)%> + + + + +<%endif%> +<%foreach(source_files)%> + + +<%endfor%> + +<%endif%> +<%if(header_files)%> + +<%if(pch_header)%> + + +<%endif%> +<%foreach(header_files)%> + + +<%endfor%> + +<%endif%> +<%if(idl_files)%> + +<%foreach(idl_files)%> + +<%foreach(configurations)%> + + <%idlflags("-Sc")%> <%idl_file%>" + Outputs="<%noextension(idl_file)%>C.h;<%noextension(idl_file)%>C.i;<%noextension(idl_file)%>C.cpp;<%noextension(idl_file)%>S.h;<%noextension(idl_file)%>S.i;<%noextension(idl_file)%>S.cpp;<%noextension(idl_file)%>S_T.h;<%noextension(idl_file)%>S_T.i;<%noextension(idl_file)%>S_T.cpp" + +<%endfor%> + +<%endfor%> + +<%endif%> +<%if(inline_files)%> + +<%foreach(inline_files)%> + + +<%endfor%> + +<%endif%> +<%if(template_files)%> + +<%foreach(template_files)%> + +<%foreach(configurations)%> + + + +<%endfor%> + +<%endfor%> + +<%endif%> +<%if(documentation_files)%> + +<%foreach(documentation_files)%> + + +<%endfor%> + +<%endif%> +<%if(resource_files)%> + +<%foreach(resource_files)%> + + +<%endfor%> + +<%endif%> + + + + diff --git a/bin/MakeProjectCreator/templates/vc7dll.mpt b/bin/MakeProjectCreator/templates/vc7dll.mpt new file mode 100644 index 00000000000..df8569044ec --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc7dll.mpt @@ -0,0 +1,45 @@ +configurations = Release Debug "Static Release" "Static Debug" +common_defines = WIN32 _WINDOWS +pdb = 1 +pch_defines = ACE_USING_PCH + +Release { + type_is_dynamic = 1 + defines = NDEBUG + output_dir = Release + intermediate_dir = Release + runtime_library = 2 +} + +Debug { + type_is_dynamic = 1 + optimization = 0 + debug = 1 + defines = _DEBUG + intermediate_dir = Debug + lib_modifier = d + runtime_library = 3 +} + +Static Release { + type_is_static = 1 + defines = NDEBUG + output_dir = Static_Release + intermediate_dir = Static_Release + lib_modifier = s + need_libflags = 1 + runtime_library = 2 +} + +Static Debug { + type_is_static = 1 + optimization = 0 + debug = 1 + defines = _DEBUG + output_dir = Static_Debug + intermediate_dir = Static_Debug + lib_modifier = sd + need_libflags = 1 + runtime_library = 3 +} + diff --git a/bin/MakeProjectCreator/templates/vc7exe.mpt b/bin/MakeProjectCreator/templates/vc7exe.mpt new file mode 100644 index 00000000000..db6548c369a --- /dev/null +++ b/bin/MakeProjectCreator/templates/vc7exe.mpt @@ -0,0 +1,44 @@ +configurations = Release Debug "Static Release" "Static Debug" +type_is_binary = 1 +common_defines = WIN32 _CONSOLE +pch_defines = ACE_USING_PCH +configuration_type = 1 +subsystem = 1 +pdb = 1 + +Release { + defines = NDEBUG + output_dir = Release + intermediate_dir = Release + runtime_library = 2 +} + +Debug { + optimization = 0 + debug = 1 + defines = _DEBUG + intermediate_dir = Debug + lib_modifier = d + runtime_library = 3 +} + +Static Release { + defines = NDEBUG + output_dir = Static_Release + intermediate_dir = Static_Release + lib_modifier = s + need_libflags = 1 + runtime_library = 2 +} + +Static Debug { + optimization = 0 + debug = 1 + defines = _DEBUG + output_dir = Static_Debug + intermediate_dir = Static_Debug + lib_modifier = sd + need_libflags = 1 + runtime_library = 3 +} + diff --git a/bin/mpc.pl b/bin/mpc.pl new file mode 100755 index 00000000000..0b470ed324c --- /dev/null +++ b/bin/mpc.pl @@ -0,0 +1,95 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# ****************************************************************** +# Author: Chad Elliott +# Date: 6/17/2002 +# $Id$ +# ****************************************************************** + +# ****************************************************************** +# Pragma Section +# ****************************************************************** + +use strict; +use Cwd; +use File::Basename; + +my($basePath) = getExecutePath($0) . "/MakeProjectCreator"; +unshift(@INC, $basePath . "/modules"); + +require Driver; + +# ************************************************************ +# Data Section +# ************************************************************ + +my(@creators) = ('GNUProjectCreator', + 'NMakeProjectCreator', + 'VC6ProjectCreator', + 'VC7ProjectCreator', + 'BorlandProjectCreator', + 'GHSProjectCreator', + ); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub which { + my($prog) = shift; + my($exec) = "$prog"; + my($part) = ""; + my($isWin) = ($^O eq "MSWin32"); + my($envSep) = ($isWin ? ";" : ":"); + + if (defined $ENV{'PATH'}) { + foreach $part (split(/$envSep/, $ENV{'PATH'})) { + $part .= "/$prog"; + if ( -x $part ) { + $exec = $part; + last; + } + } + } + + return $exec; +} + + +sub getExecutePath { + my($prog) = shift; + my($loc) = ""; + + if ($prog ne basename($prog)) { + if ($prog =~ /^[\/\\]/ || + $prog =~ /^[A-Za-z]:[\/\\]?/) { + $loc = dirname($prog); + } + else { + $loc = getcwd() . "/" . dirname($prog); + } + } + else { + $loc = dirname(which($prog)); + } + + if ($loc eq ".") { + $loc = getcwd(); + } + + if ($loc ne "") { + $loc .= "/"; + } + + return $loc; +} + + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +my($driver) = new Driver($basePath, basename($0), @creators); +exit($driver->run(@ARGV)); diff --git a/bin/mwc.pl b/bin/mwc.pl new file mode 100755 index 00000000000..d15e4895d81 --- /dev/null +++ b/bin/mwc.pl @@ -0,0 +1,93 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# ****************************************************************** +# Author: Chad Elliott +# Date: 6/17/2002 +# $Id$ +# ****************************************************************** + +# ****************************************************************** +# Pragma Section +# ****************************************************************** + +use strict; +use Cwd; +use File::Basename; + +my($basePath) = getExecutePath($0) . "/MakeProjectCreator"; +unshift(@INC, $basePath . "/modules"); + +require Driver; + +# ************************************************************ +# Data Section +# ************************************************************ + +my(@creators) = ('GNUWorkspaceCreator', + 'VC6WorkspaceCreator', + 'VC7WorkspaceCreator', + 'NMakeWorkspaceCreator', + ); + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub which { + my($prog) = shift; + my($exec) = "$prog"; + my($part) = ""; + my($isWin) = ($^O eq "MSWin32"); + my($envSep) = ($isWin ? ";" : ":"); + + if (defined $ENV{'PATH'}) { + foreach $part (split(/$envSep/, $ENV{'PATH'})) { + $part .= "/$prog"; + if ( -x $part ) { + $exec = $part; + last; + } + } + } + + return $exec; +} + + +sub getExecutePath { + my($prog) = shift; + my($loc) = ""; + + if ($prog ne basename($prog)) { + if ($prog =~ /^[\/\\]/ || + $prog =~ /^[A-Za-z]:[\/\\]?/) { + $loc = dirname($prog); + } + else { + $loc = getcwd() . "/" . dirname($prog); + } + } + else { + $loc = dirname(which($prog)); + } + + if ($loc eq ".") { + $loc = getcwd(); + } + + if ($loc ne "") { + $loc .= "/"; + } + + return $loc; +} + + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +my($driver) = new Driver($basePath, basename($0), @creators); +exit($driver->run(@ARGV)); -- cgit v1.2.1