summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ext/digest/digest_conf.rb2
-rw-r--r--ext/digest/md5/depend1
-rw-r--r--ext/digest/rmd160/depend3
-rw-r--r--ext/digest/sha1/depend1
-rw-r--r--ext/digest/sha2/depend3
-rwxr-xr-xext/extmk.rb1
-rw-r--r--lib/mkmf.rb4
8 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 294af7f26c3..c22e1151d25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 432652852fd..8e36ce5d41e 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 58829918e41..288e37b982e 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 2a5b279047c..25cb8201066 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 b67f9ae6bb7..09c7c5d7707 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 0a0bca20815..0cbc6bf28ee 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 3fe1115273f..50b9485886b 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 53aea8cecd6..3e517614dcf 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']