* 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
This commit is contained in:
nobu 2016-07-06 05:44:58 +00:00
Родитель c89b06455c
Коммит 1bdc1a5529
8 изменённых файлов: 24 добавлений и 2 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)

Просмотреть файл

@ -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

Просмотреть файл

@ -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']