method
depend_rules

Ruby latest stable (v2_5_5)
-
0 notes -
Class: Object
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (38)
- 1_9_3_392 (0)
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
Related methods
- Class methods (4)
-
json_create (<= v1_9_2_180)
-
new (<= v1_8_7_330)
-
version (<= v1_9_1_378)
-
yaml_tag
- Instance methods (143)
-
<=>
-
=~
-
== (<= v1_8_7_330)
-
===
-
!~
-
[] (>= v2_6_3)
-
[]= (>= v2_6_3)
-
assert_Qundef
-
check_signedness (<= v1_9_3_392)
-
check_sizeof (<= v1_9_3_392)
-
chmod
-
class
-
clone
-
component (>= v2_6_3)
-
convertible_int (<= v1_9_3_392)
-
cp
-
create_docfile (<= v1_9_2_180)
-
create_header (<= v1_9_3_392)
-
create_makefile (<= v1_9_3_392)
-
create_win32ole_makefile (<= v1_9_2_180)
-
CSV
-
dclone
-
default_handler (<= v1_9_2_180)
-
default_src_encoding (<= v2_4_6)
-
define_singleton_method
-
DelegateClass
-
depend_rules (<= v1_9_3_392)
-
Digest
-
dir_config (<= v1_9_3_392)
-
display
-
dummy_makefile (<= v1_9_3_392)
-
dup
-
element (>= v2_6_3)
-
enable_config (<= v1_9_3_392)
-
enum_for
-
eql?
-
equal? (<= v1_8_7_330)
-
extend
-
find_executable (<= v1_9_3_392)
-
find_header (<= v1_9_3_392)
-
find_library (<= v1_9_3_392)
-
find_type (<= v1_9_3_392)
-
freeze
-
frozen?
-
gemfile (>= v2_6_3)
-
__getobj__
-
hash
(<= v2_4_6)
-
have_const (<= v1_9_3_392)
-
have_framework (<= v1_9_3_392)
-
have_func (<= v1_9_3_392)
-
have_header (<= v1_9_3_392)
-
have_library (<= v1_9_3_392)
-
have_macro (<= v1_9_3_392)
-
have_struct_member (<= v1_9_3_392)
-
have_type (<= v1_9_3_392)
-
have_var (<= v1_9_3_392)
-
help
-
httpd
-
id (<= v1_8_7_330)
-
__id__ (<= v1_9_2_180)
-
initialize_clone
-
initialize_copy
-
initialize_dup
-
inspect
-
install
-
instance_eval (<= v1_8_7_330)
-
instance_exec (<= v1_8_7_330)
-
instance_of?
-
instance_variable_defined?
-
instance_variable_get
-
instance_variables
-
instance_variable_set
-
is_a?
-
itself
-
kind_of?
-
listup (<= v1_9_2_180)
-
ln
-
method
-
methods
-
mkdir
-
mkmf
-
mv
-
namespace (>= v2_6_3)
-
navigate (<= v1_9_2_180)
-
nil?
-
object_id
-
pretty_print
-
pretty_print_cycle
-
private_methods
-
protected_methods
-
psych_to_yaml (<= v2_4_6)
-
public_method
-
public_methods
-
public_send
-
rake_namespace (>= v2_6_3)
-
rawVALUE
-
remove_instance_variable
-
respond_to?
-
respond_to_missing?
-
rm
-
rmdir
-
send
-
__send__ (<= v1_8_7_330)
-
set_component (>= v2_6_3)
-
set_element (>= v2_6_3)
-
__setobj__
-
setup
-
singleton_class
-
singleton_method
-
singleton_method_added (<= v1_8_7_330)
-
singleton_method_removed (<= v1_8_7_330)
-
singleton_methods
-
singleton_method_undefined (<= v1_8_7_330)
-
stop_msg_loop (<= v1_9_2_180)
-
stub (<= v2_1_10)
-
sysread
-
taint
-
tainted?
-
tap
-
task (>= v2_6_3)
-
then (>= v2_6_3)
-
timeout
-
to_a (<= v1_8_7_330)
-
to_enum
-
to_json (<= v1_9_2_180)
-
to_s
-
touch
-
to_yaml
-
to_yaml_properties (<= v2_4_6)
-
to_yaml_style (<= v1_9_1_378)
-
trust
-
try_const (<= v1_9_3_392)
-
try_type (<= v1_9_3_392)
-
type (<= v1_8_7_330)
-
unknown (<= v2_4_6)
-
untaint
-
untrust
-
untrusted?
-
validate_object
-
wait_writable
-
with_config (<= v1_9_3_392)
-
xmp
-
yield_self
= private
= protected
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_9_3_392) is shown here.
These similar methods exist in v2_5_5:
depend_rules(depend)
public
Processes the data contents of the “depend” file. Each line of this file is expected to be a file name.
Returns the output of findings, in Makefile format.
Show source
# File lib/mkmf.rb, line 1772 def depend_rules(depend) suffixes = [] depout = [] cont = implicit = nil impconv = proc do COMPILE_RULES.each {|rule| depout << (rule % implicit[0]) << implicit[1]} implicit = nil end ruleconv = proc do |line| if implicit if /\A\t/ =~ line implicit[1] << line next else impconv[] end end if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line) suffixes << m[1] << m[2] implicit = [[m[1], m[2]], [m.post_match]] next elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line line.gsub!(%(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2} end depout << line end depend.each_line do |line| line.gsub!(/\.o\b/, ".#{$OBJEXT}") line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h) line.gsub!(%\$\(hdrdir\)/(?!ruby(?![^:;/\s]))(?=[-\w]+\.h)", '\&ruby/') if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line line.gsub!(%[-\w\./]{2,}"){$&.tr("/", "\\")} line.gsub!(/(\$\((?!RM|COPY)[^:)]+)(?=\))/, '\1:/=\') end if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line (cont ||= []) << line next elsif cont line = (cont << line).join cont = nil end ruleconv.call(line) end if cont ruleconv.call(cont.join) elsif implicit impconv.call end unless suffixes.empty? depout.unshift(".SUFFIXES: ." + suffixes.uniq.join(" .") + "\n\n") end depout.unshift("$(OBJS): $(RUBY_EXTCONF_H)\n\n") if $extconf_h depout.flatten! depout end