diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-23 07:15:27 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-23 07:15:27 +0000 |
commit | ce5af582a0552d1ccbe66e8b3ee3ca046f6b18c3 (patch) | |
tree | 48a73eaa256945e38cd1f35000f6820c74279cf0 /lib/mkmf.rb | |
parent | 3721fb0106707de5d0a58af6bd5784053f379ab2 (diff) | |
download | ruby-ce5af582a0552d1ccbe66e8b3ee3ca046f6b18c3.tar.gz |
* lib/mkmf.rb (create_makefile): add dependency to header files when
depend files don't exist. now we can remove simple (and often
wrong) depend files in most cases.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r-- | lib/mkmf.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 2c50ff568c..cb3adbad03 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -50,6 +50,7 @@ module MakeMakefile CXX_EXT.concat(%w[C]) end SRC_EXT = C_EXT + CXX_EXT + HDR_EXT = %w[h hpp] $static = nil $config_h = '$(arch_hdrdir)/ruby/config.h' $default_static = $static @@ -2016,6 +2017,8 @@ RULES end $srcs = srcs + hdrs = Dir[File.join(srcdir, "*.{#{HDR_EXT.join(%q{,})}}")] + target = nil if $objs.empty? if target and EXPORT_PREFIX @@ -2069,6 +2072,7 @@ LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS} ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')} SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')} OBJS = #{$objs.join(" ")} +HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')} TARGET = #{target} TARGET_NAME = #{target && target[/\A\w+/]} TARGET_ENTRY = #{EXPORT_PREFIX || ''}Init_$(TARGET_NAME) @@ -2228,7 +2232,7 @@ site-install-rb: install-rb if File.exist?(depend) mfile.print("###\n", *depend_rules(File.read(depend))) else - mfile.print "$(OBJS): $(ruby_headers)\n" + mfile.print "$(OBJS): $(HDRS) $(ruby_headers)\n" end $makefile_created = true |