diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-06 05:44:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-06 05:44:58 +0000 |
commit | 1bdc1a552990188cc15cb8dc051afce012bfb4c4 (patch) | |
tree | 99f504a737b65bfbd95d71ba2e2bd8a9ab5fa9b4 | |
parent | c89b06455cbba451935435af1bb9ccf34b0b35cf (diff) | |
download | ruby-1bdc1a552990188cc15cb8dc051afce012bfb4c4.tar.gz |
Local header dependencies
* lib/mkmf.rb (create_makefile): store $headers in LOCAL_HDRS for
depend files.
* ext/digest/digest_conf.rb (digest_conf): add implementation
specific headers to $header.
* ext/digest/{md5,rmd160,sha1,sha2}/depend: add LOCAL_HDRS to the
dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | ext/digest/digest_conf.rb | 2 | ||||
-rw-r--r-- | ext/digest/md5/depend | 1 | ||||
-rw-r--r-- | ext/digest/rmd160/depend | 3 | ||||
-rw-r--r-- | ext/digest/sha1/depend | 1 | ||||
-rw-r--r-- | ext/digest/sha2/depend | 3 | ||||
-rwxr-xr-x | ext/extmk.rb | 1 | ||||
-rw-r--r-- | lib/mkmf.rb | 4 |
8 files changed, 24 insertions, 2 deletions
@@ -1,3 +1,14 @@ +Wed Jul 6 14:44:56 2016 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (create_makefile): store $headers in LOCAL_HDRS for + depend files. + + * ext/digest/digest_conf.rb (digest_conf): add implementation + specific headers to $header. + + * ext/digest/{md5,rmd160,sha1,sha2}/depend: add LOCAL_HDRS to the + dependencies. + Wed Jul 6 08:59:35 2016 Shugo Maeda <shugo@ruby-lang.org> * lib/net/http/generic_rquest.rb (write_header): A Request-Line must diff --git a/ext/digest/digest_conf.rb b/ext/digest/digest_conf.rb index 432652852f..8e36ce5d41 100644 --- a/ext/digest/digest_conf.rb +++ b/ext/digest/digest_conf.rb @@ -6,6 +6,7 @@ def digest_conf(name, hdr = name, funcs = nil, types = nil) if File.exist?("#$srcdir/#{name}cc.h") and have_header("CommonCrypto/CommonDigest.h") $defs << "-D#{name.upcase}_USE_COMMONDIGEST" + $headers << "#{name}cc.h" return :commondigest end end @@ -21,6 +22,7 @@ def digest_conf(name, hdr = name, funcs = nil, types = nil) if funcs.all? {|func| OpenSSL.check_func("#{func}_Transform", hdr)} && types.all? {|type| have_type("#{type}_CTX", hdr)} $defs << "-D#{name.upcase}_USE_OPENSSL" + $headers << "#{name}ossl.h" return :ossl end end diff --git a/ext/digest/md5/depend b/ext/digest/md5/depend index 58829918e4..288e37b982 100644 --- a/ext/digest/md5/depend +++ b/ext/digest/md5/depend @@ -1,4 +1,5 @@ md5.o: md5.c md5.h $(srcdir)/../defs.h +md5init.o: $(LOCAL_HDRS) # AUTOGENERATED DEPENDENCIES START md5init.o: $(RUBY_EXTCONF_H) diff --git a/ext/digest/rmd160/depend b/ext/digest/rmd160/depend index 2a5b279047..25cb820106 100644 --- a/ext/digest/rmd160/depend +++ b/ext/digest/rmd160/depend @@ -1,4 +1,5 @@ -rmd160.o: rmd160.c rmd160.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers) +rmd160.o: rmd160.c rmd160.h $(srcdir)/../defs.h +rmd160init.o: $(LOCAL_HDRS) # AUTOGENERATED DEPENDENCIES START rmd160init.o: $(RUBY_EXTCONF_H) diff --git a/ext/digest/sha1/depend b/ext/digest/sha1/depend index b67f9ae6bb..09c7c5d770 100644 --- a/ext/digest/sha1/depend +++ b/ext/digest/sha1/depend @@ -1,4 +1,5 @@ sha1.o: sha1.c sha1.h $(srcdir)/../defs.h +sha1init.o: $(LOCAL_HDRS) # AUTOGENERATED DEPENDENCIES START sha1init.o: $(RUBY_EXTCONF_H) diff --git a/ext/digest/sha2/depend b/ext/digest/sha2/depend index 0a0bca2081..0cbc6bf28e 100644 --- a/ext/digest/sha2/depend +++ b/ext/digest/sha2/depend @@ -1,4 +1,5 @@ -sha2.o: sha2.c sha2.h $(srcdir)/../defs.h $(HDRS) $(ruby_headers) +sha2.o: sha2.c sha2.h $(srcdir)/../defs.h +sha2init.o: $(LOCAL_HDRS) # AUTOGENERATED DEPENDENCIES START sha2init.o: $(RUBY_EXTCONF_H) diff --git a/ext/extmk.rb b/ext/extmk.rb index 3fe1115273..50b9485886 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -129,6 +129,7 @@ def extract_makefile(makefile, keep = true) end $objs = (m[/^OBJS[ \t]*=[ \t](.*)/, 1] || "").split $srcs = (m[/^SRCS[ \t]*=[ \t](.*)/, 1] || "").split + $headers = (m[/^LOCAL_HDRS[ \t]*=[ \t](.*)/, 1] || "").split $LOCAL_LIBS = m[/^LOCAL_LIBS[ \t]*=[ \t]*(.*)/, 1] || "" $LIBPATH = Shellwords.shellwords(m[/^libpath[ \t]*=[ \t]*(.*)/, 1] || "") - %w[$(libdir) $(topdir)] true diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 53aea8cecd..3e517614dc 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1940,6 +1940,7 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " " headers = %w[ $(hdrdir)/ruby.h + $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h @@ -1947,6 +1948,7 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h ] + headers += $headers if RULE_SUBST headers.each {|h| h.sub!(/.*/, &RULE_SUBST.method(:%))} end @@ -2286,6 +2288,7 @@ 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(' ')} +LOCAL_HDRS = #{$headers.join(' ')} TARGET = #{target} TARGET_NAME = #{target && target[/\A\w+/]} TARGET_ENTRY = #{EXPORT_PREFIX || ''}Init_$(TARGET_NAME) @@ -2527,6 +2530,7 @@ site-install-rb: install-rb $objs = nil $srcs = nil + $headers = [] $libs = "" if $enable_shared or RbConfig.expand(config["LIBRUBY"].dup) != RbConfig.expand(config["LIBRUBY_A"].dup) $LIBRUBYARG = config['LIBRUBYARG'] |