[前][次][番号順一覧][スレッド一覧]

ruby-changes:43515

From: nobu <ko1@a...>
Date: Wed, 6 Jul 2016 14:45:03 +0900 (JST)
Subject: [ruby-changes:43515] nobu:r55588 (trunk): Local header dependencies

nobu	2016-07-06 14:44:58 +0900 (Wed, 06 Jul 2016)

  New Revision: 55588

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55588

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/ext/digest/digest_conf.rb
    trunk/ext/digest/md5/depend
    trunk/ext/digest/rmd160/depend
    trunk/ext/digest/sha1/depend
    trunk/ext/digest/sha2/depend
    trunk/ext/extmk.rb
    trunk/lib/mkmf.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55587)
+++ ChangeLog	(revision 55588)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul  6 14:44:56 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@r...>
 
 	* lib/net/http/generic_rquest.rb (write_header): A Request-Line must
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 55587)
+++ lib/mkmf.rb	(revision 55588)
@@ -1940,6 +1940,7 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARA https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1940
     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_SEPARA https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1948
       $(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.me https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2288
 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 https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2530
 
     $objs = nil
     $srcs = nil
+    $headers = []
     $libs = ""
     if $enable_shared or RbConfig.expand(config["LIBRUBY"].dup) != RbConfig.expand(config["LIBRUBY_A"].dup)
       $LIBRUBYARG = config['LIBRUBYARG']
Index: ext/digest/sha1/depend
===================================================================
--- ext/digest/sha1/depend	(revision 55587)
+++ ext/digest/sha1/depend	(revision 55588)
@@ -1,4 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha1/depend#L1
 sha1.o: sha1.c sha1.h $(srcdir)/../defs.h
+sha1init.o: $(LOCAL_HDRS)
 
 # AUTOGENERATED DEPENDENCIES START
 sha1init.o: $(RUBY_EXTCONF_H)
Index: ext/digest/sha2/depend
===================================================================
--- ext/digest/sha2/depend	(revision 55587)
+++ ext/digest/sha2/depend	(revision 55588)
@@ -1,4 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/depend#L1
-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)
Index: ext/digest/md5/depend
===================================================================
--- ext/digest/md5/depend	(revision 55587)
+++ ext/digest/md5/depend	(revision 55588)
@@ -1,4 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/md5/depend#L1
 md5.o: md5.c md5.h $(srcdir)/../defs.h
+md5init.o: $(LOCAL_HDRS)
 
 # AUTOGENERATED DEPENDENCIES START
 md5init.o: $(RUBY_EXTCONF_H)
Index: ext/digest/digest_conf.rb
===================================================================
--- ext/digest/digest_conf.rb	(revision 55587)
+++ ext/digest/digest_conf.rb	(revision 55588)
@@ -6,6 +6,7 @@ def digest_conf(name, hdr = name, funcs https://github.com/ruby/ruby/blob/trunk/ext/digest/digest_conf.rb#L6
       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 https://github.com/ruby/ruby/blob/trunk/ext/digest/digest_conf.rb#L22
       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
Index: ext/digest/rmd160/depend
===================================================================
--- ext/digest/rmd160/depend	(revision 55587)
+++ ext/digest/rmd160/depend	(revision 55588)
@@ -1,4 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/digest/rmd160/depend#L1
-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)
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 55587)
+++ ext/extmk.rb	(revision 55588)
@@ -129,6 +129,7 @@ def extract_makefile(makefile, keep = tr https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L129
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]