summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/extconf.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 7d371c8b1f..ea8c54c0a2 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -112,9 +112,13 @@ test-link: $(OBJS)
dep: $(SRCS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -MM | \\
- sed -e 's|$(topdir)/|$$(topdir)/|g' \\
- -e 's|$(srcdir)/|$$(srcdir)/|g' \\
- -e 's|$(hdrdir)/|$$(hdrdir)/|g' \\
+ $(RUBY) -p -e 'BEGIN{S = []' \\
+ -e 'while !ARGV.empty? and /^(\\w+)=(.*)/ =~ ARGV[0]' \\
+ -e 'S << [/\#{Regexp.quote($$2)}/, "$$(\#{$$1})"]' \\
+ -e 'ARGV.shift' \\
+ -e 'end' \\
+ -e '}' -e 'S.each(&method(:gsub!))' -- \\
+ 'topdir=$(topdir)' 'srcdir=$(srcdir)' 'hdrdir=$(hdrdir)' \\
> dep
include dep