summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-06 05:44:58 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-06 05:44:58 (GMT)
commit1bdc1a552990188cc15cb8dc051afce012bfb4c4 (patch)
tree99f504a737b65bfbd95d71ba2e2bd8a9ab5fa9b4 /ext/digest
parentc89b06455cbba451935435af1bb9ccf34b0b35cf (diff)
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
Diffstat (limited to 'ext/digest')
-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
5 files changed, 8 insertions, 2 deletions
diff --git a/ext/digest/digest_conf.rb b/ext/digest/digest_conf.rb
index 4326528..8e36ce5 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 5882991..288e37b 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 2a5b279..25cb820 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 b67f9ae..09c7c5d 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 0a0bca2..0cbc6bf 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)