Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed rake build system and associated directories

  • Loading branch information...
commit 79c96aa2c1e6021f125170e216c10904d4b60e78 1 parent 9ab6f9e
@devans devans authored
Showing with 0 additions and 1,594 deletions.
  1. +0 −23 APL/rake.project.rb
  2. +0 −344 APLTestTools/APLTestTools.vcproj
  3. +0 −23 APLTestTools/rake.project.rb
  4. +0 −23 APLXML/rake.project.rb
  5. +0 −23 DNP3/rake.project.rb
  6. +0 −14 DNP3Java/rake.project.rb
  7. +0 −28 DNP3Test/rake.project.rb
  8. +0 −23 DNP3XML/rake.project.rb
  9. +0 −23 TeamCitySupport/rake.project.rb
  10. +0 −5 Terminal/rake.project.rb
  11. +0 −7 TerminalTest/rake.project.rb
  12. +0 −27 TestAPL/rake.project.rb
  13. +0 −25 TestSet/rake.project.rb
  14. +0 −72 TestSet/tmw_test.rb
  15. +0 −5 XMLBindings/rake.project.rb
  16. +0 −25 demos/slave-cpp/rake.project.rb
  17. 0  {TestSet → docs}/TestSetUserManual.docx
  18. +0 −85 rakefile.rb
  19. +0 −5 tinyxml/rake.project.rb
  20. +0 −47 tools/rake_build_system/plugins/rake.boost.rb
  21. +0 −120 tools/rake_build_system/plugins/rake.cpp.enviroment.rb
  22. +0 −389 tools/rake_build_system/plugins/rake.cpp.rb
  23. +0 −35 tools/rake_build_system/plugins/rake.crosstest.rb
  24. +0 −60 tools/rake_build_system/plugins/rake.source.rb
  25. +0 −83 tools/rake_build_system/plugins/rake.swigjava.rb
  26. +0 −80 tools/rake_build_system/rake.environment.rb
