aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/extconf.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-31 05:22:06 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-31 05:22:06 +0000
commit00dfd7d7cc1f5ead0bbd8e239eaffa555c8c6686 (patch)
treeccaf38df55eadb139c5c75798542c00a94e118e9 /ext/openssl/extconf.rb
parentf8817c7262afd77028e7cb704e440b67a1104cb7 (diff)
downloadruby-00dfd7d7cc1f5ead0bbd8e239eaffa555c8c6686.tar.gz
* ext/openssl/extconf.rb: move gmake specific features
into GNUmakefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/extconf.rb')
-rw-r--r--ext/openssl/extconf.rb52
1 files changed, 26 insertions, 26 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 632f0dac47..7d371c8b1f 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -28,33 +28,9 @@ message "=== OpenSSL for Ruby configurator ===\n"
#
if with_config("debug") or enable_config("debug")
$defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
- $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
-
- if CONFIG["CC"] =~ /gcc/
- srcs = []
- for f in Dir[File.join($srcdir, "*.c")]
- srcs.push File.basename(f)
- end
- srcs = srcs.join(" ")
-
- $distcleanfiles << "dep" if defined? $distcleanfiles
-
- File.open(File.join($srcdir, "depend"), "w") {|f|
- f.print <<EOD
-SRCS = #{srcs}
-
-test-link:
- $(CC) $(DLDFLAGS) -o .testlink $(OBJS) $(LIBPATH) $(LIBS) $(LOCAL_LIBS)
- @$(RM) .testlink
- @echo "Done."
-dep:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(SRCS) -MM > dep
-
-include dep
-EOD
- }
- File.open(File.join($srcdir, "dep"), "w").close
+ if /gcc/ =~ CONFIG["CC"]
+ $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
end
end
@@ -120,5 +96,29 @@ message "=== Checking for Ruby features... ===\n"
have_func("rb_obj_init_copy", "ruby.h")
message "=== Checking done. ===\n"
+$distcleanfiles << "GNUmakefile" << "dep"
create_makefile("openssl")
+if /gcc/ =~ CONFIG["CC"]
+ File.open("GNUmakefile", "w") {|f|
+ f.print <<EOD
+include Makefile
+
+SRCS = $(OBJS:.o=.c)
+
+test-link: $(OBJS)
+ $(CC) $(DLDFLAGS) #{OUTFLAG}.testlink $(OBJS) $(LIBPATH) $(LIBS) $(LOCAL_LIBS)
+ @$(RM) .testlink
+ @echo "Done."
+
+dep: $(SRCS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -MM | \\
+ sed -e 's|$(topdir)/|$$(topdir)/|g' \\
+ -e 's|$(srcdir)/|$$(srcdir)/|g' \\
+ -e 's|$(hdrdir)/|$$(hdrdir)/|g' \\
+ > dep
+
+include dep
+EOD
+ }
+end
message "Done.\n"