Parent

Included Modules

Class/Module Index [+]

Quicksearch

CommonLibraryBuilder

This file lists all the Phusion Passenger C++ library files and contains code for calculating how to compile and how to link them into executables. It's used by the build system (build/*.rb) and lib/phusion_passenger/standalone/runtime_installer.rb.

Attributes

all_components[R]
output_dir[R]
selected_components[R]

Public Class Methods

new(&block) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 34
def initialize(&block)
        @all_components = {}
        @all_ordered_components = []
        @selected_components = {}
        @namespace = "common"
        if defined?(COMMON_OUTPUT_DIR)
                @output_dir = COMMON_OUTPUT_DIR + "libpassenger_common"
        else
                @output_dir = "."
        end
        instance_eval(&block) if block
end

Public Instance Methods

define_component(object_name, options) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 54
def define_component(object_name, options)
        options[:deps] ||= []
        @all_components[object_name] = options
        @all_ordered_components << object_name
        @selected_components[object_name] = options
end
define_tasks(extra_compiler_flags = nil) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 103
def define_tasks(extra_compiler_flags = nil)
        flags =  "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} "
        flags << "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}"
        flags.strip!

        group_all_components_by_category.each_pair do |category, object_names|
                define_category_tasks(category, object_names, flags)
        end

        task("#{@namespace}:clean") do
                sh "rm -rf #{@output_dir}"
        end

        return self
end
exclude(*selector) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 65
def exclude(*selector)
        return dup.send(:exclude!, *selector)
end
initialize_copy(other) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 47
def initialize_copy(other)
        [:all_components, :all_ordered_components, :selected_components, :namespace, :output_dir].each do |name|
                var_name = "@#{name}"
                instance_variable_set(var_name, other.instance_variable_get(var_name).dup)
        end
end
only(*selector) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 61
def only(*selector)
        return dup.send(:only!, *selector)
end
set_namespace(namespace) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 69
def set_namespace(namespace)
        return dup.send(:set_namespace!, namespace)
end
set_output_dir(dir) click to toggle source
# File lib/phusion_passenger/common_library.rb, line 73
def set_output_dir(dir)
        return dup.send(:set_output_dir!, dir)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.