View
23 APL/rake.project.rb
@@ -1,23 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'libapl.a',
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-}
View
344 APLTestTools/APLTestTools.vcproj
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="APLTestTools"
- ProjectGUID="{41D4B22B-F06E-4230-9AA8-3BFF096CC710}"
- RootNamespace="PSITestTools"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="4"
- InheritedPropertySheets="..\config\boost_includes.vsprops;..\config\local_dir.vsprops;..\config\output_dirs.vsprops;..\config\common_boost_defines.vsprops;..\config\disable_specific_warnings.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;_LIB;_DEBUG"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="4"
- InheritedPropertySheets="..\config\boost_includes.vsprops;..\config\local_dir.vsprops;..\config\output_dirs.vsprops;..\config\common_boost_defines.vsprops;..\config\disable_specific_warnings.vsprops"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="WIN32;_LIB;"
- RuntimeLibrary="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\TestHelpers.h"
- >
- </File>
- <Filter
- Name="AsyncProtocol"
- >
- <File
- RelativePath=".\BufferHelpers.cpp"
- >
- </File>
- <File
- RelativePath=".\BufferHelpers.h"
- >
- </File>
- <File
- RelativePath=".\BufferTestObject.cpp"
- >
- </File>
- <File
- RelativePath=".\BufferTestObject.h"
- >
- </File>
- <File
- RelativePath=".\MockLowerLayer.cpp"
- >
- </File>
- <File
- RelativePath=".\MockLowerLayer.h"
- >
- </File>
- <File
- RelativePath=".\MockUpperLayer.cpp"
- >
- </File>
- <File
- RelativePath=".\MockUpperLayer.h"
- >
- </File>
- </Filter>
- <Filter
- Name="PhysicalLayer"
- >
- <File
- RelativePath=".\AsyncPhysTestObject.cpp"
- >
- </File>
- <File
- RelativePath=".\AsyncPhysTestObject.h"
- >
- </File>
- <File
- RelativePath=".\AsyncTestObjectASIO.cpp"
- >
- </File>
- <File
- RelativePath=".\AsyncTestObjectASIO.h"
- >
- </File>
- <File
- RelativePath=".\LoopbackPhysicalLayerAsync.cpp"
- >
- </File>
- <File
- RelativePath=".\LoopbackPhysicalLayerAsync.h"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerAsync.cpp"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerAsync.h"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerAsyncTS.cpp"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerAsyncTS.h"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerMonitor.cpp"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerMonitor.h"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerSource.cpp"
- >
- </File>
- <File
- RelativePath=".\MockPhysicalLayerSource.h"
- >
- </File>
- <File
- RelativePath=".\PhysicalLayerWrapper.cpp"
- >
- </File>
- <File
- RelativePath=".\PhysicalLayerWrapper.h"
- >
- </File>
- <File
- RelativePath=".\WrappedTcpPipe.cpp"
- >
- </File>
- <File
- RelativePath=".\WrappedTcpPipe.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Timers"
- >
- <File
- RelativePath=".\MockTimerSource.cpp"
- >
- </File>
- <File
- RelativePath=".\MockTimerSource.h"
- >
- </File>
- </Filter>
- <Filter
- Name="LogHelpers"
- >
- <File
- RelativePath=".\LogTester.cpp"
- >
- </File>
- <File
- RelativePath=".\LogTester.h"
- >
- </File>
- <File
- RelativePath=".\MockLogSubscriber.h"
- >
- </File>
- <File
- RelativePath=".\MockNodeSaver.h"
- >
- </File>
- </Filter>
- <Filter
- Name="DataMocks"
- >
- <File
- RelativePath=".\FanoutDataObserver.h"
- >
- </File>
- <File
- RelativePath=".\MockCommandAcceptor.h"
- >
- </File>
- <File
- RelativePath=".\MockCommandHandler.h"
- >
- </File>
- <File
- RelativePath=".\MockResponseAcceptor.cpp"
- >
- </File>
- <File
- RelativePath=".\MockResponseAcceptor.h"
- >
- </File>
- </Filter>
- <Filter
- Name="GenericTestObjects"
- >
- <File
- RelativePath=".\AsyncTestObject.cpp"
- >
- </File>
- <File
- RelativePath=".\AsyncTestObject.h"
- >
- </File>
- <File
- RelativePath=".\MockNotifier.h"
- >
- </File>
- <File
- RelativePath=".\TestTypedefs.h"
- >
- </File>
- </Filter>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
View
23 APLTestTools/rake.project.rb
@@ -1,23 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'libapltesttools.a',
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-}
View
23 APLXML/rake.project.rb
@@ -1,23 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'libpsixml.a',
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES]
-}
View
23 DNP3/rake.project.rb
@@ -1,23 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#setup the psi project
-$options = {
-:target => 'libdnp3.a',
-:includes => [Boost::get_includes_dir,DEFAULT_INCLUDES],
-}
View
14 DNP3Java/rake.project.rb
@@ -1,14 +0,0 @@
-
-$options = {
-:allowed_platforms => ['pc_cygwin', 'Linux_i686'],
-:target => 'libdnp3java.so',
-:cc_release_flags => '-O1 -fPIC', #compiling the swig binding at O2 and above was causing programs to seg fault
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-:link_options => [],
-:libs => $PLATFORM_LIBS + Boost::get_static_libs + $WINSOCK_LIBS,
-:project_libs => [:dnp3, :apl],
-:plugins => ['swigjava'], #swigjava specific options
-:java_package => 'org.totalgrid.reef.protocol.dnp3',
-:java_outdir => 'src/main/java/org/totalgrid/reef/protocol/dnp3'
-}
-
View
28 DNP3Test/rake.project.rb
@@ -1,28 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#setup the dnp3test project
-$options = {
-:target => 'dnp3test.exe',
-:project_libs => [:dnp3, :apltesttools, :apl],
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-:warn_flags => ['-Wno-sign-compare'],
-:libs => $PLATFORM_LIBS + Boost::get_static_libs
-}
-
-$options[:project_libs] << :teamcity if($USE_TEAM_CITY)
View
23 DNP3XML/rake.project.rb
@@ -1,23 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'libdnp3xml.a',
-:includes => [Boost::get_includes_dir,DEFAULT_INCLUDES]
-}
View
23 TeamCitySupport/rake.project.rb
@@ -1,23 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#setup the psi project
-$options = {
-:target => 'libteamcity.a',
-:includes => [Boost::get_includes_dir,DEFAULT_INCLUDES],
-}
View
5 Terminal/rake.project.rb
@@ -1,5 +0,0 @@
-
-$options = {
-:target => 'libterminal.a',
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES]
-}
View
7 TerminalTest/rake.project.rb
@@ -1,7 +0,0 @@
-
-$options = {
-:target => 'terminaltest.exe',
-:project_libs => [:terminal, :apltesttools, :apl],
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-:libs => Boost::get_static_libs + $PLATFORM_LIBS
-}
View
27 TestAPL/rake.project.rb
@@ -1,27 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'testapl.exe',
-:project_libs => [:xmlbindings, :tinyxml, :aplxml, :apltesttools, :apl],
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-:warn_flags => ['-Wno-sign-compare'],
-:libs => Boost::get_static_libs + $PLATFORM_LIBS
-}
-$options[:project_libs] << :teamcity if($USE_TEAM_CITY)
View
25 TestSet/rake.project.rb
@@ -1,25 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'testset.exe',
-:project_libs => [:terminal, :xmlbindings, :dnp3xml, :dnp3, :tinyxml, :aplxml, :apl],
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-:libs => Boost::get_static_libs + $PLATFORM_LIBS
-}
View
72 TestSet/tmw_test.rb
@@ -1,72 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'rexml/document'
-include REXML
-
-return -1 unless ARGV.count >= 7
-
-s_confirms = ARGV[0]
-app_conf_timeout = ARGV[1]
-unsol_allowed = ARGV[2]
-unsol_retry_period = ARGV[3]
-unsol_offline_delay = ARGV[4]
-tx_frag_size = ARGV[5]
-self_address = ARGV[6]
-
-test_msg = ARGV[7] if ARGV.count >= 8
-test_msg ||= ""
-
-#puts "SCONFIRMS: " + s_confirms
-#puts "APPCONFTIMEOUT: " + app_conf_timeout
-#puts "UNSOLALLOWED: " + unsol_allowed
-#puts "UNSOLRETRYPER: " + unsol_retry_period
-#puts "UNSOLOFFLINEDELAY: " + unsol_offline_delay
-#puts "TXFRAGSIZE: " + tx_frag_size
-#puts "SELFADDRESS: " + self_address
-#puts "Test: " + test_msg
-
-
-file = File.open("C:\\code\\DNP\\TestSet\\tmw_template.xml")
-doc = Document.new file
-
-doc.elements.each("//LinkLayer") do |link|
- link.attributes["UseConfirmations"] = (s_confirms == "always") ? "true" : "false"
-end
-
-doc.elements.each("//AppLayer") do |app|
- app.attributes["ConfTimeoutMS"] = app_conf_timeout > unsol_retry_period ? app_conf_timeout : unsol_retry_period
- app.attributes["MaxFragmentSize"] = tx_frag_size
-end
-
-doc.elements.each("//UnsolDefaults") do |app|
- app.attributes["UnsolEnabled"] = unsol_allowed
- #app.attributes["DoClass1"] = unsol_allowed
- #app.attributes["DoClass2"] = unsol_allowed
- #app.attributes["DoClass3"] = unsol_allowed
- app.attributes["RetryMS"] = 0
-end
-
-filename = "C:/code/DNP/TestSet/temp_slave.xml"
-outfile = File.new(filename, "w+")
-doc.write outfile
-outfile.close
-
-puts filename
-
View
5 XMLBindings/rake.project.rb
@@ -1,5 +0,0 @@
-
-$options = {
-:target => 'libxmlbindings.a',
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES]
-}
View
25 demos/slave-cpp/rake.project.rb
@@ -1,25 +0,0 @@
-#
-# Licensed to Green Energy Corp (www.greenenergycorp.com) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. Green Enery Corp licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-$options = {
-:target => 'slavedemo.exe',
-:project_libs => [:dnp3, :apl],
-:includes => [Boost::get_includes_dir, DEFAULT_INCLUDES],
-:libs => Boost::get_static_libs + $PLATFORM_LIBS
-}
View
0  TestSet/TestSetUserManual.docx → docs/TestSetUserManual.docx
File renamed without changes
View
85 rakefile.rb
@@ -1,85 +0,0 @@
-
-$: << './tools/rake_build_system' #make sure this rakefile can see all the build system files
-
-ENV['BOOST_VERSION']='boost_1_47_0'
-
-require 'rake/clean'
-CLOBBER.include('doc') # remove any doxygen-generated files
-
-require 'rake.environment.rb' # this sets up a slew of environment constants
-require 'plugins/rake.cpp.rb' # this provides the facilities for declaring C++ style builds
-require 'plugins/rake.boost.rb' # provides location and names of the boost libraries
-require 'plugins/rake.swigjava.rb' # provides helpers for creating cpp/java bindings using swig
-require 'plugins/rake.source.rb' # provides licensing helpers
-
-DEFAULT_INCLUDES << __FILE__.pathmap('%d')
-
-$USE_TEAM_CITY = !ENV['teamcity'].nil?
-$DNP3_JAVA = !ENV['java'].nil?
-
-#format is name => options, :dir is required
-$projects = {
-:apl => {:dir => 'APL' },
-:testapl => {:dir => 'TestAPL'},
-:apltesttools => {:dir => 'APLTestTools'},
-:dnp3 => {:dir => 'DNP3'},
-:dnp3xml => {:dir => 'DNP3XML'},
-:xmlbindings => {:dir => 'XMLBindings'},
-:dnp3test => {:dir => 'DNP3Test'},
-:testset => {:dir => 'TestSet'},
-:slavedemo => {:dir => 'demos/slave-cpp'},
-:tinyxml => {:dir => 'tinyxml'},
-:aplxml => {:dir => 'APLXML'},
-:terminal => {:dir => 'Terminal'},
-:terminaltest => {:dir => 'TerminalTest'},
-}
-
-$projects[:dnp3java] = {:dir => 'DNP3Java'} if $DNP3_JAVA
-$projects[:teamcity] = {:dir => 'TeamCitySupport'} if $USE_TEAM_CITY
-
-add_projects($projects) #removes projects that are not valid for $hw_os
-
-SOURCE_PROJECTS = [:apl, :testapl, :apltesttools, :dnp3, :dnp3test, :dnp3xml, :aplxml, :testset]
-SOURCE_DIRS = SOURCE_PROJECTS.collect { |p| $projects[p][:dir] }
-
-desc 'Generate doxygen html docs for the project'
-task :document do
- `doxygen ./config/doxygen.config`
-end
-
-desc 'Generate a sloccount report for the project'
-task :sloccount do
- dirs = SOURCE_DIRS + ['tools/rake_build_system']
- `sloccount --wide --details #{dirs.join(' ')} > sloccount.sc`
-end
-
-desc 'Formats all of the C++ h/cpp files with uncrustify'
-task :format do
- excludes = ['tinyxml'].collect{|e| "--exclude=#{e}"}.join(" ")
- cmd = "astyle --options=config/astyle.cfg #{excludes} -r *.cpp *.h"
- puts cmd
- `#{cmd}`
-end
-
-namespace :license do
-
- license_dirs = SOURCE_DIRS << 'External\build_system'
-
- license_types = {
- :cpp => {:exts => ['.cpp','.h'], :comment => '// '},
- :ruby => {:exts => ['.rb'], :comment => '# '},
- }
-
- extensions = license_types.collect { |k,v| v[:exts] }.join('/')
-
- desc "add the licensing file to all #{extensions}"
- task :add do
- license_types.each { |key,options| add_license(license_dirs, options, 'FILE_LICENSE') }
- end
-
- desc "remove the licensing file from all #{extensions}"
- task :remove do
- license_types.each { |key,options| remove_license(license_dirs, options, 'FILE_LICENSE') }
- end
-
-end
View
5 tinyxml/rake.project.rb
@@ -1,5 +0,0 @@
-#setup the psi project
-$options = {
-:target => 'libtinyxml.a',
-:includes => [DEFAULT_INCLUDES]
-}
View
47 tools/rake_build_system/plugins/rake.boost.rb
@@ -1,47 +0,0 @@
-
-class Boost
-
-#names of the various boost libraries
-BOOST_SYSTEM_NAME = "boost_system"
-BOOST_THREAD_NAME = "boost_thread"
-BOOST_DATE_TIME_NAME = "boost_date_time"
-BOOST_PROGRAM_OPTIONS_NAME = "boost_program_options"
-BOOST_UNIT_TEST_NAME = "boost_unit_test_framework"
-
-BOOST_LIB_NAMES = [BOOST_SYSTEM_NAME, BOOST_THREAD_NAME, BOOST_DATE_TIME_NAME, BOOST_PROGRAM_OPTIONS_NAME, BOOST_UNIT_TEST_NAME]
-
-#figure out where the tools directory is
-def self.get_tools_home
- if ENV['TOOLS_HOME']
- fix_path(ENV['TOOLS_HOME'].gsub(/\\/,'/'))
- else
- abort 'The TOOLS_HOME environment variable is not set. On windows, set this in Control Panel -> System -> Advanced -> Environment variables. On linux add the following to the end of your ~/.bashrc export TOOLS_HOME=~/tools'
- end
-end
-
-def self.get_boost_version
- if ENV['BOOST_VERSION']
- ENV['BOOST_VERSION']
- else
- abort 'Environment variable BOOST_VERSION must be set in your main rakefile or OS environment. Format is booost_1_xx'
- end
-end
-
-def self.get_includes_dir
- #puts get_tools_home
- "#{get_tools_home}/boostlib/#{get_boost_version}/include".gsub(/\\/,'/')
-end
-
-def self.get_libs_dir
- __FILE__.pathmap("#{get_tools_home}/boostlib/#{get_boost_version}/#{$hw_os}")
-end
-
-def self.get_shared_libs
- ["-L#{get_libs_dir}"] + BOOST_LIB_NAMES.collect { |lib| "-l#{lib}" }
-end
-
-def self.get_static_libs
- BOOST_LIB_NAMES.collect { |lib| "#{get_libs_dir}/lib#{lib}.a" }
-end
-
-end
View
120 tools/rake_build_system/plugins/rake.cpp.enviroment.rb
@@ -1,120 +0,0 @@
-
-# when buidling for ARM we have to modify PATH to point first to the cross compiler
-if ENV['arm']
- ENV['PATH'] = case $hw_os
- when 'pc_cygwin'
- '/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/bin/:/opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/bin/:' + ENV['PATH']
- when 'Linux_i686'
- '/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/bin:/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/bin:' + ENV['PATH']
- else
- puts "Don't know what cross-compiler to use for #{$hw_os}"
- Process.exit(1)
- end
- $hw_os = 'pc_linux_arm'
-end
-
-# defaults for compiler, archiver, and indexer
-$CC = ENV['ccache'] ? 'ccache g++' : 'g++'
-
-$AR = 'ar cruv'
-$RANLIB = 'ranlib'
-$LD = 'ld'
-
-COMPILER_VERSION = case $hw_os
- when 'pc_cygwin'
- '-gcc34'
- when 'Linux_i686'
- '-gcc41'
- when 'pc_linux_arm'
- '-gcc33'
-end
-
-#common to all platforms
-preprocessor = ['BOOST_ASIO_ENABLE_CANCELIO', 'BOOST_REGEX_NO_LIB']
-
-preprocessor = case $hw_os
- when 'pc_cygwin'
- ['_WIN32_WINNT=0x0501', '__USE_W32_SOCKETS']
- when 'pc_linux_arm'
- ['ARM','BOOST_ASIO_DISABLE_EPOLL']
- else []
-end
-
-if ENV['PREPROCESSOR']
- preprocessor << ENV['PREPROCESSOR']
-end
-
-$CC_PREPROCESSOR = preprocessor.collect { |d| "-D#{d}"}.join(' ')
-
-$WINSOCK_LIBS = case $hw_os
- when 'pc_cygwin'
- ['/lib/w32api/libwsock32.a','/lib/w32api/libws2_32.a']
- else
- []
-end
-
-def get_release_cc_flags
- case $hw_os
- when 'pc_linux_arm'
- ['-O3']
- when 'pc_cygwin'
- ['-O3']
- else
- ['-O3 -fpic']
- end
-end
-
-def get_debug_cc_flags
- case $hw_os
- when 'pc_linux_arm'
- []
- else
- ['-g -fpic']
- end
-end
-
-def get_coverage_cc_flags
- case $hw_os
- when 'pc_linux_arm'
- []
- else
- ['-g -fPIC -O0 -fprofile-arcs -ftest-coverage -DNDEBUG -DPSI_LOGALL']
- end
-end
-
-#By default, the build is set to debug
-$WARN_FLAGS = ['-Wall', '-Wno-strict-aliasing']
-$RELEASE_TYPE = ENV['debug'] ? 'debug' : (ENV['coverage'] ? 'coverage' : 'release')
-$CC_FLAGS = case $RELEASE_TYPE
- when 'release'
- get_release_cc_flags()
- when 'debug'
- get_debug_cc_flags()
- when 'coverage'
- get_coverage_cc_flags()
- else
- puts "Unknown $RELEASE_TYPE = #{$RELEASE_TYPE}"
- Process.exit 1
-end
-
-$OBJ_DIR = "#{$hw_os}/#{$RELEASE_TYPE}"
-
-$PLATFORM_LIBS = case $hw_os
- when 'pc_cygwin'
- ['-lpthread']
- when 'Linux_i686'
- ['-lpthread']
- when 'pc_linux_arm'
- ['-lpthread']
- else
- []
-end
-
-RUBY_INC = case $hw_os
- when 'pc_cygwin'
- '/lib/ruby/1.8/i386-cygwin'
- when 'Linux_i686'
- '/usr/lib/ruby/1.8/i486-linux/'
-end
-
-$PLATFORM_LIBS << '-lgcov' if $RELEASE_TYPE == 'coverage'
View
389 tools/rake_build_system/plugins/rake.cpp.rb
@@ -1,389 +0,0 @@
-#Helpers related to C++ development
-require File.join(File.dirname(__FILE__), 'rake.cpp.enviroment')
-
-# extract all dependencies from a dependency file, returning an array of dependencies for object file
-# corresponding to the input dep file
-def dependencies(path)
- deps = []
- open(path) do |file|
- deps = file.read.scan(/ [^\s|\\]+/).collect { |s| s.strip }
- end
- deps.reject!{|s| s.include?("/opt") || s.include?("/usr") || s.include?("include/boost")}
- deps
-end
-
-def filtered_dependencies(path)
- deps = dependencies(path)
- deps.reject!{|f| !File.exists? f}
- deps
-end
-
-#turn an array of path incldues into a string suitable for g++
-def include_string(arr)
- arr.map{ |s| "-I#{s}" }.join(' ')
-end
-
-def make_dep_file(source, dep_file, includes)
- inc = include_string(includes)
- sh "g++ -M #{source} #{inc} #{$CC_PREPROCESSOR} > #{dep_file}"
-end
-
-def make_obj_file(source, obj_file, includes, cc_flags, warn_flags)
- inc = include_string(includes)
- warn = warn_flags.join(' ')
- cmd = "#{$CC} #{cc_flags} #{warn} -c -o #{obj_file} #{source} #{inc} #{$CC_PREPROCESSOR}"
- puts "compiling #{source} with #{$CC} #{cc_flags} #{warn} #{$CC_PREPROCESSOR}"
- sh cmd
-end
-
-def make_library(lib, obj)
- puts "Creating archive: #{lib}"
- sh "#{$AR} #{lib} #{obj}"
- puts "Indexing archive: #{lib}"
- sh "#{$RANLIB} #{lib}"
-end
-
-def make_shared_library(lib, obj, link_options, libs)
- puts "Creating shared library: #{lib}"
- sh "#{$CC} -shared -o #{lib} #{obj} #{link_options.join(' ')} #{libs.join(' ')}"
-end
-
-def make_executable(exe,obj,libs)
- puts "Linking: #{exe}"
- libtool_prefix = "libtool --mode=link "
- libtool_prefix = "" if $hw_os == 'pc_linux_arm'
- cc = $CC.gsub('ccache ','')
- sh "#{libtool_prefix}#{cc} #{obj.join(' ')} #{libs.join(' ')} -o #{exe}"
-end
-
-
-
-def add_cpp_based_target(name, options)
-
- namespace name do
-
- target_name = options[:target] #the target file that we are creating for this project, (.a, .exe, etc)
-
- includes = options[:includes].flatten # these already are paths
- includes << options[:dir] #the project directory should always be explicitly on the include path
-
- includes.each do |path|
- unless File.directory? path
- puts "In project #{name}, include directory does not exist: #{path}"
- end
- end
-
- excludes = options[:cppexcludes] || [] #some source files may be excluded from the build
-
- # override the source extension for cpp using the :src_ext option
- src_ext =
- if options[:src_ext]
- options[:src_ext]
- else
- '.cpp'
- end
-
- dir = options[:dir]
- obj_dir = "#{dir}/#{$OBJ_DIR}" #directory where the objects, dep files, and libraries go
- target = "#{obj_dir}/#{target_name}" #full path the the target
-
- src_list = FileList["#{dir}/**/*#{src_ext}"].reject { |f| excludes.include? f.pathmap('%f') }
-
- # the project may have a way to create dyanmic source code from other dependencies
- if options[:dynamic_src]
- options[:dynamic_src].each do |f|
- src_list << f unless src_list.include? f
- end
- end
-
- #create a map from source to object files
- obj_to_src = src_list.inject({}) do |sum, src|
- sum.merge! src.pathmap("#{obj_dir}/%f").ext('.o') => src
- end
-
- directory obj_dir # task for directory
- file target => obj_dir #the library depends on the obj directory being created
-
- cc_flags = (ENV['debug'] || options[:cc_release_flags].nil?) ? $CC_FLAGS : options[:cc_release_flags]
-
- warn_flags = []
- warn_flags.concat($WARN_FLAGS)
- warn_flags.concat(options[:warn_flags]) if options[:warn_flags]
-
- #explicitly declare dependencies between .o and source files
- obj_to_src.each do |obj, src|
- dep_file = obj.ext('dep')
- file obj => src do |t|
- make_dep_file src, dep_file, includes
- make_obj_file src, t.name, includes, cc_flags, warn_flags
- end
- end
-
- desc 'Remove and regenerate dependency files'
- task :updatedep do
- `rm #{obj_dir}/*.dep`
- obj_to_src.each do |obj, src|
- puts "Generating dependencies for #{source}"
- make_dep_file src, obj.ext('.dep'), includes
- end
- end
-
- task :build => :dependencies
-
- task :dependencies => src_list do
- print "loading existing dependencies for #{name}... "
- obj_to_src.keys.each do |obj|
- dep = obj.ext('.dep')
- file obj => filtered_dependencies(dep) if File.exists? dep
- end
- puts 'done.'
- end
-
- # should generate the rule for building the target
- yield target, obj_to_src, includes
-
- desc "Build and archive the #{name} library"
- task :build => target
-
- desc "Clobber the #{name} project"
- task :clobber do |t|
- puts "clobber1: rm -R -f #{obj_dir}"
- sh "rm -R -f #{obj_dir}"
- end
-
- desc "Copy the target"
- task :copytarget, [:dest, :name, :sudo] => target do |task, args|
- cmd = "cp #{target} #{args[:dest]}/#{args[:name]}"
- cmd = "sudo " + cmd if args[:sudo]
- sh "#{cmd}"
- end
-
- desc "Run remote tests"
- task [:testremote, :host, :user, :passwd, :xml] => target do |task, args|
- #require here so that we don't blow up w/o net-ssh/openssl
- require File.join(File.dirname(__FILE__), 'rake.crosstest.rb')
- CrossTest::do_test_sequence(args[:host], args[:user], args[:passwd], target, args[:xml])
- end
-
- end #end namespace
-end #end method
-
-def add_static_lib(name, options)
-
- add_cpp_based_target(name, options) do |target, obj_to_src, includes|
-
- file target => obj_to_src.keys do |t| #rule for making the target
- make_library target, obj_to_src.keys.join(' ')
- end
-
- end
-
-end #end method
-
-def add_shared_lib(name, options)
-
- dep_libs = get_dep_libs(name, options)
-
- link_options = []
- link_options = options[:link_options] if options[:link_options]
-
- add_cpp_based_target(name, options) do |target, obj_to_src, includes|
- file target => dep_libs
- dep_libs += options[:libs] if options[:libs]
- file target => obj_to_src.keys do |t| #rule for making the target
- make_shared_library target, obj_to_src.keys.join(' '), link_options, dep_libs
- end
- end
-
-end #end method
-
-def get_dep_libs(name, options)
-
- if options[:project_libs]
- options[:project_libs].collect do |l|
- proj = $projects[l]
- if $projects[l]
- "#{$projects[l][:dir]}/#{$OBJ_DIR}/#{$projects[l][:target]}"
- else
- puts "Unknown dependency #{l} in #{name}"
- exit -1
- end
- end
- end
-end
-
-def add_executable(name, options)
-
- dep_libs = get_dep_libs(name, options)
-
- add_cpp_based_target(name, options) do |target, obj_to_src, includes|
-
- file target => dep_libs #force a relink if a lib changes
- task :build => options[:project_libs].collect { |libname| "#{libname}:build" } #force a load of the dependencies for the sub-libraries
-
- task :run => :build
-
- desc 'runs the executable with optional cmd line arguments'
- task :run, [:cmdline] => target do |task, args|
- puts "#{target} #{args[:cmdline] ? args[:cmdline] : ''}"
- sh "#{target} #{args[:cmdline] ? args[:cmdline] : ''}"
- run_coverage( name, options) if $RELEASE_TYPE == 'coverage'
- end
-
- desc 'blindly run the executable -- no build dependency'
- task :runblind, [:cmdline] => target do |task, args|
- puts "#{target} #{args[:cmdline] ? args[:cmdline] : ''}"
- sh "#{target} #{args[:cmdline] ? args[:cmdline] : ''}"
- run_coverage( name, options) if $RELEASE_TYPE == 'coverage'
- end
-
- file target => obj_to_src.keys do |t|
- make_executable target, obj_to_src.keys, (dep_libs + options[:libs] + $WINSOCK_LIBS)
- end
-
- end
-
-end
-
-# Generate code coverage results.
-def run_coverage( name, options)
- dep_dirs = options[:project_libs].collect{ |lib| $projects[lib][:dir] + "/#{$hw_os}/#{$RELEASE_TYPE}" }
- lcov_dir = "#{$projects[name][:dir]}/#{$hw_os}/#{$RELEASE_TYPE}"
- lcov_out = "#{lcov_dir}/lcov.out"
- if ENV['LCOV_HTML']
- lcov_html = ENV['LCOV_HTML'] + "/#{lcov_dir}"
- sh "mkdir -p #{lcov_html}"
- else
- lcov_html = "#{lcov_dir}/html"
- end
-
- puts "lcov -d #{$projects[name][:dir]}/#{$hw_os}/#{$RELEASE_TYPE} #{dep_dirs.collect{|x| ' -d '+x}} -b #{Dir.pwd} -c -o #{lcov_out}"
- sh "lcov -d #{$projects[name][:dir]}/#{$hw_os}/#{$RELEASE_TYPE} #{dep_dirs.collect{|x| ' -d '+x}} -b #{Dir.pwd} -c -o #{lcov_out}"
-
- Dir.mkdir(lcov_html) unless File.directory? lcov_html
- puts "genhtml -o #{lcov_html} #{lcov_out}"
- sh "genhtml -o #{lcov_html} #{lcov_out}"
-
- puts "\nHTML coverage results are at:\n#{lcov_html}/index.html"
-
- # Add a symbolic link for gcov. Bitten will pass "coverage" as the prefix.
- dir = $projects[name][:dir]
- link = "#{$RELEASE_TYPE}-#{dir}"
- sh "ln -s #{dir}/#{$hw_os}/#{$RELEASE_TYPE} #{link}" unless File.exists? link
- # Add symbolic links for dependencies (for gcov again).
- dep_dirs = options[:project_libs].each do |lib|
- dir = $projects[lib][:dir]
- link = "#{$RELEASE_TYPE}-#{dir}"
- sh "ln -s #{dir}/#{$hw_os}/#{$RELEASE_TYPE} #{link}" unless File.exists? link
- end
-
-end
-
-
-def create_header_only_distribution(name, options)
-
- namespace name do
-
- task :collect_headers do
- options[:headers].each do |project, files|
-
- # we need to recreate the right directories so the includes <PSI/ will work
- source_dir_name = $projects[project][:dir].split[-1]
- local_target_dir = "#{options[:dir]}/#{source_dir_name}"
-
- # clear and recreate the output dir
- FileUtils.rm_rf(local_target_dir) if File.exists?(local_target_dir)
- Dir.mkdir(local_target_dir)
-
-
- if options[:header_file]
- license_text = File.open("#{options[:dir]}/#{options[:header_file]}").read
- files.each do |h|
- f = File.open("#{local_target_dir}/#{h}", 'w')
- f.write license_text
- f.write File.open("#{$projects[project][:dir]}/#{h}").read
- f.close
- end
- else
- headers = files.collect{|f|"#{$projects[project][:dir]}/#{f}"}
- FileUtils.cp headers, local_target_dir
- end
- end
- end
-
- obj_dir = "#{options[:dir]}/#{$OBJ_DIR}" #directory where the objects, dep files, and libraries go
- directory obj_dir
-
- task :collect_libs => obj_dir
- task :collect_libs => options[:project_libs].collect{|l| "#{l}:build"}
- task :collect_libs do
- # go and collect the static libraries from the other projects
- options[:project_libs].each do |l|
- sh "cp #{$projects[l][:dir]}/#{$OBJ_DIR}/#{$projects[l][:target]} #{obj_dir}"
- end
- # copy the static libraries but ignore the dynamic ones (Ex: -lpthread)
- options[:libs].reject{|l| l =~ /^-[lL]/}.each do |l|
- sh "cp #{l} #{obj_dir}"
- end
- end
-
- task :build => :collect_libs
-
- task :run_pre_package_commands => [:collect_headers] do
- Dir.chdir(options[:dir]) do
- options[:pre_package_commands].each do |command_hash|
- command_hash.each do |command, args|
- # if the command is a symbol and a project name we replace it with that projects target exe name
- command = "#{$OBJ_DIR}/#{$projects[command][:target]}" if command.is_a?(Symbol) and $projects[command]
- sh "#{command} #{args}"
- end
- end
- end
- end
-
- desc "Make a package of the headers and libraries for distribution"
- task :package => [:build, :run_pre_package_commands] do
- Dir.chdir(options[:dir]) do
- sh "tar -czvf #{options[:target]} #{options[:files_to_package].join(' ')}"
- end
- end
-
- desc "Clobber the #{name} project"
- task :clobber do |t|
- puts "clobber2: rm -R -f #{obj_dir}"
- sh "rm -R -f #{obj_dir}"
- end
-
- end
-end #end method
-
-
-def add_cpp_dependecies(name, options)
- case options[:target]
- when /\.tar\.gz/
- create_header_only_distribution name, options
- when /\.a$/
- add_static_lib name, options
- when /\.exe$/
- add_executable name, options
- when /\.so$/
- add_shared_lib name, options
- end
-end
-
-def add_global_cpp_tasks
-
- desc 'Creates all libraries and executables'
- task :default => $projects.collect { |name, opt| "#{name}:build" }
-
- desc 'Updates all C++ dependencies'
- task :updatedep => ($projects.collect { |name, opt| "#{name}:updatedep" })
-
- desc 'Clobbers all of the build targets'
- task :clobber => $projects.collect { |name, opt| "#{name}:clobber" }
-
-end
-
-
-$build_lambdas << lambda { |name, options| add_cpp_dependecies(name,options) }
-$post_build_lambdas << lambda { add_global_cpp_tasks }
View
35 tools/rake_build_system/plugins/rake.crosstest.rb
@@ -1,35 +0,0 @@
-require 'net/ftp'
-require 'net/ssh'
-
-module CrossTest
-
- def self.put(host, user, passwd, file)
- ftp = Net::FTP.new(host, user, passwd)
- STDOUT.sync = true
- ftp.putbinaryfile(file) { |block| print '*' }
- ftp.close
- end
-
- def self.get(host, user, passwd, remote_file, local_file)
- ftp = Net::FTP.new(host, user, passwd)
- STDOUT.sync = true
- ftp.getbinaryfile(remote_file, local_file) { |block| print '*' }
- ftp.close
- end
-
- def self.run_tests(host, user, passwd, file)
- Net::SSH.start(host, user, :password => passwd) do |ssh|
- ssh.exec! "rm report.xml"
- ssh.exec! "chmod +x #{file}"
- ssh.exec! "./#{file} --output_format=XML --log_level=all --report_level=no > report.xml"
- ssh.exec! "rm #{file}"
- end
- end
-
- def self.do_test_sequence(host, user, passwd, file, testfile)
- self.put(host, user, passwd, file)
- self.run_tests(host, user, passwd, File.basename(file))
- self.get(host, user, passwd, 'report.xml', testfile)
- end
-
-end
View
60 tools/rake_build_system/plugins/rake.source.rb
@@ -1,60 +0,0 @@
-
-def get_files_to_process(root, extensions)
- files = []
- extensions.each do |ext|
- files.concat(FileList["#{root}/**/*#{ext}"])
- end
- files
-end
-
-def get_license_text(license, comment)
- license_text = File.foreach(license).collect do |line|
- comment + line
- end.join
-end
-
-def add_license(dirs, options, license)
-
- files = dirs.inject([]) do |sum,dir|
- sum += get_files_to_process(dir, options[:exts])
- end
-
- puts "adding #{license} from the #{files.size} files matching #{options[:exts].join(', ')}"
-
- license_text = get_license_text(license, options[:comment])
-
- first_line = license_text.lines.first
-
- files.each do |h|
- txt = File.open(h).read
- next if txt.index(first_line) == 0
- f = File.open("#{h}.tmp", 'w')
- f.write license_text
- f.write txt
- f.close
- FileUtils.rm(h)
- FileUtils.mv("#{h}.tmp",h)
- end
-end
-
-def remove_license(dirs, options, license)
-
- files = dirs.inject([]) do |sum,dir|
- sum += get_files_to_process(dir, options[:exts])
- end
-
- puts "removing #{license} from the #{files.size} files matching #{options[:exts].join(', ')}"
-
- license_text = get_license_text(license, options[:comment])
- license_size = license_text.size
-
- files.each do |h|
- txt = File.open(h).read
- next if txt.index(license_text) != 0
- f = File.open("#{h}.tmp", 'w')
- f.write txt[license_size..-1]
- f.close
- FileUtils.rm(h)
- FileUtils.mv("#{h}.tmp",h)
- end
-end
View
83 tools/rake_build_system/plugins/rake.swigjava.rb
@@ -1,83 +0,0 @@
-
-
-jdk_home = if ENV['JDK_HOME']
- ENV['JDK_HOME']
-elsif ENV['JAVA_HOME']
- ENV['JAVA_HOME']
-else
- nil
-end
-
-unless jdk_home and File.directory? jdk_home
- puts 'To use the swig-java plugin, the JDK_HOME or JAVA_HOME environment variables must be set to your JDK directory, comment out the "require \'plugins/swigjava.rb\'" line in rakefile.rb to supress this message.'
-else
- jdk_home = File.expand_path jdk_home #this will normailze to linux slashes in case we're using an ENV var from windows
- $jdk_home = jdk_home
-
- puts "Using jdk directory #{$jdk_home}"
-
- platform = case $hw_os #need this to get the correct directory for some of the jni includes
- when 'pc_cygwin'
- 'win32'
- else
- 'linux'
- end
-
- jdk_includes = ["#{jdk_home}/include","#{jdk_home}/include/#{platform}"]
-
- def add_swig_java_dependencies(name, options)
-
- includes = options[:includes].flatten # these already are paths
- includes << options[:dir] #the project directory should always be explicitly on the include path
-
- package = if options[:java_package]
- "-package #{options[:java_package]}"
- else
- ''
- end
-
- outdir = if options[:java_outdir]
- dir = "#{options[:dir]}/#{options[:java_outdir]}"
- directory dir #create the directory
- dir
- else
- nil
- end
-
- generated_sources = get_generated_swig_java_cpp(options[:dir])
- generated_sources.each do |cppfile|
- ifile = cppfile.ext('.i')
- file cppfile => outdir if outdir
- outdirective = ''
- outdirective = "-outdir #{outdir}" if outdir
- file cppfile => ifile do |t|
- # we need to add this define that gcc normally adds if we are on 64bit
- declares_necessary = []
- declares_necessary << '__x86_64__' if `uname -m`.strip == 'x86_64'
- declares = declares_necessary.collect{|d|"-D#{d}"}.join(' ')
- puts "creating swig cpp/java binding from #{ifile} (#{declares})"
- sh "swig -c++ -java #{package} #{include_string(includes)} #{outdirective} #{declares} -o #{cppfile} #{ifile}"
- end
- end
- generated_sources
- end
-
- def get_generated_swig_java_cpp(dir)
- FileList["#{dir}/*.i"].ext('.cpp')
- end
-
- $pre_build_lambdas << lambda do |name, options|
- if options[:plugins] and (options[:plugins].include? 'swigjava')
- options[:includes] ||= []
- options[:includes] += jdk_includes # add the jdk includes so that they are seen by both swig and C++
- options[:dynamic_src] ||= []
- options[:dynamic_src] += get_generated_swig_java_cpp options[:dir]
- end
- end
-
- $build_lambdas << lambda do |name, options|
- if options[:plugins] and (options[:plugins].include? 'swigjava')
- add_swig_java_dependencies(name, options)
- end
- end
-end
View
80 tools/rake_build_system/rake.environment.rb
@@ -1,80 +0,0 @@
-
-if ENV['SH_VERBOSE'] #set on command line with SH_VERBOSE=true to see all subcommands
- verbose(true)
-else
- verbose(false)
-end
-
-# first thing to do is figure out the platform we're on
-$hw_os = case RUBY_PLATFORM.strip
- when /linux/
- # we don't actually care if we are building for i686 or x86_64
- #`uname -sm`.strip.gsub(/\s/,'_')
- # TODO: replace Linux_i686 with just linux in rest of build system
- 'Linux_i686'
- when /cygwin/
- 'pc_cygwin'
- else
- RUBY_PLATFORM
-end
-
-
-def fix_path(path)
- case $hw_os
- when 'pc_cygwin'
- # need to strip off line ending from cygpath
- `cygpath #{path}`.strip
- when 'Linux_i686'
- path
- else
- path
- end
-end
-
-def add_projects(projects)
-
- #get the additional options from the project files
- projects.each do |name, options|
- $options = nil #expect that the require statement sets this variable
- require "#{options[:dir]}/rake.project.rb"
- unless $options
- puts "Require for #{name} did not set the $options variable"
- Process.exit 1
- end
- options.merge! $options
- options[:target_path] = "#{options[:dir]}/#{$OBJ_DIR}"
- end
-
-
- #Do a final pass to configure the projects now that all the options are in place
- projects.each do |name, options|
-
- if platform_ok options
-
- $pre_build_lambdas.each { |lam| lam.call(name, options) } # give any plugin's pre-builds the chance to add information to options
- $build_lambdas.each { |lam| lam.call(name, options) } # call all the plugin's build functions
-
- else
-
- puts "Ignoring project #{name} for platform #{$hw_os}"
- projects.delete name
- end
- end
-
- $post_build_lambdas.each { |lam| lam.call }
-
-end
-
-def platform_ok(options)
- if options[:allowed_platforms]
- options[:allowed_platforms].include? $hw_os
- else
- true
- end
-end
-
-DEFAULT_INCLUDES = []
-
-$pre_build_lambdas = []
-$build_lambdas = []
-$post_build_lambdas = []
Please sign in to comment.
Something went wrong with that request. Please try again.